-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: tidy up claude cli handling #5594
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
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 | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,9 +16,8 @@ use crate::model::ModelConfig; | |||||||
| use rmcp::model::Tool; | ||||||||
|
|
||||||||
| pub const CLAUDE_CODE_DEFAULT_MODEL: &str = "claude-sonnet-4-20250514"; | ||||||||
| pub const CLAUDE_CODE_KNOWN_MODELS: &[&str] = &["sonnet", "opus", "claude-sonnet-4-20250514"]; | ||||||||
|
|
||||||||
| pub const CLAUDE_CODE_DOC_URL: &str = "https://claude.ai/cli"; | ||||||||
| pub const CLAUDE_CODE_KNOWN_MODELS: &[&str] = &["sonnet", "opus"]; | ||||||||
| pub const CLAUDE_CODE_DOC_URL: &str = "https://code.claude.com/docs/en/setup"; | ||||||||
|
|
||||||||
| #[derive(Debug, serde::Serialize)] | ||||||||
| pub struct ClaudeCodeProvider { | ||||||||
|
|
@@ -169,6 +168,34 @@ impl ClaudeCodeProvider { | |||||||
| } | ||||||||
|
|
||||||||
| /// Parse the JSON response from claude CLI | ||||||||
|
||||||||
| /// Parse the JSON response from claude CLI | |
| /// Apply permission flags to the command based on the current GooseMode |
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.
thanks, co-pilot! or delete the comment
Copilot
AI
Nov 6, 2025
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.
The error message has unclear wording. 'SmartApprove (most things will run or Chat Mode)' is grammatically incorrect. It should be clearer, such as: 'Please use Auto (which will run anything it needs to), SmartApprove (most things will run), or Chat Mode.'
| Please use Auto (which will run anything it needs to) or \ | |
| SmartApprove (most things will run or Chat Mode)\n\n\n" | |
| Please use Auto (which will run anything it needs to), SmartApprove (most things will run), or Chat Mode\n\n\n" |
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 change the path using @jamadeo 's new tricks
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.
Removing 'claude-sonnet-4-20250514' from CLAUDE_CODE_KNOWN_MODELS will cause the model argument to not be passed to the CLI when using the default model (since line 337 checks if the model is in KNOWN_MODELS). This breaks the default behavior where users expect the default model to be passed to the command.