chore: clean up lint and scratchpad
This commit is contained in:
@@ -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
|
||||
@@ -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";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user