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

- 只翻注释/文档字符串:820 增 / 820 删 严格 1:1;剥掉整行注释与行尾注释尾巴后,
  逐文件与 HEAD 比对「代码部分差异 = 0」;裁决/design 编号计数逐项与 HEAD 一致
- 保留可执行 SQL 样例、SQLite 报错原文、pgvector/HNSW/ANN/BLOB 等技术词原文
- 复核:go build 绿 + memory/projectindex/vector 三包测试绿;gofmt 仅剩 2 个既有未格式化文件(改动前即如此,未顺手修)
This commit is contained in:
AskaEth committed 2026-10-04 13:32:54 +08:00
1 parent eb1828ee7a
commit 61cf80d5ee
31 files changed
+820 -820

No files matched your search

+4 -4
View File
@@ -9,13 +9,13 @@ import (
"git.yeij.top/AskaEth/Cyrene_v2/internal/db"
)
// testLogger returns a logger that writes nowhere, keeping test output clean.
// testLogger 返回一个不写任何地方的 logger,保持测试输出干净。
func testLogger() *slog.Logger {
return slog.New(slog.NewTextHandler(io.Discard, nil))
}
// newTestStore opens an isolated in-memory SQLite DB and builds a Store over it.
// Each call owns a private DB, so parallel tests are isolated by construction.
// newTestStore 打开一个隔离的内存 SQLite 库并在其上构建 Store。
// 每次调用都拥有私有 DB,因此并行测试天生相互隔离。
func newTestStore(t *testing.T) *Store {
t.Helper()
ctx := context.Background()
@@ -32,7 +32,7 @@ func newTestStore(t *testing.T) *Store {
return s
}
// baseItem is a minimal valid memory item for tests.
// baseItem 是测试用的最小合法记忆条目。
func baseItem() MemoryItem {
return MemoryItem{
PersonaID: "persona.a",