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
@@ -487,9 +487,9 @@ func (w *Worker) execute(ctx context.Context, name string, taskID int64, as *db.
|
||||
input = "开始执行 system 里领到的意图:只做它、只产生事实、assets、finding、做完即停。"
|
||||
}
|
||||
|
||||
// 实验功能:开启后由 noa 接管上下文压缩(归档落在本意图 runDir 下,任务级持久)。
|
||||
// 实验功能:开启后由 noa 接管上下文压缩(归档集中在 <workDir>/noa/<SessionID> 下,持久)。
|
||||
noaSession := WorkerSessionID(ts.ID(), intent.ID)
|
||||
enableNoa(&opts, w.noaEnabledFn, runDir, noaSession, noaWarn(noaSession))
|
||||
enableNoa(&opts, w.noaEnabledFn, w.workDir, noaSession, noaWarn(noaSession))
|
||||
ctx = attachSideCapture(ctx, &opts)
|
||||
s := agentcore.NewSession(opts)
|
||||
defer s.Close() // release the session's background-task manager (temp dir + processes)
|
||||
|
||||
Reference in new issue
Block a user