forked from block/goose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes block#1075 Add timeout and cancellation handling for long running commands in Goose MCP. * Modify `crates/goose-cli/src/commands/session.rs` to add a timeout mechanism using `tokio::time::timeout` in the `agent_process_messages` function and implement cancellation notifications to interrupt long running commands. * Add a `cancel` method to `McpService` in `crates/mcp-client/src/service.rs` to send cancellation notifications. * Modify `crates/goose-cli/src/commands/mcp.rs` to add logic to handle cancellation notifications and interrupt long running commands in the `run_server` function. * Modify `crates/goose-server/src/commands/mcp.rs` to add logic to handle cancellation notifications and interrupt long running commands in the `run` function. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/block/goose/issues/1075?shareId=XXXX-XXXX-XXXX-XXXX).
- Loading branch information
1 parent
745b671
commit 4a56578
Showing
4 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters