Refactor API integration and enhance command handling
- Removed unused modules and updated module paths for clarity. - Added autocomplete functionality for command input in InputState. - Updated AppStateRest to include a method for checking if a turn is in flight. - Refactored subagent engine to use new API client structure. - Changed default provider from "openrouter" to "zen" with updated API keys and models. - Implemented tests for memory management and edit log functionalities. - Enhanced error handling in API requests and improved response parsing. - Updated UI components to reflect new API provider and status indicators.
This commit is contained in:
@@ -27,23 +27,23 @@ pub struct ModelRole {
|
||||
impl Default for AppConfig {
|
||||
fn default() -> Self {
|
||||
let mut providers = HashMap::new();
|
||||
providers.insert("openrouter".to_string(), ProviderConfig {
|
||||
api_base: "https://openrouter.ai/api/v1".to_string(),
|
||||
api_key_env: Some("OPENROUTER_API_KEY".to_string()),
|
||||
default_model: Some("anthropic/claude-opus-4-8".to_string()),
|
||||
providers.insert("zen".to_string(), ProviderConfig {
|
||||
api_base: "https://opencode.ai/zen/v1".to_string(),
|
||||
api_key_env: Some("API_KEY".to_string()),
|
||||
default_model: Some("deepseek-v4-flash-free".to_string()),
|
||||
});
|
||||
let mut model_roles = HashMap::new();
|
||||
model_roles.insert("default".to_string(), ModelRole {
|
||||
provider: "openrouter".to_string(),
|
||||
model: "anthropic/claude-opus-4-8".to_string(),
|
||||
provider: "zen".to_string(),
|
||||
model: "deepseek-v4-flash-free".to_string(),
|
||||
max_tokens: Some(8192),
|
||||
temperature: Some(0.7),
|
||||
});
|
||||
AppConfig {
|
||||
providers,
|
||||
model_roles,
|
||||
default_provider: "openrouter".to_string(),
|
||||
default_model: "anthropic/claude-opus-4-8".to_string(),
|
||||
default_provider: "zen".to_string(),
|
||||
default_model: "deepseek-v4-flash-free".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user