feat(runtime): IM 主人私聊补历史转录(与 Web 主会话同源:抽共享 transcript 包 + OwnerEnvFor 单入口)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

This commit is contained in:
AskaEth committed 2026-10-05 11:36:18 +08:00
1 parent df8fc660c0
commit 9b903a89bc
14 files changed
+676 -181

No files matched your search

+5 -2
View File
@@ -31,6 +31,7 @@ import (
apperr "git.yeij.top/AskaEth/Cyrene_v2/internal/errors"
"git.yeij.top/AskaEth/Cyrene_v2/internal/logger"
"git.yeij.top/AskaEth/Cyrene_v2/internal/runtime/documents"
"git.yeij.top/AskaEth/Cyrene_v2/internal/runtime/transcript"
)
const (
@@ -59,8 +60,10 @@ const (
documentFormField = "file"
// documentFilePrefix 是文档读取的版本化路径前缀。它位于 `/api/v1/` 之下,
// 因此归网关 mux(而非 SPA 回退),并属于版本化客户端契约。
documentFilePrefix = "/api/v1/documents/"
// 因此归网关 mux(而非 SPA 回退),并属于版本化客户端契约。字面量只有一处:
// 转录还原(internal/runtime/transcript)用的必须是同一个前缀,否则续接的
// 回合会把模型指到一个取不到的地址。
documentFilePrefix = transcript.DocumentPathPrefix
// documentSubDir 是文档落盘子目录名:`<dataDir>/uploads/documents`。
// 放在图片同根之下,便于 S4 的 `file` 工具沙箱(roots = dataDir)覆盖。