Skip to content

Conversation

@gossion
Copy link
Member

@gossion gossion commented Dec 15, 2025

This pull request updates the command execution interface across multiple tool executors to accept a context.Context parameter. This change ensures that all command executions can support context-aware operations, such as cancellation and timeouts, and improves consistency across the codebase. The update affects the interface, all executor implementations, and their usages in handlers and tests.

args["_tool_name"] = toolName

result, err := executor.Execute(args, cfg)
result, err := executor.Execute(ctx, args, cfg)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for reviewer: the major purpose is to make the tools be aware of this ctx.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will the context be used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be used for "context-aware operations, such as cancellation and timeouts", will add ctx control later if needed.

args["_tool_name"] = toolName

result, err := executor.Execute(args, cfg)
result, err := executor.Execute(ctx, args, cfg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will the context be used?

@gossion gossion merged commit a2bcee7 into main Dec 15, 2025
6 checks passed
@gossion gossion deleted the guwe/tool-ctx branch December 15, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants