fix(platform): 内嵌 IANA tzdata,Windows 也能解析 TZ;新增本机 embedding 服务脚本
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

- cmd/cyrene/main.go: import _ "time/tzdata" —— Windows 无系统 tzdata,导致 config.TZ(默认 Asia/Shanghai) 解析失败、loop 时间注入被静默禁用;内嵌后单二进制自洽(约 +450KB)
- 实测:迁移到 Windows 后启动日志不再出现 "timezone load failed; time injection disabled"
- scripts/embed.bat(新):本机 llama.cpp embedding 服务启停(start/stop/status),OpenAI 兼容 /v1/embeddings,跑 Qwen3-Embedding-0.6B-Q8_0(dim 1024)
- 实测:start→Ready→status running→POST /v1/embeddings 200 dim=1024;配合 docker compose 的 cyrene-pg(pgvector) 后端日志变为 pgvector index ready dim=1024(不再回落内存语义)
This commit is contained in:
AskaEth committed 2026-10-03 17:58:45 +08:00
1 parent 17c9fb7545
commit 2092094d0a
2 files changed
+140

No files matched your search

+6
View File
@@ -17,6 +17,12 @@ import (
"os"
"path/filepath"
"time"
// Embed the IANA timezone database so the configured TZ (config.TZ, default
// "Asia/Shanghai") resolves everywhere: Windows ships no system tzdata and Go
// deliberately does not bundle one, so without this the loop's time injection
// silently disables itself there (internal/runtime/loop/time.go logs
// "timezone load failed"). Costs ~450 KB and keeps the binary self-contained.
_ "time/tzdata"
capreg "git.yeij.top/AskaEth/Cyrene_v2/internal/capability/registry"
"git.yeij.top/AskaEth/Cyrene_v2/internal/config"