refactor: identify and freeze messages at creation

This commit is contained in:
_Kerman
2026-07-28 13:55:59 +08:00
parent c49c0ba497
commit fbf87e660c
345 changed files with 5220 additions and 2901 deletions

View File

@@ -70,8 +70,8 @@ export function goalToolExecution(ctx: Context, exec: ToolRunContext): GoalToolE
function hasDirectHumanInput(ctx: Context, execution: GoalToolExecution): boolean {
if (!ctx.agents.roots().includes(execution.agent)) return false
return execution.events.some(event =>
(event.type === 'user/message' || event.type === 'steering/message')
&& event.data.source.kind === 'user')
(event.type === 'user/message' && event.data.source.kind === 'user')
|| (event.type === 'steering/message' && event.data.message.source.kind === 'user'))
}
/** Whether this turn is the current goal's exact admitted round. */