Skip to content

Conversation pane ​

ConversationPane combines history, requests, messages, queues and the composer. It is headerless: your application owns conversation navigation and the panels around it.

vue
<script setup lang="ts">
import { ConversationPane } from '@korus-dev/agent-ui-sdk';
import '@korus-dev/agent-ui-sdk/styles.css';
</script>

<template>
  <ConversationPane :controller="binding.controller" autofocus />
</template>

The pane resolves everything it needs from one controller: a state source and an actions source. There are two ways to create one.

ApproachUse it when
createSessionConversationControllerYou have a Multi Agent SDK session and want queueing, steering, permissions, goals and request handling wired for you. Recommended.
createConversationPaneControllerYour host owns conversation state, queueing or custom actions and wants grouped, reactive control.

The pane also accepts the same data as individual props and @event listeners. When a controller is supplied it takes precedence over controlled props.

Controlled pane ​

createConversationPaneController adapts grouped state and actions without creating a session, fetching history or cloning messages. It keeps the reactive sources you give it, so a ref, computed or getter preserves streaming updates; avoid freezing a one-time snapshot.

ts
import {
  createConversationPaneController,
  sessionStateToConversationPaneState,
} from '@korus-dev/agent-ui-sdk';

const controller = createConversationPaneController({
  state: () => sessionStateToConversationPaneState(state.value, capabilities, 'conversation-1'),
  actions: {
    submit: (prompt, options) => backend.send(prompt, options),
    interrupt: () => backend.interrupt(),
    respond: response => backend.respond(response),
  },
});

examples/session-pane.ts in the repository shows a typed version that subscribes to a harness session.

State groups ​

State separates concerns instead of exposing a long list of paired props:

GroupHolds
identityconversationKey, activeTurnId, turns, messages, busy, disabled, error
historyhasOlder, loading, loadingOlder
threadrequests, answeredClientRequestIds, goal, queuedPrompts, turnGitDiff, contextUsage
composerdraft state, attachments, promptHistory, placeholder, suggestedPrompt, followUpBehavior, menu items, permission, planMode, selected model, reasoning effort and service tier
catalogsmodels, commands, skills, plugins, files, mentionGroups and their load status
capabilitiesThe Capabilities the pane honors
policyattachEnabled, canDeleteTurn, canEditTurn, canRetryTurn, canForkTurn, actionsDisabled, followUpsDisabled

Actions ​

All actions are optional. Omit those your host does not support and leave the matching capability off.

ActionPurpose
submit(prompt, options?)Send a prompt. May return { renderOptimisticMessage?, sentPrompt? }
steer(prompt, options?)Redirect the active turn
interrupt() / cancel()Stop the active turn
respond(response)Answer a pending request, in the shape Harness.respondToRequest takes
updateSettings(defaults)Change model, reasoning effort, service tier or permission
setPlanMode(enabled)Toggle plan mode
updateComposerState(state)Persist the draft
updateAttachments(attachments)Persist composer attachments
updateQueuedPrompt, deleteQueuedPrompt, steerQueuedPromptEdit the queue
deleteTurn, editTurn, retryTurn, forkTurnMutate a turn
loadOlderHistory, loadTurnHistory(turnId)Fetch more history
clearGoal, editGoalGoal actions
readImagePreview(reference)Resolve a local image reference
readPromptHistory()Load user prompts for Up/Down recall
requestSkills()Discover the skill catalog when its menu opens
menuSelect, mentionSelectHost menu items and mention groups
openImage, openLink, openVisualizationHost-owned navigation
quoteMessage, onMessageCopied, sendFollowUp, continueInterruptedTurn, attachMessage and composer extras

Props and events ​

The prop surface mirrors the controller groups: messages, turns, busy, capabilities, models, commands, skills, plugins, files, mentionGroups, composerState, attachments, permissions and so on. Behavior props worth knowing:

PropDefaultPurpose
autofocusfalseFocus the composer on mount
ariaLabel'Conversation'Accessible label for the pane
escapeInterrupttrueDouble-Escape interrupts the active turn
renderStrategy'lazy''eager' mounts the whole transcript; see history
initialMessageBatchSize, messageBatchSize50, 25Lazy mounting batch sizes
presentationall onPresentation flags
toolVisibilityall visiblePredicate hiding tool calls from the transcript only
showToolDetailsoffReveal raw tool input and output, for trusted views
transformMessagenoneAdjust each message before rendering
followUpBehavior'queue'Primary follow-up action while busy; Cmd/Ctrl+Enter uses the other
emptyTitle, emptyDescription"Start a conversation"Empty state copy
transcribeAudio, pickAttachments, ingestAttachmentshost capabilitiesPer-pane overrides for host ports

Without a controller the pane emits typed events: submit, steer, interrupt, respond, deleteTurn, editTurn, retryTurn, forkTurn, loadOlderHistory, loadTurnHistory, openLink, openVisualization, menuSelect, mentionSelect, update:composerState, update:modelId, update:reasoningEffort, update:serviceTier, update:permission, update:planMode and more. See the component reference.

Slots ​

Prefer additive slots to replacing SDK-owned message rendering.

SlotReplaces or adds
emptyThe empty state
message-headerContent above each message
message-block, message-text, message-attachment, message-toolOne rendered block
message-actionsMessage action buttons
message-status, message-thinkingStreaming indicators
messageA whole message
approvalThe approval prompt
before-composer, after-composerContent around the composer
composer-context, composer-drawers, composer-shelf-actionsComposer chrome
composer-after-input, composer-after, composer-attachment-actionsComposer extras
composer-replacementThe entire composer
menu-icon, menu-item, suggestion-item, mentionMenu and mention rendering
vue
<ConversationPane :controller="binding.controller">
  <template #message-header="{ message }">
    <AppMessageHeader :message="message" />
  </template>
  <template #empty="{ title }">
    <AppWelcome :title="title" />
  </template>
</ConversationPane>

What stays in the host ​

Keep navigation, durable storage, conversation titles, routing and authorization in your application. Closing a view disposes its UI binding; releasing or deleting a native conversation is a separate host operation.

For fixed layouts, WorkbenchLayout provides a body with optional header and footer slots and a scrollMode of 'body' or 'child'.

Released under the Apache License 2.0.