diff --git a/panes/chat/ToolResult.tsx b/panes/chat/ToolResult.tsx index 8bb4268c..14f06ff0 100644 --- a/panes/chat/ToolResult.tsx +++ b/panes/chat/ToolResult.tsx @@ -44,7 +44,21 @@ const getToolParams = (toolName: string, args: any): string => { } } const filteredArgs = Object.entries(args).filter(([key]) => !['token', 'repoContext', 'content', 'path'].includes(key)); - return filteredArgs.map(([key, value]) => `${key}: ${typeof value === 'string' ? value : '[complex value]'}`).join(', '); + return filteredArgs.map(([key, value]) => { + if (typeof value === 'string') { + return `${key}: ${value}`; + } else if (typeof value === 'number' || typeof value === 'boolean') { + return `${key}: ${value}`; + } else if (value === null) { + return `${key}: null`; + } else if (Array.isArray(value)) { + return `${key}: [Array]`; + } else if (typeof value === 'object') { + return `${key}: {Object}`; + } else { + return `${key}: ${typeof value}`; + } + }).join(', '); }; export const ToolResult: React.FC = ({ toolName, args, result, state }) => { @@ -123,4 +137,4 @@ export const ToolResult: React.FC = ({ toolName, args, result, ); -}; +}; \ No newline at end of file