first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+13 -14
View File
@@ -1,9 +1,9 @@
use std::path::PathBuf;
use ai::skills::{SkillProvider, SkillReference, SkillScope};
use fuzzy_match::{match_indices_case_insensitive, FuzzyMatchResult};
use ordered_float::OrderedFloat;
use galaxy_core::ui::icons::Icon;
use galaxy_core::ui::theme::Fill;
use galaxy_util::local_or_remote_path::LocalOrRemotePath;
use galaxyui::elements::{
ConstrainedBox, Container, CrossAxisAlignment, Flex, Highlight, ParentElement, Shrinkable, Text,
};
@@ -14,7 +14,6 @@ use galaxyui::text_layout::ClipConfig;
use galaxyui::{
AppContext, Element, Entity, EntityId, ModelContext, ModelHandle, SingletonEntity as _,
};
use ordered_float::OrderedFloat;
use crate::ai::skills::SkillManager;
use crate::appearance::Appearance;
@@ -23,9 +22,9 @@ use crate::search::mixer::DataSourceRunErrorWrapper;
use crate::search::result_renderer::ItemHighlightState;
use crate::search::{SearchItem, SyncDataSource};
use crate::terminal::cli_agent_sessions::{CLIAgentInputState, CLIAgentSessionsModel};
use crate::terminal::input::inline_menu::styles as inline_styles;
use crate::terminal::input::inline_menu::{
default_navigation_message_items, InlineMenuAction, InlineMenuMessageArgs, InlineMenuType,
default_navigation_message_items, styles as inline_styles, InlineMenuAction,
InlineMenuMessageArgs, InlineMenuType,
};
use crate::terminal::input::message_bar::{Message, MessageItem};
use crate::terminal::model::session::active_session::{ActiveSession, ActiveSessionEvent};
@@ -77,7 +76,7 @@ impl SkillSelectorDataSource {
terminal_view_id: EntityId,
ctx: &mut ModelContext<Self>,
) -> Self {
ctx.subscribe_to_model(&active_session, |_, event, ctx| match event {
ctx.subscribe_to_model(&active_session, |_, _, event, ctx| match event {
// Emit event so the mixer can re-run its query with the new pwd
ActiveSessionEvent::UpdatedPwd | ActiveSessionEvent::Bootstrapped => {
ctx.emit(UpdatedAvailableSkills);
@@ -104,12 +103,11 @@ impl SkillSelectorDataSource {
self.include_bundled = include_bundled;
}
/// Get the current working directory from the active session
fn get_current_working_directory(&self, app: &AppContext) -> Option<PathBuf> {
/// Get the current working directory location from the active session.
fn get_current_working_directory(&self, app: &AppContext) -> Option<LocalOrRemotePath> {
self.active_session
.as_ref(app)
.current_working_directory()
.map(PathBuf::from)
.current_working_directory_location(app)
}
}
@@ -123,10 +121,12 @@ impl SyncDataSource for SkillSelectorDataSource {
) -> Result<Vec<QueryResult<Self::Action>>, DataSourceRunErrorWrapper> {
let cwd = self.get_current_working_directory(app);
let cli_agent_providers = self.active_cli_agent_providers(app);
let skills =
SkillManager::as_ref(app).get_skills_for_working_directory(cwd.as_deref(), app);
let skills = SkillManager::as_ref(app).get_skills_for_working_directory(cwd.as_ref(), app);
// Filter out bundled skills when in open mode, since they cannot be opened.
// Bundled skills are identified by scope rather than reference: local
// catalog entries are `BundledSkillId`-referenced, but remote catalog
// entries are path-referenced, and both must be excluded here.
// When CLI agent input is open, filter to skills that exist in a supported
// provider folder. We check all paths for the skill name (not just the
// deduplicated provider) because deduplication may pick a higher-priority
@@ -138,8 +138,7 @@ impl SyncDataSource for SkillSelectorDataSource {
if let Some(providers) = &cli_agent_providers {
skill_manager.skill_exists_for_any_provider(skill, providers)
} else {
self.include_bundled
|| !matches!(skill.reference, SkillReference::BundledSkillId(_))
self.include_bundled || skill.scope != SkillScope::Bundled
}
})
.map(|mut skill| {
+1 -2
View File
@@ -1,6 +1,6 @@
use ai::skills::SkillReference;
use galaxyui::elements::ChildView;
use galaxyui::{Element, Entity, ModelHandle, View, ViewContext, ViewHandle};
use galaxyui::{Element, Entity, EntityId, ModelHandle, View, ViewContext, ViewHandle};
use crate::ai::blocklist::agent_view::AgentViewController;
use crate::search::data_source::Query;
@@ -14,7 +14,6 @@ use crate::terminal::input::suggestions_mode_model::{
InputSuggestionsModeEvent, InputSuggestionsModeModel,
};
use crate::terminal::model::session::active_session::ActiveSession;
use galaxyui::EntityId;
#[derive(Debug, Clone)]
pub enum InlineSkillSelectorEvent {