Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
0a9eca8
feat(easter_egg): add repeat and inverted question mark features
69gg Apr 17, 2026
4af0bec
docs(deployment): prioritize source deployment over pip/uv tool
69gg Apr 17, 2026
379ae4d
fix(meme): 表情包动图判定改进与更好的重试
69gg Apr 18, 2026
255bf8c
docs: expand usage guide and enforce mandatory LaTeX dependency
69gg Apr 18, 2026
a42da3d
feat: attachment hash dedup, unified tags, LaTeX MathJax refactor, me…
69gg Apr 18, 2026
0e735cb
fix(render_latex): pass proxy config to Playwright for CDN access
69gg Apr 18, 2026
1571d7e
feat(config): sync_config_template 报告注释变更路径;gif_analysis_mode 下拉选择
69gg Apr 18, 2026
987ac13
feat(repeat): bot 发言不计入复读链;阈值可配置
69gg Apr 18, 2026
f671227
fix(profile,latex): 修复侧写双复数路径和MathJax等待条件
69gg Apr 18, 2026
c230499
fix(summary): 移除等待提示、改用朴素文字输出格式
69gg Apr 18, 2026
2b597fb
fix(prompt): 移除示例输出风格,简化段落描述要求
69gg Apr 18, 2026
e5a85f1
fix(summary): 对齐主AI消息XML并修复参数透传
69gg Apr 18, 2026
aa0a717
feat(summary): 添加消息总结专用模型配置
69gg Apr 18, 2026
2240584
feat: 假@识别 + /profile 多输出模式
69gg Apr 18, 2026
1595d88
refactor(profile): 优化合并转发和渲染输出格式
69gg Apr 18, 2026
a96e369
fix(profile): 使用 WebUI 配色、提高截断上限至 5000
69gg Apr 18, 2026
f3a802c
feat(agents): 新增 arXiv 论文深度分析 agent
69gg Apr 18, 2026
45e5a36
docs: 更新 CLAUDE.md agents 数量为 7
69gg Apr 18, 2026
9439b0e
feat(tools): 新增 calculator 多功能安全计算器
69gg Apr 19, 2026
56d277c
feat(config): 消息历史限制全面可配置化
69gg Apr 19, 2026
6b274c0
feat(webui): 长期记忆完整 CRUD 管理
69gg Apr 19, 2026
9d74156
fix(profile): 修复 -r 渲染留白和字小问题
69gg Apr 19, 2026
fab3d10
test: 全面补齐单元测试覆盖 (804 → 1423)
69gg Apr 19, 2026
3ccd2ab
feat(help): 为 /help 添加 /h 别名
69gg Apr 19, 2026
d6076be
feat: profile超管查询 + utils/coerce公共模块 + WebUI安全增强
69gg Apr 19, 2026
1ec1919
feat(webui): 骨架屏CSS + 日志时间过滤 + 资源趋势图 + TOML原始视图
69gg Apr 19, 2026
0e034fc
feat(webui): add Cmd/Ctrl+K command palette
69gg Apr 19, 2026
759aeb6
feat(webui): add config version history and rollback backend
69gg Apr 19, 2026
8f478b9
feat(webui): add modal focus trap and wire into command palette
69gg Apr 19, 2026
a410707
refactor(config): split loader.py into sub-modules
69gg Apr 19, 2026
30b9a26
refactor(api): extract helpers, probes, and OpenAPI from app.py
69gg Apr 19, 2026
72ac2d9
fix(queue): register historian model in queue interval builder
69gg Apr 19, 2026
e972c6e
perf(handlers): parallelize message preprocessing with asyncio.gather
69gg Apr 19, 2026
a3fc737
refactor(api): split app.py into route submodules
69gg Apr 19, 2026
0480ac7
feat(repeat): add cooldown to prevent re-repeating same content
69gg Apr 19, 2026
b024427
docs: 更新文档覆盖复读冷却、假@检测、profile输出模式与API拆分
69gg Apr 19, 2026
33d7158
docs(changelog): 重写 v3.3.2 条目覆盖所有 feature/u-guess 变更
69gg Apr 19, 2026
dcf02ab
chore(version): bump version to 3.3.2
69gg Apr 19, 2026
64af9b3
fix(test): skip LaTeX render tests when Playwright browser binary mis…
69gg Apr 19, 2026
7395472
fix: address PR review findings from Devin and Codex
69gg Apr 19, 2026
5f659a8
fix: address additional Devin review flags
69gg Apr 19, 2026
4c973b9
fix(config): parse gif_analysis_mode/gif_analysis_frames from TOML
69gg Apr 19, 2026
589f949
fix(memes): clean up GIF multi-frame analysis temp files
69gg Apr 19, 2026
b80277c
fix(attachments): skip prompt_ref append on render error
69gg Apr 19, 2026
58df790
docs(prompts): strengthen naga_code_analysis_agent call guidance
69gg Apr 19, 2026
e02e066
fix(prompt): clarify keyword auto-reply is code-path-only to prevent …
69gg Apr 19, 2026
d7a294f
fix(repeat): don't silently drop messages when cooldown suppresses re…
69gg Apr 19, 2026
1daa53f
fix(memes,repeat): address 3 Devin review bugs
69gg Apr 19, 2026
60e723b
fix(latex): preserve LaTeX commands like \nu \nabla \neq during \n re…
69gg Apr 19, 2026
9f1c756
feat(vision): add configurable max_tokens to VisionModelConfig
69gg Apr 19, 2026
4a6c57c
refactor(historian): use context_recent_messages_limit and XML format
69gg Apr 19, 2026
9312558
fix(webui): cap top_k overflow, debounce meme search, reorder dashboard
69gg Apr 19, 2026
c347f6d
fix(hot_reload,repeat): address 2 Devin review bugs
69gg Apr 19, 2026
ce5db0f
docs(changelog): update v3.3.2 with all session fixes and improvements
69gg Apr 19, 2026
0b009db
docs(changelog): simplify v3.3.2 format to match prior versions
69gg Apr 19, 2026
a2b8b26
docs(webui): add WebUI usage guide and cross-reference links
69gg Apr 19, 2026
06a8311
fix(calculator): cap combinatorial function args to prevent CPU exhau…
69gg Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ description: 从 PDF 文件中提取文本和表格,填写表单。当用户
### 8层架构分层

1. **外部实体层**:用户、管理员、OneBot 协议端 (NapCat/Lagrange.Core)、大模型 API 服务商
2. **核心入口层**:main.py 启动入口、配置管理器 (config/loader.py)、热更新应用器 (config/hot_reload.py)、OneBotClient (onebot.py)、RequestContext (context.py)
2. **核心入口层**:main.py 启动入口、配置管理器 (config/loader.py)、热更新应用器 (config/hot_reload.py)、OneBotClient (onebot.py)、RequestContext (context.py)、Runtime API Server (api/app.py → api/routes/ 路由子模块)
3. **消息处理层**:MessageHandler (handlers.py)、SecurityService (security.py)、CommandDispatcher (services/command.py)、AICoordinator (ai_coordinator.py)、QueueManager (queue_manager.py)、Bilibili 自动提取 (bilibili/)
4. **AI 核心能力层**:AIClient (client.py)、PromptBuilder (prompts.py)、ModelRequester (llm.py)、ToolManager (tooling.py)、MultimodalAnalyzer (multimodal.py)、SummaryService (summaries.py)、TokenCounter (tokens.py)
5. **存储与上下文层**:MessageHistoryManager (utils/history.py, 10000条限制)、MemoryStorage (memory.py, 置顶备忘录, 500条上限)、EndSummaryStorage、CognitiveService + JobQueue + HistorianWorker + VectorStore + ProfileStorage、MemeService + MemeWorker + MemeStore + MemeVectorStore (表情包库)、FAQStorage、ScheduledTaskStorage、TokenUsageStorage (自动归档)
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## v3.3.2 架构重构、假@检测与认知侧写增强

围绕核心架构进行了大规模重构与功能增强:Runtime API 拆分为路由子模块、配置系统模块化拆分、新增假@检测机制与 /profile 多输出模式。同步引入复读机制全面升级(可配置阈值与冷却)、消息预处理并行化、WebUI 多项交互功能,以及 arXiv 论文分析 Agent 和安全计算器工具。测试覆盖从约 800 提升至 1438+。

- 新增假@检测:群聊中 `@+Bot昵称` 的文本形式也被识别为@消息,自动获取昵称(防竞态),`@昵称 /命令` 可正常触发斜杠指令。
- `/profile` 命令支持三种输出模式:`-f` 合并转发(默认)、`-r` 渲染为图片、`-t` 直接文本发送;超管可通过 `/p <QQ号>` 和 `/p g <群号>` 跨目标查看。
- 复读系统全面升级:触发阈值可配置(`repeat_threshold`)、Bot 发言不计入复读链、新增冷却机制(`repeat_cooldown_minutes`,?与 ? 等价)。
- Vision 模型 `max_tokens` 可配置(`[models.vision].max_tokens`,默认 8192),解决 thinking 模型 token 耗尽导致工具调用截断。
- 新增 arXiv 论文深度分析 Agent 与 `calculator` 安全计算器工具;新增消息历史限制可配置化(`[history].max_records`)。
- Runtime API 拆分为 8 个路由子模块(`api/routes/`);配置系统拆为 `loader.py`、`models.py`、`hot_reload.py`。
- 消息预处理并行化(`asyncio.gather`),认知史官改用 XML 格式并统一至 `utils/xml.py`。
- WebUI:Cmd/Ctrl+K 命令面板、骨架屏、日志时间过滤、资源趋势图、TOML 原始视图、配置版本历史与回滚、长期记忆 CRUD、Modal 焦点陷阱。
- WebUI 修复 top_k 溢出崩溃(四层防护)、表情包搜索防抖、仪表盘布局优化。
- 修复 AI 模仿系统关键词自动回复前缀、LaTeX `\n` 替换破坏数学命令、复读冷却消息丢弃与内存泄漏、historian 热重载追踪缺失、GIF 多帧分析与临时文件泄漏、附件渲染异常等多项问题。
- 修复 `/profile` 渲染留白和字体过小问题,使用 WebUI 配色并提高截断上限至 5000 字符。

---

## v3.3.1 /version 命令的添加

添加了 /version 命令以查看版本号和更改内容。
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ OneBot WebSocket → onebot.py → handlers.py → SecurityService(注入检测)
|------|------|
| `ai/` | AI 核心:client.py(主入口)、llm.py(模型请求)、prompts.py(Prompt构建)、tooling.py(工具管理)、multimodal.py(多模态)、model_selector.py(模型选择) |
| `services/` | 运行服务:ai_coordinator.py(协调器+队列投递)、queue_manager.py(车站-列车队列)、command.py(命令分发)、model_pool.py(多模型池)、security.py(安全防护) |
| `skills/` | 热重载技能系统:tools/(原子工具)、toolsets/(11类工具集)、agents/(6个智能体)、commands/(斜杠指令)、anthropic_skills/(SKILL.md知识注入) |
| `skills/` | 热重载技能系统:tools/(原子工具)、toolsets/(11类工具集)、agents/(7个智能体)、commands/(斜杠指令)、anthropic_skills/(SKILL.md知识注入) |
| `cognitive/` | 认知记忆:service.py(入口)、vector_store.py(ChromaDB)、historian.py(后台史官异步改写+侧写合并)、job_queue.py、profile_storage.py |
| `memes/` | 表情包库:service.py(两阶段AI管线)、worker.py(异步处理队列)、store.py(SQLite)、vector_store.py(ChromaDB)、models.py |
| `config/` | 配置系统:loader.py(TOML解析+类型化)、models.py(数据模型)、hot_reload.py(热更新) |
Expand All @@ -80,7 +80,7 @@ OneBot WebSocket → onebot.py → handlers.py → SecurityService(注入检测)
车站-列车模型(QueueManager):按模型隔离队列组,4 级优先级(超管 > 私聊 > @提及 > 普通群聊),普通队列自动修剪保留最新 2 条,非阻塞按节奏发车(默认 1Hz)。

### 存储与数据
- `data/history/` — 消息历史(group_*.json / private_*.json,10000 条限制
- `data/history/` — 消息历史(group_*.json / private_*.json,默认 10000 条,可通过 `[history]` 配置节调整,0=无限制
- `data/cognitive/` — ChromaDB 向量库 + profiles/ 侧写 + queues/ 任务队列
- `data/memes/` — 表情包库(blobs原图、previews预览图、memes.sqlite3元数据、chromadb向量检索)
- `data/memory.json` — 置顶备忘录(500 条上限)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
Undefined 的功能极为丰富,为了让本页面不过于臃肿,我们将各个模块的深入解析与高阶玩法整理成了专题游览图。这里是开启探索的钥匙:

- ⚙️ **[安装与部署指南](docs/deployment.md)**:不管你是需要 `pip` 无脑一键安装,还是源码二次开发,这里的排坑指南应有尽有。
- 🖥️ **[WebUI 使用指南](docs/webui-guide.md)**:管理控制台功能一览——配置编辑、日志查看、认知记忆管理、表情包库、AI 对话与系统监控。
- 🧭 **[Management API 与远程管理](docs/management-api.md)**:WebUI / App 共用的管理接口、认证、配置/日志/Bot 控制与引导探针说明。
- 🛠️ **[配置与热更新说明](docs/configuration.md)**:从模型切换到 MCP 库挂载,全方位掌握 `config.toml` 的高阶配置。
- 😶 **[表情包系统 (Memes)](docs/memes.md)**:查看表情包两阶段判定管线、统一图片 `uid` 发送机制、检索模式及库存管理说明。
Expand Down
4 changes: 2 additions & 2 deletions apps/undefined-console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/undefined-console/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "undefined-console",
"private": true,
"version": "3.3.1",
"version": "3.3.2",
"type": "module",
"scripts": {
"tauri": "tauri",
Expand Down
2 changes: 1 addition & 1 deletion apps/undefined-console/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/undefined-console/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "undefined_console"
version = "3.3.1"
version = "3.3.2"
description = "Undefined cross-platform management console"
authors = ["Undefined contributors"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion apps/undefined-console/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Undefined Console",
"version": "3.3.1",
"version": "3.3.2",
"identifier": "com.undefined.console",
"build": {
"beforeDevCommand": "npm run dev",
Expand Down
103 changes: 98 additions & 5 deletions config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ api_key = ""
# zh: Vision 模型名称。
# en: Vision model name.
model_name = ""
# zh: Vision 模型最大输出 tokens。启用 thinking 时建议设大(如 8192),确保思维链消耗后仍有余量输出工具调用。
# en: Vision model max output tokens. When thinking is enabled, use a larger value (e.g. 8192) so there is still room for tool-call output after thinking.
max_tokens = 8192
# zh: 队列发车间隔(秒,0 表示立即发车)。
# en: Queue interval (seconds; 0 dispatches immediately).
queue_interval_seconds = 1.0
Expand Down Expand Up @@ -424,6 +427,60 @@ prompt_cache_enabled = true
# en: Extra request-body params (optional), e.g. temperature or vendor-specific fields.
[models.historian.request_params]

# zh: 消息总结模型配置(/summary /sum 专用;未配置时回退到 agent 模型)。
# en: Message-summary model config (used by /summary and /sum; falls back to the agent model when unset).
[models.summary]
# zh: OpenAI-compatible 基址 URL,例如 https://api.openai.com/v1(legacy "/chat/completions" 已弃用但仍兼容)。
# en: OpenAI-compatible base URL, e.g. https://api.openai.com/v1. Note: legacy "/chat/completions" is deprecated but still supported.
api_url = ""
# zh: 消息总结模型 API Key。
# en: Message-summary model API key.
api_key = ""
# zh: 消息总结模型名称。
# en: Message-summary model name.
model_name = ""
# zh: 可选限制:最大生成 tokens。
# en: Optional limit: max generation tokens.
max_tokens = 4096
# zh: 队列发车间隔(秒,0 表示立即发车)。
# en: Queue interval (seconds; 0 dispatches immediately).
queue_interval_seconds = 1.0
# zh: API 模式:传统 chat.completions 或新版 responses。
# en: API mode: classic chat.completions or the newer responses API.
api_mode = "chat_completions"
# zh: 是否启用 reasoning.effort。
# en: Enable reasoning.effort.
reasoning_enabled = false
# zh: reasoning effort 档位。
# en: reasoning effort level.
reasoning_effort = "medium"
# zh: 是否启用 thinking(思维链)。
# en: Enable thinking (reasoning).
thinking_enabled = false
# zh: thinking 预算 tokens。
# en: Thinking-budget tokens.
thinking_budget_tokens = 0
# zh: 是否在请求中发送 budget_tokens(关闭后由提供商决定思维预算)。
# en: Whether to include budget_tokens in the request (if disabled, the provider decides the thinking budget).
thinking_include_budget = true
# zh: reasoning effort 传参风格:openai(reasoning.effort)/ anthropic(output_config.effort)。
# en: Reasoning effort wire format: openai (reasoning.effort) / anthropic (output_config.effort).
reasoning_effort_style = "openai"
# zh: 思维链工具调用兼容:启用后在多轮工具调用中回传 reasoning_content,避免部分模型返回 400。
# en: Thinking tool-call compatibility: pass back reasoning_content in multi-turn tool calls to avoid 400 errors from some models.
thinking_tool_call_compat = true
# zh: Responses API 的 tool_choice 兼容模式:仅在关闭时请求仍返回 500、怀疑上游不兼容对象型 tool_choice 时再尝试开启;开启后上报为 "required" 并只保留目标工具。默认关闭。
# en: Responses API tool_choice compatibility mode: only try enabling this when requests still return 500 with the default setting and you suspect the upstream does not support object-style tool_choice; it sends "required" and keeps only the selected tool. Disabled by default.
responses_tool_choice_compat = false
# zh: Responses API 续轮强制降级:启用后,多轮工具调用将始终跳过 previous_response_id,直接使用完整消息重放(stateless replay)。仅在上游不兼容 responses 状态续轮时使用。默认关闭。
# en: Responses API force stateless replay: when enabled, multi-turn tool follow-ups always skip previous_response_id and replay the full message history instead. Use only when the upstream does not handle stateful responses follow-ups correctly. Disabled by default.
responses_force_stateless_replay = false
prompt_cache_enabled = true

# zh: 额外请求体参数(可选),可用于 temperature 或供应商私有参数。
# en: Extra request-body params (optional), e.g. temperature or vendor-specific fields.
[models.summary.request_params]

# zh: Grok 搜索模型配置(仅供 web_agent 内的 grok_search 使用;固定走 chat.completions,不支持 tool call 兼容字段)。
# en: Grok search model config (used only by grok_search inside web_agent; always uses chat completions and does not expose tool-call compatibility fields).
[models.grok]
Expand Down Expand Up @@ -656,16 +713,46 @@ pool_enabled = false
# zh: 彩蛋提示发送模式。模式:"none"(关闭)/"agent"(主 AI 调用 Agent 时发送)/"tools"(主 AI 或 Agent 调用 Tool 时发送)/"clean"(过滤噪声;对自动预取的工具如 "get_current_time"、"send_message"、"end" 不予提示)/"all"(包括 Agent 内部调用其子工具即 "agent_tool" 的场景也发送)。默认:"none"。
# en: Easter-egg announcement mode. Modes: "none" (off) / "agent" (send when the main AI calls an Agent) / "tools" (send when the main AI or an Agent calls a Tool) / "clean" (filter noise; automatically prefetched tools such as "get_current_time", "send_message", and "end" are not announced) / "all" (also send when an Agent internally calls its sub-tools, i.e. "agent_tool"). Default: "none".
agent_call_message_enabled = "none"
# zh: 是否启用群聊关键词(心理委员)自动回复。
# zh: 是否启用群聊关键词("心理委员")自动回复。
# en: Enable keyword auto-replies("心理委员") in group chats.
keyword_reply_enabled = false
# zh: 是否启用群聊复读功能(连续 N 条相同消息时复读,N 由 repeat_threshold 控制;若期间有 bot 自身发言则重置链)。
# en: Enable repeat feature in group chats (repeat when N consecutive identical messages arrive, N set by repeat_threshold; resets if bot itself sent the same text in between).
repeat_enabled = false
# zh: 复读触发所需的连续相同消息条数(来自不同发送者),范围 2–20,默认 3。
# en: Number of consecutive identical messages (from different senders) required to trigger repeat, range 2–20, default 3.
repeat_threshold = 3
# zh: 复读冷却时间(分钟)。同一内容被复读后,在冷却时间内不再重复复读。0 = 无冷却。问号类消息(?/?)视为等价。
# en: Repeat cooldown (minutes). After repeating the same content, won't repeat it again within this cooldown. 0 = no cooldown. Question marks (?/?) are treated as equivalent.
repeat_cooldown_minutes = 60
# zh: 是否启用倒问号(复读触发时,若消息为问号则发送倒问号 ¿)。
# en: Enable inverted question mark (when repeat triggers on "?" messages, send "¿" instead).
inverted_question_enabled = false

# zh: 历史记录配置。
# en: History settings.
[history]
# zh: 每个会话最多保留的消息条数。
# en: Max messages to keep per conversation.
# zh: 每个会话最多保留的消息条数(0 = 无限制,注意内存占用)
# en: Max messages to keep per conversation (0 = unlimited, mind memory usage).
max_records = 10000
# zh: 工具过滤查询返回的最大消息条数。
# en: Max messages returned by tool filtered queries.
filtered_result_limit = 200
# zh: 工具过滤搜索时扫描的最大消息条数。
# en: Max messages to scan when tools perform filtered searches.
search_scan_limit = 10000
# zh: 总结 agent 单次拉取的最大消息条数。
# en: Max messages the summary agent can fetch per call.
summary_fetch_limit = 1000
# zh: 总结 agent 按时间范围查询时的最大拉取条数。
# en: Max messages the summary agent fetches for time-range queries.
summary_time_fetch_limit = 5000
# zh: OneBot API 回退获取的最大消息条数。
# en: Max messages to fetch via OneBot API fallback.
onebot_fetch_limit = 10000
# zh: 群分析工具的消息/成员返回上限。
# en: Max messages/members returned by group analysis tools.
group_analysis_limit = 500

# zh: Skills 热重载配置(可选)。
# en: Skills hot reload settings (optional).
Expand Down Expand Up @@ -710,8 +797,8 @@ grok_search_enabled = false
# zh: 代理设置(可选)。
# en: Proxy settings (optional).
[proxy]
# zh: 是否在 "web_agent" 中启用代理
# en: Enable proxy in "web_agent".
# zh: 是否使用代理
# en: Whether to use proxy.
use_proxy = true
# zh: 例如 http://127.0.0.1:7890(也可使用环境变量 "HTTP_PROXY")。
# en: e.g. http://127.0.0.1:7890 (or use the "HTTP_PROXY" environment variable).
Expand Down Expand Up @@ -1095,6 +1182,12 @@ max_total_bytes = 5368709120
# zh: 是否允许 GIF 入库。
# en: Whether GIF files are allowed.
allow_gif = true
# zh: GIF 分析模式:grid(多帧拼接为网格图)或 multi(多帧分开发送给模型)。
# en: GIF analysis mode: grid (composite frames into grid) or multi (send frames separately).
gif_analysis_mode = "grid"
# zh: GIF 分析帧数(包括首末帧,均匀采样)。
# en: Number of frames to extract for GIF analysis (including first/last, evenly sampled).
gif_analysis_frames = 6
# zh: 是否自动处理群聊图片。
# en: Auto-ingest group chat images.
auto_ingest_group = true
Expand Down
51 changes: 51 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,57 @@ uv sync --group dev -p 3.12
uv run playwright install
```

### 系统级 LaTeX 环境(必装,用于 `render.render_latex`)

`render.render_latex` 使用系统外部 LaTeX(`usetex=True`)渲染公式,**必须提前安装**,否则渲染会失败并返回错误。

**Debian / Ubuntu**

```bash
sudo apt-get update
sudo apt-get install -y texlive-full dvipng ghostscript
```

**Arch Linux**

```bash
sudo pacman -S --needed \
texlive-basic \
texlive-bin \
texlive-latex \
texlive-latexrecommended \
texlive-latexextra \
texlive-fontsrecommended \
texlive-binextra \
texlive-mathscience \
ghostscript
```

**macOS**

```bash
# 推荐 MacTeX(完整,约 4 GB)
brew install --cask mactex-no-gui

# 或体积更小的 BasicTeX,之后按需补包
brew install --cask basictex
sudo tlmgr update --self
sudo tlmgr install dvipng type1cm type1ec cm-super collection-fontsrecommended
```

**Windows**

安装 [MiKTeX](https://miktex.org/download)(推荐,缺包时自动下载)或 [TeX Live](https://tug.org/texlive/windows.html)。安装完成后在 MiKTeX Console 里手动安装 `dvipng` 包,并确保 `latex.exe` 在 PATH 中。

**验证**

```bash
latex --version
dvipng --version
```

若日志出现 `type1ec.sty not found` 或 `latex was not able to process`,TeX 包仍不完整:Debian / Ubuntu 已装 `texlive-full` 则无需额外操作;Arch 补装 `texlive-latexextra` `texlive-fontsrecommended` `texlive-binextra`;macOS BasicTeX 用户运行 `sudo tlmgr install cm-super`。

### Node.js / Rust / Tauri

如果需要构建跨平台控制台,请额外准备:
Expand Down
Loading
Loading