Commit Graph
100 Commits
Author SHA1 Message Date
Ryan Ward 11c466c26d Prevent provider follow-up setup panics 2026-08-19 11:11:28 -05:00
Ryan Ward 87080c8086 Fixing followup after termination of agent turn 2026-08-18 17:20:13 -05:00
Ryan Ward 0ffd1181d1 Fix agent cancellation and monitor UI 2026-08-18 16:22:05 -05:00
Ryan Ward 6eb145a1b4 Keep requested-command terminal block hidden on collapse
Requested-command output is rendered by the inline pane whenever it is
expanded. Keep the backing terminal block hidden in both states so
collapsing the pane does not move the output to the bottom of the
conversation.
2026-08-18 13:19:05 -05:00
Ryan Ward dec90208a4 Improve CLI command inline pane and monitoring behavior
- Track user-initiated expansion state to avoid auto-collapse conflicts
- Invert inline action visibility so terminal block hides while inline pane owns the expanded body
- Add scrollable output rendering in requested command expanded view
- Simplify CLI monitor nudge message and extract to reusable method
- Show only latest user query and assistant text in monitor task transcript
- Add handle_ctrl_c_for_conversation to status bar for child agent cancellation
- Update rig_request tests for adjusted monitor nudge wording
2026-08-18 13:06:30 -05:00
Ryan Ward a93b80adb4 Merge branch 'dev/rig-migration' of gitlab.com:samnasbo/shared/galaxy 2026-08-18 11:30:18 -05:00
Ryan Ward 2850c2524d v3.0.0 - Rig migration complete 2026-08-18 11:14:15 -05:00
Ryan Ward a203d359bf Rig setup 2026-08-18 01:40:11 -05:00
Ryan Ward 56e3b51d48 Lots of changes... not done yet. 2026-08-17 18:19:37 -05:00
Ryan Ward 10412c4c6f Implement browser OAuth for ChatGPT subscriptions
Update app branding and OAuth callback handling, remove legacy Samsung
theme aliases, prune unavailable ChatGPT models, and delete cost data.
2026-08-10 17:26:47 -05:00
Ryan Ward 06741b68f2 Prevent crosscheck races with pending AI work 2026-07-31 17:43:48 -05:00
Ryan Ward d9cf0d8ae3 Fix agent run completion and follow-up handling
Ensure parallel tool results finish before follow-ups, preserve warping
status across exchanges, clean up streams before crosscheck reviews, and
restore terminal focus when conversations complete. Remove temporary
debug
logging.
2026-07-31 16:33:08 -05:00
Ryan Ward 7f4891ec7c First attempt to add ACP support 2026-07-31 11:09:32 -05:00
Ryan Ward 1a0aac51b6 Document process monitoring handoff
Add ACP discovery and configuration support
2026-07-30 11:53:33 -05:00
Ryan Ward 100f1eff1c Actively monitor long-running shell processes 2026-07-28 21:54:33 -05:00
Ryan Ward 5c14241b91 Auto-monitor long-running commands with agent 2026-07-28 17:11:34 -05:00
Ryan Ward b75aa00fb0 Add long-running command side-agent plan 2026-07-28 14:48:03 -05:00
Ryan Ward f70c828483 Bump version to 2.1.0 and update about page 2026-07-28 11:59:08 -05:00
Ryan Ward 5a8a35926e Classify provider budget errors as quota limits 2026-07-28 11:01:07 -05:00
Ryan Ward 87e0c83e9e Remove Grok OAuth and legacy BYOK support 2026-07-28 02:30:22 -05:00
Ryan Ward 2faeed7ac5 Merge branch 'experiment/cross-check' of gitlab.com:samnasbo/shared/galaxy 2026-07-27 11:41:45 -05:00
Ryan Ward 309000a303 Checking in progress, though not fully working as expected 2026-07-27 11:41:20 -05:00
Ryan Ward cc49d36c79 Update macOS menu handling 2026-07-23 13:34:00 -05:00
Ryan Ward 1650c8713c Merge branch 'master' of gitlab.com:samnasbo/shared/galaxy into experiment/cross-check
# Conflicts:
#	app/src/settings_view/mod.rs
2026-07-23 13:17:04 -05:00
Ryan Ward 856a6cd6f3 Remove Warp cloud features and OpenTelemetry
Settings cleanup:
- Remove billing_and_usage, main_page, referrals_page, show_blocks_view,
  environments_page, handoff_environment_creation_modal,
  custom_inference_modal, remove_custom_endpoint_confirmation_dialog,
  transfer_ownership_confirmation_modal, delete_environment_confirmation_dialog
- Remove SettingsSection variants: Account, BillingAndUsage, Referrals,
  SharedBlocks, CloudEnvironments, OzCloudAPIKeys
- Remove SettingsPageViewHandle variants: Main, BillingAndUsage, Referrals,
  CloudEnvironments, OzCloudAPIKeys, SharedBlocks
- Add Platform variant for PlatformPageView
- Gut custom inference endpoint UI from ai_page.rs
- Gut transfer ownership modal from teams_page.rs
- Stub environment_management_pane as dead code
- Remove create_discount_badge usage
- Remove handle_experiment_change call

OpenTelemetry removal:
- Remove opentelemetry, opentelemetry-http, opentelemetry-otlp,
  opentelemetry_sdk, tracing-opentelemetry dependencies
- Replace tracing module with no-op stub
- Delete native.rs and cloud_agent_auth.rs

Bug fixes (prior work):
- Fix apply_diffs() to use markdown_unescaped(ctx)
- Fix notebook executor AIDocumentId handling
- Fix margin/corner-radius consistency in requested_command.rs
- Add document tool handlers to extract_tool_result_content()
- Fix deprecated from_byte_stream in MCP SSE transport
- Fix Cargo.toml profile package spec
- Upgrade rust-toolchain to 1.94.1
2026-07-23 11:14:49 -05:00
Ryan Ward e5062ae432 feat: implement Crosscheck Work experiment
Add the 'Crosscheck Work' experiment to the Agents settings. When enabled,
a reviewer sub-agent is spawned after the main agent finishes a turn (with
no pending tool calls). The reviewer critiques the output using a dedicated
system prompt focused on correctness, simplicity, and code quality. If the
reviewer does not respond with 'LGTM!', its feedback is injected as a
synthetic user query back to the main agent, which must address it. This
loop continues until the reviewer approves or max iterations is reached.

Components:
- Feature flag: CrosscheckWork (enabled in DOGFOOD_FLAGS)
- Settings: agents.experiments.crosscheck_enabled,
  agents.experiments.crosscheck_model_id,
  agents.experiments.crosscheck_max_iterations
- Settings UI: new 'Experiments' subpage under Agents
- Crosscheck module: app/src/ai/crosscheck/ with prompt, reviewer model
- Controller integration: hooks into AfterStreamFinished when no actions
  are queued, triggers reviewer, handles feedback injection
- Provider support: OpenAI-compatible and Bedrock direct invocation
- Safety: max iteration guard, error handling, reset on new user query
2026-07-22 15:58:55 -05:00
Ryan Ward ca2cf6f8d6 Fix OpenAI/LiteLLM provider: sanitize tool IDs, parse cache stats, hide empty cache UI
- Sanitize tool_use_id values in OpenAI request conversion to match
  Bedrock's required pattern ^[a-zA-Z0-9_-]+$. Fixes 400 errors when
  LiteLLM proxies to Bedrock and tool IDs contain invalid characters.

- Parse cache usage stats from LiteLLM/OpenAI responses
  (prompt_tokens_details.cached_tokens, cache_read_input_tokens,
  cache_creation_input_tokens) and propagate to token usage tracking.

- Hide cache-o-meter in session status bar when provider doesn't report
  cache data (LiteLLM/OpenAI), instead of showing misleading 0% stats.

- Update cost estimation to account for cache read/write pricing tiers.
2026-07-20 13:36:11 -05:00
Ryan Ward 1cc4ede83f Improve macOS Galaxy installer 2026-07-20 10:56:08 -05:00
Ryan Ward 4aa2c0d685 fix: resolve TypeScript LSP initialization failure
typescript-language-server requires a valid TypeScript installation to
function. Previously, no initializationOptions were sent during the LSP
initialize request, causing the server to fail with:

  'Could not find a valid TypeScript installation. Please ensure that
  the typescript dependency is installed in the workspace or that a
  valid tsserver.path is specified.'

This fix:
- Adds initializationOptions.tsserver.path resolution that searches for
  TypeScript in: workspace node_modules, global npm install, and npx cache
- Wires initialization_options into the LSP startup flow via LSPServerType
- Updates the install step to proactively install TypeScript globally if
  not found locally
2026-07-16 16:58:47 -05:00
Ryan Ward 0db915712f fix: handle InvokeSkill in request_translator to prevent empty message error
When a skill was invoked on a clean slate (no conversation history),
the request sent to the AI provider contained only a system prompt
with zero user messages, causing Bedrock/LiteLLM to reject it with:
'Invalid Message bedrock requires at least one non-system message'

Root cause: extract_new_input_messages() had no handler for
Type::InvokeSkill, so it fell through to the _ => {} wildcard and
produced zero ConversationMessage results.

Fix adds InvokeSkill handling to three functions:
- extract_new_input_messages(): generates a User message with the
  skill name and content wrapped in <skill-instructions> tags
- extract_input_messages(): persists the InvokeSkill as a proper
  api::Message in task history for conversation continuity
- extract_user_query_text(): returns '/<skill-name>' for the
  UserQuery proto event used in conversation title generation
2026-07-16 12:59:51 -05:00
Ryan Ward 3d2d90fd4e feat: inject global rules into AI system prompt and fix Rules UI seeding
- Load global rules (AIFact/AIMemory) from local CloudModel and inject
  them into the Bedrock/OpenAI system prompt as a '## Global Rules' section
  when memory is enabled.
- Fix rule seeding: always re-seed predefined rules when the CloudModel has
  none, regardless of the has_seeded_predefined_rules flag (handles case
  where flag was set but rules never persisted due to prior missing owner).
- Rename /context slash command to /copy-context: dumps the full context
  window (global rules, progressive summary, message history) to the
  clipboard for debugging.
2026-07-16 12:25:56 -05:00
Ryan Ward 66ef451115 Seed predefined rules at startup without requiring Warp auth
Previously, predefined rules (11 system-defined behavioral rules) were
only seeded when the user navigated to the Rules settings page, and
required a cloud-authenticated owner to create cloud objects.

Since Galaxy operates without Warp cloud auth:
1. personal_drive() now returns a synthetic local owner
   ('local-galaxy-user') when not authenticated, allowing cloud objects
   (rules, etc.) to be created and stored locally in SQLite.
2. seed_predefined_rules_if_needed() runs at app startup (after
   CloudModel and UpdateManager are initialized) to seed rules on
   first launch without requiring the user to visit settings.

Rules are now visible in Galaxy Drive > Rules on first launch.
2026-07-16 10:56:22 -05:00
Ryan Ward 5a5977d35d Use LiteLLM /model/info for accurate model metadata discovery
The previous implementation only used the standard OpenAI /models
endpoint which often lacks context window and capability metadata,
causing a blind 200K fallback for all models.

Now fetch_openai_models_from_endpoint tries LiteLLM's /model/info
endpoint first, which returns rich metadata:
- max_input_tokens (e.g. 1,000,000 for Sonnet 4.6)
- max_output_tokens (e.g. 128,000 for max models)
- supports_vision
- supports_function_calling
- underlying model path (for provider detection)

Falls back to /models if /model/info is unavailable (e.g. non-LiteLLM
OpenAI-compatible endpoints).

This ensures the model picker and context window configuration reflect
the actual capabilities of the configured models.
2026-07-16 10:42:19 -05:00
Ryan Ward f1c289fe85 Remove all Warp server AI model fetching — use only local providers
Galaxy should never call Warp's cloud API for AI. This is a policy
requirement. All model availability is now determined exclusively by
locally configured providers (Bedrock and/or OpenAI/LiteLLM).

Changes:
- Disable refresh_authed_models, refresh_public_models, refresh_available_models
  (now no-ops with debug log)
- Disable on_server_update and update_feature_model_choices
- Disable get_cached_models (no stale server models restored from cache)
- Replace ModelsByFeature::default() with minimal placeholder that gets
  stripped by inject_bedrock_models/inject_openai_models
- Make inject_bedrock_models strip Unknown placeholders unconditionally
- Make default_llm_info() return a static fallback instead of panicking
  when no models are configured (prevents null reference crashes)
- Add has_any_provider_models() for UI to check provider availability
- Make ProviderConfig::None return a user-friendly error instead of
  calling Warp's cloud API (the previous fallback behavior)

Safety: if no providers are enabled, the system gracefully returns an
error message rather than crashing or silently calling Warp's servers.
2026-07-16 10:26:24 -05:00
Ryan Ward 345057a147 Fix: Ensure OpenAI requests end with user message for Bedrock/LiteLLM compatibility
When LiteLLM routes OpenAI-format requests to AWS Bedrock, the provider
rejects conversations ending with an assistant message with:
'This model does not support assistant message prefill.'

Add ensure_ends_with_user_message() as the final sanitization step in
sanitize_messages_for_openai(). If the conversation ends with an assistant
message, a minimal 'Continue.' user message is appended.

Updated tests to reflect the new behavior and added dedicated tests for
the new function.
2026-07-16 09:55:38 -05:00
Ryan Ward 5a2e3acb31 Rename pull_warp_feature skill to update-galaxy-with-latest-warp
Rewrote the skill from a single-feature porting tool into a full upstream
merge workflow that:
- Fetches and merges latest warp/master
- Resolves conflicts preserving Galaxy's AI providers (Bedrock/OpenAI-LiteLLM)
- Strips any Warp API/auth/telemetry additions
- Iteratively repairs the build until cargo build succeeds
- Runs clippy/format/leak checks before committing
2026-07-15 16:41:40 -05:00
Ryan Ward e9a9a4c30f Bump version to 2.0.0 and upload install-galaxy.sh in deploy script
- Update version from 1.6.3 to 2.0.0 in app/Cargo.toml and Cargo.lock
- Add install-galaxy.sh upload step to build-and-deploy-hermes script
- Include pending AI provider and agent changes
2026-07-15 16:17:13 -05:00
Ryan Ward 40bd86f662 Adding logging when we crash in bedrock, adding open AI request translator changes and AI page settings cleanup 2026-07-08 15:19:51 -05:00
Ryan Ward 4770ac06b5 first pass of merging in warp (doesn't build) 2026-07-01 16:08:58 -05:00
Ryan Ward 2f64909469 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
2026-07-01 14:30:04 -05:00
Ryan WardandClaude Opus 4.6 57c843d1de Fix CLI subagent task routing, Ctrl+C cancellation, and session restore reliability
- Construct ServerTask directly for Bedrock CLI subagents so messages route
  correctly without needing a server CreateTask upgrade
- Handle CliAgentUserQuery input type in both request translators, including
  running command context and terminal output
- Add force_cancel_all_streaming_exchanges fallback for when Ctrl+C finds no
  in-flight streams (stuck subagent / unexpected stream end)
- Cancel active conversation on Ctrl+C in agent view compose state
- Skip agent view entry when agent is tagged-in for a running command
- Set root_task_id on Bedrock requests for proper optimistic task upgrade
- Persist app state on will_terminate to avoid losing sessions
- Trust persisted CWD without is_dir() recheck (fixes network mount restore)
- Log warning instead of silently dropping tabs with unreadable root nodes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-25 08:43:10 -05:00
Ryan Ward 148c97eab1 Fix View Options popup not responding to clicks
Remove duplicate popup rendering from render_vertical_tabs_panel.
The popup was rendered both inside the panel's stack AND at the
workspace level in a Dismiss overlay, causing event dispatch conflicts
due to shared MouseStateHandle instances between the two identical
popup trees.
2026-06-23 15:28:59 -05:00
Ryan Ward 5ea378a38d Add OpenAI/LiteLLM provider support with settings UI
- Add openai/ provider module with translator, client, convert, request/response translators
- Add shared provider/ types (ConversationMessage, MessageRole, ProviderConfig enum)
- Wire OpenAI-compatible provider dispatch alongside Bedrock in response_stream.rs
- Add ai.openai.* settings (enabled, base_url, api_key, model, models)
- Add OpenAI/LiteLLM settings page with model fetch, picker, and config UI
- Extend model menu items and llms.rs to surface LiteLLM models
- Update WARP.md with OpenAI provider architecture docs
2026-06-17 14:14:40 -05:00
Ryan WardandClaude Opus 4.6 59cfd0e2f5 Bump version to 1.6.3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-12 14:17:06 -05:00
Ryan Ward 4ba9706e35 Bump version to 1.6.2 2026-06-04 16:07:24 -05:00
Ryan WardandClaude Opus 4.6 840bc4d244 Bump version to 1.6.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 09:57:18 -05:00
Ryan WardandClaude Opus 4.6 a309006458 Implement local sub-agent execution for OSS/Bedrock mode
- Fix start_agent tool mapping: route to Tool::StartAgent instead of
  dead-end Tool::Subagent so tool calls become executable actions
- Block start_agent until child finishes: parent waits for child
  conversation to complete and receives full output as tool result
- Fix tool result delivery: add StartAgent/StartAgentV2 cases to
  extract_tool_result_content so the model actually sees agent output
- Support parallel agent spawning: change StartAgent action phase from
  Serial to Parallel, and track multiple pending agents via Vec
- Mark child conversations as Success on EndTurn: emit
  ConversationStatus::Success when a child stream ends with no actions
- Skip orchestration SSE in local mode: prevent app freeze from trying
  to connect to non-existent server
- Remove send_message_to_agent and suggest_next_prompt from tool list:
  these require server infrastructure that doesn't exist in OSS mode
- Add "Waiting for sub-agents..." status message while agents process
- Fix child agent pane close: actually dismiss instead of re-hiding,
  track dismissed IDs to prevent re-creation on restart
- Fix cache_miss_tokens calculation and show per-block cache stats
- Add [tool-debug] logging throughout tool invocation pipeline

Bump version to 1.6.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 13:29:09 -05:00
Ryan WardandClaude Opus 4.6 17ecf67970 Enable DOGFOOD_FLAGS for OSS and add fix-it suggestion for failed commands
Two changes addressing agent context visibility and error recovery:

1. Enable DOGFOOD_FLAGS in oss.rs — this activates AgentViewBlockContext,
   which auto-attaches user-executed command output (stdout/stderr/exit code)
   to the AI conversation context. Previously the LLM was blind to any
   commands the user ran via `!` prefix in agent view.

2. Add instant "Fix this error" prompt suggestion when a user-run command
   fails (non-zero exit) in agent view. This lets users hand off errors to
   the agent with one click instead of manually copy-pasting output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 01:47:36 -05:00
Ryan WardandClaude Opus 4.6 9e11c91a6e Replace per-block usage footer with persistent input status bar
Move token/cache/cost metrics from the expandable per-block usage button
into a persistent status bar rendered in the agent input area. This gives
always-visible feedback without requiring user interaction.

- Add render_session_status_bar to agent input showing context %, cache
  hit rate, and cost
- Persist cache/cost totals in ConversationUsageMetadata for session restore
- Remove render_usage_button, ToggleIsUsageFooterExpanded action, and
  UsageFooterToggled event
- Remove "Request tokens: --" debug block footer overlay
- Fix has_footer() to return false so blocks no longer reserve phantom
  footer space (root cause of padding/margin issue)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 00:17:34 -05:00
Ryan WardandClaude Opus 4.6 259244863b Suppress dead_code and unused_imports warnings in prompt_builder module
Module is scaffolded but not yet wired into callers — allow dead code
at the module level until integration is complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-01 15:56:23 -05:00
Ryan WardandClaude Opus 4.6 a3eb0fca0c Merge resolve: add prompt_builder, compact_summary support, and caching config
Resolves merge conflicts integrating compact_summary parameter into
build_converse_request alongside the existing CachingConfig approach.
Adds the new prompt_builder module for structured prompt construction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-01 15:34:37 -05:00
Ryan Ward 54e4e8abf5 Additional cleanup of caching 2026-06-01 15:21:03 -05:00
Ryan Ward 7f039d2c08 Applying additional cache fixes 2026-06-01 13:02:22 -05:00
Ryan WardandClaude Opus 4.6 8c0a2d67cb Bump version to 1.5.6
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 16:03:44 -05:00
Ryan WardandClaude Opus 4.6 6792039df4 Bump version to 1.5.5
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 12:38:56 -05:00
Ryan WardandClaude Opus 4.6 34ac95bbd0 Bump version to 1.5.4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 11:03:56 -05:00
Ryan WardandClaude Opus 4.6 d9bdafed0a v1.5.4: Remove unused feature flags and oz-platform skill
Remove cloud/sharing feature flags (viewing_shared_sessions, shared_with_me,
session_sharing_acls, shared_block_title_generation, agent_shared_sessions,
cloud_environments, cloud_conversations, etc.) and classic_completions flags.
Remove oz-platform skill. Update blocklist views and drive index.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 11:02:41 -05:00
Ryan WardandClaude Opus 4.6 a15b817a4f v1.5.3: Add diff summary titles and is_error propagation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:44:17 -05:00
Ryan WardandClaude Opus 4.6 8e2fce08aa Add summary/title to apply_file_diffs tool and propagate is_error on tool results
The apply_file_diffs tool now includes a required "summary" field so the
model provides a brief description of edits. This surfaces as the title
on the diff panel instead of showing only +/- line counts.

Also propagates is_error from tool result content back to the model so it
can distinguish failed tool calls from successful ones.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-27 11:29:50 -05:00
Ryan WardandClaude Opus 4.6 a0568508ea v1.5.1: Remove dead code and fix all build warnings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 15:04:59 -05:00
Ryan WardandClaude Opus 4.6 f278e53b7e v1.5.0: Inline subagent panels, Bedrock compaction fixes, context window debug view
New features:
- Inline subagent panels with expand/collapse and click-to-toggle
- /context slash command to inspect bedrock_message_history
- Child-to-parent question routing with auto-answer for subagents
- Subagent token usage and cost merging into parent conversation
- Randomized session-colored user avatar silhouettes

Bug fixes:
- Bedrock: remove orphaned tool_results after compaction
- Bedrock: self-healing exchange lookup for out-of-order streaming
- Bedrock: append continuation prompt when conversation ends with assistant
- Duration sanity check rejects epoch-time artifacts from session restore
- Cache hit rate calculation uses actual total_input_tokens
- Hide "Time to first token" when value is zero

Improvements:
- Demote verbose bedrock-debug logs to debug/trace levels
- Bedrock tool usage counting falls back to action counting
- Remove logout menu item from workspace menu

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 14:30:04 -05:00
Ryan WardandClaude Opus 4.6 6f54e2cb30 v1.4.0: Auto-compact streaming, Bedrock summarization support, subagent orchestration, and Galaxy rebrand continuation
Major features:
- Auto-compact: triggers conversation summarization when context window >= 85%,
  compacts Bedrock message history to a summary pair, and tracks live context tokens
- Bedrock summarization: plumbs `is_summarization` flag through translator/client/response
  pipeline, handles SummarizeConversation input type, and marks `summarized` in metadata
- Session restore: rebuilds bedrock_message_history from persisted task messages via
  newly-public `convert_proto_message`, preventing empty history on reconnect
- Subagent orchestration: adds SubagentQuestion/Answer/CompletionSummary event types,
  parent-child question routing with depth limits, retry counting, and drain methods
- Summarization UI: inline SummarizationView in AI blocks with progress/finished states

Refactors:
- Rename WarpTheme → GalaxyTheme across ~100 files (rebrand continuation)
- Rename warp_home_config_dir → galaxy_home_config_dir and related path functions
- Predefined rules: replace "System Defined Rule #N" with descriptive names
  (e.g. "Correctness Over Speed", "Never Guess") and add lookup helpers
- Usage view: replace cumulative input/output token display with live context tokens,
  cache hit rate calculation, and separate cache read/write stats
- Telemetry: remove verbose doc comments, simplify trait definitions
- Facts view: simplify delete permission check (always allow local deletion)
- Remove warp_managed_paths_watcher.rs (dead code)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 11:59:37 -05:00
Ryan WardandClaude Opus 4.6 eaa2ddc75e v1.3.0: Bedrock translator refactor, usage metrics, session restore fixes, and predefined rules
Major changes:

- **Bedrock translator architecture**: Extract orchestration logic from `impl.rs` into
  a dedicated `translator.rs` module. Rename `convert_request.rs` → `request_translator.rs`
  and `stream.rs` → `response_translator.rs` for clarity. Remove `tool_docs.rs` (inlined).
  Remove `fallback_to_warp` setting and server fallback path — Bedrock is now the sole backend.

- **Unknown tool handling**: The response translator now detects hallucinated/unknown tool
  calls from the model and synthesizes error tool_results so the conversation doesn't
  deadlock waiting for a result that will never come.

- **Usage display overhaul**: Replace credit-based usage display with detailed token metrics
  showing context window %, cache hit rate (read/write/miss), and estimated cost in dollars.
  Add `total_input_tokens`, `total_cache_read_tokens`, `total_cache_write_tokens`, and
  `cache_miss_tokens` accessors to `AIConversation`.

- **Predefined rules system**: Add `predefined_rules.rs` with 11 system-defined behavioral
  rules that are auto-seeded on first launch. Add "Add Predefined Rules" button to the
  Rules UI for re-adding them later. Track seeding state via `has_seeded_predefined_rules`
  setting.

- **Session restore improvements**: Rename database file from `warp.sqlite` to
  `galaxy.sqlite` with automatic migration from both same-directory and state_dir legacy
  paths. Improve CWD persistence by falling back to `session_startup_path` for agent-mode
  and fresh tabs. Add extensive session-save/restore logging.

- **Shell bootstrap rebrand**: Rename `WARP_INITIAL_WORKING_DIR` environment variable to
  `GALAXY_INITIAL_WORKING_DIR` across bash, zsh, and fish bootstrap scripts.

- **Model defaults**: Change default Bedrock model from Opus 4.7 to Opus 4.6.
  Add `context_window_for_model()` helper with model-aware context sizes.
  Remove `is_bedrock_model()` (no longer needed without server fallback).

- **User query persistence**: The response translator now emits a `UserQuery` proto message
  at stream start so the user's prompt persists across sessions for conversation titles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-20 15:15:28 -05:00
Ryan WardandClaude Opus 4.6 ec99146ccc v1.2.1: UX fixes for tool display, shell access, and session restore
- Show "File changes" label on collapsed code diff views when no title
- Reinforce shell command availability in agent system prompt
- Persist working directory for agent/viewer panes on session save
- Remove unused make_nsstring import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-19 13:29:38 -05:00
Ryan Ward 1526a7df7e fix: gate Error_*.txt snapshots behind GALAXY_BEDROCK_DIAGNOSTICS env var
Previously, Bedrock error snapshots were unconditionally written to disk
on any API or stream failure. Now they are only written when
GALAXY_BEDROCK_DIAGNOSTICS=1 is set, consistent with the rest of the
diagnostic logging.

Bumps version to 1.2.1.
2026-05-19 13:06:01 -05:00
Ryan WardandClaude Opus 4.6 53914688c0 v1.2.0: Fix app icons and DockTilePlugin rename
- Rename WarpDockTilePlugin to GalaxyDockTilePlugin
- Fix runtime icon switching to load from compiled-in assets
- Add NSDockTilePlugIn key to embedded Info.plist
- Replace all channel icons with padded Galaxy variants
- Update build.rs references for renamed plugin
- No longer requires post-bundle steps for icon switching
- Bump version to 1.2.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-19 12:39:43 -05:00
Ryan WardandClaude Opus 4.6 ccc67e6a33 Rebrand Warp to Galaxy v1.1.0
- Rename all UI-facing "Warp" references to "Galaxy"
- Rename "Warpify" to "Wormhole" throughout the UI
- Replace app icons with 5 new Galaxy-branded variants
- Update About page to show selected app icon dynamically
- Rephrase Privacy page for Bedrock context
- Remove "Fallback to Warp server" toggle from Bedrock settings
- Widen model selector dropdowns in profile editor (480px)
- Update TERM_PROGRAM to "GalaxyTerminal"
- Bump version to 1.1.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-19 11:21:44 -05:00
Ryan WardandClaude Opus 4.6 99159184cb Add LSP rename (Phase 3) and update AGENTS.md with future work
- F2 keybinding triggers prepareRename at cursor
- Shows inline text input pre-filled with current symbol name
- Enter confirms and applies workspace edits across all occurrences
- Escape cancels the rename
- Full flow: prepareRename → input → rename → apply edits
- AGENTS.md: document inline token/cache/cost stats feature idea
- AGENTS.md: document rename implementation for reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 16:44:30 -05:00
Ryan WardandClaude Opus 4.6 940c3b5dff Clean build: remove all dead code and fix warnings
- Remove unused fields (trigger_offset on Requesting, is_incomplete)
- Remove unused methods (selected_item, has_actions, is_menu_open,
  close_menu, move_selection, confirm_code_action, apply_workspace_edit)
- Remove unused import (Shrinkable in signature_help)
- Remove all #[allow(dead_code)] annotations
- Add build standards to AGENTS.md: zero warnings, zero errors required

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 16:26:17 -05:00
Ryan WardandClaude Opus 4.6 6f7d4757a2 Add signature help (Phase 4): parameter hints on function calls
- SignatureHelpState: None → Loading → Showing
- Triggers on '(' and ',' characters, dismisses on ')'
- Renders tooltip above cursor with active parameter highlighted
- Active parameter shown in warning color (bold yellow/orange)
- Includes documentation display when available from LSP
- Dismissed on Escape along with other LSP overlays

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 16:18:50 -05:00
Ryan WardandClaude Opus 4.6 331fbeeb18 Add code actions (Phase 2): quick fixes and refactorings via LSP
- CodeActionsState machine: Idle → Requesting → Available (with menu)
- 200ms debounced fetch on cursor/selection change
- Cmd+. opens the code actions menu
- Menu renders as positioned overlay with action titles and kind labels
- apply_workspace_edit helper applies LSP WorkspaceEdits to the editor
- Wired into SelectionEnd event for automatic background fetching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 16:16:34 -05:00
Ryan WardandClaude Opus 4.6 d421b9583f Wire up completion keyboard navigation and add AGENTS.md
- Tab/Enter confirms the selected completion item
- Up/Down arrows navigate the completion menu
- Escape dismisses the menu (via existing dismiss_lsp_overlays)
- Editor intercepts keys via completion_intercept_keys flag when menu is showing
- Add AGENTS.md with LLM-powered predictive autocomplete idea

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 16:08:48 -05:00
Ryan WardandClaude Opus 4.6 a75bc99852 Add LSP completion/code actions/rename/signature help infrastructure, fix TypeScript LSP, rebrand app identifiers
- LSP Layer: Add completion, completion_resolve, signature_help, code_action,
  prepare_rename, and rename methods to TextDocumentService and LspServerModel
- Types: Add CompletionItemData, CompletionResult, SignatureHelpResult,
  CodeActionData, PrepareRenameResult, RenameResult, FileEdits
- Feature Flags: Add LspCompletion, LspCodeActions, LspRename, LspSignatureHelp
- Client Capabilities: Declare completion, signature help, rename, and code
  action capabilities so servers advertise these features
- Completion UI: Add completion state machine with debounced triggers, fuzzy
  filtering, positioned overlay menu, and edit application
- TypeScript LSP: Switch to npx for running typescript-language-server (handles
  download/caching automatically, survives node version switches)
- PATH Resolution: Add interactive shell PATH fallback for LSP server discovery
  and spawning (fixes nvm/fnm/volta users)
- App Identity: Rebrand from com.samsung.Galaxy/dev.warp.WarpOss to
  samsung.galaxy.GalaxyOss across bundle IDs, URL schemes, and plists
- Add scripts/reset-galaxy.sh for clean slate testing
- Galaxy status messages and other in-progress work

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-18 15:57:47 -05:00
Ryan WardandClaude Opus 4.6 f37a744692 Fix Warping indicator stuck after Bedrock LLM finishes responding
Bedrock was calling suggest_next_prompt tool which created a SuggestPrompt
action that waited forever on a oneshot channel for UI interaction that
never fires in the Bedrock path, keeping the conversation permanently
InProgress. Fixed by filtering the tool from the Bedrock tool list and
skipping it at the stream level when the LLM calls it from context history.

Also includes: Bedrock cache token tracking, cost estimation, LSP
improvements, conversation usage view updates, and external config support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 12:13:05 -05:00
Ryan Ward 95b4708e44 Fixing bug where canceled tool calls may cause terminal to freeze 2026-05-15 16:18:24 -05:00
Ryan Ward 76b727c5af Merge branch 'master' of gitlab.com:samnasbo/shared/galaxy 2026-05-15 10:55:30 -05:00
Ryan Ward 83e2be2a94 Updating install script 2026-05-15 08:48:34 -05:00
Ryan Ward 57222e208e More cleanup on bedrock calls, adding dump file for errors 2026-05-13 16:21:40 -05:00
Ryan Ward b61d6bcbce Apply local updates and test/build fixes 2026-05-13 15:56:40 -05:00
Ryan Ward cee61e2af0 Wrapping up bedrock implementation 2026-05-13 10:04:59 -05:00
Ryan Ward ed53aa99eb Replace debug memory stats footer with AI request token count
When 'Show Memory Stats' debug mode is enabled, the block footer
now displays 'Request tokens: N' (or 'Request tokens: --') instead
of the old grid/flat storage size breakdown.

- Add last_block_token_usage_by_model to AIConversation, tracking
  token usage accumulated since the most recent user-initiated request
- Add last_block_total_tokens() accessor summing across all models
- BlockListElement reads this value per block and renders it in the
  debug footer text element
2026-05-13 09:55:04 -05:00
Ryan Ward 029e90be2b Remove auto model routing; default to Claude Opus 4.6 on Bedrock; strip Oz tips 2026-05-13 09:33:45 -05:00
Ryan Ward e1c33317d3 Fix macOS icon padding, Quit/Hide menu labels, OSS config dir, Bedrock tool_result pairing
- Icon now follows Apple HIG: artwork at 80% canvas with transparent padding
- Quit Warp -> Quit Galaxy, Hide Warp -> Hide Galaxy in macOS menus
- OSS channel uses ~/.galaxy (no -oss suffix)
- Robust ensure_tool_results_paired: positional adjacency validation for Bedrock API
2026-05-13 09:13:03 -05:00
Ryan Ward 11152f2f40 Galaxy v1.0.0: Remove warp-channel-config, rebrand bins/icons/settings, remove teams from Drive
- Remove warp-channel-config dependency; all bin targets hardcode ChannelConfig inline
- Rename bin targets: galaxy-oss, galaxy-local, galaxy-stable, galaxy-dev, galaxy-preview
- Rename config dir from .galaxy-ai to .galaxy
- Add Galaxy app icon (512x512 rounded PNG + SVG logo)
- Replace settings gear icon with Stars (sparkle) icon
- Remove lightbulb/resource center button from header toolbar
- Add Galaxy logo SVG to Settings > About page
- Rename Galaxify -> Galaxyize across all UI strings
- Remove Create Team / Join Team sections from Galaxy Drive
- Fix missing => in OpenRichInput match arms
- Clean up unused imports and warnings
- Update Cargo.toml bundle metadata with Samsung branding
- Re-enable code review, project explorer, global search in settings
2026-05-13 01:29:25 -05:00
Ryan Ward ebafd9322d Remove dead passive suggestion code, stub cloud listener, rename input placeholders to Galaxy, add future LSP plan to GALAXY.md 2026-05-12 16:16:16 -05:00
Ryan Ward ca1337ad7d Fix crash: remove server SSE fallback, return error when no Bedrock config available 2026-05-12 10:51:06 -05:00
Ryan Ward ee69403bdb Add suggest_next_prompt tool for Bedrock prompt suggestions 2026-05-12 10:43:25 -05:00
Ryan Ward e13ed355f6 Fix Bedrock not being used: enable by default, remove model_id gating, set fallback default model
- bedrock_enabled default: false -> true (was never routing to Bedrock)
- Remove is_bedrock_model check from bedrock_config_if_applicable (model_id
  could be 'auto' from server-populated prefs, causing Bedrock to be skipped)
- Default to claude-sonnet-4 when model_id is empty or 'auto'
- fallback_to_warp default: true -> false (no server exists)
- Smoke test: exit immediately on no-text with diagnostic info instead of
  polling forever
2026-05-12 10:10:00 -05:00
Ryan Ward 0009f1366a Fix tool results visibility, dynamic system prompt, rebrand Galaxy AI to Galaxy
- Rewrite extract_system_prompt to dynamically include CWD, OS, shell, git,
  project rules, and tool usage guidance from request context
- Fix extract_tool_result_content and format_tool_call_result to properly
  handle Grep, FileGlobV2, and ApplyFileDiffs results (were returning empty
  'Tool completed successfully' strings - model never saw file lists)
- Rename all 'Galaxy AI' references to just 'Galaxy' (menu, window title,
  bundle names, plist, welcome text, about)
- Update smoke test with file visibility test prompt
- Suppress dead_code warnings on unused smoke test functions
2026-05-12 09:42:00 -05:00
Ryan Ward c2c6b3bc8a Fix all 109 warnings: suppress dead code in removed feature files, clean unused imports 2026-05-12 09:05:47 -05:00
Ryan Ward 2c651f2085 Settings cleanup: remove Cloud Platform, Teams, Shared Blocks, Referrals from nav; disable autoupdate; stub Oz settings; rename Warpify to Galaxify 2026-05-12 08:42:54 -05:00
Ryan Ward 140da74f99 Significant progress. Performing cleanup now 2026-05-11 14:31:02 -05:00
Ryan Ward fe105e0369 Bedrock improvements. Getting back conversations, but losing context after tool calls 2026-05-08 15:24:14 -05:00
Ryan Ward 9e0af95953 Bedrock improvements 2026-05-07 16:19:39 -05:00
Ryan Ward 2d5bc55939 Fully removed auth 2026-05-07 14:51:04 -05:00
Ryan Ward 8c80d499b0 Missed file 2026-05-07 14:37:59 -05:00
Ryan Ward f8f2c6bff6 More progress, still a long way to go 2026-05-07 14:37:26 -05:00
Ryan Ward a41cbd8cc7 Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though 2026-05-07 11:29:34 -05:00
Ryan Ward f4e2475c60 Rebasing, going about this another way 2026-05-06 07:02:12 -05:00
Ryan Ward d8d4ac9e5d Initial commit 2026-04-29 10:43:20 -05:00