fix(core): derive previous agent in projection (#41685)

This commit is contained in:
Aiden Cline
2026-08-11 01:24:30 -05:00
committed by GitHub
parent cc792f79b7
commit b295fb2f5f
14 changed files with 26 additions and 31 deletions
+6 -1
View File
@@ -3,7 +3,8 @@ import type { Message, SystemPart } from "@opencode-ai/ai"
import type { Agent } from "@opencode-ai/schema/agent"
import type { Model } from "@opencode-ai/schema/model"
import type { Session } from "@opencode-ai/schema/session"
import type { JsonSchema } from "effect"
import type { SessionMessage } from "@opencode-ai/schema/session-message"
import type { Effect, JsonSchema } from "effect"
import type { Hooks } from "./registration.js"
export interface SessionContext {
@@ -40,5 +41,9 @@ export type SessionDomain = Pick<
SessionApi<unknown>,
"create" | "get" | "prompt" | "generate" | "command" | "synthetic" | "interrupt" | "rename" | "wait"
> & {
readonly message: (input: {
readonly sessionID: Session.ID
readonly messageID: SessionMessage.ID
}) => Effect.Effect<SessionMessage.Info | undefined, unknown>
readonly hook: Hooks<SessionHooks>
}