Fix cursor focus and selection in input box, add AWS env var warning box, and remove AWS Bedrock login banner

This commit is contained in:
2026-07-02 14:54:15 -05:00
parent 4770ac06b5
commit 3769646ca6
1194 changed files with 5312 additions and 8032 deletions
+5 -3
View File
@@ -205,9 +205,8 @@ pub(super) fn select_conversations_to_evict(
pub(super) fn read_agent_conversations(
conn: &mut SqliteConnection,
) -> Result<Vec<AgentConversation>, diesel::result::Error> {
let mut conversations_by_id = HashMap::<String, AgentConversation>::from_iter(
agent_conversations
agent_conversations::table
.select(AgentConversationRecord::as_select())
.load(conn)?
.into_iter()
@@ -254,6 +253,7 @@ pub(crate) fn read_agent_conversation_by_id(
conversation_id_str: &str,
) -> Result<Option<AgentConversation>, diesel::result::Error> {
use schema::agent_conversations::dsl as convo_dsl;
use schema::agent_tasks::dsl as tasks_dsl;
let maybe_record: Option<AgentConversationRecord> = convo_dsl::agent_conversations
.filter(convo_dsl::conversation_id.eq(conversation_id_str.to_owned()))
@@ -291,6 +291,8 @@ pub(super) fn delete_agent_conversations(
conversation_ids: Vec<String>,
) -> Result<(), diesel::result::Error> {
use diesel::{ExpressionMethods, QueryDsl};
use schema::agent_conversations::dsl as convo_dsl;
use schema::agent_tasks::dsl as tasks_dsl;
conn.transaction::<_, Error, _>(|conn| {
// Delete tasks for these conversations first (due to foreign key constraint)
@@ -301,7 +303,7 @@ pub(super) fn delete_agent_conversations(
// Delete the conversations themselves
diesel::delete(
agent_conversations::table().filter(conversation_id.eq_any(&conversation_ids)),
agent_conversations::table.filter(convo_dsl::conversation_id.eq_any(&conversation_ids)),
)
.execute(conn)?;
+3 -2
View File
@@ -291,9 +291,9 @@ fn create_block<'a>(
}
pub(super) fn delete_blocks(conn: &mut SqliteConnection, pane_id: Vec<u8>) -> Result<(), Error> {
use schema::blocks::dsl::*;
conn.transaction::<_, Error, _>(|conn| {
diesel::delete(schema::blocks::dsl::blocks.filter(pane_leaf_uuid.eq(pane_id.clone())))
.execute(conn)?;
diesel::delete(blocks.filter(pane_leaf_uuid.eq(pane_id.clone()))).execute(conn)?;
Ok(())
})
}
@@ -303,6 +303,7 @@ pub(super) fn update_block_agent_view_visibility(
target_block_id: &str,
visibility: &SerializedAgentViewVisibility,
) -> anyhow::Result<()> {
use schema::blocks::dsl::*;
let visibility_json = serde_json::to_string(visibility)?;
diesel::update(blocks.filter(block_id.eq(target_block_id)))
.set(agent_view_visibility.eq(visibility_json))
+3
View File
@@ -25,6 +25,9 @@ use std::thread::JoinHandle;
use ai::project_context::model::ProjectRulePath;
use ai::workspace::WorkspaceMetadata as CodeWorkspaceMetadata;
use chrono::{DateTime, Local, Utc};
use galaxy_core::command::ExitCode;
use galaxy_graphql::scalars::time::ServerTimestamp;
use galaxyui::{AppContext, Entity, SingletonEntity};
use instant::Instant;
use lsp::supported_servers::LSPServerType;
#[cfg(any(feature = "local_fs", feature = "integration_tests"))]
+26 -2
View File
@@ -36,6 +36,7 @@ use diesel::{
use diesel_migrations::MigrationHarness;
use galaxy_graphql::scalars::time::ServerTimestamp;
use galaxyui::platform::FullscreenState;
use galaxyui::windowing::{MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH};
use galaxyui::{AppContext, SingletonEntity};
use itertools::Itertools;
use libsqlite3_sys as sqlite3;
@@ -45,7 +46,6 @@ use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::Vector2F;
use persistence::model::AMBIENT_AGENT_PANE_KIND;
use uuid::Uuid;
use galaxyui::windowing::{MIN_WINDOW_HEIGHT, MIN_WINDOW_WIDTH};
use super::agent::{delete_agent_conversations, upsert_agent_conversation};
use super::block_list::{
@@ -86,7 +86,7 @@ use crate::cloud_object::model::actions::{
use crate::cloud_object::model::generic_string_model::{CloudStringObject, GenericStringObjectId};
use crate::cloud_object::{CloudObject, ObjectIdType};
use crate::code::editor_management::CodeSource;
use crate::drive::OpenWarpDriveObjectSettings;
use crate::drive::OpenGalaxyDriveObjectSettings;
use crate::notebooks::NotebookId;
use crate::persistence::agent::read_agent_conversations;
use crate::persistence::block_list::{get_all_restored_blocks, read_ai_queries};
@@ -441,6 +441,8 @@ fn ensure_owner_only_dir(_path: &Path) -> Result<()> {
#[cfg(unix)]
fn ensure_owner_only_file(path: &Path) -> Result<()> {
use std::fs::Permissions;
use std::os::unix::fs::PermissionsExt;
if path.exists() {
std::fs::set_permissions(path, Permissions::from_mode(0o600))
@@ -1424,6 +1426,7 @@ fn decode_path(bytes: Vec<u8>) -> PathBuf {
cfg_if::cfg_if! {
if #[cfg(unix)] {
use std::os::unix::ffi::OsStringExt;
OsString::from_vec(bytes).into()
} else if #[cfg(windows)] {
use std::os::windows::ffi::OsStringExt;
@@ -1455,6 +1458,7 @@ fn save_codebase_index_metadata(
fn get_all_codebase_index_metadata(
conn: &mut SqliteConnection,
) -> Result<Vec<ai::workspace::WorkspaceMetadata>, diesel::result::Error> {
use schema::workspace_metadata::dsl::*;
Ok(workspace_metadata
.load_iter::<WorkspaceMetadataModel, DefaultLoadingMode>(conn)?
@@ -1499,6 +1503,9 @@ fn upsert_workspace_language_server(
server_type: LSPServerType,
enablement: EnablementState,
) -> Result<()> {
use schema::workspace_language_server::dsl::*;
use schema::workspace_metadata::dsl::*;
let path_string = workspace_path.to_string_lossy().to_string();
// Try to find existing workspace
@@ -1543,6 +1550,7 @@ fn upsert_workspace_language_server(
}
fn delete_codebase_index_metadata(conn: &mut SqliteConnection, index_path: &Path) -> Result<()> {
use schema::workspace_metadata::dsl::*;
let target_path = index_path.to_string_lossy().to_string();
diesel::delete(workspace_metadata.filter(repo_path.eq(target_path))).execute(conn)?;
@@ -1564,6 +1572,7 @@ fn save_project(conn: &mut SqliteConnection, project: Project) -> Result<()> {
}
fn get_all_projects(conn: &mut SqliteConnection) -> Result<Vec<Project>, diesel::result::Error> {
use schema::projects::dsl::*;
Ok(projects
.load_iter::<Project, DefaultLoadingMode>(conn)?
@@ -1572,6 +1581,7 @@ fn get_all_projects(conn: &mut SqliteConnection) -> Result<Vec<Project>, diesel:
}
fn delete_project(conn: &mut SqliteConnection, project_path: &str) -> Result<()> {
use schema::projects::dsl::*;
diesel::delete(projects.filter(path.eq(project_path))).execute(conn)?;
@@ -1599,6 +1609,7 @@ fn upsert_project_rules(
conn: &mut SqliteConnection,
new_project_rules: Vec<ProjectRulePath>,
) -> Result<()> {
use schema::project_rules::dsl::*;
// SQLite doesn't support batch upserts, so we need to iterate
for rule in new_project_rules {
@@ -1619,6 +1630,7 @@ fn upsert_project_rules(
}
fn delete_project_rules(conn: &mut SqliteConnection, rules_paths: Vec<PathBuf>) -> Result<()> {
use schema::project_rules::dsl::*;
// Convert PathBuf to String for comparison
let path_strings: Vec<String> = rules_paths
@@ -1695,6 +1707,7 @@ fn upsert_mcp_server_installation(
conn: &mut SqliteConnection,
mcp_server_installation: TemplatableMCPServerInstallation,
) -> Result<()> {
use schema::mcp_server_installations::dsl::*;
let new_installation = model::NewMCPServerInstallation {
id: mcp_server_installation.uuid().to_string(),
@@ -1723,6 +1736,7 @@ fn upsert_mcp_server_installation(
}
fn delete_mcp_server_installations(conn: &mut SqliteConnection, uuids: Vec<Uuid>) -> Result<()> {
use schema::mcp_server_installations::dsl::*;
let id_strings: Vec<String> = uuids.iter().map(|uuid| uuid.to_string()).collect();
diesel::delete(mcp_server_installations.filter(id.eq_any(id_strings))).execute(conn)?;
@@ -1734,6 +1748,7 @@ fn delete_mcp_server_installations_by_template_uuid(
conn: &mut SqliteConnection,
target_template_uuid: Uuid,
) -> Result<()> {
use schema::mcp_server_installations::dsl::*;
diesel::delete(mcp_server_installations.filter(
json_extract(templatable_mcp_server, "$.uuid").eq(target_template_uuid.to_string()),
@@ -1746,6 +1761,7 @@ fn delete_mcp_server_installations_by_template_uuid(
fn get_mcp_servers_to_restore(
conn: &mut SqliteConnection,
) -> Result<Vec<Uuid>, diesel::result::Error> {
use schema::mcp_server_installations::dsl::*;
let rows = mcp_server_installations
.filter(restore_running.eq(true))
@@ -1765,6 +1781,7 @@ fn update_mcp_server_running(
installation_uuid: Uuid,
running: bool,
) -> Result<(), diesel::result::Error> {
use schema::mcp_server_installations::dsl::*;
diesel::update(mcp_server_installations.find(installation_uuid.to_string()))
.set((
@@ -1781,6 +1798,7 @@ fn add_ignored_suggestion(
suggestion_text: String,
suggestion_type_param: SuggestionType,
) -> Result<()> {
use schema::ignored_suggestions::dsl::*;
let new_suggestion = model::NewIgnoredSuggestion {
suggestion: suggestion_text,
@@ -1801,6 +1819,7 @@ fn remove_ignored_suggestion(
suggestion_text: String,
suggestion_type_param: SuggestionType,
) -> Result<()> {
use schema::ignored_suggestions::dsl::*;
diesel::delete(
ignored_suggestions.filter(
@@ -1896,6 +1915,9 @@ fn save_workspaces(
workspaces_to_insert: Vec<WorkspaceMetadata>,
) -> Result<()> {
use schema::team_settings::dsl::*;
use schema::teams::dsl::teams;
use schema::workspace_teams::dsl::workspace_teams;
use schema::workspaces::dsl::*;
// Get currently selected workspace uid if there is one
let current_workspace_uid: Option<WorkspaceUid> = workspaces
@@ -2044,6 +2066,7 @@ fn save_workspaces(
}
fn set_current_workspace(conn: &mut SqliteConnection, workspace_uid: WorkspaceUid) -> Result<()> {
use schema::workspaces::dsl::*;
// Set all existing workspaces as not selected
diesel::update(workspaces)
@@ -2837,6 +2860,7 @@ fn update_finished_command(
conn: &mut SqliteConnection,
completed_command: FinishedCommandMetadata,
) -> Result<(), Error> {
use schema::commands::dsl::*;
let completed_command_session_id: Option<i64> =
completed_command.session_id.as_u64().try_into().ok();
+2 -2
View File
@@ -5,10 +5,10 @@ use ai::workspace::WorkspaceMetadata;
use chrono::Utc;
use cloud_object_persistence::to_cloud_object_permissions;
use diesel::connection::SimpleConnection;
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::Vector2F;
use galaxy_core::features::FeatureFlag;
use galaxy_graphql::scalars::time::ServerTimestamp;
use pathfinder_geometry::rect::RectF;
use pathfinder_geometry::vector::Vector2F;
use super::{
app_database_file_path, database_file_path_for_scope, decode_path, deduplicate_events,