import { RequestContext } from "@pages/request-details/Request.context"; import type { Meta, StoryObj } from "@storybook/react"; import AnnotationWorkbench from "../modules/request-details/components/annotation-workbench/annotation-workbench/AnnotationWorkbench"; const meta = { title: "Aisera/AnnotationWorkbench", component: AnnotationWorkbench, parameters: { layout: "centered", }, tags: ["autodocs"], argTypes: { }, } satisfies Meta; export default meta; type Story = StoryObj; const withRequestContext = (Story: React.ComponentType) => { const mockValue = { actions: { handler: () => { } }, requestId: 0, botId: 0, botDomain: '', userId: '' }; return (
); }; export const Default: Story = { decorators: [withRequestContext], args: { flows: [], serviceCatalogs: [], kbArticles: [], domains: [], annotationWorkbenchItems: [{ label: 'I want exercise options', languageDetection: 'english', domainUnderstanding: 'finance', spellCheck: { source: 'source', sink: 'sink' }, entities: [{ id: 1234, entityName: 'options', score: 0.3 }], intents: [{ id: 1235, name: 'Exercising Options', score: 0.78, utterance: 'test', matchedPhrase: 'exercise $shares' }], fulfillments: [{ id: 1236, name: 'intent', score: 0.35, type: 'test', source: 'source', }], fufillmentSource: 'Intent fullfillment source' }], currentClickedPhrase: 'exercise options', requestId: 123, isWorkbenchLoading: false, } };