docs(comments): 注释中文化 · internal/runtime/multimodal(21 文件,纯替换)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

- 只翻注释/文档字符串,代码零变化:go/scanner 词法流比对 21 文件 token+字面量全等,增删行数 1:1(467/467)
- 刻意保留非散文英文:JSON Schema description、工具 Description() 返回值、adapter prompt、API 路径与命令示例、环境变量名
- 逐行确认代码前缀未变,未触碰其他模块
This commit is contained in:
AskaEth committed 2026-10-04 12:28:16 +08:00
1 parent b9e042d07d
commit b0fbb8bc0d
21 files changed
+467 -467

No files matched your search

+9 -9
View File
@@ -2,21 +2,21 @@ package vision
import "errors"
// Sentinel errors returned by the vision package. Each is wrapped with %w on
// the way out so callers can test for a category while keeping the cause.
// vision 包返回的哨兵错误。每个错误向外传递时都以 %w
// 包装,使调用方能按类别判断,同时保留原始原因。
var (
// ErrNoImage is returned when an image source string is empty.
// ErrNoImage 在图像来源字符串为空时返回。
ErrNoImage = errors.New("vision: empty image source")
// ErrNotConfigured is returned by adapters when no endpoint/model is set.
// ErrNotConfigured 在适配器未设置 endpoint/model 时返回。
ErrNotConfigured = errors.New("vision: adapter not configured")
// ErrUnsupportedSource is returned when an image source cannot be handled.
// ErrUnsupportedSource 在图像来源无法处理时返回。
ErrUnsupportedSource = errors.New("vision: unsupported image source")
// ErrFetch is returned when a URL image cannot be downloaded.
// ErrFetch 在 URL 图像无法下载时返回。
ErrFetch = errors.New("vision: cannot fetch image")
// ErrUpstream is returned when the vision/OCR provider request fails.
// ErrUpstream 在 vision/OCR 提供方请求失败时返回。
ErrUpstream = errors.New("vision: upstream request failed")
// ErrBadImage is returned when an image cannot be read or decoded.
// ErrBadImage 在图像无法读取或解码时返回。
ErrBadImage = errors.New("vision: cannot read image")
// ErrBadArgs is returned by a tool when its arguments are malformed.
// ErrBadArgs 在工具参数格式错误时由该工具返回。
ErrBadArgs = errors.New("vision: bad tool arguments")
)