docs(comments): 注释中文化 · internal/runtime/model + internal/services/backthink(54 文件,纯替换)
- 只翻注释/文档字符串:`go/scanner` 剥注释后按 token 序列+literal 逐 token 比对,**54/54 文件 SAME**;
改动文件总行数与 HEAD 漂移 = 0(严格 1:1,无合并/拆行)
- 裁决编号与 design 节号逐字保留(03.4.1/03.4.2/03.4.3/14.4.1/14.4.5/07.4.2-4、design/04 §3.1/§3.2 等);
`chat_template_kwargs` / `enable_thinking` / `reasoning_effort` / `thinking:{type}` 字段名与形状说明未动
- 存疑译法(已登记):`persona` 在叙事语境用「角色」、标识符语境保留 `persona`(仓库既有模块本身混用);
`rung`→「级」;`provider` 存在「提供商/提供者」两种落笔(可按需一键统一)
- 复核:build/vet 绿 + 两包测试绿;gofmt 干净;残留英文注释 0 条
- 既有存量(未修,只报告):`model/anthropic_test.go` 612 行 >500;`applyAnthropicEvent` 115 行 >80
This commit is contained in:
1 parent
f5cf117482
commit
3dc1232bc2
54 files changed
+1923
-1923
No files matched your search
@@ -9,8 +9,8 @@ import (
|
||||
"git.yeij.top/AskaEth/Cyrene_v2/internal/iot"
|
||||
)
|
||||
|
||||
// stateMockProvider is a tiny iot.Provider that returns a heart-rate watch, a
|
||||
// sleep band and a working-calendar device, to exercise the state decoding.
|
||||
// stateMockProvider 是一个极小的 iot.Provider,返回心率手表、
|
||||
// 睡眠手环与工作日历设备,用于演练状态解码。
|
||||
type stateMockProvider struct{}
|
||||
|
||||
func (stateMockProvider) Name() string { return "state-mock" }
|
||||
@@ -73,8 +73,8 @@ func TestIoTStateProvider_EmptyNeutral(t *testing.T) {
|
||||
t.Fatalf("iot.New: %v", err)
|
||||
}
|
||||
p := NewIoTStateProvider(mgr, nil)
|
||||
// The mock provider has no heart-rate/sleep/working device, so it must yield
|
||||
// a zero state instead of an error, keeping the service operable.
|
||||
// 该 mock 提供者没有心率/睡眠/工作设备,所以它必须给出
|
||||
// 零值状态而不是错误,保持服务可运行。
|
||||
st, err := p.Current(context.Background())
|
||||
if err != nil {
|
||||
t.Fatalf("Current: %v", err)
|
||||
|
||||
Reference in new issue
Block a user