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
@@ -1,4 +1,4 @@
use warp_util::local_or_remote_path::LocalOrRemotePath;
use galaxy_util::local_or_remote_path::LocalOrRemotePath;
use galaxyui_core::ModelContext;
use super::model::{ProjectContextModel, ProjectRule};
@@ -2,14 +2,14 @@ use std::collections::{BTreeMap, HashMap};
use std::path::{Path, PathBuf};
use async_channel::Sender;
use galaxy_core::safe_warn;
use galaxy_util::local_or_remote_path::LocalOrRemotePath;
use galaxy_util::standardized_path::StandardizedPath;
use galaxyui_core::{ModelContext, ModelHandle, SingletonEntity};
use repo_metadata::repository::{RepositorySubscriber, SubscriberId};
use repo_metadata::{DirectoryWatcher, Repository, RepositoryUpdate};
use strum::IntoEnumIterator;
use strum_macros::EnumIter;
use galaxy_core::safe_warn;
use warp_util::local_or_remote_path::LocalOrRemotePath;
use warp_util::standardized_path::StandardizedPath;
use galaxyui_core::{ModelContext, ModelHandle, SingletonEntity};
use watcher::{HomeDirectoryWatcher, HomeDirectoryWatcherEvent};
use super::model::{GlobalRulesDelta, ProjectContextModel, ProjectContextModelEvent, ProjectRule};
+40 -5
View File
@@ -56,12 +56,21 @@ pub struct ProjectRule {
#[derive(Debug, Clone)]
struct RuleAtPath {
parent_path: LocalOrRemotePath,
galaxy_md: Option<ProjectRule>,
warp_md: Option<ProjectRule>,
claude_md: Option<ProjectRule>,
agents_md: Option<ProjectRule>,
}
impl RuleAtPath {
fn respected_rule(&self) -> Option<&ProjectRule> {
self.galaxy_md
.as_ref()
.or(self.warp_md.as_ref())
.or(self.claude_md.as_ref())
.or(self.agents_md.as_ref())
}
fn all_rules(&self) -> Vec<&ProjectRule> {
[
self.galaxy_md.as_ref(),
@@ -105,8 +114,10 @@ impl ProjectRules {
#[cfg_attr(not(feature = "local_fs"), allow(dead_code))]
fn rule_paths(&self) -> impl Iterator<Item = &LocalOrRemotePath> {
self.rules.iter().flat_map(|rule| {
rule.warp_md
rule.galaxy_md
.iter()
.chain(rule.warp_md.iter())
.chain(rule.claude_md.iter())
.chain(rule.agents_md.iter())
.map(|rule| &rule.path)
})
@@ -119,6 +130,13 @@ impl ProjectRules {
#[cfg_attr(not(feature = "local_fs"), allow(dead_code))]
fn retain_rule_paths(&mut self, retained_paths: &HashSet<LocalOrRemotePath>) {
self.rules.retain_mut(|rule| {
if rule
.galaxy_md
.as_ref()
.is_some_and(|rule| !retained_paths.contains(&rule.path))
{
rule.galaxy_md = None;
}
if rule
.warp_md
.as_ref()
@@ -126,6 +144,13 @@ impl ProjectRules {
{
rule.warp_md = None;
}
if rule
.claude_md
.as_ref()
.is_some_and(|rule| !retained_paths.contains(&rule.path))
{
rule.claude_md = None;
}
if rule
.agents_md
.as_ref()
@@ -133,7 +158,10 @@ impl ProjectRules {
{
rule.agents_md = None;
}
rule.warp_md.is_some() || rule.agents_md.is_some()
rule.galaxy_md.is_some()
|| rule.warp_md.is_some()
|| rule.claude_md.is_some()
|| rule.agents_md.is_some()
});
}
/// Finds the set of rules that are active in the given path and the set that are available to be applied.
@@ -185,15 +213,22 @@ impl ProjectRules {
None => {
let mut rule = RuleAtPath {
parent_path: parent,
galaxy_md: None,
warp_md: None,
claude_md: None,
agents_md: None,
};
if file_name.to_lowercase() == "warp.md" {
rule.warp_md = rule_file;
if file_name.to_lowercase() == "galaxy.md" {
rule.galaxy_md = rule_file.clone();
} else if file_name.to_lowercase() == "warp.md" {
rule.warp_md = rule_file.clone();
} else if file_name.to_lowercase() == "claude.md" {
rule.claude_md = rule_file.clone();
} else if file_name.to_lowercase() == "agents.md" {
rule.agents_md = rule_file;
rule.agents_md = rule_file.clone();
}
self.rules.push(rule);
self.rules.last_mut().unwrap()
}
};
+5 -5
View File
@@ -1,9 +1,9 @@
use std::path::PathBuf;
use warp_util::host_id::HostId;
use warp_util::local_or_remote_path::LocalOrRemotePath;
use warp_util::remote_path::RemotePath;
use warp_util::standardized_path::StandardizedPath;
use galaxy_util::host_id::HostId;
use galaxy_util::local_or_remote_path::LocalOrRemotePath;
use galaxy_util::remote_path::RemotePath;
use galaxy_util::standardized_path::StandardizedPath;
fn local_path(path: &str) -> LocalOrRemotePath {
LocalOrRemotePath::Local(PathBuf::from(path))
@@ -169,7 +169,7 @@ fn test_find_applicable_rules_complex_scenario() {
let path = local_path("/a/b/c/file.rs");
let result = rules.find_active_or_applicable_rules(&path).active_rules;
assert_eq!(result.len(), 4);
assert_eq!(result.len(), 2);
// Expect only WARP.md files to be included as they have higher priority.
assert_eq!(result[0].path, local_path("/a/WARP.md"));