File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ const config: AgentConfig = {
2828 stepPrompt :
2929 'Do not use the find_files tool or any tools again. Just give your response.' ,
3030 handleSteps : function * ( { agentState, prompt, params } ) {
31- yield {
31+ const toolResult = yield {
3232 toolName : 'find_files' ,
33- args : { prompt } ,
33+ args : { prompt : prompt ?? '' } ,
3434 }
3535 yield 'STEP_ALL'
3636 } ,
Original file line number Diff line number Diff line change @@ -186,10 +186,12 @@ export interface AgentStepContext {
186186/**
187187 * Tool call object for handleSteps generator
188188 */
189- export interface ToolCall < T extends ToolName = ToolName > {
190- toolName : T
191- args ?: Tools . GetToolParams < T >
192- }
189+ export type ToolCall < T extends ToolName = ToolName > = {
190+ [ K in T ] : {
191+ toolName : K
192+ args ?: Tools . GetToolParams < K >
193+ }
194+ } [ T ]
193195
194196/**
195197 * Result from executing a tool
Original file line number Diff line number Diff line change @@ -186,10 +186,12 @@ export interface AgentStepContext {
186186/**
187187 * Tool call object for handleSteps generator
188188 */
189- export interface ToolCall < T extends ToolName = ToolName > {
190- toolName : T
191- args ?: Tools . GetToolParams < T >
192- }
189+ export type ToolCall < T extends ToolName = ToolName > = {
190+ [ K in T ] : {
191+ toolName : K
192+ args ?: Tools . GetToolParams < K >
193+ }
194+ } [ T ]
193195
194196/**
195197 * Result from executing a tool
You can’t perform that action at this time.
0 commit comments