Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/opencode/src/session/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,9 @@ NOTE: At any point in time through this workflow you should feel free to ask the
continue
}

// Notify plugins that the turn is complete
yield* bus.publish(Session.Event.TurnCompleted, { sessionID })

yield* compaction.prune({ sessionID }).pipe(Effect.ignore, Effect.forkIn(scope))
return yield* lastAssistant(sessionID)
},
Expand Down
6 changes: 6 additions & 0 deletions packages/opencode/src/session/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ export const Event = {
error: z.lazy(() => MessageV2.Assistant.shape.error),
}),
),
TurnCompleted: BusEvent.define(
"session.turn.completed",
z.object({
sessionID: SessionID.zod,
}),
),
}

export function plan(input: { slug: string; time: { created: number } }) {
Expand Down
Loading