docs(cyrene): cmd/cyrene 存量英文注释中文化(22 个非测试文件,仅注释)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

- 四组并行完成:main/wire*.go、wire_capacity|channels|runtime、channels|persona_*|emotion|observability、
  voice|plugins|stream|skills|vision|subagent_tool|extractor|mcp|sessionread_tool|terminal_tool。
- 机械校验(git diff -U0 去 // 行与空行)仅剩 wire_frontend.go:84 一处行尾注释:代码前缀
  「\ta.gw = gw 」经 cat -A 与 HEAD 逐字节比对一致(allow 清单已声明)。
- 验收:隔离 worktree(HEAD + 本批 patch)go build/vet 绿、全树 58 包 ok、
  linux/amd64 + darwin/arm64 交叉编译绿;gofmt -l 干净。
- 备注:整树两次红均为负载敏感 flake(backthink / orchestration 的 timeout 类用例单独 -count=20 全过)。
This commit is contained in:
AskaEth committed 2026-10-04 16:58:06 +08:00
1 parent 5c2189efb0
commit 52f08dc343
22 files changed
+455 -586

No files matched your search

+7 -9
View File
@@ -8,21 +8,19 @@ import (
"git.yeij.top/AskaEth/Cyrene_v2/internal/runtime/multimodal/vision"
)
// visionToolName and ocrToolName are the registered names of the vision and OCR
// tools. They are bound to the tool registration here and advertised to the
// agent by the tool dispatcher.
// visionToolName 与 ocrToolName 是 vision 与 OCR 工具的注册名。它们在此与工具注册
// 绑定,并由工具分发器通告给 agent。
const (
visionToolName = "vision"
ocrToolName = "ocr"
)
// wireVision registers the vision and OCR tools and the vision model routing.
// wireVision 注册 vision 与 OCR 工具以及 vision 模型路由。
//
// The vision adapter is an OpenAI-compatible /chat/completions endpoint on the
// same base URL as the chat LLM (LLM_BASE_URL), using the dedicated model
// (LLM_VISION_MODEL) when set. When no base URL is configured the tools are
// skipped with a warning so startup never blocks; the model router is still
// bound to the vision model (in wireRuntime) whenever one is configured.
// vision 适配器是 OpenAI 兼容的 /chat/completions 端点,与聊天 LLM 共用同一 base
// URL(LLM_BASE_URL),配置了专用模型(LLM_VISION_MODEL)时使用该模型。未配置
// base URL 时只告警并跳过这些工具,启动因此绝不阻塞;只要配置了 vision 模型
// (在 wireRuntime 中),模型路由器仍会绑定到它。
func (a *app) wireVision() {
log := logger.WithSource(a.log, "cmd/cyrene")
if strings.TrimSpace(a.cfg.LLM.BaseURL) == "" {