Skip to content

Commit

Permalink
fix extension load error
Browse files Browse the repository at this point in the history
  • Loading branch information
swk777 committed Nov 1, 2024
1 parent 45a9edb commit 7779229
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions electron/main/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ const refreshNodelets = (extensions, db) => {
export function refreshExtension(db) {
const workspacePath = globalThis.workspacePath;
const extensionPath = workspacePath + '/extensions';
const extensions = readExtensions(extensionPath);
refreshNodelets(extensions, db);
db.data.extensions = extensions;
try {
const extensions = readExtensions(extensionPath);
refreshNodelets(extensions, db);
db.data.extensions = extensions;
} catch (_) {
db.data.extensions = [];
}

}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OpenFlow",
"version": "0.0.8",
"version": "0.0.2",
"main": "dist-electron/main/index.js",
"description": "OpenFlow is a local-first, extendable LLM (Large Language Model) orchestration app designed to streamline the running of LLM workflows locally.",
"author": {
Expand Down

0 comments on commit 7779229

Please sign in to comment.