import type { Meta, StoryObj } from "@storybook/angular"; import { moduleMetadata } from "@storybook/angular"; import { CommonModule } from "@angular/common"; import { Component, Input } from "@angular/core"; import { CopilotChatView, CopilotChatMessageView, CopilotChatInput, provideCopilotChatLabels, provideCopilotKit, } from "@copilotkit/angular"; import type { Message } from "@ag-ui/client"; const meta: Meta = { title: "UI/CopilotChatView/Customized with CSS", component: CopilotChatView, decorators: [ moduleMetadata({ imports: [ CommonModule, CopilotChatView, CopilotChatMessageView, CopilotChatInput, ], providers: [ provideCopilotKit({}), provideCopilotChatLabels({ chatInputPlaceholder: "Type a message...", chatDisclaimerText: "AI can make mistakes. Please verify important information.", }), ], }), ], parameters: { layout: "fullscreen", }, }; export default meta; type Story = StoryObj; // Story with custom disclaimer text export const CustomDisclaimerText: Story = { render: () => { const messages: Message[] = [ { id: "user-1", content: "Hello!", role: "user" as const, }, { id: "assistant-1", content: "Hi there! How can I help you today?", role: "assistant" as const, }, ]; return { template: `
`, props: { messages, }, }; }, }; export const AnimatedDisclaimer: Story = { render: () => { const messages: Message[] = [ { id: "user-1", content: "Hello! Can you help me with styling?", role: "user" as const, }, { id: "assistant-1", content: `Absolutely! I can help you with CSS styling, design patterns, and UI/UX best practices. What specific styling challenge are you working on?`, role: "assistant" as const, }, ]; return { template: `
`, props: { messages, }, }; }, };