import { activePermissionRequest, activeQuestionRequest, attachmentsAndCommentsDocument, compactionDocument, editThenTestDocument, emptySessionDocument, largeCompletedDocument, permissionPendingDocument, questionPendingDocument, retryDocument, streamingDocument, STORY_TIME, subagentDocument, terminalPassedDocument, } from "@opencode/session-ui/storybook" import { SessionPreview } from "./story-model" import type { SubagentStatus } from "./composer/subagent-bar" const description = "opencode · modular-session-ui" const retryAfterInterruption = { ...retryDocument, messages: [ ...compactionDocument.messages, ...retryDocument.messages.map((message, index) => { const created = STORY_TIME + 70_000 + index * 1_000 if (message.type !== "assistant" || !message.retry) { return { ...message, time: { ...message.time, created } } } return { ...message, time: { ...message.time, created }, retry: { ...message.retry, at: created }, } }), ], } const implementAndVerify = () => ( ) export default { title: "OpenCode/Session/Complete workspace", id: "app-current-session-surface", component: SessionPreview, parameters: { layout: "fullscreen", docs: { description: { component: "A server-free Session workbench for product and design review. It composes the production current timeline, titlebar actions, Composer, request docks, and review components.", }, }, }, } export const ImplementAndVerifyLight = { globals: { theme: "light" }, render: implementAndVerify, } export const ImplementAndVerifyDark = { globals: { theme: "dark" }, render: implementAndVerify, } export const WorkFromAttachments = { render: () => ( ), } export const LongRunningSession = { render: () => ( ), } export const MixedDirectionRtl = { globals: { theme: "dark", direction: "rtl" }, render: () => ( ), } export const EmptySession = { render: () => , } export const StreamingSession = { render: () => ( ), } export const EditThenShellTest = { render: implementAndVerify, } export const PermissionRequest = { render: () => ( ), } export const QuestionRequest = { render: () => ( ), } export const QuestionAnswerCounts = { render: () => ( ), } export const QuestionMultiSelect = { render: () => ( ), } export const McpElicitationRequest = { render: () => ( ), } export const McpUrlElicitationRequest = { render: () => ( ), } export const WebSearchRequest = { render: () => ( ), } export const RetryAndInterruption = { render: () => ( ), } export const ReviewPlusTerminal = { render: () => ( ), } export const ChildSession = { render: () => ( ), } export const ChildSessionNoOutcome = { render: () => ( ), } function finishedChild(title: string, status: Exclude) { return ( ) } export const ChildSessionDone = { render: () => finishedChild("Inspect a finished child Session", "succeeded"), } export const ChildSessionFailed = { render: () => finishedChild("Inspect a failed child Session", "failed"), } export const ChildSessionInterrupted = { render: () => finishedChild("Inspect an interrupted child Session", "interrupted"), } export const MobileLayout = { globals: { viewport: { value: "mobile1", isRotated: false } }, parameters: { viewport: { defaultViewport: "mobile1" } }, render: () => ( ), } export const NarrowLayout = { globals: { viewport: { value: "tablet", isRotated: false } }, parameters: { viewport: { defaultViewport: "tablet" } }, render: () => ( ), }