-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix: exclude platform_schedule_tool in CLI #6442
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
Changes from all commits
b1888b2
ecf7c54
1f716ee
7ffb793
a2b0ed5
c2740ea
d8d680b
7de5184
0d288ce
4105408
ab183b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,16 +20,20 @@ impl Agent { | |
| arguments: serde_json::Value, | ||
| _request_id: String, | ||
| ) -> ToolResult<Vec<Content>> { | ||
| let scheduler = match self.scheduler_service.lock().await.as_ref() { | ||
| Some(s) => s.clone(), | ||
| None => { | ||
| return Err(ErrorData::new( | ||
| let scheduler = self | ||
| .scheduler_service | ||
| .lock() | ||
| .await | ||
| .as_ref() | ||
| .ok_or_else(|| { | ||
| ErrorData::new( | ||
| ErrorCode::INTERNAL_ERROR, | ||
| "Scheduler not available. This tool only works in server mode.".to_string(), | ||
| "Scheduler service should be available when schedule tool is called" | ||
|
||
| .to_string(), | ||
| None, | ||
| )) | ||
| } | ||
| }; | ||
| ) | ||
| })? | ||
| .clone(); | ||
|
|
||
| let action = arguments | ||
| .get("action") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,8 +164,10 @@ export GOOSE_AUTO_COMPACT_THRESHOLD=0.005 | |
|
|
||
| OUTPUT=$(mktemp) | ||
|
|
||
| echo "Step 1: Creating session with first message..." | ||
| (cd "$TESTDIR" && "$GOOSE_BIN" run --text "hello" 2>&1) | tee "$OUTPUT" | ||
| LONG_RESPONSE_PROMPT="Count from 1 to 200, one number per line." | ||
|
|
||
| echo "Step 1: Creating session with first message (generating tokens for threshold)..." | ||
| (cd "$TESTDIR" && "$GOOSE_BIN" run --text "$LONG_RESPONSE_PROMPT" 2>&1) | tee "$OUTPUT" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happened here? from a different branch maybe?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because we removed the platform_schedule_tool from CLI, the context usage is getting smaller and the original test prompt cannot reach to the context size to trigger the compact. So I changed the prompt to generate a bit longer response so that it reached to the threshold of 0.5% to trigger the compact |
||
|
|
||
| if ! command -v jq &> /dev/null; then | ||
| echo "✗ FAILED: jq is required for this test" | ||
|
|
||
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.
or just delete this test
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.
I checked the code, it seems it still worthwhile to use this test to test the ordering of the tools. I changed the test name to reflect the purpose of this test.