-
Notifications
You must be signed in to change notification settings - Fork 6k
Compaction resiliency improvements #5618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
78dbfe8
first pass
katzdave 7e7d317
fmt
katzdave 3b050bd
change args
katzdave 250a3bd
rm
katzdave 9b07c51
merge conflict
katzdave 99ee9f8
Merge remote-tracking branch 'origin/dkatz/middle-truncation' into dk…
katzdave 4a55c3e
provider test
katzdave 9798a49
simply mock provider
katzdave 0cf3c94
fmt
katzdave ec7f2dd
more cleanup + fix manual compact bug
katzdave 64d1f4b
fmt
katzdave 468ce8d
lint
katzdave 81f88fe
Merge branch 'main' of github.com:block/goose into dkatz/tool-loop-cl…
katzdave 2109cce
small fix
katzdave a168f2e
fmt
katzdave 0ddab9f
Merge branch 'main' of github.com:block/goose into dkatz/tool-loop-cl…
katzdave 12118f7
Fix
katzdave bdec3cb
more testing
katzdave a30e48e
fmt
katzdave 620df9f
Merge branch 'main' of github.com:block/goose into dkatz/tool-loop-cl…
katzdave 11cd639
Update crates/goose/src/agents/agent.rs
katzdave b9226fb
fix import
katzdave c4b3708
merge confl
katzdave 7138d35
fmt
katzdave 821076b
Add . to messages
katzdave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -781,8 +781,13 @@ impl Agent { | |||||
| .ok_or_else(|| anyhow::anyhow!("Session {} has no conversation", session_config.id))?; | ||||||
|
|
||||||
| let needs_auto_compact = !is_manual_compact | ||||||
| && crate::context_mgmt::check_if_compaction_needed(self, &conversation, None, &session) | ||||||
| .await?; | ||||||
| && crate::context_mgmt::check_if_compaction_needed( | ||||||
| self.provider().await?.as_ref(), | ||||||
| &conversation, | ||||||
| None, | ||||||
| &session, | ||||||
| ) | ||||||
| .await?; | ||||||
|
|
||||||
| let conversation_to_compact = conversation.clone(); | ||||||
|
|
||||||
|
|
@@ -817,7 +822,7 @@ impl Agent { | |||||
| ) | ||||||
| ); | ||||||
|
|
||||||
| match crate::context_mgmt::compact_messages(self, &conversation_to_compact, false).await { | ||||||
| match crate::context_mgmt::compact_messages(self.provider().await?.as_ref(), &conversation_to_compact, is_manual_compact).await { | ||||||
|
||||||
| match crate::context_mgmt::compact_messages(self.provider().await?.as_ref(), &conversation_to_compact, is_manual_compact).await { | |
| match crate::context_mgmt::compact_messages(self.provider().await?.as_ref(), &conversation_to_compact, false).await { |
katzdave marked this conversation as resolved.
Outdated
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any particular reason to not have these imported with a
use crate::context_mgmt::{...}?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done