Skip to content

Conversation

@JegernOUTT
Copy link
Member

No description provided.

- Add trajectories API endpoints (list, get, save, delete) with SSE subscription
- Implement automatic title generation for chat trajectories via LLM
- Refactor chat state to support multiple concurrent threads with per-thread runtime state
- Update selectors to access thread-specific state by ID
- Add useTrajectoriesSubscription hook for real-time trajectory events
- Update test fixtures and mock handlers for trajectory operations
- Migrate chat form and story fixtures to new multi-thread state structure
- Add per-thread state tracking (streaming, waiting, confirmation) instead of global
- Implement open_thread_ids array to manage visible tabs vs background runtimes
- Add switchToThread action to switch between open tabs and auto-switch on confirmation
- Update setIsWaitingForResponse to accept {id, value} payload for per-thread control
- Add closeThread force flag to allow deletion of busy threads (e.g., on backend delete)
- Update restoreChat to preserve existing runtimes and re-add to open tabs
- Add auto-switch listener: when background thread needs confirmation, switch to it
- Update updateOpenThread to only sync metadata (title) not messages (avoid stale data)
- Add setThreadPauseReasons to also set streaming=false and confirmationStatus=false
- Update removeChatFromCache to check confirmation.pause before deleting
- Add selectThreadPause selector to check pause state
- Update Toolbar and HistoryItem to show spinner for both streaming and waiting states
- Update ChatForm to check pause state without streaming condition
- Update middleware to set waiting=true before continuing after tool confirmation
- Add error handling in reducer for rejected chatAskQuestionThunk
- Update useCompressChat and useSendChatRequest to use per-thread waiting state
- Update useTrajectoriesSubscription to force-delete on backend delete and sync only metadata
- Update version to 2.0.10-alpha.4
Preserve auto-generated titles in history when saving chats, and allow
backend-generated titles to sync even during active streaming. Restrict
other field updates to non-busy threads to avoid overwriting user changes.
- Fix abort handling: dispatch doneStreaming immediately on abort to prevent
  late cleanup from corrupting new requests
- Set waiting_for_response=true before async confirmation check to block
  duplicate senders during the async operation
- Re-check state after async operations to prevent stale state issues
- Exclude messages from backend updates to keep local runtime authoritative
- Remove duplicate tool auto-continue from useAutoSend (now single source
  of truth in middleware doneStreaming listener)
- Extract constant default values in selectors to prevent unnecessary object
  creation on each call (EMPTY_MESSAGES, EMPTY_QUEUED, etc.)
- Import ChatMessages and thread types for better type safety
- Add safety checks for incomplete tool calls after aborted streams
- Improve stream consumption abort handling with deduplication flag to prevent
  multiple onAbort callbacks
- Add abort signal checks between chunk processing to stop early on user abort
- Move UsageCounter to AgentCapabilities header and ChatForm
- Relocate MessageUsageInfo rendering to ChatContent message flow
- Remove LikeButton and SaveTrajectory functionality
- Simplify AssistantInput props by removing usage data
- Refactor UsageCounter with circular progress visualization
- Move ResendButton to ChatForm toolbar
- Remove trajectory save endpoint from router
- Clean up knowledge API and remove unused SaveTrajectoryResponse
- Update story fixtures to remove deprecated handlers
- Adjust component imports and dependencies across chat modules
Add logic to automatically close empty chat tabs when:
- Creating a new chat via onCreateNewChat
- Navigating to a different tab via goToTab

This improves UX by preventing accumulation of empty chat tabs in the
tab bar. Only tabs with no messages are closed automatically.
Update checkmark positioning to use transform: translateY(-50%) for
proper vertical centering instead of fixed top position.
Update knowledge folder naming convention from .refact_knowledge to
.refact/knowledge and adjust allowed hidden folders configuration
accordingly.
Add support for extracting and searching through chat trajectories:
- New trajectory_memos module that periodically extracts insights from
  abandoned trajectories using LLM analysis
- New search_trajectories tool to find relevant trajectory segments
- New get_trajectory_context tool to retrieve full context from trajectories
- TrajectoryFileSplitter for vectorizing trajectory JSON files
- Integration with vecdb for trajectory-based semantic search
Filter out system role messages alongside context_file and cd_instruction
messages when extracting and processing trajectory data across multiple
modules. Also skip text validation for trajectory files to handle their
unique structure appropriately.
- Expand PROMPT_EXPLORATION_TOOLS with knowledge management instructions
- Add knowledge and trajectory search tools to subagent documentation
- Enhance EXTRACTION_PROMPT with structured overview and title generation
- Increase minimum message threshold from 4 to 10 for trajectory processing
- Add TrajectoryMeta struct to capture overview and auto-generated titles
- Refactor extract_memos to extract_memos_and_meta for dual extraction
- Support dynamic title updates for auto-generated trajectory titles
- Add title hint when current title is auto-generated
Import memories module and create enriched memory entries from subagent
execution results with appropriate tags and metadata. This allows subagent
tasks to be persisted and retrieved for future context.
Update create_knowledge tool description to mention "Use it if you need
to remember something" for better user understanding.
Implement automatic context enrichment in AGENT chat mode by injecting
relevant knowledge and trajectories before the user message. This includes:

- New knowledge_enrichment module with signal-based heuristics to determine
  when enrichment should occur (first message, error keywords, file refs, etc.)
- Enhanced memories_search to support separate top_n for knowledge vs trajectories
- Score field added to MemoRecord for relevance filtering
- Pre-stream messages passed through restream for UI display
- Updated tool descriptions to mention trajectory search capability
- Removed standalone search_trajectories tool (now integrated into knowledge)

Refs #123
Enhance tool output messages by appending knowledge base save confirmation
when enriched memories are successfully created. This provides users with
visibility into where their tool results are being persisted.

Changes:
- Capture memory save path from memories_add_enriched result
- Append formatted memory note to final tool output messages
- Applied to deep_research, strategic_planning, and subagent tools

Refs #123
…ed error handling

Replace EventSource-based chat subscription with fetch-based streaming for better
control and error handling. Refactor chat commands to use UUID v4 for request IDs
and add comprehensive protocol validation tests. Add queue_size field to thread
runtime state.

- Migrate subscribeToChatEvents from EventSource to fetch API
- Implement sequence number validation with gap detection
- Add reconnection logic with configurable delays
- Refactor sendChatCommand with improved error handling
- Add comprehensive SSE protocol tests
- Add chat validation tests
…nt logic

Refactor message handling in `run_llm_generation` to improve preamble injection
and knowledge enrichment. Move knowledge enrichment after preamble setup and
add session synchronization for enriched context files. Simplify system prompt
logic in `prepend_the_right_system_prompt_and_maybe_more_initial_messages` by
checking for cd_instruction presence upfront.
Add new subchat_update event type to handle subchat creation and file
attachment tracking. Implement subchat bridge in tool execution to emit
updates when subchats are spawned, and update tool calls with subchat
IDs and attached files in the reducer.
Extract message serialization into a variable for clarity and move title
generation logic from handle_v1_trajectories_save into save_trajectory_snapshot
to reduce code duplication and improve separation of concerns.
…l support

Remove CodeCompletionReplaceScratchpad and CodeCompletionReplacePassthroughScratchpad
implementations along with their dependencies (comments_parser module). Simplify
known_models.json to only include actively supported models (FIM-PSM/FIM-SPM based
completions). Update scratchpad factory to only support FIM-PSM and FIM-SPM modes,
removing REPLACE and REPLACE_PASSTHROUGH variants.

This reduces codebase complexity and focuses on maintained completion strategies.
…l support

Remove CodeCompletionReplaceScratchpad and CodeCompletionReplacePassthroughScratchpad
implementations along with their dependencies (comments_parser module). Simplify
known_models.json to only include actively supported models (FIM-PSM/FIM-SPM based
completions). Update scratchpad factory to only support FIM-PSM and FIM-SPM modes,
removing REPLACE and REPLACE_PASSTHROUGH variants.

This reduces codebase complexity and focuses on maintained completion strategies.
Extract LLM stream handling logic from generation.rs into a new stream_core
module to enable reuse across chat and subchat implementations. Introduce
StreamCollector trait for flexible result handling, ChoiceFinal struct for
accumulating choice results, and StreamRunParams for parametrizing stream runs.

This refactoring reduces code duplication and improves maintainability by
centralizing stream processing logic.
- Add CaptureBuffer for smart output truncation with head/tail strategy
- Add RowLimiter for database query result limiting (100 rows, 200 chars/cell)
- Add pp_guidance module with standardized truncation messages
- Update integrations (cmdline, docker, mysql, postgres, shell) to use new limiters
- Add OutputFilter.skip flag and parse_output_filter_args for dynamic filtering
- Improve error messages with actionable hints (⚠️ emoji + 💡 suggestions)
- Update tool error messages (search, tree, ast_definition, regex_search, web, etc.)
- Add deduplication and merging of context files in pp_tool_results
- Fix edge cases in pp_context_files and pp_utils
- Improve shell command streaming with CaptureBuffer instead of Vec
- Replace CaptureBuffer Tail strategy with HeadAndTail for better context
- Add empty string handling in path trimming for edge cases
- Improve error messages with ⚠️ emoji and 💡 actionable hints
- Enhance str_replace validation with empty string checks
- Update tool error messages (create_textdoc, update_textdoc, mv, rm, cat, regex_search, trajectory_context)
- Fix scope path separator handling in resolve_scope and create_scope_filter
- Improve cat() image limiting message and line range validation
- Add #[allow(dead_code)] annotations to unused RowLimiter methods
- Simplify mv() error handling and remove cross-device fallback logic
- Remove unused Deserialize import from serde
- Add #[allow(dead_code)] to unused TokenCountCache methods
- Fix typescript type annotations in test files and components
- Improve type safety in KnowledgeGraphView and related files
- Suppress console.log eslint warnings with inline comments
- Replace any types with proper TypeScript interfaces
Remove the following unused code:
- get_model_token_params function and related token parameter logic
- recalculate_token_limits function
- compress_message_at_index function
- process_compression_stage function
- TokenCountCache struct and module
- get_model_token_params test cases
- Model-specific token parameter documentation

Also remove the following unused test functions:
- test_model_detection_case_sensitivity
- test_claude_model_params_consistency
- test_default_max_new_tokens_is_documented
- test_stage0_compression_should_be_tracked

Remove token_count_cache module from scratchpads/mod.rs exports.

Remove ChatMode::supports_checkpoints method which is no longer used.

Simplify call_validation.rs by removing dead code attributes where applicable.
Auto-formatted files in:
- src/__fixtures__/
- src/app/
- src/components/ChatHistory/
- src/components/Toolbar/
- src/components/UsageCounter/
- src/features/Knowledge/
- src/features/Tasks/
- src/services/refact/
The bundled GUI runs in IDE webviews without a proxy, so relative URLs
like /v1/trajectories fail. Changed to use dynamic absolute URLs with
port from config (http://127.0.0.1:${port}/v1/...).

Fixed files:
- trajectories.ts: Use queryFn with dynamic URLs instead of relative baseUrl
- voice.ts: All functions now accept port parameter
- useVoiceInput.ts: Pass port to voice service functions
- useStreamingVoiceRecording.ts: Accept port parameter and pass to voice calls
Apply consistent code formatting across useStreamingVoiceRecording hook and
voice service module, including line wrapping and indentation adjustments.
- Add right margin to ChatContent for better spacing
- Refactor Toolbar with fixed home button and scrollable tabs container
- Add scrollbar styling to ScrollArea component
- Improve warning/error callout styling in UsageCounter
- Fix token warning logic to ignore server-executed tools
- Replace crypto.randomUUID with uuid library for better compatibility
- Remove unused trajectory state management from ChatForm
- Simplify context full warning display with preventClose prop
- Remove unused Flex import from ContextCapButton
- Add displayName to MicrophoneButton forwardRef component
- Prefix unused parameter with underscore in Dropdown
- Fix Cytoscape mock in KnowledgeGraphView tests to include all required methods (select, unselect, animate, etc.)
- Auto-format 15 files with prettier

All checks passing:
- ESLint: ✅ No errors
- Prettier: ✅ All files formatted
- Tests: ✅ 371 passed, 5 skipped
- Move CorsLayer from v1 router to main router for consistent CORS handling
- Remove unused tower_http import from v1 router
- Simplify toolbar home button styling and remove fade shadow effect
- Add microphone availability check in voice recording initialization
- Add JetBrains platform detection to disable voice features on unsupported IDEs
- Clean up CSS comments for better readability
Add trajectory button state management to AgentCapabilities component
and integrate with ChatForm context warnings. Include agent monitor
background task in startup sequence and add task agent error handling.

Includes CSS improvements for callout warnings and humantime dependency.
- Add `task_memory_save` and `task_memories_get` tools for task persistence
- Implement automatic task memory injection into planner/agent chats
- Update task tools list and chat mode filtering
- Fix metering utils to support new `extra` field format with comprehensive tests
- Format and clean up customization config comments
- Fix thread storage to remove `tool_use` (now derived from mode)
- Minor middleware and UI spacing fixes

Includes task memory management for sharing insights across planner iterations
and agents, plus metering compatibility for new backend response format.
Add task_memory_save and task_memories_get tools for persistent task
state sharing across planner iterations and agents

Implement automatic memory injection into planner/agent chat contexts

Add real-time task events SSE endpoint with snapshot/CRUD operations

Fix metering utils for new extra field format with comprehensive tests

Update history storage (chats/isLoading split) and UI loading states

Remove tool_use from thread storage (derived from chat mode)

Includes task subsystem event broadcasting and GUI subscription hooks

Minor fixes: middleware, UI spacing, ContextCapButton HoverCard wrapper
…ost reasoning

Expose `supportsBoostReasoning` from `useThinking` hook and early return
`null` from `ThinkingButton` component when feature is unsupported,
improving UX by avoiding misleading UI states.
Add root_chat_id field to ThreadParams and AtCommandsContext to track the
root chat in subchat hierarchies. Introduce abort_flag to enable cancellation
of subchat execution. Refactor AtCommandsContext initialization with
new_with_abort() method for flexible abort flag injection. Update subchat
configuration and execution to propagate abort signals and maintain chat
lineage through handoffs and trajectory operations.
- Add missing root_chat_id field to ThreadParams in trajectories.rs test
- Add missing trajectory_id parameter to handoff_select() call in test
- Update 14 trajectory_ops tests to account for handoff_context_msg
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.

2 participants