Skip to content

[pull] main from hellodigua:main#22

Open
pull[bot] wants to merge 233 commits into
smart-z:mainfrom
ChatLab:main
Open

[pull] main from hellodigua:main#22
pull[bot] wants to merge 233 commits into
smart-z:mainfrom
ChatLab:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Feb 15, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull Bot locked and limited conversation to collaborators Feb 15, 2026
@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Feb 15, 2026
hellodigua and others added 14 commits February 20, 2026 11:38
…ions

- Remove @ai-sdk/google, @ai-sdk/openai, ai packages from dependencies
- Delete SDK-based service files: gemini.ts, openai-compatible.ts, sdkUtils.ts
- Clean up unused types from llm/types.ts (ChatMessage, ChatOptions, LLMConfig, ILLMService, etc.)
Delete sessionLog.ts and its test — this module was never used in production
and added unnecessary complexity to the context system.
- Refactor llm/index.ts: remove chat()/chatStream() wrappers, inline
  provider info from deleted service files, add buildPiModel() for
  direct pi-ai model construction
- Migrate summary/index.ts to use pi-ai's completeSimple directly
- Migrate rag/pipeline/semantic.ts to use pi-ai's completeSimple directly
- Delete monolithic registry.ts (−1185 lines)
- Add tools/definitions/ with 12 individual tool files + index.ts,
  each using AgentTool interface and TypeBox schemas
- Add tools/utils/ with shared helpers (format.ts, schemas.ts, time-params.ts)
- Rewrite tools/index.ts to provide getAllTools() factory
- Clean up tools/types.ts, keep only ToolContext and OwnerInfo
- Use i18n keys for tool descriptions, preserve Chinese as comments
- Delete monolithic agent.ts (−1464 lines)
- Add agent/index.ts: Agent orchestrator class with runAgent/runAgentStream
- Add agent/types.ts: AgentConfig, AgentStreamChunk, AgentResult, PromptConfig
- Add agent/prompt-builder.ts: system prompt construction with i18n
- Add agent/content-parser.ts: thinking tag and tool call tag parsing
- Add agent/event-handler.ts: runtime state, event mapping, token estimation
- Add electron/shared/types.ts as single source of truth for
  TokenUsage and AgentRuntimeStatus across main/preload/renderer
- Refactor ChatStatusBar.vue to use shared types and i18n keys
  instead of hardcoded phase text mappings
- Add phaseShort translations for zh-CN and en-US
…ation

Data flow inversion:
- Add getHistoryForAgent() in conversations.ts — Agent now reads
  history directly from SQLite instead of receiving it from frontend
- Remove historyMessages parameter from agent:runStream IPC chain,
  add maxHistoryRounds for configurable context window
- Frontend (useAIChat.ts) pre-creates conversation before Agent call,
  removes history message collection logic

IPC fixes:
- Restore llm:chat and llm:chatStream handlers using pi-ai's
  completeSimple/streamSimple (P0-1: SQLLab compatibility)
- Send agent:complete with aborted flag in all abort paths to prevent
  hanging Promises in renderer (P0-2)
- Fix createConversation parameter order to match preload/data layer
  contract: (sessionId, title?) instead of (title, sessionId?) (P1)

Preload/frontend:
- Update preload API signatures and type declarations
- Use shared types for TokenUsage and AgentRuntimeStatus
Formatting-only changes from ESLint auto-fix, no logic changes.

Made-with: Cursor
- 新增 preprocessor 模块:数据清洗(XML卡片)、黑名单过滤、智能去噪、连续发言合并、数据脱敏
- 内置多国脱敏规则(中国手机号/身份证、美国SSN、日韩号码等)+ 自定义规则支持
- 工具层统一 wrapWithPreprocessing 包装,自动对 rawMessages 执行预处理+格式化
- 昵称匿名化:用 U{id} 替代真实昵称,跨工具调用一致
- SQL 查询补充 senderId/senderPlatformId
- PreprocessConfig 类型定义(preload + 主进程)
- 新增 AIPreprocessTab.vue:数据清洗/去噪/合并/脱敏/匿名化开关、脱敏规则管理、黑名单编辑
- AISettingsTab 调整 Tab 顺序:预处理放在对话配置下方
- settings store 新增 aiPreprocessConfig 持久化 + debugMode 定义
- useAIChat 序列化 preprocessConfig 防止 IPC 克隆错误
- 中英文 i18n 翻译(预处理 + 脱敏规则 + DEBUG 模式)
- 设置>关于 新增 DEBUG 模式开关,开启后日志记录完整消息不截断
- aiLogger 支持 debugMode 控制截断行为
- Agent 执行前在 DEBUG 模式下记录完整 System Prompt 和消息历史
- INFO 日志增强:记录模型/Provider/API地址、上下文配置、预处理开关
- 工具调用日志升级:记录完整参数(tool_start)
- 预处理管道统计提升至 INFO 级别
beckxie and others added 3 commits February 28, 2026 09:54
1. 修复 i18n 中 desensitizeRulePatternPlaceholder 的 {4,6} 被 vue-i18n
   解析为插值占位符导致 SyntaxError: 7
2. 修复 setLocale 中将 Vue 响应式 Proxy 直接通过 IPC 发送导致
   structured clone 失败 (An object could not be cloned)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants