update
This commit is contained in:
@@ -3,6 +3,7 @@ import { createSkill, tool } from "@kevisual/router";
|
||||
import { opencodeManager } from './module/open.ts'
|
||||
import path from "node:path";
|
||||
import { execSync } from "node:child_process";
|
||||
import { useKey } from '@kevisual/use-config';
|
||||
|
||||
// 创建一个opencode 客户端
|
||||
app.route({
|
||||
@@ -67,7 +68,12 @@ app.route({
|
||||
},
|
||||
}).define(async (ctx) => {
|
||||
const url = await opencodeManager.getUrl();
|
||||
ctx.body = { content: url };
|
||||
const cnbURL = useKey('CNB_VSCODE_PROXY_URI') as string | undefined;
|
||||
let content = `本地访问地址: ${url}`
|
||||
if (cnbURL) {
|
||||
content += `\n云端访问地址: ${cnbURL.replace('{{port}}', '5000')}`;
|
||||
}
|
||||
ctx.body = { content };
|
||||
}).addTo(app);
|
||||
// 调用 path: opencode key: ls-projects
|
||||
app.route({
|
||||
|
||||
Reference in New Issue
Block a user