Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,8 @@ pub struct App {
terminal_focused: bool,
pub tool_permissions: crate::tools::ToolPermissions,
pub skills_dirs: Vec<std::path::PathBuf>,
pub plugin_specs: Vec<crate::config::configuration::PluginSpec>,
pub project_root: std::path::PathBuf,
pub is_streaming: bool,
pending_session_title: Option<String>,
session_view_states: std::collections::HashMap<String, ClientSessionState>,
Expand Down Expand Up @@ -1138,6 +1140,8 @@ impl App {
terminal_focused: true,
tool_permissions: crate::tools::ToolPermissions::new(cwd_path),
skills_dirs: Vec::new(),
plugin_specs: Vec::new(),
project_root: std::path::PathBuf::from("."),
is_streaming: false,
pending_session_title: None,
session_view_states: std::collections::HashMap::new(),
Expand Down Expand Up @@ -1190,6 +1194,8 @@ impl App {
};

let loaded_config = crate::config::ConfigLoader::load()?;
let plugin_specs = loaded_config.merged_config.plugins.clone();
let project_root = loaded_config.project_root.clone();
let mut mcp_config = loaded_config.merged_config.mcp.clone();
crate::remote_mcp::apply_mcp_overrides(&mut mcp_config, prefs_dao.as_ref());
if !mcp_config.is_empty() {
Expand Down Expand Up @@ -1373,6 +1379,8 @@ impl App {
self.custom_instructions = runtime.custom_instructions;
self.tool_permissions = runtime.tool_permissions;
self.skills_dirs = loaded_config.inventory.opencode_skills_dirs;
self.plugin_specs = plugin_specs;
self.project_root = project_root;
self.discovery = runtime.discovery;
self.terminal_title_items = terminal_title_items;
self.startup_hydrated = true;
Expand Down Expand Up @@ -11551,6 +11559,8 @@ mod tests {
terminal_focused: true,
tool_permissions: crate::tools::ToolPermissions::new(".".to_string()),
skills_dirs: Vec::new(),
plugin_specs: Vec::new(),
project_root: std::path::PathBuf::from("."),
is_streaming: false,
pending_session_title: None,
session_view_states: std::collections::HashMap::new(),
Expand Down
5 changes: 3 additions & 2 deletions src/command/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,8 +1267,8 @@ mod tests {
let _ = crate::model::discovery::Discovery::cleanup_test();
let parsed = ParsedCommand {
name: "models".to_string(),
args: vec![],
raw: "/models".to_string(),
args: vec!["ollama".to_string()],
raw: "/models ollama".to_string(),
prefs_data: None,
active_model_id: None,
};
Expand Down Expand Up @@ -1371,6 +1371,7 @@ mod tests {

#[tokio::test]
async fn test_handle_refreshmodels() {
let _guard = crate::model::extensions::ollama::test_cache_lock();
let _ = crate::model::discovery::Discovery::cleanup_test();
let parsed = ParsedCommand {
name: "refreshmodels".to_string(),
Expand Down
Loading
Loading