diff --git a/docs/refactor/send-refactor.md b/docs/refactor/send-refactor.md deleted file mode 100644 index 42196ed5f..000000000 --- a/docs/refactor/send-refactor.md +++ /dev/null @@ -1,7 +0,0 @@ -# send-refactor scratchpad - -- [x] Commit + push current outbound refactor changes -- [x] Step 1: centralize outbound target validation -- [ ] Step 2: normalize payloads + single delivery call -- [ ] Step 3: unify outbound JSON/result formatting -- [ ] Cleanup: delete scratchpad, final lint + tests, commit + push diff --git a/src/cli/program.ts b/src/cli/program.ts index 6f5f40d3c..89447378a 100644 --- a/src/cli/program.ts +++ b/src/cli/program.ts @@ -28,8 +28,8 @@ import { registerBrowserCli } from "./browser-cli.js"; import { registerCanvasCli } from "./canvas-cli.js"; import { registerCronCli } from "./cron-cli.js"; import { createDefaultDeps } from "./deps.js"; -import { registerDocsCli } from "./docs-cli.js"; import { registerDnsCli } from "./dns-cli.js"; +import { registerDocsCli } from "./docs-cli.js"; import { registerGatewayCli } from "./gateway-cli.js"; import { registerHooksCli } from "./hooks-cli.js"; import { registerModelsCli } from "./models-cli.js"; diff --git a/src/commands/configure.ts b/src/commands/configure.ts index 60a56516f..95905171b 100644 --- a/src/commands/configure.ts +++ b/src/commands/configure.ts @@ -818,22 +818,22 @@ export async function runConfigureWizard( runtime.error(controlUiAssets.message); } - note( - (() => { - const bind = nextConfig.gateway?.bind ?? "loopback"; - const links = resolveControlUiLinks({ - bind, - port: gatewayPort, - basePath: nextConfig.gateway?.controlUi?.basePath, - }); - return [ - `Web UI: ${links.httpUrl}`, - `Gateway WS: ${links.wsUrl}`, - "Docs: https://docs.clawd.bot/web/control-ui", - ].join("\n"); - })(), - "Control UI", - ); + note( + (() => { + const bind = nextConfig.gateway?.bind ?? "loopback"; + const links = resolveControlUiLinks({ + bind, + port: gatewayPort, + basePath: nextConfig.gateway?.controlUi?.basePath, + }); + return [ + `Web UI: ${links.httpUrl}`, + `Gateway WS: ${links.wsUrl}`, + "Docs: https://docs.clawd.bot/web/control-ui", + ].join("\n"); + })(), + "Control UI", + ); const browserSupport = await detectBrowserOpenSupport(); if (!browserSupport.ok) { diff --git a/src/commands/docs.ts b/src/commands/docs.ts index 04b326a34..c7689467a 100644 --- a/src/commands/docs.ts +++ b/src/commands/docs.ts @@ -94,7 +94,12 @@ function parseSearchOutput(raw: string): DocResult[] { const content = extractLine(lines, "Content:"); const contentIndex = lines.findIndex((line) => line.startsWith("Content:")); const body = - contentIndex >= 0 ? lines.slice(contentIndex + 1).join("\n").trim() : ""; + contentIndex >= 0 + ? lines + .slice(contentIndex + 1) + .join("\n") + .trim() + : ""; const snippet = normalizeSnippet(content, firstParagraph(body)); results.push({ title, link, snippet: snippet || undefined }); } @@ -102,7 +107,7 @@ function parseSearchOutput(raw: string): DocResult[] { } function escapeMarkdown(text: string): string { - return text.replace(/[\[\]()]/g, "\\$&"); + return text.replace(/[()[\]]/g, "\\$&"); } function buildMarkdown(query: string, results: DocResult[]): string {