Skip to content

Dev#920

Open
JegernOUTT wants to merge 285 commits intomainfrom
dev
Open

Dev#920
JegernOUTT wants to merge 285 commits intomainfrom
dev

Conversation

@JegernOUTT
Copy link
Member

No description provided.

…et allocation

- Process text messages before context files in postprocess_tool_results
- Implement dynamic budget reallocation based on actual token usage
- Update ToolBudget: tokens_for_code receives full budget, tokens_for_text uses 30%
- Modify postprocess_context_file_results to return tokens_used for tracking
- Simplify context file notes: move into result vector instead of prepending
- Update test expectations for new budget allocation ratios
Replace array-building approach with early returns for clearer control flow
when combining reasoning content and thinking blocks.
…orage

Enable searching and loading knowledge bases and trajectories across
multiple workspace directories instead of just the first one. This allows
users to organize their projects in multiple locations while maintaining
a unified knowledge and trajectory system.

Changes:
- Add get_all_*_dirs() functions to retrieve all workspace directories
- Update search/load functions to iterate across all directories
- Simplify knowledge enrichment return type and error handling
- Use ContextFiles format for knowledge context messages
- Support trajectory discovery across all workspace roots
…ent support

Add new tools for searching and retrieving past conversations:
- search_trajectories: Find relevant past conversations by query
- get_trajectory_context: Retrieve full context from specific trajectory

Enhance context file display to support knowledge enrichment:
- Add isEnrichment prop to ContextFiles component
- Categorize enrichment files (memories, trajectories, related)
- Display relevance scores and improved formatting

Update knowledge tool to focus on semantic search without trajectory mixing.
Integrate trajectory vectorization into save pipeline for search indexing.
Update configuration to use get_trajectory_context instead of trajectory_context.

Improve UI for memory and trajectory display with better formatting and icons.
Exclude context files and tool results marked with "knowledge_enrichment"
tool_call_id from compression stages 1 and 5 to maintain enriched context
quality. Also clarify tool result filtering logic.
- Add file size and line count metadata to tree output
- Implement binary file and hidden directory filtering
- Add folder truncation for large directories (configurable max_files)
- Improve tree formatting with extension summaries
- Rename print_files_tree_with_budget to tree_for_tools for clarity
- Update UI to support project context variant in ContextFiles
- Add SystemPrompt component for displaying system messages
- Refactor at_tree.rs to use TreeNode with metadata fields
- Update tool_tree.rs to pass max_files parameter
- Improve git status filtering to exclude hidden files
- Add PROJECT_CONTEXT_MARKER constant for project context messages
- Simplify ToolConfirmation logic and fix array access pattern
Add support for storing vecdb in a dedicated directory separate from the
cache directory, while maintaining backward compatibility with legacy
locations. Implement automatic migration from old paths with fallback for
cross-device moves.

- Add vecdb_dir parameter to VecDb::init and related functions
- Implement get_default_vecdb_dir to compute project-based paths
- Enhance get_db_path with multi-location fallback and migration logic
- Add move_file_with_fallback to handle cross-device file moves
- Add migrate_sqlite_files to move database and WAL/SHM sidecar files
- Update VecDbInitConfig initialization to use new directory structure
- Add `execute_pending_tool_calls()` to handle tool invocation and result
  collection separately from chat flow
- Import `ChatToolCall`, `execute_tools`, and `ThreadParams` types
- Simplify `subchat()` by delegating tool execution to new function
- Improve separation of concerns between chat generation and tool handling
Add support for iterative agent cycles that allow the agent to execute
multiple tool calls and regenerate responses. Introduce message queuing
with automatic flushing based on chat state, and improve UI feedback
for tool execution progress.

- Add MAX_AGENT_CYCLES constant (50) and loop generation in start_generation
- Introduce ToolStepOutcome enum (NoToolCalls, Paused, Continue)
- Replace check_tool_calls_and_continue with process_tool_calls_once
- Add chatId parameter to queue actions for proper multi-chat support
- Implement useQueueAutoFlush hook for automatic message queue processing
- Add subchat_log tracking and attached_files deduplication in ToolCall
- Update ToolUsageSummary to display progress steps and file information
- Improve UsageCounter to persist token display during idle periods
- Fix tool decision handling to only regenerate when decisions accepted
- Add regenerate command support in ResendButton
- Update test coverage for new agent loop behavior and queue operations
- Store limited_messages in PreparedChat and session for tool context
- Track last_prompt_messages in ChatSession to use actual LLM input for tools
- Allow critical ToolDecision commands to bypass queue size limits when paused
- Refactor deduplicate_and_merge_context_files to return dedup notes
- Rename is_covered_by_history to find_coverage_in_history for clarity
- Improve finish_stream to only add non-empty messages
- Consolidate tool result notes into existing tool messages
- Import setUseCompression action and PATCH_LIKE_FUNCTIONS constant
- Add listener to automatically approve patch-like tool confirmations
  when automatic_patch is enabled
- Add listener for setUseCompression action to sync compression setting
- Improve error handling consistency with inline comments
- Add type annotation to useQueueAutoFlush reducer
Separate user messages into queued_messages and non-user messages into
thread.messages when creating a new chat. This allows the UI to handle
message sending through the queue mechanism. Also remove setSendImmediately
call in useCompressChat as queued messages are now the default flow.
…cancellation

- Rename `queued_messages` to `queued_items` throughout codebase for clarity
- Introduce `QueuedItem` type with `client_request_id`, `priority`, `command_type`, `preview`
- Replace `QueuedUserMessage` with unified `QueuedItem` supporting all command types
- Add `priority` field to `ChatCommand` and `CommandRequest` for immediate execution
- Implement `cancelQueuedItem` API endpoint (DELETE /chats/:chat_id/queue/:client_request_id)
- Add `cancelQueued` action to `useChatActions` hook
- Update `sendUserMessage` to accept optional `priority` parameter
- Refactor `Chat.tsx` to pass `sendPolicy` ("immediate" | "after_flow") to submit handler
- Update `ChatForm.tsx` to use `selectQueuedItems` instead of `selectQueuedMessages`
- Add queue state to runtime updates for real-time visibility in UI
- Implement `build_queued_items()` and `emit_queue_update()` in session
- Add `inject_priority_messages_if_any()` to generation flow for priority message handling
- Update snapshot and runtime events to include `queued_items` array
- Improve queued message display with command type and preview text
- Update CSS for queued message styling with priority indicators
- Remove `useQueueAutoFlush` hook (no longer needed with server-side queue management)
- Update test fixtures and mock stores to use `queued_items`
Add `newChatWithInitialMessages` async thunk to handle creating a new chat
and sending initial user messages. Includes helper function `toMessageContent`
to normalize message content formats (string, array, or legacy format).

Update consumers in `useCompressChat` and `useEventBusForApp` to use the new
thunk for chats with initial messages. Add safety check in `useCapsForToolUse`
to prevent redundant model updates.
Add support for automatic patch execution when all pending confirmations
are patch-like tool calls. This includes:

- New `setAutomaticPatch` action creator and middleware listener in GUI
- New `automatic_patch` field in ThreadParams
- Patch-like tool detection in backend (patch, text_edit, create_textdoc, etc)
- Logic to skip pause when automatic_patch is enabled and all confirmations
  are patch-like tools
- Persistence of automatic_patch setting in trajectory snapshots
Add optional `file_rev` field to ContextFile to track file revisions/hashes.
This field is used for deduplication and change detection across file
contexts. The field is skipped during serialization and deserialization
to maintain backward compatibility.

- Add `file_rev: Option<String>` field to ContextFile struct
- Update all ContextFile instantiations to include `file_rev: None`
- Add file hashing via `official_text_hashing_function` in pp_tool_results
- Use file_rev for duplicate detection in find_coverage_in_history
Extend both STREAM_IDLE_TIMEOUT and STREAM_TOTAL_TIMEOUT from their
previous values (120s and 900s respectively) to 3600s (1 hour) to allow
longer-running streaming operations to complete without premature timeout.
- Add draft message storage utilities with automatic cleanup of stale messages
- Implement useDraftMessage hook for managing chat input drafts
- Add ChatLoading component with animated skeleton and progress indicators
- Enable parallel tool execution with configurable concurrency limit (16)
- Add snapshot_received flag to track initial chat state synchronization
- Implement thread parameter persistence to localStorage
- Add entertainment messages to strategic planning tool with progress tracking
- Use official text hashing for file revisions in postprocessing
- Add middleware listeners for syncing thread parameters to backend
- Normalize line endings across codebase (CRLF → LF)

Refs: Multiple feature enhancements for improved UX and performance
…agement

- Add voice recording and transcription capabilities using Whisper
- Implement audio decoding for multiple formats (WAV, WebM, MP3, OGG)
- Add audio resampling to 16kHz for transcription
- Create voice service with model download and caching
- Add microphone button UI with recording state feedback
- Add voice status API endpoint with model management
- Integrate LLVM installation in CI/CD workflows
- Add optional voice feature flag to Cargo.toml
- Add user memories context injection in chat system
- Improve chat snapshot handling to preserve thread settings
- Add missing dependency imports and error handling
Implement comprehensive task management with kanban board, multi-role chat
system (planner/orchestrator/agent), and tools for task lifecycle management.

- Add KanbanBoard component for visual task card management
- Implement TaskList and TaskWorkspace for task UI
- Add Sidebar integration showing active tasks
- Extend Toolbar with task tabs and creation
- Implement task agent tools (update, complete, fail, finish)
- Add task board management tools (create/update/move/delete cards)
- Implement orchestrator tools (check agents, ready cards, instructions)
- Add task agent finish tool for completion reporting
- Implement task mark card tools for manual resolution
- Add task check agents tool for monitoring agent status
- Implement task initialization and board state management
- Update config with task planner/orchestrator/agent prompts and parameters
Add optional task_meta field to ThreadParams to track task context
(task_id, role, agent_id, card_id) in chat sessions. Update chat
reducer to preserve and propagate task metadata through snapshots.
Add infer_task_id_from_chat_id utility to derive task ID from chat ID
patterns. Update all task tool get_task_id functions to use inference
fallback. Allow trajectory save for task chats with empty messages.
Add an optional code_workdir parameter to AtCommandsContext to support
task-specific working directories for agent operations. Update all
instantiations of AtCommandsContext to pass the new parameter, and
implement path resolution logic for relative file paths within the
working directory.

Also refactor task-related endpoints to use "planner" terminology instead
of "orchestrator" and add PATCH endpoint for updating task metadata.
Refactor ToolTaskBoardCreateCard, ToolTaskBoardUpdateCard,
ToolTaskBoardMoveCard, and ToolTaskBoardDeleteCard to acquire the
context lock only for extracting planner role and global context,
then release it before performing long-running operations like board
loading and storage. This reduces lock contention and prevents
potential deadlocks.
- Add expandable/collapsible chat section with chevron toggle in header
- Chat header becomes clickable to expand/hide kanban board and panels
- Smooth 0.3s chevron rotation animation when expanding/collapsing
- Create new AgentStatusDot component with animated indicators
- Blue pulsing dots (1.5s) for active agents showing progress
- Green pulsing dots (2s) for completed agents
- Static red dots for failed agents
- Integrated animated dots into AgentsPanel for visual status feedback
…unction

Add new `get_project_dirs_with_code_workdir()` and `get_project_dirs_for_workdir()` functions to handle code_workdir parameter consistently across tools. Update file edit, cat, mv, rm, tree, and tool_strategic_planning to use the new function instead of duplicating workdir logic.
…virtuoso

Replace custom ScrollAreaWithAnchor with VirtualizedChatList powered by
react-virtuoso for better performance with long chat histories.

Key changes:
- Introduce buildDisplayItems() to create typed display items from messages
- Add VirtualizedChatList component with proper initial scroll behavior
- Implement useCollapsibleState hook for controlled collapsible states
- Memoize AssistantInput, UserInput, ContextFiles, and GroupedDiffs
- Add virtuoso-specific CSS styling
- Reset collapsible state when switching chats

Improves scroll performance and rendering efficiency for large message lists.
- Remove border-radius and background from resultContent across multiple tool cards
- Add consistent left padding to content containers
- Move file list display from meta prop to inline summary in ReadTool
- Add styling for inline file arguments in ReadTool
- Centralize scrollbar styles in shared/scrollbar.module.css and compose across tool cards
- Extract shared iconButton with variants (active, danger, stop, send, queue, priority)
- Add design tokens (z-index scale, motion timing, disabled opacity)
- Replace Framer Motion animations with lightweight CSS grid transitions using useDelayedUnmount hook
- Update tool result content styling with consistent padding and scrollbar composition
- Refactor z-index values to use CSS variables
…points

- Remove `forward_to_hf_endpoint.rs` and deprecate HF endpoint style
- Add pluggable LLM wire adapters (OpenAI Chat, OpenAI Responses, Anthropic)
- Introduce canonical `LlmRequest`/`LlmResponse`/`LlmStreamDelta` types
- Add `WireFormat` enum to model capabilities with provider defaults
- Migrate chat preparation/generation to new adapter system
- Add new conversation modes: ask, plan, review, debug, learn, shell, past_work, quick_agent
- Improve streaming parsing, logging, and error handling
- Enhance tool call safety with pending call verification

BREAKING CHANGE: HuggingFace endpoint style removed - use OpenAI-compatible endpoints instead
- Remove `forward_to_hf_endpoint.rs` and deprecate HF endpoint style
- Add pluggable LLM wire adapters (OpenAI Chat, OpenAI Responses, Anthropic)
- Introduce canonical `LlmRequest`/`LlmResponse`/`LlmStreamDelta` types
- Add `WireFormat` enum to model capabilities with provider defaults
- Migrate chat preparation/generation to new adapter system
- Add new conversation modes: ask, plan, review, debug, learn, shell, past_work, quick_agent
- Improve streaming parsing, logging, and error handling
- Enhance tool call safety with pending call verification
- Add `CacheControl`, `ResponseFormat` support and usage token parsing
- Add xAI Responses provider config

BREAKING CHANGE: HuggingFace endpoint style removed - use OpenAI-compatible endpoints instead
- Remove scope parameter from search_files_with_regex, use files_to_search slice directly
- Add limits: MAX_PATH_MATCHES_TO_LIST (25), MAX_PATH_MATCHES_TO_ATTACH (10), PATH_MATCH_PREVIEW_LINES (30)
- Limit path matches listing and attachment to prevent context bloat
- Update recursive call to pass files_in_scope instead of scope string

refactor(memories): add source_chat_id tracking and exclusion logic

- Add source_chat_id field to MemoRecord and EnrichmentParams
- Track root chat ID when creating enriched memories across tools
- Exclude current chat's knowledge from memory search using source_chat_id
- Move root resolution to function start, pass through fallback

refactor(postprocessing): improve tool budget handling

- Cap total tool budget at MAX_TOOL_BUDGET (16384) for large contexts
- Add MAX_PER_FILE_BUDGET (2048) and better budget distribution logic
- Improve skip_pp file handling with clearer budget warnings
… & mode transitions

Remove legacy openai_convert.rs (676 lines) and subchat HTTP endpoints as message
conversion is now handled directly in LLM adapters (OpenAI Chat, Anthropic, Refact).

Add per-thread sampling parameters (temperature, frequency_penalty, max_tokens,
parallel_tool_calls, reasoning_effort) with GUI controls and backend persistence.

Add mode transition system:
- New `mode_transition` subagent extracts context from existing chats
- `/trajectory/mode-transition/apply` endpoint creates linked child chats
- GUI mode selector now supports switching/restarting with context preservation
- New `canonical_mode_id()`/`normalize_mode_id()`/`is_agentic_mode_id()` utilities

Update provider configs with model-specific defaults (default_max_tokens,
default_frequency_penalty) and comprehensive chat model definitions.

Other:
- Extract LLM logging/sanitization utilities
- Add `eof_is_done` model capability
- Preserve citations in chat sanitization
- Mode badges with consistent colors in UI
- Update mode YAML files to schema_version: 4 with enhanced `ask_questions()`
  guidance and subagent delegation patterns

BREAKING CHANGE: Legacy ChatMode enum removed - all modes now use string IDs.
Update any hardcoded enum usage to use canonical_mode_id().
Introduce comprehensive model capabilities system with:

- Centralized Python registry with 70+ models (GPT, Claude, Gemini, Grok, etc.)
- HTTP endpoints: /v1/model-capabilities and /v1/model-supported
- Rust client with 24h cache, pattern matching, finetune support
- Automatic capability overrides for chat models (n_ctx, tools, reasoning, etc.)
- Temperature retry logic using model.supports_temperature
- Simplified provider YAML configs (removed per-model settings)

Supports reasoning types (OpenAI, Anthropic, DeepSeek, XAI, Qwen), caching types,
and multimodal capabilities (vision, video, audio, PDF, clicks).
…ation

- Remove xAI chat model configs from YAML (now server-driven)
- Add supports_strict_tools and supports_max_completion_tokens fields
- Implement model capability validation with reasonable limits clamping
- Improve canonical model name parsing for multi-segment paths (OpenRouter, Gemini)
- Add refresh lock to prevent concurrent model caps updates
- Make cache I/O async with proper directory creation
- Update OpenAI/Gemini model capabilities (strict tools, no temperature)
- Add comprehensive tests for resolution, validation, and patterns
- Fix default model validation to use full model IDs

Fixes #model-capabilities-resolution
… & mode transitions

Remove legacy openai_convert.rs (676 lines) and subchat HTTP endpoints as message
conversion is now handled directly in LLM adapters (OpenAI Chat, Anthropic, Refact).

Add per-thread sampling parameters (temperature, frequency_penalty, max_tokens,
parallel_tool_calls, reasoning_effort) with GUI controls and backend persistence.

Add mode transition system:
- New `mode_transition` subagent extracts context from existing chats
- `/trajectory/mode-transition/apply` endpoint creates linked child chats
- GUI mode selector now supports switching/restarting with context preservation
- New `canonical_mode_id()`/`normalize_mode_id()`/`is_agentic_mode_id()` utilities

Update provider configs with model-specific defaults (default_max_tokens,
default_frequency_penalty) and comprehensive chat model definitions.

Other:
- Extract LLM logging/sanitization utilities
- Add `eof_is_done` model capability
- Preserve citations in chat sanitization
- Mode badges with consistent colors in UI
- Update mode YAML files to schema_version: 4 with enhanced `ask_questions()`
  guidance and subagent delegation patterns

BREAKING CHANGE: Legacy ChatMode enum removed - all modes now use string IDs.
Update any hardcoded enum usage to use canonical_mode_id().
Remove CLEANUP_SUMMARY.md and IMPLEMENTATION_SUMMARY.md files.

Delete the legacy providers.rs module (1014 lines) which handled v1/providers
endpoints via complex manual JSON/YAML manipulation.

Frontend changes:
- Update useUpdateProvider to use new providers API structure
- Remove getProviderTemplates dependency
- Update RTK Query tags from CONFIGURED_PROVIDERS → PROVIDERS

The new providers system uses structured ProviderTrait implementations
with proper type safety and reduced boilerplate.
Apply consistent multi-line formatting to JSX props, TypeScript types,
and complex expressions across multiple components and utilities.

Remove unused import and minor whitespace fixes.
Remove dedicated self_hosted.rs module (374 lines) and integrate
self-hosted caps parsing directly into caps.rs via new
convert_self_hosted_caps_if_needed() function.

Simplify provider configs by removing legacy chat_models fields and
always using Vec::new(). Add model caps auto-application to all
chat models. Implement normalized model matching (case-insensitive,
strip -latest/-preview/-fp* suffixes, dot→dash conversion).

Other changes:
- Fill model defaults in chat sampling params
- Improve model filter regexes (o1/o3/o4 support)
- GUI: animation improvements + session_state tracking
- HTTP API: centralized json_response helper
- Pricing: add GPT-5/o4/Claude 4.x/Gemini 2.5 entries

Closes #TODO
…M requests

- Add `linearize_thread_for_llm()`: merges consecutive user-like messages
  (user/plain_text/cd_instruction/context_file) and folds tool-appendable
  content into preceding tool/diff messages while preserving tool_call_id
- Comprehensive test suite covering 100%+ real-world patterns from trajectories
- Update all LLM adapters (refact/openai/anthropic/responses) to use linearized
  messages instead of raw chat history
- Eliminates redundant user messages for strict role alternation and prefix
  caching optimization

refactor(chat): extract synchronous thread params patching

- Move `buildThreadParamsPatch()` from actions to shared util
- New chats: send tool_use/mode only on empty message history
- Existing chats: sync model/boost_reasoning/include_project_info/etc.
- Eliminates async RTK listener race condition

feat(providers): add Responses API toggles for OpenAI/xAI

- `use_responses_api` field with UI toggle and smartlinks
- xAI: Responses API (`/v1/responses`) vs Chat Completions (`/v1/chat/completions`)
- OpenAI: Responses API (`/v1/responses`) vs Chat Completions
- Hidden provider variants (`xai_responses`, `openai_responses`) for UI merging
- Icons/labels show Responses API variant

feat(ui): tool call argument tooltips

- Hover tool card headers to see function name + JSON args
- 10s delay, positioned above card, auto-dismiss
- Handles malformed JSON gracefully with raw fallback
- Portal positioning with mouse tracking

fix(chat): prevent stale trajectory state overwrites

- Skip boolean flag updates (streaming/waiting/etc.) when chat SSE active
- Sidebar SSE (trajectories) can lag behind chat SSE; only update session_state
- Preserves `snapshot_received` as authoritative chat state source

feat(metering): USD cost display with breakdown

- Parse `metering_usd` from usage with prompt/generated/cache breakdown
- Hover cards show detailed USD vs coins (show USD when available)
- History list, message footers, usage counter all updated
- Graceful fallback to coins when no USD data

refactor(providers): model fallback + defaults

- Fallback missing light/thinking models to chat_default_model
- Provider defaults YAML loaded per-model type (chat/light/thinking)
- Resolve user model aliases (gpt-4o → refact/gpt-4o)
- Hide refact/refact_self_hosted settings (managed by backend)

feat(chat): save preamble/knowledge to session

- System prompts/project context persisted to avoid regeneration churn
- Agentic knowledge enrichment saved before user messages
- `prepare_session_preamble_and_knowledge()` extracts to shared util

chore(modes): bump schema_version + add_workspace_folder tool

All modes updated to schema v6 with `add_workspace_folder` tool enabled
Introduce tracking of currently running Refact models from pricing metadata
and filter available models list to only include those models.

- Add `running_models` field to `RefactProvider`
- Implement `set_running_models()` and override `get_available_models_from_caps()`
- Extract running model IDs from pricing object keys in capabilities loader
- Add default `set_running_models()` no-op to provider trait
- Add n_cxt to CommonParams with serde skip for optional serialization
- Expand ReasoningIntent with Default, Minimal, XHigh variants and update
  adapter mappings (anthropic_budget, to_openai_reasoning)
- Implement Anthropic citation resending in multi-turn conversations with
  proper text block attachment
- Add comprehensive Refact adapter citation parsing for LiteLLM Anthropic
  (provider_specific_fields.citation[s], non-streaming message fields)
- Simplify usage parsing: consistent cache_read subtraction from prompt_tokens
  across providers with zero-filtering and fallback logic
- Introduce selectEffectiveMaxContextTokens respecting context_tokens_cap
- Remove extra_headers from AdapterSettings (cleanup)
- Add extensive tests for citation streaming, multi-turn resending, and
  usage edge cases (zero fields, partial chunks, PDF page citations)
- Map new ReasoningEffort variants and pass n_ctx to Refact adapter

Fixes # various citation/streaming issues
- Add abort_flag polling and process group killing in shell tool execution
- Distinguish user aborts from tool timeouts and normal completion
- Update queue/tools logic to check abort state before/after tool execution
- Add interrupted flag and partial output handling for interrupted shell commands
- Ensure proper state transitions (Idle) and UI feedback for aborts
- Sort paths and directories in files_in_workspace for consistent trie building
- Sort context paths in pp_utils for stable processing order
- Replace HashMap with BTreeMap in pp_tool_results for sorted iteration
- Sort customization modes by title/id to ensure consistent UI order
- Enhance model pattern matching with canonical names and wildcard support
- Change default reasoning effort to Medium when boost_reasoning enabled
- Update anthropic test comment for clarity
…port

- Expand ReasoningEffort enum with None/Default/Minimal/XHigh/Max variants
- Add Anthropic "effort" reasoning style (adaptive thinking + output_config)
- Update UI: temperature disabled with reasoning, mid-chat warnings, new buttons
- Fix tool call args normalization for empty/null values from LLMs
- Improve reasoning display: paragraph breaks for bold titles, better caps lookup
- Add n_ctx to SamplingParameters, update test timeouts and fixtures

Fixes reasoning config inconsistencies across providers (OpenAI/Mistral/XAI/Qwen/etc).
Extend ReasoningEffort enum parsing and conversion to support new
XHigh and Max levels in both generation and preparation modules.
Replace truncateMiddle/truncate functions with full text display across
all tool cards. Improve layout with flex properties and vertical-align
fixes for better text wrapping. Add streaming progress step display.

- ResearchTool, KnowledgeTool, ShellTool, SubagentTool: full query display
- EditTool: robust file path fallback, full filename display
- ReadTool: clickable full file list instead of truncated summary
- GenericTool: simplified full arg formatting without truncation limits
- StreamingToolCard: add step progress parsing and display
- CSS: flex layout improvements, ellipsis handling, baseline alignment
Add full Claude Code integration supporting:
- Auto-detection of CLI credentials at ~/.claude/.credentials.json
- OAuth Bearer token auth (Authorization: Bearer) alongside API keys
- Claude Code-specific headers (user-agent, beta flags, system prefix)
- Server-side web_search tool passthrough for multi-turn conversations
- mcp_ tool prefixing/stripping for server-side tool validation
- Dynamic model discovery from Anthropic /v1/models API

Refactor provider traits to support async model fetching and auth_token.
Add server_content_blocks to preserve server_tool_use/web_search_tool_result
blocks verbatim across turns (required for encrypted_index citation validation).

Add claude_code.yaml default provider config.
- Add OpenAICodexProvider registration and module import
- Add codex-mini pricing model ($1.50/$6.00 per M tokens)
- Add robust ChatToolFunction::parse_args() to handle malformed LLM tool arguments (empty strings, null, arrays → `{}`)
- Add comprehensive unit tests for argument parsing edge cases
- Update all tool argument parsing to use new parse_args() method
- Improve argument extraction logic in stream_core.rs
- Remove unused is_claude_code_oauth flags from adapters

BREAKING CHANGE: Tool argument parsing behavior changed - non-object JSON now normalizes to `{}` instead of erroring
Implement full OpenAI Codex provider with:
- Multiple auth methods (API key, OAuth token, Codex CLI auto-detection)
- Dynamic model discovery via /v1/models API filtered for codex models
- Support for CODEX_API_KEY/OPENAI_API_KEY env vars
- Model capabilities matching with date suffix stripping
- Provider schema and default YAML config
- Fallback to model_caps when API unavailable
Implement full OpenAI Codex provider with:
- Multiple auth methods (API key, OAuth token, Codex CLI auto-detection)
- Dynamic model discovery via /v1/models API filtered for codex models
- Support for CODEX_API_KEY/OPENAI_API_KEY env vars
- Model capabilities matching with date suffix stripping
- Provider schema and default YAML config
- Fallback to model_caps when API unavailable

Also increase tool budget limits and cat tool max lines to 32768/2000 to
support larger Codex contexts
- Implement full OAuth2 PKCE flow with Anthropic Console API
- Add GUI "Login with Anthropic" button and code exchange UI
- Remove legacy API key support (ANTHROPIC_API_KEY, api_key field)
- Prioritize OAuth tokens over CLI session tokens in auth resolution
- Add OAuth status display with token expiry detection
- New HTTP endpoints: /providers/claude_code/oauth/{start,exchange,logout}
- Store OAuthTokens (access_token, refresh_token, expires_at) in provider config
- Update model listing and auth diagnostics for OAuth-only flow

Closes #TODO
…odels status

Introduce `has_credentials()` trait method and `selected_model_count()` for
providers to determine status automatically. Provider status now shows
"active"/"configured"/"not_configured" badges. ProviderForm uses dynamic schema
parsing with per-field save (patch semantics) and removes global Save button.

Backend changes:
- ProviderRuntime.enabled now requires credentials AND selected models
- ProviderListItem/ProviderDetailResponse add has_credentials/status fields
- Model enable/disable logic simplified (allowlist only, no empty-set default)

Frontend changes:
- ProviderCard shows model count + status dots instead of toggle
- SchemaField components handle string/boolean/secret fields with save states
- Per-field editing with blur-save and inline feedback

Closes #providers-config-ux
…ditor

Introduce dynamic YAML schema parsing for provider configuration with:
- Separate important/extra fields based on f_extra flag
- Per-field save with backend YAML merge preserving secrets
- Remove legacy OAuth UI in favor of direct credential input
- Add API key support alongside OAuth tokens for Claude Code

Backend changes:
- Simplify settings merge logic
- Remove obsolete OAuth endpoints
- Dual auth support (API key + OAuth) for Anthropic/Claude Code
Implement full OpenAI OAuth2 flow with PKCE for secure browser-based login:
- New openai_codex_oauth module with verifier/challenge generation
- Support for both in-app OAuth tokens and Codex CLI credentials
- HTTP callback endpoint for automatic auth completion
- Updated provider schema to use oauth: { supported: true }
- Enhanced GUI with auto-polling and provider-specific labels
- Simplified OpenAICodexProvider auth resolution

Supports ChatGPT Plus/Pro subscriptions for GPT-5-Codex model access.
Apply consistent line breaking for multiline JSX elements and expressions
in ToolCard components, ProviderForm, and related files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant