import { type PendingPrompt } from "../lib/session-startup-timeline.js"; import { type ClientOverride } from "../session-context.js"; import { type UseComposerOptions } from "./use-composer.js"; export type UseSessionConversationOptions = ClientOverride & { /** Uploads remain subject to the client's capabilities. Defaults to true. */ attachments?: boolean | undefined; /** Defaults to the client's model-selection offer. */ modelPicker?: boolean | undefined; /** * Optional host context and notifications. The stock composer still owns * draft validation, annotations, retry identity, queueing and delivery. * File cleanup and upload blocking are composed with, not replaced by, these hooks. * * `busySend: "steer"` gives people one Send and nothing to learn: a message * sent while the agent works is read as soon as it can, with no Queue * choice beside Send and no Queue or Steer words (`offerQueue` brings the * Queue choice back). */ composerOptions?: Pick | undefined; /** * The first prompt, when the host sent it before this conversation could * read it back (for example while the host's server creates the session). * The conversation shows it with the startup row from the first frame, * keeps them while the session id is still `null` and history loads, and * then hands over to the live timeline without a blank frame or a second * loading style. Read once per conversation; later changes are ignored. * While the id is `null` nothing can be sent, and the stock view disables * its composer; a custom layout should disable its composer too, since a * draft written then is not carried into the created session. */ pendingPrompt?: PendingPrompt | null | undefined; }; export type { PendingPrompt }; export type SessionConversationController = ReturnType; /** * The complete conversation's state, independent of its layout. Mount once in * a stable host and pass the result to SessionConversationView, or compose the * stock timeline/chrome/composer around the same controller. Unmounting a view * does not dispose the stream, draft or uploads while this hook stays mounted. * The ordinary SessionConversation component uses this exact implementation. */ export declare function useSessionConversation( /** `null` while the host is still creating the session; pass `pendingPrompt` with it. */ sessionId: string | null, options?: UseSessionConversationOptions): { client: import("../index.js").SessionClientLike; workspaceId: string; sessionId: string | null; config: import("./use-client-config-flags.js").ClientConfigFlags; catalog: import("./use-available-models.js").UseWorkspaceModelCatalogResult; showModelPicker: boolean; feed: import("./use-session-events.js").UseSessionEventsResult; detail: import("./use-session.js").UseSessionResult; queue: import("./use-turn-queue.js").UseTurnQueueResult; human: import("./use-human-input.js").UseHumanInputRequestsResult; control: import("./use-session-control.js").UseSessionControlResult; approvals: import("../index.js").PendingApproval[]; files: import("./use-file-attachments.js").UseFileAttachmentsResult; uploadsEnabled: boolean; composer: import("./use-composer.js").ComposerControllerState; /** The same live application context for text and durable voice messages. */ getModelContext: () => string | undefined; timeline: import("../index.js").TimelineItem[]; status: import("@opengeni/sdk").SessionStatus | undefined; terminal: boolean; importedArchive: boolean; running: boolean; error: Error | null; loadFailed: boolean; retry: () => Promise; };