diff --git a/docs/02-user-guide/05-super-document/01-overview.md b/docs/02-user-guide/05-super-document/01-overview.md index df04ccc..dcaa3f4 100644 --- a/docs/02-user-guide/05-super-document/01-overview.md +++ b/docs/02-user-guide/05-super-document/01-overview.md @@ -45,28 +45,24 @@ keywords: [超级文书, Super Document, Diff, 协作写作, AI 写作] ## 一图看懂超级文书流程 +```mermaid +flowchart TD + A[你发起写作任务] --> B[智能体生成或修改内容] + B --> C[Diff 视图展示所有变更] + C --> D{你逐条审阅} + D -->|接受| E[修改生效] + D -->|拒绝| F[恢复原文] + D -->|编辑| G[手动调整] + E --> H[确认后形成新版本] + F --> H + G --> H + H --> I[继续对话,进一步迭代...] + + style C fill:#fff3cd,stroke:#ffc107 + style H fill:#d4edda,stroke:#28a745 ``` -你发起写作任务 - | - v -智能体生成或修改内容 - | - v -Diff 视图展示所有变更 <-- 红色 = 删除,绿色 = 新增 - | - v -你逐条审阅 - | - +--> 接受:修改生效 - +--> 拒绝:恢复原文 - +--> 编辑:手动调整 - | - v -确认后形成新版本 - | - v -继续对话,进一步迭代... -``` + +> 💡 **Diff 视图**中,红色 = 删除绿色 = 新增,让每一处修改一目了然。 每一轮修改都会被记录为一个版本。你可以随时回到任何历史版本,就像代码的 Git 历史一样。 @@ -74,3 +70,5 @@ Diff 视图展示所有变更 <-- 红色 = 删除,绿色 = 新增 - [协作写文档](./02-collaborative-writing.md) — 学习如何与智能体一起写文档 - [Diff 可视化](./03-diff-view.md) — 了解修改对比视图的使用方法 +- [审阅变更](./04-review-changes.md) — 逐条接受、拒绝或编辑 AI 的修改 +- [版本历史](./05-version-history.md) — 回溯任意历史版本,安全回滚 diff --git a/docs/02-user-guide/05-super-document/04-review-changes.md b/docs/02-user-guide/05-super-document/04-review-changes.md index b79dc26..31e72dd 100644 --- a/docs/02-user-guide/05-super-document/04-review-changes.md +++ b/docs/02-user-guide/05-super-document/04-review-changes.md @@ -91,6 +91,47 @@ keywords: [审阅, 接受修改, 拒绝修改, 批量操作, 逐条审阅] | 跳转到下一个修改 | `]` | | 跳转到上一个修改 | `[` | +## 审阅完成后的操作 + +当你审阅完所有修改后(进度条显示"8/8 已审阅"),超级文书会: + +1. 自动将所有已接受的修改合并到正文 +2. 生成一个新的版本快照 +3. 退出审阅模式,回到正常编辑状态 + +此时你可以: + +- **继续对话迭代** — 在对话框中输入进一步要求,如"第二段语气再正式一些",智能体会基于当前版本再次修改 +- **手动编辑** — 直接在文档中修改文字,这些修改也会记录在新版本中 +- **结束协作** — 关闭文档,所有版本已自动保存 + +## 编辑后重新提交审阅 + +如果你对文档做了手动编辑,想请智能体再审一遍或继续修改: + +1. 在对话框中描述你的需求(如"帮我检查全文的逻辑连贯性") +2. 智能体会基于**包含你手动修改的最新版本**进行新一轮修改 +3. 新的 Diff 视图只展示本轮新增的变更,不会重复显示已确认的内容 + +:::tip 三种迭代方式 +| 方式 | 适用场景 | 操作 | +|------|----------|------| +| 对话追加要求 | 对整体方向有调整 | 在对话框输入新指令 | +| 评论反馈 | 针对具体某处修改有意见 | 在审阅时添加评论 | +| 手动编辑后再提交 | 你想自己先改,再让 AI 润色 | 直接编辑文档后发起新对话 | +::: + +## 审阅策略建议 + +面对大量修改时,推荐以下审阅策略: + +| 场景 | 建议策略 | +|------|----------| +| 修改少于 5 处 | 逐条审阅,每处都仔细看 | +| 修改 5-20 处 | 先拒绝明显不对的,再逐条看剩余 | +| 修改超过 20 处 | 先快速浏览全貌,对关键段落逐条审,其余批量接受 | +| 对 AI 修改高度信任 | 直接批量接受,事后通读全文 | + ## 下一步 - [版本历史](./05-version-history.md) — 了解如何查看和管理文档的版本历史 diff --git a/docs/02-user-guide/07-memory/03-view-manage.md b/docs/02-user-guide/07-memory/03-view-manage.md index d76988f..7f58de5 100644 --- a/docs/02-user-guide/07-memory/03-view-manage.md +++ b/docs/02-user-guide/07-memory/03-view-manage.md @@ -36,11 +36,13 @@ keywords: [记忆管理, 查看记忆, 编辑记忆, 删除记忆, 记忆搜索] 点击"来源会话"链接,可以回到产生这条记忆的原始对话上下文,了解完整的讨论背景。 ::: -## 搜索记忆 +## 搜索与筛选记忆 -当记忆条目较多时,你可以使用搜索功能快速定位: +当记忆条目较多时,你可以通过搜索和筛选快速定位目标记忆。 -**自然语言搜索** — 在搜索框中输入你想查找的内容: +### 自然语言搜索 + +在搜索框中输入你想查找的内容: - "关于报告格式的偏好" - "项目 Alpha 的决策" @@ -48,6 +50,25 @@ keywords: [记忆管理, 查看记忆, 编辑记忆, 删除记忆, 记忆搜索] 系统会在所有域中进行语义搜索,返回最相关的结果。高置信度的记忆会优先展示。 +### 按类型筛选 + +每条记忆都带有类型标签,你可以按类型快速过滤: + +| 类型 | 含义 | 典型内容 | +|------|------|----------| +| `fact` | 客观事实 | "用户是产品经理"、"公司使用 React 技术栈" | +| `preference` | 主观偏好 | "喜欢简洁的文风"、"报告不要超过两页" | +| `decision` | 已做决策 | "选用 PostgreSQL 作为主数据库" | +| `commitment` | 承诺事项 | "下周三前提交初稿" | +| `milestone` | 重要事件 | "v2.0 于 6 月上线" | +| `lesson` | 经验教训 | "凌晨部署容易出问题" | + +### 按域和时间过滤 + +- **域过滤**:切换到特定域标签页(关系 / 共享 / 核心),只查看该域下的记忆 +- **时间排序**:默认按创建时间倒序,可切换为"最近使用"排序,查看哪些记忆最活跃 +- **固定优先**:开启后,被 Pin 的记忆始终显示在列表顶部 + ## 编辑记忆 如果发现某条记忆不够准确,你可以直接编辑: @@ -75,12 +96,12 @@ keywords: [记忆管理, 查看记忆, 编辑记忆, 删除记忆, 记忆搜索] 删除记忆后,智能体将无法再引用这条信息。请确认你不再需要它。不过,记忆的历史记录仍保留在版本控制中,技术上可以恢复。 ::: -## 标记重要记忆 +## 标记重要记忆(Pin / Unpin) 对于特别重要的记忆,你可以将其标记为**固定(Pin)**: 1. 找到重要的记忆条目 -2. 点击固定/置顶按钮 +2. 点击固定/置顶按钮(📌 图标) 3. 该记忆将获得"永不遗忘"保护 被固定的记忆不会因自动遗忘机制而被压缩或清理。适合用于: @@ -89,6 +110,27 @@ keywords: [记忆管理, 查看记忆, 编辑记忆, 删除记忆, 记忆搜索] - 重要的个人偏好 - 不能遗忘的承诺和约定 +**取消固定(Unpin)**:如果某条记忆不再需要最高优先级保护,再次点击 📌 图标即可取消。取消后,该记忆恢复为普通条目,可能在未来被自动压缩。 + +:::tip Pin 的数量建议 +固定记忆建议控制在 10 条以内。Pin 过多会占用每次对话的上下文预算,反而影响智能体获取新信息的空间。 +::: + +## 批量管理 + +当需要清理大量过时记忆时,可以使用批量操作: + +1. 进入记忆列表,开启**多选模式**(列表顶部复选框) +2. 勾选需要操作的记忆条目 +3. 使用底部操作栏执行: + - **批量删除** — 一次性清除多条无用记忆 + - **批量固定** — 将多条相关记忆同时设为 Pin + - **导出** — 将选中记忆导出为 Markdown 文件,便于归档或迁移 + +:::caution 批量删除需确认 +批量删除会弹出二次确认对话框,显示将要删除的记忆数量和摘要。确认后不可直接撤销(但版本历史中仍保留记录)。 +::: + ## 审阅候选记忆 每次对话结束后,系统可能会生成候选记忆供你审阅: diff --git a/docs/02-user-guide/07-memory/04-auto-learning.md b/docs/02-user-guide/07-memory/04-auto-learning.md index f2163c6..9dfa6c9 100644 --- a/docs/02-user-guide/07-memory/04-auto-learning.md +++ b/docs/02-user-guide/07-memory/04-auto-learning.md @@ -55,8 +55,18 @@ DesireCore 的记忆系统不仅能记住,还会自动学习和适度遗忘— 每条记忆会经历以下阶段: -``` -活跃(Active)→ 近期(Recent)→ 归档(Archived)→ 压缩(Compressed)→ 清理(Pruned) +```mermaid +flowchart LR + A[活跃\nActive] --> B[近期\nRecent] + B --> C[归档\nArchived] + C --> D[压缩\nCompressed] + D --> E[清理\nPruned] + + style A fill:#c8e6c9,stroke:#4caf50,color:#333 + style B fill:#fff9c4,stroke:#ffc107,color:#333 + style C fill:#ffe0b2,stroke:#ff9800,color:#333 + style D fill:#ffccbc,stroke:#ff5722,color:#333 + style E fill:#ffcdd2,stroke:#f44336,color:#333 ``` | 阶段 | 说明 | 你能看到什么 | @@ -83,8 +93,20 @@ Auto Dream 的灵感来自人类的"做梦"机制:在你不使用智能体的 加入 Auto Dream 后,完整的记忆生命周期变为: -``` -活跃(Active)→ 近期(Recent)→ 归档(Archived)→ 💤 Dream → 压缩(Compressed)→ 清理(Pruned) +```mermaid +flowchart LR + A[活跃\nActive] --> B[近期\nRecent] + B --> C[归档\nArchived] + C --> D[💤 Dream\n无损遗忘] + D --> E[压缩\nCompressed] + E --> F[清理\nPruned] + + style A fill:#c8e6c9,stroke:#4caf50,color:#333 + style B fill:#fff9c4,stroke:#ffc107,color:#333 + style C fill:#ffe0b2,stroke:#ff9800,color:#333 + style D fill:#e1bee7,stroke:#9c27b0,color:#333 + style E fill:#ffccbc,stroke:#ff5722,color:#333 + style F fill:#ffcdd2,stroke:#f44336,color:#333 ``` Dream 阶段发生在归档和压缩之间:系统扫描归档记忆中的关联内容,将多条零散记忆合并为一条结构化知识,保留核心语义的同时大幅减少存储。 diff --git a/docs/02-user-guide/09-capabilities/02-builtin-tools.md b/docs/02-user-guide/09-capabilities/02-builtin-tools.md index 32cb400..b44a209 100644 --- a/docs/02-user-guide/09-capabilities/02-builtin-tools.md +++ b/docs/02-user-guide/09-capabilities/02-builtin-tools.md @@ -141,9 +141,19 @@ keywords: [内置工具, 工具列表, 文件操作, 搜索, 命令执行, 网 | 典型场景 | 等待构建完成、轮询部署状态、控制请求频率 | :::tip Sleep 与 CreateSchedule 的区别 -`Sleep` 是当前会话内的阻塞等待,适合“等几秒后继续检查”。`CreateSchedule` 是后台异步调度,到点后创建新的执行任务,适合提醒、定期检查和独立汇报。 +`Sleep` 是当前会话内的阻塞等待,适合"等几秒后继续检查"。`CreateSchedule` 是后台异步调度,到点后创建新的执行任务,适合提醒、定期检查和独立汇报。 ::: +### TerminalControl — 交互式终端 + +创建和管理交互式终端会话(PTY),支持持续交互式操作。与 Bash 不同,TerminalControl 可以等待提示符、处理 `(y/n)` 确认、输入密码,适合需要多轮交互的场景。 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 高 | +| 需要确认 | 是 | +| 典型场景 | 运行 `npm run dev` 等长驻进程、交互式安装向导、协同终端操作 | + ## 网络类 ### WebFetch — 获取网页 @@ -199,36 +209,6 @@ Web Access 技能启用后,智能体可以使用浏览器标签页访问动态 | 需要确认 | 取决于权限和任务内容 | | 典型场景 | 跨专业分工、并行调研、让 Explore 预设只读分析代码库 | -### spawn_agent — 启动子智能体 - -启动临时子智能体处理明确的子任务。子智能体拥有独立上下文,适合并行处理独立问题。 - -| 属性 | 值 | -|------|-----| -| 风险等级 | 中 | -| 需要确认 | 取决于权限和任务内容 | -| 典型场景 | 并行阅读多个模块、拆分大型问题、隔离探索任务 | - -### handoff — 转交会话 - -将当前会话交给另一个智能体,并携带原因和上下文摘要。 - -| 属性 | 值 | -|------|-----| -| 风险等级 | 低 | -| 需要确认 | 否 | -| 典型场景 | 当前智能体判断另一个专业智能体更适合继续处理 | - -### request_help — 请求协助 - -向另一个持久智能体请求意见或帮助,可选择等待对方回复。 - -| 属性 | 值 | -|------|-----| -| 风险等级 | 低 | -| 需要确认 | 否 | -| 典型场景 | 向领域专家智能体征询建议 | - ### SendMessage — 智能体间发送消息 向另一个智能体发送消息,可携带上下文、意图和等待策略。 @@ -484,3 +464,66 @@ Web Access 技能启用后,智能体可以使用浏览器标签页访问动态 | 需要确认 | 否 | 执行确定性的高精度数学计算,适合金额、比例、统计和公式校验。 + +### GenerateDiagram — 生成图表 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 低 | +| 需要确认 | 否 | + +用 draw.io XML 渲染架构图、流程图、UML、思维导图等图表,在对话中直接展示可编辑的图表卡片。适合需要可视化表达结构、流程或关系的场景。 + +### UnderstandImage — 图像理解 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 低 | +| 需要确认 | 否 | + +给定图片 URL 返回视觉模型对图片内容的描述或回答。当主模型不支持视觉时作为降级方案使用。 + +### Canvas — 网页窗口操控 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 中 | +| 需要确认 | 视操作内容而定 | + +操控 Electron 窗口,支持网页展示、JS 执行、截图和 A2UI 消息推送。适合需要渲染网页并与之交互的场景。 + +### EnterWorktree / ExitWorktree — 隔离工作区 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 中 | +| 需要确认 | 是 | + +为当前操作创建或重用隔离的 Git linked worktree,让文件修改和命令在独立目录中执行,不影响主工作区。适合需要隔离环境的开发任务。 + +### MailOperations — 邮件操作 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 中 | +| 需要确认 | 视操作内容而定 | + +调用本机 Mail Service 的 REST API,支持账户列表、邮件收发/搜索、标签、自动化规则等完整邮件操作。详见 [邮件管理](../email/overview)。 + +### ManageSchedule — 管理定时调度 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 中 | +| 需要确认 | 是 | + +创建和管理定时调度任务,支持延迟、定时、周期和 cron 表达式触发。到期后系统创建新会话执行。详见 [定时调度](../08-automation/03-scheduled-tasks.md)。 + +### RefreshAgentFS — 刷新智能体状态 + +| 属性 | 值 | +|------|-----| +| 风险等级 | 低 | +| 需要确认 | 否 | + +智能体写完 AgentFS 文件后主动调用,触发前端 UI 与工具/技能注册表的即时刷新,避免等待目录监控延迟。 diff --git a/docs/02-user-guide/09-capabilities/06-integrations-overview.md b/docs/02-user-guide/09-capabilities/06-integrations-overview.md index c3928c2..f6cff61 100644 --- a/docs/02-user-guide/09-capabilities/06-integrations-overview.md +++ b/docs/02-user-guide/09-capabilities/06-integrations-overview.md @@ -97,7 +97,7 @@ Computer Use 适合没有开放 API、需要跨多个桌面应用完成的任务 ## 自定义集成 -如果现有集成不满足你的需求,DesireCore 提供三种方式来扩展: +如果现有集成不满足你的需求,DesireCore 提供四种方式来扩展: 1. **自建 MCP 服务** — 按照 MCP 协议规范实现自己的服务端,让智能体调用你的内部 API。参见 [MCP 集成](./mcp-integration) 2. **创建技能包** — 将多个工具编排成自定义工作流,适合反复执行的复杂任务。参见 [技能包](./skill-packs) diff --git a/docs/02-user-guide/09-capabilities/07-web-access.md b/docs/02-user-guide/09-capabilities/07-web-access.md index 1c16be2..acc957d 100644 --- a/docs/02-user-guide/09-capabilities/07-web-access.md +++ b/docs/02-user-guide/09-capabilities/07-web-access.md @@ -50,11 +50,28 @@ LocalBookmarks 可以从本机浏览器书签和历史中寻找 URL 线索。它 ## 与 WebFetch / WebSearch 的关系 -优先级通常是: +DesireCore 的联网能力分三层,智能体会按成本从低到高自动选择: -1. `WebSearch` 查找公开信息 -2. `WebFetch` 读取静态网页正文 -3. Web Access 处理动态、登录态或需要操作的页面 +| 层级 | 工具 | 适用场景 | 特点 | +|------|------|----------|------| +| 1 | WebSearch | 查找公开信息、新闻、技术文档 | 不打开浏览器,直接返回搜索结果摘要 | +| 2 | WebFetch | 读取已知 URL 的网页正文 | 智能提取正文、去广告导航,15 分钟缓存 | +| 3 | Web Access | 动态页面、登录态、SPA、表单操作 | 启动受控浏览器,模拟真实用户操作 | 如果普通抓取足够完成任务,智能体不需要打开浏览器。 +## 典型使用场景 + +| 场景 | 推荐工具 | 说明 | +|------|----------|------| +| 查找某个 API 的最新文档 | WebSearch | 公开信息,搜索即可 | +| 读取一篇博客文章内容 | WebFetch | 静态页面,直接抓取正文 | +| 登录管理后台查看数据 | Web Access | 需要登录态和页面交互 | +| 操作 SPA 单页应用 | Web Access | 内容通过 JS 动态渲染 | +| 填写在线表单并提交 | Web Access | 需要输入和点击操作 | +| 截取页面当前状态 | Web Access | 需要截图能力 | + +:::tip 自动降级 +WebSearch 内部也有降级策略:优先使用 LLM 服务端搜索,不可用时降级到独立搜索 API,最后才启动浏览器子智能体。你无需手动选择,智能体会根据任务自动判断。 +::: + diff --git a/docs/02-user-guide/09-capabilities/08-media-generation.md b/docs/02-user-guide/09-capabilities/08-media-generation.md index 08d1cba..b4b1fb5 100644 --- a/docs/02-user-guide/09-capabilities/08-media-generation.md +++ b/docs/02-user-guide/09-capabilities/08-media-generation.md @@ -25,18 +25,51 @@ DesireCore 可以通过已配置的媒体 provider 生成图片、视频,并 `GenerateImage` 用于生成或编辑图片。常见能力包括: - 根据文本提示词生成图片 -- 使用一张或多张参考图生成新图 +- 使用一张或多张参考图生成新图(图生图 / 多图融合) - 调整风格、构图、尺寸和细节 - 自动保存输出并在聊天中展示 +### 图片生成 Provider 对比 + +| Provider | 模型 | 特色能力 | +|----------|------|----------| +| MiniMax | image-01 / image-01-live | 单主体一致性好;支持画风迁移(漫画、元气、中世纪、水彩) | +| Volcengine | Seedream 4.0 | 真正的图生图 / 局部重绘 / 多图融合(最多 10 张参考图) | +| DesireCore Cloud | wan2.7-image 等 | 官方云算力网关,OpenAI Images API 兼容 | +| newapi | 按 model 名路由 | new-api 网关中转,支持多厂商 | + +### 使用示例 + +在对话中直接描述你想要的图片即可: + +> "帮我生成一张赛博朋克风格的城市夜景,霓虹灯反射在雨后的街道上" + +如果需要基于参考图生成: + +> "参考这张产品照片,生成一张白底电商主图"(附带图片) + ## GenerateVideo `GenerateVideo` 用于生成视频。常见能力包括: -- 文生视频 -- 以图片作为首帧或参考素材生成视频 -- 使用首尾帧约束镜头变化 -- 输出后作为媒体文件附加到对话 +- 文生视频:纯文字描述生成视频 +- 图生视频:以图片作为首帧生成视频 +- 首尾帧约束:指定首帧和尾帧,控制镜头变化 +- 多图主体参考:保持角色/物体一致性 +- 参考视频/音频:以已有视频控制运镜风格 + +### 视频生成 Provider 对比 + +| Provider | 模型 | 支持素材 | +|----------|------|----------| +| MiniMax | Hailuo-02 | 首帧 / 首尾帧 / S2V 多图主体 | +| Volcengine | Seedance | 多图 + 首尾帧 + 参考视频/音频 | +| DashScope | 快乐马 (HappyHorse) | i2v 首帧 / r2v 多图 | +| DesireCore Cloud | happyhorse-1.1 / doubao-seedance-2.0 | 官方云算力,按模型选择 | + +:::tip 异步生成 +视频生成通常需要数分钟。提交后系统会在后台处理,完成后自动在对话中展示结果,你无需等待。 +::: ## BeautifyImage diff --git a/docs/02-user-guide/09-capabilities/09-app-service-catalog.md b/docs/02-user-guide/09-capabilities/09-app-service-catalog.md index bd4fda9..efc866c 100644 --- a/docs/02-user-guide/09-capabilities/09-app-service-catalog.md +++ b/docs/02-user-guide/09-capabilities/09-app-service-catalog.md @@ -20,25 +20,37 @@ keywords: [应用目录, 服务目录, Apps, Services, 安装, 审批, MCP] ## 安装流程 1. 在 Marketplace 或应用目录中选择应用 -2. DesireCore 委派核心智能体执行安装 -3. 安装记录写回本地 -4. 应用派生的服务被 watcher 发现并注册 +2. 点击「安装」,DesireCore 委派核心智能体执行安装 +3. 安装过程写入本地记录(可在目录中查看进度) +4. 安装完成后,应用派生的服务被 watcher 自动发现并注册 5. 需要权限的服务进入待审批面板 +6. 审批通过后,服务变为可用状态 +7. 智能体即可在对话中调用该服务的能力 安装完成后,你可以从目录中打开、启动、停止、重启或更新应用/服务。 +:::info 安装失败怎么办? +如果安装过程中断或失败,目录中会显示 Failed 状态和错误摘要。你可以点击「重试」重新安装,或查看日志了解具体原因。 +::: + ## 服务审批 服务可能请求以下操作: -- 注册新服务 -- 调用外部 API -- 访问本地文件或端口 -- 提升权限 -- 执行健康探测 +| 审批类型 | 触发场景 | 风险等级 | +|----------|----------|----------| +| 注册新服务 | 应用首次暴露 MCP/HTTP 端点 | 低 | +| 调用外部 API | 服务需要访问第三方接口 | 中 | +| 访问本地文件或端口 | 服务需要读写本机资源 | 中 | +| 提升权限 | 服务请求更高执行权限 | 高 | +| 执行健康探测 | 定期检查服务是否存活 | 低 | 这些请求会进入审批流程。你可以批准、拒绝或查看详情。未经审批的 stdio 服务不会被后台静默执行。 +:::tip 批量审批 +如果你信任某个应用的全部服务,可以在审批面板中选择「信任此应用」,后续该应用的新服务注册将自动通过。 +::: + ## 状态与排障 常见状态包括: @@ -54,3 +66,21 @@ keywords: [应用目录, 服务目录, Apps, Services, 安装, 审批, MCP] 如果服务不可用,可以先查看详情页中的健康检查结果、日志摘要和审批状态。 +## 常见问题 + +**Q: 安装的应用在目录中找不到?** + +确认安装是否完成。安装过程中会显示进度,如果中途取消或失败,应用不会出现在已安装列表中。尝试重新安装。 + +**Q: 服务显示 Running 但智能体说无法调用?** + +检查该服务是否已通过审批。未审批的服务虽然进程在运行,但智能体无法访问其能力。前往审批面板查看是否有待处理项。 + +**Q: 如何更新已安装的应用?** + +当应用有新版本时,目录中会显示「Update available」标记。点击应用进入详情页,选择「更新」即可。更新不会丢失你的配置数据。 + +**Q: 卸载应用会影响已产生的数据吗?** + +卸载应用会停止其派生的服务,但已经写入本地的文件和数据不会被删除。如果你需要彻底清理,需要手动删除相关数据目录。 + diff --git a/docs/02-user-guide/12-email/04-unified-inbox.md b/docs/02-user-guide/12-email/04-unified-inbox.md index d75f67b..a6fa33e 100644 --- a/docs/02-user-guide/12-email/04-unified-inbox.md +++ b/docs/02-user-guide/12-email/04-unified-inbox.md @@ -56,6 +56,61 @@ keywords: [统一收件箱, 多邮箱聚合, Provider 过滤, 邮件浏览] 向下滚动到列表底部时,会自动加载更多邮件。 +## 排序与搜索 + +### 排序方式 + +邮件列表默认按**时间倒序**排列(最新的在最上面)。点击列表顶部的排序图标可切换: + +| 排序方式 | 说明 | +|----------|------| +| 时间(默认) | 按收件时间从新到旧 | +| 发件人 | 按发件人名称字母排序 | +| 主题 | 按邮件主题字母排序 | +| 未读优先 | 未读邮件始终排在最前,其余按时间排序 | + +### 快速搜索 + +在邮件列表上方的搜索框中输入关键词,可即时过滤邮件: + +- 支持搜索**主题**、**发件人**和**正文摘要** +- 输入时实时过滤,无需按回车 +- 点击搜索框右侧的 ✕ 清除过滤,恢复完整列表 + +:::tip 高级搜索 +如需更精确的搜索(如按日期范围、按标签、按附件类型),请进入各邮箱的单独视图使用[高级筛选](./05-reading-email.md#高级筛选)。 +::: + +## 标记与批量操作 + +### 单封操作 + +在邮件列表中,悬停在某封邮件上会出现快捷操作按钮: + +- **标记已读/未读** — 切换邮件的阅读状态 +- **归档** — 将邮件从收件箱移除(不删除) +- **删除** — 移至回收站 + +### 批量操作 + +1. 点击列表左上角的**多选模式**按钮(☑️ 图标) +2. 勾选需要操作的邮件(或点击"全选"选中当前页所有邮件) +3. 底部出现批量操作栏: + +| 操作 | 说明 | +|------|------| +| 标记已读 | 将选中邮件全部标为已读 | +| 标记未读 | 将选中邮件全部标为未读 | +| 归档 | 批量归档选中邮件 | +| 删除 | 批量移至回收站 | +| 取消选择 | 退出多选模式 | + +![批量操作](/img/user-guide/email/batch-actions.png) + +:::info 跨账户批量操作 +在统一收件箱中的批量操作会**跨账户生效**。例如,你可以一次选中来自 Gmail 和 Outlook 的邮件,统一标记为已读。 +::: + ## 查看邮件详情 点击邮件列表中的任意一封,会进入邮件详情视图,显示完整的邮件正文、附件、标签等信息。打开邮件时会自动标记为已读。 diff --git a/docs/02-user-guide/12-email/07-labels-folders.md b/docs/02-user-guide/12-email/07-labels-folders.md index 2ef7955..f767994 100644 --- a/docs/02-user-guide/12-email/07-labels-folders.md +++ b/docs/02-user-guide/12-email/07-labels-folders.md @@ -57,20 +57,56 @@ DesireCore 中有三种标签: 一封邮件可以同时带有多个标签。 -## 标签同步 +## 标签同步机制 + +不同邮箱服务商的标签同步策略有所差异: + +| 维度 | Gmail | Outlook | IMAP | +|------|-------|---------|------| +| 同步方向 | 双向(本地↔服务器) | 双向(本地↔服务器) | 仅读取 | +| 自动同步时机 | 添加账户时 + 每次邮件同步 | 添加账户时 + 每次邮件同步 | 添加账户时 | +| 新建标签同步 | ✅ 立即推送到 Gmail | ✅ 立即推送到 Outlook | ❌ 不支持 | +| 删除标签同步 | ✅ 同步删除(邮件不受影响) | ✅ 同步删除 | ❌ 不支持 | +| 颜色同步 | ✅ 与 Gmail 网页版一致 | ✅ 与 Outlook 客户端一致 | — | +| 嵌套标签 | ✅ 支持(如 工作/项目A) | ❌ 不支持 | — | + +### 手动触发同步 + +如果标签显示不是最新的,可以手动触发: + +1. 进入账户管理首页 +2. 点击对应账户卡片上的「同步」按钮 +3. 标签和邮件会一起刷新 ### Gmail 标签 -DesireCore 会在添加 Gmail 账户时自动从服务器同步你已有的标签。在 DesireCore 中修改标签也会同步回 Gmail 服务器。你也可以手动触发标签同步。 +DesireCore 会在添加 Gmail 账户时自动从服务器同步你已有的标签。在 DesireCore 中修改标签也会同步回 Gmail 服务器。Gmail 的嵌套标签(如 `工作/项目A`)会以层级形式展示。 ### Outlook 分类 -Outlook 使用「分类」(Categories)的概念,功能与标签类似。DesireCore 会自动同步你的 Outlook 分类,并将其作为标签展示。 +Outlook 使用「分类」(Categories)的概念,功能与标签类似。DesireCore 会自动同步你的 Outlook 分类,并将其作为标签展示。Outlook 分类不支持嵌套,但支持自定义颜色。 + +### IMAP 账户 + +IMAP 协议的标签支持有限(仅有 `\Flagged`、`\Seen` 等系统标志)。DesireCore 对 IMAP 账户: + +- 可以**读取**服务器上已有的标签/标志 +- 支持**标记已读/未读**和**加星标** +- **不支持**创建自定义标签 +- 可以使用 DesireCore 的**全局标签**(仅存储在本地,不同步到服务器) :::tip 全局标签的妙用 -如果你有多个邮箱,可以创建全局标签(如「紧急」、「本周处理」),在统一收件箱中跨邮箱筛选邮件。 +如果你有多个邮箱,可以创建全局标签(如「紧急」、「本周处理」),在统一收件箱中跨邮箱筛选邮件。全局标签存储在 DesireCore 本地,不依赖邮箱服务商的标签功能,因此对 IMAP 账户也完全可用。 ::: +## 按标签筛选邮件 + +在邮件视图中,点击左侧标签列表中的某个标签,即可筛选出带有该标签的所有邮件: + +- 支持**多标签组合筛选**(按住 Ctrl/Cmd 点击多个标签) +- 全局标签和账户标签可以混合使用 +- 点击「清除筛选」恢复显示全部邮件 + ## 下一步 - [邮件规则](./08-rules.md) — 设置规则自动为邮件添加标签 diff --git a/docs/03-use-cases/01-general/07-flowchart-agent.md b/docs/03-use-cases/01-general/07-flowchart-agent.md index 51fdc95..76e9fca 100644 --- a/docs/03-use-cases/01-general/07-flowchart-agent.md +++ b/docs/03-use-cases/01-general/07-flowchart-agent.md @@ -121,7 +121,6 @@ keywords: [流程图, 架构图, 时序图, 可视化, 图表生成] ``` ![微服务架构图](./assets/microservice-architecture.png) -文件地址:./assets/flowchart/microservice-architecture.drawio ### 场景三:从文档提取流程 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index fe13d36..1430429 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -45,6 +45,11 @@ const config: Config = { }, }, + markdown: { + mermaid: true, + }, + themes: ['@docusaurus/theme-mermaid'], + plugins: [changelogJsonPlugin], presets: [ diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/01-overview.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/01-overview.md index 8a69b7c..fa2bb46 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/01-overview.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/01-overview.md @@ -45,28 +45,24 @@ Super Document is suitable for any document work involving AI: ## Super Document Workflow at a Glance +```mermaid +flowchart TD + A[You initiate writing task] --> B[Agent generates or modifies content] + B --> C[Diff view displays all changes] + C --> D{You review item by item} + D -->|Accept| E[Change takes effect] + D -->|Reject| F[Restore original text] + D -->|Edit| G[Manual adjustment] + E --> H[Confirm to form a new version] + F --> H + G --> H + H --> I[Continue conversation, further iteration...] + + style C fill:#fff3cd,stroke:#ffc107 + style H fill:#d4edda,stroke:#28a745 ``` -You initiate writing task - | - v -Agent generates or modifies content - | - v -Diff view displays all changes <-- Red = Deletion, Green = Addition - | - v -You review item by item - | - +--> Accept: Change takes effect - +--> Reject: Restore original text - +--> Edit: Manual adjustment - | - v -Confirm to form a new version - | - v -Continue conversation, further iteration... -``` + +> 💡 In the **Diff view**, red = deletion and green = addition, making every change clear at a glance. Each round of changes is recorded as a version. You can return to any historical version at any time, just like Git history for code. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/03-diff-view.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/03-diff-view.md index 9c3807f..8893ab5 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/03-diff-view.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/05-super-document/03-diff-view.md @@ -88,7 +88,7 @@ Each change comes with a reason explanation, telling you why the Agent made this | Element | Meaning | Example | |---|---|---| -| **Purpose** | Why the change was made | "Make expression more formal,符合商务文书规范" | +| **Purpose** | Why the change was made | "Make expression more formal, following business document standards" | | **Basis** | What decision was based on | "Reference user preference: formal tone" | | **Scope** | What was modified | "Only affects second paragraph, doesn't change overall structure" | diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/07-memory/04-auto-learning.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/07-memory/04-auto-learning.md index 996fe9a..87a0efe 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/07-memory/04-auto-learning.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/07-memory/04-auto-learning.md @@ -55,8 +55,18 @@ Therefore, DesireCore designed a natural forgetting mechanism that mimics the hu Each memory goes through the following stages: -``` -Active → Recent → Archived → Compressed → Pruned +```mermaid +flowchart LR + A[Active] --> B[Recent] + B --> C[Archived] + C --> D[Compressed] + D --> E[Pruned] + + style A fill:#c8e6c9,stroke:#4caf50,color:#333 + style B fill:#fff9c4,stroke:#ffc107,color:#333 + style C fill:#ffe0b2,stroke:#ff9800,color:#333 + style D fill:#ffccbc,stroke:#ff5722,color:#333 + style E fill:#ffcdd2,stroke:#f44336,color:#333 ``` | Stage | Description | What You Can See | @@ -75,6 +85,36 @@ Forgetting doesn't happen arbitrarily. The system triggers memory compression in 2. **Memory Too Old** — A memory hasn't been referenced for a long time, and there are enough similar memories 3. **Manual Organization** — You actively click the "Organize Memory" button +### Auto Dream: Lossless Forgetting + +Beyond the regular forgetting flow, DesireCore offers a smarter memory management method—**Auto Dream (Lossless Forgetting)**. + +Auto Dream is inspired by the human "dreaming" mechanism: when you're not using the agent, the system automatically consolidates scattered memories into more structured knowledge in the background. Unlike regular forgetting, Auto Dream doesn't lose semantics—it refines and reorganizes rather than compresses and deletes. + +```mermaid +flowchart LR + A[Active] --> B[Recent] + B --> C[Archived] + C --> D[💤 Dream\nLossless] + D --> E[Compressed] + E --> F[Pruned] + + style A fill:#c8e6c9,stroke:#4caf50,color:#333 + style B fill:#fff9c4,stroke:#ffc107,color:#333 + style C fill:#ffe0b2,stroke:#ff9800,color:#333 + style D fill:#e1bee7,stroke:#9c27b0,color:#333 + style E fill:#ffccbc,stroke:#ff5722,color:#333 + style F fill:#ffcdd2,stroke:#f44336,color:#333 +``` + +With Auto Dream added, the complete memory lifecycle becomes: + +The Dream stage occurs between Archive and Compress: the system scans archived memories for related content, merging multiple scattered memories into a single piece of structured knowledge, preserving core semantics while significantly reducing storage. + +:::tip Deep Dive +Want to understand the full mechanism of Auto Dream? Read the concept document [Auto Dream: Lossless Forgetting](../../concepts/auto-dream). +::: + ### Never-Forget Protection The following memories are protected and won't be automatically forgotten: diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/02-builtin-tools.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/02-builtin-tools.md index 692b318..5920866 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/02-builtin-tools.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/02-builtin-tools.md @@ -186,36 +186,6 @@ Delegates work to another agent, a team, or a preset such as Explore. Supports s | Requires Confirmation | Depends on permissions and task content | | Typical Use Cases | Cross-domain collaboration, parallel research, read-only Explore analysis | -### spawn_agent - Spawn Sub-Agent - -Starts a temporary sub-agent with an isolated context for a concrete subtask. - -| Attribute | Value | -|-----------|-------| -| Risk Level | Medium | -| Requires Confirmation | Depends on permissions and task content | -| Typical Use Cases | Read several modules in parallel, split large investigations | - -### handoff - Handoff Session - -Transfers the current conversation to a more suitable agent with reason and context summary. - -| Attribute | Value | -|-----------|-------| -| Risk Level | Low | -| Requires Confirmation | No | -| Typical Use Cases | Move a task to a specialized agent | - -### request_help - Request Help - -Asks another persistent agent for advice or assistance. - -| Attribute | Value | -|-----------|-------| -| Risk Level | Low | -| Requires Confirmation | No | -| Typical Use Cases | Consult a specialist agent | - ### SendMessage - Agent-to-Agent Message Sends a message to another agent with context, intent, and waiting behavior. @@ -373,3 +343,125 @@ Creates, validates, tests, runs, and opens workflow DSL files. Workflows can orc | Risk Level | Low to Medium | | Requires Confirmation | No by default | | Typical Use Cases | Build reusable automations, validate workflows, run structured processes | + +## Terminal Control + +### TerminalControl - Interactive Terminal + +Creates and manages interactive PTY sessions. Unlike Bash, TerminalControl supports waiting for prompts, handling `(y/n)` confirmations, and password input. + +| Attribute | Value | +|-----------|-------| +| Risk Level | High | +| Requires Confirmation | Yes | +| Typical Use Cases | Long-running dev servers, interactive installers, collaborative terminal work | + +## Document and Media + +### ExportDocument - Export Document + +Converts Markdown or editor content to PDF, DOCX, etc., preserving headings, tables, code blocks, images, and formulas. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Low to Medium | +| Requires Confirmation | Depends on target path | + +### GenerateImage / GenerateVideo - Generate Images and Videos + +Invokes configured media providers for text-to-image, image-to-image, text-to-video, reference material, and first/last-frame generation. See [Media Generation](./media-generation). + +| Attribute | Value | +|-----------|-------| +| Risk Level | Medium | +| Requires Confirmation | Depends on provider and cost | + +### BeautifyImage - Beautify Image + +Crops, centers, removes borders, and enhances existing images with output-size protection. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Medium | +| Requires Confirmation | Depends on provider and cost | + +### GenerateDiagram - Generate Diagram + +Renders draw.io XML into architecture diagrams, flowcharts, UML, mind maps, and more, displayed as editable diagram cards in the conversation. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Low | +| Requires Confirmation | No | + +### UnderstandImage - Image Understanding + +Returns a visual model's description or answer about an image given its URL. Used as a fallback when the primary model lacks vision support. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Low | +| Requires Confirmation | No | + +### Canvas - Browser Window Control + +Controls Electron BrowserWindow for web page display, JS execution, screenshots, and A2UI message pushing. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Medium | +| Requires Confirmation | Depends on operation | + +### EnterWorktree / ExitWorktree - Isolated Workspace + +Creates or reuses an isolated Git linked worktree for file modifications and commands, without affecting the main workspace. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Medium | +| Requires Confirmation | Yes | + +### MailOperations - Email Operations + +Calls the local Mail Service REST API for account listing, email send/receive/search, labels, and automation rules. See [Email Management](../email/overview). + +| Attribute | Value | +|-----------|-------| +| Risk Level | Medium | +| Requires Confirmation | Depends on operation | + +### ManageSchedule - Manage Scheduled Tasks + +Creates and manages scheduled tasks with delay, timer, interval, and cron triggers. See [Schedule](../08-automation/03-scheduled-tasks.md). + +| Attribute | Value | +|-----------|-------| +| Risk Level | Medium | +| Requires Confirmation | Yes | + +### RefreshAgentFS - Refresh Agent State + +Triggers an immediate refresh of the frontend UI and tool/skill registry after writing AgentFS files. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Low | +| Requires Confirmation | No | + +### MathCalc - High-Precision Calculator + +Deterministic high-precision math calculations for financial, ratio, statistical, and formula verification tasks. + +| Attribute | Value | +|-----------|-------| +| Risk Level | Low | +| Requires Confirmation | No | + +### HeartbeatRespond - Heartbeat Response + +Submits heartbeat patrol results including outcome, notification text, output files, and next-check suggestions. See [Heartbeat](../08-automation/01-heartbeat.md). + +| Attribute | Value | +|-----------|-------| +| Risk Level | Low | +| Requires Confirmation | No | diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/07-web-access.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/07-web-access.md index 52b8536..e18bf48 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/07-web-access.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/07-web-access.md @@ -6,25 +6,69 @@ keywords: [Web Access, Browser, CDP, SitePattern, LocalBookmarks] # Web Access -Web Access v2 lets agents use a controlled browser when static fetching is not enough. It is useful for dynamic pages, signed-in dashboards, complex forms, internal systems, and pages that require screenshots. +Web Access v2 lets agents use a controlled browser when static fetching is not enough. It is useful for dynamic pages, signed-in dashboards, complex forms, single-page applications, internal systems, and pages that require screenshots. -## Skill-scoped Tools +## Enabling -Web Access tools are exposed only when the related skill is active. This prevents regular tasks from using heavy or higher-permission browser tools by accident. +Web Access is a skill-scoped capability. Browser control, CDP proxy, site-pattern, and local-bookmarks tools are only exposed when the related skill is active. This prevents ordinary tasks from accidentally using browser tools and lets you know when an agent may interact with web pages. ## Capabilities | Capability | Description | |------------|-------------| -| Tab control | Open, list, switch, and close tabs | -| Page actions | Click, scroll, type, and inspect elements | -| Screenshots | Capture page state for visual reasoning | -| CDP proxy | Use Chrome DevTools Protocol for richer page state | -| File upload | Select local files when approved | -| Local bookmarks | Search browser bookmarks and history hints | -| Site patterns | Reuse known selectors, entry points, and workflow notes | +| Tab control | Open, list, switch, and close browser tabs | +| Page actions | Click, scroll, type, and select elements | +| Screenshots | Capture page or element state for visual reasoning | +| CDP proxy | Use Chrome DevTools Protocol for finer page state | +| File upload | Select local files when needed; usually requires confirmation | +| Local bookmarks | Search Chrome/Edge bookmarks and history for URL hints | +| Site patterns | Record login entry points, selectors, action paths, and notes for a site | + +## SitePattern + +SitePattern stores per-site experience that helps the agent remember how to use a particular website: + +- Login entry points and common redirects +- Locations of search boxes, filters, and export buttons +- Common errors and popup-handling tips +- Pages that require waiting for dynamic content + +Validation is performed before saving a site pattern to prevent invalid or overly broad rules. + +## LocalBookmarks + +LocalBookmarks searches the local browser's bookmarks and history for URL hints. It does not log in automatically or bypass permissions—it simply helps the agent find entry points to systems you use frequently. ## Safety -Only `http` and `https` URLs are allowed by default. Actions with external impact, such as uploads, submissions, deletion, or publishing, go through approval. +- Only `http` and `https` URLs are allowed by default +- Actions with external impact, such as file uploads, form submissions, deletions, or publications, trigger approval +- Browser sessions try to isolate tabs to avoid cross-task contamination +- Screenshots and page content enter the current task context; avoid opening unrelated tasks on sensitive pages + +## Relationship to WebFetch / WebSearch + +DesireCore's web capabilities are organized in three tiers. The agent automatically selects the lowest-cost option that can complete the task: + +| Tier | Tool | Use case | Notes | +|------|------|----------|-------| +| 1 | WebSearch | Find public information, news, and technical docs | Returns search-result summaries without opening a browser | +| 2 | WebFetch | Read the body of a known URL | Smart content extraction, ad/navigation removal, 15-minute cache | +| 3 | Web Access | Dynamic pages, signed-in dashboards, SPA forms, screenshots | Launches a controlled browser and simulates real user interaction | + +If static fetching is sufficient, the agent does not open a browser. + +## Typical Scenarios + +| Scenario | Recommended tool | Reason | +|----------|-----------------|--------| +| Look up API documentation | WebSearch | Public information; a search suffices | +| Read a blog post | WebFetch | Static page; direct content extraction | +| Check a management dashboard | Web Access | Requires login and page interaction | +| Operate a single-page application | Web Access | Content is dynamically rendered by JavaScript | +| Fill out and submit an online form | Web Access | Requires typing and clicking | +| Capture the current page state | Web Access | Requires screenshot capability | +:::tip Automatic Fallback +WebSearch itself has a fallback strategy: it prefers LLM server-side search, falls back to an independent search API, and only starts a browser sub-agent as a last resort. You do not need to choose manually; the agent decides based on the task. +::: diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/08-media-generation.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/08-media-generation.md index 3e39928..0c84627 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/08-media-generation.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/08-media-generation.md @@ -1,28 +1,91 @@ --- title: Media Generation description: Generate, edit, and improve images or videos with GenerateImage, GenerateVideo, and BeautifyImage. -keywords: [image generation, video generation, GenerateImage, GenerateVideo, BeautifyImage] +keywords: [image generation, video generation, GenerateImage, GenerateVideo, BeautifyImage, text-to-image, text-to-video, AI art] --- # Media Generation -DesireCore can use configured media providers to generate images, generate videos, and improve existing images. +DesireCore can use configured media providers to generate images, generate videos, and improve existing images. Media generation is typically invoked by skills or agents within appropriate tasks. -## Requirements +## Prerequisites -Enable providers for the relevant service type in Settings > Compute Service: +Enable a provider for the relevant service type in **Settings > Compute Service**: | Service type | Use | |--------------|-----| | `image_gen` | Text-to-image, image-to-image, multi-image fusion | | `video_gen` | Text-to-video, image-to-video, first/last-frame video | -| `image_understanding` / `ocr` | Reviewing generated images and understanding input images | +| `image_understanding` / `ocr` | Post-generation review and image understanding | -## Tools +Official cloud compute, third-party API keys, and custom OpenAI-compatible providers can all serve as backends depending on the supplier's capabilities. -- `GenerateImage`: creates or edits images from prompts and references -- `GenerateVideo`: creates videos from text, images, or frame constraints -- `BeautifyImage`: centers, crops, removes borders, enhances quality, and guards output size +## GenerateImage -Media generation can consume API quota or account credits, so provider, cost, and file-write approvals may apply. +`GenerateImage` creates or edits images. Common capabilities include: +- Generate images from text prompts +- Use one or more reference images for image-to-image or multi-image fusion +- Adjust style, composition, size, and detail +- Auto-save output and display it in the chat + +### Image Generation Provider Comparison + +| Provider | Model | Specialty | +|----------|-------|-----------| +| MiniMax | image-01 / image-01-live | Strong single-subject consistency; style transfer (manga, genki, medieval, watercolor) | +| Volcengine | Seedream 4.0 | True image-to-image / inpainting / multi-image fusion (up to 10 reference images) | +| DesireCore Cloud | wan2.7-image etc. | Official cloud compute gateway, OpenAI Images API compatible | +| newapi | Routed by model name | new-api gateway relay, multi-vendor support | + +### Usage Examples + +Describe the image you want directly in conversation: + +> "Generate a cyberpunk city nightscape with neon lights reflecting on rain-soaked streets." + +To generate based on a reference image: + +> "Using this product photo as reference, generate a white-background e-commerce hero image." (attach the image) + +## GenerateVideo + +`GenerateVideo` creates videos. Common capabilities include: + +- **Text-to-video**: generate video from a text description +- **Image-to-video**: use an image as the first frame +- **First/last-frame constraints**: specify both frames to control camera movement +- **Multi-image subject reference**: maintain character/object consistency +- **Reference video/audio**: use existing media to control camera style + +### Video Generation Provider Comparison + +| Provider | Model | Supported inputs | +|----------|-------|-----------------| +| MiniMax | Hailuo-02 | First frame / first-last frame / S2V multi-image subject | +| Volcengine | Seedance | Multi-image + first-last frame + reference video/audio | +| DashScope | HappyHorse | i2v first frame / r2v multi-image | +| DesireCore Cloud | happyhorse-1.1 / doubao-seedance-2.0 | Official cloud compute, model-based selection | + +:::tip Asynchronous Generation +Video generation typically takes several minutes. After submission, processing runs in the background; the result is displayed in the conversation automatically once complete—you do not need to wait. +::: + +## BeautifyImage + +`BeautifyImage` optimizes existing images, for example: + +- Centering and cropping +- Removing excess borders +- Quality enhancement or size adjustment +- Output-size protection to prevent abnormally large files + +## Approvals and Costs + +Media generation may consume API quota or account credits. When a paid provider is used, reference material is uploaded, or local files are written, the system requests confirmation based on risk and permission policies. + +## Best Practices + +- Use a vision model when you need to "understand" an image; image generation models are for creating images +- Choose a chat model for conversation; image/video generation models do not appear in the regular model selector +- For production assets, have the agent review the output with a visual understanding tool to check text, composition, and obvious errors diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/09-app-service-catalog.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/09-app-service-catalog.md index 37b44c0..33b403b 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/09-app-service-catalog.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/09-capabilities/09-app-service-catalog.md @@ -1,25 +1,83 @@ --- title: App and Service Catalog description: Manage app installation, service registration, runtime status, approvals, and updates. -keywords: [apps, services, catalog, approvals, MCP] +keywords: [apps, services, catalog, approvals, MCP, marketplace, app store] --- # App and Service Catalog -The App and Service Catalog manages third-party apps, MCP services, and services derived from installed apps. It covers installation, registration, approval, runtime status, and updates. +The App and Service Catalog centrally manages third-party apps, MCP services, and local services derived from installed apps. It is not just a list—it provides a closed loop from installation and registration through approval to lifecycle management. ## What It Contains | Entry | Description | |-------|-------------| | Apps | Installable third-party capability packages or integration entry points | -| Services | MCP, HTTP, or local services registered by apps | -| Pending approvals | Requests to register, invoke, test, or elevate services | -| Install records | Installed, failed, running, stopped, and update-available states | +| Services | MCP, HTTP, or local services registered after app installation | +| Pending approvals | Requests for service registration, invocation, privilege elevation, or test connections that require your confirmation | +| Install records | States including Installed, Failed, Running, Stopped, and Update available | -Unapproved stdio services are not executed silently in the background. +## Installation Flow -## Common Actions +1. Select an app in the Marketplace or App Catalog +2. Click **Install**; DesireCore delegates to a core agent to perform the installation +3. The installation process is recorded locally (progress is visible in the catalog) +4. After installation, services derived from the app are automatically discovered and registered by a watcher +5. Services requiring permissions enter the pending-approval panel +6. After approval, the service becomes available +7. Agents can then use the service's capabilities in conversation -You can open, start, stop, restart, update, inspect health checks, and review pending approvals from the catalog. +Once installed, you can open, start, stop, restart, or update the app/service from the catalog. +:::info Installation Failed? +If the installation is interrupted or fails, the catalog displays a **Failed** status with an error summary. Click **Retry** to reinstall, or check the logs for details. +::: + +## Service Approvals + +Services may request the following operations: + +| Approval type | Trigger | Risk level | +|---------------|---------|------------| +| Register new service | App first exposes an MCP/HTTP endpoint | Low | +| Invoke external API | Service needs to access a third-party interface | Medium | +| Access local files or ports | Service needs to read/write local resources | Medium | +| Elevate privileges | Service requests higher execution permissions | High | +| Health probe | Periodic check whether a service is alive | Low | + +These requests enter the approval flow. You can approve, reject, or inspect details. Unapproved stdio services are not executed silently in the background. + +:::tip Batch Approval +If you trust all services from a particular app, select **Trust this app** in the approval panel. Future service registrations from that app will be approved automatically. +::: + +## Status and Troubleshooting + +| Status | Meaning | +|--------|---------| +| Installed | Installed but not necessarily running | +| Running | Service is active | +| Stopped | Manually stopped | +| Failed | Installation or startup failed | +| Update available | A newer version is available | +| Pending approval | Awaiting your approval | + +If a service is unavailable, check the detail page for health-check results, log summaries, and approval status. + +## FAQ + +**Q: I installed an app but cannot find it in the catalog?** + +Check whether installation completed. Progress is shown during installation; if you cancelled or it failed, the app will not appear in the installed list. Try reinstalling. + +**Q: The service shows Running but the agent says it cannot call it?** + +Check whether the service has been approved. An unapproved service runs as a process, but the agent cannot access its capabilities. Go to the approval panel to see if there are pending items. + +**Q: How do I update an installed app?** + +When a new version is available, the catalog displays an **Update available** badge. Click the app, go to its detail page, and select **Update**. Updates do not discard your configuration data. + +**Q: Will uninstalling an app delete existing data?** + +Uninstalling stops the app's derived services, but files and data already written locally are not deleted. If you need a thorough cleanup, manually remove the relevant data directories. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/01-overview.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/01-overview.md new file mode 100644 index 0000000..8d44bea --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/01-overview.md @@ -0,0 +1,59 @@ +--- +title: Email Management Overview +description: Learn how DesireCore email management unifies Gmail, Outlook, and IMAP accounts in a single interface. +keywords: [email management, multiple accounts, Gmail, Outlook, IMAP] +--- + +# Email Management Overview + +**DesireCore Email Management** brings all your email accounts together in one unified interface. + +## Supported Account Types + +| Account type | Authentication | Typical use | +|-------------|---------------|-------------| +| **Gmail** | OAuth 2.0 | Personal Google accounts, Google Workspace | +| **Outlook** | OAuth 2.0 | Personal Outlook/Hotmail, Microsoft 365 | +| **IMAP/SMTP** | Username & password | QQ Mail, 163 Mail, corporate email, etc. | + +:::tip Quick Understanding +Gmail and Outlook connect through official OAuth authorization—secure and fully featured. IMAP/SMTP is a universal protocol that supports virtually every email provider. +::: + +## Core Features + +- **Multi-account management** — Add multiple accounts of different types; view and switch between them in one place +- **Unified inbox** — Aggregate emails from all accounts into a single view, sorted by time +- **Send and receive** — Read, reply to, and compose emails with rich-text editing and attachments +- **Messages and conversations** — Two browsing modes: individual messages or thread-based conversations +- **Search and filtering** — Keyword search plus multi-dimension advanced filters for quick discovery +- **Labels and categories** — Custom label system that syncs with Gmail labels and Outlook categories +- **Mail rules** — Set conditions to automatically classify, label, archive, or forward messages +- **Batch operations** — Multi-select emails to mark as read or delete in bulk +- **Drafts and signatures** — Auto-save drafts; manage multiple email signatures +- **Real-time sync** — Background polling with instant push notifications for new messages +- **Offline access** — View previously synced emails offline; operations execute automatically when back online +- **Local storage** — Email data is encrypted and stored on your device, never passing through third-party servers + +## Navigation Structure + +Email management consists of three main views: + +![Navigation structure](/img/user-guide/email/navigation-structure.svg) + +## Data Security + +Your email data always stays on your local device: + +- **Encrypted tokens**: OAuth tokens and IMAP passwords are stored with AES-256-GCM encryption +- **Local-first**: Email content and indexes are stored under `~/.desirecore/mail/` +- **Direct communication**: DesireCore communicates directly with your email provider—no third-party servers involved + +:::info Privacy Note +DesireCore does not upload your email content to the cloud. All synchronization happens directly between your device and the email provider. +::: + +## Next Steps + +- [Accounts Home](./02-accounts-home.md) — Understand the account management interface +- [Add Accounts](./03-add-accounts.md) — Learn how to add your first email account diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/02-accounts-home.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/02-accounts-home.md new file mode 100644 index 0000000..0510f0d --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/02-accounts-home.md @@ -0,0 +1,90 @@ +--- +title: Accounts Home +description: Understand the email management home page—account list, unread counts, unified inbox entry, and account status management. +keywords: [account management, email home, unread email, account status] +--- + +# Accounts Home + +When you open email management, you first see the **Accounts Home**. It displays all your linked email accounts and an aggregate unread count. + +## Page Overview + +![Accounts home](/img/user-guide/email/accounts-home.png) + +### Top Bar + +The top bar shows summary information and action buttons: + +- **Connected / Total** — Quick view of how many accounts are online +- **Unread count** — Total unread emails across all accounts +- **Add Account** — Click to open the add-account dialog + +### Unified Inbox Entry + +When you have **two or more** accounts linked, a prominent gradient card appears at the top of the account list. Click it to enter the [Unified Inbox](./04-unified-inbox.md) view. + +### Account Cards + +Each email account is displayed as a card: + +![Account card](/img/user-guide/email/account-card.png) + +| Element | Description | +|---------|-------------| +| Display name | The name you set for the account, or the email address | +| Connection status | Green "Connected" or red "Error" badge | +| Unread badge | Orange number showing unread count for this account | +| Provider info | Account type, authentication method, last sync time | +| Settings | Modify display name and other account options | +| Delete | Remove this account (confirmation required) | + +**Click the card body** to enter that account's email list. + +## Account Status + +### Normal + +The card shows a green "Connected" badge, and email sync is running normally. + +### Authorization Expired + +When OAuth authorization expires due to a password change, permission revocation, or similar: + +- Card status changes to red "Error" +- An error message appears at the bottom of the card +- Click the card to re-authorize + +DesireCore monitors authorization status in real time via WebSocket and updates the UI immediately when expiry is detected. + +:::warning Re-authorize Promptly +Sync pauses when authorization expires. Complete the authorization flow again to restore access. +::: + +### Account Settings + +Click the **Settings** button on a card to modify the display name. Different account types have additional options: + +| Setting | Description | +|---------|-------------| +| Display name | Name shown in the account list and email views | +| Sync interval | Time between automatic polling for new emails | +| New mail notification | Whether to push notifications for new emails | + +## Deleting an Account + +Click the **Delete** button on a card and confirm. This will: + +- Disconnect from the email provider +- Clear locally stored email data and tokens +- Remove the account from the list + +:::info No Impact on Original Emails +Deleting an account only clears local data in DesireCore. Emails on your email server are not affected. +::: + +## Next Steps + +- [Add Accounts](./03-add-accounts.md) — Learn how to add new email accounts +- [Unified Inbox](./04-unified-inbox.md) — Browse aggregated emails from multiple accounts +- [Reading Email](./05-reading-email.md) — Enter the single-account email view diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/03-add-accounts.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/03-add-accounts.md new file mode 100644 index 0000000..2dbdf14 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/03-add-accounts.md @@ -0,0 +1,97 @@ +--- +title: Add Email Accounts +description: Learn how to add Gmail, Outlook, and IMAP email accounts in DesireCore, and the automatic sync that follows authorization. +keywords: [add account, OAuth, IMAP configuration, email account] +--- + +# Add Email Accounts + +DesireCore supports adding multiple email accounts. You can mix different account types; they all appear together in the Accounts Home. + +## Opening the Add-Account Dialog + +On the Accounts Home page, click the **+ Add Account** button in the top-right corner to open the dialog. Three account types are listed for selection. + +![Add-account dialog](/img/user-guide/email/add-account-dialog.png) + +## Adding a Gmail Account + +Gmail uses Google OAuth 2.0 authorization—no password entry required: + +1. Select **Gmail** in the dialog +2. A browser window opens and navigates to the Google sign-in page +3. Sign in with your Google account and grant DesireCore access to email +4. After authorization, the browser closes automatically and the dialog shows success + +During authorization, the dialog displays a "Waiting for authorization..." status message. + +:::tip Authorization Scope +DesireCore only requests permission to read/write email and manage labels. It does not access your Google contacts, calendar, or other data. +::: + +## Adding an Outlook Account + +Outlook uses Microsoft OAuth 2.0 authorization, with a flow similar to Gmail: + +1. Select **Outlook** in the dialog +2. A browser window opens and navigates to the Microsoft sign-in page +3. Sign in with your Microsoft account and authorize +4. After authorization, you are automatically returned to DesireCore + +Outlook supports both personal accounts (@outlook.com, @hotmail.com) and Microsoft 365 corporate accounts. + +## Adding an IMAP Account + +For providers that do not support OAuth (such as QQ Mail, 163 Mail), IMAP/SMTP protocol is used: + +1. Select **IMAP/SMTP** in the dialog +2. Enter your email address and display name +3. The system auto-detects common providers and pre-fills server settings +4. Enter your password (or app-specific password / authorization code) +5. Click Connect; the system validates the configuration and completes setup + +During connection, the dialog shows a "Connecting..." status message. + +### Supported Preset Providers + +The following providers have pre-configured IMAP/SMTP server addresses and ports—no manual configuration needed: + +| Provider | Notes | +|----------|-------| +| QQ Mail | Requires an authorization code instead of login password | +| 163 Mail | Requires an authorization code | +| 126 Mail | Requires an authorization code | +| Sina Mail | — | +| Yahoo Mail | Requires an app-specific password | +| iCloud Mail | Requires an app-specific password | +| Alibaba Corporate Mail | — | +| Tencent Corporate Mail | — | + +:::warning About Authorization Codes +QQ Mail, 163, and similar Chinese providers typically do not allow direct IMAP login with your account password. You need to enable IMAP in the provider's web settings and generate an **authorization code**, then use that code instead of your password. +::: + +### Custom Server Configuration + +If your provider is not in the preset list, you can fill in the settings manually: + +- **IMAP server address**: e.g., `imap.example.com` +- **IMAP port**: usually `993` (SSL) or `143` +- **SMTP server address**: e.g., `smtp.example.com` +- **SMTP port**: usually `465` (SSL) or `587` (STARTTLS) + +## Automatic Post-Setup Actions + +Regardless of account type, DesireCore automatically performs the following after setup: + +1. **Sync labels/categories** — Pull existing labels (Gmail) or categories (Outlook) from the server +2. **Fetch recent emails** — Download the latest emails from your inbox +3. **Start background sync** — Begin periodic polling to continuously fetch new emails +4. **Notify frontend** — Refresh the account list via WebSocket + +You do not need to click sync manually; email management is ready to use immediately after adding an account. + +## Next Steps + +- [Unified Inbox](./04-unified-inbox.md) — Browse emails from multiple accounts in one view +- [Reading Email](./05-reading-email.md) — Learn about the single-account email view diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/04-unified-inbox.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/04-unified-inbox.md new file mode 100644 index 0000000..2f233cd --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/04-unified-inbox.md @@ -0,0 +1,123 @@ +--- +title: Unified Inbox +description: Browse emails from all accounts in one view with provider filtering and folder switching. +keywords: [unified inbox, multi-account aggregation, provider filter, email browsing] +--- + +# Unified Inbox + +When you have two or more accounts linked, the **Unified Inbox** lets you browse all emails in a single list without switching between accounts. + +## Entering the Unified Inbox + +On the Accounts Home page, click the "Unified Inbox" card at the top. This card only appears when you have two or more accounts linked. + +## Page Overview + +![Unified inbox](/img/user-guide/email/unified-inbox.png) + +### Top Bar + +The top bar displays aggregate information for all accounts: + +- **Unread / Total count** — Combined email stats across all accounts +- **Account count** — How many accounts are currently aggregated +- **Sync status** — Pulse animation shown during active sync +- **Compose** — Opens the compose dialog +- **Sync All** — Triggers email sync for all accounts simultaneously + +### Folder Tabs + +Horizontal tabs let you switch between folders (Inbox, Sent, Drafts, Trash). The email list refreshes automatically when you switch. + +### Provider Filter + +Below the folder tabs, filter buttons allow you to narrow by account type: + +![Provider filter](/img/user-guide/email/provider-filter.png) + +- "All" is selected by default, showing mixed emails from every account +- Click a specific provider to show only emails from that type +- Each button displays the email count for that provider + +### Authorization Failure Banner + +If any account's authorization has expired, a prominent banner floats at the top of the page. Click "Re-login" to return to Accounts Home and re-authorize. + +## Email List + +Emails from all accounts are displayed in reverse chronological order. Each email has a **Provider badge** to identify its source: + +- Gmail — Red badge +- Outlook — Blue badge +- IMAP — Purple badge + +Unread emails show their subject in bold with an unread indicator dot on the left. + +Scrolling to the bottom of the list automatically loads more emails. + +## Sorting and Search + +### Sort Options + +The email list is sorted by **time (descending)** by default. Click the sort icon at the top of the list to switch: + +| Sort mode | Description | +|-----------|-------------| +| Time (default) | Newest first | +| Sender | Alphabetical by sender name | +| Subject | Alphabetical by subject | +| Unread first | Unread emails always on top; rest sorted by time | + +### Quick Search + +Enter keywords in the search box above the email list to filter in real time: + +- Searches **subject**, **sender**, and **body preview** +- Filters as you type—no need to press Enter +- Click ✕ on the right side of the search box to clear and restore the full list + +:::tip Advanced Search +For more precise searching (by date range, labels, or attachment types), enter a single-account view and use [Advanced Filters](./05-reading-email.md#advanced-filters). +::: + +## Labels and Batch Operations + +### Single-Email Actions + +Hovering over an email in the list reveals quick-action buttons: + +- **Mark read/unread** — Toggle read status +- **Archive** — Remove from inbox (without deleting) +- **Delete** — Move to trash + +### Batch Operations + +1. Click the **multi-select** button (☑️ icon) in the top-left of the list +2. Check the emails you want to operate on (or click "Select all" for the current page) +3. A batch-action bar appears at the bottom: + +| Action | Description | +|--------|-------------| +| Mark read | Mark all selected emails as read | +| Mark unread | Mark all selected emails as unread | +| Archive | Archive all selected emails | +| Delete | Move all selected emails to trash | +| Cancel selection | Exit multi-select mode | + +![Batch operations](/img/user-guide/email/batch-actions.png) + +:::info Cross-Account Batch Actions +Batch operations in the Unified Inbox work **across accounts**. For example, you can select emails from both Gmail and Outlook and mark them all as read at once. +::: + +## Viewing Email Details + +Click any email in the list to enter the detail view, which shows the full email body, attachments, labels, and more. Opening an email automatically marks it as read. + +From the detail view, you can reply to or forward the email directly. + +## Next Steps + +- [Reading Email](./05-reading-email.md) — Explore the full features of the single-account email view +- [Composing](./06-composing.md) — Learn how to send emails diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/05-reading-email.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/05-reading-email.md new file mode 100644 index 0000000..ae0eb18 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/05-reading-email.md @@ -0,0 +1,151 @@ +--- +title: Reading and Managing Email +description: Learn the full features of the single-account email view—two-column layout, message and conversation modes, search and filtering, batch operations, and quick reply. +keywords: [read email, search email, conversation mode, batch operations, quick reply] +--- + +# Reading and Managing Email + +Click an account card on the Accounts Home page to enter that account's email view. This is your primary interface for day-to-day email management. + +## Page Overview + +![Email view — message mode](/img/user-guide/email/email-view-messages.png) + +### Top Bar + +- **Back** — Return to Accounts Home (unread counts refresh automatically) +- **Search bar** — Real-time email search (press `/` to focus) +- **Sync status** — Shows "Syncing" (blue pulse), "Sync failed" (red), or last sync time +- **Sync** — Trigger an immediate email sync +- **Compose** — Open the compose dialog + +### Folder Tabs + +Below the top bar are horizontally arranged folder tabs (Inbox, Sent, Drafts, Trash). Click to switch folders; the email list updates automatically. The active tab is highlighted with a gradient and shows an unread-count badge. + +### View Mode Toggle + +To the right of the folder tabs, you can switch between two browsing modes: + +- **Message mode** (default) — Each email displayed individually +- **Conversation mode** — Emails grouped by thread; replies in the same subject are aggregated into a conversation + +### Two-Column Layout + +The area below is split into left and right columns: the left column (280–320 px wide) holds the email/conversation list, and the right column (adaptive width) is the preview panel. + +## Message Mode + +### Email List (Left Column) + +![Email list item with quick actions](/img/user-guide/email/email-list-hover.png) + +Each email appears as a list item showing an unread indicator, sender, subject, preview text, and timestamp. Unread subjects are bolded; the selected email has a blue vertical bar on the left. + +The email list supports **virtual scrolling** for smooth performance even with large mailboxes. More emails load automatically as you scroll down. + +#### Quick Actions + +Hovering over an email reveals quick-action buttons on the right: + +| Button | Function | +|--------|----------| +| Read/Unread | Toggle read status | +| Archive | Archive the email | +| Delete | Delete the email | + +All actions use **optimistic updates**—the UI reflects changes immediately; if the API call fails, the change is rolled back automatically. + +#### Batch Operations + +Hovering over the unread dot on the left side of an email turns it into a checkbox. After checking one or more emails, a batch-action bar appears at the top of the list: + +![Batch action bar](/img/user-guide/email/batch-actions.png) + +Supports select-all/deselect-all, bulk mark-as-read, mark-as-unread, and delete. + +### Email Preview (Right Column) + +When an email is selected, the right column displays its full content. + +![Email preview panel](/img/user-guide/email/email-preview.png) + +#### Top Toolbar + +Provides Close, Reply, Reply All, Forward, label/category management, Archive, and Delete actions. + +#### Email Headers + +Shows sender avatar and name, email address, To, Cc, timestamp, message size, priority, and existing labels. + +#### Email Body + +HTML emails render as rich text; plain-text emails display in a monospaced font. + +#### Attachments + +If attachments are present, file names, sizes, and download buttons are displayed. + +#### Quick Reply + +The bottom of the preview panel provides a quick-reply area that avoids opening the full compose dialog. You can toggle between "Reply" and "Reply All" modes. + +![Quick reply](/img/user-guide/email/quick-reply.png) + +:::tip No Selection State +When no email is selected, the right column shows an empty-state prompt: "Select an email — click an email in the left list to view details." +::: + +## Conversation Mode + +Switching to conversation mode aggregates emails in the same thread into a conversation. + +![Email view — conversation mode](/img/user-guide/email/email-view-conversations.png) + +### Conversation List (Left Column) + +Each conversation displays the subject, participant list, message count, unread count, and latest message time. + +### Conversation Detail (Right Column) + +When a conversation is selected, the right column expands to show all emails in the thread, each presented as a collapsible card: + +- Click the email header to expand/collapse +- Expanding automatically marks that email as read +- Quick reply is available at the bottom of the conversation + +## Search and Filtering + +### Keyword Search + +Enter keywords in the top search bar; the email list filters in real time, matching subject, body, and sender information. + +| Shortcut | Function | +|----------|----------| +| `/` | Focus the search bar | +| `Enter` | Trigger search | +| `Esc` | Clear search | + +### Advanced Filters + +Click the filter icon next to the search bar to expand the advanced-filter panel: + +![Advanced filter panel](/img/user-guide/email/advanced-filter.png) + +Supports combined filtering by sender, date range, attachments, read status, and more. + +## Authorization Failure Handling + +If the current account's OAuth authorization has expired, a prominent banner floats at the top of the page. Click "Re-authorize" to open the re-authorization dialog; access is restored once completed. + +![Authorization expired banner](/img/user-guide/email/auth-expired.png) + +## Action Feedback + +After any email action, a toast notification appears in the bottom-right corner (e.g., "Marked as read" or "Delete failed, please retry") and disappears automatically after 4 seconds. + +## Next Steps + +- [Composing](./06-composing.md) — Learn how to send new emails and reply +- [Labels and Folders](./07-labels-folders.md) — Organize emails with labels diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/06-composing.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/06-composing.md new file mode 100644 index 0000000..1887514 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/06-composing.md @@ -0,0 +1,117 @@ +--- +title: Composing and Replying +description: Learn how to compose new emails, reply, and forward in DesireCore, plus draft auto-save and signature management. +keywords: [send email, reply, forward, draft, attachments, signature] +--- + +# Composing and Replying + +DesireCore lets you send emails directly within the app—no need to switch to a webmail interface. + +## Composing a New Email + +Click the **Compose** button in the top bar of the email view to open the compose dialog: + +![Compose dialog](/img/user-guide/email/compose-dialog.png) + +### Recipient Input + +- Supports multiple recipients separated by commas +- Email format is validated as you type +- Expand the Cc field to add carbon-copy recipients + +### Rich Text Editor + +The email body uses a WYSIWYG rich-text editor with support for: + +- Text formatting: bold, italic, underline +- Code blocks +- Ordered and unordered lists +- Pasting images + +### Adding Attachments + +Click **+ Add Attachment** to select local files; multiple files are supported. Added attachments show file name and size; individual attachments can be removed. + +:::info Attachment Size Limit +Each attachment is limited to 10 MB. +::: + +## Replying to Email + +Two reply methods are available: + +### Quick Reply + +Reply directly at the bottom of the email preview panel without opening the full compose dialog. Toggle between: + +- **Reply** — Reply to sender only +- **Reply All** — Reply to sender and all recipients + +### Full Reply + +Click **Reply** or **Reply All** in the preview panel toolbar to open the full compose dialog. When replying: + +- The recipient is auto-filled with the original sender +- The subject automatically gets a `Re:` prefix +- Thread relationships (`In-Reply-To` and `References` headers) are maintained automatically + +## Forwarding Email + +Click **Forward** in the toolbar to open the compose dialog. When forwarding: + +- The subject automatically gets a `Fwd:` prefix +- The original email content is included as a quoted block +- You need to manually fill in the forwarding recipient + +## Draft Management + +### Auto-Save + +While composing, the content is auto-saved to local storage every 500 milliseconds. Draft-save status is displayed at the bottom of the compose window. + +### Closing the Window + +When you close the compose window with unsent content: + +- The system asks whether to keep the draft +- **Keep draft** — Content is saved; you can continue editing later +- **Discard** — All content is deleted + +### Viewing Drafts + +Switch to the **Drafts** folder in the folder tabs to see all saved drafts. Click a draft to continue editing. + +### Draft Sync + +All account types support draft creation, editing, deletion, and sending: + +| Account type | Draft storage | Notes | +|-------------|---------------|-------| +| Gmail | Gmail server | Drafts sync to Gmail and are visible in the web interface | +| Outlook | Outlook server | Drafts sync to Outlook and are available across devices | +| IMAP | Server Drafts folder | Stored on the server via IMAP protocol | + +## Signature Management + +The bottom of the compose window provides signature selection: + +- Choose from existing signatures to append to the email +- Click **Edit Signature** to create or modify signatures +- Signatures support HTML format + +## Send Status + +Feedback after sending: + +- **Success** — Toast notification "Sent"; the compose window closes and the draft is cleared +- **Failure** — Toast notification with the error reason; content is preserved for retry + +:::tip Offline Sending +If you send an email while offline, it is queued and sent automatically when the network connection is restored. See [Sync and Offline](./09-sync-offline.md). +::: + +## Next Steps + +- [Labels and Folders](./07-labels-folders.md) — Learn how to organize emails with labels +- [Mail Rules](./08-rules.md) — Set up automated rules for email processing diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/07-labels-folders.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/07-labels-folders.md new file mode 100644 index 0000000..6405add --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/07-labels-folders.md @@ -0,0 +1,113 @@ +--- +title: Labels and Folders +description: Learn how to use labels and folders to organize emails, including system labels, custom labels, and global labels. +keywords: [email labels, folders, categories, global labels] +--- + +# Labels and Folders + +As your mailbox grows, finding specific emails becomes harder. DesireCore provides a flexible label system to help you organize emails systematically. + +## Folders + +Each account has a set of folders displayed as horizontal tabs in the email view. Four default folders are always shown: + +| Folder | Description | +|--------|-------------| +| 📥 Inbox | Received emails | +| 📤 Sent | Emails you sent | +| 📝 Drafts | Unsent drafts | +| 🗑️ Trash | Deleted emails | + +Folder structure mirrors the native structure of your email provider and is synced automatically when the account is added. + +## Label Types + +DesireCore has three types of labels: + +| Label type | Source | Description | +|-----------|--------|-------------| +| **System labels** | Email provider | Gmail's Inbox, Starred, Important, etc.—built in by the provider | +| **Account labels** | User-created | Custom labels bound to a specific email account | +| **Global labels** | User-created | Labels that work across all accounts; especially useful in the Unified Inbox | + +## Creating and Managing Labels + +### Creating a Label + +You can create new labels in the label management area with these options: + +- **Label name** — e.g., "To Reply", "Project A", "VIP Client" +- **Color** — Choose from 10 preset colors (red, orange, yellow, green, cyan, blue, indigo, purple, pink, gray) +- **Scope** — Current account only, or global +- **Visibility** — Whether to show in the label list +- **Sort weight** — Adjust display order in the list + +### Editing and Deleting Labels + +You can modify a label's name, color, and sort order at any time. Deleting a label does not delete the emails themselves—emails simply lose that label. + +## Applying Labels to Emails + +In the email preview panel toolbar, there is a label/category dropdown: + +- **Gmail accounts** — Displays a multi-select label picker; you can assign multiple labels to an email +- **Outlook accounts** — Displays a category selector with similar functionality +- **IMAP accounts** — Label operations are not supported + +An email can carry multiple labels simultaneously. + +## Label Sync Mechanism + +Different email providers use different label synchronization strategies: + +| Dimension | Gmail | Outlook | IMAP | +|-----------|-------|---------|------| +| Sync direction | Bidirectional (local ↔ server) | Bidirectional (local ↔ server) | Read-only | +| Auto-sync timing | On account add + every email sync | On account add + every email sync | On account add | +| New label sync | ✅ Pushed to Gmail immediately | ✅ Pushed to Outlook immediately | ❌ Not supported | +| Delete label sync | ✅ Synced (emails unaffected) | ✅ Synced | ❌ Not supported | +| Color sync | ✅ Matches Gmail web UI | ✅ Matches Outlook client | — | +| Nested labels | ✅ Supported (e.g., Work/ProjectA) | ❌ Not supported | — | + +### Triggering Manual Sync + +If labels appear out of date, trigger a manual sync: + +1. Go to Accounts Home +2. Click the **Sync** button on the relevant account card +3. Labels and emails refresh together + +### Gmail Labels + +DesireCore automatically syncs your existing Gmail labels when the account is added. Labels modified in DesireCore are synced back to the Gmail server. Gmail's nested labels (e.g., `Work/ProjectA`) are displayed hierarchically. + +### Outlook Categories + +Outlook uses the concept of **Categories**, which function similarly to labels. DesireCore automatically syncs your Outlook categories and displays them as labels. Outlook categories do not support nesting but do support custom colors. + +### IMAP Accounts + +IMAP protocol has limited label support (only system flags like `\Flagged` and `\Seen`). For IMAP accounts, DesireCore: + +- Can **read** existing labels/flags from the server +- Supports **marking read/unread** and **starring** +- Does **not** support creating custom labels +- Can use DesireCore **global labels** (stored locally only, not synced to server) + +:::tip Using Global Labels +If you have multiple accounts, create global labels (e.g., "Urgent", "This Week") to filter emails across accounts in the Unified Inbox. Global labels are stored locally in DesireCore and do not depend on your provider's label capabilities, making them fully available for IMAP accounts. +::: + +## Filtering Emails by Label + +In the email view, click a label in the left sidebar to filter emails that carry that label: + +- Supports **multi-label filtering** (hold Ctrl/Cmd and click multiple labels) +- Global and account labels can be mixed +- Click "Clear filter" to show all emails again + +## Next Steps + +- [Mail Rules](./08-rules.md) — Set up rules to automatically label emails +- [Sync and Offline](./09-sync-offline.md) — Understand the label sync mechanism diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/08-rules.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/08-rules.md new file mode 100644 index 0000000..78113b8 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/08-rules.md @@ -0,0 +1,94 @@ +--- +title: Mail Rules +description: Learn how to create mail rules that automatically classify, label, archive, and process new emails based on conditions. +keywords: [mail rules, auto-classify, filters, automation] +--- + +# Mail Rules + +When you receive many emails daily, manual sorting is time-consuming and easy to overlook. DesireCore's mail rules system automatically performs specified actions on new emails based on conditions you define. + +## How Rules Work + +![Rule execution flow](/img/user-guide/email/rule-flow.svg) + +Rules execute automatically during background sync—each time new emails arrive, the system matches them against rules in priority order. + +## Creating Rules + +### Setting Conditions + +Each rule contains one or more conditions. A condition has three parts: + +| Component | Description | Example | +|-----------|-------------|---------| +| **Field** | Which part of the email to match | Sender, recipient, subject, body, has attachments | +| **Operator** | How to match | Contains, does not contain, equals, starts with, ends with, regex | +| **Value** | Content to match | `newsletter@example.com`, `[Notification]` | + +Multiple conditions can be combined with a logic operator: + +- **All match (AND)** — Rule triggers only when all conditions are met +- **Any match (OR)** — Rule triggers when any single condition is met + +### Setting Actions + +When conditions are met, the following actions are available (multiple can be combined): + +| Action | Description | +|--------|-------------| +| **Add label** | Apply a specified label to the email | +| **Remove label** | Remove a specified label from the email | +| **Move to folder** | Move the email to a specified folder | +| **Mark read** | Automatically mark as read | +| **Mark unread** | Mark as unread | +| **Star** | Add star/flag | +| **Archive** | Remove from inbox without deleting | +| **Forward** | Automatically forward to a specified address | +| **Delete** | Move to trash | + +## Rule Examples + +### Auto-Classify Subscription Emails + +> **Condition**: Sender contains `newsletter` OR `noreply` +> +> **Action**: Add label "Subscriptions", mark as read + +### Highlight VIP Client Emails + +> **Condition**: Sender equals `vip@client.com` +> +> **Action**: Add label "VIP Client", star + +### Filter Notification Emails + +> **Condition**: Subject starts with `[Notification]` **AND** Sender contains `system` +> +> **Action**: Move to "Notifications" folder, mark as read + +## Managing Rules + +### Rule Priority + +Rules execute in priority order from highest to lowest. You can reorder rules to control execution sequence. + +### Stop on Match + +Each rule has a `stopOnMatch` option: + +- **Enabled** — After this rule matches, no further rules are checked +- **Disabled** — Even after matching, subsequent rules are still checked + +:::tip When to Use "Stop on Match" +When you have a "catch-all" rule (e.g., "Label all uncategorized emails as Other"), ensure it has the lowest priority and that all preceding rules have "Stop on Match" enabled—otherwise every email gets labeled "Other." +::: + +### Manual Rule Execution + +In addition to automatic execution, you can manually apply a rule to existing emails. This is useful when you create a new rule and want to retroactively process historical emails. + +## Next Steps + +- [Sync and Offline](./09-sync-offline.md) — Learn about email sync and offline operations +- [Labels and Folders](./07-labels-folders.md) — Understand the label system for use with rules diff --git a/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/09-sync-offline.md b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/09-sync-offline.md new file mode 100644 index 0000000..2c02761 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/02-user-guide/12-email/09-sync-offline.md @@ -0,0 +1,101 @@ +--- +title: Sync and Offline +description: Learn about DesireCore's email synchronization mechanism, polling strategy, and offline operation queue. +keywords: [email sync, offline mode, incremental sync, polling] +--- + +# Sync and Offline + +DesireCore stores email data locally and keeps it consistent with the email server through background synchronization. Even without a network connection, you can still view previously synced emails and perform operations. + +## Sync Mechanism + +### Automatic Sync + +After adding an account, DesireCore automatically starts background polling to check for new emails periodically. + +![Sync flow](/img/user-guide/email/sync-flow.svg) + +### Incremental Sync + +To save bandwidth and improve efficiency, DesireCore uses incremental sync—only fetching changes since the last sync: + +| Account type | Incremental method | Description | +|-------------|-------------------|-------------| +| Gmail | History API | Tracks changes via `historyId`; fetches only new and modified emails | +| Outlook | Delta API | Uses `deltaLink` for incremental queries; highly efficient | +| IMAP | UID tracking | Records the last synced UID and fetches only newer emails | + +### Manual Sync + +Click the **Sync** button in the email view's top bar to trigger an immediate sync. The **Sync All** button in the Unified Inbox triggers sync for all accounts simultaneously. + +### Sync Status + +The top bar displays real-time sync status: + +- **Syncing** — Blue pulse animation +- **Sync failed** — Red indicator +- **Completed** — Shows last sync time, e.g., "5 minutes ago" + +## Local Storage + +Synced emails are stored with the following structure: + +``` +~/.desirecore/mail/ +├── gmail/ +│ └── user@gmail.com/ +│ ├── meta.json # Account info, sync state +│ ├── index.json # Email index (for fast search and listing) +│ └── messages/ # Full content of each email +├── outlook/ +│ └── ... +└── imap/ + └── ... +``` + +- **Index files** store lightweight email metadata for list display and search +- **Message files** store full email body and attachment data +- All sensitive information (tokens, passwords) is encrypted with AES-256-GCM + +## Offline Operations + +When you perform email actions without a network connection, DesireCore does not throw an error—the action is placed in an **offline queue** and executed automatically when the network is restored. + +### Supported Offline-Queued Operations + +| Operation | Description | +|-----------|-------------| +| Mark read/unread | Synced to server when back online | +| Delete email | Deletion executed on server when back online | +| Move to folder | Move performed when back online | +| Add/remove labels | Label changes synced when back online | +| Send email | Sent automatically when back online | +| Archive | Archive executed when back online | + +### Queue Processing + +The offline operation queue follows these rules: + +- Operations execute automatically in order when the network is restored +- Each operation is retried up to 3 times +- Operations that still fail are marked as "Failed"; you can view the failure reason and manually retry or delete + +:::info Optimistic Updates +Even while offline, the state you see in DesireCore updates immediately (e.g., marking an email as read instantly changes the UI). If the subsequent server sync fails, the state is rolled back. +::: + +## Sync Settings + +You can configure sync options individually for each account: + +| Setting | Description | +|---------|-------------| +| **Sync interval** | Time between automatic polling cycles (in minutes); set to 0 to disable auto-sync | +| **New mail notification** | Whether to push notifications when new emails arrive | + +## Next Steps + +- [Accounts Home](./02-accounts-home.md) — Review the email management interface +- [Add Accounts](./03-add-accounts.md) — Add more email accounts diff --git a/i18n/en/docusaurus-plugin-content-docs/current/03-use-cases/01-general/07-flowchart-agent.md b/i18n/en/docusaurus-plugin-content-docs/current/03-use-cases/01-general/07-flowchart-agent.md index 243b683..ac3d5a3 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/03-use-cases/01-general/07-flowchart-agent.md +++ b/i18n/en/docusaurus-plugin-content-docs/current/03-use-cases/01-general/07-flowchart-agent.md @@ -108,7 +108,6 @@ This use case lets an AI agent automatically generate professional flowcharts ba ``` ![Microservices Architecture](./assets/microservice-architecture.png) -File location: ./assets/flowchart/microservice-architecture.drawio ### Scenario 3: Extract Process from Document