{"version":3,"file":"session.fixture.mjs","names":[],"sources":["../../../../src/web/features/session/session.fixture.ts"],"sourcesContent":["import { seedStorySession, STORY_SESSION_ID } from '../../components/Story.fixture.tsx';\nimport { resetWebPlugins } from '../../lib/pluginRegistry.ts';\nimport type { QueuedEntry, SessionState, TimelineEntry, ToolEntry } from '../../lib/sessionModel.ts';\nimport { composerStore, type ComposerSessionState } from '../../stores/composerStore.ts';\n\nexport const storyTool: ToolEntry = {\n  kind: 'tool',\n  id: 'tool-review',\n  toolCallId: 'call-review',\n  name: 'review_components',\n  args: { path: 'src/components' },\n  argSummary: 'src/components',\n  result: { content: [{ type: 'text', text: 'Checked 12 component stories. No build errors.' }], details: undefined },\n  output: 'Checked 12 component stories.\\nNo build errors.',\n  isError: false,\n  running: false,\n};\n\nexport const storyEntries: TimelineEntry[] = [\n  { kind: 'user', id: 'user-review', text: 'Review the component stories and check responsive spacing.' },\n  {\n    kind: 'assistant',\n    id: 'assistant-review',\n    text: 'I will check the **shared controls** first, then review each feature panel.',\n    thinking: 'The review starts with the shared tokens and interactive sizes.',\n    streaming: false,\n  },\n  storyTool,\n  {\n    kind: 'assistant',\n    id: 'assistant-result',\n    text: '### Review results\\n\\nThe stories cover normal, empty, and error states.\\n\\n| Area | Result |\\n| --- | --- |\\n| Layout | Reviewed |\\n| Keyboard | Reviewed |\\n\\n```tsx\\n<Button variant=\"primary\">Continue</Button>\\n```',\n    thinking: '',\n    streaming: false,\n  },\n  { kind: 'settled', id: 'settled-review', tools: 1 },\n];\n\nexport const queuedEntries: QueuedEntry[] = [\n  {\n    kind: 'queued',\n    id: 'queued-spacing',\n    text: 'Check the narrow-screen layout and the longer labels.',\n    delivery: 'followUp',\n  },\n  {\n    kind: 'queued',\n    id: 'queued-tests',\n    text: 'Run the affected tests.\\nReport any remaining failures.',\n    delivery: 'followUp',\n  },\n];\n\nexport function seedConversationStory(\n  state: Partial<SessionState> = {},\n  composer: Partial<ComposerSessionState> = {},\n): void {\n  resetWebPlugins();\n  seedStorySession({\n    entries: storyEntries,\n    profileIdentity: { profile: 'reviewer', name: 'Component reviewer' },\n    ...state,\n  });\n  composerStore.setState(() => ({\n    [STORY_SESSION_ID]: {\n      draft: '',\n      caret: 0,\n      dismissedToken: null,\n      attachments: [],\n      attachmentError: '',\n      nextAttachmentId: 0,\n      pendingAttachments: 0,\n      ...composer,\n    },\n  }));\n}\n"],"mappings":";;;;AAKA,MAAa,YAAuB;CAClC,MAAM;CACN,IAAI;CACJ,YAAY;CACZ,MAAM;CACN,MAAM,EAAE,MAAM,iBAAiB;CAC/B,YAAY;CACZ,QAAQ;EAAE,SAAS,CAAC;GAAE,MAAM;GAAQ,MAAM;EAAiD,CAAC;EAAG,SAAS,KAAA;CAAU;CAClH,QAAQ;CACR,SAAS;CACT,SAAS;AACX;AAEA,MAAa,eAAgC;CAC3C;EAAE,MAAM;EAAQ,IAAI;EAAe,MAAM;CAA6D;CACtG;EACE,MAAM;EACN,IAAI;EACJ,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA;CACA;EACE,MAAM;EACN,IAAI;EACJ,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA;EAAE,MAAM;EAAW,IAAI;EAAkB,OAAO;CAAE;AACpD;AAiBA,SAAgB,sBACd,QAA+B,CAAC,GAChC,WAA0C,CAAC,GACrC;CACN,gBAAgB;CAChB,iBAAiB;EACf,SAAS;EACT,iBAAiB;GAAE,SAAS;GAAY,MAAM;EAAqB;EACnE,GAAG;CACL,CAAC;CACD,cAAc,gBAAgB,GAC3B,mBAAmB;EAClB,OAAO;EACP,OAAO;EACP,gBAAgB;EAChB,aAAa,CAAC;EACd,iBAAiB;EACjB,kBAAkB;EAClB,oBAAoB;EACpB,GAAG;CACL,EACF,EAAE;AACJ"}