Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though

This commit is contained in:
Ryan Ward
2026-05-07 11:29:34 -05:00
parent f4e2475c60
commit a41cbd8cc7
2433 changed files with 14208 additions and 9409 deletions
+5 -5
View File
@@ -17,9 +17,9 @@ use serde::Serialize;
use std::path::Path;
use std::pin::Pin;
use std::sync::Arc;
use warp_core::channel::ChannelState;
use warp_core::execution_mode::AppExecutionMode;
use warp_core::features::FeatureFlag;
use galaxy_core::channel::ChannelState;
use galaxy_core::execution_mode::AppExecutionMode;
use galaxy_core::features::FeatureFlag;
use crate::ai::agent::conversation::AIConversationId;
use crate::ai::ambient_agents::AmbientAgentTaskId;
@@ -35,8 +35,8 @@ use crate::ai::mcp::TemplatableMCPServerManager;
use crate::settings::AISettings;
use crate::terminal::safe_mode_settings::get_secret_obfuscation_mode;
use crate::workspaces::user_workspaces::UserWorkspaces;
use warp_core::user_preferences::GetUserPreferences;
use warpui::{AppContext, EntityId, SingletonEntity as _};
use galaxy_core::user_preferences::GetUserPreferences;
use galaxyui::{AppContext, EntityId, SingletonEntity as _};
/// Unique, server-generated conversation-scoped token to be roundtripped to the API when sending
/// requests that follow-up within a given conversation.
+1 -1
View File
@@ -42,7 +42,7 @@ use chrono::{DateTime, Local, TimeZone};
use persistence::model::AgentConversationData;
use std::collections::{HashMap, HashSet};
use std::sync::Arc;
use warp_core::command::ExitCode;
use galaxy_core::command::ExitCode;
use warp_multi_agent_api as api;
use warp_multi_agent_api::ask_user_question_result::answer_item::Answer as AskUserQuestionAnswer;
+1 -1
View File
@@ -26,7 +26,7 @@ use ai::agent::convert::ToolToAIAgentActionError;
use ai::agent::UnknownCitationTypeError;
use ai::skills::SkillReference;
use api::ask_user_question::question::QuestionType;
use warp_core::channel::ChannelState;
use galaxy_core::channel::ChannelState;
use warp_multi_agent_api as api;
use crate::ai::agent::{AIAgentAttachment, UserQueryMode};
+1 -1
View File
@@ -3,7 +3,7 @@ use crate::ai::agent::{
AIAgentActionResult, AIAgentActionResultType, TransferShellCommandControlToUserResult,
};
use crate::terminal::model::block::BlockId;
use warp_core::command::ExitCode;
use galaxy_core::command::ExitCode;
use warp_multi_agent_api as api;
#[test]
+70 -2
View File
@@ -2,10 +2,11 @@ use std::{collections::HashMap, sync::Arc};
use crate::{ai::agent::redaction, terminal::model::session::SessionType};
use futures_util::StreamExt;
use warp_core::features::FeatureFlag;
use galaxy_core::features::FeatureFlag;
use warp_multi_agent_api as api;
use crate::ai::bedrock::client::{BedrockClient, BedrockClientConfig};
use crate::ai::bedrock::diagnostic::BedrockDiagnosticLogger;
use crate::server::server_api::ServerApi;
use super::{convert_to::convert_input, ConvertToAPITypeError, RequestParams, ResponseStream};
@@ -141,7 +142,9 @@ pub async fn generate_multi_agent_output(
let is_arn = model_id_for_fallback_check.starts_with("arn:");
let fallback_to_warp = config.fallback_to_warp && !is_arn;
if is_arn && config.fallback_to_warp {
log::info!("[bedrock] Fallback disabled for ARN-based model (not available on Warp server)");
log::info!(
"[bedrock] Fallback disabled for ARN-based model (not available on Warp server)"
);
}
match BedrockClient::from_config(config).await {
Ok(bedrock) => {
@@ -156,6 +159,14 @@ pub async fn generate_multi_agent_output(
log::info!("[bedrock] Starting stream with task_id={task_id}");
let needs_create_task = request
.task_context
.as_ref()
.map(|tc| tc.tasks.is_empty())
.unwrap_or(true);
log::info!("[bedrock] needs_create_task={needs_create_task}");
let model_id = request
.settings
.as_ref()
@@ -165,6 +176,13 @@ pub async fn generate_multi_agent_output(
log::info!("[bedrock] Model: {model_id}");
let diagnostic_logger =
BedrockDiagnosticLogger::try_new(&model_id, "", "", &task_id).map(Arc::new);
if let Some(ref logger) = diagnostic_logger {
logger.log_protobuf_input(&request);
}
let messages =
crate::ai::bedrock::convert_request::extract_messages_from_request(&request);
let system_prompt =
@@ -178,16 +196,66 @@ pub async fn generate_multi_agent_output(
tools.len()
);
for (i, msg) in messages.iter().enumerate() {
let content_desc = match &msg.content {
crate::ai::bedrock::convert::MessageContent::Text(t) => {
format!("Text({}chars)", t.len())
}
crate::ai::bedrock::convert::MessageContent::ToolUse {
tool_use_id,
name,
..
} => {
format!("ToolUse(name={}, id={})", name, tool_use_id)
}
crate::ai::bedrock::convert::MessageContent::ToolResult {
tool_use_id,
is_error,
..
} => {
format!("ToolResult(id={}, is_error={})", tool_use_id, is_error)
}
crate::ai::bedrock::convert::MessageContent::MultiPart(parts) => {
let part_descs: Vec<String> = parts
.iter()
.map(|p| match p {
crate::ai::bedrock::convert::ContentPart::Text(t) => {
format!("Text({})", t.len())
}
crate::ai::bedrock::convert::ContentPart::ToolUse {
name,
tool_use_id,
..
} => format!("ToolUse({},{})", name, tool_use_id),
crate::ai::bedrock::convert::ContentPart::ToolResult {
tool_use_id,
..
} => format!("ToolResult({})", tool_use_id),
})
.collect();
format!("MultiPart[{}]", part_descs.join(", "))
}
};
log::debug!(
"[bedrock] msg[{}]: role={:?}, content={}",
i,
msg.role,
content_desc
);
}
match bedrock
.converse_stream(
&model_id,
&task_id,
needs_create_task,
messages,
system_prompt,
tools,
8192,
None,
true,
diagnostic_logger,
)
.await
{
+1 -1
View File
@@ -1,7 +1,7 @@
use crate::ai::agent::api::RequestParams;
use crate::ai::blocklist::SessionContext;
use crate::ai::llms::LLMId;
use warp_core::features::FeatureFlag;
use galaxy_core::features::FeatureFlag;
use warp_multi_agent_api as api;
use super::get_supported_tools;
+10 -10
View File
@@ -26,17 +26,17 @@ use std::{collections::HashMap, fmt::Display};
use super::task_store::TaskStore;
use uuid::Uuid;
use vec1::{Size0Error, Vec1};
use warp_core::command::ExitCode;
use warp_core::execution_mode::AppExecutionMode;
use warp_core::features::FeatureFlag;
use warp_core::send_telemetry_from_ctx;
use warp_core::ui::appearance::Appearance;
use warp_core::ui::theme::color::internal_colors;
use warp_core::ui::theme::WarpTheme;
use galaxy_core::command::ExitCode;
use galaxy_core::execution_mode::AppExecutionMode;
use galaxy_core::features::FeatureFlag;
use galaxy_core::send_telemetry_from_ctx;
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::color::internal_colors;
use galaxy_core::ui::theme::WarpTheme;
use warp_multi_agent_api::response_event::stream_finished;
use warp_multi_agent_api::{self as api, response_event::stream_finished::TokenUsage};
use warpui::color::ColorU;
use warpui::{EntityId, ModelContext, SingletonEntity};
use galaxyui::color::ColorU;
use galaxyui::{EntityId, ModelContext, SingletonEntity};
use crate::ai::agent::{AIIdentifiers, CancellationReason};
use crate::{
@@ -3683,7 +3683,7 @@ impl std::fmt::Display for ConversationStatus {
}
impl ConversationStatus {
pub fn render_icon(&self, appearance: &Appearance) -> warpui::elements::Icon {
pub fn render_icon(&self, appearance: &Appearance) -> galaxyui::elements::Icon {
match self {
ConversationStatus::InProgress => in_progress_icon(appearance),
ConversationStatus::Success => succeeded_icon(appearance),
+1 -1
View File
@@ -5,7 +5,7 @@ use super::{
};
use crate::ai::artifacts::Artifact;
use crate::persistence::model::AgentConversationData;
use warp_core::features::FeatureFlag;
use galaxy_core::features::FeatureFlag;
use warp_multi_agent_api as api;
fn restored_conversation(conversation_data: Option<AgentConversationData>) -> AIConversation {
+25 -25
View File
@@ -1,90 +1,90 @@
use warp_core::ui::{appearance::Appearance, theme::AnsiColorIdentifier};
use galaxy_core::ui::{appearance::Appearance, theme::AnsiColorIdentifier};
use crate::ui_components::{blended_colors, icons::Icon};
pub fn todo_list_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn todo_list_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::BulletedListBlock.into(),
blended_colors::neutral_7(appearance.theme()),
)
}
pub fn pending_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn pending_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::Queued.into(),
blended_colors::neutral_5(appearance.theme()),
)
}
pub fn in_progress_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn in_progress_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::Circle.into(),
AnsiColorIdentifier::Magenta.to_ansi_color(&appearance.theme().terminal_colors().normal),
)
}
pub fn succeeded_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn succeeded_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::Check.into(),
AnsiColorIdentifier::Green.to_ansi_color(&appearance.theme().terminal_colors().normal),
)
}
pub fn addressed_comment_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn addressed_comment_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::AddressedComment.into(),
AnsiColorIdentifier::Green.to_ansi_color(&appearance.theme().terminal_colors().normal),
)
}
pub fn failed_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn failed_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::Triangle.into(),
AnsiColorIdentifier::Red.to_ansi_color(&appearance.theme().terminal_colors().normal),
)
}
/// Not running, does not need user's attention
pub fn gray_stop_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn gray_stop_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::StopFilled.into(),
blended_colors::neutral_5(appearance.theme()),
)
}
/// Agent is waiting for user to follow-up with next prompt.
pub fn gray_clock_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn gray_clock_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::ClockSnooze.into(),
blended_colors::neutral_5(appearance.theme()),
)
}
/// Loading but not actionable yet.
pub fn gray_circle_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn gray_circle_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::Circle.into(),
blended_colors::neutral_5(appearance.theme()),
)
}
/// Not running, requires user's attention
pub fn yellow_stop_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn yellow_stop_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::StopFilled.into(),
AnsiColorIdentifier::Yellow.to_ansi_color(&appearance.theme().terminal_colors().normal),
)
}
/// To be used for actions (like running commands/reading files) that are long-running and executing.
pub fn yellow_running_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(
pub fn yellow_running_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(
Icon::Circle.into(),
AnsiColorIdentifier::Yellow.to_ansi_color(&appearance.theme().terminal_colors().normal),
)
}
/// Used for buttons that stop the current task
pub fn red_stop_icon(appearance: &Appearance) -> warpui::elements::Icon {
warpui::elements::Icon::new(Icon::StopFilled.into(), appearance.theme().ansi_fg_red())
pub fn red_stop_icon(appearance: &Appearance) -> galaxyui::elements::Icon {
galaxyui::elements::Icon::new(Icon::StopFilled.into(), appearance.theme().ansi_fg_red())
}
+2 -2
View File
@@ -14,7 +14,7 @@ pub(super) mod util;
// Re-export types that were moved to the ai crate.
pub use ai::agent::{action::*, action_result::*, AIAgentCitation, FileLocations};
use warp_core::features::FeatureFlag;
use galaxy_core::features::FeatureFlag;
#[cfg(test)]
mod suggestion_test;
@@ -33,7 +33,7 @@ use comment::ReviewComment;
use task::TaskId;
pub use telemetry::AIIdentifiers;
use warp_editor::render::model::LineCount;
use galaxy_editor::render::model::LineCount;
use parking_lot::RwLock;
use std::collections::{HashMap, HashSet};
+1 -1
View File
@@ -1,5 +1,5 @@
use serde::Serialize;
use warpui::{AppContext, SingletonEntity};
use galaxyui::{AppContext, SingletonEntity};
use crate::ai::llms::LLMId;
use crate::CloudModel;
+12 -12
View File
@@ -1,15 +1,15 @@
use crate::ai::blocklist::{BlocklistAIContextEvent, BlocklistAIContextModel};
use pathfinder_color::ColorU;
use warp_core::ui::appearance::Appearance;
use warp_core::ui::theme::Fill;
use warpui::elements::{
use galaxy_core::ui::appearance::Appearance;
use galaxy_core::ui::theme::Fill;
use galaxyui::elements::{
ClippedScrollStateHandle, ClippedScrollable, Dismiss, Empty, Expanded, ParentElement,
SavePosition, ScrollTarget, ScrollToPositionMode, ScrollbarWidth, Shrinkable,
};
use warpui::fonts::FamilyId;
use warpui::ModelHandle;
use warpui::SingletonEntity;
use warpui::{
use galaxyui::fonts::FamilyId;
use galaxyui::ModelHandle;
use galaxyui::SingletonEntity;
use galaxyui::{
elements::{
Border, ConstrainedBox, Container, CornerRadius, CrossAxisAlignment, DropShadow, Flex,
MainAxisSize, Radius, Text,
@@ -50,7 +50,7 @@ struct Styles {
}
pub fn init(app: &mut AppContext) {
use warpui::keymap::macros::*;
use galaxyui::keymap::macros::*;
app.register_fixed_bindings([FixedBinding::new(
"escape",
@@ -124,9 +124,9 @@ impl AgentTodosPopupView {
fn render_header(
&self,
app: &warpui::AppContext,
app: &galaxyui::AppContext,
todo_list: &AIAgentTodoList,
) -> Box<dyn warpui::Element> {
) -> Box<dyn galaxyui::Element> {
let appearance = Appearance::as_ref(app);
let styles = self.styles(appearance);
let theme = appearance.theme();
@@ -159,7 +159,7 @@ impl View for AgentTodosPopupView {
"AgentTodosPopup"
}
fn render(&self, app: &warpui::AppContext) -> Box<dyn warpui::Element> {
fn render(&self, app: &galaxyui::AppContext) -> Box<dyn galaxyui::Element> {
let Some(todo_list) = self
.ai_context_model
.as_ref(app)
@@ -271,7 +271,7 @@ impl View for AgentTodosPopupView {
ScrollbarWidth::Auto,
theme.nonactive_ui_detail().into(),
theme.active_ui_detail().into(),
warpui::elements::Fill::None,
galaxyui::elements::Fill::None,
)
.with_overlayed_scrollbar()
.finish();
+2 -2
View File
@@ -13,7 +13,7 @@ use markdown_parser::{
use mermaid_to_svg::is_mermaid_diagram;
use regex::Regex;
use std::{collections::HashMap, path::PathBuf};
use warp_util::path::LineAndColumnArg;
use galaxy_util::path::LineAndColumnArg;
lazy_static! {
/// Markdown prefix for code blocks. Matches on triple backticks followed by a language.
@@ -258,7 +258,7 @@ fn image_section(image: FormattedImage, layout: AgentOutputImageLayout) -> AIAge
}
fn markdown_source_for_image(image: &FormattedImage) -> String {
warp_editor::content::text::format_image_markdown(
galaxy_editor::content::text::format_image_markdown(
&image.alt_text,
&image.source,
image.title.as_deref(),