惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
H
Help Net Security
Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
博客园 - 叶小钗
Y
Y Combinator Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
C
Check Point Blog
Recent Announcements
Recent Announcements
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
B
Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: show web search queries in progress drafts · opencla...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -280,19 +280,76 @@ function resolveWebSearchDetail(args: unknown): string | undefined {

280280

return undefined;

281281

}

282282283-

const query = normalizeOptionalString(record.query);

283+

const queries = collectWebSearchQueries(record);

284284

const count =

285285

typeof record.count === "number" && Number.isFinite(record.count) && record.count > 0

286286

? Math.floor(record.count)

287-

: undefined;

288-289-

if (!query) {

287+

: typeof record.max_results === "number" &&

288+

Number.isFinite(record.max_results) &&

289+

record.max_results > 0

290+

? Math.floor(record.max_results)

291+

: typeof record.num_results === "number" &&

292+

Number.isFinite(record.num_results) &&

293+

record.num_results > 0

294+

? Math.floor(record.num_results)

295+

: typeof record.limit === "number" && Number.isFinite(record.limit) && record.limit > 0

296+

? Math.floor(record.limit)

297+

: typeof record.top_k === "number" && Number.isFinite(record.top_k) && record.top_k > 0

298+

? Math.floor(record.top_k)

299+

: undefined;

300+301+

if (queries.length === 0) {

290302

return undefined;

291303

}

292304293-

return count !== undefined ? `for "${query}" (top ${count})` : `for "${query}"`;

305+

const displayedQueries = queries.slice(0, 3).map((query) => `"${query}"`);

306+

const queryText =

307+

queries.length > displayedQueries.length

308+

? `${displayedQueries.join(", ")}…`

309+

: displayedQueries.join(", ");

310+311+

return count !== undefined ? `for ${queryText} (top ${count})` : `for ${queryText}`;

294312

}

295313314+

function collectWebSearchQueries(record: Record<string, unknown>): string[] {

315+

const queries: string[] = [];

316+

const seen = new Set<string>();

317+

const add = (value: unknown) => {

318+

const normalized = normalizeOptionalString(value);

319+

if (!normalized || seen.has(normalized)) {

320+

return;

321+

}

322+

seen.add(normalized);

323+

queries.push(normalized);

324+

};

325+326+

add(record.query);

327+

add(record.q);

328+

add(record.search);

329+

add(record.input);

330+331+

for (const key of ["search_query", "image_query", "queries"]) {

332+

const value = record[key];

333+

if (!Array.isArray(value)) {

334+

continue;

335+

}

336+

for (const entry of value) {

337+

if (typeof entry === "string") {

338+

add(entry);

339+

continue;

340+

}

341+

const entryRecord = asRecord(entry);

342+

if (!entryRecord) {

343+

continue;

344+

}

345+

add(entryRecord.query);

346+

add(entryRecord.q);

347+

add(entryRecord.search);

348+

}

349+

}

350+351+

return queries;

352+

}

296353

function resolveWebFetchDetail(args: unknown): string | undefined {

297354

const record = asRecord(args);

298355

if (!record) {