* feat: Add "Thinking" toggle and status icon + redesign Chat Form Actions Add panel * test: Update test reference * fix: Icon * fix: E2E test command * fix: wait for greeting h1 to be visible in e2e test * fix: remove duplicate PDF option in attachment dropdown * fix: use label-based group toggle to avoid stale references * refactor: inline MCP server and tool toggles in mobile sheet * fix: serve correct build directory in e2e playwright config * feat: add reasoning effort levels selector in model dropdown * feat: Reasoning effort * refactor: Make server origin configurable via environment variable * feat: Add chat template thinking detector utility * feat: Add thinking support detection to models store * refactor: Update model selector components with thinking detection and message-specific indicators * feat: Update chat form components for model selection and thinking support * feat: Improve Reasoning controls UI * refactor: Apply suggestions from code review Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * fix: Model tags * refactor: Cleanup * refactor: Remove unneeded components * refactor: Cleanup
51 lines
1.4 KiB
Svelte
51 lines
1.4 KiB
Svelte
<script module lang="ts">
|
|
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
import ChatScreenForm from '$lib/components/app/chat/ChatScreen/ChatScreenForm.svelte';
|
|
import { expect, screen, waitFor } from 'storybook/test';
|
|
import { ATTACHMENT_TOOLTIP_TEXT } from '$lib/constants';
|
|
|
|
const { Story } = defineMeta({
|
|
title: 'Components/ChatScreen/ChatScreenForm/Accessibility',
|
|
component: ChatScreenForm,
|
|
parameters: {
|
|
layout: 'centered'
|
|
},
|
|
tags: ['!dev']
|
|
});
|
|
</script>
|
|
|
|
<Story
|
|
name="AddButtonSingleTabStop"
|
|
args={{ class: 'max-w-[56rem] w-[calc(100vw-2rem)]' }}
|
|
play={async ({ canvas, userEvent }) => {
|
|
const textarea = await canvas.findByRole('textbox');
|
|
await userEvent.clear(textarea);
|
|
await userEvent.type(textarea, 'What is the meaning of life?');
|
|
|
|
const trigger = await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT });
|
|
|
|
trigger.focus();
|
|
await expect(trigger).toHaveFocus();
|
|
|
|
await userEvent.tab();
|
|
|
|
await expect(trigger).not.toHaveFocus();
|
|
}}
|
|
/>
|
|
|
|
<Story
|
|
name="AddDropdownFocusesFirstEnabled"
|
|
args={{ class: 'max-w-[56rem] w-[calc(100vw-2rem)]' }}
|
|
play={async ({ canvas, userEvent }) => {
|
|
const trigger = await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT });
|
|
|
|
trigger.focus();
|
|
await userEvent.keyboard('{Enter}');
|
|
await screen.findByRole('menu');
|
|
|
|
await waitFor(() => {
|
|
expect(document.activeElement).toHaveTextContent('Add files');
|
|
});
|
|
}}
|
|
/>
|