docs(gateway): 余下 3 处行尾注释中文化(存量注释债结项)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

- 事实订正:任务书说「gateway 全包中文注释 ≈ 0」是 2026-10-03 的旧状态;该债早已分批还清(074ffc4 / 355f81d / fe1ff33)。本次清点:70 个非测试文件 / 3493 行 // 注释,仅 6 行无中文。

- 翻 3 行(都是行尾枚举提示,代码前缀逐字节不变):admin_write_iot_automations.go:107 (cron|event)、history.go:20 (main|sub)、history.go:47 (user|assistant);另 3 行是中文多行句子的纯标识符/帧名续行,按规则不翻。

- 机械校验:除这 3 组行尾注释外零输出(即整包 diff 无任何非注释行、非空行改动);gofmt -l 干净(改动前也干净);go build/vet 全树绿;gateway 包测试绿。

- 主会话独立复核:机械校验输出恰为 3 对(代码部分逐字相同)、gofmt 干净、go test ./internal/services/gateway/... 绿。

- 文档订正:开发习惯与约定.md 的「gateway ≈ 0 中文注释」已改写成结项事实(测试文件里的存量注释仍未清点,另记)。
This commit is contained in:
AskaEth committed 2026-10-04 18:57:58 +08:00
1 parent b1f9b11d6e
commit d37d4a899b
2 files changed
+3 -3

No files matched your search

@@ -104,7 +104,7 @@ func mapIotError(err error) *apperr.AppError {
// automationCreateRequest 是 POST /api/v1/admin/automations 的请求体。
type automationCreateRequest struct {
Name string `json:"name"`
Kind string `json:"kind"` // cron | event
Kind string `json:"kind"` // 取值:cron | event
Expression string `json:"expression"`
}
+2 -2
View File
@@ -17,7 +17,7 @@ import (
// (main 或 sub)的线上结构。
type historySessionSummary struct {
ID string `json:"id"`
Type string `json:"type"` // "main" | "sub"
Type string `json:"type"` // 取值:"main" | "sub"
Title string `json:"title,omitempty"`
CreatedAt int64 `json:"createdAt"`
// Pinned 把会话浮到列表顶部(D5)。它只是排序元数据,
@@ -44,7 +44,7 @@ type historySessionSummary struct {
// historyLastMessage 是会话摘要中最后消息预览的线上结构。
type historyLastMessage struct {
Role string `json:"role"` // "user" | "assistant"
Role string `json:"role"` // 取值:"user" | "assistant"
Content string `json:"content"`
CreatedAt int64 `json:"createdAt"`
}