From 2eeaf991b9e5fd1f34c152f3c7d01bf2b6209198 Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Tue, 20 Jan 2026 20:05:45 +0800 Subject: [PATCH] update --- assistant/src/routes/opencode/ls.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assistant/src/routes/opencode/ls.ts b/assistant/src/routes/opencode/ls.ts index 380d518..7cb1592 100644 --- a/assistant/src/routes/opencode/ls.ts +++ b/assistant/src/routes/opencode/ls.ts @@ -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({