diff --git a/assistant/src/routes/cnb-board/live/live-content.ts b/assistant/src/routes/cnb-board/live/live-content.ts index 2b0b88f..ecfd1b7 100644 --- a/assistant/src/routes/cnb-board/live/live-content.ts +++ b/assistant/src/routes/cnb-board/live/live-content.ts @@ -8,11 +8,11 @@ export const getLiveMdContent = (opts?: { more?: boolean }) => { const url = useKey('CNB_VSCODE_PROXY_URI') || '' const token = useKey('CNB_TOKEN') || '' const openclawPort = useKey('OPENCLAW_PORT') || '80' - const openclawUrl = url?.replace('{{port}}', openclawPort) + const openclawUrl = url.replace('{{port}}', openclawPort) const openclawUrlSecret = openclawUrl + '/openclaw?token=' + token const opencodePort = useKey('OPENCODE_PORT') || '100' - const opencodeUrl = url?.replace('{{port}}', opencodePort) + const opencodeUrl = url.replace('{{port}}', opencodePort) // btoa('root:password'); // const _opencodeURL = new URL(opencodeUrl) _opencodeURL.username = 'root' @@ -21,7 +21,9 @@ export const getLiveMdContent = (opts?: { more?: boolean }) => { // console.log('btoa opencode auth: ', Buffer.from(`root:${token}`).toString('base64')) - const kevisualUrl = url?.replace('{{port}}', '51515') + const kevisualUrl = url.replace('{{port}}', '51515') + + const openWebUrl = url.replace('{{port}}', '200') const vscodeWebUrl = useKey('CNB_VSCODE_WEB_URL') || '' @@ -29,8 +31,11 @@ export const getLiveMdContent = (opts?: { more?: boolean }) => { ### 服务访问地址 #### nginx 反向代理访问(推荐) -- OpenClaw: ${openclawUrl+'/openclaw'} +- OpenClaw: ${openclawUrl + '/openclaw'} - OpenCode: ${opencodeUrl} +- VSCode Web: ${vscodeWebUrl} +- OpenWebUI: ${openWebUrl} +- Kevisual: ${kevisualUrl} ### 直接访问 - Kevisual: ${kevisualUrl} @@ -54,7 +59,7 @@ export const getLiveMdContent = (opts?: { more?: boolean }) => { - wss: vscode web的websocket地址 - cookie: vscode web的cookie,保持和浏览器一致 - url: vscode web的访问地址,可以直接访问vscode web -4. 运行cli命令,ev cnb live -c /workspace/live/keep.json +4. 运行cli命令,ev cnb live -c /workspace/live/keep.json.(直接对话opencode或者openclaw调用cnb-live技能即可) ` const labels = [