This commit is contained in:
xiongxiao
2026-01-20 17:34:53 +08:00
parent dbd044ec66
commit 398c41a512
3 changed files with 4 additions and 2 deletions

View File

@@ -392,7 +392,8 @@ export const parseHomeArg = (homedir?: string) => {
} else if (options.root) {
_configDir = options.root;
}
const isOpencode = execPath.includes('.opencode') || execPath.includes('opencode.exe');
const checkUrl = ['.opencode', 'bin/opencode', 'opencode.exe']
const isOpencode = checkUrl.some((item) => execPath.includes(item))
return {
isOpencode,
options,

View File

@@ -66,7 +66,7 @@ app.route({
})
},
}).define(async (ctx) => {
const url = opencodeManager.getUrl();
const url = await opencodeManager.getUrl();
ctx.body = { content: url };
}).addTo(app);
// 调用 path: opencode key: ls-projects