Commit Graph

380 Commits

Author SHA1 Message Date
digua
5124b26028 feat: 设置页面重构 2026-03-16 00:27:55 +08:00
digua
4df938a152 docs: update 2026-03-16 00:27:55 +08:00
digua
a633b4f326 feat: 支持繁体中文和日语国际化 2026-03-16 00:27:55 +08:00
digua
e7f2ee7db7 style: format and lint codebase 2026-03-16 00:27:55 +08:00
digua
ebff151d36 feat: 提升导出聊天记录的展示位置 2026-03-10 23:42:44 +08:00
digua
502e604a8e feat: 总览模块样式调整 2026-03-10 23:28:12 +08:00
digua
2b354d269b feat: 移除自定义筛选的AI功能 2026-03-10 22:56:47 +08:00
digua
bfe72d8e44 feat: AI对话界面UI优化 2026-03-10 22:32:55 +08:00
digua
6edb3e3b95 feat: 优化助手逻辑 2026-03-10 21:35:53 +08:00
digua
60be78b767 feat: 完善助手功能,新增分析tools 2026-03-10 20:42:25 +08:00
digua
f36623d72e feat: 完成助手模式初版 2026-03-02 01:19:54 +08:00
digua
c6aaa733ae release: v0.12.1 v0.12.1 2026-02-28 10:51:59 +08:00
digua
729b19f716 fix: 修复预处理设置页面的两个BUG
1. 修复 i18n 中 desensitizeRulePatternPlaceholder 的 {4,6} 被 vue-i18n
   解析为插值占位符导致 SyntaxError: 7
2. 修复 setLocale 中将 Vue 响应式 Proxy 直接通过 IPC 发送导致
   structured clone 失败 (An object could not be cloned)
2026-02-28 10:51:16 +08:00
Beck
1ad4c69ed7 docs: fix broken documentation links 2026-02-28 09:54:37 +08:00
digua
4000d4c27c chore: remove error package lock version 2026-02-28 00:23:02 +08:00
digua
9ce333afe3 feat(ai): 增加 DEBUG 模式与 AI 日志增强
- 设置>关于 新增 DEBUG 模式开关,开启后日志记录完整消息不截断
- aiLogger 支持 debugMode 控制截断行为
- Agent 执行前在 DEBUG 模式下记录完整 System Prompt 和消息历史
- INFO 日志增强:记录模型/Provider/API地址、上下文配置、预处理开关
- 工具调用日志升级:记录完整参数(tool_start)
- 预处理管道统计提升至 INFO 级别
2026-02-28 00:02:12 +08:00
digua
dc0881e279 feat(ai): 预处理设置界面与配置管理
- 新增 AIPreprocessTab.vue:数据清洗/去噪/合并/脱敏/匿名化开关、脱敏规则管理、黑名单编辑
- AISettingsTab 调整 Tab 顺序:预处理放在对话配置下方
- settings store 新增 aiPreprocessConfig 持久化 + debugMode 定义
- useAIChat 序列化 preprocessConfig 防止 IPC 克隆错误
- 中英文 i18n 翻译(预处理 + 脱敏规则 + DEBUG 模式)
2026-02-28 00:02:12 +08:00
digua
c36878c58d feat(ai): 实现聊天记录预处理管道
- 新增 preprocessor 模块:数据清洗(XML卡片)、黑名单过滤、智能去噪、连续发言合并、数据脱敏
- 内置多国脱敏规则(中国手机号/身份证、美国SSN、日韩号码等)+ 自定义规则支持
- 工具层统一 wrapWithPreprocessing 包装,自动对 rawMessages 执行预处理+格式化
- 昵称匿名化:用 U{id} 替代真实昵称,跨工具调用一致
- SQL 查询补充 senderId/senderPlatformId
- PreprocessConfig 类型定义(preload + 主进程)
2026-02-28 00:02:08 +08:00
digua
1823042fad style: auto-format code (eslint --fix)
Formatting-only changes from ESLint auto-fix, no logic changes.

Made-with: Cursor
2026-02-27 20:22:18 +08:00
digua
07fffb0112 refactor: data flow inversion, IPC contract fixes, and frontend adaptation
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
2026-02-26 21:06:27 +08:00
digua
1b059a52cc refactor: add shared types and improve ChatStatusBar with i18n
- 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
2026-02-26 21:06:03 +08:00
digua
e6849af698 refactor(agent): split monolithic Agent into modular architecture
- 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
2026-02-26 21:05:50 +08:00
digua
f7c427df50 refactor(tools): modularize tool system with AgentTool + TypeBox + i18n
- 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
2026-02-26 21:05:39 +08:00
digua
90afe5f087 refactor(llm): unify LLM access layer via pi-ai
- 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
2026-02-26 21:05:28 +08:00
digua
da3d2531f5 chore: remove over-engineered sessionLog module
Delete sessionLog.ts and its test — this module was never used in production
and added unnecessary complexity to the context system.
2026-02-26 21:05:17 +08:00
digua
b9daae8cb4 chore: remove @ai-sdk dependencies and legacy LLM service implementations
- 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.)
2026-02-26 21:05:08 +08:00
n-WN
284118ca21 feat(agent): add session-based context timeline and runtime status 2026-02-23 19:17:25 +08:00
digua
fe0a2ed010 fix: 部分UI在英文设置下未国际化 2026-02-21 14:23:18 +08:00
digua
bc6c385c39 chore: 更新项目描述 2026-02-20 11:38:10 +08:00
digua
8a12aa5c1b refactor: 重构部分图表为插件形式 2026-02-19 22:56:41 +08:00
digua
1f4c0cfbf7 chore: 暂时隐藏向量模型配置 2026-02-16 17:38:46 +08:00
digua
90e4502e1d fix: Windows 上动态更新 overlay 颜色以匹配主题 2026-02-16 17:14:23 +08:00
digua
0988aad607 release: v0.11.2 v0.11.2 2026-02-15 11:16:39 +08:00
digua
e198aedc67 feat: 优化windows下右上角控制栏样式 2026-02-15 11:16:03 +08:00
digua
89b479e292 feat: 优化聊天记录嗅探层,支持轮询检测和fallback 2026-02-13 17:11:55 +08:00
digua
2a925aef29 feat: 增强LINE和WhatsApp解析器兼容格式 2026-02-13 17:11:55 +08:00
digua
e617d9bcdd docs: update 2026-02-13 17:11:55 +08:00
digua
a24c463f89 feat: 优化UI,增加主页面空间 2026-02-13 17:11:55 +08:00
digua
ab1778a6d6 feat: 管理页面支持显示聊天对话的 摘要数量和AI对话数量 2026-02-13 17:11:55 +08:00
digua
8dcbc7eba7 feat: 管理页面支持按shift多选 2026-02-13 17:11:55 +08:00
digua
35768bbfbd feat: 支持tg的单个对话导入 2026-02-13 17:11:55 +08:00
digua
a8a5084521 release: v0.11.0 v0.11.0 2026-02-13 14:53:16 +08:00
digua
79b57721bf feat: 完善AI调用国际化 2026-02-13 14:15:38 +08:00
digua
d52769ce46 feat: 日志国际化 2026-02-13 14:15:38 +08:00
digua
1b8bbb6e49 feat: 主进程配置国际化 2026-02-13 14:15:38 +08:00
digua
83c0641bf3 fix: 修复增量导入后索引失效的问题 resolve #81 2026-02-13 14:15:38 +08:00
digua
21d1426405 fix: 修复切换对话页面闪两次的问题 2026-02-13 14:15:38 +08:00
digua
c7e6457221 feat: support telegram message import 2026-02-13 14:15:38 +08:00
digua
98de8d857c fix: 修复WhatsApp使用iPhone导出后无法识别的问题 resolve #82 2026-02-13 14:15:38 +08:00
digua
cb443ea7ea feat: 优化增量导入交互和文案 2026-02-13 14:15:38 +08:00