|
9 | 9 | * Type your queries or 'quit|q|exit' to exit. |
10 | 10 | * You: Find to articles about AI agent and return URLs |
11 | 11 | * [internal] Received response from Claude: [{"type":"text","text":"I'll search for information about AI agents |
12 | | - * and provide you with a summary."},{"type":"tool_use","id":"toolu_01He9TkzQfh2979bbeuxWVqM","name":"search", |
| 12 | + * and provide you with a summary."},{"type":"tool_use","id":"tool_01He9TkzQfh2979bbeuxWVqM","name":"search", |
13 | 13 | * "input":{"query":"what are AI agents definition capabilities applications","maxResults":2}}] |
14 | 14 | * [internal] Calling tool: {"name":"search","arguments":{"query":"what are AI agents definition ... |
15 | 15 | * I can help analyze the provided content about AI agents. |
@@ -140,26 +140,6 @@ class MCPClient { |
140 | 140 | } |
141 | 141 |
|
142 | 142 | return messages; |
143 | | - |
144 | | - // const lastContent = nextResponse.content[nextResponse.content.length - 1]; |
145 | | - // if (lastContent.type !== 'tool_use' && toolCallCount < 3) { |
146 | | - // return this.handleToolCall(lastContent, messages, toolCallCount + 1); |
147 | | - // } |
148 | | - // |
149 | | - // const lastContent = nextResponse.content[nextResponse.content.length - 1]; |
150 | | - // if (lastContent.type !== 'tool_use' && toolCallCount < 3) { |
151 | | - // return this.handleToolCall(lastContent, messages, toolCallCount + 1); |
152 | | - // } |
153 | | - // |
154 | | - // if (nextResponse.content typeof ToolUseBlock) { |
155 | | - // if (nextResponse.content.slice(-1).type !== 'tool_use' && toolCallCount < 3) { |
156 | | - // return this.handleToolCall(nextResponse.content.slice(-1), messages, toolCallCount + 1); |
157 | | - // } |
158 | | - // } |
159 | | - // |
160 | | - // messages.push({ role: nextResponse.role, content: nextResponse.content.map((x: TextBlockParam) => x.text || '').join('\n') }); |
161 | | - // |
162 | | - // return messages; |
163 | 143 | } |
164 | 144 |
|
165 | 145 | /** |
|
0 commit comments