feat: replace edgePrompt null check with isFirstVisit (Phase 2)
- Add isFirstVisit: boolean to AgentContext - Compute from steps history: !steps.some(s => s.role === role) - hermes.ts: use isFirstVisit for first-entry vs re-entry logic - buildInitialPrompt: always append edgePrompt as Moderator Instruction - edgePrompt is never blanked — always the real moderator instruction - New tests for first-visit, re-entry, and fallback scenarios Refs #405, #407, #404
This commit is contained in:
@@ -7,6 +7,7 @@ function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext {
|
||||
return {
|
||||
threadId: "01JTEST0000000000000000000" as ThreadId,
|
||||
edgePrompt: "Proceed with the assigned role.",
|
||||
isFirstVisit: true,
|
||||
workflow: {
|
||||
roles: {
|
||||
developer: {
|
||||
|
||||
Reference in New Issue
Block a user