refactor(noa): 归档集中到 <workDir>/noa 下,不再分散在任务目录
各 agent 的 noa 归档基目录由本 run 的工作目录改为全局 workDir, 统一落在 <workDir>/noa/<SessionID>/。SessionID 全局唯一,同一基目录 内互不冲突。
This commit is contained in:
1 parent
865d52267d
commit
c4579637dc
5 files changed
+10
-9
No files matched your search
+2
-2
@@ -172,13 +172,13 @@ func (m *MainAgent) Chat(ctx context.Context, taskID int64, mainSeg int, as *db.
|
||||
opts.SessionID = fmt.Sprintf("exp%d-main-s%d", ts.ID(), mainSeg)
|
||||
}
|
||||
}
|
||||
// 实验功能:开启后由 noa 接管上下文压缩(归档落在本任务 mainDir 下,任务级持久)。
|
||||
// 实验功能:开启后由 noa 接管上下文压缩(归档集中在 <workDir>/noa/<SessionID> 下,持久)。
|
||||
// session id 与 transcript 同规则(分段感知),使归档与恢复对齐。
|
||||
noaSession := fmt.Sprintf("exp%d-main", ts.ID())
|
||||
if mainSeg > 0 {
|
||||
noaSession = fmt.Sprintf("exp%d-main-s%d", ts.ID(), mainSeg)
|
||||
}
|
||||
enableNoa(&opts, m.noaEnabledFn, mainDir, noaSession, noaWarn(noaSession))
|
||||
enableNoa(&opts, m.noaEnabledFn, m.workDir, noaSession, noaWarn(noaSession))
|
||||
ctx = attachSideCapture(ctx, &opts)
|
||||
s := agentcore.NewSession(opts)
|
||||
defer s.Close()
|
||||
|
||||
Reference in new issue
Block a user