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.
Add user prompt for context length exceeded
Fixes block#1096 Add user prompt for further truncation or exit when context length exceeds limits. * Modify `crates/goose-cli/src/prompt.rs` to add `TruncateFurther` variant to `InputType` enum and `Input` struct, and add `ask_user_for_truncation` function to `Prompt` trait. * Modify `crates/goose/src/agents/extension.rs` to update `ContextLimit` error to include user prompt. * Add test cases in `crates/goose/tests/providers.rs` for user prompt on context length exceeded, including scenarios for further truncation and exit. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/block/goose/issues/1096?shareId=XXXX-XXXX-XXXX-XXXX).
- Loading branch information
1 parent
691a065
commit 3cf1b6f
Showing
3 changed files
with
63 additions
and
7 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