[eric] chat: web tool rows show a clean source domain/query, not the raw url+prompt dump

This commit is contained in:
ciregenz
2026-07-21 17:15:45 -07:00
parent 844dfb9300
commit 7c86293b72
@@ -24,7 +24,14 @@ export function getInputSummary(toolName: string, input: any): string {
if (isSettingsReadTool(toolName)) return '';
const mcp = parseMcpToolName(toolName);
if (mcp.isMcp) return getMcpInputSummary(input, mcp.action, mcp.serverSlug);
if (mcp.isMcp) {
// Web tools (our openswarm-web MCP) get the clean source summary, a bare domain / quoted query,
// instead of the generic "url: https://… prompt: …" key-value dump. Reads like Perplexity sources.
const act = (mcp.action || '').toLowerCase();
if (act === 'websearch') return quoteQuery(input.query || input.search_term || '');
if (act === 'webfetch') return prettyUrl(input.url || '');
return getMcpInputSummary(input, mcp.action, mcp.serverSlug);
}
const n = toolName.toLowerCase();
if (isBashTool(toolName)) {