mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-10-01 14:04:51 +02:00
[eric] chat: web tool rows show a clean source domain/query, not the raw url+prompt dump
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user