Update AI agent, settings, and terminal modules

- Update AI agent conversation, task, and prompt builder
- Add notebooks execution module for blocklist actions
- Update Bedrock and OpenAI response translators
- Refactor settings modules across multiple subsystems
- Update terminal settings and window settings
- Update drive settings and search command settings
This commit is contained in:
Ryan Ward
2026-07-01 14:30:04 -05:00
parent 57c843d1de
commit 2f64909469
49 changed files with 683 additions and 325 deletions
+10 -1
View File
@@ -613,12 +613,21 @@ impl ConvertAPIToolCallToAIAgentAction for api::message::ToolCall {
return Err(ToolToAIAgentActionError::MissingTool); return Err(ToolToAIAgentActionError::MissingTool);
}; };
// Detect notebook tool name encoded in tool_call_id prefix.
let (effective_tool_call_id, tool_name) =
if let Some(stripped) = self.tool_call_id.strip_prefix("notebook::") {
(stripped.to_string(), Some("notebook".to_string()))
} else {
(self.tool_call_id.clone(), None)
};
let create_standard_action = |action: AIAgentActionType| { let create_standard_action = |action: AIAgentActionType| {
Ok(MaybeAIAgentAction::Action(AIAgentAction { Ok(MaybeAIAgentAction::Action(AIAgentAction {
id: self.tool_call_id.clone().into(), id: effective_tool_call_id.clone().into(),
task_id: params.task_id.clone(), task_id: params.task_id.clone(),
action, action,
requires_result: true, requires_result: true,
tool_name: tool_name.clone(),
})) }))
}; };
+6 -1
View File
@@ -2109,7 +2109,12 @@ impl AIConversation {
let streaming_exchange_ids: Vec<_> = self let streaming_exchange_ids: Vec<_> = self
.task_store .task_store
.all_exchanges() .all_exchanges()
.filter(|exchange| matches!(exchange.output_status, AIAgentOutputStatus::Streaming { .. })) .filter(|exchange| {
matches!(
exchange.output_status,
AIAgentOutputStatus::Streaming { .. }
)
})
.map(|exchange| exchange.id) .map(|exchange| exchange.id)
.collect(); .collect();
+4
View File
@@ -845,6 +845,10 @@ pub struct AIAgentAction {
/// ///
/// If this is `true`, a corresponding result _must_ be included in the next query to the AI. /// If this is `true`, a corresponding result _must_ be included in the next query to the AI.
pub requires_result: bool, pub requires_result: bool,
/// The original tool name as sent by the model (e.g. "create_plan", "create_notebook").
/// Used to distinguish between tools that share the same `AIAgentActionType` variant.
pub tool_name: Option<String>,
} }
impl Display for AIAgentAction { impl Display for AIAgentAction {
+6 -2
View File
@@ -138,7 +138,8 @@ mod optimistic {
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub(super) enum Task { pub(super) enum Task {
Root, Root,
#[allow(dead_code)] // Used in the server-mode path; Bedrock direct creates Server tasks directly #[allow(dead_code)]
// Used in the server-mode path; Bedrock direct creates Server tasks directly
CLIAgent(CLIAgentSubtask), CLIAgent(CLIAgentSubtask),
} }
@@ -185,7 +186,10 @@ impl Task {
} }
} }
pub(super) fn new_optimistic_cli_agent_subtask(block_id: BlockId, parent_task_id: Option<String>) -> Self { pub(super) fn new_optimistic_cli_agent_subtask(
block_id: BlockId,
parent_task_id: Option<String>,
) -> Self {
let task_id = Uuid::new_v4().to_string(); let task_id = Uuid::new_v4().to_string();
Self { Self {
id: TaskId::new(task_id.clone()), id: TaskId::new(task_id.clone()),
+3 -3
View File
@@ -115,9 +115,9 @@ impl ToolExt for api::message::tool_call::Tool {
Tool::ReadMcpResource(_) => "read_mcp_resource", Tool::ReadMcpResource(_) => "read_mcp_resource",
Tool::CallMcpTool(_) => "call_mcp_tool", Tool::CallMcpTool(_) => "call_mcp_tool",
Tool::WriteToLongRunningShellCommand(_) => "write_to_lrc", Tool::WriteToLongRunningShellCommand(_) => "write_to_lrc",
Tool::ReadDocuments(_) => "read_documents", Tool::ReadDocuments(_) => "read_plan",
Tool::EditDocuments(_) => "edit_documents", Tool::EditDocuments(_) => "edit_plan",
Tool::CreateDocuments(_) => "create_documents", Tool::CreateDocuments(_) => "create_plan",
Tool::ReadShellCommandOutput(_) => "read_shell_command_output", Tool::ReadShellCommandOutput(_) => "read_shell_command_output",
Tool::UseComputer(_) => "use_computer", Tool::UseComputer(_) => "use_computer",
Tool::RequestComputerUse(_) => "request_computer_use", Tool::RequestComputerUse(_) => "request_computer_use",
+89 -52
View File
@@ -74,29 +74,30 @@ pub fn extract_new_input_messages(request: &api::Request) -> Vec<ConversationMes
}); });
} }
} }
Some(api::request::input::user_inputs::user_input::Input::CliAgentUserQuery( Some(
cli_query, api::request::input::user_inputs::user_input::Input::CliAgentUserQuery(
)) => { cli_query,
),
) => {
if let Some(user_query) = &cli_query.user_query { if let Some(user_query) = &cli_query.user_query {
if !user_query.query.is_empty() { if !user_query.query.is_empty() {
let query_text = if let Some(running_cmd) = &cli_query.running_command { let query_text =
let mut context = format!( if let Some(running_cmd) = &cli_query.running_command {
"[Running command: {}]\n", let mut context =
running_cmd.command format!("[Running command: {}]\n", running_cmd.command);
); if let Some(snapshot) = &running_cmd.snapshot {
if let Some(snapshot) = &running_cmd.snapshot { if !snapshot.output.is_empty() {
if !snapshot.output.is_empty() { context.push_str(&format!(
context.push_str(&format!( "[Terminal output:\n{}\n]\n",
"[Terminal output:\n{}\n]\n", snapshot.output
snapshot.output ));
)); }
} }
} context.push_str(&user_query.query);
context.push_str(&user_query.query); context
context } else {
} else { user_query.query.clone()
user_query.query.clone() };
};
user_queries.push(ConversationMessage { user_queries.push(ConversationMessage {
role: MessageRole::User, role: MessageRole::User,
content: MessageContent::Text(query_text), content: MessageContent::Text(query_text),
@@ -256,9 +257,11 @@ pub fn extract_user_query_text(request: &api::Request) -> Option<String> {
return Some(query.query.clone()); return Some(query.query.clone());
} }
} }
Some(api::request::input::user_inputs::user_input::Input::CliAgentUserQuery( Some(
cli_query, api::request::input::user_inputs::user_input::Input::CliAgentUserQuery(
)) => { cli_query,
),
) => {
if let Some(user_query) = &cli_query.user_query { if let Some(user_query) = &cli_query.user_query {
if !user_query.query.is_empty() { if !user_query.query.is_empty() {
return Some(user_query.query.clone()); return Some(user_query.query.clone());
@@ -388,29 +391,30 @@ fn extract_input_messages(request: &api::Request) -> Vec<api::Message> {
}); });
} }
} }
Some(api::request::input::user_inputs::user_input::Input::CliAgentUserQuery( Some(
cli_query, api::request::input::user_inputs::user_input::Input::CliAgentUserQuery(
)) => { cli_query,
),
) => {
if let Some(user_query) = &cli_query.user_query { if let Some(user_query) = &cli_query.user_query {
if !user_query.query.is_empty() { if !user_query.query.is_empty() {
let query_text = if let Some(running_cmd) = &cli_query.running_command { let query_text =
let mut context = format!( if let Some(running_cmd) = &cli_query.running_command {
"[Running command: {}]\n", let mut context =
running_cmd.command format!("[Running command: {}]\n", running_cmd.command);
); if let Some(snapshot) = &running_cmd.snapshot {
if let Some(snapshot) = &running_cmd.snapshot { if !snapshot.output.is_empty() {
if !snapshot.output.is_empty() { context.push_str(&format!(
context.push_str(&format!( "[Terminal output:\n{}\n]\n",
"[Terminal output:\n{}\n]\n", snapshot.output
snapshot.output ));
)); }
} }
} context.push_str(&user_query.query);
context.push_str(&user_query.query); context
context } else {
} else { user_query.query.clone()
user_query.query.clone() };
};
results.push(api::Message { results.push(api::Message {
id: uuid::Uuid::new_v4().to_string(), id: uuid::Uuid::new_v4().to_string(),
task_id: task_id.clone(), task_id: task_id.clone(),
@@ -1189,34 +1193,67 @@ pub fn default_tool_definitions() -> Vec<ToolDefinition> {
}), }),
}, },
ToolDefinition { ToolDefinition {
name: "read_documents".to_string(), name: "read_plan".to_string(),
description: "Read the contents of one or more Galaxy notebook documents by their IDs.".to_string(), description: "Read the contents of one or more Galaxy plan documents by their IDs. Plans are rich-text documents that appear in the Plans folder of Galaxy Drive.".to_string(),
input_schema: serde_json::json!({ input_schema: serde_json::json!({
"type": "object", "type": "object",
"properties": { "properties": {
"document_ids": { "type": "array", "items": { "type": "string" }, "description": "Document IDs to read" } "document_ids": { "type": "array", "items": { "type": "string" }, "description": "Plan document IDs to read" }
}, },
"required": ["document_ids"] "required": ["document_ids"]
}), }),
}, },
ToolDefinition { ToolDefinition {
name: "create_documents".to_string(), name: "create_plan".to_string(),
description: "Create new Galaxy notebook documents with the specified title and content.".to_string(), description: "Create a new plan document in Galaxy Drive's Plans folder. Plans are rich-text documents for tracking tasks, architecture decisions, and project notes.".to_string(),
input_schema: serde_json::json!({ input_schema: serde_json::json!({
"type": "object", "type": "object",
"properties": { "properties": {
"documents": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" } }, "required": ["title", "content"] }, "description": "Documents to create" } "documents": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" } }, "required": ["title", "content"] }, "description": "Plan documents to create" }
}, },
"required": ["documents"] "required": ["documents"]
}), }),
}, },
ToolDefinition { ToolDefinition {
name: "edit_documents".to_string(), name: "edit_plan".to_string(),
description: "Edit existing Galaxy notebook documents using search/replace diffs.".to_string(), description: "Edit an existing plan document in Galaxy Drive using search/replace diffs.".to_string(),
input_schema: serde_json::json!({ input_schema: serde_json::json!({
"type": "object", "type": "object",
"properties": { "properties": {
"diffs": { "type": "array", "items": { "type": "object", "properties": { "document_id": { "type": "string" }, "search": { "type": "string" }, "replace": { "type": "string" } }, "required": ["document_id", "search", "replace"] }, "description": "Edits to apply to documents" } "diffs": { "type": "array", "items": { "type": "object", "properties": { "document_id": { "type": "string" }, "search": { "type": "string" }, "replace": { "type": "string" } }, "required": ["document_id", "search", "replace"] }, "description": "Edits to apply to plan documents" }
},
"required": ["diffs"]
}),
},
ToolDefinition {
name: "read_notebook".to_string(),
description: "Read the contents of one or more Galaxy Drive notebooks by their IDs. Notebooks are user-created rich-text documents stored in Galaxy Drive.".to_string(),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"document_ids": { "type": "array", "items": { "type": "string" }, "description": "Notebook IDs to read" }
},
"required": ["document_ids"]
}),
},
ToolDefinition {
name: "create_notebook".to_string(),
description: "Create a new notebook in Galaxy Drive. Notebooks are rich-text documents for general notes, documentation, and reference material.".to_string(),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"documents": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" } }, "required": ["title", "content"] }, "description": "Notebooks to create" }
},
"required": ["documents"]
}),
},
ToolDefinition {
name: "edit_notebook".to_string(),
description: "Edit an existing Galaxy Drive notebook using search/replace diffs.".to_string(),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"diffs": { "type": "array", "items": { "type": "object", "properties": { "document_id": { "type": "string" }, "search": { "type": "string" }, "replace": { "type": "string" } }, "required": ["document_id", "search", "replace"] }, "description": "Edits to apply to notebooks" }
}, },
"required": ["diffs"] "required": ["diffs"]
}), }),
+24 -5
View File
@@ -998,7 +998,7 @@ pub fn build_tool_call_message(
api::message::tool_call::ReadMcpResource { uri, server_id }, api::message::tool_call::ReadMcpResource { uri, server_id },
)) ))
} }
"read_documents" => { "read_plan" | "read_documents" | "read_notebook" => {
let documents = input let documents = input
.get("document_ids") .get("document_ids")
.and_then(|v| v.as_array()) .and_then(|v| v.as_array())
@@ -1016,7 +1016,7 @@ pub fn build_tool_call_message(
api::message::tool_call::ReadDocuments { documents }, api::message::tool_call::ReadDocuments { documents },
)) ))
} }
"create_documents" => { "create_plan" | "create_documents" | "create_notebook" => {
let new_documents = input let new_documents = input
.get("documents") .get("documents")
.and_then(|v| v.as_array()) .and_then(|v| v.as_array())
@@ -1035,7 +1035,7 @@ pub fn build_tool_call_message(
api::message::tool_call::CreateDocuments { new_documents }, api::message::tool_call::CreateDocuments { new_documents },
)) ))
} }
"edit_documents" => { "edit_plan" | "edit_documents" | "edit_notebook" => {
let diffs = input let diffs = input
.get("diffs") .get("diffs")
.and_then(|v| v.as_array()) .and_then(|v| v.as_array())
@@ -1211,16 +1211,24 @@ pub fn build_tool_call_message(
} }
}; };
// For notebook tools, encode the tool name into the tool_call_id so that
// the conversion layer can route them to the notebook executor.
let effective_tool_call_id = if is_notebook_tool(tool_name) {
format!("notebook::{tool_use_id}")
} else {
tool_use_id.to_string()
};
let message = if let Some(tool_variant) = tool { let message = if let Some(tool_variant) = tool {
api::Message { api::Message {
id: tool_use_id.to_string(), id: effective_tool_call_id.clone(),
task_id: task_id.to_string(), task_id: task_id.to_string(),
request_id: String::new(), request_id: String::new(),
timestamp: None, timestamp: None,
server_message_data: String::new(), server_message_data: String::new(),
citations: vec![], citations: vec![],
message: Some(api::message::Message::ToolCall(api::message::ToolCall { message: Some(api::message::Message::ToolCall(api::message::ToolCall {
tool_call_id: tool_use_id.to_string(), tool_call_id: effective_tool_call_id,
tool: Some(tool_variant), tool: Some(tool_variant),
})), })),
} }
@@ -1275,6 +1283,13 @@ const KNOWN_TOOLS: &[&str] = &[
"write_to_long_running_shell_command", "write_to_long_running_shell_command",
"read_shell_command_output", "read_shell_command_output",
"read_mcp_resource", "read_mcp_resource",
"read_plan",
"create_plan",
"edit_plan",
"read_notebook",
"create_notebook",
"edit_notebook",
// Legacy aliases — accept old names so in-flight conversations don't break.
"read_documents", "read_documents",
"create_documents", "create_documents",
"edit_documents", "edit_documents",
@@ -1291,6 +1306,10 @@ fn is_known_tool(name: &str) -> bool {
KNOWN_TOOLS.contains(&name) || name.starts_with("mcp__") KNOWN_TOOLS.contains(&name) || name.starts_with("mcp__")
} }
fn is_notebook_tool(name: &str) -> bool {
matches!(name, "create_notebook" | "read_notebook" | "edit_notebook")
}
/// Searches conversation message history for tool call results matching the given criteria. /// Searches conversation message history for tool call results matching the given criteria.
fn recall_from_history( fn recall_from_history(
messages: &[ConversationMessage], messages: &[ConversationMessage],
+94 -32
View File
@@ -5,6 +5,7 @@ pub(super) mod edit_documents;
pub(super) mod fetch_conversation; pub(super) mod fetch_conversation;
pub(super) mod file_glob; pub(super) mod file_glob;
pub(super) mod grep; pub(super) mod grep;
pub(super) mod notebooks;
pub(super) mod read_documents; pub(super) mod read_documents;
pub(super) mod read_files; pub(super) mod read_files;
pub(super) mod read_mcp_resource; pub(super) mod read_mcp_resource;
@@ -31,6 +32,7 @@ use file_glob::FileGlobExecutor;
use futures::{future::BoxFuture, FutureExt}; use futures::{future::BoxFuture, FutureExt};
use galaxy_core::{execution_mode::AppExecutionMode, features::FeatureFlag}; use galaxy_core::{execution_mode::AppExecutionMode, features::FeatureFlag};
use grep::GrepExecutor; use grep::GrepExecutor;
use notebooks::NotebookExecutor;
use parking_lot::FairMutex; use parking_lot::FairMutex;
use read_documents::ReadDocumentsExecutor; use read_documents::ReadDocumentsExecutor;
pub(super) use read_files::ReadFilesExecutor; pub(super) use read_files::ReadFilesExecutor;
@@ -253,6 +255,7 @@ pub struct BlocklistAIActionExecutor {
read_documents_executor: ModelHandle<ReadDocumentsExecutor>, read_documents_executor: ModelHandle<ReadDocumentsExecutor>,
edit_documents_executor: ModelHandle<EditDocumentsExecutor>, edit_documents_executor: ModelHandle<EditDocumentsExecutor>,
create_documents_executor: ModelHandle<CreateDocumentsExecutor>, create_documents_executor: ModelHandle<CreateDocumentsExecutor>,
notebook_executor: ModelHandle<NotebookExecutor>,
use_computer_executor: ModelHandle<UseComputerExecutor>, use_computer_executor: ModelHandle<UseComputerExecutor>,
request_computer_use_executor: ModelHandle<RequestComputerUseExecutor>, request_computer_use_executor: ModelHandle<RequestComputerUseExecutor>,
read_skill_executor: ModelHandle<ReadSkillExecutor>, read_skill_executor: ModelHandle<ReadSkillExecutor>,
@@ -317,6 +320,7 @@ impl BlocklistAIActionExecutor {
let edit_documents_executor = ctx.add_model(|_| EditDocumentsExecutor::new()); let edit_documents_executor = ctx.add_model(|_| EditDocumentsExecutor::new());
let create_documents_executor = ctx let create_documents_executor = ctx
.add_model(|_| CreateDocumentsExecutor::new(active_session.clone(), terminal_view_id)); .add_model(|_| CreateDocumentsExecutor::new(active_session.clone(), terminal_view_id));
let notebook_executor = ctx.add_model(|_| NotebookExecutor::new());
let use_computer_executor = ctx.add_model(|_| UseComputerExecutor::new()); let use_computer_executor = ctx.add_model(|_| UseComputerExecutor::new());
let request_computer_use_executor = let request_computer_use_executor =
ctx.add_model(|_| RequestComputerUseExecutor::new(terminal_view_id)); ctx.add_model(|_| RequestComputerUseExecutor::new(terminal_view_id));
@@ -341,6 +345,7 @@ impl BlocklistAIActionExecutor {
read_documents_executor, read_documents_executor,
edit_documents_executor, edit_documents_executor,
create_documents_executor, create_documents_executor,
notebook_executor,
use_computer_executor, use_computer_executor,
request_computer_use_executor, request_computer_use_executor,
async_executing_actions: Default::default(), async_executing_actions: Default::default(),
@@ -487,15 +492,33 @@ impl BlocklistAIActionExecutor {
AIAgentActionType::SuggestPrompt { .. } => self AIAgentActionType::SuggestPrompt { .. } => self
.suggest_prompt_executor .suggest_prompt_executor
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)), .update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)),
AIAgentActionType::ReadDocuments(_) => self AIAgentActionType::ReadDocuments(_) => {
.read_documents_executor if action.tool_name.as_deref() == Some("notebook") {
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)), self.notebook_executor
AIAgentActionType::EditDocuments(_) => self .update(ctx, |executor, ctx| executor.preprocess_action(input, ctx))
.edit_documents_executor } else {
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)), self.read_documents_executor
AIAgentActionType::CreateDocuments(_) => self .update(ctx, |executor, ctx| executor.preprocess_action(input, ctx))
.create_documents_executor }
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)), }
AIAgentActionType::EditDocuments(_) => {
if action.tool_name.as_deref() == Some("notebook") {
self.notebook_executor
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx))
} else {
self.edit_documents_executor
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx))
}
}
AIAgentActionType::CreateDocuments(_) => {
if action.tool_name.as_deref() == Some("notebook") {
self.notebook_executor
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx))
} else {
self.create_documents_executor
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx))
}
}
AIAgentActionType::UseComputer(_) => self AIAgentActionType::UseComputer(_) => self
.use_computer_executor .use_computer_executor
.update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)), .update(ctx, |executor, ctx| executor.preprocess_action(input, ctx)),
@@ -683,20 +706,41 @@ impl BlocklistAIActionExecutor {
.suggest_prompt_executor .suggest_prompt_executor
.update(ctx, |executor, ctx| executor.execute(input, ctx)) .update(ctx, |executor, ctx| executor.execute(input, ctx))
.into(), .into(),
AIAgentActionType::ReadDocuments(_) => self AIAgentActionType::ReadDocuments(_) => {
.read_documents_executor if action.tool_name.as_deref() == Some("notebook") {
.update(ctx, |executor, ctx| executor.execute(input, ctx)) self.notebook_executor
.into(), .update(ctx, |executor, ctx| executor.execute_read(input, ctx))
AIAgentActionType::EditDocuments(_) => self .into()
.edit_documents_executor } else {
.update(ctx, |executor, ctx| executor.execute(input, ctx)) self.read_documents_executor
.into(), .update(ctx, |executor, ctx| executor.execute(input, ctx))
AIAgentActionType::CreateDocuments(_) => self .into()
.create_documents_executor }
.update(ctx, |executor, ctx| { }
executor.execute(input, conversation_id, ctx) AIAgentActionType::EditDocuments(_) => {
}) if action.tool_name.as_deref() == Some("notebook") {
.into(), self.notebook_executor
.update(ctx, |executor, ctx| executor.execute_edit(input, ctx))
.into()
} else {
self.edit_documents_executor
.update(ctx, |executor, ctx| executor.execute(input, ctx))
.into()
}
}
AIAgentActionType::CreateDocuments(_) => {
if action.tool_name.as_deref() == Some("notebook") {
self.notebook_executor
.update(ctx, |executor, ctx| executor.execute_create(input, ctx))
.into()
} else {
self.create_documents_executor
.update(ctx, |executor, ctx| {
executor.execute(input, conversation_id, ctx)
})
.into()
}
}
AIAgentActionType::UseComputer(_) => self AIAgentActionType::UseComputer(_) => self
.use_computer_executor .use_computer_executor
.update(ctx, |executor, ctx| executor.execute(input, ctx)) .update(ctx, |executor, ctx| executor.execute(input, ctx))
@@ -924,15 +968,33 @@ impl BlocklistAIActionExecutor {
AIAgentActionType::SuggestPrompt { .. } => self AIAgentActionType::SuggestPrompt { .. } => self
.suggest_prompt_executor .suggest_prompt_executor
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)), .update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)),
AIAgentActionType::ReadDocuments(_) => self AIAgentActionType::ReadDocuments(_) => {
.read_documents_executor if input.action.tool_name.as_deref() == Some("notebook") {
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)), self.notebook_executor
AIAgentActionType::EditDocuments(_) => self .update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx))
.edit_documents_executor } else {
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)), self.read_documents_executor
AIAgentActionType::CreateDocuments(_) => self .update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx))
.create_documents_executor }
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)), }
AIAgentActionType::EditDocuments(_) => {
if input.action.tool_name.as_deref() == Some("notebook") {
self.notebook_executor
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx))
} else {
self.edit_documents_executor
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx))
}
}
AIAgentActionType::CreateDocuments(_) => {
if input.action.tool_name.as_deref() == Some("notebook") {
self.notebook_executor
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx))
} else {
self.create_documents_executor
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx))
}
}
AIAgentActionType::UseComputer(_) => self AIAgentActionType::UseComputer(_) => self
.use_computer_executor .use_computer_executor
.update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)), .update(ctx, |executor, ctx| executor.should_autoexecute(input, ctx)),
@@ -10,7 +10,6 @@ use crate::{
artifacts::Artifact, artifacts::Artifact,
blocklist::BlocklistAIHistoryModel, blocklist::BlocklistAIHistoryModel,
document::ai_document_model::{AIDocumentModel, AIDocumentVersion}, document::ai_document_model::{AIDocumentModel, AIDocumentVersion},
execution_profiles::profiles::AIExecutionProfilesModel,
}, },
notebooks::editor::model::FileLinkResolutionContext, notebooks::editor::model::FileLinkResolutionContext,
terminal::model::session::active_session::ActiveSession, terminal::model::session::active_session::ActiveSession,
@@ -102,15 +101,10 @@ impl CreateDocumentsExecutor {
}) })
}; };
let profile = AIExecutionProfilesModel::as_ref(ctx) // Plans always sync to the Plans folder in Galaxy Drive.
.active_profile(Some(self.terminal_view_id), ctx); model.update(ctx, |model, model_ctx| {
let should_autosync = profile.data().autosync_plans_to_warp_drive; model.sync_to_warp_drive(id, model_ctx);
});
if should_autosync {
model.update(ctx, |model, model_ctx| {
model.sync_to_warp_drive(id, model_ctx);
});
}
// Add plan artifact to the conversation. // Add plan artifact to the conversation.
let artifact = Artifact::Plan { let artifact = Artifact::Plan {
@@ -0,0 +1,207 @@
//! Executors for the `create_notebook`, `read_notebook`, and `edit_notebook` tools.
//!
//! These tools interact with Galaxy Drive CloudNotebook objects directly,
//! as opposed to the plan tools which work through AIDocumentModel.
use futures::{future::BoxFuture, FutureExt};
use galaxyui::{Entity, ModelContext, SingletonEntity};
use crate::{
ai::{
agent::{
AIAgentAction, AIAgentActionType, CreateDocumentsRequest, CreateDocumentsResult,
DocumentContext, EditDocumentsRequest, EditDocumentsResult, ReadDocumentsRequest,
ReadDocumentsResult,
},
document::ai_document_model::AIDocumentVersion,
},
cloud_object::model::persistence::CloudModel,
notebooks::CloudNotebookModel,
server::{cloud_objects::update_manager::UpdateManager, ids::ClientId},
workspaces::user_workspaces::UserWorkspaces,
};
use super::{ActionExecution, AnyActionExecution, ExecuteActionInput, PreprocessActionInput};
pub struct NotebookExecutor;
impl NotebookExecutor {
pub fn new() -> Self {
Self
}
pub(super) fn should_autoexecute(
&self,
_input: ExecuteActionInput,
_ctx: &mut ModelContext<Self>,
) -> bool {
true
}
pub(super) fn execute_create(
&mut self,
input: ExecuteActionInput,
ctx: &mut ModelContext<Self>,
) -> impl Into<AnyActionExecution> {
let ExecuteActionInput { action, .. } = input;
let AIAgentAction {
action: AIAgentActionType::CreateDocuments(CreateDocumentsRequest { documents }),
..
} = action
else {
return ActionExecution::<CreateDocumentsResult>::InvalidAction;
};
let Some(owner) = UserWorkspaces::as_ref(ctx).personal_drive(ctx) else {
return ActionExecution::Sync(
CreateDocumentsResult::Error("No personal drive available.".to_string()).into(),
);
};
let mut created = Vec::new();
for document in documents {
let client_id = ClientId::new();
let model = CloudNotebookModel {
title: document.title.clone(),
data: document.content.clone(),
ai_document_id: None,
conversation_id: None,
};
UpdateManager::handle(ctx).update(ctx, |update_manager, ctx| {
update_manager.create_notebook(
client_id,
owner,
None, // root of personal space
model,
crate::cloud_object::CloudObjectEventEntrypoint::Unknown,
false,
ctx,
);
});
created.push(DocumentContext {
document_id: crate::ai::document::ai_document_model::AIDocumentId::new(),
document_version: AIDocumentVersion::default(),
content: document.content.clone(),
line_ranges: vec![],
});
}
ActionExecution::Sync(
CreateDocumentsResult::Success {
created_documents: created,
}
.into(),
)
}
pub(super) fn execute_read(
&mut self,
input: ExecuteActionInput,
ctx: &mut ModelContext<Self>,
) -> impl Into<AnyActionExecution> {
let ExecuteActionInput { action, .. } = input;
let AIAgentAction {
action: AIAgentActionType::ReadDocuments(ReadDocumentsRequest { document_ids }),
..
} = action
else {
return ActionExecution::<ReadDocumentsResult>::InvalidAction;
};
let cloud_model = CloudModel::as_ref(ctx);
let mut documents = Vec::new();
for id in document_ids {
// Try to find the notebook by treating the ID as a SyncId string
let notebook = cloud_model
.get_all_active_notebooks()
.find(|nb| nb.id.uid() == id.to_string());
if let Some(notebook) = notebook {
documents.push(DocumentContext {
document_id: *id,
document_version: AIDocumentVersion::default(),
content: format!("# {}\n\n{}", notebook.model().title, notebook.model().data),
line_ranges: vec![],
});
}
}
ActionExecution::Sync(ReadDocumentsResult::Success { documents }.into())
}
pub(super) fn execute_edit(
&mut self,
input: ExecuteActionInput,
ctx: &mut ModelContext<Self>,
) -> impl Into<AnyActionExecution> {
let ExecuteActionInput { action, .. } = input;
let AIAgentAction {
action: AIAgentActionType::EditDocuments(EditDocumentsRequest { diffs }),
..
} = action
else {
return ActionExecution::<EditDocumentsResult>::InvalidAction;
};
let mut updated_documents = Vec::new();
let mut errors = Vec::new();
for diff in diffs {
let cloud_model = CloudModel::as_ref(ctx);
let notebook_data = cloud_model
.get_all_active_notebooks()
.find(|nb| nb.id.uid() == diff.document_id.to_string())
.map(|nb| (nb.id, nb.model().data.clone()));
let Some((notebook_id, current_data)) = notebook_data else {
errors.push(format!("Notebook {} not found.", diff.document_id));
continue;
};
// Simple search/replace on the notebook data
if !current_data.contains(&diff.search) {
errors.push(format!(
"Could not find search text in notebook {}.",
diff.document_id
));
continue;
}
let new_data = current_data.replacen(&diff.search, &diff.replace, 1);
let new_data_arc = std::sync::Arc::new(new_data.clone());
UpdateManager::handle(ctx).update(ctx, |update_manager, ctx| {
update_manager.update_notebook_data(new_data_arc, notebook_id, ctx);
});
updated_documents.push(DocumentContext {
document_id: diff.document_id,
document_version: AIDocumentVersion::default(),
content: new_data,
line_ranges: vec![],
});
}
if !errors.is_empty() {
return ActionExecution::Sync(EditDocumentsResult::Error(errors.join("\n")).into());
}
ActionExecution::Sync(EditDocumentsResult::Success { updated_documents }.into())
}
pub(super) fn preprocess_action(
&mut self,
_input: PreprocessActionInput,
_ctx: &mut ModelContext<Self>,
) -> BoxFuture<'static, ()> {
futures::future::ready(()).boxed()
}
}
impl Entity for NotebookExecutor {
type Event = ();
}
+3 -6
View File
@@ -2226,11 +2226,9 @@ impl BlocklistAIController {
{ {
let history_model = BlocklistAIHistoryModel::as_ref(ctx); let history_model = BlocklistAIHistoryModel::as_ref(ctx);
if let Some(conversation) = history_model.conversation(&conversation_id) { if let Some(conversation) = history_model.conversation(&conversation_id) {
let has_optimistic_cli_subagent = let has_optimistic_cli_subagent = conversation.has_active_subagent();
conversation.has_active_subagent();
if !has_optimistic_cli_subagent { if !has_optimistic_cli_subagent {
request_params.root_task_id = request_params.root_task_id = Some(conversation.get_root_task_id().to_string());
Some(conversation.get_root_task_id().to_string());
} }
} }
} }
@@ -2435,8 +2433,7 @@ impl BlocklistAIController {
{ {
let terminal_view_id = self.terminal_view_id; let terminal_view_id = self.terminal_view_id;
history_model.update(ctx, |history_model, ctx| { history_model.update(ctx, |history_model, ctx| {
if let Some(conversation) = if let Some(conversation) = history_model.conversation_mut(&conversation_id)
history_model.conversation_mut(&conversation_id)
{ {
conversation.force_cancel_all_streaming_exchanges( conversation.force_cancel_all_streaming_exchanges(
terminal_view_id, terminal_view_id,
+51 -15
View File
@@ -242,23 +242,59 @@ impl AIDocumentModel {
return false; return false;
}; };
let Some(plan_folder_id) = self.get_or_create_plan_folder(owner, ctx).into_server() else { let plan_folder_sync_id = self.get_or_create_plan_folder(owner, ctx);
// Plan folder is still being created (has ClientId only). match plan_folder_sync_id.into_server() {
// If we save using the ClientId as the parent folder, the document Some(plan_folder_id) => {
// will end up in a broken state once the folder is saved. // Plan folder already exists on server — create notebook directly.
// Queue the document for creation until the folder gets a ServerId. self.create_notebook_in_plan_folder(
self.pending_document_queue id,
.push(PendingDocument { id, title, content }); &title,
&content,
if let Some(document) = self.documents.get_mut(&id) { owner,
let client_id = ClientId::new(); plan_folder_id,
document.sync_id = Some(SyncId::ClientId(client_id)); ctx,
);
ctx.emit(AIDocumentModelEvent::DocumentSaveStatusUpdated(id));
} }
return true; None => {
}; // Plan folder is still being created (has ClientId only).
// Queue the document for creation until the folder gets a ServerId.
// Also create the notebook at the root level so it appears in Drive
// immediately in local/offline mode.
self.pending_document_queue.push(PendingDocument {
id,
title: title.clone(),
content: content.clone(),
});
self.create_notebook_in_plan_folder(id, &title, &content, owner, plan_folder_id, ctx); // Create a notebook at the root level so it's visible in Drive immediately.
ctx.emit(AIDocumentModelEvent::DocumentSaveStatusUpdated(id)); let client_id = ClientId::new();
if let Some(document) = self.documents.get_mut(&id) {
document.sync_id = Some(SyncId::ClientId(client_id));
}
let notebook_model = CloudNotebookModel {
title,
data: content,
ai_document_id: Some(id),
conversation_id: self.get_server_conversation_id(&id, ctx),
};
UpdateManager::handle(ctx).update(ctx, |update_manager, ctx| {
update_manager.create_notebook(
client_id,
owner,
Some(plan_folder_sync_id),
notebook_model,
CloudObjectEventEntrypoint::Unknown,
true,
ctx,
);
});
ctx.emit(AIDocumentModelEvent::DocumentSaveStatusUpdated(id));
}
}
true true
} }
+6 -9
View File
@@ -870,12 +870,11 @@ impl LLMPreferences {
Some(key) Some(key)
} }
}; };
let name = let name = if base_url.contains("localhost") || base_url.contains("127.0.0.1") {
if base_url.contains("localhost") || base_url.contains("127.0.0.1") { "LiteLLM (local)".to_string()
"LiteLLM (local)".to_string() } else {
} else { "LiteLLM".to_string()
"LiteLLM".to_string() };
};
provider_entries.push((name, base_url, api_key, legacy_models)); provider_entries.push((name, base_url, api_key, legacy_models));
} }
@@ -931,9 +930,7 @@ impl LLMPreferences {
} }
} }
log::info!( log::info!("[openai/litellm] Injected {total_injected} model(s) into available choices");
"[openai/litellm] Injected {total_injected} model(s) into available choices"
);
} }
/// Returns the OpenAI client config for a given model ID, if it was injected /// Returns the OpenAI client config for a given model ID, if it was injected
+7
View File
@@ -498,6 +498,13 @@ const KNOWN_TOOLS: &[&str] = &[
"write_to_long_running_shell_command", "write_to_long_running_shell_command",
"read_shell_command_output", "read_shell_command_output",
"read_mcp_resource", "read_mcp_resource",
"read_plan",
"create_plan",
"edit_plan",
"read_notebook",
"create_notebook",
"edit_notebook",
// Legacy aliases — accept old names so in-flight conversations don't break.
"read_documents", "read_documents",
"create_documents", "create_documents",
"edit_documents", "edit_documents",
+1 -1
View File
@@ -39,7 +39,7 @@ mod prompt_builder_tests {
assert!(prompt.system_prompt.contains("code review mode")); assert!(prompt.system_prompt.contains("code review mode"));
assert!(!prompt.tools.iter().any(|t| t.name == "apply_file_diffs")); assert!(!prompt.tools.iter().any(|t| t.name == "apply_file_diffs"));
assert!(!prompt.tools.iter().any(|t| t.name == "create_documents")); assert!(!prompt.tools.iter().any(|t| t.name == "create_plan"));
assert!(prompt.tools.iter().any(|t| t.name == "read_files")); assert!(prompt.tools.iter().any(|t| t.name == "read_files"));
assert!(prompt.tools.iter().any(|t| t.name == "grep")); assert!(prompt.tools.iter().any(|t| t.name == "grep"));
} }
+55 -9
View File
@@ -32,6 +32,9 @@ fn code_tools() -> Vec<ToolDefinition> {
read_documents(), read_documents(),
create_documents(), create_documents(),
edit_documents(), edit_documents(),
read_notebook(),
create_notebook(),
edit_notebook(),
start_agent(), start_agent(),
send_message_to_agent(), send_message_to_agent(),
ask_user_question(), ask_user_question(),
@@ -217,13 +220,13 @@ fn read_mcp_resource() -> ToolDefinition {
fn read_documents() -> ToolDefinition { fn read_documents() -> ToolDefinition {
ToolDefinition { ToolDefinition {
name: "read_documents".to_string(), name: "read_plan".to_string(),
description: "Read the contents of one or more Galaxy notebook documents by their IDs." description: "Read the contents of one or more Galaxy plan documents by their IDs. Plans are rich-text documents that appear in the Plans folder of Galaxy Drive."
.to_string(), .to_string(),
input_schema: serde_json::json!({ input_schema: serde_json::json!({
"type": "object", "type": "object",
"properties": { "properties": {
"document_ids": { "type": "array", "items": { "type": "string" }, "description": "Document IDs to read" } "document_ids": { "type": "array", "items": { "type": "string" }, "description": "Plan document IDs to read" }
}, },
"required": ["document_ids"] "required": ["document_ids"]
}), }),
@@ -232,13 +235,13 @@ fn read_documents() -> ToolDefinition {
fn create_documents() -> ToolDefinition { fn create_documents() -> ToolDefinition {
ToolDefinition { ToolDefinition {
name: "create_documents".to_string(), name: "create_plan".to_string(),
description: "Create new Galaxy notebook documents with the specified title and content." description: "Create a new plan document in Galaxy Drive's Plans folder. Plans are rich-text documents for tracking tasks, architecture decisions, and project notes."
.to_string(), .to_string(),
input_schema: serde_json::json!({ input_schema: serde_json::json!({
"type": "object", "type": "object",
"properties": { "properties": {
"documents": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" } }, "required": ["title", "content"] }, "description": "Documents to create" } "documents": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" } }, "required": ["title", "content"] }, "description": "Plan documents to create" }
}, },
"required": ["documents"] "required": ["documents"]
}), }),
@@ -247,13 +250,13 @@ fn create_documents() -> ToolDefinition {
fn edit_documents() -> ToolDefinition { fn edit_documents() -> ToolDefinition {
ToolDefinition { ToolDefinition {
name: "edit_documents".to_string(), name: "edit_plan".to_string(),
description: "Edit existing Galaxy notebook documents using search/replace diffs." description: "Edit an existing plan document in Galaxy Drive using search/replace diffs."
.to_string(), .to_string(),
input_schema: serde_json::json!({ input_schema: serde_json::json!({
"type": "object", "type": "object",
"properties": { "properties": {
"diffs": { "type": "array", "items": { "type": "object", "properties": { "document_id": { "type": "string" }, "search": { "type": "string" }, "replace": { "type": "string" } }, "required": ["document_id", "search", "replace"] }, "description": "Edits to apply to documents" } "diffs": { "type": "array", "items": { "type": "object", "properties": { "document_id": { "type": "string" }, "search": { "type": "string" }, "replace": { "type": "string" } }, "required": ["document_id", "search", "replace"] }, "description": "Edits to apply to plan documents" }
}, },
"required": ["diffs"] "required": ["diffs"]
}), }),
@@ -334,3 +337,46 @@ fn fetch_conversation() -> ToolDefinition {
}), }),
} }
} }
fn read_notebook() -> ToolDefinition {
ToolDefinition {
name: "read_notebook".to_string(),
description: "Read the contents of one or more Galaxy Drive notebooks by their IDs. Notebooks are user-created rich-text documents stored in Galaxy Drive.".to_string(),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"document_ids": { "type": "array", "items": { "type": "string" }, "description": "Notebook IDs to read" }
},
"required": ["document_ids"]
}),
}
}
fn create_notebook() -> ToolDefinition {
ToolDefinition {
name: "create_notebook".to_string(),
description: "Create a new notebook in Galaxy Drive. Notebooks are rich-text documents for general notes, documentation, and reference material.".to_string(),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"documents": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "content": { "type": "string" } }, "required": ["title", "content"] }, "description": "Notebooks to create" }
},
"required": ["documents"]
}),
}
}
fn edit_notebook() -> ToolDefinition {
ToolDefinition {
name: "edit_notebook".to_string(),
description: "Edit an existing Galaxy Drive notebook using search/replace diffs."
.to_string(),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"diffs": { "type": "array", "items": { "type": "object", "properties": { "document_id": { "type": "string" }, "search": { "type": "string" }, "replace": { "type": "string" } }, "required": ["document_id", "search", "replace"] }, "description": "Edits to apply to notebooks" }
},
"required": ["diffs"]
}),
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
use chrono::Utc; use chrono::Utc;
use galaxyui::{App, ModelHandle}; use galaxyui::{App, ModelHandle};
use lazy_static::lazy_static; use lazy_static::lazy_static;
use settings::{SyncToCloud}; use settings::SyncToCloud;
use crate::auth::auth_manager::AuthManager; use crate::auth::auth_manager::AuthManager;
use crate::auth::user::TEST_USER_UID; use crate::auth::user::TEST_USER_UID;
+1 -3
View File
@@ -1,7 +1,5 @@
use galaxy_core::features::FeatureFlag; use galaxy_core::features::FeatureFlag;
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
use super::DriveSortOrder; use super::DriveSortOrder;
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(CommandSearchSettings, settings: [ define_settings_group!(CommandSearchSettings, settings: [
show_global_workflows_in_universal_search: ShowGlobalWorkflowsInUniversalSearch { show_global_workflows_in_universal_search: ShowGlobalWorkflowsInUniversalSearch {
@@ -5,7 +5,7 @@ use futures_lite::future;
use galaxy_core::features::FeatureFlag; use galaxy_core::features::FeatureFlag;
use galaxy_graphql::{object_permissions::AccessLevel, scalars::time::ServerTimestamp}; use galaxy_graphql::{object_permissions::AccessLevel, scalars::time::ServerTimestamp};
use galaxyui::{App, ModelHandle, SingletonEntity}; use galaxyui::{App, ModelHandle, SingletonEntity};
use settings::{SyncToCloud}; use settings::SyncToCloud;
#[cfg(test)] #[cfg(test)]
use crate::server::server_api::object::MockObjectClient; use crate::server::server_api::object::MockObjectClient;
+1 -3
View File
@@ -1,7 +1,5 @@
use galaxyui::accessibility::AccessibilityVerbosity; use galaxyui::accessibility::AccessibilityVerbosity;
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(AccessibilitySettings, settings: [ define_settings_group!(AccessibilitySettings, settings: [
a11y_verbosity: AccessibilityVerbosityState { a11y_verbosity: AccessibilityVerbosityState {
+79 -77
View File
@@ -24,9 +24,7 @@ use regex::Regex;
use galaxy_core::execution_mode::AppExecutionMode; use galaxy_core::execution_mode::AppExecutionMode;
use galaxy_core::features::FeatureFlag; use galaxy_core::features::FeatureFlag;
use settings::{ use settings::{define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
use serde::{de::Deserializer, Deserialize, Serialize}; use serde::{de::Deserializer, Deserialize, Serialize};
use strum::IntoEnumIterator; use strum::IntoEnumIterator;
@@ -466,7 +464,9 @@ impl settings_value::SettingsValue for BedrockModelConfig {}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, schemars::JsonSchema)] #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, schemars::JsonSchema)]
#[schemars(description = "Configuration for a single OpenAI-compatible model (e.g. via LiteLLM).")] #[schemars(description = "Configuration for a single OpenAI-compatible model (e.g. via LiteLLM).")]
pub struct OpenAIModelConfig { pub struct OpenAIModelConfig {
#[schemars(description = "The model ID to send in the API request (e.g. claude-sonnet-4-20250514).")] #[schemars(
description = "The model ID to send in the API request (e.g. claude-sonnet-4-20250514)."
)]
pub model_id: String, pub model_id: String,
#[schemars(description = "Display name shown in the model picker.")] #[schemars(description = "Display name shown in the model picker.")]
pub display_name: String, pub display_name: String,
@@ -477,7 +477,9 @@ pub struct OpenAIModelConfig {
#[schemars(description = "Maximum context window size in tokens.")] #[schemars(description = "Maximum context window size in tokens.")]
pub context_size: u32, pub context_size: u32,
#[serde(default)] #[serde(default)]
#[schemars(description = "Optional provider hint (e.g. anthropic, openai, google) for icon display.")] #[schemars(
description = "Optional provider hint (e.g. anthropic, openai, google) for icon display."
)]
pub provider: Option<String>, pub provider: Option<String>,
} }
@@ -825,7 +827,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.is_any_ai_enabled", toml_path: "agents.warp_agent.is_any_ai_enabled",
description: "Controls whether all AI features are enabled.", description: "Controls whether all AI features are enabled.",
@@ -836,7 +838,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.enabled", toml_path: "agents.warp_agent.active_ai.enabled",
description: "Controls whether proactive AI features like suggestions are enabled.", description: "Controls whether proactive AI features like suggestions are enabled.",
@@ -847,7 +849,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.input.ai_auto_detection_enabled", toml_path: "agents.warp_agent.input.ai_auto_detection_enabled",
description: "Controls whether AI automatically detects natural language input.", description: "Controls whether AI automatically detects natural language input.",
@@ -861,7 +863,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.input.nld_in_terminal_enabled", toml_path: "agents.warp_agent.input.nld_in_terminal_enabled",
description: "Controls whether natural language detection is enabled in the terminal input.", description: "Controls whether natural language detection is enabled in the terminal input.",
@@ -870,7 +872,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.input.ai_command_denylist", toml_path: "agents.warp_agent.input.ai_command_denylist",
description: "Commands to exclude from AI natural language autodetection.", description: "Commands to exclude from AI natural language autodetection.",
@@ -882,7 +884,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.input.use_local_model", toml_path: "agents.warp_agent.input.use_local_model",
description: "Use a locally downloaded AI model for command recognition and suggestions instead of Bedrock.", description: "Use a locally downloaded AI model for command recognition and suggestions instead of Bedrock.",
@@ -893,7 +895,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, // TODO(roland): revisit this when launched to stable default: true, // TODO(roland): revisit this when launched to stable
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.intelligent_autosuggestions_enabled", toml_path: "agents.warp_agent.active_ai.intelligent_autosuggestions_enabled",
description: "Controls whether AI-powered intelligent autosuggestions are enabled.", description: "Controls whether AI-powered intelligent autosuggestions are enabled.",
@@ -907,7 +909,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, // TODO(advait): revisit this when launched to stable default: true, // TODO(advait): revisit this when launched to stable
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.agent_mode_query_suggestions_enabled", toml_path: "agents.warp_agent.active_ai.agent_mode_query_suggestions_enabled",
description: "Controls whether prompt suggestions are shown in agent mode.", description: "Controls whether prompt suggestions are shown in agent mode.",
@@ -919,7 +921,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.code_suggestions_enabled", toml_path: "agents.warp_agent.active_ai.code_suggestions_enabled",
description: "Controls whether AI code suggestions are enabled.", description: "Controls whether AI code suggestions are enabled.",
@@ -931,7 +933,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.natural_language_autosuggestions_enabled", toml_path: "agents.warp_agent.active_ai.natural_language_autosuggestions_enabled",
description: "Controls whether ghosted text autosuggestions are shown for AI input queries.", description: "Controls whether ghosted text autosuggestions are shown for AI input queries.",
@@ -944,7 +946,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.shared_block_title_generation_enabled", toml_path: "agents.warp_agent.active_ai.shared_block_title_generation_enabled",
description: "Controls whether titles are auto-generated when sharing blocks.", description: "Controls whether titles are auto-generated when sharing blocks.",
@@ -955,7 +957,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.git_operations_autogen_enabled", toml_path: "agents.warp_agent.active_ai.git_operations_autogen_enabled",
description: "Controls whether AI auto-generates commit messages and PR title/body in the code review dialogs.", description: "Controls whether AI auto-generates commit messages and PR title/body in the code review dialogs.",
@@ -966,7 +968,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.active_ai.rule_suggestions_enabled", toml_path: "agents.warp_agent.active_ai.rule_suggestions_enabled",
description: "Controls whether the agent suggests rules to save after responses.", description: "Controls whether the agent suggests rules to save after responses.",
@@ -978,7 +980,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.voice.voice_input_enabled", toml_path: "agents.voice.voice_input_enabled",
description: "Controls whether voice input is enabled for AI interactions.", description: "Controls whether voice input is enabled for AI interactions.",
@@ -990,7 +992,7 @@ define_settings_group!(AISettings, settings: [
type: usize, type: usize,
default: 0, default: 0,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
}, },
// Whether or not the user has manually dismissed the voice input new feature popup. // Whether or not the user has manually dismissed the voice input new feature popup.
@@ -998,7 +1000,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
}, },
// This field is used to store the key used for voice input toggling. // This field is used to store the key used for voice input toggling.
@@ -1012,7 +1014,7 @@ define_settings_group!(AISettings, settings: [
default: false, default: false,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, // Never sync to cloud to keep state separate across devices, since microphone access is per-device. sync_to_cloud: SyncToCloud::Never, // Never sync to cloud to keep state separate across devices, since microphone access is per-device.
private: true, private: true,
}, },
// Predicates that Agent Mode can use to decide if it can execute // Predicates that Agent Mode can use to decide if it can execute
@@ -1024,7 +1026,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<AgentModeCommandExecutionPredicate>, type: Vec<AgentModeCommandExecutionPredicate>,
default: DEFAULT_COMMAND_EXECUTION_ALLOWLIST.clone(), default: DEFAULT_COMMAND_EXECUTION_ALLOWLIST.clone(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.profiles.agent_mode_command_execution_allowlist", toml_path: "agents.profiles.agent_mode_command_execution_allowlist",
description: "Commands that the agent can execute without explicit permission.", description: "Commands that the agent can execute without explicit permission.",
@@ -1038,7 +1040,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<AgentModeCommandExecutionPredicate>, type: Vec<AgentModeCommandExecutionPredicate>,
default: DEFAULT_COMMAND_EXECUTION_DENYLIST.clone(), default: DEFAULT_COMMAND_EXECUTION_DENYLIST.clone(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.profiles.agent_mode_command_execution_denylist", toml_path: "agents.profiles.agent_mode_command_execution_denylist",
description: "Commands that the agent must always ask before executing.", description: "Commands that the agent must always ask before executing.",
@@ -1051,7 +1053,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.profiles.agent_mode_execute_readonly_commands", toml_path: "agents.profiles.agent_mode_execute_readonly_commands",
description: "Whether the agent can auto-execute read-only commands without asking.", description: "Whether the agent can auto-execute read-only commands without asking.",
@@ -1066,7 +1068,7 @@ define_settings_group!(AISettings, settings: [
type: AgentModeCodingPermissionsType, type: AgentModeCodingPermissionsType,
default: AgentModeCodingPermissionsType::default(), default: AgentModeCodingPermissionsType::default(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.profiles.agent_mode_coding_permissions", toml_path: "agents.profiles.agent_mode_coding_permissions",
description: "The file read permission level for the agent.", description: "The file read permission level for the agent.",
@@ -1082,7 +1084,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<PathBuf>, type: Vec<PathBuf>,
default: vec![], default: vec![],
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.profiles.agent_mode_coding_file_read_allowlist", toml_path: "agents.profiles.agent_mode_coding_file_read_allowlist",
description: "File paths the agent can read without asking for permission.", description: "File paths the agent can read without asking for permission.",
@@ -1095,7 +1097,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// Whether or not we should show the speedbump for auto-executing readonly cmds. // Whether or not we should show the speedbump for auto-executing readonly cmds.
@@ -1106,7 +1108,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// Whether or not we should show the speedbump for auto-writing to the PTY. // Whether or not we should show the speedbump for auto-writing to the PTY.
@@ -1117,7 +1119,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// Whether or not we should show the speedbump for auto-reading files. // Whether or not we should show the speedbump for auto-reading files.
@@ -1128,7 +1130,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// Whether direct Bedrock integration is enabled (client calls Bedrock API directly). // Whether direct Bedrock integration is enabled (client calls Bedrock API directly).
@@ -1136,7 +1138,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.enabled", toml_path: "ai.bedrock.enabled",
description: "Whether to use AWS Bedrock directly for AI requests.", description: "Whether to use AWS Bedrock directly for AI requests.",
@@ -1148,7 +1150,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: "default".to_string(), default: "default".to_string(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.profile", toml_path: "ai.bedrock.profile",
description: "The AWS profile name to use for Bedrock credentials.", description: "The AWS profile name to use for Bedrock credentials.",
@@ -1158,7 +1160,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.region", toml_path: "ai.bedrock.region",
description: "AWS region for Bedrock API calls. Leave empty to auto-detect from profile.", description: "AWS region for Bedrock API calls. Leave empty to auto-detect from profile.",
@@ -1168,7 +1170,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.cross_region_inference", toml_path: "ai.bedrock.cross_region_inference",
description: "Whether to automatically add cross-region inference prefixes to model IDs.", description: "Whether to automatically add cross-region inference prefixes to model IDs.",
@@ -1178,7 +1180,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<BedrockModelConfig>, type: Vec<BedrockModelConfig>,
default: Vec::new(), default: Vec::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.models", toml_path: "ai.bedrock.models",
description: "Custom AWS Bedrock model configurations.", description: "Custom AWS Bedrock model configurations.",
@@ -1188,7 +1190,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.auto_login", toml_path: "ai.bedrock.auto_login",
description: "Whether to automatically run the login command when Bedrock credentials expire.", description: "Whether to automatically run the login command when Bedrock credentials expire.",
@@ -1198,7 +1200,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: "aws sso login".to_string(), default: "aws sso login".to_string(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.bedrock.auth_refresh_command", toml_path: "ai.bedrock.auth_refresh_command",
description: "The command to run to refresh AWS credentials for Bedrock.", description: "The command to run to refresh AWS credentials for Bedrock.",
@@ -1208,7 +1210,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// AWS secret access key for static key authentication (stored in OS keychain). // AWS secret access key for static key authentication (stored in OS keychain).
@@ -1216,7 +1218,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// Whether the Bedrock login banner has been permanently dismissed. // Whether the Bedrock login banner has been permanently dismissed.
@@ -1224,7 +1226,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
// Whether the OpenAI-compatible (LiteLLM) provider is enabled. // Whether the OpenAI-compatible (LiteLLM) provider is enabled.
@@ -1232,7 +1234,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.openai.enabled", toml_path: "ai.openai.enabled",
description: "Whether to use an OpenAI-compatible endpoint (e.g. LiteLLM) for AI requests.", description: "Whether to use an OpenAI-compatible endpoint (e.g. LiteLLM) for AI requests.",
@@ -1243,7 +1245,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: "http://localhost:4000/v1".to_string(), default: "http://localhost:4000/v1".to_string(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.openai.base_url", toml_path: "ai.openai.base_url",
description: "Base URL for the OpenAI-compatible API endpoint (e.g. LiteLLM proxy).", description: "Base URL for the OpenAI-compatible API endpoint (e.g. LiteLLM proxy).",
@@ -1253,7 +1255,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.openai.api_key", toml_path: "ai.openai.api_key",
description: "API key for the OpenAI-compatible endpoint (optional if proxy handles auth).", description: "API key for the OpenAI-compatible endpoint (optional if proxy handles auth).",
@@ -1264,7 +1266,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.openai.model", toml_path: "ai.openai.model",
description: "Model name to send to the OpenAI-compatible endpoint. Leave empty to use the selected model ID.", description: "Model name to send to the OpenAI-compatible endpoint. Leave empty to use the selected model ID.",
@@ -1275,7 +1277,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<OpenAIModelConfig>, type: Vec<OpenAIModelConfig>,
default: Vec::new(), default: Vec::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.openai.models", toml_path: "ai.openai.models",
description: "Custom OpenAI-compatible model configurations (e.g. from LiteLLM).", description: "Custom OpenAI-compatible model configurations (e.g. from LiteLLM).",
@@ -1287,7 +1289,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<OpenAIProviderConfig>, type: Vec<OpenAIProviderConfig>,
default: Vec::new(), default: Vec::new(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "ai.providers", toml_path: "ai.providers",
description: "Multiple OpenAI-compatible provider endpoints (e.g. LiteLLM, Ollama, local models).", description: "Multiple OpenAI-compatible provider endpoints (e.g. LiteLLM, Ollama, local models).",
@@ -1297,7 +1299,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.knowledge.rules_enabled", toml_path: "agents.knowledge.rules_enabled",
description: "Whether the agent uses your saved rules during requests.", description: "Whether the agent uses your saved rules during requests.",
@@ -1307,7 +1309,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.knowledge.warp_drive_context_enabled", toml_path: "agents.knowledge.warp_drive_context_enabled",
description: "Whether Galaxy Drive context is included in AI requests.", description: "Whether Galaxy Drive context is included in AI requests.",
@@ -1320,7 +1322,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<PathBuf>, type: Vec<PathBuf>,
default: vec![], default: vec![],
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1332,7 +1334,7 @@ define_settings_group!(AISettings, settings: [
type: Vec<PathBuf>, type: Vec<PathBuf>,
default: vec![], default: vec![],
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1343,7 +1345,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1352,7 +1354,7 @@ define_settings_group!(AISettings, settings: [
type: AIRequestQuotaInfo, type: AIRequestQuotaInfo,
default: AIRequestQuotaInfo::default(), default: AIRequestQuotaInfo::default(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
}, },
@@ -1364,7 +1366,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1372,7 +1374,7 @@ define_settings_group!(AISettings, settings: [
type: Option<String>, type: Option<String>,
default: None, default: None,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
}, },
@@ -1385,7 +1387,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1398,7 +1400,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1410,7 +1412,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "cloud_platform.third_party_api_keys.can_use_warp_credits_with_byok", toml_path: "cloud_platform.third_party_api_keys.can_use_warp_credits_with_byok",
description: "Whether Galaxy credits can be used even when providing your own API key.", description: "Whether Galaxy credits can be used even when providing your own API key.",
@@ -1420,7 +1422,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.other.should_render_use_agent_toolbar_for_user_commands", toml_path: "agents.warp_agent.other.should_render_use_agent_toolbar_for_user_commands",
description: "Whether to show the \"Use Agent\" footer for terminal commands.", description: "Whether to show the \"Use Agent\" footer for terminal commands.",
@@ -1432,7 +1434,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.third_party.should_render_cli_agent_toolbar", toml_path: "agents.third_party.should_render_cli_agent_toolbar",
description: "Whether to show the CLI agent footer for coding agent commands.", description: "Whether to show the CLI agent footer for coding agent commands.",
@@ -1444,7 +1446,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.third_party.auto_toggle_composer", toml_path: "agents.third_party.auto_toggle_composer",
description: "Whether CLI agent Rich Input automatically closes and reopens based on the agent's blocked state.", description: "Whether CLI agent Rich Input automatically closes and reopens based on the agent's blocked state.",
@@ -1456,7 +1458,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.third_party.auto_open_composer_on_cli_agent_start", toml_path: "agents.third_party.auto_open_composer_on_cli_agent_start",
description: "Whether CLI agent Rich Input automatically opens when a CLI agent session starts.", description: "Whether CLI agent Rich Input automatically opens when a CLI agent session starts.",
@@ -1470,7 +1472,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.third_party.auto_dismiss_composer_after_submit", toml_path: "agents.third_party.auto_dismiss_composer_after_submit",
description: "Whether CLI agent Rich Input automatically closes after the user submits a prompt.", description: "Whether CLI agent Rich Input automatically closes after the user submits a prompt.",
@@ -1484,7 +1486,7 @@ define_settings_group!(AISettings, settings: [
type: ToolbarCommandMap, type: ToolbarCommandMap,
default: ToolbarCommandMap::default(), default: ToolbarCommandMap::default(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.third_party.cli_agent_toolbar_enabled_commands", toml_path: "agents.third_party.cli_agent_toolbar_enabled_commands",
max_table_depth: 1, max_table_depth: 1,
@@ -1501,7 +1503,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1516,7 +1518,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1526,7 +1528,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1537,7 +1539,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1552,7 +1554,7 @@ define_settings_group!(AISettings, settings: [
type: String, type: String,
default: String::new(), default: String::new(),
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "general.default_tab_config_path", toml_path: "general.default_tab_config_path",
} }
@@ -1565,7 +1567,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.mcp_servers.file_based_mcp_enabled", toml_path: "agents.mcp_servers.file_based_mcp_enabled",
description: "Whether third-party file-based MCP servers are automatically detected.", description: "Whether third-party file-based MCP servers are automatically detected.",
@@ -1581,7 +1583,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.input.include_agent_commands_in_history", toml_path: "agents.warp_agent.input.include_agent_commands_in_history",
description: "Whether agent-executed commands are included in command history.", description: "Whether agent-executed commands are included in command history.",
@@ -1592,7 +1594,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.other.show_conversation_history", toml_path: "agents.warp_agent.other.show_conversation_history",
description: "Whether conversation history appears in the tools panel.", description: "Whether conversation history appears in the tools panel.",
@@ -1604,7 +1606,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.other.show_agent_notifications", toml_path: "agents.warp_agent.other.show_agent_notifications",
description: "Whether agent notifications are shown.", description: "Whether agent notifications are shown.",
@@ -1617,7 +1619,7 @@ define_settings_group!(AISettings, settings: [
type: HashMap<String, bool>, type: HashMap<String, bool>,
default: HashMap::default(), default: HashMap::default(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1629,7 +1631,7 @@ define_settings_group!(AISettings, settings: [
type: HashMap<String, String>, type: HashMap<String, String>,
default: HashMap::default(), default: HashMap::default(),
supported_platforms: SupportedPlatforms::DESKTOP, supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
@@ -1641,7 +1643,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: true, default: true,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: false, private: false,
toml_path: "agents.warp_agent.other.agent_attribution_enabled", toml_path: "agents.warp_agent.other.agent_attribution_enabled",
description: "Whether the Galaxy Agent adds an attribution co-author line to commit messages and pull requests it creates.", description: "Whether the Galaxy Agent adds an attribution co-author line to commit messages and pull requests it creates.",
@@ -1654,7 +1656,7 @@ define_settings_group!(AISettings, settings: [
type: bool, type: bool,
default: false, default: false,
supported_platforms: SupportedPlatforms::ALL, supported_platforms: SupportedPlatforms::ALL,
sync_to_cloud: SyncToCloud::Never, sync_to_cloud: SyncToCloud::Never,
private: true, private: true,
} }
]); ]);
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(AliasExpansionSettings, settings: [ define_settings_group!(AliasExpansionSettings, settings: [
alias_expansion_enabled: AliasExpansionEnabled { alias_expansion_enabled: AliasExpansionEnabled {
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
// Settings for visibility of non-user command blocks like the bootstrap block // Settings for visibility of non-user command blocks like the bootstrap block
// and in-band command blocks. // and in-band command blocks.
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(ChangelogSettings, settings: [ define_settings_group!(ChangelogSettings, settings: [
show_changelog_after_update: ShowChangelogAfterUpdate { show_changelog_after_update: ShowChangelogAfterUpdate {
+1 -3
View File
@@ -14,9 +14,7 @@ use crate::{
server::sync_queue::QueueItem, server::sync_queue::QueueItem,
}; };
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(CloudPreferencesSettings, settings: [ define_settings_group!(CloudPreferencesSettings, settings: [
settings_sync_enabled: IsSettingsSyncEnabled { settings_sync_enabled: IsSettingsSyncEnabled {
type: bool, type: bool,
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(CodeSettings, settings: [ define_settings_group!(CodeSettings, settings: [
code_as_default_editor: CodeAsDefaultEditor { code_as_default_editor: CodeAsDefaultEditor {
+1 -4
View File
@@ -3,10 +3,7 @@ use std::fmt::{Display, Formatter};
use enum_iterator::{all, Sequence}; use enum_iterator::{all, Sequence};
use galaxyui::ModelContext; use galaxyui::ModelContext;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use settings::{ use settings::{macros::define_settings_group, Setting as _, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting as _, SupportedPlatforms,
SyncToCloud,
};
#[derive( #[derive(
Clone, Clone,
+1 -3
View File
@@ -1,7 +1,5 @@
use crate::banner::BannerState; use crate::banner::BannerState;
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
// This isn't exactly a setting, but rather a record of a // This isn't exactly a setting, but rather a record of a
// user action that should be persisted the same way we would a setting. // user action that should be persisted the same way we would a setting.
+1 -3
View File
@@ -2,9 +2,7 @@ use galaxy_core::ui::builder::MIN_FONT_SIZE;
use galaxyui::{fonts::Weight, rendering::ThinStrokes, AppContext, SingletonEntity}; use galaxyui::{fonts::Weight, rendering::ThinStrokes, AppContext, SingletonEntity};
use galaxyui::elements::DEFAULT_UI_LINE_HEIGHT_RATIO; use galaxyui::elements::DEFAULT_UI_LINE_HEIGHT_RATIO;
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
use super::EnforceMinimumContrast as EnforceMinimumContrastEnum; use super::EnforceMinimumContrast as EnforceMinimumContrastEnum;
+1 -3
View File
@@ -1,7 +1,5 @@
use crate::terminal::block_list_viewport::InputMode; use crate::terminal::block_list_viewport::InputMode;
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(InputModeSettings, settings: [ define_settings_group!(InputModeSettings, settings: [
input_mode: InputModeState { input_mode: InputModeState {
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(PaneSettings, settings: [ define_settings_group!(PaneSettings, settings: [
should_dim_inactive_panes: ShouldDimInactivePanes { should_dim_inactive_panes: ShouldDimInactivePanes {
+1 -3
View File
@@ -2,9 +2,7 @@ use std::ops::Not;
use galaxyui::{clipboard::ClipboardContent, AppContext}; use galaxyui::{clipboard::ClipboardContent, AppContext};
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(SelectionSettings, settings: [ define_settings_group!(SelectionSettings, settings: [
copy_on_select: CopyOnSelect { copy_on_select: CopyOnSelect {
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(SshSettings, define_settings_group!(SshSettings,
settings: [ settings: [
+1 -3
View File
@@ -1,9 +1,7 @@
use galaxyui::{platform::SystemTheme, AppContext}; use galaxyui::{platform::SystemTheme, AppContext};
use crate::themes::theme::{RespectSystemTheme, SelectedSystemThemes, ThemeKind}; use crate::themes::theme::{RespectSystemTheme, SelectedSystemThemes, ThemeKind};
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
// Settings group for themes related settings. // Settings group for themes related settings.
// Note that we store just the information needed to derive the current // Note that we store just the information needed to derive the current
+3 -12
View File
@@ -1429,10 +1429,7 @@ impl AISettingsPageView {
}; };
if !response.status().is_success() { if !response.status().is_success() {
log::error!( log::error!("[litellm] Model fetch returned HTTP {}", response.status());
"[litellm] Model fetch returned HTTP {}",
response.status()
);
return Vec::new(); return Vec::new();
} }
@@ -1473,9 +1470,7 @@ impl AISettingsPageView {
let mut chars = word.chars(); let mut chars = word.chars();
match chars.next() { match chars.next() {
None => String::new(), None => String::new(),
Some(c) => { Some(c) => c.to_uppercase().to_string() + chars.as_str(),
c.to_uppercase().to_string() + chars.as_str()
}
} }
}) })
.collect::<Vec<_>>() .collect::<Vec<_>>()
@@ -1502,11 +1497,7 @@ impl AISettingsPageView {
}) })
.collect(); .collect();
log::info!( log::info!("[litellm] Fetched {} model(s) from {}", models.len(), url);
"[litellm] Fetched {} model(s) from {}",
models.len(),
url
);
models models
}, },
|_view, models, ctx| { |_view, models, ctx| {
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(AltScreenReporting, settings: [ define_settings_group!(AltScreenReporting, settings: [
mouse_reporting_enabled: MouseReportingEnabled { mouse_reporting_enabled: MouseReportingEnabled {
+1 -3
View File
@@ -1,6 +1,4 @@
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
// Settings for controlling the behavior of the block list. // Settings for controlling the behavior of the block list.
define_settings_group!(BlockListSettings, settings: [ define_settings_group!(BlockListSettings, settings: [
+1 -3
View File
@@ -1,9 +1,7 @@
use std::collections::HashSet; use std::collections::HashSet;
use crate::{banner::BannerState, resource_center::Tip}; use crate::{banner::BannerState, resource_center::Tip};
use galaxy_core::settings::{ use galaxy_core::settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(GeneralSettings, settings: [ define_settings_group!(GeneralSettings, settings: [
show_warning_before_quitting: ShowWarningBeforeQuitting { show_warning_before_quitting: ShowWarningBeforeQuitting {
+1 -3
View File
@@ -1,7 +1,5 @@
use galaxyui::{keymap::Keystroke, AppContext, DisplayIdx, ModelContext}; use galaxyui::{keymap::Keystroke, AppContext, DisplayIdx, ModelContext};
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
use crate::{ use crate::{
report_if_error, report_if_error,
+1 -3
View File
@@ -1,9 +1,7 @@
use crate::features::FeatureFlag; use crate::features::FeatureFlag;
use galaxyui::{AppContext, SingletonEntity}; use galaxyui::{AppContext, SingletonEntity};
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(LigatureSettings, settings: [ define_settings_group!(LigatureSettings, settings: [
ligature_rendering_enabled: LigatureRenderingEnabled { ligature_rendering_enabled: LigatureRenderingEnabled {
+1 -3
View File
@@ -1,7 +1,5 @@
use galaxyui::{AppContext, SingletonEntity}; use galaxyui::{AppContext, SingletonEntity};
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
use crate::{terminal::model::ObfuscateSecrets, workspaces::user_workspaces::UserWorkspaces}; use crate::{terminal::model::ObfuscateSecrets, workspaces::user_workspaces::UserWorkspaces};
+1 -3
View File
@@ -9,9 +9,7 @@ use serde::{Deserialize, Serialize};
pub use startup_shell::*; pub use startup_shell::*;
pub use working_directory_config::*; pub use working_directory_config::*;
use galaxy_core::settings::{ use galaxy_core::settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
use crate::ai::blocklist::agent_view::toolbar_item::AgentToolbarItemKind; use crate::ai::blocklist::agent_view::toolbar_item::AgentToolbarItemKind;
use crate::context_chips::prompt::PromptSelection; use crate::context_chips::prompt::PromptSelection;
+1 -3
View File
@@ -2,9 +2,7 @@ use serde::{Deserialize, Serialize};
use crate::settings::{AISettings, InputSettings, TerminalSpacing}; use crate::settings::{AISettings, InputSettings, TerminalSpacing};
use galaxyui::{units::Pixels, AppContext, SingletonEntity}; use galaxyui::{units::Pixels, AppContext, SingletonEntity};
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
#[derive( #[derive(
Clone, Clone,
+1 -3
View File
@@ -1,8 +1,6 @@
use std::time::Duration; use std::time::Duration;
use settings::{ use settings::{macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, Setting, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(SharedSessionSettings, settings: [ define_settings_group!(SharedSessionSettings, settings: [
onboarding_block_shown: SessionSharingOnboardingBlockShown { onboarding_block_shown: SessionSharingOnboardingBlockShown {
+1 -3
View File
@@ -1,8 +1,6 @@
use std::time::Duration; use std::time::Duration;
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(UndoCloseSettings, settings: [ define_settings_group!(UndoCloseSettings, settings: [
enabled: UndoCloseEnabled { enabled: UndoCloseEnabled {
@@ -1,8 +1,6 @@
pub use crate::util::openable_file_type::EditorLayout; pub use crate::util::openable_file_type::EditorLayout;
use serde::{Deserialize, Deserializer, Serialize}; use serde::{Deserialize, Deserializer, Serialize};
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
#[derive( #[derive(
Debug, Debug,
+1 -3
View File
@@ -1,7 +1,5 @@
use galaxyui::{AppContext, WindowId}; use galaxyui::{AppContext, WindowId};
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
define_settings_group!(WindowSettings, settings: [ define_settings_group!(WindowSettings, settings: [
background_blur_radius: BackgroundBlurRadius { background_blur_radius: BackgroundBlurRadius {
+1 -3
View File
@@ -2,9 +2,7 @@ use std::collections::HashMap;
use std::path::Path; use std::path::Path;
use galaxy_core::ui::theme::AnsiColorIdentifier; use galaxy_core::ui::theme::AnsiColorIdentifier;
use settings::{ use settings::{macros::define_settings_group, SupportedPlatforms, SyncToCloud};
macros::define_settings_group, SupportedPlatforms, SyncToCloud,
};
#[derive( #[derive(
Default, Default,