Skip to content

Conversation

@zerob13
Copy link
Collaborator

@zerob13 zerob13 commented Jan 5, 2026

Release Notes (v0.5.6-beta.4)

Features

  • Add terminal usage support for agent loop to enhance interactive agent workflows
  • Add MCP tool annotations to all in-memory servers for better tool discovery and integration
  • Support image API settings to allow more flexible image generation/configuration

Improvements

  • Refine model type inference and tooltip focus behavior in config to improve UX
  • Refactor agent-session lifecycle to make session management more robust and maintainable
  • Upgrade markstream-vue dependency to bring better markdown rendering and performance
  • Clean up architecture docs and add the usePresenter IPC pattern documentation

Bug Fixes

Chores

  • Add SDD rules configuration to improve static checks and development workflow
  • Add sponsor "zai" to the project metadata
  • Bump version and prepare release v0.5.6-beta.4

版本说明 (v0.5.6-beta.4)

新增功能

  • 为 Agent 循环新增终端使用支持,增强交互式代理工作流能力
  • 为所有内存服务器增加 MCP 工具注解,提升工具发现与集成能力
  • 新增图像 API 配置支持,提供更灵活的图像生成与配置能力

功能优化

  • 优化配置中的模型类型推断逻辑及 Tooltip 聚焦行为,提升使用体验
  • 重构 Agent Session 生命周期管理,提升会话管理的稳定性与可维护性
  • 升级 markstream-vue 依赖,改进 Markdown 渲染效果与性能
  • 清理与整理架构文档,并补充 usePresenter IPC 模式的使用说明

问题修复

其他更新

  • 新增 SDD 规则配置,改进静态检查与开发流程
  • 在项目信息中新增赞助商 "zai"
  • 更新版本号并完成 v0.5.6-beta.4 发布准备

zhangmo8 and others added 14 commits December 29, 2025 09:46
* feat(terminal): track running terminal commands

* feat: support better terminal parse

* feat: add terminal tool permission

* feat: add i18n and command permission request

* feat(workspace): add terminal interactions

* chore: remove markdown

* feat: i18n for terminal

* fix: add missing i18n and fix review

* chore: merge duplicate i18n

* feat: full bash support

* chore: remove empty object in i18n

* fix: i18n and review

* chore: update providers config

* chore: i18n
chore: upgrade markstream-vue
* refactor(agent): add presenter lifecycle

* fix(presenter): prioritize conversation chatMode over global config

Fix conversation state loss when switching between conversations.
Previously, chatMode was always read from global config, causing mode
to reset. Now reads conversation.settings.chatMode first with fallback.

- streamGenerationHandler: resolve chatMode from conversation.settings
- permissionHandler: resolve chatMode from conversation.settings
- messageBuilder: resolve chatMode from conversation.settings
- agentLoopHandler: refactor resolveWorkspaceContext to prioritize conversation chatMode

* refactor(agent-presenter): migrate chat flow

* fix(agent-presenter): sync types and trace loading

* fix(agent-presenter): use agent id for trace

* refactor(agent-presenter): centralize session lifecycle

* test(tool-presenter): pass command permission handler

* refactor(agent-presenter): align naming

* refactor: remove llama cpp presenter

* refactor(session): initialize sessionPresenter architecture with core types and interfaces

- Add Session type definitions with unified session concept
- Add ISessionPresenter interface for all session operations
- Add SESSION_EVENTS constants
- Create sessionPresenter directory structure for:
  - tab management
  - session lifecycle
  - persistence layer
  - message handling
  - tool management
  - loop orchestration
  - ACP agent module
  - utility functions

This establishes the foundation for unifying conversation/thread/session concepts
into a single Session abstraction where 'conversation' only exists at the SQLite level.

* refactor(session): create persistence layer with ConversationPersister and MessagePersister

- Extract pure SQLite CRUD operations from ConversationManager and MessageManager
- Add ConversationPersister for conversation data operations
- Add MessagePersister for message data operations
- Establish separation between data access layer and business logic
- Both persisters delegate to ISQLitePresenter with no business logic
- Prepare foundation for removing business logic from data layers

This provides clean separation for the new Session architecture where
'conversation' exists only as a persisted entity, while 'session' is the
runtime abstraction.

* refactor(session): add TabManager for Session-Tab binding management

- Add TabManager to manage Session-Tab bindings independently
- Extract tab binding logic from ConversationManager
- Support multi-window session activation (main vs floating)
- Add TabAdapter interface for integrating with TabPresenter
- Implement session lifecycle callbacks (created/closed/activated)
- Manage tab metadata tracking (window type, timestamps)

This establishes a dedicated tab management layer that separates UI concerns
(tab switching) from session management, enabling cleaner separation of concerns
in the new Session architecture.

* refactor(session): fix SessionPresenter facade and loop module imports

- Fix imported types for Session, Message, CONVERSATION_SETTINGS from correct paths
- Add proper TypeScript imports for chat types
- Update setStatus and incrementToolCallCount to return Promise<void> to match interface
- Update updateRuntime to await SessionManager method
- Fix updateMessageStatus to map 'generating' to 'pending' for SQLite compatibility
- Add proper null handling in getMessage
- Implement parseMessageContent helper for content transformation
- Fix agentLoopHandler import paths to use correct presenter paths
- Copy errorClassification from llmProviderPresenter to sessionPresenter/loop
- Add StreamState interface to loopState.ts
- Make agentLoopHandler, toolCallCenter, configPresenter readonly
- Use underscore prefix for unused parameters in stub methods
- Copy utility/promptEnhancer from agentPresenter to sessionPresenter

* refactor(session): implement getDefaultAgentWorkspacePath in SessionManager

- Add electron app, fs, and path imports
- Implement default workspace path creation in temp/deepchat-agent/workspaces
- Create conversation-specific workspace directories
- Fallback gracefully to temp root if directory creation fails
- Remove unused workspacePresenter dependency from options

* refactor(session): implement message sending and loop control in SessionPresenter

- Add ILlmProviderPresenter dependency to SessionPresenter
- Add LoopOrchestrator and activeLoops state management
- Implement sendMessage method:
  - Generate unique message IDs using timestamp + random
  - Create user message in SQLite via MessagePersister
  - Create assistant message stub in SQLite
  - Start loop via SessionManager.startLoop
- Implement continueLoop:
  - Call SessionManager.startLoop
  - Create abort controller for active loop state
- Implement cancelLoop:
  - Abort active loop controller
  - Set session status to idle
- Fix MessagePersister.insertMessage to accept isContextEdge parameter

* refactor(session): move ACP agent modules from llmProviderPresenter to sessionPresenter/acp

- Copy all ACP agent modules to sessionPresenter/acp:
  - acpCapabilities.ts, acpContentMapper.ts
  - acpProcessManager.ts, acpSessionManager.ts, acpSessionPersistence.ts
  - AcpTerminalManager.ts, agentBashHandler.ts, agentFileSystemHandler
  - AgentToolManager.ts, mcpConfigConverter, mcpTransportFilter, shellEnvHelper
  - acpMessageFormatter.ts, acpFsHandler.ts, commandProcessTracker
  - types.ts
- Create acp/index.ts barrel file with proper exports
- Remove incorrect class/interface exports (use correct function/class exports)

* refactor(session): remove and document threadPresenter dependencies

- Update agentLoopHandler:
  - Add optional sessionManager parameter to AgentLoopHandlerOptions
  - Replace presenter.threadPresenter.getConversation with sessionManager.getSession
  - Remove unused import (isNonRetryableError, Session type)
- Update messageBuilder:
  - Add TODO comment for ContentEnricher import from threadPresenter
  - Document future refactoring plan to move to shared utility

- Update ACP modules:
  - Add TODO comments for agentBashHandler.ts
  - Add TODO comments for agentToolManager.ts
  - Document future refactoring plan to move CommandPermissionHandler

All threadPresenter dependencies are now documented with TODOs explaining they are temporary and should be moved to shared locations in future refactoring.

* refactor(session): add TODO comment for full stream handling integration

- Add detailed TODO comment in sendMessage() method
- Document remaining work items:
  - Call llmProviderPresenter.startStreamCompletion()
  - Use LoopOrchestrator.consume() for event processing
  - Real-time message content updates via MessagePersister
  - Handle tool calls, permissions, search results
  - Manage abort signal through activeLoops state
- Current implementation returns stub with message persistence
- Real-time streaming will be added in future integration phase

* refactor(session): implement full AsyncGenerator stream handling in sendMessage

- Implement complete LLM event handling:
  - handleLLMAgentResponse: Update message content in real-time
  - handleLLMAgentError: Set message status to error, cleanup state
  - handleLLMAgentEnd: Cleanup active loops, set idle status

- Implement sendMessage with full stream integration:
  - Create user/assistant messages in SQLite
  - Start loop and create abort controller for activeLoops state
  - Get conversation settings from ConversationPersister
  - Query recent context messages for prompt preparation
  - Build userMessage object with Message interface compliance
  - Call preparePromptContent to build conversation context
  - Call llmProviderPresenter.startStreamCompletion()
  - Use LoopOrchestrator.consume() to process AsyncGenerator stream
  - Handle errors: update status to error, cleanup state

- Add proper type imports and remove unused imports
- Ensure Message usage struct matches chat.d.ts requirements

* refactor(presenter): migrate session modules

* chore(search): remove unused artifacts template

* refactor(sessionPresenter): drop unused manager

* refactor(agentPresenter): move acp module

* refactor(agentPresenter): move loop module

* refactor(agentPresenter): move streaming module

* refactor(agentPresenter): move permission handler

* refactor(agentPresenter): move tool module

* refactor(agentPresenter): move message module

* refactor(agentPresenter): move utility module

* refactor(presenter): split agent/session roles

* docs(presenter): note session proxy binding

* refactor(presenter): share message manager

* refactor(renderer): use session presenter

* refactor(acp): expand barrel exports

* refactor(acp): update import paths

* refactor(acp): remove duplicate agent files

* docs(acp): update ACP path references

* docs(docs): reorganize documentation structure

- Delete outdated architecture and migration docs
- Archive thread-presenter and workspace migration plans to archives/
- Create new concise architecture docs focusing on current system
- Add ARCHITECTURE.md with overall system overview and file locations
- Add FLOWS.md with 6 core sequence diagrams (message send, Agent Loop, tools, etc.)
- Add detailed architecture docs:
  - session-management.md - SessionPresenter, SessionManager, lifecycles
  - agent-system.md - Agent Loop, streaming, permissions (with code refs)
  - tool-system.md - ToolPresenter routing, MCP, Agent tools
  - event-system.md - EventBus, event constants, communication patterns
- Add developer guides:
  - getting-started.md - Setup, commands, workflow
  - code-navigation.md - Find code by function and component
  - debugging.md - Debug techniques for main/renderer processes
- All docs mark key file locations (path + line numbers) for quick navigation
- Write in Chinese for better developer accessibility
- Streamline docs to 400-600 lines focusing on 'what' and 'where'

* refactor(agent-loop): consolidate loop handlers
Remove outdated line counts from component tables, add comprehensive documentation for usePresenter IPC communication pattern between renderer and main process
* feat: add MCP tool annotations to all in-memory servers

Add tool annotations (title, readOnlyHint, destructiveHint, openWorldHint)
to 14 in-memory MCP server files following the MCP specification.

Annotated servers:
- imageServer: 7 tools (image read/upload/describe/query/ocr)
- artifactsServer: 1 tool (get artifact instructions)
- autoPromptingServer: 3 tools (prompt template operations)
- bochaSearchServer: 2 tools (web/AI search)
- braveSearchServer: 2 tools (web/local search)
- builtinKnowledgeServer: 1 tool (knowledge search)
- conversationSearchServer: 5 tools (search/history/stats/tabs)
- deepResearchServer: 5 tools (research session workflow)
- difyKnowledgeServer: 1 tool (knowledge search)
- fastGptKnowledgeServer: 1 tool (knowledge search)
- ragflowKnowledgeServer: 1 tool (knowledge search)
- meetingServer: 1 tool (start meeting)
- powerpackServer: 5 tools (time/web info/shell/code execution)
- appleServer: 7 tools (calendar/contacts/mail/maps/messages/notes/reminders)

This improves LLM understanding of tool behaviors and enables better
tool selection and safety decisions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* fix: correct destructiveHint for generate_final_answer tool

The tool deletes the research session when cleanup occurs, so it should
have destructiveHint: true to properly signal destructive behavior.

Addresses CodeRabbit review feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* fix: correct readOnlyHint for execute_single_web_search tool

The tool modifies session state by pushing search results to
session.search_results, so readOnlyHint should be false.

Addresses CodeRabbit review feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* chore: remove trailing commas in MCP tool annotations

---------

Co-authored-by: triepod-ai <199543909+triepod-ai@users.noreply.github.com>
Co-authored-by: zerob13 <zerob13@gmail.com>
* types(shared): add api endpoint type

* feat(provider): add api endpoint routing

* feat(config): add api endpoint default

* feat(ui): add api endpoint selector

* feat(i18n): add api endpoint copy

* chore: add i18n
* docs(sdd): add specification-driven development guide

Add comprehensive SDD methodology guide for AI-assisted development
with focus on architectural consistency, minimal complexity, and
forward compatibility principles.

* refactor(rules): consolidate and restructure AI/code editor guidelines

Remove fragmented rule files and consolidate into comprehensive guides:
- Expand development-setup.mdc with complete commands and best practices
- Update i18n.mdc with 12-language support and quality guidelines
- Add vue-stack-guide.mdc for Vue 3, Pinia, Shadcn, Tailwind patterns
- Remove obsolete agent and rule files

Improve maintainability and reduce duplication while preserving all guidance.

* docs(sdd): enhance guidance with spec artifacts and compatibility awareness

Add lightweight spec artifact recommendations and update compatibility/migration
emphasis in SDD methodology guidance.
* chore: add sponsor zai

* docs: add sponsor section to README table of contents
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zerob13 zerob13 merged commit 2fa944a into main Jan 5, 2026
2 checks passed
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.

7 participants