Skip to content

Commit bc9f35a

Browse files
authored
Merge pull request #2040 from dgageot/board/can-the-recently-added-tools-resultsucce-26689036
Use ResultSuccess/ResultError helpers in tasks and user_prompt tools
2 parents d5e9a73 + 5b21e93 commit bc9f35a

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

pkg/tools/builtin/tasks.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,7 @@ func (t *TasksTool) nextTask(_ context.Context, _ tools.ToolCall) (*tools.ToolCa
459459
}
460460
}
461461

462-
return &tools.ToolCallResult{
463-
Output: "No actionable tasks. Everything is either done or blocked.",
464-
}, nil
462+
return tools.ResultSuccess("No actionable tasks. Everything is either done or blocked."), nil
465463
}
466464

467465
func (t *TasksTool) addDependency(_ context.Context, params AddDependencyArgs) (*tools.ToolCallResult, error) {

pkg/tools/builtin/user_prompt.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ func (t *UserPromptTool) userPrompt(ctx context.Context, params UserPromptArgs)
7474
}
7575

7676
if result.Action != tools.ElicitationActionAccept {
77-
return &tools.ToolCallResult{
78-
Output: string(responseJSON),
79-
IsError: true,
80-
}, nil
77+
return tools.ResultError(string(responseJSON)), nil
8178
}
8279

8380
return tools.ResultSuccess(string(responseJSON)), nil

0 commit comments

Comments
 (0)