* 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
96 lines
2.2 KiB
TypeScript
96 lines
2.2 KiB
TypeScript
import tailwindcss from '@tailwindcss/vite';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { dirname, resolve } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
import { defineConfig, searchForWorkspaceRoot } from 'vite';
|
|
import devtoolsJson from 'vite-plugin-devtools-json';
|
|
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
import { llamaCppBuildPlugin } from './scripts/vite-plugin-llama-cpp-build';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
|
const SERVER_ORIGIN = import.meta.env?.VITE_PUBLIC_SERVER_ORIGIN || 'http://localhost:8080';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'katex-fonts': resolve('node_modules/katex/dist/fonts')
|
|
}
|
|
},
|
|
|
|
build: {
|
|
assetsInlineLimit: 32000,
|
|
chunkSizeWarningLimit: 3072,
|
|
minify: true
|
|
},
|
|
|
|
plugins: [tailwindcss(), sveltekit(), devtoolsJson(), llamaCppBuildPlugin()],
|
|
|
|
test: {
|
|
projects: [
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'client',
|
|
environment: 'browser',
|
|
browser: {
|
|
enabled: true,
|
|
provider: 'playwright',
|
|
instances: [{ browser: 'chromium' }]
|
|
},
|
|
include: ['tests/client/**/*.svelte.{test,spec}.{js,ts}'],
|
|
setupFiles: ['./vitest-setup-client.ts']
|
|
}
|
|
},
|
|
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'unit',
|
|
environment: 'node',
|
|
include: ['tests/unit/**/*.{test,spec}.{js,ts}']
|
|
}
|
|
},
|
|
|
|
{
|
|
extends: './vite.config.ts',
|
|
test: {
|
|
name: 'ui',
|
|
environment: 'browser',
|
|
browser: {
|
|
enabled: true,
|
|
provider: 'playwright',
|
|
instances: [{ browser: 'chromium', headless: true }]
|
|
},
|
|
include: ['tests/stories/**/*.stories.{js,ts,svelte}'],
|
|
setupFiles: ['./.storybook/vitest.setup.ts']
|
|
},
|
|
plugins: [
|
|
storybookTest({
|
|
storybookScript: 'pnpm run storybook --no-open'
|
|
})
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
server: {
|
|
proxy: {
|
|
'/v1': SERVER_ORIGIN,
|
|
'/props': SERVER_ORIGIN,
|
|
'/models': SERVER_ORIGIN,
|
|
'/tools': SERVER_ORIGIN,
|
|
'/slots': SERVER_ORIGIN,
|
|
'/cors-proxy': SERVER_ORIGIN
|
|
},
|
|
headers: {
|
|
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
'Cross-Origin-Opener-Policy': 'same-origin'
|
|
},
|
|
fs: {
|
|
allow: [searchForWorkspaceRoot(process.cwd()), resolve(__dirname, 'tests')]
|
|
}
|
|
}
|
|
});
|