The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
feat(assistant): one AI tile for assistant, parsing and MCP, a planner-aware chat
Maurice123e27643d1f
diff --git a/client/scripts/feature-pairs.json b/client/scripts/feature-pairs.jsonindex aecf76ab2..2cfb8ecee 100644--- a/client/scripts/feature-pairs.json+++ b/client/scripts/feature-pairs.json@@ -16,17 +16,16 @@"feature": "Addon manager","hooks": ["src/components/Admin/addons/addonModel.ts",- "src/components/Admin/addons/useAddonManager.ts",- "src/components/Admin/addons/useLlmParsingConfig.ts"+ "src/components/Admin/addons/useAddonManager.ts"],"desktop": ["src/components/Admin/AddonManager.tsx"],"mobile": ["src/mobile/screens/admin/MAdminAddonManager.tsx"]},{- "feature": "Addon manager: AI assistant",- "hooks": ["src/components/Admin/addons/useAiAdminConfig.ts"],- "desktop": ["src/components/Admin/addons/AiAdminConfig.tsx"],- "mobile": ["src/mobile/screens/admin/MAdminAiConfig.tsx"]+ "feature": "Addon manager: AI tile",+ "hooks": ["src/components/Admin/addons/useAiAddonTile.ts"],+ "desktop": ["src/components/Admin/addons/AiAddonTile.tsx"],+ "mobile": ["src/mobile/screens/admin/MAdminAddonManager.tsx"]},{"feature": "Admin notification preference matrix",diff --git a/client/src/components/Admin/AddonManager.test.tsx b/client/src/components/Admin/AddonManager.test.tsxindex c5fc07f8c..1c9a1e571 100644--- a/client/src/components/Admin/AddonManager.test.tsx+++ b/client/src/components/Admin/AddonManager.test.tsx@@ -1,6 +1,6 @@-import { render, screen, waitFor } from '../../../tests/helpers/render';+import { render, screen, waitFor, within } from '../../../tests/helpers/render';import userEvent from '@testing-library/user-event';-import { delay, http, HttpResponse } from 'msw';+import { http, HttpResponse } from 'msw';import { server } from '../../../tests/helpers/msw/server';import { resetAllStores, seedStore } from '../../../tests/helpers/store';import { useSettingsStore } from '../../store/settingsStore';@@ -24,23 +24,20 @@ function addonsRoute(addons: ReturnType<typeof buildAddon>[]) {return http.get('/api/admin/addons', () => HttpResponse.json({ addons }));}-function llmAddon(config: Record<string, unknown> = {}) {+function llmAddon(config: Record<string, unknown> = {}, enabled = true) {return buildAddon({id: 'llm_parsing',name: 'AI Parsing',description: 'Extract bookings from files',icon: 'Sparkles',type: 'integration',- enabled: true,+ enabled,config,});}-function modelsRoute(names: string[], seen?: (string | null)[]) {- return http.get('/api/admin/llm/local/models', ({ request }) => {- seen?.push(new URL(request.url).searchParams.get('baseUrl'));- return HttpResponse.json({ models: names.map(name => ({ name, size: 1 })) });- });+function aiAddon(id: string, name: string, enabled: boolean) {+ return buildAddon({ id, name, icon: id === 'mcp' ? 'Terminal' : 'Sparkles', type: 'integration', enabled });}/** Every switch is labelled with the thing it controls, top-level tile or shelf@@ -576,286 +573,55 @@ describe('AddonManager', () => {expect(links.getAttribute('title')).not.toBe('No shared links yet');});- it('FE-ADMIN-ADDON-020: a disabled AI-parsing addon renders the row without its config block', async () => {- server.use(addonsRoute([{ ...llmAddon({ provider: 'local' }), enabled: false }]));- render(<AddonManager />);-- await screen.findByText('AI Parsing');- // The catalog key now exists, so the tile shows the translation rather than falling- // back to the English description the server sent.- expect(screen.getByText('Reads bookings the built-in parser cannot, using an AI model you choose')).toBeInTheDocument();- expect(screen.queryByText('Provider')).not.toBeInTheDocument();- });-- it('FE-ADMIN-ADDON-020b: the config lives in the tile shelf, not as a band below the grid', async () => {- server.use(addonsRoute([llmAddon({ provider: 'openai' })]));- render(<AddonManager />);-- const label = await screen.findByText('Provider');- // Inside the AI Parsing tile's <article>, like the collab toggles sit in theirs.- const tile = label.closest('article');- expect(tile).not.toBeNull();- expect(tile!.textContent).toContain('AI Parsing');- });-- it('FE-ADMIN-ADDON-021: the local provider lists installed models and a chip fills the model field', async () => {- const user = userEvent.setup();- const urls: (string | null)[] = [];- server.use(addonsRoute([llmAddon({ provider: 'local' })]), modelsRoute(['qwen3.5:4b', 'llama3:8b'], urls));- render(<AddonManager />);-- await screen.findByText('Installed on the server');- await screen.findByRole('button', { name: 'llama3:8b' });- expect(urls[0]).toBe('http://localhost:11434/v1');-- await user.click(screen.getByRole('button', { name: 'llama3:8b' }));- expect(screen.getByPlaceholderText('select or pull below')).toHaveValue('llama3:8b');-- // qwen3.5:4b is already installed, so the recommended row offers "Use" instead of "Pull"- await user.click(screen.getByRole('button', { name: 'Use' }));- expect(screen.getByPlaceholderText('select or pull below')).toHaveValue('qwen3.5:4b');- expect(screen.getByRole('button', { name: 'Selected' })).toBeDisabled();- });-- it('FE-ADMIN-ADDON-022: an unreachable Ollama shows the error and Refresh retries', async () => {- const user = userEvent.setup();- let calls = 0;+ it('FE-ADMIN-ADDON-020: the AI addons head the integration column as one tile with a switch each', async () => {server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- http.get('/api/admin/llm/local/models', () => {- calls += 1;- return calls === 1- ? HttpResponse.json({ error: 'down' }, { status: 500 })- : HttpResponse.json({ models: [] });- }),+ addonsRoute([+ aiAddon('mcp', 'MCP', false),+ llmAddon({}, false),+ aiAddon('ai_assistant', 'AI Assistant', false),+ buildAddon({ id: 'airtrail', name: 'AirTrail', type: 'integration', icon: 'Plane' }),+ ]),);render(<AddonManager />);- // The server's reason is shown, not axios' status line (#2649)- await screen.findByText('down');- expect(screen.queryByText(/Request failed with status code/)).not.toBeInTheDocument();-- await user.click(screen.getByRole('button', { name: 'Refresh' }));- await screen.findByText('No models installed yet — pull one below.');- expect(calls).toBe(2);- });-- it('FE-ADMIN-ADDON-023: switching providers swaps the base URL field, the model hint and the Ollama block', async () => {+ const tile = (await screen.findByText('AI')).closest('article') as HTMLElement;+ const switches = within(tile).getAllByRole('button').map((b) => b.getAttribute('aria-label'));+ // In the tile's order, whatever order the server sent them in.+ expect(switches).toEqual(['AI Assistant', 'AI Parsing', 'MCP']);+ expect(within(tile).getByText('0/3')).toBeInTheDocument();+ // Their own icons, keyed by id: the icon column of an install still says Sparkles or Terminal.+ expect(tile.querySelector('svg.lucide-messages-square')).toBeInTheDocument();+ expect(tile.querySelector('svg.lucide-scan-text')).toBeInTheDocument();+ expect(tile.querySelector('svg.lucide-cable')).toBeInTheDocument();+ // Nothing to set up while neither the assistant nor parsing is on.+ expect(within(tile).queryByRole('button', { name: 'Set up AI' })).toBeNull();+ // AirTrail is still its own tile in the same column.+ expect(screen.getByText('AirTrail').closest('article')).not.toBe(tile);+ });++ it('FE-ADMIN-ADDON-021: with parsing on, the tile offers the settings dialog, which closes again', async () => {const user = userEvent.setup();- const urls: (string | null)[] = [];- server.use(addonsRoute([llmAddon({ provider: 'local', apiKey: '••••••••' })]), modelsRoute([], urls));- render(<AddonManager />);-- await screen.findByText('Installed on the server');- expect(screen.getByPlaceholderText('••••••••')).toBeInTheDocument();-- // A hand-typed base URL is used for the next lookup on blur- await user.type(screen.getByPlaceholderText('http://localhost:11434/v1'), 'http://ollama.lan:11434/v1');- await user.tab();- await waitFor(() => expect(urls).toContain('http://ollama.lan:11434/v1'));-- await user.click(screen.getByRole('button', { name: /Local · OpenAI-compatible/ }));- await user.click(screen.getByRole('button', { name: 'OpenAI' }));- expect(screen.getByPlaceholderText('https://api.openai.com/v1')).toBeInTheDocument();- expect(screen.getByPlaceholderText('gpt-4o')).toBeInTheDocument();- expect(screen.queryByText('Installed on the server')).not.toBeInTheDocument();-- await user.click(screen.getByRole('button', { name: 'OpenAI' }));- await user.click(screen.getByRole('button', { name: 'Anthropic' }));- expect(screen.queryByPlaceholderText('https://api.openai.com/v1')).not.toBeInTheDocument();- // A gateway can stand in for Anthropic too, so the field stays (#2655).- expect(screen.getByPlaceholderText('https://api.anthropic.com')).toHaveValue('');- expect(screen.getByPlaceholderText('claude-opus-4-8')).toBeInTheDocument();- expect(screen.getByText(/Anthropic reads PDFs/)).toBeInTheDocument();- });-- it('FE-ADMIN-ADDON-024: pulling a model streams progress and then selects it', async () => {- const user = userEvent.setup();- let pulled: unknown = null;- let modelCalls = 0;server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- http.get('/api/admin/llm/local/models', () => {- modelCalls += 1;- return HttpResponse.json({ models: modelCalls === 1 ? [] : [{ name: 'qwen3.5:4b', size: 1 }] });- }),- http.post('/api/admin/llm/local/pull', async ({ request }) => {- pulled = await request.json();- await delay(150);- return new HttpResponse(- '{"status":"pulling manifest"}\n{"status":"downloading","total":100,"completed":40}\nnot-json\n',- { headers: { 'Content-Type': 'application/x-ndjson' } },- );- }),- );- render(<><ToastContainer /><AddonManager /></>);-- await screen.findByText('No models installed yet — pull one below.');- await user.click(screen.getByRole('button', { name: 'Pull' }));-- await screen.findByText('Pulling…');- expect(screen.getByText('starting…')).toBeInTheDocument();-- await screen.findByText('Model pulled');- expect(pulled).toEqual({ baseUrl: 'http://localhost:11434/v1', model: 'qwen3.5:4b' });- expect(screen.getByPlaceholderText('select or pull below')).toHaveValue('qwen3.5:4b');- await waitFor(() => expect(screen.getByRole('button', { name: 'Selected' })).toBeDisabled());- });-- it('FE-ADMIN-ADDON-025: a failing pull surfaces the server error and saving reports both outcomes', async () => {- const user = userEvent.setup();- const bodies: unknown[] = [];- server.use(- addonsRoute([llmAddon({ provider: 'local', model: 'qwen3:8b', baseUrl: '', apiKey: '••••••••', multimodal: true })]),- modelsRoute([]),- http.post('/api/admin/llm/local/pull', () => HttpResponse.json({ error: 'no disk space' }, { status: 500 })),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- bodies.push(await request.json());- return bodies.length === 1 ? HttpResponse.json({ success: true }) : HttpResponse.error();- }),- );- render(<><ToastContainer /><AddonManager /></>);-- await screen.findByText('No models installed yet — pull one below.');- await user.click(screen.getByRole('button', { name: 'Pull' }));- await screen.findByText('no disk space');- expect(screen.getByRole('button', { name: 'Pull' })).toBeEnabled();-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Saved');- expect(bodies[0]).toEqual({- config: { provider: 'local', model: 'qwen3:8b', baseUrl: '', apiKey: '••••••••', vision: 'auto' },- });-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Failed to save');- });-- it('FE-ADMIN-ADDON-026: model and API key are editable and their hints follow the provider', async () => {- const user = userEvent.setup();- const bodies: unknown[] = [];- server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- modelsRoute([]),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- bodies.push(await request.json());- return HttpResponse.json({ success: true });- }),- );- render(<><ToastContainer /><AddonManager /></>);-- await screen.findByText('Installed on the server');- expect(screen.getByPlaceholderText('(often not required)')).toBeInTheDocument();-- await user.type(screen.getByPlaceholderText('select or pull below'), ' mistral:7b ');- await user.type(screen.getByPlaceholderText('(often not required)'), 'sk-live');-- await user.click(screen.getByRole('button', { name: /Local · OpenAI-compatible/ }));- await user.click(screen.getByRole('button', { name: 'OpenAI' }));- expect(screen.getByPlaceholderText('sk-…')).toHaveValue('sk-live');-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Saved');- // The model is trimmed before it is stored, the key is sent verbatim- expect(bodies[0]).toEqual({- config: { provider: 'openai', model: 'mistral:7b', baseUrl: '', apiKey: 'sk-live', vision: 'auto' },- });- });-- it('FE-ADMIN-ADDON-029: switching to Anthropic clears a stale base URL before saving', async () => {- const user = userEvent.setup();- const bodies: unknown[] = [];- server.use(- addonsRoute([llmAddon({ provider: 'local', model: '', baseUrl: 'http://ollama.lan:11434/v1', apiKey: '', multimodal: false })]),- modelsRoute([]),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- bodies.push(await request.json());- return HttpResponse.json({ success: true });- }),- );- render(<><ToastContainer /><AddonManager /></>);-- await screen.findByText('Installed on the server');-- await user.click(screen.getByRole('button', { name: /Local · OpenAI-compatible/ }));- await user.click(screen.getByRole('button', { name: 'Anthropic' }));- await user.type(screen.getByPlaceholderText('claude-opus-4-8'), 'claude-haiku-4-5-20251001');- await user.type(screen.getByPlaceholderText('sk-…'), 'sk-ant-live');-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Saved');- // The stale local base URL must not ride along to Anthropic — it would hijack the endpoint.- expect(bodies[0]).toEqual({- config: { provider: 'anthropic', model: 'claude-haiku-4-5-20251001', baseUrl: '', apiKey: 'sk-ant-live', vision: 'auto' },- });- });-- it('FE-ADMIN-ADDON-038: whether the model reads images is auto, on or off, kept as stored and saved as chosen', async () => {- const user = userEvent.setup();- const bodies: unknown[] = [];- server.use(- addonsRoute([llmAddon({ provider: 'openai', model: 'gpt-4.1-mini', baseUrl: '', apiKey: 'sk', vision: 'off' })]),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- bodies.push(await request.json());- return HttpResponse.json({ success: true });- }),+ addonsRoute([llmAddon({}), aiAddon('ai_assistant', 'AI Assistant', false), aiAddon('mcp', 'MCP', true)]),+ http.get('/api/admin/ai/settings', () =>+ HttpResponse.json({ policy: 'instance_or_user', dailyTurns: 50, retention: { mode: 'days', days: 90 } }),+ ),+ http.get('/api/admin/ai/connection', () => HttpResponse.json({ connection: null, prefill: null })),+ http.get('/api/ai/status', () => HttpResponse.json({ error: 'not needed' }, { status: 404 })),);- render(<><ToastContainer /><AddonManager /></>);-- // Stored off stays off; a cloud provider is told what Automatic means for it.- await user.click(await screen.findByRole('button', { name: 'No' }));- expect(screen.getByText('Automatic means no for a cloud model. Choose Yes if this model reads images.')).toBeInTheDocument();- await user.click(screen.getByRole('button', { name: 'Yes' }));-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Saved');- expect(bodies[0]).toMatchObject({ config: { provider: 'openai', vision: 'on' } });- expect(bodies[0]).not.toHaveProperty('config.multimodal');- });-- it('FE-ADMIN-ADDON-039: with the local provider the hint says Automatic asks the server', async () => {- server.use(addonsRoute([llmAddon({ provider: 'local', model: 'qwen3.5:4b' })]), modelsRoute([]));render(<AddonManager />);- expect(await screen.findByText('Automatic asks the Ollama server whether this model reads images.')).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Automatic' })).toBeInTheDocument();- });- it('FE-ADMIN-ADDON-027: an error frame in the pull stream aborts the pull and is reported', async () => {- const user = userEvent.setup();- server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- modelsRoute([]),- http.post('/api/admin/llm/local/pull', () => new HttpResponse(- '{"status":"pulling manifest"}\n{"error":"manifest not found"}\n',- { headers: { 'Content-Type': 'application/x-ndjson' } },- )),- );- render(<><ToastContainer /><AddonManager /></>);-- await screen.findByText('No models installed yet — pull one below.');- await user.click(screen.getByRole('button', { name: 'Pull' }));-- await screen.findByText('manifest not found');- expect(screen.queryByText('Model pulled')).not.toBeInTheDocument();- await waitFor(() => expect(screen.getByRole('button', { name: 'Pull' })).toBeEnabled());- expect(screen.queryByText('Pulling…')).not.toBeInTheDocument();+ const tile = (await screen.findByText('AI')).closest('article') as HTMLElement;+ expect(within(tile).getByText('2/3')).toBeInTheDocument();+ await user.click(within(tile).getByRole('button', { name: 'Set up AI' }));+ const dialog = await screen.findByRole('dialog');+ expect(within(dialog).getByRole('button', { name: 'AI Parsing' })).toBeInTheDocument();+ expect(within(dialog).queryByRole('button', { name: 'AI Assistant' })).toBeNull();+ const closes = within(dialog).getAllByRole('button', { name: 'Close' });+ await user.click(closes[closes.length - 1]);+ await waitFor(() => expect(screen.queryByRole('dialog')).toBeNull());});- it('FE-ADMIN-ADDON-028: blurring the base URL under a cloud provider queries no local models', async () => {- const user = userEvent.setup();- const urls: (string | null)[] = [];- server.use(addonsRoute([llmAddon({ provider: 'openai' })]), modelsRoute([], urls));- render(<AddonManager />);-- await screen.findByText('Provider');- expect(screen.queryByText('Installed on the server')).not.toBeInTheDocument();-- await user.type(screen.getByPlaceholderText('https://api.openai.com/v1'), 'https://proxy.local/v1');- await user.tab();-- await waitFor(() => expect(screen.getByDisplayValue('https://proxy.local/v1')).toBeInTheDocument());- expect(urls).toHaveLength(0);- });it('FE-ADMIN-ADDON-040: a shelf of several options starts folded and says how many there are and how many are on', async () => {server.use(addonsRoute([buildAddon({ id: 'collab', name: 'Collab', enabled: true })]));render(@@ -901,6 +667,10 @@ describe('AddonManager', () => {</>);+ // Folded like Collab's and Documents' options until the bar is opened.+ await screen.findByRole('button', { name: /\d+ options?/, expanded: false });+ expect(screen.queryByRole('button', { name: 'wanderer' })).not.toBeInTheDocument();+ await unfoldShelves();const toggle = await screen.findByRole('button', { name: 'wanderer' });expect(isOn(toggle)).toBe(false);await userEvent.click(toggle);@@ -921,6 +691,7 @@ describe('AddonManager', () => {</>);+ await unfoldShelves();await userEvent.click(await screen.findByRole('button', { name: 'wanderer' }));await waitFor(() => expect(isOn(screen.getByRole('button', { name: 'wanderer' }))).toBe(false));diff --git a/client/src/components/Admin/AddonManager.tsx b/client/src/components/Admin/AddonManager.tsxindex 4702cd32a..af0e36f6f 100644--- a/client/src/components/Admin/AddonManager.tsx+++ b/client/src/components/Admin/AddonManager.tsx@@ -1,9 +1,7 @@-import { useId, type ComponentType } from 'react'+import type { ComponentType } from 'react'import { useTranslation } from '../../i18n'import { useIsDark } from '../../hooks/useIsDark'-import { Puzzle, ListChecks, Wallet, FileText, CalendarDays, Globe, Briefcase, Image, Terminal, Link2, Compass, BookOpen, Sparkles, Luggage, Plane, Server, Cloud, Bookmark, Users, Loader2, RefreshCw, Mountain, CarFront } from 'lucide-react'-import CustomSelect from '../shared/CustomSelect'-import { asLlmVision, LLM_VISION_MODES, type LlmVision } from '@trek/shared'+import { Puzzle, ListChecks, Wallet, FileText, CalendarDays, Globe, Briefcase, Image, Terminal, Link2, Compass, BookOpen, Sparkles, Luggage, Plane, Bookmark, Users, Loader2, Mountain, CarFront } from 'lucide-react'import EmptyState from '../shared/EmptyState'import DawarichIcon from '../shared/DawarichIcon'import AirTrailIcon from '../shared/AirTrailIcon'@@ -12,12 +10,10 @@ import AddonTile from './AddonTile'import AddonSubRow from './AddonSubRow'import { Tooltip } from '../shared/Tooltip'import { fs } from '../shared/DialogShell'-import { EditorField, INPUT, Segmented } from '../shared/dialogParts'-import { SettingsCard, SettingsHint, StatusPill, SETTINGS_BUTTON_PRIMARY } from '../Settings/settingsKit'-import { type Addon, type CollabFeatures, ANTHROPIC_HINT, COLLAB_SUB_FEATURES, getAddonLabel, MASKED, RECOMMENDED_MODELS } from './addons/addonModel'+import { SettingsCard, StatusPill } from '../Settings/settingsKit'+import { type Addon, type CollabFeatures, COLLAB_SUB_FEATURES, getAddonLabel } from './addons/addonModel'import { useAddonManager } from './addons/useAddonManager'-import { useLlmParsingConfig } from './addons/useLlmParsingConfig'-import AiAdminConfig from './addons/AiAdminConfig'+import AiAddonTile from './addons/AiAddonTile'import { ImmichIcon, SynologyIcon } from './addons/PhotoProviderIcons'import WandererMark from '../Tours/wanderer/WandererMark'@@ -75,7 +71,7 @@ export default function AddonManager({ bagTrackingEnabled, onToggleBagTracking,const { t } = useTranslation()const dark = useIsDark()const {- addons, loading, handleToggle, tripAddons, globalAddons, integrationAddons, providerOptions, documentProviderOptions,+ addons, loading, handleToggle, tripAddons, globalAddons, integrationAddons, aiAddons, providerOptions, documentProviderOptions,toursWanderer,toggleToursWanderer,mapSwitches,@@ -155,37 +151,29 @@ export default function AddonManager({ bagTrackingEnabled, onToggleBagTracking,)})}+ // An array, not a fragment: the tile counts its rows to fold them behind the+ // "N options" bar the way Collab's and Documents' are.if (addon.id === 'tours' && addon.enabled) {- return (- <>+ return [+ <AddonSubRow+ key="wanderer"+ icon={<WandererMark size={14} />}+ title={t('admin.toursWanderer.title')}+ description={t('admin.toursWanderer.subtitle')}+ enabled={toursWanderer}+ onToggle={() => void toggleToursWanderer()}+ />,+ ...mapSwitches.map(({ key, Icon, titleKey, subtitleKey, enabled, toggle }) => (<AddonSubRow- icon={<WandererMark size={14} />}- title={t('admin.toursWanderer.title')}- description={t('admin.toursWanderer.subtitle')}- enabled={toursWanderer}- onToggle={() => void toggleToursWanderer()}+ key={key}+ icon={<Icon size={14} />}+ title={t(titleKey)}+ description={t(subtitleKey)}+ enabled={enabled}+ onToggle={() => void toggle()}/>- {mapSwitches.map(({ key, Icon, titleKey, subtitleKey, enabled, toggle }) => (- <AddonSubRow- key={key}- icon={<Icon size={14} />}- title={t(titleKey)}- description={t(subtitleKey)}- enabled={enabled}- onToggle={() => void toggle()}- />- ))}- </>- )- }- // The AI-parsing settings hang off their tile like every other sub-feature,- // just as a form instead of toggle rows.- if (addon.id === 'llm_parsing' && addon.enabled) {- return <LlmParsingConfig addon={addon} />- }- // The assistant's settings and the connection everyone runs on, the same way.- if (addon.id === 'ai_assistant' && addon.enabled) {- return <AiAdminConfig />+ )),+ ]}return null}@@ -214,9 +202,9 @@ export default function AddonManager({ bagTrackingEnabled, onToggleBagTracking,{ key: 'trip', addons: tripAddons },{ key: 'global', addons: globalAddons },{ key: 'integration', addons: integrationAddons },- ].filter(g => g.addons.length > 0)+ ].filter(g => g.addons.length > 0 || (g.key === 'integration' && aiAddons.length > 0))const enabledCount = addons.filter(a => a.type !== 'photo_provider' && a.type !== 'document_provider' && a.enabled).length- const totalCount = tripAddons.length + globalAddons.length + integrationAddons.length+ const totalCount = tripAddons.length + globalAddons.length + integrationAddons.length + aiAddons.lengthconst subtitle = (<span className="inline-flex flex-wrap items-center gap-1">@@ -247,8 +235,12 @@ export default function AddonManager({ bagTrackingEnabled, onToggleBagTracking,const meta = TYPE_META[g.key]return (<section key={g.key} className="min-w-0 overflow-hidden rounded-[14px] border border-edge-faint bg-surface-card">- <GroupHead icon={meta.icon} label={t(meta.labelKey)} hint={t(meta.hintKey)} addons={g.addons} t={t} />- <div className="divide-y divide-edge-faint">{g.addons.map(tile)}</div>+ <GroupHead icon={meta.icon} label={t(meta.labelKey)} hint={t(meta.hintKey)} addons={g.key === 'integration' ? [...aiAddons, ...g.addons] : g.addons} t={t} />+ <div className="divide-y divide-edge-faint">+ {/* The AI addons share a connection and a settings dialog, so they head the column as one tile. */}+ {g.key === 'integration' && aiAddons.length > 0 && <AiAddonTile addons={aiAddons} onToggle={handleToggle} />}+ {g.addons.map(tile)}+ </div></section>)})}@@ -287,140 +279,3 @@ function GroupHead({ icon: Icon, label, hint, addons, t }: {</div>)}--const EYEBROW = 'font-geist font-bold uppercase tracking-[.08em] text-content-faint'-const SMALL_BUTTON = 'inline-flex flex-none items-center rounded-[9px] px-2.5 py-1 font-medium transition-colors disabled:cursor-default disabled:opacity-60'--/**- * Instance-wide AI-parsing config. When set, applies to the whole instance and- * overrides per-user config (see server llmConfig.ts). The API key is masked on- * read; an unchanged mask is treated as a no-op by the server. For the local- * provider, it also lists installed Ollama models and can pull NuExtract models.- */-function LlmParsingConfig({ addon }: { addon: Addon }) {- const { t } = useTranslation()- const {- provider, setProvider, model, setModel, baseUrl, setBaseUrl, baseUrlPlaceholder, apiKey, setApiKey, vision, setVision, saving,- installed, modelsErr, loadingModels, pulling, pullPct, pullStatus, isInstalled, loadModels, pull, save,- } = useLlmParsingConfig(addon)- const fieldId = useId()-- const providerOptions = [- { value: 'local', label: 'Local · OpenAI-compatible', icon: <Server size={14} />, badge: 'Ollama' },- { value: 'openai', label: 'OpenAI', icon: <Cloud size={14} /> },- { value: 'anthropic', label: 'Anthropic', icon: <Sparkles size={14} /> },- ]- const visionOptions = LLM_VISION_MODES.map(value => ({ value, label: t(`admin.addons.llm.vision.${value}`) }))-- /* Lives in the tile's shelf like the collab toggles, so it is one column of- eyebrow fields: the band this used to be had a whole page width. */- return (- <li className={`flex flex-col gap-3 p-3 ${saving ? 'opacity-60' : ''}`}>- <SettingsHint>- Instance-wide — applies to all users. Leave blank to let each user configure their own provider.- </SettingsHint>-- <EditorField label="Provider">- <CustomSelect value={provider} onChange={v => setProvider(String(v))} options={providerOptions} />- </EditorField>- <EditorField label="Base URL" htmlFor={`${fieldId}-url`}>- <input id={`${fieldId}-url`} type="url" autoComplete="off" className={INPUT} value={baseUrl} onChange={e => setBaseUrl(e.target.value)} onBlur={loadModels} placeholder={baseUrlPlaceholder} />- </EditorField>- <EditorField- label="API key"- htmlFor={`${fieldId}-key`}- hint={provider === 'anthropic' ? ANTHROPIC_HINT : undefined}- >- <input id={`${fieldId}-key`} type="password" className={INPUT} value={apiKey} onChange={e => setApiKey(e.target.value)} placeholder={apiKey === MASKED ? MASKED : provider === 'local' ? '(often not required)' : 'sk-…'} />- </EditorField>- <EditorField label="Model" htmlFor={`${fieldId}-model`}>- <input id={`${fieldId}-model`} autoComplete="off" className={`${INPUT} font-geist`} value={model} onChange={e => setModel(e.target.value)} placeholder={provider === 'anthropic' ? 'claude-opus-4-8' : provider === 'openai' ? 'gpt-4o' : 'select or pull below'} />- </EditorField>-- <EditorField label={t('settings.aiParsing.multimodal')} hint={t(provider === 'local' ? 'admin.addons.llm.vision.hintLocal' : 'admin.addons.llm.vision.hintCloud')}>- <Segmented<LlmVision>- label={t('settings.aiParsing.multimodal')}- value={vision}- onChange={v => setVision(asLlmVision(v))}- options={visionOptions}- fill- />- </EditorField>-- {/* Local model management (Ollama) */}- {provider === 'local' && (- <div className="flex flex-col gap-2.5 rounded-[12px] border border-edge-faint bg-surface-card p-3">- <div className="flex items-center gap-2">- <span className={`${EYEBROW} min-w-0 flex-1 truncate`} style={fs(9.5)}>Installed on the server</span>- <button type="button" onClick={loadModels} disabled={loadingModels}- className="inline-flex flex-none items-center gap-1 rounded-full px-2 py-0.5 font-medium text-content-muted hover:bg-surface-secondary hover:text-content disabled:cursor-default disabled:opacity-60"- style={fs(11.5, 'body')}>- <RefreshCw size={11} strokeWidth={2.2} className={loadingModels ? 'animate-spin' : undefined} />- {loadingModels ? 'Loading…' : 'Refresh'}- </button>- </div>- {modelsErr && <p className="m-0 break-words text-danger" style={fs(11.5)}>{modelsErr}</p>}- {!modelsErr && installed.length === 0 && !loadingModels && (- <SettingsHint>No models installed yet — pull one below.</SettingsHint>- )}- {installed.length > 0 && (- <div className="flex flex-wrap gap-1.5">- {installed.map(name => (- <button type="button"- key={name}- title={name}- onClick={() => setModel(name)}- aria-pressed={model === name}- className={`max-w-full truncate rounded-full px-2.5 py-[3px] font-geist font-medium transition-colors ${model === name ? 'bg-accent text-accent-text' : 'border border-edge bg-surface-card text-content-muted hover:text-content'}`}- style={fs(11.5)}- >- {name}- </button>- ))}- </div>- )}-- <div className="flex flex-col gap-2 border-t border-edge-faint pt-2.5">- <span className={EYEBROW} style={fs(9.5)}>Pull a recommended model</span>- {RECOMMENDED_MODELS.map(m => {- const installedHere = isInstalled(m.id)- const isPulling = pulling === m.id- const active = model === m.id- return (- <div key={m.id} className="min-w-0" title={m.note}>- <div className="flex items-center gap-2">- <span className="min-w-0 flex-1 truncate font-medium text-content" style={fs(12.5, 'body')}>{m.label}</span>- {m.recommended && <StatusPill tone="success">Recommended</StatusPill>}- {installedHere ? (- <button type="button" onClick={() => setModel(m.id)} disabled={active} className={`${SMALL_BUTTON} ${active ? 'bg-surface-tertiary text-content-muted' : 'bg-surface-card text-content shadow-sm ring-1 ring-edge-faint hover:bg-surface-secondary'}`} style={fs(12, 'body')}>- {active ? 'Selected' : 'Use'}- </button>- ) : (- <button type="button" onClick={() => pull(m.id)} disabled={!!pulling} className={`${SMALL_BUTTON} bg-accent text-accent-text hover:opacity-90`} style={fs(12, 'body')}>- {isPulling ? 'Pulling…' : 'Pull'}- </button>- )}- </div>- {isPulling && (- <div className="mt-2">- <div className="h-1.5 w-full overflow-hidden rounded-full bg-surface-tertiary">- <div className="h-full rounded-full bg-accent transition-[width] duration-200" style={{ width: `${pullPct}%` }} />- </div>- <div className="mt-1 truncate font-geist tabular-nums text-content-faint" style={fs(11)}>{pullStatus}{pullPct ? ` · ${pullPct}%` : ''}</div>- </div>- )}- </div>- )- })}- </div>- </div>- )}-- <div className="flex justify-end">- <button type="button" onClick={save} disabled={saving} className={SETTINGS_BUTTON_PRIMARY} style={fs(13, 'body')}>- {saving ? 'Saving…' : 'Save'}- </button>- </div>- </li>- )-}diff --git a/client/src/components/Admin/addons/AiAddonTile.tsx b/client/src/components/Admin/addons/AiAddonTile.tsxnew file mode 100644index 000000000..64120d26d--- /dev/null+++ b/client/src/components/Admin/addons/AiAddonTile.tsx@@ -0,0 +1,95 @@+import { ChevronRight, Settings2, Sparkles } from 'lucide-react';+import React from 'react';+import { useTranslation } from '../../../i18n';+import { StatusPill } from '../../Settings/settingsKit';+import { fs } from '../../shared/DialogShell';+import AddonSubRow from '../AddonSubRow';+import { type Addon, getAddonLabel } from './addonModel';+import { AI_ADDON_ICONS, type AiAddonId } from './aiAddons';+import AiSettingsDialog from './AiAdminConfig';+import { useAiAddonTile } from './useAiAddonTile';++/**+ * The AI addons as one tile at the head of the integration column: the+ * assistant, AI parsing and MCP as switches in its shelf, and one button to+ * the dialog that holds their settings, so a page with all three on stays as+ * short as one with none.+ */+export default function AiAddonTile({+ addons,+ onToggle,+}: {+ addons: Addon[];+ onToggle: (addon: Addon) => void;+}): React.ReactElement {+ const { t } = useTranslation();+ const tile = useAiAddonTile(addons);+ const anyOn = tile.enabledCount > 0;+ return (+ <article className="px-3.5 py-3 transition-colors duration-150 focus-within:bg-surface-secondary">+ <div className="flex items-start gap-3">+ <div+ className={`grid h-9 w-9 flex-none place-items-center rounded-[10px] transition-colors ${+ anyOn+ ? 'bg-surface-card text-content shadow-sm ring-1 ring-edge-faint'+ : 'bg-surface-tertiary text-content-faint'+ }`}+ >+ <Sparkles size={18} />+ </div>+ <div className="min-w-0 flex-1 pt-px">+ <h4 className="m-0 truncate font-semibold text-content" style={fs(13, 'body')}>+ {t('admin.addons.ai.name')}+ </h4>+ <p+ className={`m-0 mt-0.5 line-clamp-2 leading-snug ${anyOn ? 'text-content-muted' : 'text-content-faint'}`}+ style={fs(11.5)}+ >+ {t('admin.addons.ai.description')}+ </p>+ </div>+ <div className="flex-none pt-1">+ <StatusPill tone={anyOn ? 'success' : 'neutral'}>+ {tile.enabledCount}/{addons.length}+ </StatusPill>+ </div>+ </div>++ <div className="mt-3 overflow-hidden rounded-[12px] border border-edge-faint bg-surface-secondary">+ <ul className="m-0 list-none divide-y divide-edge-faint p-0">+ {addons.map((addon) => {+ const Icon = AI_ADDON_ICONS[addon.id as AiAddonId];+ const label = getAddonLabel(t, addon);+ return (+ <AddonSubRow+ key={addon.id}+ icon={<Icon size={14} />}+ title={label.name}+ description={label.description}+ enabled={addon.enabled}+ onToggle={() => onToggle(addon)}+ />+ );+ })}+ </ul>+ {tile.canSetUp && (+ <button+ type="button"+ onClick={tile.openDialog}+ className="flex min-h-[44px] w-full items-center gap-2.5 border-t border-edge-faint px-3 py-1.5 text-start transition-colors hover:bg-surface-tertiary focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent"+ >+ <span className="grid h-6 w-6 flex-none place-items-center text-content-muted">+ <Settings2 size={14} />+ </span>+ <span className="min-w-0 flex-1 truncate font-medium text-content" style={fs(12.5, 'body')}>+ {t('admin.addons.ai.setup')}+ </span>+ <ChevronRight size={15} strokeWidth={2.2} className="flex-none text-content-faint rtl:rotate-180" />+ </button>+ )}+ </div>++ {tile.dialogOpen && <AiSettingsDialog addons={addons} onClose={tile.closeDialog} />}+ </article>+ );+}diff --git a/client/src/components/Admin/addons/AiAdminConfig.test.tsx b/client/src/components/Admin/addons/AiAdminConfig.test.tsxindex 0f4927a46..f1b2ba6e7 100644--- a/client/src/components/Admin/addons/AiAdminConfig.test.tsx+++ b/client/src/components/Admin/addons/AiAdminConfig.test.tsx@@ -1,9 +1,13 @@-// FE-COMP-AI-ADMIN-001 to FE-COMP-AI-ADMIN-004: the AI assistant's form on its addon tile.+// FE-COMP-AI-ADMIN-001 to FE-COMP-AI-ADMIN-020: the AI settings dialog behind the AI tile.import userEvent from '@testing-library/user-event';import type { AiAdminConnectionResponse, AiAdminSettings } from '@trek/shared';+import { delay, http, HttpResponse } from 'msw';import { beforeEach, describe, expect, it, vi } from 'vitest';+import { server } from '../../../../tests/helpers/msw/server';import { render, screen, waitFor } from '../../../../tests/helpers/render';import { useAssistantStore } from '../../../store/assistantStore';+import { ToastContainer } from '../../shared/Toast';+import type { Addon } from './addonModel';const repo = vi.hoisted(() => ({status: vi.fn(),@@ -16,7 +20,7 @@ const repo = vi.hoisted(() => ({}));vi.mock('../../../repo/aiConnectionsRepo', () => ({ aiConnectionsRepo: repo }));-const { default: AiAdminConfig } = await import('./AiAdminConfig');+const { default: AiSettingsDialog } = await import('./AiAdminConfig');const SETTINGS: AiAdminSettings = { policy: 'instance_or_user', dailyTurns: 50, retention: { mode: 'days', days: 90 } };const LIVE: AiAdminConnectionResponse = {@@ -32,12 +36,44 @@ const LIVE: AiAdminConnectionResponse = {prefill: null,};-function renderConfig() {- return render(- <ul>- <AiAdminConfig />- </ul>+function addon(id: string, enabled: boolean, config?: Record<string, unknown>): Addon {+ return { id, name: id, description: '', icon: 'Sparkles', type: 'integration', enabled, config } as Addon;+}++const ASSISTANT = addon('ai_assistant', true);+const parsing = (config: Record<string, unknown> = {}) => addon('llm_parsing', true, config);++function renderDialog(addons: Addon[] = [ASSISTANT]) {+ const onClose = vi.fn();+ render(+ <>+ <ToastContainer />+ <AiSettingsDialog addons={addons} onClose={onClose} />+ </>);+ return { onClose };+}++/** The dialog opened on AI parsing's tab. */+async function renderParsing(config: Record<string, unknown> = {}) {+ const user = userEvent.setup();+ renderDialog([ASSISTANT, parsing(config)]);+ await user.click(await screen.findByRole('button', { name: 'AI Parsing' }));+ return user;+}++function modelsRoute(names: string[], seen?: (string | null)[]) {+ return http.get('/api/admin/llm/local/models', ({ request }) => {+ seen?.push(new URL(request.url).searchParams.get('baseUrl'));+ return HttpResponse.json({ models: names.map((name) => ({ name, size: 1 })) });+ });+}++function saveRoute(bodies: unknown[], fail = false) {+ return http.put('/api/admin/addons/llm_parsing', async ({ request }) => {+ bodies.push(await request.json());+ return fail ? HttpResponse.error() : HttpResponse.json({ success: true });+ });}beforeEach(() => {@@ -51,32 +87,35 @@ beforeEach(() => {repo.adminModels.mockResolvedValue([{ id: 'gpt-5.5', label: 'GPT-5.5', supportsTools: true }]);});-describe('AiAdminConfig', () => {- it('FE-COMP-AI-ADMIN-001: shows who pays, the setup for everyone, the daily limit and the retention', async () => {- renderConfig();+describe('the connection and the assistant', () => {+ it('FE-COMP-AI-ADMIN-001: shows who pays and the setup for everyone, the limits on the assistant tab', async () => {+ const user = userEvent.setup();+ renderDialog();expect(await screen.findByRole('radio', { name: 'I pay, own allowed' })).toHaveAttribute('aria-checked', 'true');expect(screen.getByText('Everyone uses the connection below unless they connect their own.')).toBeInTheDocument();expect(screen.getByText('No connection yet.')).toBeInTheDocument();expect(screen.getByRole('button', { name: /Own server/ })).toBeInTheDocument();expect(screen.queryByText('Sign in with ChatGPT')).not.toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'AI Assistant' }));expect(screen.getByDisplayValue('50')).toBeInTheDocument();expect(screen.getByText('Keep chats')).toBeInTheDocument();});it('FE-COMP-AI-ADMIN-002: "Everyone uses their own" drops the connection and the limit', async () => {const user = userEvent.setup();- renderConfig();+ renderDialog();await user.click(await screen.findByRole('radio', { name: 'Everyone uses their own account' }));await waitFor(() => expect(screen.queryByText('No connection yet.')).not.toBeInTheDocument());expect(repo.saveAdminSettings).toHaveBeenCalledWith({ ...SETTINGS, policy: 'user' });- expect(screen.queryByText('Messages per person per day')).not.toBeInTheDocument();expect(screen.getByText('Everyone connects their own provider. Nothing is charged to you.')).toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'AI Assistant' }));+ expect(screen.queryByText('Messages per person per day')).not.toBeInTheDocument();});it('FE-COMP-AI-ADMIN-003: a live connection shows its provider and opens the setup only to change it', async () => {const user = userEvent.setup();repo.adminConnection.mockResolvedValue(LIVE);- renderConfig();+ renderDialog();expect(await screen.findByText('OpenAI')).toBeInTheDocument();expect(screen.getByText('…9f3c')).toBeInTheDocument();expect(screen.queryByText('What would you like to chat with?')).not.toBeInTheDocument();@@ -89,7 +128,7 @@ describe('AiAdminConfig', () => {it('FE-COMP-AI-ADMIN-004: removing the connection asks first', async () => {const user = userEvent.setup();repo.adminConnection.mockResolvedValueOnce(LIVE).mockResolvedValue({ connection: null, prefill: null });- renderConfig();+ renderDialog();await user.click(await screen.findByRole('button', { name: 'Remove connection' }));expect(screen.getByText('Disconnect OpenAI? Your chats stay.')).toBeInTheDocument();const buttons = screen.getAllByRole('button', { name: 'Remove connection' });@@ -97,4 +136,201 @@ describe('AiAdminConfig', () => {expect(await screen.findByText('No connection yet.')).toBeInTheDocument();expect(repo.removeAdminConnection).toHaveBeenCalledTimes(1);});++ it('FE-COMP-AI-ADMIN-005: a tab shows only while its addon is on, and Close closes', async () => {+ const user = userEvent.setup();+ const { onClose } = renderDialog([addon('ai_assistant', false), parsing()]);+ expect(await screen.findByRole('button', { name: 'AI Parsing' })).toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'AI Assistant' })).not.toBeInTheDocument();+ const closes = screen.getAllByRole('button', { name: 'Close' });+ await user.click(closes[closes.length - 1]);+ expect(onClose).toHaveBeenCalled();+ });+});++describe('AI parsing', () => {+ it('FE-COMP-AI-ADMIN-010: without its own connection parsing reads with the shared one, and can be given its own', async () => {+ repo.adminConnection.mockResolvedValue(LIVE);+ server.use(modelsRoute([]));+ const user = await renderParsing({ vision: 'auto' });+ expect(await screen.findByText('Shared')).toBeInTheDocument();+ expect(screen.getByText('gpt-5.5')).toBeInTheDocument();+ expect(screen.queryByLabelText('Model')).not.toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'Use a different one' }));+ expect(screen.getByLabelText('Model')).toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'Cancel' }));+ expect(screen.queryByLabelText('Model')).not.toBeInTheDocument();+ });++ it('FE-COMP-AI-ADMIN-011: with no connection anywhere it says so and leads to the connection tab', async () => {+ const user = await renderParsing();+ expect(+ await screen.findByText('No connection yet. Set one up for everyone, or give AI parsing its own.')+ ).toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'Connection' }));+ expect(await screen.findByRole('radio', { name: 'I pay, own allowed' })).toBeInTheDocument();+ });++ it('FE-COMP-AI-ADMIN-012: an own connection is shown as such and goes back to the shared one, keeping the vision setting', async () => {+ const bodies: unknown[] = [];+ repo.adminConnection.mockResolvedValue(LIVE);+ server.use(modelsRoute([]), saveRoute(bodies));+ const user = await renderParsing({ provider: 'anthropic', model: 'claude-x', apiKey: '••••••••', vision: 'on' });+ expect(await screen.findByText('Own connection', { selector: 'span' })).toBeInTheDocument();+ expect(screen.getByText('claude-x')).toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'Use the shared connection' }));+ await screen.findByText('AI settings saved');+ expect(bodies[0]).toEqual({ config: { vision: 'on' } });+ expect(await screen.findByText('Shared')).toBeInTheDocument();+ });++ it('FE-COMP-AI-ADMIN-013: the local provider lists installed models and a chip fills the model field', async () => {+ const urls: (string | null)[] = [];+ server.use(modelsRoute(['qwen3.5:4b', 'llama3:8b'], urls));+ const user = await renderParsing({ provider: 'local', model: 'old' });+ await screen.findByText('Installed on the server');+ await user.click(await screen.findByRole('button', { name: 'llama3:8b' }));+ expect(urls[0]).toBe('http://localhost:11434/v1');+ expect(screen.getByLabelText('Model')).toHaveValue('llama3:8b');+ // qwen3.5:4b is installed already, so the recommended row offers Use instead of Pull.+ await user.click(screen.getByRole('button', { name: 'Use' }));+ expect(screen.getByLabelText('Model')).toHaveValue('qwen3.5:4b');+ expect(screen.getByRole('button', { name: 'Selected' })).toBeDisabled();+ });++ it("FE-COMP-AI-ADMIN-014: an unreachable Ollama shows the server's reason and Refresh retries", async () => {+ let calls = 0;+ server.use(+ http.get('/api/admin/llm/local/models', () => {+ calls += 1;+ return calls === 1 ? HttpResponse.json({ error: 'down' }, { status: 500 }) : HttpResponse.json({ models: [] });+ })+ );+ const user = await renderParsing({ provider: 'local', model: 'm' });+ await screen.findByText('down');+ expect(screen.queryByText(/Request failed with status code/)).not.toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'Refresh' }));+ await screen.findByText('No models installed yet. Pull one below.');+ expect(calls).toBe(2);+ });++ it('FE-COMP-AI-ADMIN-015: switching providers swaps the address placeholder and the Ollama block, and drops a stale address', async () => {+ const bodies: unknown[] = [];+ server.use(modelsRoute([]), saveRoute(bodies));+ const user = await renderParsing({ provider: 'local', model: 'm', baseUrl: 'http://ollama.lan:11434/v1' });+ await screen.findByText('Installed on the server');+ await user.click(screen.getByRole('radio', { name: 'OpenAI' }));+ expect(screen.getByPlaceholderText('https://api.openai.com/v1')).toHaveValue('');+ expect(screen.queryByText('Installed on the server')).not.toBeInTheDocument();+ await user.click(screen.getByRole('radio', { name: 'Anthropic' }));+ // A gateway can stand in for Anthropic too, so the field stays (#2655).+ expect(screen.getByPlaceholderText('https://api.anthropic.com')).toHaveValue('');+ expect(screen.getByText(/Anthropic reads PDFs/)).toBeInTheDocument();+ await user.clear(screen.getByLabelText('Model'));+ await user.type(screen.getByLabelText('Model'), ' claude-haiku ');+ await user.type(screen.getByLabelText('API key'), 'sk-ant-live');+ await user.click(screen.getByRole('button', { name: 'Save' }));+ await screen.findByText('AI settings saved');+ // The stale local address must not ride along to Anthropic, and the model is trimmed.+ expect(bodies[0]).toEqual({+ config: { provider: 'anthropic', model: 'claude-haiku', baseUrl: '', apiKey: 'sk-ant-live', vision: 'auto' },+ });+ });++ it('FE-COMP-AI-ADMIN-016: a hand-typed address is asked on blur, a cloud provider asks nothing', async () => {+ const urls: (string | null)[] = [];+ server.use(modelsRoute([], urls));+ const user = await renderParsing({ provider: 'local', model: 'm' });+ await screen.findByText('Installed on the server');+ await user.type(screen.getByLabelText('Base URL'), 'http://ollama.lan:11434/v1');+ await user.tab();+ await waitFor(() => expect(urls).toContain('http://ollama.lan:11434/v1'));+ const before = urls.length;+ await user.click(screen.getByRole('radio', { name: 'OpenAI' }));+ await user.type(screen.getByLabelText('Base URL'), 'https://proxy.local/v1');+ await user.tab();+ expect(urls).toHaveLength(before);+ });++ it('FE-COMP-AI-ADMIN-017: a pull streams progress and then selects the model', async () => {+ let pulled: unknown = null;+ let modelCalls = 0;+ server.use(+ http.get('/api/admin/llm/local/models', () => {+ modelCalls += 1;+ return HttpResponse.json({ models: modelCalls === 1 ? [] : [{ name: 'qwen3.5:4b', size: 1 }] });+ }),+ http.post('/api/admin/llm/local/pull', async ({ request }) => {+ pulled = await request.json();+ await delay(150);+ return new HttpResponse(+ '{"status":"pulling manifest"}\n{"status":"downloading","total":100,"completed":40}\nnot-json\n',+ { headers: { 'Content-Type': 'application/x-ndjson' } }+ );+ })+ );+ const user = await renderParsing({ provider: 'local', model: 'm' });+ await screen.findByText('No models installed yet. Pull one below.');+ await user.click(screen.getByRole('button', { name: 'Pull' }));+ expect(await screen.findAllByText('Pulling…')).not.toHaveLength(0);+ await screen.findByText('Model pulled');+ expect(pulled).toEqual({ baseUrl: 'http://localhost:11434/v1', model: 'qwen3.5:4b' });+ expect(screen.getByLabelText('Model')).toHaveValue('qwen3.5:4b');+ await waitFor(() => expect(screen.getByRole('button', { name: 'Selected' })).toBeDisabled());+ });++ it('FE-COMP-AI-ADMIN-018: an error frame or a refused pull is reported and the button comes back', async () => {+ server.use(+ modelsRoute([]),+ http.post(+ '/api/admin/llm/local/pull',+ () =>+ new HttpResponse('{"status":"pulling manifest"}\n{"error":"manifest not found"}\n', {+ headers: { 'Content-Type': 'application/x-ndjson' },+ })+ )+ );+ const user = await renderParsing({ provider: 'local', model: 'm' });+ await screen.findByText('No models installed yet. Pull one below.');+ await user.click(screen.getByRole('button', { name: 'Pull' }));+ await screen.findByText('manifest not found');+ expect(screen.queryByText('Model pulled')).not.toBeInTheDocument();+ await waitFor(() => expect(screen.getByRole('button', { name: 'Pull' })).toBeEnabled());+ });++ it('FE-COMP-AI-ADMIN-019: saving keeps a masked key and reports both outcomes', async () => {+ const bodies: unknown[] = [];+ server.use(modelsRoute([]), saveRoute(bodies));+ const user = await renderParsing({ provider: 'local', model: 'qwen3:8b', baseUrl: '', apiKey: '••••••••' });+ await screen.findByText('Installed on the server');+ await user.click(screen.getByRole('button', { name: 'Save' }));+ await screen.findByText('AI settings saved');+ expect(bodies[0]).toEqual({+ config: { provider: 'local', model: 'qwen3:8b', baseUrl: '', apiKey: '••••••••', vision: 'auto' },+ });+ server.use(saveRoute(bodies, true));+ await user.click(screen.getByRole('button', { name: 'Save' }));+ await screen.findByText('Could not save AI settings');+ });++ it('FE-COMP-AI-ADMIN-020: whether the model reads images saves at once, with the connection as saved', async () => {+ const bodies: unknown[] = [];+ server.use(saveRoute(bodies));+ const user = await renderParsing({+ provider: 'openai',+ model: 'gpt-4.1-mini',+ baseUrl: '',+ apiKey: 'sk',+ vision: 'off',+ });+ expect(await screen.findByRole('button', { name: 'No' })).toBeInTheDocument();+ expect(+ screen.getByText('Automatic means no for a cloud model. Choose Yes if this model reads images.')+ ).toBeInTheDocument();+ await user.click(screen.getByRole('button', { name: 'Yes' }));+ await screen.findByText('AI settings saved');+ expect(bodies[0]).toEqual({+ config: { provider: 'openai', model: 'gpt-4.1-mini', baseUrl: '', apiKey: 'sk', vision: 'on' },+ });+ });});diff --git a/client/src/components/Admin/addons/AiAdminConfig.tsx b/client/src/components/Admin/addons/AiAdminConfig.tsxindex 9e54a5a7d..268df650b 100644--- a/client/src/components/Admin/addons/AiAdminConfig.tsx+++ b/client/src/components/Admin/addons/AiAdminConfig.tsx@@ -1,14 +1,25 @@-import { Check, Loader2 } from 'lucide-react';-import React, { useId } from 'react';+import { Check, Loader2, Sparkles } from 'lucide-react';+import React, { useId, useState } from 'react';import { useTranslation } from '../../../i18n';import AiConnectPanel, { ProviderMark } from '../../Settings/ai/AiConnectPanel';import { CONNECTION_STATUS } from '../../Settings/ai/aiConnectModel';import { SETTINGS_BUTTON, SETTINGS_BUTTON_DANGER, SettingsHint, StatusPill } from '../../Settings/settingsKit';import ConfirmDialog from '../../shared/ConfirmDialog';import CustomSelect from '../../shared/CustomSelect';-import { fs } from '../../shared/DialogShell';+import {+ DialogButton,+ DialogFooter,+ DialogHeader,+ DialogShell,+ DialogTile,+ FooterSpacer,+ NEUTRAL_TINT,+ fs,+} from '../../shared/DialogShell';import { NumericInput } from '../../shared/NumericInput';-import { EditorField, INPUT } from '../../shared/dialogParts';+import { EditorField, INPUT, Segmented } from '../../shared/dialogParts';+import ParsingSettings from './ParsingSettings';+import type { Addon } from './addonModel';import { POLICY_CHOICES, useAiAdminConfig } from './useAiAdminConfig';type AiAdmin = ReturnType<typeof useAiAdminConfig>;@@ -125,28 +136,12 @@ function InstanceConnection({ A }: { A: AiAdmin }) {);}-/**- * The AI assistant's settings on its addon tile, as a form in the shelf like- * AI parsing's: who pays, the connection for everyone, the daily limit while- * the instance pays, and how long chats are kept. Each change saves at once.- */-export default function AiAdminConfig(): React.ReactElement {+/** The assistant's own limits: turns a day while the instance pays, and how long chats are kept. */+function AssistantLimits({ A }: { A: AiAdmin }) {const { t } = useTranslation();- const A = useAiAdminConfig();const fieldId = useId();-- if (!A.loaded) {- return (- <li className="grid place-items-center p-4">- <Loader2 size={18} className="animate-spin text-content-faint" />- </li>- );- }-return (- <li className="flex flex-col gap-4 p-3">- <PolicyChoice A={A} />- {A.instancePays && <InstanceConnection A={A} />}+ <div className="flex flex-col gap-4">{A.instancePays && (<EditorFieldlabel={t('assistant.admin.dailyLimit')}@@ -175,6 +170,91 @@ export default function AiAdminConfig(): React.ReactElement {size="sm"/></EditorField>+ </div>+ );+}++type AiTab = 'connection' | 'assistant' | 'parsing';++/**+ * The AI settings behind the AI tile's button, in one dialog so the addon page+ * stays short: the connection the assistant and AI parsing share (and who pays+ * for it), the assistant's limits, and how bookings are read. A tab shows only+ * while its addon is on. Each change saves at once.+ */+export default function AiSettingsDialog({+ addons,+ onClose,+}: {+ addons: Addon[];+ onClose: () => void;+}): React.ReactElement {+ const { t } = useTranslation();+ const labelId = useId();+ const A = useAiAdminConfig();+ const assistantOn = addons.some((a) => a.id === 'ai_assistant' && a.enabled);+ const parsing = addons.find((a) => a.id === 'llm_parsing' && a.enabled) ?? null;+ const tabs: { value: AiTab; label: string }[] = [+ { value: 'connection', label: t('admin.addons.ai.tab.connection') },+ ...(assistantOn ? [{ value: 'assistant' as const, label: t('admin.addons.catalog.ai_assistant.name') }] : []),+ ...(parsing ? [{ value: 'parsing' as const, label: t('admin.addons.catalog.llm_parsing.name') }] : []),+ ];+ const [tab, setTab] = useState<AiTab>('connection');+ const shown = tabs.some((x) => x.value === tab) ? tab : 'connection';++ return (+ <DialogShell+ onClose={onClose}+ labelledBy={labelId}+ width="detail"+ align="top"+ blocked={A.instance.confirmingRemove}+ header={+ <DialogHeader+ tile={+ <DialogTile>+ <Sparkles size={20} strokeWidth={2} />+ </DialogTile>+ }+ tint={NEUTRAL_TINT}+ labelId={labelId}+ eyebrow={t('admin.addons.ai.name')}+ title={t('admin.addons.ai.setup')}+ sub={t('admin.addons.ai.dialogSub')}+ subWraps+ onClose={onClose}+ />+ }+ footer={+ <DialogFooter>+ <FooterSpacer />+ <DialogButton variant="primary" onClick={onClose}>+ {t('common.close')}+ </DialogButton>+ </DialogFooter>+ }+ >+ {tabs.length > 1 && (+ <Segmented<AiTab> label={t('admin.addons.ai.setup')} value={shown} onChange={setTab} options={tabs} fill />+ )}+ {!A.loaded ? (+ <div className="grid place-items-center py-10">+ <Loader2 size={20} className="animate-spin text-content-faint" />+ </div>+ ) : (+ <>+ {shown === 'connection' && (+ <div className="flex flex-col gap-4">+ <PolicyChoice A={A} />+ {A.instancePays && <InstanceConnection A={A} />}+ </div>+ )}+ {shown === 'assistant' && <AssistantLimits A={A} />}+ {shown === 'parsing' && parsing && (+ <ParsingSettings addon={parsing} A={A} onOpenConnection={() => setTab('connection')} />+ )}+ </>+ )}<ConfirmDialogisOpen={A.instance.confirmingRemove}@@ -185,6 +265,6 @@ export default function AiAdminConfig(): React.ReactElement {confirmLabel={t('assistant.admin.connectionRemove')}danger/>- </li>+ </DialogShell>);}diff --git a/client/src/components/Admin/addons/ParsingSettings.tsx b/client/src/components/Admin/addons/ParsingSettings.tsxnew file mode 100644index 000000000..8f11a004c--- /dev/null+++ b/client/src/components/Admin/addons/ParsingSettings.tsx@@ -0,0 +1,348 @@+import { asLlmVision, LLM_VISION_MODES, type LlmVision } from '@trek/shared';+import { Check, RefreshCw } from 'lucide-react';+import React, { useId } from 'react';+import { useTranslation } from '../../../i18n';+import { ProviderMark } from '../../Settings/ai/AiConnectPanel';+import { SETTINGS_BUTTON, SETTINGS_BUTTON_PRIMARY, SettingsHint, StatusPill } from '../../Settings/settingsKit';+import { DialogSection, fs } from '../../shared/DialogShell';+import { EditorField, INPUT, PANEL, Segmented } from '../../shared/dialogParts';+import { type Addon, ANTHROPIC_HINT, MASKED, RECOMMENDED_MODELS } from './addonModel';+import type { useAiAdminConfig } from './useAiAdminConfig';+import { useLlmParsingConfig } from './useLlmParsingConfig';++type AiAdmin = ReturnType<typeof useAiAdminConfig>;+type Parsing = ReturnType<typeof useLlmParsingConfig>;+type MarkKind = Parameters<typeof ProviderMark>[0]['kind'];++/** Parsing's own providers, with the mark the assistant shows for each. */+const OWN_PROVIDERS = [+ { value: 'local', labelKey: 'settings.aiParsing.providerLocal', mark: 'custom' },+ { value: 'openai', labelKey: 'settings.aiParsing.providerOpenai', mark: 'openai' },+ { value: 'anthropic', labelKey: 'settings.aiParsing.providerAnthropic', mark: 'anthropic' },+] as const;++const markOf = (provider: string): MarkKind => OWN_PROVIDERS.find((p) => p.value === provider)?.mark ?? 'custom';++/** The connection parsing reads with, as one line: a mark, who answers, the model and where it comes from. */+function ReadsWith({ mark, title, model, tag }: { mark: MarkKind; title: string; model: string; tag: string }) {+ return (+ <div className="flex items-center gap-2.5 rounded-[12px] border border-edge-faint bg-surface-card p-3">+ <ProviderMark kind={mark} />+ <div className="min-w-0 flex-1">+ <p className="m-0 truncate font-medium text-content" style={fs(13, 'body')}>+ {title}+ </p>+ <p className="m-0 truncate font-geist text-content-faint" style={fs(11)}>+ {model}+ </p>+ </div>+ <StatusPill>{tag}</StatusPill>+ </div>+ );+}++/** Which connection parsing reads with now, and the way to the other one. */+function ParsingSource({ A, P, onOpenConnection }: { A: AiAdmin; P: Parsing; onOpenConnection: () => void }) {+ const { t } = useTranslation();+ const live = A.instancePays ? A.instance.live : null;+ if (P.ownConnection) {+ const own = OWN_PROVIDERS.find((p) => p.value === P.savedProvider);+ return (+ <div className="flex flex-col gap-2">+ <ReadsWith+ mark={markOf(P.savedProvider)}+ title={own ? t(own.labelKey) : P.savedProvider}+ model={P.savedModel}+ tag={t('admin.addons.ai.parsing.own')}+ />+ <SettingsHint>{t('admin.addons.ai.parsing.ownHint')}</SettingsHint>+ <button+ type="button"+ onClick={() => void P.switchToShared()}+ disabled={P.saving}+ className={`${SETTINGS_BUTTON} self-start`}+ style={fs(12.5, 'body')}+ >+ {t('admin.addons.ai.parsing.useShared')}+ </button>+ </div>+ );+ }+ return (+ <div className="flex flex-col gap-2">+ {live ? (+ <ReadsWith+ mark={live.kind}+ title={A.instance.provider}+ model={live.model}+ tag={t('admin.addons.ai.parsing.sharedTag')}+ />+ ) : (+ <SettingsHint>+ {t(A.policy === 'user' ? 'admin.addons.ai.parsing.perUser' : 'admin.addons.ai.parsing.none')}+ </SettingsHint>+ )}+ <div className="flex flex-wrap gap-2" style={fs(12.5, 'body')}>+ {!live && A.policy !== 'user' && (+ <button type="button" onClick={onOpenConnection} className={SETTINGS_BUTTON_PRIMARY}>+ {t('admin.addons.ai.tab.connection')}+ </button>+ )}+ {!P.formOpen && (+ <button type="button" onClick={P.startOwn} className={SETTINGS_BUTTON}>+ {t('admin.addons.ai.parsing.setupOwn')}+ </button>+ )}+ </div>+ </div>+ );+}++/** The models on the local server to pick from, and the recommended ones to pull. */+function LocalModels({ P }: { P: Parsing }) {+ const { t } = useTranslation();+ return (+ <div className={PANEL}>+ <div className="flex items-center gap-2">+ <span+ className="min-w-0 flex-1 truncate font-geist font-bold uppercase tracking-[.08em] text-content-faint"+ style={fs(9.5)}+ >+ {t('admin.addons.ai.parsing.installed')}+ </span>+ <button+ type="button"+ onClick={() => void P.loadModels()}+ disabled={P.loadingModels}+ className="inline-flex flex-none items-center gap-1 rounded-full px-2 py-0.5 font-medium text-content-muted hover:bg-surface-card hover:text-content disabled:cursor-default disabled:opacity-60"+ style={fs(11.5, 'body')}+ >+ <RefreshCw size={11} strokeWidth={2.2} className={P.loadingModels ? 'animate-spin' : undefined} />+ {t('admin.addons.ai.parsing.refresh')}+ </button>+ </div>+ {P.modelsErr && (+ <p className="m-0 break-words text-danger" style={fs(11.5)}>+ {P.modelsErr}+ </p>+ )}+ {!P.modelsErr && P.installed.length === 0 && !P.loadingModels && (+ <SettingsHint>{t('admin.addons.ai.parsing.noModels')}</SettingsHint>+ )}+ {P.installed.length > 0 && (+ <div className="flex flex-wrap gap-1.5">+ {P.installed.map((name) => (+ <button+ type="button"+ key={name}+ title={name}+ onClick={() => P.setModel(name)}+ aria-pressed={P.model === name}+ className={`max-w-full truncate rounded-full px-2.5 py-[3px] font-geist font-medium transition-colors ${P.model === name ? 'bg-accent text-accent-text' : 'border border-edge bg-surface-card text-content-muted hover:text-content'}`}+ style={fs(11.5)}+ >+ {name}+ </button>+ ))}+ </div>+ )}+ <div className="flex flex-col gap-2 border-t border-edge-faint pt-2.5">+ <span className="font-geist font-bold uppercase tracking-[.08em] text-content-faint" style={fs(9.5)}>+ {t('admin.addons.ai.parsing.pullTitle')}+ </span>+ {RECOMMENDED_MODELS.map((m) => {+ const here = P.isInstalled(m.id);+ const chosen = P.model === m.id;+ return (+ <div key={m.id} className="min-w-0" title={m.note}>+ <div className="flex items-center gap-2">+ <span className="min-w-0 flex-1 truncate font-medium text-content" style={fs(12.5, 'body')}>+ {m.label}+ </span>+ {m.recommended && <StatusPill tone="success">{t('assistant.model.recommended')}</StatusPill>}+ {here ? (+ <button+ type="button"+ onClick={() => P.setModel(m.id)}+ disabled={chosen}+ className={SETTINGS_BUTTON}+ style={fs(12, 'body')}+ >+ {chosen ? <Check size={13} strokeWidth={2.4} /> : null}+ {t(chosen ? 'admin.addons.ai.parsing.selected' : 'admin.addons.ai.parsing.use')}+ </button>+ ) : (+ <button+ type="button"+ onClick={() => void P.pull(m.id)}+ disabled={!!P.pulling}+ className={SETTINGS_BUTTON_PRIMARY}+ style={fs(12, 'body')}+ >+ {t(P.pulling === m.id ? 'admin.addons.ai.parsing.pulling' : 'admin.addons.ai.parsing.pull')}+ </button>+ )}+ </div>+ {P.pulling === m.id && (+ <div className="mt-2">+ <div className="h-1.5 w-full overflow-hidden rounded-full bg-surface-tertiary">+ <div+ className="h-full rounded-full bg-accent transition-[width] duration-200"+ style={{ width: `${P.pullPct}%` }}+ />+ </div>+ <div className="mt-1 truncate font-geist tabular-nums text-content-faint" style={fs(11)}>+ {P.pullStatus}+ {P.pullPct ? ` ${P.pullPct}%` : ''}+ </div>+ </div>+ )}+ </div>+ );+ })}+ </div>+ </div>+ );+}++/** A connection of parsing's own: the provider as tiles, its address, key and model. */+function OwnConnectionForm({ P }: { P: Parsing }) {+ const { t } = useTranslation();+ const fieldId = useId();+ return (+ <div className={`flex flex-col gap-3 ${P.saving ? 'opacity-60' : ''}`}>+ <div+ role="radiogroup"+ aria-label={t('settings.aiParsing.provider')}+ className="grid grid-cols-3 gap-2 max-sm:grid-cols-1"+ >+ {OWN_PROVIDERS.map((p) => {+ const on = P.provider === p.value;+ return (+ <button+ key={p.value}+ type="button"+ role="radio"+ aria-checked={on}+ onClick={() => P.setProvider(p.value)}+ className={`flex min-w-0 items-center gap-2 rounded-[12px] border p-2.5 text-start transition-colors ${on ? 'border-[color:var(--text-primary)] bg-surface-card shadow-sm' : 'border-edge bg-surface-card hover:border-edge-secondary'}`}+ >+ <ProviderMark kind={p.mark} size="sm" />+ <span+ className={`min-w-0 flex-1 truncate font-medium ${on ? 'text-content' : 'text-content-muted'}`}+ style={fs(12.5, 'body')}+ >+ {t(p.labelKey)}+ </span>+ </button>+ );+ })}+ </div>+ <EditorField+ label={t('settings.aiParsing.baseUrl')}+ htmlFor={`${fieldId}-url`}+ hint={t('settings.aiParsing.baseUrlHint')}+ >+ <input+ id={`${fieldId}-url`}+ type="url"+ autoComplete="off"+ className={INPUT}+ value={P.baseUrl}+ onChange={(e) => P.setBaseUrl(e.target.value)}+ onBlur={() => void P.loadModels()}+ placeholder={P.baseUrlPlaceholder}+ />+ </EditorField>+ <EditorField+ label={t('settings.aiParsing.apiKey')}+ htmlFor={`${fieldId}-key`}+ hint={P.provider === 'anthropic' ? ANTHROPIC_HINT : t('settings.aiParsing.apiKeyHint')}+ >+ <input+ id={`${fieldId}-key`}+ type="password"+ autoComplete="off"+ className={INPUT}+ value={P.apiKey}+ onChange={(e) => P.setApiKey(e.target.value)}+ placeholder={+ P.apiKey === MASKED ? MASKED : P.provider === 'local' ? t('admin.addons.ai.parsing.apiKeyOptional') : ''+ }+ />+ </EditorField>+ <EditorField label={t('settings.aiParsing.model')} htmlFor={`${fieldId}-model`}>+ <input+ id={`${fieldId}-model`}+ autoComplete="off"+ className={`${INPUT} font-geist`}+ value={P.model}+ onChange={(e) => P.setModel(e.target.value)}+ />+ </EditorField>+ {P.provider === 'local' && <LocalModels P={P} />}+ <div className="flex justify-end gap-2" style={fs(13, 'body')}>+ {!P.ownConnection && (+ <button type="button" onClick={P.cancelOwn} disabled={P.saving} className={SETTINGS_BUTTON}>+ {t('common.cancel')}+ </button>+ )}+ <button+ type="button"+ onClick={() => void P.save()}+ disabled={P.saving || !P.model.trim()}+ className={SETTINGS_BUTTON_PRIMARY}+ >+ {t(P.saving ? 'common.saving' : 'common.save')}+ </button>+ </div>+ </div>+ );+}++/**+ * AI parsing in the AI dialog: which connection reads the bookings (the shared+ * one, or one of its own an older install kept), a connection of its own when+ * wanted, and whether the model reads images. Each part saves on its own.+ */+export default function ParsingSettings({+ addon,+ A,+ onOpenConnection,+}: {+ addon: Addon;+ A: AiAdmin;+ onOpenConnection: () => void;+}): React.ReactElement {+ const { t } = useTranslation();+ const P = useLlmParsingConfig(addon);+ const visionOptions = LLM_VISION_MODES.map((value) => ({ value, label: t(`admin.addons.llm.vision.${value}`) }));+ const local =+ (P.ownConnection ? P.savedProvider : A.instance.live?.kind === 'custom' ? 'local' : 'cloud') === 'local';+ return (+ <div className="flex flex-col gap-5">+ <DialogSection label={t('admin.addons.ai.parsing.readsWith')}>+ <ParsingSource A={A} P={P} onOpenConnection={onOpenConnection} />+ </DialogSection>+ {P.formOpen && (+ <DialogSection label={t('admin.addons.ai.parsing.own')}>+ <OwnConnectionForm P={P} />+ </DialogSection>+ )}+ <DialogSection label={t('settings.aiParsing.multimodal')}>+ <Segmented<LlmVision>+ label={t('settings.aiParsing.multimodal')}+ value={P.vision}+ onChange={(v) => P.setVision(asLlmVision(v))}+ options={visionOptions}+ fill+ />+ <div className="mt-1.5">+ <SettingsHint>+ {t(local ? 'admin.addons.llm.vision.hintLocal' : 'admin.addons.llm.vision.hintCloud')}+ </SettingsHint>+ </div>+ </DialogSection>+ </div>+ );+}diff --git a/client/src/components/Admin/addons/aiAddons.ts b/client/src/components/Admin/addons/aiAddons.tsnew file mode 100644index 000000000..2e597bad1--- /dev/null+++ b/client/src/components/Admin/addons/aiAddons.ts@@ -0,0 +1,32 @@+import { Cable, type LucideIcon, MessagesSquare, ScanText } from 'lucide-react';+import type { Addon } from './addonModel';++/**+ * The three addons that talk to a language model, shown as one AI tile in the+ * integration column: the assistant in the trip, AI parsing (booking import)+ * and MCP (TREK inside other AI apps). Their ids, rows and settings stay their+ * own; only the page groups them. Assistant and parsing share one connection.+ */+export const AI_ADDON_IDS = ['ai_assistant', 'llm_parsing', 'mcp'] as const;+export type AiAddonId = (typeof AI_ADDON_IDS)[number];++/** Each one's glyph, keyed by id: the icon column of an existing install still holds what it was seeded with. */+export const AI_ADDON_ICONS: Record<AiAddonId, LucideIcon> = {+ ai_assistant: MessagesSquare,+ llm_parsing: ScanText,+ mcp: Cable,+};++export function isAiAddon(addon: Addon): boolean {+ return (AI_ADDON_IDS as readonly string[]).includes(addon.id);+}++/** The AI addons this install has, in the tile's order. */+export function aiAddonsOf(addons: Addon[]): Addon[] {+ return AI_ADDON_IDS.flatMap((id) => addons.find((a) => a.id === id) ?? []);+}++/** Whether the shared connection is used at all: the assistant or AI parsing is on. */+export function usesConnection(addons: Addon[]): boolean {+ return addons.some((a) => (a.id === 'ai_assistant' || a.id === 'llm_parsing') && a.enabled);+}diff --git a/client/src/components/Admin/addons/useAddonManager.test.ts b/client/src/components/Admin/addons/useAddonManager.test.tsindex b150d5e3f..c6bee757c 100644--- a/client/src/components/Admin/addons/useAddonManager.test.ts+++ b/client/src/components/Admin/addons/useAddonManager.test.ts@@ -26,6 +26,8 @@ const ADDONS = [addon('llm_parsing', 'integration', false),addon('immich', 'photo_provider', false),addon('gdrive', 'document_provider'),+ addon('airtrail', 'integration', false),+ addon('mcp', 'integration'),];let loadAddons: ReturnType<typeof vi.fn<() => Promise<void>>>;@@ -60,14 +62,16 @@ function mapSwitch(manager: ReturnType<typeof useAddonManager>, key: 'hiking' |}describe('useAddonManager', () => {- it('FE-HOOK-ADDONMGR-001: loads once and sorts addons into trip, global, integration and the two shelves', async () => {+ it('FE-HOOK-ADDONMGR-001: loads once and sorts addons into trip, global, integration, AI and the two shelves', async () => {const { result, rerender } = await loaded();rerender();expect(adminApi.addons).toHaveBeenCalledTimes(1);const ids = (list: { id?: string; key?: string }[]) => list.map((a) => a.id ?? a.key);expect(ids(result.current.tripAddons)).toEqual(['todo', 'documents']);expect(ids(result.current.globalAddons)).toEqual(['journey']);- expect(ids(result.current.integrationAddons)).toEqual(['llm_parsing']);+ // The AI addons leave the integration list for their own tile, in its order.+ expect(ids(result.current.integrationAddons)).toEqual(['airtrail']);+ expect(ids(result.current.aiAddons)).toEqual(['llm_parsing', 'mcp']);expect(result.current.providerOptions).toEqual([expect.objectContaining({ key: 'immich', label: 'immich', description: 'immich addon', enabled: false }),]);diff --git a/client/src/components/Admin/addons/useAddonManager.ts b/client/src/components/Admin/addons/useAddonManager.tsindex 19c6d5d48..b2080ac4b 100644--- a/client/src/components/Admin/addons/useAddonManager.ts+++ b/client/src/components/Admin/addons/useAddonManager.ts@@ -9,6 +9,7 @@ import { useTranslation } from '../../../i18n';import { useAddonStore } from '../../../store/addonStore';import { useToast } from '../../shared/Toast';import { type Addon, type ProviderOption, isPhotosAddon } from './addonModel';+import { aiAddonsOf, isAiAddon } from './aiAddons';/** A switch under Tours as the server keeps it, read into `set`; `onError` tells the admin it could not be read. */function loadToursFlag(@@ -139,7 +140,9 @@ export function useAddonManager() {const tripAddons = addons.filter((a) => a.type === 'trip' && !isPhotosAddon(a));const globalAddons = addons.filter((a) => a.type === 'global');- const integrationAddons = addons.filter((a) => a.type === 'integration');+ // The AI addons leave the list to sit together on one tile at its head.+ const integrationAddons = addons.filter((a) => a.type === 'integration' && !isAiAddon(a));+ const aiAddons = aiAddonsOf(addons);const providerOptions = addons.filter((a) => a.type === 'photo_provider').map(asOption);// No credential form under these, unlike the photo providers: a document connection// belongs to a trip and is entered there. The admin only decides whether a provider@@ -153,6 +156,7 @@ export function useAddonManager() {tripAddons,globalAddons,integrationAddons,+ aiAddons,providerOptions,documentProviderOptions,toursWanderer,diff --git a/client/src/components/Admin/addons/useAiAddonTile.ts b/client/src/components/Admin/addons/useAiAddonTile.tsnew file mode 100644index 000000000..113bb94e9--- /dev/null+++ b/client/src/components/Admin/addons/useAiAddonTile.ts@@ -0,0 +1,23 @@+import { useState } from 'react';+import { useSearchParams } from 'react-router';+import type { Addon } from './addonModel';+import { usesConnection } from './aiAddons';++/**+ * The AI tile behind both admin shells: its three switches, how many are on,+ * and the settings dialog. The dialog opens by itself when OpenRouter's+ * sign-in returns here (`?ai=openrouter`), since the connection form that+ * finishes it lives inside.+ */+export function useAiAddonTile(aiAddons: Addon[]) {+ const [params] = useSearchParams();+ const [open, setOpen] = useState(() => params.get('ai') === 'openrouter');+ const canSetUp = usesConnection(aiAddons);+ return {+ enabledCount: aiAddons.filter((a) => a.enabled).length,+ canSetUp,+ dialogOpen: open && canSetUp,+ openDialog: () => setOpen(true),+ closeDialog: () => setOpen(false),+ };+}diff --git a/client/src/components/Admin/addons/useLlmParsingConfig.test.ts b/client/src/components/Admin/addons/useLlmParsingConfig.test.tsindex c205c9dc0..11d2029df 100644--- a/client/src/components/Admin/addons/useLlmParsingConfig.test.ts+++ b/client/src/components/Admin/addons/useLlmParsingConfig.test.ts@@ -5,10 +5,14 @@ import { adminApi } from '../../../api/client';import { type Addon, DEFAULT_OLLAMA_URL, MASKED } from './addonModel';import { useLlmParsingConfig } from './useLlmParsingConfig';-// FE-HOOK-LLMCFG-001 to FE-HOOK-LLMCFG-011+// FE-HOOK-LLMCFG-001 to FE-HOOK-LLMCFG-013const toast = vi.hoisted(() => ({ success: vi.fn(), error: vi.fn() }));vi.mock('../../shared/Toast', () => ({ useToast: () => toast }));+vi.mock('../../../i18n', () => ({ useTranslation: () => ({ t: (k: string) => k }) }));++/** A local connection of parsing's own, so the form is open and lists the server's models. */+const OWN_LOCAL = { provider: 'local', model: 'm' };function llm(config?: Record<string, unknown>): Addon {return {@@ -45,7 +49,7 @@ describe('useLlmParsingConfig', () => {});it('FE-HOOK-LLMCFG-002: the local provider lists the installed models from the default URL', async () => {- const { result } = renderHook(() => useLlmParsingConfig(llm()));+ const { result } = renderHook(() => useLlmParsingConfig(llm(OWN_LOCAL)));await waitFor(() => expect(result.current.installed).toEqual(['qwen3.5:4b']));expect(adminApi.llmLocalModels).toHaveBeenCalledWith(DEFAULT_OLLAMA_URL);expect(result.current.isInstalled('qwen3.5:4b')).toBe(true);@@ -54,7 +58,7 @@ describe('useLlmParsingConfig', () => {it('FE-HOOK-LLMCFG-003: a cloud provider lists nothing; switched to local it starts from the default, then uses the typed URL', async () => {const { result } = renderHook(() =>- useLlmParsingConfig(llm({ provider: 'openai', baseUrl: ' http://box:11434/v1 ' }))+ useLlmParsingConfig(llm({ provider: 'openai', model: 'gpt', baseUrl: ' http://box:11434/v1 ' })));expect(adminApi.llmLocalModels).not.toHaveBeenCalled();await act(() => result.current.loadModels());@@ -69,13 +73,13 @@ describe('useLlmParsingConfig', () => {it('FE-HOOK-LLMCFG-004: an unreachable server shows its message and empties the list', async () => {vi.mocked(adminApi.llmLocalModels).mockRejectedValue(new Error('ECONNREFUSED'));- const { result } = renderHook(() => useLlmParsingConfig(llm()));+ const { result } = renderHook(() => useLlmParsingConfig(llm(OWN_LOCAL)));await waitFor(() => expect(result.current.modelsErr).toBe('ECONNREFUSED'));expect(result.current.installed).toEqual([]);expect(result.current.loadingModels).toBe(false);vi.mocked(adminApi.llmLocalModels).mockRejectedValue('nope');await act(() => result.current.loadModels());- expect(result.current.modelsErr).toBe('Could not reach the local LLM server');+ expect(result.current.modelsErr).toBe('admin.addons.ai.parsing.unreachable');});it("FE-HOOK-LLMCFG-011: a refused list shows the server's reason, not the status line (#2649)", async () => {@@ -83,7 +87,7 @@ describe('useLlmParsingConfig', () => {response: { status: 502, data: { error: 'Local LLM server rejected the API key (401)' } },});vi.mocked(adminApi.llmLocalModels).mockRejectedValue(refused);- const { result } = renderHook(() => useLlmParsingConfig(llm({ provider: 'local' })));+ const { result } = renderHook(() => useLlmParsingConfig(llm(OWN_LOCAL)));await waitFor(() => expect(result.current.modelsErr).toBe('Local LLM server rejected the API key (401)'));});@@ -94,14 +98,14 @@ describe('useLlmParsingConfig', () => {progress = onProgress;return new Promise<void>((r) => (finish = r));});- const { result } = renderHook(() => useLlmParsingConfig(llm()));+ const { result } = renderHook(() => useLlmParsingConfig(llm(OWN_LOCAL)));await waitFor(() => expect(result.current.installed).toEqual(['qwen3.5:4b']));let pending!: Promise<void>;act(() => {pending = result.current.pull('qwen3.5:4b');});expect(result.current.pulling).toBe('qwen3.5:4b');- expect(result.current.pullStatus).toBe('starting…');+ expect(result.current.pullStatus).toBe('admin.addons.ai.parsing.pulling');act(() => progress({ status: 'downloading', total: 200, completed: 50 }));expect(result.current.pullStatus).toBe('downloading');expect(result.current.pullPct).toBe(25);@@ -109,7 +113,7 @@ describe('useLlmParsingConfig', () => {finish();await pending;});- expect(toast.success).toHaveBeenCalledWith('Model pulled');+ expect(toast.success).toHaveBeenCalledWith('admin.addons.ai.parsing.pulled');expect(result.current.model).toBe('qwen3.5:4b');expect(adminApi.llmLocalModels).toHaveBeenCalledTimes(2);expect(result.current.pulling).toBeNull();@@ -136,7 +140,7 @@ describe('useLlmParsingConfig', () => {expect(toast.error).toHaveBeenCalledWith('manifest unknown');vi.mocked(adminApi.llmLocalPull).mockRejectedValue('nope');await act(() => result.current.pull('x'));- expect(toast.error).toHaveBeenLastCalledWith('Pull failed');+ expect(toast.error).toHaveBeenLastCalledWith('admin.addons.ai.parsing.pullFailed');expect(result.current.pulling).toBeNull();});@@ -148,18 +152,16 @@ describe('useLlmParsingConfig', () => {expect(adminApi.updateAddon).toHaveBeenCalledWith('llm_parsing', {config: { provider: 'openai', model: 'gpt-4o', baseUrl: 'https://o/v1', apiKey: MASKED, vision: 'auto' },});- expect(toast.success).toHaveBeenCalledWith('Saved');+ expect(toast.success).toHaveBeenCalledWith('settings.aiParsing.toast.saved');expect(result.current.saving).toBe(false);});it("FE-HOOK-LLMCFG-009: switching to Anthropic drops the previous provider's base URL", async () => {const { result } = renderHook(() => useLlmParsingConfig(llm({ provider: 'openai', baseUrl: 'https://o/v1' })));- act(() => {- result.current.setProvider('anthropic');- result.current.setVision('off');- });+ await act(async () => result.current.setVision('off'));+ act(() => result.current.setProvider('anthropic'));await act(() => result.current.save());- expect(vi.mocked(adminApi.updateAddon).mock.calls[0][1]).toEqual({+ expect(vi.mocked(adminApi.updateAddon).mock.calls.at(-1)?.[1]).toEqual({config: { provider: 'anthropic', model: '', baseUrl: '', apiKey: '', vision: 'off' },});});@@ -212,7 +214,35 @@ describe('useLlmParsingConfig', () => {vi.mocked(adminApi.updateAddon).mockRejectedValue(new Error('x'));const { result } = renderHook(() => useLlmParsingConfig(llm({ provider: 'openai' })));await act(() => result.current.save());- expect(toast.error).toHaveBeenCalledWith('Failed to save');+ expect(toast.error).toHaveBeenCalledWith('settings.aiParsing.toast.saveError');expect(result.current.saving).toBe(false);});++ it('FE-HOOK-LLMCFG-012: without its own connection the form stays shut and asks the server nothing until opened', async () => {+ const { result } = renderHook(() => useLlmParsingConfig(llm({ vision: 'on' })));+ expect(result.current.ownConnection).toBe(false);+ expect(result.current.formOpen).toBe(false);+ expect(adminApi.llmLocalModels).not.toHaveBeenCalled();+ act(() => result.current.startOwn());+ expect(result.current.formOpen).toBe(true);+ await waitFor(() => expect(adminApi.llmLocalModels).toHaveBeenCalledWith(DEFAULT_OLLAMA_URL));+ // The vision setting alone is saved without a connection.+ await act(async () => result.current.setVision('off'));+ expect(adminApi.updateAddon).toHaveBeenLastCalledWith('llm_parsing', { config: { vision: 'off' } });+ act(() => result.current.cancelOwn());+ expect(result.current.formOpen).toBe(false);+ });++ it('FE-HOOK-LLMCFG-013: going back to the shared connection drops the own one and keeps the vision setting', async () => {+ const { result } = renderHook(() =>+ useLlmParsingConfig(llm({ provider: 'anthropic', model: 'claude-x', apiKey: MASKED, vision: 'on' }))+ );+ expect(result.current.ownConnection).toBe(true);+ expect(result.current.savedModel).toBe('claude-x');+ await act(() => result.current.switchToShared());+ expect(adminApi.updateAddon).toHaveBeenCalledWith('llm_parsing', { config: { vision: 'on' } });+ expect(result.current.ownConnection).toBe(false);+ expect(result.current.formOpen).toBe(false);+ expect(result.current.model).toBe('');+ });});diff --git a/client/src/components/Admin/addons/useLlmParsingConfig.ts b/client/src/components/Admin/addons/useLlmParsingConfig.tsindex 0e1b9d731..099651c31 100644--- a/client/src/components/Admin/addons/useLlmParsingConfig.ts+++ b/client/src/components/Admin/addons/useLlmParsingConfig.ts@@ -2,24 +2,47 @@ import { type LlmVision, asLlmVision } from '@trek/shared';import { useEffect, useEffectEvent, useState } from 'react';import { adminApi } from '../../../api/client';+import { useTranslation } from '../../../i18n';import { getApiErrorMessage } from '../../../types';import { useToast } from '../../shared/Toast';import { type Addon, DEFAULT_OLLAMA_URL, LLM_BASE_URL_PLACEHOLDER } from './addonModel';+/** What AI parsing keeps in its addon config: a connection of its own (or none) and the vision setting. */+interface SavedParsing {+ provider: string;+ model: string;+ baseUrl: string;+ apiKey: string;+ vision: LlmVision;+}++function savedOf(cfg: Record<string, unknown>): SavedParsing {+ return {+ provider: typeof cfg.provider === 'string' ? cfg.provider : '',+ model: typeof cfg.model === 'string' ? cfg.model : '',+ baseUrl: typeof cfg.baseUrl === 'string' ? cfg.baseUrl : '',+ apiKey: typeof cfg.apiKey === 'string' ? cfg.apiKey : '',+ vision: asLlmVision(cfg.vision),+ };+}+/**- * Instance-wide AI-parsing config behind both admin shells. When set, it applies to the- * whole instance and overrides per-user config (see server llmConfig.ts). The API key is- * masked on read; an unchanged mask is treated as a no-op by the server. For the local- * provider it also lists the installed Ollama models and can pull the recommended ones.+ * AI parsing's admin settings behind both admin shells. Parsing reads with the+ * AI connection the assistant runs on unless the instance keeps one of its own+ * here; an install set up before the two shared one keeps its own until the+ * admin switches it over. The API key is masked on read and an unchanged mask+ * keeps the stored key. For a local server it lists the installed Ollama models+ * and pulls the recommended ones.*/export function useLlmParsingConfig(addon: Addon) {+ const { t } = useTranslation();const toast = useToast();- const cfg = addon.config ?? {};- const [provider, setProviderState] = useState<string>((cfg.provider as string) ?? 'local');- const [model, setModel] = useState<string>((cfg.model as string) ?? '');- const [baseUrl, setBaseUrl] = useState<string>((cfg.baseUrl as string) ?? '');- const [apiKey, setApiKey] = useState<string>((cfg.apiKey as string) ?? '');- const [vision, setVision] = useState<LlmVision>(asLlmVision(cfg.vision));+ const [saved, setSaved] = useState<SavedParsing>(() => savedOf(addon.config ?? {}));+ const [editing, setEditing] = useState(false);+ const [provider, setProviderState] = useState<string>(saved.provider || 'local');+ const [model, setModel] = useState<string>(saved.model);+ const [baseUrl, setBaseUrl] = useState<string>(saved.baseUrl);+ const [apiKey, setApiKey] = useState<string>(saved.apiKey);const [saving, setSaving] = useState(false);// Local-provider model management.@@ -30,6 +53,10 @@ export function useLlmParsingConfig(addon: Addon) {const [pullPct, setPullPct] = useState(0);const [pullStatus, setPullStatus] = useState('');+ /** A connection of its own, which wins over the shared one. */+ const ownConnection = !!(saved.provider && saved.model);+ const formOpen = ownConnection || editing;+/*** A different provider never inherits the last one's endpoint: an Ollama address* left in the field would quietly receive the OpenAI or Anthropic key. Back on the@@ -37,7 +64,7 @@ export function useLlmParsingConfig(addon: Addon) {* keep an address the admin typed for it (#2655); empty means the provider default.*/const setProvider = (next: string) => {- if (next !== provider) setBaseUrl(next === cfg.provider ? ((cfg.baseUrl as string) ?? '') : '');+ if (next !== provider) setBaseUrl(next === saved.provider ? saved.baseUrl : '');setProviderState(next);};const baseUrlPlaceholder = LLM_BASE_URL_PLACEHOLDER[provider] ?? LLM_BASE_URL_PLACEHOLDER.openai;@@ -54,38 +81,38 @@ export function useLlmParsingConfig(addon: Addon) {setInstalled(res.models.map((m) => m.name));} catch (e: unknown) {// The server says why (unreachable, key refused); axios' own status line does not.- setModelsErr(getApiErrorMessage(e, 'Could not reach the local LLM server'));+ setModelsErr(getApiErrorMessage(e, t('admin.addons.ai.parsing.unreachable')));setInstalled([]);} finally {setLoadingModels(false);}};- // Load installed models when the local provider is active. Only a provider change- // triggers it; the base URL is read as it stands then (its own blur reloads).+ // Load installed models while the form shows the local provider. Only a provider+ // change (or opening the form) triggers it; the base URL's own blur reloads.const loadModelsForProvider = useEffectEvent(() => {- if (provider === 'local') void loadModels();+ if (formOpen && provider === 'local') void loadModels();});useEffect(() => {loadModelsForProvider();- }, [provider]);+ }, [provider, formOpen]);const pull = async (id: string) => {if (pulling) return;setPulling(id);setPullPct(0);- setPullStatus('starting…');+ setPullStatus(t('admin.addons.ai.parsing.pulling'));try {await adminApi.llmLocalPull(effectiveUrl, id, (p) => {if (p.error) throw new Error(p.error);if (p.status) setPullStatus(p.status);if (p.total && p.completed != null) setPullPct(Math.round((p.completed / p.total) * 100));});- toast.success('Model pulled');+ toast.success(t('admin.addons.ai.parsing.pulled'));setModel(id);await loadModels();} catch (e: unknown) {- toast.error(e instanceof Error ? e.message : 'Pull failed');+ toast.error(e instanceof Error && e.message ? e.message : t('admin.addons.ai.parsing.pullFailed'));} finally {setPulling(null);setPullPct(0);@@ -93,27 +120,52 @@ export function useLlmParsingConfig(addon: Addon) {}};- const save = async () => {+ /** Writes the config; the stored key stays as long as the mask is sent in its place. */+ const write = async (next: SavedParsing, config: Record<string, unknown>): Promise<boolean> => {setSaving(true);try {- // Send the masked sentinel unchanged so the server keeps the stored key.- await adminApi.updateAddon(addon.id, {- config: {- provider,- model: model.trim(),- baseUrl: baseUrl.trim(),- apiKey,- vision,- },- });- toast.success('Saved');+ await adminApi.updateAddon(addon.id, { config });+ setSaved(next);+ toast.success(t('settings.aiParsing.toast.saved'));+ return true;} catch {- toast.error('Failed to save');+ toast.error(t('settings.aiParsing.toast.saveError'));+ return false;} finally {setSaving(false);}};+ const ownConfig = (s: SavedParsing) => ({+ provider: s.provider,+ model: s.model,+ baseUrl: s.baseUrl,+ apiKey: s.apiKey,+ });++ const save = async () => {+ const next: SavedParsing = { provider, model: model.trim(), baseUrl: baseUrl.trim(), apiKey, vision: saved.vision };+ if (await write(next, { ...ownConfig(next), vision: next.vision })) setEditing(false);+ };++ /** Back on the shared connection: the own one and its key are dropped, the vision setting stays. */+ const switchToShared = async () => {+ const next: SavedParsing = { provider: '', model: '', baseUrl: '', apiKey: '', vision: saved.vision };+ if (await write(next, { vision: next.vision })) {+ setEditing(false);+ setProviderState('local');+ setModel('');+ setBaseUrl('');+ setApiKey('');+ }+ };++ /** Saved at once, with the connection as it was saved: a draft in the form is not sent along. */+ const setVision = (value: LlmVision) => {+ const next = { ...saved, vision: value };+ void write(next, ownConnection ? { ...ownConfig(saved), vision: value } : { vision: value });+ };+return {provider,setProvider,@@ -124,9 +176,16 @@ export function useLlmParsingConfig(addon: Addon) {baseUrlPlaceholder,apiKey,setApiKey,- vision,+ vision: saved.vision,setVision,saving,+ ownConnection,+ savedProvider: saved.provider,+ savedModel: saved.model,+ formOpen,+ startOwn: () => setEditing(true),+ cancelOwn: () => setEditing(false),+ switchToShared,installed,modelsErr,loadingModels,diff --git a/client/src/components/Assistant/AssistantChangeCard.test.tsx b/client/src/components/Assistant/AssistantChangeCard.test.tsxindex 76168b567..db833721c 100644--- a/client/src/components/Assistant/AssistantChangeCard.test.tsx+++ b/client/src/components/Assistant/AssistantChangeCard.test.tsx@@ -226,10 +226,13 @@ describe('AssistantChangeCard: on the map', () => {expect(row).toHaveClass('bg-surface-hover');});- it('FE-AI-CARD-009: the days a waiting card touches read as a band, with the schedule folded away', () => {+ it('FE-AI-CARD-009: the days a waiting card touches read as named stops, with the schedule folded away', () => {plannerHere();renderCard([onTheMap('c1', 'Pantheon')]);expect(screen.getByText('Rome')).toBeInTheDocument();+ // Folded, each stop is a chip with its name, not a blank block behind a tooltip.+ expect(screen.getByText('Louvre')).toBeInTheDocument();+ expect(screen.getAllByText('Pantheon')).toHaveLength(2);expect(screen.queryByText('New')).toBeNull();fireEvent.click(screen.getByRole('button', { name: 'Show schedule' }));diff --git a/client/src/components/Assistant/AssistantChangeCard.tsx b/client/src/components/Assistant/AssistantChangeCard.tsxindex a6a0ee181..007e16b88 100644--- a/client/src/components/Assistant/AssistantChangeCard.tsx+++ b/client/src/components/Assistant/AssistantChangeCard.tsx@@ -25,14 +25,16 @@ import { blockKeyOf } from '../../store/assistantMapModel';import { chatOf, useAssistantStore } from '../../store/assistantStore';import { useTripStore } from '../../store/tripStore';import ToggleSwitch from '../Settings/ToggleSwitch';-import { Tooltip } from '../shared/Tooltip';import { useToast } from '../shared/Toast';+import { Tooltip } from '../shared/Tooltip';import AssistantCompareSwitch from './AssistantCompareSwitch';import AssistantDayBand from './AssistantDayBand';+import AssistantWeekOverview from './AssistantWeekOverview';import { CHANGE_LABELS, type ChangeItem, type ChangeState, undoLeftMs } from './assistantParts';import { useAssistantView } from './assistantViewContext';import { changePoints, type DayChange } from './dayAfterModel';import { useChangeHover } from './useChangeHover';+import { useWeekDays } from './useWeekDays';/*** The changes the assistant proposes in one go, as one card in plain words:@@ -235,7 +237,11 @@ function Receipt({</Tooltip>)}<Tooltip label={statusLabel} placement="top">- <span role="img" aria-label={statusLabel} className={`flex h-7 w-5 items-center justify-center ${receipt.tone}`}>+ <span+ role="img"+ aria-label={statusLabel}+ className={`flex h-7 w-5 items-center justify-center ${receipt.tone}`}+ ><Icon size={15} strokeWidth={2.4} className={item.state === 'applying' ? 'animate-spin' : ''} /></span></Tooltip>@@ -392,6 +398,21 @@ export default function AssistantChangeCard({ items }: { items: ChangeItem[] })const changes = useMemo(() => dayChangesOf(items, excluded), [items, excluded]);const undoable = items.filter((i) => undoableNow(i, undone, now)).map((i) => i.toolCallId);+ const week = useWeekDays(pending);+ const [showAll, setShowAll] = useState(false);+ // A plan over a week reads from its grid; the single changes wait behind one line.+ const folded = week.length > 0 && !showAll;++ const toggleDay = (ids: readonly string[], include: boolean) =>+ setExcluded((prev) => {+ const next = new Set(prev);+ for (const id of ids) {+ if (include) next.delete(id);+ else next.add(id);+ }+ return next;+ });+const toggle = (toolCallId: string) =>setExcluded((prev) => {const next = new Set(prev);@@ -420,18 +441,32 @@ export default function AssistantChangeCard({ items }: { items: ChangeItem[] })count={items.length}actions={<HeadActions open={open} items={items} changes={changes} undoable={undoable} />}/>- {open && <AssistantDayBand changes={changes} />}+ {open && week.length > 0 && (+ <AssistantWeekOverview days={week} excluded={excluded} disabled={isRunning} onToggleDay={toggleDay} />+ )}+ {open && !folded && <AssistantDayBand changes={changes} />}+ {folded && (+ <button+ type="button"+ onClick={() => setShowAll(true)}+ className="mb-1 w-full rounded-lg px-2 py-1.5 text-center text-caption font-medium text-content-muted transition-colors hover:bg-surface-hover hover:text-content"+ >+ {t('assistant.week.showAll', { count: pending.length })}+ </button>+ )}<div className={open ? 'divide-y divide-edge-faint' : ''}>{items.map((item) =>item.state === 'pending' ? (- <PendingRow- key={item.toolCallId}- item={item}- excluded={excluded.has(item.toolCallId)}- withSwitch={pending.length > 1}- disabled={isRunning}- onToggle={() => toggle(item.toolCallId)}- />+ folded ? null : (+ <PendingRow+ key={item.toolCallId}+ item={item}+ excluded={excluded.has(item.toolCallId)}+ withSwitch={pending.length > 1}+ disabled={isRunning}+ onToggle={() => toggle(item.toolCallId)}+ />+ )) : (<Receiptkey={item.toolCallId}diff --git a/client/src/components/Assistant/AssistantComposer.tsx b/client/src/components/Assistant/AssistantComposer.tsxindex bb6a9b693..9de71068d 100644--- a/client/src/components/Assistant/AssistantComposer.tsx+++ b/client/src/components/Assistant/AssistantComposer.tsx@@ -111,7 +111,7 @@ export default function AssistantComposer({ tripId, tripTitle }: { tripId: numbeonPaste={(e) => {if (e.clipboardData.files.length > 0 && take(e.clipboardData.files)) e.preventDefault();}}- className="max-h-48 min-h-[36px] flex-1 resize-none bg-transparent px-1.5 py-1.5 text-body text-content outline-none placeholder:text-content-faint disabled:cursor-not-allowed"+ className="max-h-48 min-h-[36px] flex-1 resize-none bg-transparent px-1.5 py-1.5 text-body text-content outline-none placeholder:text-content-faint disabled:cursor-not-allowed dark:bg-transparent"/><AuiIf condition={(s) => s.thread.isRunning}><ComposerPrimitive.Canceldiff --git a/client/src/components/Assistant/AssistantDayBand.tsx b/client/src/components/Assistant/AssistantDayBand.tsxindex 96345afe9..df1a5f791 100644--- a/client/src/components/Assistant/AssistantDayBand.tsx+++ b/client/src/components/Assistant/AssistantDayBand.tsx@@ -1,4 +1,4 @@-import { ChevronDown, TriangleAlert } from 'lucide-react';+import { ChevronDown, CircleCheck, TriangleAlert } from 'lucide-react';import { useMemo, useState } from 'react';import { useShallow } from 'zustand/react/shallow';@@ -7,38 +7,49 @@ import { useTripStore } from '../../store/tripStore';import { dayLabel } from '../../utils/dayLabel';import { Tooltip } from '../shared/Tooltip';import { useAssistantView } from './assistantViewContext';-import { buildDayAfter, changedDays, type DayAfter, type DayChange, type TimelineStop } from './dayAfterModel';+import {+ buildDayAfter,+ changedDays,+ type DayAfter,+ type DayChange,+ dayIssues,+ stopIssue,+ type TimelineStop,+} from './dayAfterModel';import { useChangeHover } from './useChangeHover';/**- * The days a waiting card touches, as they would read once it ran: one thin- * band per day with a block per stop, so a glance shows where the suggestion- * lands among the rest. The details (times, the way between stops, free time,- * a clash) stay folded away until asked for. Two days at most; the rest are- * counted. Shown only while the planner holds this trip, since the day plans- * come from it.+ * The days a waiting card touches, as they would read once it ran: per day its+ * date and its stops in order as small named chips, so a glance shows where the+ * suggestion lands among the rest. The details (times, the way between stops,+ * free time, a clash) stay folded away until asked for. Two days at most; the+ * rest are counted. Shown only while the planner holds this trip, since the day+ * plans come from it.*/-/** Days drawn as a band; the rest are counted. */+/** Days shown; the rest are counted. */const MAX_DAYS = 2;+/** Stops shown as chips on a day; the rest are counted. */+const MAX_CHIPS = 6;-const SEGMENT: Record<TimelineStop['status'], string> = {- kept: 'bg-surface-secondary',- new: 'border border-dashed border-success bg-success-soft',- removed: 'border border-edge-faint opacity-50',+const CHIP: Record<TimelineStop['status'], string> = {+ kept: 'border-transparent bg-surface-secondary text-content-muted',+ new: 'border-dashed border-success bg-success-soft text-content',+ removed: 'border-transparent text-content-faint line-through',};-function Segment({ stop }: { stop: TimelineStop }) {+/** One stop of the day, named; the change it belongs to lights up with it. */+function StopChip({ stop }: { stop: TimelineStop }) {const { tripId } = useAssistantView();const { lit, handlers } = useChangeHover(tripId, stop.toolCallId);- const clash = stop.lead?.overlapsWith ? 'ring-1 ring-inset ring-danger' : '';+ const clash = stop.lead?.overlapsWith ? 'border-danger' : stopIssue(stop) ? 'border-warning' : '';return (- <Tooltip label={stop.name} placement="top">- <span- {...(stop.toolCallId ? handlers : {})}- className={`h-full min-w-[6px] flex-1 rounded-sm transition-shadow ${SEGMENT[stop.status]} ${clash} ${lit ? 'ring-2 ring-inset ring-accent' : ''}`}- />- </Tooltip>+ <span+ {...(stop.toolCallId ? handlers : {})}+ className={`inline-flex max-w-[11rem] items-center rounded-full border px-2 py-0.5 text-caption transition-colors ${CHIP[stop.status]} ${clash} ${lit ? 'bg-surface-hover' : ''}`}+ >+ <bdi className="truncate">{stop.name}</bdi>+ </span>);}@@ -47,13 +58,19 @@ function Lead({ stop, timed }: { stop: TimelineStop; timed: boolean }) {const lead = stop.lead;if (!lead) return null;const travel = lead.travelMinutes !== null && lead.travelMinutes > 0;- if (!travel && lead.freeMinutes === null && !lead.overlapsWith) return null;+ if (!travel && lead.freeMinutes === null && !lead.overlapsWith && lead.shortBy === null) return null;return (<liclassName={`flex flex-wrap items-center gap-x-2 text-caption text-content-faint ${timed ? 'ps-[3.25rem]' : 'ps-1'}`}>{travel && <span>{t('assistant.change.timeline.travel', { count: lead.travelMinutes ?? 0 })}</span>}{lead.freeMinutes !== null && <span>{t('assistant.change.timeline.gap', { count: lead.freeMinutes })}</span>}+ {lead.shortBy !== null && (+ <span className="inline-flex items-center gap-1 font-medium text-warning">+ <TriangleAlert size={11} aria-hidden="true" className="flex-shrink-0" />+ {t('assistant.change.timeline.tight', { count: lead.shortBy })}+ </span>+ )}{lead.overlapsWith && (<span className="inline-flex items-center gap-1 text-content-muted"><TriangleAlert size={11} aria-hidden="true" className="flex-shrink-0 text-danger" />@@ -91,16 +108,20 @@ function StopLine({ stop, timed }: { stop: TimelineStop; timed: boolean }) {function DayRow({ day, label, open }: { day: DayAfter; label: string; open: boolean }) {const timed = day.stops.some((s) => s.time !== null);+ const chips = day.stops.slice(0, MAX_CHIPS);return (<div>- <div className="flex items-center gap-2">- <bdi className="w-16 flex-shrink-0 truncate text-caption text-content-muted">{label}</bdi>- <div className="flex h-6 min-w-0 flex-1 gap-0.5 overflow-hidden" aria-hidden="true">- {day.stops.map((stop) => (- <Segment key={stop.key} stop={stop} />+ <bdi className="block truncate text-caption font-medium text-content-muted">{label}</bdi>+ {!open && (+ <div className="mt-1 flex min-w-0 flex-wrap items-center gap-1">+ {chips.map((stop) => (+ <StopChip key={stop.key} stop={stop} />))}+ {day.stops.length > MAX_CHIPS && (+ <span className="text-caption tabular-nums text-content-faint">+{day.stops.length - MAX_CHIPS}</span>+ )}</div>- </div>+ )}{open && (<ol className="trek-assistant-enter mt-1 space-y-0.5" aria-label={label}>{day.stops.map((stop) => (@@ -153,6 +174,8 @@ export default function AssistantDayBand({ changes }: { changes: readonly DayChaif (rows.length === 0) return null;const shown = rows.slice(0, MAX_DAYS);+ const issues = rows.reduce((sum, row) => sum + dayIssues(row.after), 0);+ const measured = rows.some((row) => row.after.stops.some((stop) => stop.lead?.travelMinutes != null));const toggleLabel = t(open ? 'assistant.change.timeline.hide' : 'assistant.change.timeline.show');return (<div className="mb-1 flex gap-1.5">@@ -161,18 +184,31 @@ export default function AssistantDayBand({ changes }: { changes: readonly DayCha<DayRow key={after.dayId} day={after} label={label} open={open} />))}{rows.length > MAX_DAYS && (- <p className="ps-[4.5rem] text-caption text-content-faint">+ <p className="text-caption text-content-faint">{t('assistant.change.timeline.moreDays', { count: rows.length - MAX_DAYS })}</p>)}</div>+ {(issues > 0 || measured) && (+ // What the check found, at a glance; a tap opens the schedule that says where.+ <button+ type="button"+ onClick={() => setOpen(true)}+ className={`inline-flex h-6 flex-shrink-0 items-center gap-1 self-start rounded-full px-2 text-caption font-medium transition-colors ${+ issues > 0 ? 'bg-warning-soft text-warning hover:brightness-95' : 'bg-success-soft text-success'+ }`}+ >+ {issues > 0 ? <TriangleAlert size={12} aria-hidden="true" /> : <CircleCheck size={12} aria-hidden="true" />}+ {issues > 0 ? t('assistant.check.issues', { count: issues }) : t('assistant.check.ok')}+ </button>+ )}<Tooltip label={toggleLabel} placement="top"><buttontype="button"onClick={() => setOpen((v) => !v)}aria-expanded={open}aria-label={toggleLabel}- className="flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-md text-content-muted transition-colors hover:bg-surface-hover hover:text-content"+ className="flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full text-content-muted outline-none transition-colors hover:bg-surface-hover hover:text-content focus-visible:ring-2 focus-visible:ring-accent"><ChevronDownsize={14}diff --git a/client/src/components/Assistant/AssistantDayPreview.tsx b/client/src/components/Assistant/AssistantDayPreview.tsxnew file mode 100644index 000000000..6bf7bed6c--- /dev/null+++ b/client/src/components/Assistant/AssistantDayPreview.tsx@@ -0,0 +1,137 @@+import type { AssistantChangeEffect, AssistantMessage } from '@trek/shared';+import { ArrowRightLeft, Minus, Sparkles } from 'lucide-react';+import { useMemo } from 'react';+import { useShallow } from 'zustand/react/shallow';++import { useTranslation } from '../../i18n';+import { changeEffects } from '../../store/assistantMapModel';+import { chatOf, useAssistantStore } from '../../store/assistantStore';+import { useTripStore } from '../../store/tripStore';++/** What a waiting change does to one day, as a row of the preview. */+interface PreviewRow {+ toolCallId: string;+ kind: 'add' | 'in' | 'remove' | 'out';+ name: string;+}++/** The changes no one has decided on yet, by their call. */+function waitingCalls(messages: readonly AssistantMessage[]): Set<string> {+ const ids = new Set<string>();+ for (const m of messages) {+ for (const p of m.parts) {+ if (p.type === 'tool-call' && p.approval && !p.approval.resolution && p.approval.approved === undefined) {+ ids.add(p.toolCallId);+ }+ }+ }+ return ids;+}++function rowOf(+ toolCallId: string,+ effect: AssistantChangeEffect,+ dayId: number,+ nameOf: (id: number | null) => string | null+) {+ const name = effect.place?.name ?? nameOf(effect.placeId);+ if (!name) return null;+ if (effect.dayId === dayId) {+ const kind = effect.kind === 'remove' ? 'remove' : effect.kind === 'move' ? 'in' : 'add';+ return { toolCallId, kind, name } satisfies PreviewRow;+ }+ if (effect.kind === 'move' && effect.fromDayId === dayId)+ return { toolCallId, kind: 'out', name } satisfies PreviewRow;+ return null;+}++const LOOK: Record<PreviewRow['kind'], { icon: typeof Sparkles; row: string; name: string; badgeKey: string }> = {+ add: {+ icon: Sparkles,+ row: 'border-dashed border-accent bg-accent-subtle',+ name: 'text-content',+ badgeKey: 'assistant.preview.suggested',+ },+ in: {+ icon: ArrowRightLeft,+ row: 'border-dashed border-accent bg-accent-subtle',+ name: 'text-content',+ badgeKey: 'assistant.preview.movedHere',+ },+ remove: {+ icon: Minus,+ row: 'border-dashed border-edge',+ name: 'text-content-faint line-through',+ badgeKey: 'assistant.preview.removed',+ },+ out: {+ icon: ArrowRightLeft,+ row: 'border-dashed border-edge',+ name: 'text-content-faint line-through',+ badgeKey: 'assistant.preview.movedAway',+ },+};++/**+ * The assistant's waiting changes inside the day they touch, in the planner's+ * own day list: a place it would add as a dashed row, one it would take off+ * struck through, a move on both of its days. Resting on a row lights the+ * change's pin and card; a click brings the chat forward to decide. Nothing+ * here writes; the change card stays the one place a change is applied.+ */+export default function AssistantDayPreview({ tripId, dayId }: { tripId: number; dayId: number }) {+ const { t } = useTranslation();+ const messages = useAssistantStore((s) => chatOf(s, tripId).messages);+ const hovered = useAssistantStore((s) => (s.mapLink?.tripId === tripId ? s.mapLink.hoveredId : null));+ const { setMapHover, open } = useAssistantStore(useShallow((s) => ({ setMapHover: s.setMapHover, open: s.open })));+ const places = useTripStore((s) => s.places);++ const rows = useMemo(() => {+ const waiting = waitingCalls(messages);+ if (waiting.size === 0) return [];+ const nameOf = (id: number | null) => (id === null ? null : (places.find((p) => p.id === id)?.name ?? null));+ const out: PreviewRow[] = [];+ for (const [toolCallId, effect] of changeEffects(messages)) {+ if (!waiting.has(toolCallId)) continue;+ const row = rowOf(toolCallId, effect, dayId, nameOf);+ if (row) out.push(row);+ }+ return out;+ }, [messages, places, dayId]);++ if (rows.length === 0) return null;+ return (+ <ul className="m-0 flex list-none flex-col gap-1 px-3 pb-2 pt-1" aria-label={t('assistant.preview.title')}>+ {rows.map((row, i) => {+ const look = LOOK[row.kind];+ const Icon = look.icon;+ const lit = hovered === row.toolCallId;+ return (+ <li+ key={`${row.toolCallId}-${row.kind}`}+ className="trek-assistant-enter"+ style={{ animationDelay: `${i * 50}ms` }}+ >+ <button+ type="button"+ onClick={open}+ onMouseEnter={() => setMapHover(tripId, row.toolCallId, 'card')}+ onMouseLeave={() => setMapHover(tripId, null, 'card')}+ className={`flex w-full items-center gap-2 rounded-xl border px-2.5 py-1.5 text-start transition-all ${look.row} ${+ lit ? 'shadow-md ring-2 ring-accent' : 'hover:shadow-sm'+ }`}+ >+ <span className="grid h-6 w-6 flex-shrink-0 place-items-center rounded-lg bg-surface-card text-content-muted shadow-sm">+ <Icon size={12} aria-hidden="true" />+ </span>+ <bdi className={`min-w-0 flex-1 truncate text-caption font-medium ${look.name}`}>{row.name}</bdi>+ <span className="flex-shrink-0 rounded-full bg-surface-card px-2 py-0.5 text-caption text-content-muted shadow-sm">+ {t(look.badgeKey)}+ </span>+ </button>+ </li>+ );+ })}+ </ul>+ );+}diff --git a/client/src/components/Assistant/AssistantFollowUps.tsx b/client/src/components/Assistant/AssistantFollowUps.tsxnew file mode 100644index 000000000..2947a3a83--- /dev/null+++ b/client/src/components/Assistant/AssistantFollowUps.tsx@@ -0,0 +1,58 @@+import type { AssistantMessage } from '@trek/shared';+import { CornerDownRight } from 'lucide-react';++import { useTranslation } from '../../i18n';+import { chatOf, useAssistantStore } from '../../store/assistantStore';+import { useCanDo } from '../../store/permissionsStore';+import { useTripStore } from '../../store/tripStore';+import { followUpsFor } from './assistantFollowUpRules';+import { hasUndecided } from './assistantParts';+import { useAssistantView } from './assistantViewContext';++/** Each chip comes in a moment after the one before it. */+const STAGGER_MS = 60;++/**+ * The next questions under the latest answer, one tap each. Only under the+ * last answer, once it is written, and not while changes wait for a decision:+ * then the cards are what to answer.+ */+export default function AssistantFollowUps({ message }: { message: AssistantMessage }) {+ const { t } = useTranslation();+ const { tripId } = useAssistantView();+ const can = useCanDo();+ const trip = useTripStore((s) => (s.trip?.id === tripId ? s.trip : null));+ const send = useAssistantStore((s) => s.send);+ const shown = useAssistantStore((s) => {+ const chat = chatOf(s, tripId);+ const last = chat.messages[chat.messages.length - 1];+ return !chat.isRunning && !chat.error && last?.id === message.id && !hasUndecided(chat.messages);+ });+ if (!shown) return null;+ const chips = followUpsFor(message, !!trip && can('place_edit', trip));+ if (chips.length === 0) return null;++ return (+ <div role="group" aria-label={t('assistant.followUp.title')} className="flex flex-wrap gap-1.5 pt-0.5">+ {chips.map((chip, i) => {+ const text = t(chip.labelKey);+ return (+ <button+ key={chip.id}+ type="button"+ onClick={() => void send(tripId, text)}+ className="trek-assistant-enter group/chip inline-flex max-w-full items-center gap-1.5 rounded-full bg-surface-card px-3 py-1.5 text-caption font-medium text-content-secondary shadow-sm ring-1 ring-edge-faint transition-all hover:-translate-y-px hover:text-content hover:shadow-md hover:ring-edge active:translate-y-0"+ style={{ animationDelay: `${i * STAGGER_MS}ms` }}+ >+ <CornerDownRight+ size={12}+ aria-hidden="true"+ className="flex-shrink-0 text-content-faint transition-colors group-hover/chip:text-content rtl:-scale-x-100"+ />+ <span className="truncate">{text}</span>+ </button>+ );+ })}+ </div>+ );+}diff --git a/client/src/components/Assistant/AssistantHeader.tsx b/client/src/components/Assistant/AssistantHeader.tsxindex af8284008..e97b13124 100644--- a/client/src/components/Assistant/AssistantHeader.tsx+++ b/client/src/components/Assistant/AssistantHeader.tsx@@ -1,24 +1,28 @@-import { Ellipsis, History, Lightbulb, LightbulbOff, Plus, Settings, Trash2, X } from 'lucide-react';+import { Ellipsis, History, Lightbulb, LightbulbOff, NotebookPen, Plus, Settings, Trash2, X } from 'lucide-react';import { type HTMLAttributes, type MouseEvent, useState } from 'react';import { useNavigate } from 'react-router';import { useTranslation } from '../../i18n';import { PopoverItem } from '../Packing/PackingPopover';import ConfirmDialog from '../shared/ConfirmDialog';-import { NEUTRAL_TINT } from '../shared/DialogShell';import { ContextMenu, useContextMenu } from '../shared/ContextMenu';+import { NEUTRAL_TINT } from '../shared/DialogShell';import Tooltip from '../shared/Tooltip';import { PopoverListPanel } from '../shared/dialogParts';import { usePopoverList } from '../shared/usePopoverList';+import AssistantMemoryDialog from './AssistantMemoryDialog';import { AI_SETTINGS_PATH } from './assistantParts';import { useAssistantHintsSetting } from './useAssistantHints';+import { useAssistantLiveStep } from './useAssistantLiveStep';import type { useAssistantThread } from './useAssistantThread';+import { useTripMemory } from './useTripMemory';// The round, raised buttons of TREK's dialog heads.const ICON_BUTTON ='grid h-7 w-7 place-items-center rounded-full bg-surface-card text-content-muted shadow-sm transition-colors hover:text-content';interface AssistantHeaderProps {+ tripId: number;thread: ReturnType<typeof useAssistantThread>;tripTitle: string;onClose: () => void;@@ -34,8 +38,11 @@ interface AssistantHeaderProps {* keeps the conversation, and an answer being written goes on. The model is not picked here;* that lives in the settings.*/-export default function AssistantHeader({ thread, tripTitle, onClose, dragProps }: AssistantHeaderProps) {+export default function AssistantHeader({ tripId, thread, tripTitle, onClose, dragProps }: AssistantHeaderProps) {const { t, locale } = useTranslation();+ const live = useAssistantLiveStep(tripId);+ const memory = useTripMemory(tripId);+ const [memoryOpen, setMemoryOpen] = useState(false);const navigate = useNavigate();const menu = useContextMenu();const [confirming, setConfirming] = useState(false);@@ -90,9 +97,20 @@ export default function AssistantHeader({ thread, tripTitle, onClose, dragPropsclassName="flex min-w-0 flex-1 cursor-grab touch-none select-none items-center active:cursor-grabbing"><div className="min-w-0 flex-1">- <p className="m-0 truncate font-geist text-caption font-bold uppercase tracking-[.08em] text-content-muted">- {t('assistant.launcher.tooltip')}- </p>+ {thread.isRunning ? (+ // While it works, the line over the title says what it does right now.+ <p role="status" className="m-0 flex min-w-0 items-center gap-1.5 text-caption font-medium">+ <span+ aria-hidden="true"+ className="trek-assistant-pulse h-1.5 w-1.5 flex-shrink-0 rounded-full bg-accent"+ />+ <span className="trek-assistant-shimmer truncate">{live?.text ?? t('assistant.step.working')}</span>+ </p>+ ) : (+ <p className="m-0 truncate font-geist text-caption font-bold uppercase tracking-[.08em] text-content-muted">+ {t('assistant.launcher.tooltip')}+ </p>+ )}<h2 className="m-0 truncate text-body font-bold tracking-[-0.01em] text-content"><bdi>{thread.title ?? tripTitle}</bdi></h2>@@ -104,6 +122,22 @@ export default function AssistantHeader({ thread, tripTitle, onClose, dragPropsonPointerDown={(e) => e.stopPropagation()}onDoubleClick={(e) => e.stopPropagation()}>+ <Tooltip label={t(memory.has ? 'assistant.memory.edit' : 'assistant.memory.title')}>+ <button+ type="button"+ onClick={() => setMemoryOpen(true)}+ aria-label={t('assistant.memory.title')}+ className={`relative ${ICON_BUTTON}`}+ >+ <NotebookPen size={13} aria-hidden="true" />+ {memory.has && (+ <span+ aria-hidden="true"+ className="absolute -end-0.5 -top-0.5 h-2 w-2 rounded-full bg-accent ring-2 ring-[color:var(--bg-elevated)]"+ />+ )}+ </button>+ </Tooltip><Tooltip label={t('assistant.history.open')}><buttonref={history.triggerRef}@@ -167,6 +201,7 @@ export default function AssistantHeader({ thread, tripTitle, onClose, dragProps</PopoverListPanel><ContextMenu menu={menu.menu} onClose={menu.close} />+ {memoryOpen && <AssistantMemoryDialog tripId={tripId} onClose={() => setMemoryOpen(false)} />}<ConfirmDialogisOpen={confirming}onClose={() => setConfirming(false)}diff --git a/client/src/components/Assistant/AssistantMemoryDialog.tsx b/client/src/components/Assistant/AssistantMemoryDialog.tsxnew file mode 100644index 000000000..080aad3f9--- /dev/null+++ b/client/src/components/Assistant/AssistantMemoryDialog.tsx@@ -0,0 +1,112 @@+import { NotebookPen, Plus } from 'lucide-react';+import { useId, useState } from 'react';++import { useTranslation } from '../../i18n';+import {+ DialogButton,+ DialogFooter,+ DialogHeader,+ DialogSection,+ DialogShell,+ DialogTile,+ FooterSpacer,+ NEUTRAL_TINT,+} from '../shared/DialogShell';+import { TEXTAREA } from '../shared/dialogParts';+import { MAX_MEMORY_CHARS, useTripMemory } from './useTripMemory';++/** What travellers most often want minded, one tap to add each. */+const QUICK = ['vegetarian', 'kids', 'budget', 'slow', 'accessible', 'noMuseums'] as const;++/**+ * The trip's notes for the assistant: a few lines it follows in every+ * suggestion on this trip, written once instead of in every question. The+ * common ones are a tap away; the rest is free text.+ */+export default function AssistantMemoryDialog({ tripId, onClose }: { tripId: number; onClose: () => void }) {+ const { t } = useTranslation();+ const labelId = useId();+ const memory = useTripMemory(tripId);+ const [draft, setDraft] = useState(memory.text);+ const [saving, setSaving] = useState(false);++ const add = (line: string) =>+ setDraft((prev) => (prev.includes(line) ? prev : `${prev.trimEnd()}${prev.trim() ? '\n' : ''}${line}`));++ const save = async () => {+ setSaving(true);+ const done = await memory.save(draft);+ setSaving(false);+ if (done) onClose();+ };++ return (+ <DialogShell+ onClose={onClose}+ labelledBy={labelId}+ width="narrow"+ discardGuard={draft}+ header={+ <DialogHeader+ tile={+ <DialogTile>+ <NotebookPen size={20} strokeWidth={2} />+ </DialogTile>+ }+ tint={NEUTRAL_TINT}+ labelId={labelId}+ eyebrow={t('assistant.launcher.tooltip')}+ title={t('assistant.memory.title')}+ sub={t('assistant.memory.sub')}+ subWraps+ onClose={onClose}+ />+ }+ footer={+ <DialogFooter>+ <span className="text-caption tabular-nums text-content-faint">+ {draft.length}/{MAX_MEMORY_CHARS}+ </span>+ <FooterSpacer />+ <DialogButton onClick={onClose}>{t('common.cancel')}</DialogButton>+ <DialogButton variant="primary" disabled={saving} onClick={() => void save()}>+ {t(saving ? 'common.saving' : 'common.save')}+ </DialogButton>+ </DialogFooter>+ }+ >+ <DialogSection label={t('assistant.memory.quick')}>+ <div className="flex flex-wrap gap-1.5">+ {QUICK.map((key, i) => {+ const line = t(`assistant.memory.quick.${key}`);+ const taken = draft.includes(line);+ return (+ <button+ key={key}+ type="button"+ disabled={taken}+ onClick={() => add(line)}+ className="trek-assistant-enter inline-flex items-center gap-1 rounded-full bg-surface-card px-2.5 py-1 text-caption font-medium text-content-secondary shadow-sm ring-1 ring-edge-faint transition-all hover:-translate-y-px hover:text-content hover:shadow-md disabled:translate-y-0 disabled:opacity-40 disabled:shadow-none"+ style={{ animationDelay: `${i * 40}ms` }}+ >+ <Plus size={11} aria-hidden="true" />+ {line}+ </button>+ );+ })}+ </div>+ </DialogSection>+ <DialogSection label={t('assistant.memory.notes')}>+ <textarea+ aria-label={t('assistant.memory.notes')}+ rows={6}+ maxLength={MAX_MEMORY_CHARS}+ value={draft}+ onChange={(e) => setDraft(e.target.value)}+ placeholder={t('assistant.memory.placeholder')}+ className={TEXTAREA}+ />+ </DialogSection>+ </DialogShell>+ );+}diff --git a/client/src/components/Assistant/AssistantMessage.tsx b/client/src/components/Assistant/AssistantMessage.tsxindex e0a99a8ea..a16a67283 100644--- a/client/src/components/Assistant/AssistantMessage.tsx+++ b/client/src/components/Assistant/AssistantMessage.tsx@@ -7,6 +7,7 @@ import { useTranslation } from '../../i18n';import { chatOf, useAssistantStore } from '../../store/assistantStore';import { Tooltip } from '../shared/Tooltip';import AssistantChangeCard from './AssistantChangeCard';+import AssistantFollowUps from './AssistantFollowUps';import AssistantMarkdown from './AssistantMarkdown';import AssistantMentionText from './AssistantMentionText';import AssistantPlaceStrip from './AssistantPlaceStrip';@@ -74,7 +75,9 @@ function AttachmentChip({ name, size }: { name: string; size: number }) {</span><span className="flex min-w-0 flex-col"><bdi className="truncate text-body font-medium text-content">{name}</bdi>- <span className="text-caption tabular-nums text-content-muted">{kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${kb} KB`}</span>+ <span className="text-caption tabular-nums text-content-muted">+ {kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${kb} KB`}+ </span></span></span>);@@ -149,6 +152,7 @@ function Answer({ message }: { message: StoredMessage }) {</div>)}{share.canShare && <AssistantShareDialog share={share} />}+ <AssistantFollowUps message={message} /></MessagePrimitive.Root>);}diff --git a/client/src/components/Assistant/AssistantPlaceCard.tsx b/client/src/components/Assistant/AssistantPlaceCard.tsxindex fff39c19c..63c14f1c1 100644--- a/client/src/components/Assistant/AssistantPlaceCard.tsx+++ b/client/src/components/Assistant/AssistantPlaceCard.tsx@@ -1,9 +1,8 @@import type { AssistantFoundPlace } from '@trek/shared';-import { Check, ChevronDown, LoaderCircle, MapPin, Plus } from 'lucide-react';+import { Check, ChevronDown, LoaderCircle, MapPin, Plus, Star } from 'lucide-react';import { type ReactNode, useRef } from 'react';import { useTranslation } from '../../i18n';-import { PopoverItem } from '../Packing/PackingPopover';import { getCategoryIcon } from '../shared/categoryIcons';import { PopoverListPanel } from '../shared/dialogParts';import { Tooltip } from '../shared/Tooltip';@@ -22,7 +21,7 @@ function SuggestButton({ place, strip, tall }: { place: AssistantFoundPlace; strconst { t } = useTranslation();const { days, focusDay, disabled, blockedKey, adding } = strip;const list = usePopoverList(focusDay ? days.findIndex((d) => d.id === focusDay.id) : 0, {- estimatedHeight: Math.min(320, days.length * 34 + 8),+ estimatedHeight: Math.ceil(days.length / 7) * 44 + 16,});const height = tall ? 'h-10' : 'h-7';const busy = adding === place.ref;@@ -91,26 +90,44 @@ function SuggestButton({ place, strip, tall }: { place: AssistantFoundPlace; str) : (buttons)}- <PopoverListPanel list={list} label={t('assistant.place.pickDay')} className="max-w-[16rem]">- {days.map((day) => (- <PopoverItem- key={day.id}- icon={null}- label={day.label}- active={day.id === focusDay?.id}- onClick={() => pick(day.id)}- />- ))}+ {/* A grid of day tiles, not a list: a month-long trip still fits in a few rows. */}+ <PopoverListPanel list={list} label={t('assistant.place.pickDay')} className="w-[15.5rem] p-2">+ <div className="grid grid-cols-7 gap-1">+ {days.map((day) => {+ const current = day.id === focusDay?.id;+ return (+ <Tooltip key={day.id} label={day.label} placement="top">+ <button+ type="button"+ onClick={() => pick(day.id)}+ aria-label={day.label}+ aria-pressed={current}+ className={`flex h-10 flex-col items-center justify-center rounded-lg leading-none outline-none transition-colors focus-visible:ring-2 focus-visible:ring-accent ${+ current ? 'bg-accent text-accent-text' : 'text-content hover:bg-surface-hover'+ }`}+ >+ <span className="text-body font-semibold tabular-nums">{day.n}</span>+ {day.weekday && (+ <span className={`mt-0.5 text-caption ${current ? 'text-accent-text' : 'text-content-faint'}`}>+ {day.weekday}+ </span>+ )}+ </button>+ </Tooltip>+ );+ })}+ </div></PopoverListPanel></>);}/**- * One place a search found, as a small card: its picture from TREK's photo- * proxy (or its category's icon), its name, the category it most likely- * belongs in, whether it is open now while the trip runs, how far it is from- * the last stop of the day in focus, and one way on: "+ Day 3" for a new+ * One place a search found, as a card: its picture from TREK's photo proxy+ * with the category it most likely belongs in on it (or that category's icon+ * on its colour), its name, address and rating, whether it is open now while+ * the trip runs, how far it is from the last stop of the day in focus, and one+ * way on: "+ Day 3" for a new* place, "On map" for one the trip has. A click on the card shows it on the* map, and resting the pointer on it pins it there for a moment.*/@@ -156,8 +173,8 @@ export default function AssistantPlaceCard({return (<liref={ref}- className={`flex flex-shrink-0 snap-start flex-col overflow-hidden rounded-xl border border-edge-faint bg-surface-card ${- density === 'compact' ? 'w-[168px]' : 'w-[200px]'+ className={`group/card flex flex-shrink-0 snap-start flex-col overflow-hidden rounded-2xl border border-edge-faint bg-surface-card shadow-sm transition-shadow hover:shadow-md ${+ density === 'compact' ? 'w-[188px]' : 'w-[220px]'}`}onMouseEnter={() => strip.hover(place)}onMouseLeave={() => strip.hover(null)}@@ -169,36 +186,62 @@ export default function AssistantPlaceCard({onBlur={() => strip.hover(null)}className="flex flex-col text-start outline-none focus-visible:bg-surface-hover">- <span className="flex h-[72px] w-full items-center justify-center overflow-hidden bg-surface-secondary">+ <span+ className="relative block h-24 w-full overflow-hidden bg-surface-secondary"+ // Without a picture the category's own colour washes the space, data from the trip.+ style={+ photo || !category+ ? undefined+ : { background: `color-mix(in srgb, ${category.color} 16%, var(--bg-secondary))` }+ }+ >{photo ? (- <img src={photo} alt="" decoding="async" loading="lazy" className="h-full w-full object-cover" />+ <img+ src={photo}+ alt=""+ decoding="async"+ loading="lazy"+ className="h-full w-full object-cover transition-transform duration-300 group-hover/card:scale-[1.04]"+ />) : (- // The category's own colour, data from the trip; only the small icon wears it.- <Icon size={20} aria-hidden="true" style={{ color: category?.color ?? 'var(--text-faint)' }} />+ <span className="grid h-full w-full place-items-center">+ <Icon size={30} aria-hidden="true" style={{ color: category?.color ?? 'var(--text-faint)' }} />+ </span>+ )}+ {category && photo && (+ <span className="absolute start-2 top-2 inline-flex max-w-[75%] items-center gap-1 rounded-full bg-surface-card px-2 py-0.5 text-caption font-medium text-content shadow-sm">+ <Icon size={11} aria-hidden="true" className="flex-shrink-0" style={{ color: category.color }} />+ <bdi className="truncate">{category.name}</bdi>+ </span>+ )}+ {place.openNow !== null && (+ <span className="absolute bottom-2 end-2 inline-flex items-center gap-1 rounded-full bg-surface-card px-2 py-0.5 text-caption font-medium text-content-muted shadow-sm">+ <span+ aria-hidden="true"+ className={`h-1.5 w-1.5 rounded-full ${place.openNow ? 'bg-success' : 'bg-[color:var(--text-faint)]'}`}+ />+ {t(place.openNow ? 'assistant.place.openNow' : 'assistant.place.closed')}+ </span>)}</span>- <span className="flex min-w-0 flex-col gap-0.5 px-2.5 pt-2">- <bdi className="truncate text-body font-semibold text-content">{place.name}</bdi>- {(category || place.openNow !== null) && (- <span className="flex min-w-0 items-center gap-2 text-caption text-content-muted">- {category && <bdi className="min-w-0 truncate">{category.name}</bdi>}- {place.openNow === true && (- <span className="inline-flex flex-shrink-0 items-center gap-1">- <span aria-hidden="true" className="h-1.5 w-1.5 rounded-full bg-success" />- {t('assistant.place.openNow')}+ <span className="flex min-w-0 flex-col gap-1 px-3 pt-2.5">+ <bdi className="line-clamp-2 text-body font-semibold leading-snug text-content">{place.name}</bdi>+ {category && !photo && <bdi className="truncate text-caption text-content-muted">{category.name}</bdi>}+ {place.address && <bdi className="truncate text-caption text-content-muted">{place.address}</bdi>}+ {(place.rating !== null || distance) && (+ <span className="flex min-w-0 items-center gap-2 text-caption text-content-faint">+ {place.rating !== null && (+ <span className="inline-flex flex-shrink-0 items-center gap-0.5 font-medium text-content-muted">+ <Star size={11} aria-hidden="true" className="fill-current text-warning" />+ {place.rating.toFixed(1)}</span>)}- {place.openNow === false && <span className="flex-shrink-0">{t('assistant.place.closed')}</span>}- </span>- )}- {distance && (- <span className="truncate text-caption text-content-faint">- {t('assistant.place.fromPrev', { distance })}+ {distance && <span className="truncate">{t('assistant.place.fromPrev', { distance })}</span>}</span>)}</span></button>- <div className="mt-auto flex min-w-0 px-2.5 pb-2.5 pt-2">{action}</div>+ <div className="mt-auto flex min-w-0 px-3 pb-3 pt-2.5">{action}</div></li>);}diff --git a/client/src/components/Assistant/AssistantPlaceStrip.test.tsx b/client/src/components/Assistant/AssistantPlaceStrip.test.tsxindex dfe5581ed..5ebd4a292 100644--- a/client/src/components/Assistant/AssistantPlaceStrip.test.tsx+++ b/client/src/components/Assistant/AssistantPlaceStrip.test.tsx@@ -8,7 +8,6 @@import type { AssistantFoundPlace, AssistantMessage, AssistantPlaces } from '@trek/shared';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import { fireEvent, render, screen, waitFor } from '../../../tests/helpers/render';import {buildAssignment,buildCategory,@@ -17,6 +16,7 @@ import {buildTrip,buildUser,} from '../../../tests/helpers/factories';+import { fireEvent, render, screen, waitFor } from '../../../tests/helpers/render';import { fetchPhoto } from '../../services/photoService';import { chatOf, useAssistantStore } from '../../store/assistantStore';import { useAuthStore } from '../../store/authStore';@@ -119,12 +119,18 @@ describe('AssistantPlaceStrip', () => {expect(screen.getByText('1.2 km from the previous stop')).toBeInTheDocument();});- it('FE-AI-PLACES-002: shows six cards and counts the rest on a tile', () => {+ it('FE-AI-PLACES-002: shows every card it was sent and counts what the server left out on a tile', () => {seed();const list = Array.from({ length: 8 }, (_, i) => place(`s1:${i}`));renderStrip({ toolCallId: 's1', places: list, more: 4 });- expect(screen.getAllByRole('button', { name: /^Add to/ })).toHaveLength(6);- expect(screen.getByText('6 more')).toBeInTheDocument();+ expect(screen.getAllByRole('button', { name: /^Add to/ })).toHaveLength(8);+ expect(screen.getByText('4 more')).toBeInTheDocument();+ });++ it('FE-AI-PLACES-009: a place known only by its position shows its category, never a photo of the area', () => {+ seed();+ renderStrip({ toolCallId: 's1', places: [place('s1:0', { photoKey: 'coords:41.889000,12.470000' })], more: 0 });+ expect(fetchPhoto).not.toHaveBeenCalled();});it('FE-AI-PLACES-003: a picture only ever comes from the photo proxy', async () => {diff --git a/client/src/components/Assistant/AssistantPlaceStrip.tsx b/client/src/components/Assistant/AssistantPlaceStrip.tsxindex 0cdf0c60e..a80c4b988 100644--- a/client/src/components/Assistant/AssistantPlaceStrip.tsx+++ b/client/src/components/Assistant/AssistantPlaceStrip.tsx@@ -3,16 +3,18 @@ import { ChevronLeft, ChevronRight } from 'lucide-react';import { useCallback, useEffect, useRef, useState } from 'react';import { useTranslation } from '../../i18n';+import { prefersReducedMotion } from '../../utils/reducedMotion';import AssistantPlaceCard from './AssistantPlaceCard';import { suggestedFromStrip } from './assistantParts';import { useAssistantView } from './assistantViewContext';import { useAssistantPlaceStrip } from './useAssistantPlaceStrip';-/** Cards the strip shows; the rest are counted on the tile at its end. */-const SHOWN = 6;+/** Cards the strip shows, every one the server sends; what it left out is counted on the tile at its end. */+const SHOWN = 20;+// In the strip's head, never over a card: a press that ends a pixel off still lands on the arrow.const ARROW =- 'absolute top-[52px] z-10 hidden h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full border border-edge-faint bg-surface-card text-content-secondary shadow-dropdown hover:text-content group-hover:flex';+ 'grid h-7 w-7 place-items-center rounded-full bg-surface-card text-content-secondary shadow-sm ring-1 ring-edge-faint transition-colors hover:text-content disabled:cursor-default disabled:opacity-40 disabled:hover:text-content-secondary';/** How far the strip has scrolled from either end, with the reading direction in mind. */function edgesOf(el: HTMLElement): { start: boolean; end: boolean } {@@ -24,8 +26,9 @@ function edgesOf(el: HTMLElement): { start: boolean; end: boolean } {/*** The places a search found, as one row of cards to swipe or scroll through:* the next card peeks in, so the row says it goes on, and the edges fade- * where there is more. On the desktop two arrows show on hover while the row- * overflows. At most six cards, then a tile counting the rest.+ * where there is more. On the desktop a head over the row names it and holds+ * two arrows that move it by whole cards, off while that way is the end. Every card the step found, then a+ * tile counting what the server left out.*/export default function AssistantPlaceStrip({ found, message }: { found: AssistantPlaces; message: AssistantMessage }) {const { t } = useTranslation();@@ -55,22 +58,63 @@ export default function AssistantPlaceStrip({ found, message }: { found: Assistaconst { hover } = strip;useEffect(() => () => hover(null), [hover]);- /** Scrolls by most of a view towards the start (-1) or the end (1) of the row. */+ /**+ * Scrolls by as many whole cards as the view holds, towards the start (-1)+ * or the end (1), so the row lands on a card edge instead of fighting its+ * snap points half way; smoothly, unless motion is turned down.+ */const page = (towards: -1 | 1) => {const el = listRef.current;- if (!el) return;+ const card = el?.firstElementChild as HTMLElement | null;+ if (!el || !card) return;+ const gap = Number.parseFloat(getComputedStyle(el).columnGap) || 0;+ const step = card.offsetWidth + gap;+ const cards = Math.max(1, Math.floor((el.clientWidth - 32) / step));const rtl = getComputedStyle(el).direction === 'rtl';- el.scrollBy((rtl ? -towards : towards) * el.clientWidth * 0.8, 0);+ el.scrollBy({+ left: (rtl ? -towards : towards) * cards * step,+ behavior: prefersReducedMotion() ? 'auto' : 'smooth',+ });};+ const total = found.places.length + found.more;return (- <section aria-label={t('assistant.place.strip')} className="group relative -mx-4">+ <section aria-label={t('assistant.place.strip')} className="-mx-4">+ {variant === 'window' && (fade.start || fade.end) && (+ // The cards are reachable by Tab; the arrows are for the pointer only.+ <div className="mb-1.5 flex items-center gap-2 px-4">+ <span className="min-w-0 flex-1 truncate text-caption font-medium text-content-muted">+ {t('assistant.place.strip')}+ <span className="ms-1.5 tabular-nums text-content-faint">{total}</span>+ </span>+ <button+ type="button"+ tabIndex={-1}+ aria-hidden="true"+ disabled={!fade.start}+ onClick={() => page(-1)}+ className={ARROW}+ >+ <ChevronLeft size={15} className="rtl:-scale-x-100" />+ </button>+ <button+ type="button"+ tabIndex={-1}+ aria-hidden="true"+ disabled={!fade.end}+ onClick={() => page(1)}+ className={ARROW}+ >+ <ChevronRight size={15} className="rtl:-scale-x-100" />+ </button>+ </div>+ )}<ulref={listRef}onScroll={measure}data-fade-start={fade.start || undefined}data-fade-end={fade.end || undefined}- className="trek-assistant-strip flex snap-x snap-mandatory scroll-px-4 gap-2 overflow-x-auto px-4 pb-1"+ className="trek-assistant-strip flex snap-x snap-mandatory scroll-px-4 gap-2.5 overflow-x-auto overscroll-x-contain px-4 pb-2 pt-0.5">{found.places.slice(0, SHOWN).map((place) => (<AssistantPlaceCard@@ -81,32 +125,11 @@ export default function AssistantPlaceStrip({ found, message }: { found: Assista/>))}{rest > 0 && (- <li className="flex w-24 flex-shrink-0 snap-start items-center justify-center rounded-xl border border-dashed border-edge-faint px-2 text-center text-caption text-content-muted">+ <li className="flex w-24 flex-shrink-0 snap-start items-center justify-center rounded-2xl border border-dashed border-edge-faint px-2 text-center text-caption text-content-muted">{t('assistant.place.more', { count: rest })}</li>)}</ul>- {variant === 'window' && (- // The cards are reachable by Tab; the arrows are for the pointer only.- <>- {fade.start && (- <button- type="button"- tabIndex={-1}- aria-hidden="true"- onClick={() => page(-1)}- className={`${ARROW} start-2`}- >- <ChevronLeft size={15} className="rtl:-scale-x-100" />- </button>- )}- {fade.end && (- <button type="button" tabIndex={-1} aria-hidden="true" onClick={() => page(1)} className={`${ARROW} end-2`}>- <ChevronRight size={15} className="rtl:-scale-x-100" />- </button>- )}- </>- )}</section>);}diff --git a/client/src/components/Assistant/AssistantPowerParts.test.tsx b/client/src/components/Assistant/AssistantPowerParts.test.tsxnew file mode 100644index 000000000..694b28be6--- /dev/null+++ b/client/src/components/Assistant/AssistantPowerParts.test.tsx@@ -0,0 +1,257 @@+/**+ * FE-AI-POWER-001 to FE-AI-POWER-010+ *+ * The parts that tie the chat into the planner: the next questions under an+ * answer, the waiting changes inside the day list, the week grid of a plan+ * over several days, the context menu rows, the trip notes and the part of the+ * map a question carries.+ */+import { act, renderHook } from '@testing-library/react';+import type { AssistantChangePreview, AssistantMessage } from '@trek/shared';+import type { ReactNode } from 'react';+import { afterEach, describe, expect, it, vi } from 'vitest';++import { buildDay, buildPlace, buildTrip, buildUser } from '../../../tests/helpers/factories';+import { fireEvent, render, screen } from '../../../tests/helpers/render';+import { chatOf, useAssistantStore } from '../../store/assistantStore';+import { useAuthStore } from '../../store/authStore';+import { useSettingsStore } from '../../store/settingsStore';+import { useTripStore } from '../../store/tripStore';+import { mapViewOf } from '../Map/assistantViewport';+import AssistantDayPreview from './AssistantDayPreview';+import { followUpsFor } from './assistantFollowUpRules';+import AssistantFollowUps from './AssistantFollowUps';+import type { ChangeItem } from './assistantParts';+import { type AssistantView, AssistantViewContext } from './assistantViewContext';+import AssistantWeekOverview from './AssistantWeekOverview';+import { useAssistantMenu } from './useAssistantMenu';+import { useTripMemory } from './useTripMemory';+import { useWeekDays } from './useWeekDays';++const TRIP = 9;+const ASSISTANT = useAssistantStore.getState();+const TRIPS = useTripStore.getState();+const SETTINGS = useSettingsStore.getState();+const AUTH = useAuthStore.getState();++afterEach(() => {+ useAssistantStore.setState(ASSISTANT, true);+ useTripStore.setState(TRIPS, true);+ useSettingsStore.setState(SETTINGS, true);+ useAuthStore.setState(AUTH, true);+});++const view: AssistantView = { tripId: TRIP, variant: 'window' };+const inView = (node: ReactNode) => <AssistantViewContext.Provider value={view}>{node}</AssistantViewContext.Provider>;++function answer(parts: AssistantMessage['parts'], id = 'a1'): AssistantMessage {+ return { id, role: 'assistant', status: 'complete', createdAt: '2026-10-21T08:00:00.000Z', parts };+}++function preview(+ toolCallId: string,+ dayId: number,+ over: Partial<AssistantChangePreview> = {}+): AssistantChangePreview {+ return {+ toolCallId,+ verbKey: 'addPlace',+ subject: 'Place',+ rows: [],+ dayId,+ placeIds: [],+ undoable: true,+ effect: { kind: 'add', dayId, fromDayId: null, placeId: null, assignmentId: null, place: null },+ ...over,+ };+}++function waiting(toolCallId: string, data: AssistantChangePreview): AssistantMessage['parts'] {+ return [+ { type: 'tool-call', toolCallId, toolName: 'create_place', args: {}, approval: { id: toolCallId } },+ { type: 'data-trek-change', data },+ ];+}++function seedChat(messages: AssistantMessage[], extra: Record<string, unknown> = {}) {+ useAssistantStore.setState({+ byTrip: { [TRIP]: { ...chatOf(useAssistantStore.getState(), TRIP), messages, ...extra } },+ });+}++describe('the next questions', () => {+ it('FE-AI-POWER-001: an answer offers what fits what it holds, changes only to someone who may make them', () => {+ const ids = (parts: AssistantMessage['parts'], canEdit = true) =>+ followUpsFor(answer(parts), canEdit).map((f) => f.id);+ expect(ids([{ type: 'data-trek-places', data: { toolCallId: 's', places: [], more: 0 } }])).toContain('cheaper');+ expect(ids([{ type: 'data-trek-change', data: preview('c', 1) }])).toContain('nextDay');+ expect(ids([{ type: 'data-trek-change', data: preview('c', 1) }], false)).toEqual([]);+ expect(ids([{ type: 'text', text: 'Hi' }])).toEqual(['more', 'next']);+ expect(ids([])).toEqual([]);+ });++ it('FE-AI-POWER-002: under the last finished answer a tap sends the question; not while it runs', () => {+ const send = vi.fn(async () => {});+ const last = answer([{ type: 'text', text: 'Done.' }]);+ seedChat([last]);+ useAssistantStore.setState({ send });+ const { rerender } = render(inView(<AssistantFollowUps message={last} />));+ fireEvent.click(screen.getByRole('button', { name: 'Tell me more' }));+ expect(send).toHaveBeenCalledWith(TRIP, 'Tell me more');++ seedChat([last], { isRunning: true });+ rerender(inView(<AssistantFollowUps message={last} />));+ expect(screen.queryByRole('button', { name: 'Tell me more' })).toBeNull();+ });+});++describe('the day list preview', () => {+ it('FE-AI-POWER-003: a waiting add shows dashed on its day, a removal struck, and resting on it lights the change', () => {+ useTripStore.setState({ places: [buildPlace({ id: 5, name: 'Louvre' })] });+ const add = preview('c1', 3, {+ effect: {+ kind: 'add',+ dayId: 3,+ fromDayId: null,+ placeId: null,+ assignmentId: null,+ place: { name: 'Pantheon', lat: 1, lng: 2, categoryId: null },+ },+ });+ const remove = preview('c2', 3, {+ effect: { kind: 'remove', dayId: 3, fromDayId: null, placeId: 5, assignmentId: 50, place: null },+ });+ seedChat([answer([...waiting('c1', add), ...waiting('c2', remove)])]);+ render(<AssistantDayPreview tripId={TRIP} dayId={3} />);+ expect(screen.getByText('Pantheon')).toBeInTheDocument();+ expect(screen.getByText('Louvre')).toHaveClass('line-through');+ fireEvent.mouseEnter(screen.getByText('Pantheon'));+ expect(useAssistantStore.getState().mapLink?.hoveredId).toBe('c1');+ });++ it('FE-AI-POWER-004: nothing shows on another day, or once the change was decided', () => {+ const add = preview('c1', 3, {+ effect: {+ kind: 'add',+ dayId: 3,+ fromDayId: null,+ placeId: null,+ assignmentId: null,+ place: { name: 'Pantheon', lat: 1, lng: 2, categoryId: null },+ },+ });+ seedChat([answer(waiting('c1', add))]);+ const { container } = render(<AssistantDayPreview tripId={TRIP} dayId={4} />);+ expect(container).toBeEmptyDOMElement();+ });+});++describe('the week grid', () => {+ const item = (id: string, dayId: number): ChangeItem => ({+ toolCallId: id,+ preview: preview(id, dayId),+ applied: null,+ state: 'pending',+ });++ it('FE-AI-POWER-005: from three days on the changes group by day, in trip order', () => {+ useTripStore.setState({+ trip: buildTrip({ id: TRIP }),+ days: [+ buildDay({ id: 1, date: '2026-11-02' }),+ buildDay({ id: 2, date: '2026-11-03' }),+ buildDay({ id: 3, date: '2026-11-04' }),+ ],+ });+ const wrapper = ({ children }: { children: ReactNode }) => inView(children);+ const three = renderHook(() => useWeekDays([item('a', 3), item('b', 1), item('c', 2), item('d', 1)]), { wrapper });+ expect(three.result.current.map((d) => [d.n, d.ids])).toEqual([+ [1, ['b', 'd']],+ [2, ['c']],+ [3, ['a']],+ ]);+ const two = renderHook(() => useWeekDays([item('a', 1), item('b', 2)]), { wrapper });+ expect(two.result.current).toEqual([]);+ });++ it('FE-AI-POWER-006: a tap leaves a whole day out or takes it back in', () => {+ const onToggleDay = vi.fn();+ const days = [+ { id: 1, n: 1, weekday: 'Mon', ids: ['a', 'b'] },+ { id: 2, n: 2, weekday: 'Tue', ids: ['c'] },+ ];+ render(<AssistantWeekOverview days={days} excluded={new Set(['c'])} disabled={false} onToggleDay={onToggleDay} />);+ const [mon, tue] = screen.getAllByRole('button');+ expect(mon).toHaveAttribute('aria-pressed', 'true');+ expect(tue).toHaveAttribute('aria-pressed', 'false');+ fireEvent.click(mon);+ expect(onToggleDay).toHaveBeenCalledWith(['a', 'b'], false);+ fireEvent.click(tue);+ expect(onToggleDay).toHaveBeenLastCalledWith(['c'], true);+ });+});++describe('the context menu rows', () => {+ it('FE-AI-POWER-007: none while the assistant cannot run; else they open the chat on the place and ask', () => {+ const send = vi.fn(async () => {});+ const openWith = vi.fn();+ useAssistantStore.setState({ status: null, send, openWith });+ const louvre = buildPlace({ id: 5, name: 'Louvre' });+ const off = renderHook(() => useAssistantMenu(TRIP));+ expect(off.result.current.place(louvre)).toEqual([]);++ useAssistantStore.setState({ status: { available: true } as never });+ const on = renderHook(() => useAssistantMenu(TRIP));+ const rows = on.result.current.place(louvre);+ const alternative = rows.find((r) => 'label' in r && r.label === 'Find an alternative');+ act(() => (alternative && 'onClick' in alternative ? alternative.onClick() : undefined));+ expect(openWith).toHaveBeenCalledWith(TRIP, { placeIds: [5] });+ expect(send).toHaveBeenCalledWith(TRIP, expect.stringContaining('Louvre'));+ expect(on.result.current.day(3).length).toBeGreaterThan(1);+ });+});++describe('the trip notes', () => {+ it('FE-AI-POWER-008: notes are kept per trip, and saving empty ones drops the entry', async () => {+ useAuthStore.setState({ user: buildUser({ id: 1 }) });+ const updateSetting = vi.fn(async () => {});+ useSettingsStore.setState({+ settings: { ...SETTINGS.settings, assistant_memory: { '2': 'Other' } },+ updateSetting,+ });+ const { result } = renderHook(() => useTripMemory(TRIP));+ expect(result.current.has).toBe(false);+ await act(async () => void (await result.current.save(' Vegetarian ')));+ expect(updateSetting).toHaveBeenCalledWith('assistant_memory', { '2': 'Other', [TRIP]: 'Vegetarian' });+ await act(async () => void (await result.current.save(' ')));+ expect(updateSetting).toHaveBeenLastCalledWith('assistant_memory', { '2': 'Other' });+ });+});++describe('the map a question carries', () => {+ it('FE-AI-POWER-009: edges stay on the globe and are rounded to about ten metres', () => {+ expect(mapViewOf({ south: 35.123456, west: -190, north: 35.2, east: 139.987654 })).toEqual({+ south: 35.1235,+ west: -180,+ north: 35.2,+ east: 139.9877,+ });+ });++ it('FE-AI-POWER-010: a question goes out with the map of its own trip in its focus', async () => {+ const send = vi.fn();+ useAssistantStore.setState({ mapView: { tripId: TRIP, view: { south: 1, west: 2, north: 3, east: 4 } } });+ seedChat([]);+ // The request body is built inside the store; read it from the repo call.+ const { assistantRepo } = await import('../../repo/assistantRepo');+ const spy = vi.spyOn(assistantRepo, 'send').mockImplementation(async (_trip, body) => {+ send(body);+ throw new Error('stop');+ });+ await useAssistantStore.getState().send(TRIP, 'What is here?');+ expect(send).toHaveBeenCalledWith(+ expect.objectContaining({ focus: { view: { south: 1, west: 2, north: 3, east: 4 } } })+ );+ spy.mockRestore();+ });+});diff --git a/client/src/components/Assistant/AssistantWeekOverview.tsx b/client/src/components/Assistant/AssistantWeekOverview.tsxnew file mode 100644index 000000000..e1a17a435--- /dev/null+++ b/client/src/components/Assistant/AssistantWeekOverview.tsx@@ -0,0 +1,65 @@+import { Check, Minus } from 'lucide-react';++import { useTranslation } from '../../i18n';+import type { WeekDay } from './useWeekDays';++/**+ * A plan over several days as one grid: a tile per day with how many changes+ * it gets, taken in or left out as a whole with one tap. The single changes+ * stay below it, folded away until asked for.+ */+export default function AssistantWeekOverview({+ days,+ excluded,+ disabled,+ onToggleDay,+}: {+ days: readonly WeekDay[];+ excluded: ReadonlySet<string>;+ disabled: boolean;+ onToggleDay: (ids: readonly string[], include: boolean) => void;+}) {+ const { t } = useTranslation();+ return (+ <div+ role="group"+ aria-label={t('assistant.week.title')}+ className="mb-2 grid gap-1.5"+ style={{ gridTemplateColumns: `repeat(${Math.min(days.length, 7)}, minmax(0, 1fr))` }}+ >+ {days.map((day, i) => {+ const on = day.ids.filter((id) => !excluded.has(id)).length;+ const taken = on > 0;+ return (+ <button+ key={day.id}+ type="button"+ disabled={disabled}+ aria-pressed={taken}+ onClick={() => onToggleDay(day.ids, !taken)}+ className={`trek-assistant-enter group/day relative flex min-w-0 flex-col items-center gap-0.5 rounded-xl border px-1 py-2 transition-all disabled:cursor-default ${+ taken+ ? 'border-accent bg-accent-subtle text-content shadow-sm hover:-translate-y-px hover:shadow-md'+ : 'border-dashed border-edge text-content-faint hover:border-edge-secondary'+ }`}+ style={{ animationDelay: `${i * 40}ms` }}+ >+ <span+ aria-hidden="true"+ className={`absolute end-1 top-1 grid h-3.5 w-3.5 place-items-center rounded-full ${+ taken ? 'bg-accent text-accent-text' : 'bg-surface-tertiary text-content-faint'+ }`}+ >+ {taken ? <Check size={9} strokeWidth={3} /> : <Minus size={9} strokeWidth={3} />}+ </span>+ <span className="text-caption text-content-muted">{day.weekday ?? t('assistant.week.day')}</span>+ <span className="text-subtitle font-bold tabular-nums leading-none">{day.n}</span>+ <span className={`text-caption tabular-nums ${taken ? 'text-content-secondary' : ''}`}>+ {t('assistant.week.changes', { count: taken ? on : day.ids.length })}+ </span>+ </button>+ );+ })}+ </div>+ );+}diff --git a/client/src/components/Assistant/AssistantWindow.tsx b/client/src/components/Assistant/AssistantWindow.tsxindex fe8292372..13f9f2899 100644--- a/client/src/components/Assistant/AssistantWindow.tsx+++ b/client/src/components/Assistant/AssistantWindow.tsx@@ -196,6 +196,7 @@ function ChatWindow({))}<div className="flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl"><AssistantHeader+ tripId={trip.id}thread={thread}tripTitle={trip.title}dragProps={frame.handleProps}diff --git a/client/src/components/Assistant/assistant.css b/client/src/components/Assistant/assistant.cssindex b86341454..fa9158b73 100644--- a/client/src/components/Assistant/assistant.css+++ b/client/src/components/Assistant/assistant.css@@ -168,6 +168,20 @@animation: trek-assistant-busy 1.8s ease-in-out infinite;}+/* The dot beside what the assistant does right now: a soft beat, a halo going out. */+@keyframes trek-assistant-pulse {+ 0% {+ box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);+ }+ 70%,+ 100% {+ box-shadow: 0 0 0 6px transparent;+ }+}+.trek-assistant-pulse {+ animation: trek-assistant-pulse 1.4s ease-out infinite;+}+@media (prefers-reduced-motion: reduce) {.trek-assistant-pop,.trek-assistant-enter {@@ -176,7 +190,8 @@.trek-assistant-settle {transition: none;}- .trek-assistant-busy {+ .trek-assistant-busy,+ .trek-assistant-pulse {animation: none;}.trek-assistant-shimmer {@@ -196,7 +211,8 @@[data-reduce-motion] .trek-assistant-settle {transition: none;}-[data-reduce-motion] .trek-assistant-busy {+[data-reduce-motion] .trek-assistant-busy,+[data-reduce-motion] .trek-assistant-pulse {animation: none;}[data-reduce-motion] .trek-assistant-shimmer {diff --git a/client/src/components/Assistant/assistantFollowUpRules.ts b/client/src/components/Assistant/assistantFollowUpRules.tsnew file mode 100644index 000000000..c876a27ac--- /dev/null+++ b/client/src/components/Assistant/assistantFollowUpRules.ts@@ -0,0 +1,44 @@+import type { AssistantMessage } from '@trek/shared';++/**+ * The next questions an answer suggests, as one tap each: read from what the+ * answer holds, not asked from the model, so they cost nothing and come at+ * once. Places found ask to narrow them, a plan asks to go on, a forecast asks+ * for the other weather. Three at most; the first kind the answer holds wins.+ */++export interface FollowUp {+ id: string;+ labelKey: string;+}++const PLACES: readonly FollowUp[] = [+ { id: 'cheaper', labelKey: 'assistant.followUp.cheaper' },+ { id: 'closer', labelKey: 'assistant.followUp.closer' },+ { id: 'openNow', labelKey: 'assistant.followUp.openNow' },+];++const PLAN: readonly FollowUp[] = [+ { id: 'nextDay', labelKey: 'assistant.followUp.nextDay' },+ { id: 'relaxed', labelKey: 'assistant.followUp.relaxed' },+ { id: 'dinners', labelKey: 'assistant.followUp.dinners' },+];++const WEATHER: readonly FollowUp[] = [+ { id: 'rain', labelKey: 'assistant.followUp.rain' },+ { id: 'sun', labelKey: 'assistant.followUp.sun' },+];++const GENERAL: readonly FollowUp[] = [+ { id: 'more', labelKey: 'assistant.followUp.more' },+ { id: 'next', labelKey: 'assistant.followUp.next' },+];++/** What an answer offers to ask next; changes are offered only to someone who may make them. */+export function followUpsFor(message: AssistantMessage, canEdit: boolean): readonly FollowUp[] {+ const types = new Set(message.parts.map((part) => part.type));+ if (canEdit && (types.has('data-trek-change') || types.has('data-trek-applied'))) return PLAN;+ if (types.has('data-trek-places')) return PLACES;+ if (types.has('data-trek-weather')) return WEATHER;+ return types.has('text') ? GENERAL : [];+}diff --git a/client/src/components/Assistant/assistantModel.ts b/client/src/components/Assistant/assistantModel.tsindex d2638c4cf..e7df76691 100644--- a/client/src/components/Assistant/assistantModel.ts+++ b/client/src/components/Assistant/assistantModel.ts@@ -92,6 +92,10 @@ const ERRORS: Record<AssistantErrorCode, AssistantErrorView> = {messageKey: 'assistant.error.maxSteps',action: { kind: 'continue', labelKey: 'assistant.errorAction.continue' },},+ empty_answer: {+ messageKey: 'assistant.error.emptyAnswer',+ action: { kind: 'continue', labelKey: 'assistant.errorAction.continue' },+ },offline: { messageKey: 'assistant.error.offline', action: null },decide_first: { messageKey: 'assistant.error.decideFirst', action: null },too_many_requests: { messageKey: 'assistant.error.rateLimited', action: null },diff --git a/client/src/components/Assistant/dayAfterModel.test.ts b/client/src/components/Assistant/dayAfterModel.test.tsindex 707517a87..9883fbb16 100644--- a/client/src/components/Assistant/dayAfterModel.test.ts+++ b/client/src/components/Assistant/dayAfterModel.test.ts@@ -1,5 +1,5 @@/**- * FE-AI-DAYAFTER-001 to FE-AI-DAYAFTER-008+ * FE-AI-DAYAFTER-001 to FE-AI-DAYAFTER-009** A day as it would read once a card's waiting changes ran, without React: who* stays, who joins at the end and who leaves, the way between two stops as a@@ -10,7 +10,15 @@ import { describe, expect, it } from 'vitest';import { buildAssignment, buildPlace } from '../../../tests/helpers/factories';import type { AssignmentsMap } from '../../types';-import { buildDayAfter, changedDays, changePoints, type DayChange, minutesOf } from './dayAfterModel';+import {+ buildDayAfter,+ changedDays,+ changePoints,+ type DayChange,+ dayIssues,+ minutesOf,+ stopIssue,+} from './dayAfterModel';// 0.01° of latitude is 1.112 km: with the detour factor that is 19 minutes on foot, 6 by bike.const louvre = buildPlace({ id: 10, name: 'Louvre', lat: 48.0, lng: 2.0, duration_minutes: 60 });@@ -51,7 +59,7 @@ describe('dayAfterModel', () => {]);expect(stops[0]?.lead).toBeNull();// 09:00 plus an hour, 19 minutes on foot, so 161 minutes are left before 13:00.- expect(stops[1]?.lead).toEqual({ travelMinutes: 19, freeMinutes: 161, overlapsWith: null });+ expect(stops[1]?.lead).toEqual({ travelMinutes: 19, freeMinutes: 161, overlapsWith: null, shortBy: null });});it('FE-AI-DAYAFTER-002: a new place joins at the end, named and placed by the change', () => {@@ -59,7 +67,7 @@ describe('dayAfterModel', () => {const { stops } = day(3, [change('c1', pantheon)]);const last = stops[stops.length - 1];expect(last).toMatchObject({ key: 'new:c1', name: 'Pantheon', status: 'new', toolCallId: 'c1', time: null });- expect(last?.lead).toEqual({ travelMinutes: 19, freeMinutes: null, overlapsWith: null });+ expect(last?.lead).toEqual({ travelMinutes: 19, freeMinutes: null, overlapsWith: null, shortBy: null });});it('FE-AI-DAYAFTER-003: a planned place joins by its id; a change with nothing to name it by is left out', () => {@@ -139,4 +147,15 @@ describe('dayAfterModel', () => {[48.02, 2.0],]);});++ it('FE-AI-DAYAFTER-009: a way longer than the time between two stops is too tight, and counts as an issue', () => {+ // Louvre until 10:00, then 19 minutes on foot to Orsay, which starts at 10:10: nine minutes short.+ const tight = plan();+ tight[3] = (tight[3] ?? []).map((a) => (a.id === 101 ? { ...a, assignment_time: '10:10' } : a));+ const after = day(3, [], tight);+ expect(after.stops[1]?.lead).toMatchObject({ travelMinutes: 19, shortBy: 9 });+ expect(after.stops.map(stopIssue)).toEqual([false, true]);+ expect(dayIssues(after)).toBe(1);+ expect(dayIssues(day(3, []))).toBe(0);+ });});diff --git a/client/src/components/Assistant/dayAfterModel.ts b/client/src/components/Assistant/dayAfterModel.tsindex 7d8349932..e22ee6f10 100644--- a/client/src/components/Assistant/dayAfterModel.ts+++ b/client/src/components/Assistant/dayAfterModel.ts@@ -35,6 +35,8 @@ interface StopLead {freeMinutes: number | null;/** The stop before, when the two take the same time. */overlapsWith: string | null;+ /** Minutes the way there is longer than the time between the two; null when it fits or the times do not say. */+ shortBy: number | null;}export interface TimelineStop {@@ -152,10 +154,12 @@ function leadOf(prev: Draft, cur: Draft, defaultMode: string): StopLead {60): null;- if (cur.start === null || prev.end === null) return { travelMinutes, freeMinutes: null, overlapsWith: null };- if (cur.start < prev.end) return { travelMinutes, freeMinutes: null, overlapsWith: prev.stop.name };+ const none = { freeMinutes: null, overlapsWith: null, shortBy: null };+ if (cur.start === null || prev.end === null) return { travelMinutes, ...none };+ if (cur.start < prev.end) return { travelMinutes, ...none, overlapsWith: prev.stop.name };const free = cur.start - prev.end - (travelMinutes ?? 0);- return { travelMinutes, freeMinutes: free >= GAP_MIN_MINUTES ? free : null, overlapsWith: null };+ if (free < 0) return { travelMinutes, ...none, shortBy: -free };+ return { travelMinutes, ...none, freeMinutes: free >= GAP_MIN_MINUTES ? free : null };}/**@@ -230,3 +234,27 @@ export function changedDays(changes: readonly DayChange[]): number[] {}return days;}++/** A leg this long without a time says the day asks a lot of travel. */+const FAR_MINUTES = 60;++/**+ * Whether a day still works once the changes ran: stops that take the same+ * time, a way there longer than the time between two stops, and legs over an+ * hour. Counted over the stops that stay on the day.+ */+export function dayIssues(day: DayAfter): number {+ return day.stops.reduce((sum, stop) => {+ const lead = stop.lead;+ if (stop.status === 'removed' || !lead) return sum;+ const far = lead.travelMinutes !== null && lead.travelMinutes >= FAR_MINUTES;+ return sum + (lead.overlapsWith || lead.shortBy !== null || far ? 1 : 0);+ }, 0);+}++/** Whether a stop is one of those `dayIssues` counts. */+export function stopIssue(stop: TimelineStop): boolean {+ const lead = stop.lead;+ if (stop.status === 'removed' || !lead) return false;+ return !!lead.overlapsWith || lead.shortBy !== null || (lead.travelMinutes ?? 0) >= FAR_MINUTES;+}diff --git a/client/src/components/Assistant/useAssistantMapFollow.ts b/client/src/components/Assistant/useAssistantMapFollow.tsindex 4ddcfd65a..4d8bf8035 100644--- a/client/src/components/Assistant/useAssistantMapFollow.ts+++ b/client/src/components/Assistant/useAssistantMapFollow.ts@@ -2,20 +2,19 @@ import { useTranslation } from '../../i18n';import { useSettingsStore } from '../../store/settingsStore';import { useToast } from '../shared/Toast';-/**- * Whether the trip map follows the assistant: pans to where it searches and- * frames the places it suggests. On unless switched off. Behind the switch in- * both AI settings shells, the desktop section and the phone card.- */-export function useAssistantMapFollow(): { on: boolean; set: (on: boolean) => Promise<void> } {- const on = useSettingsStore((s) => s.settings.assistant_map_follow) !== false;+/** The assistant's own on/off settings; each reads as on unless switched off. */+type AssistantFlag = 'assistant_map_follow' | 'assistant_cost_estimates';++/** One of the assistant's switches, read and saved through the user's settings. */+function useAssistantFlag(key: AssistantFlag): { on: boolean; set: (on: boolean) => Promise<void> } {+ const on = useSettingsStore((s) => s.settings[key]) !== false;const updateSetting = useSettingsStore((s) => s.updateSetting);const { t } = useTranslation();const toast = useToast();const set = async (next: boolean) => {try {- await updateSetting('assistant_map_follow', next);+ await updateSetting(key, next);} catch (e: unknown) {toast.error(e instanceof Error ? e.message : t('common.error'));}@@ -23,3 +22,21 @@ export function useAssistantMapFollow(): { on: boolean; set: (on: boolean) => Prreturn { on, set };}++/**+ * Whether the trip map follows the assistant: pans to where it searches and+ * frames the places it suggests. On unless switched off. Behind the switch in+ * both AI settings shells, the desktop section and the phone card.+ */+export function useAssistantMapFollow() {+ return useAssistantFlag('assistant_map_follow');+}++/**+ * Whether the assistant proposes an estimated budget item along with a place+ * that costs money, as one more change card to apply or leave. On unless+ * switched off; the server reads the same setting.+ */+export function useAssistantCostEstimates() {+ return useAssistantFlag('assistant_cost_estimates');+}diff --git a/client/src/components/Assistant/useAssistantMenu.ts b/client/src/components/Assistant/useAssistantMenu.tsnew file mode 100644index 000000000..27ff244c5--- /dev/null+++ b/client/src/components/Assistant/useAssistantMenu.ts@@ -0,0 +1,70 @@+import type { AssistantFocus } from '@trek/shared';+import { CalendarCheck, CloudRain, type LucideIcon, Shuffle, Sparkles, UtensilsCrossed } from 'lucide-react';++import { useTranslation } from '../../i18n';+import { useAssistantStore } from '../../store/assistantStore';+import type { Place } from '../../types';++/** One row of a context menu, or the line before the assistant's rows. */+type AssistantMenuEntry = { label: string; icon: LucideIcon; onClick: () => void } | { divider: true };++/**+ * The assistant's rows in the planner's context menus, so a question starts+ * where the user already is: a right click on a place asks about it, finds+ * something else in its place, or a restaurant near it; one on a day plans it+ * or makes a plan for rain. Each opens the chat with the place or day as its+ * focus and sends the question at once. Empty while the assistant cannot run+ * for this user, so the menus look as they always did.+ */+export function useAssistantMenu(tripId: number | null) {+ const { t } = useTranslation();+ const available = useAssistantStore((s) => s.status?.available === true);+ const openWith = useAssistantStore((s) => s.openWith);+ const send = useAssistantStore((s) => s.send);+ const on = available && tripId !== null;++ const ask = (focus: AssistantFocus, text?: string) => {+ if (tripId === null) return;+ openWith(tripId, focus);+ if (text) void send(tripId, text);+ };++ const place = (target: Place): AssistantMenuEntry[] => {+ if (!on) return [];+ const focus = { placeIds: [target.id] };+ return [+ { divider: true },+ { label: t('assistant.context.ask'), icon: Sparkles, onClick: () => ask(focus) },+ {+ label: t('assistant.menu.alternative'),+ icon: Shuffle,+ onClick: () => ask(focus, t('assistant.menu.alternativeAsk', { place: target.name })),+ },+ {+ label: t('assistant.menu.foodNearby'),+ icon: UtensilsCrossed,+ onClick: () => ask(focus, t('assistant.menu.foodNearbyAsk', { place: target.name })),+ },+ ];+ };++ const day = (dayId: number): AssistantMenuEntry[] => {+ if (!on) return [];+ const focus = { dayId };+ return [+ { divider: true },+ {+ label: t('assistant.menu.planDay'),+ icon: CalendarCheck,+ onClick: () => ask(focus, t('assistant.menu.planDayAsk')),+ },+ {+ label: t('assistant.menu.rainPlan'),+ icon: CloudRain,+ onClick: () => ask(focus, t('assistant.menu.rainPlanAsk')),+ },+ ];+ };++ return { place, day };+}diff --git a/client/src/components/Assistant/useAssistantPlaceStrip.ts b/client/src/components/Assistant/useAssistantPlaceStrip.tsindex 0c51b6643..b03bbb08b 100644--- a/client/src/components/Assistant/useAssistantPlaceStrip.ts+++ b/client/src/components/Assistant/useAssistantPlaceStrip.ts@@ -22,6 +22,14 @@ interface StripDay {/** Its place in the trip, 1 for the first day: "+ Day 3". */n: number;label: string;+ /** Its weekday, short ("Sat"), for the day grid; null for a day without a date. */+ weekday: string | null;+}++/** The short weekday of a `YYYY-MM-DD` date, read as that calendar day wherever the reader is. */+function weekdayOf(date: string | null | undefined, locale: string): string | null {+ if (!date || !/^\d{4}-\d{2}-\d{2}$/.test(date)) return null;+ return new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' }).format(new Date(`${date}T00:00:00Z`));}/** The trip category a found place most likely belongs in, for its line and its icon. */@@ -89,7 +97,12 @@ export function useAssistantPlaceStrip() {const stripDays = useMemo((): StripDay[] =>- (days ?? []).map((day, index) => ({ id: day.id, n: index + 1, label: dayLabel(day, index, t, locale) })),+ (days ?? []).map((day, index) => ({+ id: day.id,+ n: index + 1,+ label: dayLabel(day, index, t, locale),+ weekday: weekdayOf(day.date, locale),+ })),[days, t, locale]);const focusDay = stripDays.find((d) => d.id === focusDayId) ?? null;diff --git a/client/src/components/Assistant/useFoundPlacePhoto.ts b/client/src/components/Assistant/useFoundPlacePhoto.tsindex 71ad522a9..029536586 100644--- a/client/src/components/Assistant/useFoundPlacePhoto.ts+++ b/client/src/components/Assistant/useFoundPlacePhoto.ts@@ -7,6 +7,16 @@ import { useAuthStore } from '../../store/authStore';/** The only pictures a found place shows: TREK's own photo proxy, never an address from the search. */const PROXY_PREFIX = '/api/maps/place-photo/';+/**+ * A key the proxy can find this very place's photo by. A place known only by+ * its position (`coords:`, what a search of the open map data finds) would get+ * a picture of its surroundings, the same street scene for every restaurant+ * in a district; such a card shows its category instead.+ */+function photoKeyOf(place: AssistantFoundPlace): string | null {+ return place.photoKey && !place.photoKey.startsWith('coords:') ? place.photoKey : null;+}+/** A picture TREK's proxy serves, or null for anything else. */function proxiedPhoto(url: string | null | undefined): string | null {return url?.startsWith(PROXY_PREFIX) ? url : null;@@ -18,11 +28,12 @@ function proxiedPhoto(url: string | null | undefined): string | null {* provider, and a strip holds several. The answer goes through the shared* photo cache and its limit on parallel requests, so a place the planner shows* too is fetched once. Null while it loads, when there is none, when photos- * are off, and for any answer that is not the proxy's own address.+ * are off, for a place known only by its position, and for any answer that is+ * not the proxy's own address.*/export function useFoundPlacePhoto(place: AssistantFoundPlace, ref: RefObject<Element | null>): string | null {const enabled = useAuthStore((s) => s.placesPhotosEnabled);- const key = place.photoKey;+ const key = photoKeyOf(place);const [src, setSrc] = useState<string | null>(() => (key ? proxiedPhoto(getCached(key)?.photoUrl) : null));const [visible, setVisible] = useState(false);diff --git a/client/src/components/Assistant/useTripMemory.ts b/client/src/components/Assistant/useTripMemory.tsnew file mode 100644index 000000000..aa0e5a9fd--- /dev/null+++ b/client/src/components/Assistant/useTripMemory.ts@@ -0,0 +1,38 @@+import { useTranslation } from '../../i18n';+import { useSettingsStore } from '../../store/settingsStore';+import { useToast } from '../shared/Toast';++/** As long as the server reads a trip's notes; more is cut there. */+export const MAX_MEMORY_CHARS = 2_000;++/**+ * What the user keeps for the assistant to mind on one trip ("vegetarian, no+ * museums"): read from and saved to their settings, one entry per trip, so it+ * follows them to every device. Every question on the trip carries it. The+ * same for the window and the phone.+ */+export function useTripMemory(tripId: number) {+ const { t } = useTranslation();+ const toast = useToast();+ const all = useSettingsStore((s) => s.settings.assistant_memory);+ const updateSetting = useSettingsStore((s) => s.updateSetting);+ const text = all?.[String(tripId)] ?? '';++ /** Saves the notes; empty ones are dropped rather than kept as a blank entry. */+ const save = async (next: string): Promise<boolean> => {+ const trimmed = next.trim().slice(0, MAX_MEMORY_CHARS);+ const rest = { ...(all ?? {}) };+ if (trimmed) rest[String(tripId)] = trimmed;+ else delete rest[String(tripId)];+ try {+ await updateSetting('assistant_memory', rest);+ toast.success(t('assistant.memory.saved'));+ return true;+ } catch (e: unknown) {+ toast.error(e instanceof Error ? e.message : t('common.error'));+ return false;+ }+ };++ return { text, has: text.trim().length > 0, save };+}diff --git a/client/src/components/Assistant/useWeekDays.ts b/client/src/components/Assistant/useWeekDays.tsnew file mode 100644index 000000000..61908df74--- /dev/null+++ b/client/src/components/Assistant/useWeekDays.ts@@ -0,0 +1,48 @@+import { useMemo } from 'react';++import { useTranslation } from '../../i18n';+import { useTripStore } from '../../store/tripStore';+import type { ChangeItem } from './assistantParts';+import { useAssistantView } from './assistantViewContext';++/** The day a waiting change lands on: where its effect puts it, else the day its card names. */+function dayOf(item: ChangeItem): number | null {+ return item.preview?.effect?.dayId ?? item.preview?.dayId ?? null;+}++export interface WeekDay {+ id: number;+ n: number;+ weekday: string | null;+ ids: string[];+}++/** A plan this wide reads as a week: the overview shows from three days on. */+const WEEK_FROM_DAYS = 3;++/**+ * The days a card's waiting changes land on, in trip order, each with its+ * changes; empty for a plan narrower than a week view.+ */+export function useWeekDays(pending: readonly ChangeItem[]): WeekDay[] {+ const { locale } = useTranslation();+ const { tripId } = useAssistantView();+ const days = useTripStore((s) => (s.trip?.id === tripId ? s.days : null));+ return useMemo(() => {+ if (!days) return [];+ const byDay = new Map<number, string[]>();+ for (const item of pending) {+ const id = dayOf(item);+ if (id !== null) byDay.set(id, [...(byDay.get(id) ?? []), item.toolCallId]);+ }+ if (byDay.size < WEEK_FROM_DAYS) return [];+ const weekdayOf = (date: string | null | undefined) =>+ date && /^\d{4}-\d{2}-\d{2}$/.test(date)+ ? new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' }).format(new Date(`${date}T00:00:00Z`))+ : null;+ return days.flatMap((day, index) => {+ const ids = byDay.get(day.id);+ return ids ? [{ id: day.id, n: index + 1, weekday: weekdayOf(day.date), ids }] : [];+ });+ }, [days, pending, locale]);+}diff --git a/client/src/components/Map/AssistantMapLeaflet.tsx b/client/src/components/Map/AssistantMapLeaflet.tsxindex e5f0a54b3..26a11d3f0 100644--- a/client/src/components/Map/AssistantMapLeaflet.tsx+++ b/client/src/components/Map/AssistantMapLeaflet.tsx@@ -2,6 +2,7 @@ import type { ViewportPadding } from '../../utils/mapViewport';import { useAssistantMarkerClasses } from './assistantCamera';import { AssistantCameraController } from './AssistantCameraController';import { AssistantGhostLayer } from './AssistantGhostLayer';+import { useReportViewLeaflet } from './assistantViewport';import type { AssistantMapProps } from './mapViewContract';interface AssistantMapLeafletProps {@@ -15,10 +16,12 @@ interface AssistantMapLeafletProps {/*** Everything the assistant does on the Leaflet map, mounted inside the map* container as one child, so MapView only hands its props on: the ghosts,- * the camera, and the pop and pulse on the real pins.+ * the camera, the pop and pulse on the real pins, and the part of the map+ * the assistant is told is on screen.*/export function AssistantMapLeaflet({ assistant, padding, markerEl }: AssistantMapLeafletProps) {useAssistantMarkerClasses(markerEl, assistant.poppedPlaceIds, assistant.assistantPulsePlaceId);+ useReportViewLeaflet();return (<><AssistantGhostLayerdiff --git a/client/src/components/Map/assistantViewport.ts b/client/src/components/Map/assistantViewport.tsnew file mode 100644index 000000000..fb6038b02--- /dev/null+++ b/client/src/components/Map/assistantViewport.ts@@ -0,0 +1,91 @@+import type { AssistantMapView } from '@trek/shared';+import { useEffect } from 'react';+import { useMap } from 'react-leaflet';++import { useAssistantStore } from '../../store/assistantStore';+import { useTripStore } from '../../store/tripStore';++/**+ * The part of the planner's map on screen, told to the assistant after every+ * move, so a question about "here" needs no place named. Both renderers report+ * through this module; the assistant sends it with the next question only for+ * the trip it was taken on.+ */++interface Edges {+ south: number;+ west: number;+ north: number;+ east: number;+}++const clamp = (value: number, limit: number) => Math.max(-limit, Math.min(limit, value));+const round = (value: number) => Math.round(value * 1e4) / 1e4;++/** The edges as the contract takes them: inside the globe (a wrapped map runs past ±180) and to about ten metres. */+export function mapViewOf(edges: Edges): AssistantMapView {+ return {+ south: round(clamp(edges.south, 90)),+ west: round(clamp(edges.west, 180)),+ north: round(clamp(edges.north, 90)),+ east: round(clamp(edges.east, 180)),+ };+}++function report(tripId: number | null, edges: Edges | null): void {+ const set = useAssistantStore.getState().setMapView;+ // A map without a size yet (hidden, or still laying out) has no edges to speak of.+ const usable = edges && Object.values(edges).every(Number.isFinite) && edges.north > edges.south;+ set(tripId !== null && usable ? { tripId, view: mapViewOf(edges) } : null);+}++/** Leaflet: read from inside the map container, after each move and once on mount. */+export function useReportViewLeaflet(): void {+ const map = useMap();+ const tripId = useTripStore((s) => s.trip?.id ?? null);+ useEffect(() => {+ const read = () => {+ const b = map.getBounds();+ report(tripId, { south: b.getSouth(), west: b.getWest(), north: b.getNorth(), east: b.getEast() });+ };+ read();+ map.on('moveend', read);+ return () => {+ map.off('moveend', read);+ report(null, null);+ };+ }, [map, tripId]);+}++/** What the GL map offers for it; mapbox-gl and maplibre-gl alike. */+interface ViewMap {+ getBounds: () => {+ getSouth: () => number;+ getWest: () => number;+ getNorth: () => number;+ getEast: () => number;+ } | null;+ on: (type: 'moveend', listener: () => void) => unknown;+ off: (type: 'moveend', listener: () => void) => unknown;+}++/** GL: the same, once the map is ready. */+export function useReportViewGL(mapRef: { readonly current: unknown }, mapReady: boolean): void {+ const tripId = useTripStore((s) => s.trip?.id ?? null);+ useEffect(() => {+ const map = mapRef.current as Partial<ViewMap> | null;+ if (!mapReady || !map?.on || !map.off || !map.getBounds) return;+ const { on, off, getBounds } = { on: map.on.bind(map), off: map.off.bind(map), getBounds: map.getBounds.bind(map) };+ const read = () => {+ const b = getBounds();+ if (typeof b?.getSouth !== 'function') return;+ report(tripId, { south: b.getSouth(), west: b.getWest(), north: b.getNorth(), east: b.getEast() });+ };+ read();+ on('moveend', read);+ return () => {+ off('moveend', read);+ report(null, null);+ };+ }, [mapRef, mapReady, tripId]);+}diff --git a/client/src/components/Map/useAssistantMapGL.ts b/client/src/components/Map/useAssistantMapGL.tsindex 2cc77984e..44c07a8b7 100644--- a/client/src/components/Map/useAssistantMapGL.ts+++ b/client/src/components/Map/useAssistantMapGL.ts@@ -2,6 +2,7 @@ import { useCallback } from 'react';import type { ViewportPadding } from '../../utils/mapViewport';import { useAssistantMarkerClasses } from './assistantCamera';import { PLACE_POP_CLASS, PLACE_PULSE_CLASS } from './assistantGhostMarker';+import { useReportViewGL } from './assistantViewport';import type { AssistantMapProps } from './mapViewContract';import { useAssistantCameraGL, type CameraEngine, type CameraMap } from './useAssistantCameraGL';import { useAssistantGhostMarkersGL, type GhostMap } from './useAssistantGhostMarkersGL';@@ -65,4 +66,5 @@ export function useAssistantMapGL<Pin extends PinGL>({useAssistantCameraGL({ mapRef, mapReady, gl, camera: assistant.assistantCamera, padding });const markerEl = useCallback((id: number) => markersRef.current.get(id)?.el ?? null, [markersRef]);useAssistantMarkerClasses(markerEl, assistant.poppedPlaceIds, assistant.assistantPulsePlaceId);+ useReportViewGL(mapRef, mapReady);}diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsxindex e3315faf8..6db8e6636 100644--- a/client/src/components/Planner/DayPlanSidebar.tsx+++ b/client/src/components/Planner/DayPlanSidebar.tsx@@ -20,6 +20,8 @@ import GoogleMapsIcon from '../shared/GoogleMapsIcon'import PlaceAvatar from '../shared/PlaceAvatar'import ConfirmDialog from '../shared/ConfirmDialog'import { useContextMenu, ContextMenu } from '../shared/ContextMenu'+import { useAssistantMenu } from '../Assistant/useAssistantMenu'+import AssistantDayPreview from '../Assistant/AssistantDayPreview'import Markdown from 'react-markdown'import remarkGfm from 'remark-gfm'import remarkBreaks from 'remark-breaks'@@ -1252,16 +1254,14 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarPisMobile,} = withDayPlanDefaults(props)const onClearDay = props.onClearDay- // Below lg the plan and the places sit in separate tabs, so there is nothing- // to drag between. A coarse pointer is no longer a reason of its own: tablets- // reach the same drag through a long press (#1616).+ // Below lg plan and places sit in separate tabs; tablets drag by long press (#1616).const dragDisabled = isMobileconst ctxMenu = useContextMenu()+ const ai = useAssistantMenu(tripId)const timeFormat = useSettingsStore(s => s.settings.time_format) || '24h'const can = useCanDo()const canEditDays = can('day_edit', trip)- // Editing or deleting the place itself is a place right; taking it off the- // day stays a day right (#2446).+ // Editing or deleting the place is a place right; taking it off the day a day right (#2446).const canEditPlaces = can('place_edit', trip)// The calendar subscription hands out a link that reads the trip without an// account, so it sits behind the same permission as the public share link.@@ -1578,7 +1578,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP].filter(Boolean)// Right-click on the head: what can be added, and emptying the day (#2470).const dayMenuItems = [- ...addItems,+ ...addItems, ...ai.day(day.id),...(onClearDay && da.length > 0 ? [{ divider: true },{ label: t('dayplan.clearDay'), icon: Eraser, danger: true, onClick: () => onClearDay(day.id) },@@ -1708,8 +1708,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP<divdata-dp="day-body"className="border-t border-edge-faint px-1.5 pb-1.5 pt-1.5"- // The activity list — the largest region and the one behind the- // densest text, so its tint is the faintest of the three.+ // The activity list, the largest region behind the densest text: the faintest tint.style={dayBodyStyle(dayTintBackground(dayTint, 'activity', '--day-tint-activity'))}onDragOver={e => { e.preventDefault(); const cur = dropTargetRef.current; if (draggingId && (!cur || cur.startsWith('end-'))) setDropTargetKey(`end-${day.id}`) }}onDrop={e => {@@ -1870,7 +1869,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP},safeHttpUrl(place.website) && { label: t('inspector.website'), icon: ExternalLink, onClick: () => window.open(safeHttpUrl(place.website)!, '_blank', 'noopener,noreferrer') },collectionsEnabled && { label: t('inspector.saveToCollection'), icon: Bookmark, onClick: () => openSaveToCollection(place, !!isTourPlace, tripId) },- { divider: true },+ ...ai.place(place), { divider: true },canEditPlaces &&onDeletePlace &&!(toursEnabled && (props.tourPlaceIds?.has(place.id) || place.tour_place_id === place.id)) && {@@ -2530,7 +2529,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP</Tooltip>) : connector})()}- {/* Drop-Zone am Listenende — immer vorhanden als Drop-Target */}+ <AssistantDayPreview tripId={tripId} dayId={day.id} />{/* The assistant's waiting changes, then the drop zone at the list end */}<divstyle={{ minHeight: 12, padding: '2px 8px' }}onDragOver={e => { e.preventDefault(); e.stopPropagation(); if (dropTargetKey !== `end-${day.id}`) setDropTargetKey(`end-${day.id}`) }}diff --git a/client/src/components/Planner/usePlacesSidebar.ts b/client/src/components/Planner/usePlacesSidebar.tsindex 45813aa7c..ce712eee7 100644--- a/client/src/components/Planner/usePlacesSidebar.ts+++ b/client/src/components/Planner/usePlacesSidebar.ts@@ -18,6 +18,7 @@ import { placeMatchesSearch } from '../../utils/placeSearch'import { matchesCategoryFilter, matchesPlacesFilter } from '../../utils/placesFilter'import { safeHttpUrl } from '../../utils/safeUrl'import { plannedPlaceIds, plannedPlaceIdsForDay, type PlannedAccommodation } from '../../utils/plannedPlaces'+import { useAssistantMenu } from '../Assistant/useAssistantMenu'import type { MenuEntry } from './planParts'import { useListImport, type ListImportProvider } from './useListImport'import { usePlacesPool, type PlacesFilter } from './usePlacesPool'@@ -93,6 +94,7 @@ export function usePlacesSidebar(props: PlacesSidebarProps) {const { t, language } = useTranslation()const toast = useToast()const ctxMenu = useContextMenu()+ const ai = useAssistantMenu(tripId)const trip = useTripStore((s) => s.trip)// A booking plans the place it points at, so the pool has to see them (#2072).const reservations = useTripStore((s) => s.reservations)@@ -276,11 +278,12 @@ export function usePlacesSidebar(props: PlacesSidebarProps) {!!website && { label: t('inspector.website'), icon: ExternalLink, onClick: () => window.open(website, '_blank', 'noopener,noreferrer') },!!googleMapsUrl && { label: t('inspector.google'), icon: Navigation, onClick: () => window.open(googleMapsUrl, '_blank') },collectionsEnabled && { label: t('inspector.saveToCollection'), icon: Bookmark, onClick: () => useSaveToCollectionStore.getState().open(placeToSaveTarget(place)) },+ ...ai.place(place),{ divider: true },canEditPlaces && { label: t('common.delete'), icon: Trash2, danger: true, onClick: () => onDeletePlace(place.id) },]return entries.filter((entry): entry is MenuEntry => entry !== false)- }, [canEditPlaces, collectionsEnabled, t, onEditPlace, onAssignToDay, onDeletePlace])+ }, [canEditPlaces, collectionsEnabled, t, onEditPlace, onAssignToDay, onDeletePlace, ai])// The day is read when the menu opens, so it stays stable across day switches.const openCtxMenu = ctxMenu.opendiff --git a/client/src/components/Settings/IntegrationsTab.tsx b/client/src/components/Settings/IntegrationsTab.tsxindex 433e1a6be..05560ec27 100644--- a/client/src/components/Settings/IntegrationsTab.tsx+++ b/client/src/components/Settings/IntegrationsTab.tsx@@ -37,8 +37,10 @@ export default function IntegrationsTab(): React.ReactElement {own key, and there nobody does. */}{/* The assistant in TREK, with the same managed rule as AI parsing: there theoperator decides which model the install talks to. */}- {S.aiAssistantEnabled && !managed && <AiConnectionSection />}- {S.llmEnabled && !managed && <LlmConnectionSection />}+ {S.aiConnectionEnabled && !managed && (+ <AiConnectionSection assistant={S.aiAssistantEnabled} parsing={S.llmEnabled} />+ )}+ {S.llmEnabled && S.ownParsing && !managed && <LlmConnectionSection />}{/* Above MCP on purpose: an API key needs no addon, and someone looking forone should not have to read past a section about AI assistants. */}<ApiKeysSection />@@ -54,11 +56,11 @@ export default function IntegrationsTab(): React.ReactElement {function useIntegrations() {const { t, locale } = useTranslation()const toast = useToast()- const { mcpEnabled, airtrailEnabled, llmEnabled, aiAssistantEnabled, dawarichEnabled, wandererEnabled, managed } = useIntegrationGates({ reloadAddons: true })+ const { mcpEnabled, airtrailEnabled, llmEnabled, aiAssistantEnabled, aiConnectionEnabled, ownParsing, dawarichEnabled, wandererEnabled, managed } = useIntegrationGates({ reloadAddons: true })const mcp = useMcpIntegration({ enabled: mcpEnabled, reloadClientsAfterWrite: false })- return { t, locale, toast, mcpEnabled, airtrailEnabled, llmEnabled, aiAssistantEnabled, dawarichEnabled,+ return { t, locale, toast, mcpEnabled, airtrailEnabled, llmEnabled, aiAssistantEnabled, aiConnectionEnabled, ownParsing, dawarichEnabled,wandererEnabled,managed, ...mcp,}diff --git a/client/src/components/Settings/ai/AiConnectionSection.tsx b/client/src/components/Settings/ai/AiConnectionSection.tsxindex a2ca6a599..d548c070c 100644--- a/client/src/components/Settings/ai/AiConnectionSection.tsx+++ b/client/src/components/Settings/ai/AiConnectionSection.tsx@@ -2,23 +2,23 @@ import type { AiConnectionKind, AiConnectionView } from '@trek/shared';import { Loader2, LogOut, MessageCircle, Sparkles, Unplug } from 'lucide-react';import React from 'react';import { useTranslation } from '../../../i18n';+import { useAssistantCostEstimates, useAssistantMapFollow } from '../../Assistant/useAssistantMapFollow';import ConfirmDialog from '../../shared/ConfirmDialog';import CustomSelect from '../../shared/CustomSelect';import { fs } from '../../shared/DialogShell';-import { useAssistantMapFollow } from '../../Assistant/useAssistantMapFollow';import Section from '../Section';import {+ SettingRow,+ SettingRows,SETTINGS_BUTTON,SETTINGS_BUTTON_DANGER,SETTINGS_BUTTON_PRIMARY,- SettingRow,- SettingRows,SettingsHint,StatusPill,} from '../settingsKit';import ToggleSwitch from '../ToggleSwitch';+import { aiSectionText, CONNECTION_STATUS } from './aiConnectModel';import AiConnectPanel, { ProviderMark } from './AiConnectPanel';-import { CONNECTION_STATUS } from './aiConnectModel';import { useAiConnections } from './useAiConnections';type AiConnections = ReturnType<typeof useAiConnections>;@@ -173,6 +173,7 @@ function InstanceConnection({ S }: { S: AiConnections }) {function AssistantBehaviour() {const { t } = useTranslation();const follow = useAssistantMapFollow();+ const costs = useAssistantCostEstimates();return (<SettingRows><SettingRow@@ -186,26 +187,45 @@ function AssistantBehaviour() {/>}/>+ <SettingRow+ label={t('assistant.settings.costEstimates')}+ hint={t('assistant.settings.costEstimatesHint')}+ control={+ <ToggleSwitch+ on={costs.on}+ onToggle={() => void costs.set(!costs.on)}+ label={t('assistant.settings.costEstimates')}+ />+ }+ /></SettingRows>);}/**- * Settings → Integrations → AI assistant: connect a provider, see which one- * answers, pick its model, leave again. The only place a user sets the- * assistant up; once it works, one button takes them to it.+ * Settings → Integrations → the user's AI connection: connect a provider, see+ * which one answers, pick its model, leave again. The assistant runs on it and+ * AI parsing reads bookings with it, so it shows while either addon is on and+ * says which it serves.*/-export default function AiConnectionSection(): React.ReactElement | null {+export default function AiConnectionSection({+ assistant = true,+ parsing = false,+}: {+ assistant?: boolean;+ parsing?: boolean;+}): React.ReactElement | null {const { t } = useTranslation();const S = useAiConnections();+ const text = aiSectionText(assistant, parsing);if (S.view === 'hidden') return null;const own = S.own;return (<Section- title={t('assistant.connect.title')}+ title={t(text.titleKey)}icon={Sparkles}- hint={t('assistant.connect.description')}+ hint={t(text.hintKey)}badge={own ? (<StatusPill tone={CONNECTION_STATUS[own.status].tone}>{t(CONNECTION_STATUS[own.status].labelKey)}</StatusPill>@@ -219,7 +239,7 @@ export default function AiConnectionSection(): React.ReactElement | null {)}{S.view === 'own' && own && <OwnConnection S={S} own={own} />}{S.view === 'instance' && <InstanceConnection S={S} />}- {(S.view === 'own' || S.view === 'instance') && <AssistantBehaviour />}+ {assistant && (S.view === 'own' || S.view === 'instance') && <AssistantBehaviour />}{S.view === 'adminOnly' && <SettingsHint>{t('assistant.setup.adminOnly')}</SettingsHint>}{S.panel && (diff --git a/client/src/components/Settings/ai/aiConnectModel.ts b/client/src/components/Settings/ai/aiConnectModel.tsindex a52cced90..f5382383c 100644--- a/client/src/components/Settings/ai/aiConnectModel.ts+++ b/client/src/components/Settings/ai/aiConnectModel.ts@@ -121,3 +121,15 @@ export function httpHostOf(raw: string): string {export function svgDataUrl(svg: string): string {return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;}++/**+ * What a user's AI connection serves, as its section's title and line: the+ * assistant, AI parsing (booking import reads with the same connection), or both.+ */+export function aiSectionText(assistant: boolean, parsing: boolean): { titleKey: string; hintKey: string } {+ if (!assistant) return { titleKey: 'settings.aiParsing.title', hintKey: 'assistant.connect.descriptionParsingOnly' };+ return {+ titleKey: 'assistant.connect.title',+ hintKey: parsing ? 'assistant.connect.descriptionWithParsing' : 'assistant.connect.description',+ };+}diff --git a/client/src/components/Settings/useIntegrationGates.ts b/client/src/components/Settings/useIntegrationGates.tsindex 3d4dd21d1..f71edcee4 100644--- a/client/src/components/Settings/useIntegrationGates.ts+++ b/client/src/components/Settings/useIntegrationGates.ts@@ -1,6 +1,7 @@import { useEffect } from 'react';import { useAddonStore } from '../../store/addonStore';import { useAuthStore } from '../../store/authStore';+import { useSettingsStore } from '../../store/settingsStore';/*** Which integrations the settings shells offer: the addon flags behind each@@ -22,6 +23,11 @@ export function useIntegrationGates({ reloadAddons }: { reloadAddons: boolean })const dawarichEnabled = addonEnabled('dawarich');// The wanderer connection feeds the Tours workspace, while the admin allows it there.const wandererEnabled = useAddonStore((s) => s.toursWanderer);+ // The AI connection serves the assistant and AI parsing alike.+ const aiConnectionEnabled = aiAssistantEnabled || llmEnabled;+ // A personal parsing model saved before parsing read with the AI connection;+ // its form stays for whoever has one, and is no longer offered to anyone else.+ const ownParsing = useSettingsStore((s) => !!(s.settings.llm_provider && s.settings.llm_model));const hasIntegrations =memoriesEnabled || mcpEnabled || airtrailEnabled || llmEnabled || aiAssistantEnabled || dawarichEnabled;@@ -35,6 +41,8 @@ export function useIntegrationGates({ reloadAddons }: { reloadAddons: boolean })airtrailEnabled,llmEnabled,aiAssistantEnabled,+ aiConnectionEnabled,+ ownParsing,dawarichEnabled,wandererEnabled,hasIntegrations,diff --git a/client/src/mobile/screens/admin/MAdminAddonManager.tsx b/client/src/mobile/screens/admin/MAdminAddonManager.tsxindex 27dd87fe8..d603fd569 100644--- a/client/src/mobile/screens/admin/MAdminAddonManager.tsx+++ b/client/src/mobile/screens/admin/MAdminAddonManager.tsx@@ -3,28 +3,25 @@ import { useTranslation } from '../../../i18n'import { useIsDark } from '../../../hooks/useIsDark'import {Puzzle, ListChecks, Wallet, FileText, CalendarDays, Globe, Briefcase, Image, Terminal, Link2, Compass, BookOpen,- Sparkles, Luggage, Plane, Server, Cloud, Bookmark, Users, Check, Loader2, Mountain, CarFront,+ Sparkles, Luggage, Plane, Bookmark, Users, Loader2, Mountain, CarFront, Settings2, ChevronRight,} from 'lucide-react'import DawarichIcon from '../../../components/shared/DawarichIcon'import AirTrailIcon from '../../../components/shared/AirTrailIcon'import { DOCUMENT_PROVIDER_ICONS } from '../../../components/shared/DocumentProviderIcons'import MToggle from '../../components/MToggle'-import { LLM_VISION_MODES } from '@trek/shared'import {type Addon,type CollabFeatures,type ProviderOption,- ANTHROPIC_HINT,COLLAB_SUB_FEATURES,getAddonLabel,- MASKED,- RECOMMENDED_MODELS,} from '../../../components/Admin/addons/addonModel'import { useAddonManager } from '../../../components/Admin/addons/useAddonManager'-import { useLlmParsingConfig } from '../../../components/Admin/addons/useLlmParsingConfig'-import MAdminAiConfig from './MAdminAiConfig'+import AiSettingsDialog from '../../../components/Admin/addons/AiAdminConfig'+import { AI_ADDON_ICONS, type AiAddonId } from '../../../components/Admin/addons/aiAddons'+import { useAiAddonTile } from '../../../components/Admin/addons/useAiAddonTile'import { ImmichIcon, SynologyIcon } from '../../../components/Admin/addons/PhotoProviderIcons'-import { MAdminButton, MAdminCard, MAdminClampedText, MAdminField, MAdminInput, MAdminSecretInput } from './MAdminUi'+import { MAdminCard, MAdminClampedText } from './MAdminUi'import WandererMark from '../../../components/Tours/wanderer/WandererMark'// Keys are the `icon` column from the addons table; anything unknown falls back to@@ -64,7 +61,7 @@ export default function MAdminAddonManager({ bagTrackingEnabled, onToggleBagTracconst { t } = useTranslation()const dark = useIsDark()const {- addons, loading, handleToggle, tripAddons, globalAddons, integrationAddons, providerOptions, documentProviderOptions,+ addons, loading, handleToggle, tripAddons, globalAddons, integrationAddons, aiAddons, providerOptions, documentProviderOptions,toursWanderer,toggleToursWanderer,mapSwitches,@@ -170,24 +167,13 @@ export default function MAdminAddonManager({ bagTrackingEnabled, onToggleBagTrac</MAdminCard>)}- {/* Integration Addons */}- {integrationAddons.length > 0 && (+ {/* Integration Addons, headed by the AI ones as one group, as on the desktop */}+ {(integrationAddons.length > 0 || aiAddons.length > 0) && (<MAdminCard><MGroupHead icon={Link2} label={t('admin.addons.type.integration')} hint={t('admin.addons.integrationHint')} />+ {aiAddons.length > 0 && <MAiAddons addons={aiAddons} onToggle={handleToggle} />}{integrationAddons.map((addon, i) => (- <div key={addon.id}>- <MAddonRow addon={addon} onToggle={handleToggle} t={t} first={i === 0} />- {addon.id === 'llm_parsing' && addon.enabled && (- <div className="mt-1 border-t border-[color:var(--m-rowbr)] pt-3">- <LlmParsingConfig addon={addon} />- </div>- )}- {addon.id === 'ai_assistant' && addon.enabled && (- <div className="mt-1 border-t border-[color:var(--m-rowbr)] pt-3">- <MAdminAiConfig />- </div>- )}- </div>+ <MAddonRow key={addon.id} addon={addon} onToggle={handleToggle} t={t} first={i === 0 && aiAddons.length === 0} />))}</MAdminCard>)}@@ -285,209 +271,50 @@ function MSubRow({ icon: Icon, providerIcon: ProviderIcon, title, subtitle, enab)}-/**- * Instance-wide AI-parsing config. When set, applies to the whole instance and- * overrides per-user config (see server llmConfig.ts). The API key is masked on- * read; an unchanged mask is treated as a no-op by the server. For the local- * provider, it also lists installed Ollama models and can pull NuExtract models.- */-function LlmParsingConfig({ addon }: { addon: Addon }) {+/** The AI addons as one group: a head row, their switches, and the button to the settings dialog. */+function MAiAddons({ addons, onToggle }: { addons: Addon[]; onToggle: (addon: Addon) => void }) {const { t } = useTranslation()- const {- provider, setProvider, model, setModel, baseUrl, setBaseUrl, baseUrlPlaceholder, apiKey, setApiKey, vision, setVision, saving,- installed, modelsErr, loadingModels, pulling, pullPct, pullStatus, isInstalled, loadModels, pull, save,- } = useLlmParsingConfig(addon)-- const sectionCls = 'font-geist text-[0.625rem] font-bold uppercase tracking-[0.06em] text-m-faint'-- const providerOptions = [- { value: 'local', label: 'Local · OpenAI-compatible', icon: <Server size={14} />, badge: 'Ollama' },- { value: 'openai', label: 'OpenAI', icon: <Cloud size={14} /> },- { value: 'anthropic', label: 'Anthropic', icon: <Sparkles size={14} /> },- ]-+ const tile = useAiAddonTile(addons)return (- <div className="space-y-5 ps-[50px]">- <p className="font-geist text-[0.625rem] leading-relaxed text-m-faint">- Set instance-wide config (applies to all users). Leave blank to let each user configure their own provider.- </p>-- {/* Connection */}- <section className="space-y-3">- <div className={sectionCls}>Connection</div>- <MAdminField label="Provider">- <div className="space-y-[6px]">- {providerOptions.map((opt) => {- const active = provider === opt.value- return (- <button- key={opt.value}- type="button"- onClick={() => setProvider(opt.value)}- className={`flex w-full items-center gap-2 rounded-xl border px-3 py-[10px] text-start ${- active ? 'border-[color:var(--m-act)] bg-[color:var(--m-ic)]' : 'border-[color:var(--m-rowbr)]'- }`}- >- <span className="flex-none text-m-muted">{opt.icon}</span>- <span className="min-w-0 flex-1 truncate text-[0.8125rem] font-semibold text-m-ink">{opt.label}</span>- {opt.badge && (- <span className="flex-none rounded-full bg-[color:var(--m-ic)] px-2 py-[2px] font-geist text-[0.5625rem] font-bold text-m-muted">- {opt.badge}- </span>- )}- {active && <Check size={15} strokeWidth={2.4} className="flex-none text-m-ink" />}- </button>- )- })}- </div>- </MAdminField>- <MAdminField label="Base URL">- <MAdminInput- type="url"- autoComplete="off"- value={baseUrl}- onChange={e => setBaseUrl(e.target.value)}- onBlur={loadModels}- placeholder={baseUrlPlaceholder}- />- </MAdminField>- <MAdminField label="API key">- <MAdminSecretInput- value={apiKey}- onChange={e => setApiKey(e.target.value)}- placeholder={apiKey === MASKED ? MASKED : provider === 'local' ? '(often not required)' : 'sk-…'}+ <div>+ <div className="flex items-center gap-3 py-[11px]">+ <span className="flex h-[38px] w-[38px] flex-none items-center justify-center rounded-[11px] bg-[color:var(--m-ic)] text-m-ink">+ <Sparkles size={18} />+ </span>+ <div className="min-w-0 flex-1">+ <span className="block truncate text-[0.8125rem] font-bold text-m-ink">{t('admin.addons.ai.name')}</span>+ <p className="mt-[1px] font-geist text-[0.625rem] leading-relaxed text-m-muted">{t('admin.addons.ai.description')}</p>+ </div>+ <span className="flex-none rounded-full bg-[color:var(--m-ic)] px-[7px] py-[2px] font-geist text-[0.5625rem] font-bold text-m-muted">+ {tile.enabledCount}/{addons.length}+ </span>+ </div>+ {addons.map(addon => {+ const label = getAddonLabel(t, addon)+ return (+ <MSubRow+ key={addon.id}+ icon={AI_ADDON_ICONS[addon.id as AiAddonId]}+ title={label.name}+ subtitle={label.description}+ enabled={addon.enabled}+ onToggle={() => onToggle(addon)}/>- </MAdminField>- {provider === 'anthropic' && (- <p className="font-geist text-[0.625rem] leading-relaxed text-m-faint">{ANTHROPIC_HINT}</p>- )}- </section>-- {/* Model */}- <section className="space-y-3">- <div className={sectionCls}>Model</div>- <MAdminInput- autoComplete="off"- value={model}- onChange={e => setModel(e.target.value)}- placeholder={provider === 'anthropic' ? 'claude-opus-4-8' : provider === 'openai' ? 'gpt-4o' : 'select or pull below'}- />-- <MAdminField label={t('settings.aiParsing.multimodal')}>- <div role="radiogroup" aria-label={t('settings.aiParsing.multimodal')} className="flex gap-[6px]">- {LLM_VISION_MODES.map((mode) => {- const active = vision === mode- return (- <button- key={mode}- type="button"- role="radio"- aria-checked={active}- onClick={() => setVision(mode)}- className={`flex-1 rounded-xl border px-3 py-[10px] text-[0.8125rem] font-semibold text-m-ink ${- active ? 'border-[color:var(--m-act)] bg-[color:var(--m-ic)]' : 'border-[color:var(--m-rowbr)]'- }`}- >- {t(`admin.addons.llm.vision.${mode}`)}- </button>- )- })}- </div>- </MAdminField>- <p className="font-geist text-[0.625rem] leading-relaxed text-m-faint">- {t(provider === 'local' ? 'admin.addons.llm.vision.hintLocal' : 'admin.addons.llm.vision.hintCloud')}- </p>-- {/* Local model management (Ollama) */}- {provider === 'local' && (- <div className="space-y-3 rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] p-3">- <div className="flex items-center justify-between">- <span className="text-[0.75rem] font-semibold text-m-ink">Installed on the server</span>- <button- type="button"- onClick={loadModels}- disabled={loadingModels}- className="font-geist text-[0.6875rem] text-m-muted underline disabled:opacity-60"- >- {loadingModels ? 'Loading…' : 'Refresh'}- </button>- </div>- {modelsErr && <p className="font-geist text-[0.6875rem] text-[color:var(--m-st-danger)]">{modelsErr}</p>}- {!modelsErr && installed.length === 0 && !loadingModels && (- <p className="font-geist text-[0.6875rem] text-m-faint">No models installed yet — pull one below.</p>- )}- {installed.length > 0 && (- <div className="flex flex-wrap gap-1.5">- {installed.map(name => (- <button- key={name}- type="button"- title={name}- onClick={() => setModel(name)}- className={`max-w-full truncate rounded-full border px-[10px] py-[5px] text-[0.6875rem] ${- model === name ? 'border-transparent bg-m-act text-m-actfg' : 'border-[color:var(--m-rowbr)] text-m-ink'- }`}- >- {name}- </button>- ))}- </div>- )}-- <div className="border-t border-[color:var(--m-rowbr)] pt-3">- <div className="mb-2 text-[0.75rem] font-semibold text-m-ink">Pull a recommended model</div>- <div className="space-y-1">- {RECOMMENDED_MODELS.map(m => {- const installedHere = isInstalled(m.id)- const isPulling = pulling === m.id- const active = model === m.id- return (- <div- key={m.id}- className={`flex items-center gap-3 rounded-xl border px-3 py-2 ${- active ? 'border-[color:var(--m-rowbr)] bg-[color:var(--m-sheetop)]' : 'border-transparent'- }`}- >- <div className="min-w-0 flex-1">- <div className="flex items-center gap-2">- <span className="text-[0.8125rem] text-m-ink">{m.label}</span>- {m.recommended && (- <span className="rounded-md bg-[color:color-mix(in_srgb,var(--m-st-confirmed)_15%,transparent)] px-1.5 py-px font-geist text-[0.5625rem] font-bold text-[color:var(--m-st-confirmed)]">- Recommended- </span>- )}- </div>- <div className="font-geist text-[0.625rem] leading-relaxed text-m-faint">{m.note}</div>- {isPulling && (- <div className="mt-1.5">- <div className="h-1.5 w-full overflow-hidden rounded-full bg-[color:var(--m-ic)]">- <div className="h-full bg-m-act transition-[width] duration-200" style={{ width: `${pullPct}%` }} />- </div>- <div className="mt-0.5 font-geist text-[0.5625rem] text-m-faint">{pullStatus}{pullPct ? ` · ${pullPct}%` : ''}</div>- </div>- )}- </div>- {installedHere ? (- <MAdminButton variant="ghost" disabled={active} onClick={() => setModel(m.id)}>- {active ? 'Selected' : 'Use'}- </MAdminButton>- ) : (- <MAdminButton busy={isPulling} disabled={!!pulling} onClick={() => pull(m.id)}>- {isPulling ? 'Pulling…' : 'Pull'}- </MAdminButton>- )}- </div>- )- })}- </div>- </div>- </div>- )}- </section>-- <MAdminButton busy={saving} onClick={save}>- {saving ? 'Saving…' : 'Save'}- </MAdminButton>+ )+ })}+ {tile.canSetUp && (+ <button+ type="button"+ onClick={tile.openDialog}+ className="flex w-full items-center gap-3 border-t border-[color:var(--m-rowbr)] py-[11px] ps-[50px] text-start"+ >+ <Settings2 size={14} className="flex-none text-m-faint" />+ <span className="min-w-0 flex-1 truncate text-[0.75rem] font-bold text-m-ink">{t('admin.addons.ai.setup')}</span>+ <ChevronRight size={15} className="flex-none text-m-faint rtl:rotate-180" />+ </button>+ )}+ {tile.dialogOpen && <AiSettingsDialog addons={addons} onClose={tile.closeDialog} />}</div>)}+diff --git a/client/src/mobile/screens/admin/MAdminAiConfig.test.tsx b/client/src/mobile/screens/admin/MAdminAiConfig.test.tsxdeleted file mode 100644index 564fd4539..000000000--- a/client/src/mobile/screens/admin/MAdminAiConfig.test.tsx+++ /dev/null@@ -1,65 +0,0 @@-// FE-MOB-AI-ADMIN-001 to FE-MOB-AI-ADMIN-002: the AI assistant's form under its tile on the phone.-import userEvent from '@testing-library/user-event';-import type { AiAdminSettings } from '@trek/shared';-import { beforeEach, describe, expect, it, vi } from 'vitest';-import { render, screen, waitFor } from '../../../../tests/helpers/render';-import { useAssistantStore } from '../../../store/assistantStore';--const repo = vi.hoisted(() => ({- status: vi.fn(),- adminSettings: vi.fn(),- saveAdminSettings: vi.fn(),- adminConnection: vi.fn(),- saveAdminConnection: vi.fn(),- removeAdminConnection: vi.fn(),- adminModels: vi.fn(),-}));-vi.mock('../../../repo/aiConnectionsRepo', () => ({ aiConnectionsRepo: repo }));--const { default: MAdminAiConfig } = await import('./MAdminAiConfig');--const SETTINGS: AiAdminSettings = { policy: 'instance', dailyTurns: 25, retention: { mode: 'days', days: 30 } };--beforeEach(() => {- vi.clearAllMocks();- useAssistantStore.setState({ status: null });- repo.status.mockRejectedValue(new Error('not needed'));- repo.adminSettings.mockResolvedValue(SETTINGS);- repo.saveAdminSettings.mockImplementation(async (next: AiAdminSettings) => next);- repo.adminConnection.mockResolvedValue({- connection: {- scope: 'instance',- kind: 'gemini',- model: 'gemini-flash',- hint: '…77aa',- status: 'ok',- host: 'generativelanguage.googleapis.com',- baseUrl: null,- },- prefill: null,- });- repo.adminModels.mockResolvedValue([- { id: 'gemini-flash', label: 'Gemini Flash', supportsTools: true },- { id: 'gemini-pro', label: 'Gemini Pro', supportsTools: true },- ]);-});--describe('MAdminAiConfig', () => {- it('FE-MOB-AI-ADMIN-001: shows the policy, the live connection with its models, the limit and the retention', async () => {- render(<MAdminAiConfig />);- expect(await screen.findByRole('radio', { name: 'I pay for everyone' })).toHaveAttribute('aria-checked', 'true');- expect(screen.getByText('Gemini')).toBeInTheDocument();- await waitFor(() => expect(screen.getByRole('option', { name: 'Gemini Pro' })).toBeInTheDocument());- expect(screen.getByDisplayValue('25')).toBeInTheDocument();- expect(screen.getByRole('combobox', { name: 'Keep chats' })).toHaveValue('30');- });-- it('FE-MOB-AI-ADMIN-002: a retention picked from the list is saved at once', async () => {- const user = userEvent.setup();- render(<MAdminAiConfig />);- await user.selectOptions(await screen.findByRole('combobox', { name: 'Keep chats' }), 'forever');- await waitFor(() =>- expect(repo.saveAdminSettings).toHaveBeenCalledWith({ ...SETTINGS, retention: { mode: 'forever' } })- );- });-});diff --git a/client/src/mobile/screens/admin/MAdminAiConfig.tsx b/client/src/mobile/screens/admin/MAdminAiConfig.tsxdeleted file mode 100644index 0ec0329c3..000000000--- a/client/src/mobile/screens/admin/MAdminAiConfig.tsx+++ /dev/null@@ -1,174 +0,0 @@-import { Check, Loader2 } from 'lucide-react';-import React from 'react';-import { POLICY_CHOICES, useAiAdminConfig } from '../../../components/Admin/addons/useAiAdminConfig';-import AiConnectPanel from '../../../components/Settings/ai/AiConnectPanel';-import { CONNECTION_STATUS } from '../../../components/Settings/ai/aiConnectModel';-import { StatusPill } from '../../../components/Settings/settingsKit';-import { NumericInput } from '../../../components/shared/NumericInput';-import { useTranslation } from '../../../i18n';-import MConfirmSheet from '../settings/MConfirmSheet';-import { MAdminButton, MAdminField, MAdminRow } from './MAdminUi';--type AiAdmin = ReturnType<typeof useAiAdminConfig>;--const SELECT =- 'h-[42px] w-full rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] px-3 text-body text-m-ink outline-none';--/** Who pays, as stacked rows like the AI parsing provider list. */-function MPolicyChoice({ A }: { A: AiAdmin }) {- const { t } = useTranslation();- return (- <MAdminField label={t('assistant.admin.policy')} hint={A.policyHintKey ? t(A.policyHintKey) : undefined}>- <div role="radiogroup" aria-label={t('assistant.admin.policy')} className="space-y-[6px]">- {POLICY_CHOICES.map((choice) => {- const on = A.policy === choice.value;- return (- <button- key={choice.value}- type="button"- role="radio"- aria-checked={on}- onClick={() => A.setPolicy(choice.value)}- className={`flex w-full items-center gap-2 rounded-xl border px-3 py-[10px] text-start ${on ? 'border-[color:var(--m-act)] bg-[color:var(--m-ic)]' : 'border-[color:var(--m-rowbr)]'}`}- >- <span className="min-w-0 flex-1 truncate text-body font-semibold text-m-ink">{t(choice.labelKey)}</span>- {on && <Check size={15} strokeWidth={2.4} className="flex-none text-m-ink" />}- </button>- );- })}- </div>- </MAdminField>- );-}--/** The connection everyone runs on: the live one with its model, or the panel to set one up. */-function MInstanceConnection({ A }: { A: AiAdmin }) {- const { t } = useTranslation();- const {- live,- connection,- provider,- models,- busy,- setModel,- replacing,- replace,- cancelReplace,- askRemove,- onConnected,- } = A.instance;- return (- <MAdminField label={t('assistant.admin.connection')}>- {live && !replacing && (- <>- <MAdminRow- first- title={provider}- hint={live.hint ?? live.host}- trailing={- <StatusPill tone={CONNECTION_STATUS[live.status].tone}>- {t(CONNECTION_STATUS[live.status].labelKey)}- </StatusPill>- }- />- {live.status === 'ok' && (- <select- aria-label={t('assistant.connect.model')}- className={SELECT}- value={live.model}- disabled={busy}- onChange={(e) => setModel(e.target.value)}- >- {models.map((m) => (- <option key={m.value} value={m.value}>- {m.label}- </option>- ))}- </select>- )}- <div className="mt-3 flex flex-wrap gap-2">- <MAdminButton variant="ghost" disabled={busy} onClick={replace}>- {t('common.change')}- </MAdminButton>- <MAdminButton variant="danger" disabled={busy} onClick={askRemove}>- {t('assistant.admin.connectionRemove')}- </MAdminButton>- </div>- </>- )}- {A.showPanel && (- <div className="space-y-3">- {!live && <p className="font-geist text-caption text-m-faint">{t('assistant.admin.connectionNone')}</p>}- <AiConnectPanel scope="instance" onConnected={onConnected} prefill={connection?.prefill ?? null} />- {replacing && (- <MAdminButton variant="ghost" onClick={cancelReplace}>- {t('common.cancel')}- </MAdminButton>- )}- </div>- )}- </MAdminField>- );-}--/**- * Phone twin of components/Admin/addons/AiAdminConfig, on the same- * useAiAdminConfig hook, in the AI parsing form's layout under its tile.- */-export default function MAdminAiConfig(): React.ReactElement {- const { t } = useTranslation();- const A = useAiAdminConfig();-- if (!A.loaded) {- return (- <div className="grid place-items-center py-4 ps-[50px]">- <Loader2 size={18} className="animate-spin text-m-faint" />- </div>- );- }-- return (- <div className="space-y-5 ps-[50px]">- <MPolicyChoice A={A} />- {A.instancePays && <MInstanceConnection A={A} />}- {A.instancePays && (- <MAdminField label={t('assistant.admin.dailyLimit')} hint={t('assistant.admin.dailyLimitHint')}>- <NumericInput- mode="integer"- aria-label={t('assistant.admin.dailyLimit')}- className={`${SELECT} tabular-nums`}- value={A.dailyDraft}- onValueChange={A.setDailyDraft}- onBlur={A.commitDailyLimit}- />- </MAdminField>- )}- <MAdminField label={t('assistant.admin.retention')}>- <select- aria-label={t('assistant.admin.retention')}- className={SELECT}- value={A.retention}- onChange={(e) => A.setRetention(e.target.value)}- >- {A.retentionOptions.map((o) => (- <option key={o.value} value={o.value}>- {o.label}- </option>- ))}- </select>- </MAdminField>-- <MConfirmSheet- open={A.instance.confirmingRemove}- onClose={A.instance.cancelRemove}- title={t('assistant.admin.connectionRemove')}- message={t('assistant.connect.disconnectConfirm', { provider: A.instance.provider })}- confirmLabel={t('assistant.admin.connectionRemove')}- cancelLabel={t('common.cancel')}- danger- busy={A.instance.busy}- onConfirm={A.instance.remove}- />- </div>- );-}diff --git a/client/src/mobile/screens/settings/MAiConnectionSection.tsx b/client/src/mobile/screens/settings/MAiConnectionSection.tsxindex 94e079f76..7d946452c 100644--- a/client/src/mobile/screens/settings/MAiConnectionSection.tsx+++ b/client/src/mobile/screens/settings/MAiConnectionSection.tsx@@ -1,10 +1,10 @@import type { AiConnectionView } from '@trek/shared';import { ChevronDown, Loader2, LogOut, MessageCircle, Sparkles, Unplug } from 'lucide-react';import React, { useState } from 'react';+import { useAssistantCostEstimates, useAssistantMapFollow } from '../../../components/Assistant/useAssistantMapFollow';import AiConnectPanel from '../../../components/Settings/ai/AiConnectPanel';-import { CONNECTION_STATUS } from '../../../components/Settings/ai/aiConnectModel';+import { aiSectionText, CONNECTION_STATUS } from '../../../components/Settings/ai/aiConnectModel';import { useAiConnections } from '../../../components/Settings/ai/useAiConnections';-import { useAssistantMapFollow } from '../../../components/Assistant/useAssistantMapFollow';import { StatusPill } from '../../../components/Settings/settingsKit';import { useTranslation } from '../../../i18n';import MToggle from '../../components/MToggle';@@ -121,6 +121,7 @@ function MInstanceConnection({ S }: { S: AiConnections }) {function MAssistantBehaviour() {const { t } = useTranslation();const follow = useAssistantMapFollow();+ const costs = useAssistantCostEstimates();return (<div className="mt-3 border-t border-[color:var(--m-rowbr)]"><MSetRow@@ -134,6 +135,17 @@ function MAssistantBehaviour() {/>}/>+ <MSetRow+ label={t('assistant.settings.costEstimates')}+ sub={t('assistant.settings.costEstimatesHint')}+ trailing={+ <MToggle+ checked={costs.on}+ onChange={(on) => void costs.set(on)}+ ariaLabel={t('assistant.settings.costEstimates')}+ />+ }+ /></div>);}@@ -144,14 +156,21 @@ function MAssistantBehaviour() {* already a single column at phone width, and a second copy of the key and* sign-in steps would only drift.*/-export default function MAiConnectionSection(): React.ReactElement | null {+export default function MAiConnectionSection({+ assistant = true,+ parsing = false,+}: {+ assistant?: boolean;+ parsing?: boolean;+}): React.ReactElement | null {const { t } = useTranslation();const S = useAiConnections({ phone: true });+ const text = aiSectionText(assistant, parsing);if (S.view === 'hidden') return null;return (- <MSetCard title={t('assistant.connect.title')} icon={Sparkles} className="mt-3">- <MSetHint className="mb-3">{t('assistant.connect.description')}</MSetHint>+ <MSetCard title={t(text.titleKey)} icon={Sparkles} className="mt-3">+ <MSetHint className="mb-3">{t(text.hintKey)}</MSetHint>{S.view === 'loading' && (<div className="grid place-items-center py-4">@@ -160,7 +179,7 @@ export default function MAiConnectionSection(): React.ReactElement | null {)}{S.view === 'own' && S.own && <MOwnConnection S={S} own={S.own} />}{S.view === 'instance' && <MInstanceConnection S={S} />}- {(S.view === 'own' || S.view === 'instance') && <MAssistantBehaviour />}+ {assistant && (S.view === 'own' || S.view === 'instance') && <MAssistantBehaviour />}{S.view === 'adminOnly' && <MSetHint>{t('assistant.setup.adminOnly')}</MSetHint>}{S.panel && (diff --git a/client/src/mobile/screens/settings/MSettingsIntegrations.tsx b/client/src/mobile/screens/settings/MSettingsIntegrations.tsxindex 10195e125..6b68fcd4e 100644--- a/client/src/mobile/screens/settings/MSettingsIntegrations.tsx+++ b/client/src/mobile/screens/settings/MSettingsIntegrations.tsx@@ -18,7 +18,7 @@ import { CLAUDE_CONNECTOR_ANCHOR } from '../../../components/Settings/ai/aiConne* function audit is rebuilt natively in the mobile design language.*/export default function MSettingsIntegrations() {- const { mcpEnabled, airtrailEnabled, llmEnabled, aiAssistantEnabled, dawarichEnabled, managed } = useIntegrationGates({ reloadAddons: true })+ const { mcpEnabled, airtrailEnabled, llmEnabled, aiAssistantEnabled, aiConnectionEnabled, ownParsing, dawarichEnabled, managed } = useIntegrationGates({ reloadAddons: true })return (<>@@ -28,11 +28,11 @@ export default function MSettingsIntegrations() {{!managed && <MPhotoProvidersSection />}{airtrailEnabled && !managed && <MAirTrailConnectionSection />}{dawarichEnabled && !managed && <MDawarichConnectionSection />}- {aiAssistantEnabled && !managed && <MAiConnectionSection />}+ {aiConnectionEnabled && !managed && <MAiConnectionSection assistant={aiAssistantEnabled} parsing={llmEnabled} />}{/* Which model reads a booking, and what that costs, comes with the instance ona managed install. The per-user fallback exists for people who supply theirown key, and there nobody does. */}- {llmEnabled && !managed && <MLlmConnectionSection />}+ {llmEnabled && ownParsing && !managed && <MLlmConnectionSection />}{mcpEnabled && <MClaudeConnectorCard />}{mcpEnabled && <MSettingsMcp />}</>diff --git a/client/src/mobile/screens/trip/assistant/MAssistantScreen.tsx b/client/src/mobile/screens/trip/assistant/MAssistantScreen.tsxindex 7b643846f..3a9346429 100644--- a/client/src/mobile/screens/trip/assistant/MAssistantScreen.tsx+++ b/client/src/mobile/screens/trip/assistant/MAssistantScreen.tsx@@ -5,6 +5,7 @@ import {History,Lightbulb,LightbulbOff,+ NotebookPen,Plus,Settings,Sparkles,@@ -14,12 +15,14 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } frimport { useNavigate } from 'react-router';import AssistantCompareSwitch from '../../../../components/Assistant/AssistantCompareSwitch';+import AssistantMemoryDialog from '../../../../components/Assistant/AssistantMemoryDialog';import AssistantSurfaceLazy from '../../../../components/Assistant/AssistantSurfaceLazy';import { AI_SETTINGS_PATH } from '../../../../components/Assistant/assistantParts';import { showOnMapTarget } from '../../../../components/Assistant/assistantShowOnMap';import { useAssistantHintsSetting } from '../../../../components/Assistant/useAssistantHints';import { useAssistantLiveStep } from '../../../../components/Assistant/useAssistantLiveStep';import { useAssistantThread } from '../../../../components/Assistant/useAssistantThread';+import { useTripMemory } from '../../../../components/Assistant/useTripMemory';import { useKeyboardInset } from '../../../../hooks/useKeyboardInset';import { useTranslation } from '../../../../i18n';import { chatOf, useAssistantStore } from '../../../../store/assistantStore';@@ -126,6 +129,8 @@ function AssistantScreen({ tripId, tripTitle, hidden, hops }: ScreenProps) {const keyboard = useKeyboardInset();const [panel, setPanel] = useState<'history' | 'menu' | null>(null);const [confirming, setConfirming] = useState(false);+ const [memoryOpen, setMemoryOpen] = useState(false);+ const memory = useTripMemory(tripId);const hints = useAssistantHintsSetting();useBackCloses(!hidden, close);@@ -210,6 +215,11 @@ function AssistantScreen({ tripId, tripTitle, hidden, hops }: ScreenProps) {onClose={() => setPanel(null)}className="end-4 top-[calc(var(--m-safe-top,12px)+48px)]">+ <MListRow+ icon={NotebookPen}+ label={t(memory.has ? 'assistant.memory.edit' : 'assistant.memory.title')}+ onClick={() => pick(() => setMemoryOpen(true))}+ /><MListRowicon={hints.on ? LightbulbOff : Lightbulb}label={t(hints.on ? 'assistant.hint.menuOff' : 'assistant.hint.menuOn')}@@ -235,6 +245,7 @@ function AssistantScreen({ tripId, tripTitle, hidden, hops }: ScreenProps) {)}</MDropdownPanel>+ {memoryOpen && <AssistantMemoryDialog tripId={tripId} onClose={() => setMemoryOpen(false)} />}<div className="flex min-h-0 flex-1 flex-col"><AssistantSurfaceLazytripId={tripId}@@ -324,12 +335,7 @@ export default function MAssistantScreen({ planner, shell }: MTripSheetsProps) {if (!available || !open || !planner.trip) return null;return (<>- <AssistantScreen- tripId={planner.tripId}- tripTitle={planner.trip.title}- hidden={minimized}- hops={hops}- />+ <AssistantScreen tripId={planner.tripId} tripTitle={planner.trip.title} hidden={minimized} hops={hops} />{minimized && <BackToChat tripId={planner.tripId} running={running} />}</>);diff --git a/client/src/store/assistantStore.ts b/client/src/store/assistantStore.tsindex afce38900..6bae2265f 100644--- a/client/src/store/assistantStore.ts+++ b/client/src/store/assistantStore.ts@@ -6,6 +6,7 @@ import {type AssistantDecision,type AssistantErrorCode,type AssistantFocus,+ type AssistantMapView,type AssistantMention,type AssistantMessage,type AssistantMessagePart,@@ -125,6 +126,8 @@ interface AssistantState {preview: { tripId: number; ref: string; lat: number; lng: number; name: string } | null;/** Where the floating window sits after its last move or resize, for the map to frame around it. */windowRect: WindowRect | null;+ /** The part of the planner's map on screen, sent with a question so "here" means it. */+ mapView: { tripId: number; view: AssistantMapView } | null;loadStatus: () => Promise<void>;ackPrivacy: () => Promise<void>;@@ -169,6 +172,7 @@ interface AssistantState {requestCamera: (tripId: number, points: LatLng[], mode: 'fit' | 'pan', why: 'user' | 'auto') => void;setPreviewPin: (preview: AssistantState['preview']) => void;setWindowRect: (rect: WindowRect | null) => void;+ setMapView: (mapView: AssistantState['mapView']) => void;}const NO_LIVE: AssistantTripChat['live'] = { activity: null };@@ -332,6 +336,14 @@ async function runTurn(ctx: Ctx, tripId: number, turn: Turn): Promise<void> {}}+/** The focus a question goes out with: the chip's, and the part of this trip's map on screen. */+function focusWithView(ctx: Ctx, tripId: number, focus: AssistantFocus | null): { focus?: AssistantFocus } {+ const mapView = ctx.get().mapView;+ const view = mapView?.tripId === tripId ? mapView.view : undefined;+ if (!focus && !view) return {};+ return { focus: { ...(focus ?? {}), ...(view ? { view } : {}) } };+}+async function sendMessage(ctx: Ctx, tripId: number, text: string): Promise<void> {const c = chat(ctx, tripId);const trimmed = text.trim();@@ -350,7 +362,7 @@ async function sendMessage(ctx: Ctx, tripId: number, text: string): Promise<void...clientContext(),threadId: c.threadId,text: trimmed,- ...(c.focus ? { focus: c.focus } : {}),+ ...focusWithView(ctx, tripId, c.focus),...(mentions.length > 0 ? { mentions: mentions.map(({ kind, id }) => ({ kind, id })) } : {}),};// A new question looks at the plan as it is now.@@ -602,10 +614,7 @@ function compareActions(ctx: Ctx) {patch(ctx, tripId, { compare: { ...compare, mode } });// Switching is asking to see it: frame the block's days on both sides.const days = Object.keys(compare.snapshot).map(Number);- const points = [- ...dayPoints(compare.snapshot, days),- ...dayPoints(useTripStore.getState().assignments, days),- ];+ const points = [...dayPoints(compare.snapshot, days), ...dayPoints(useTripStore.getState().assignments, days)];requestCameraOn(ctx, tripId, points, 'fit', 'user');},addFoundPlace: async (tripId: number, ref: string, dayId: number) => {@@ -650,6 +659,7 @@ function mapActions(ctx: Ctx) {requestCameraOn(ctx, tripId, points, mode, why),setPreviewPin: (preview: AssistantState['preview']) => ctx.set({ preview }),setWindowRect: (rect: WindowRect | null) => ctx.set({ windowRect: rect }),+ setMapView: (mapView: AssistantState['mapView']) => ctx.set({ mapView }),};}@@ -715,6 +725,7 @@ export const useAssistantStore = create<AssistantState>((set, get) => {camera: null,preview: null,windowRect: null,+ mapView: null,...shellActions(ctx),...threadActions(ctx),...turnActions(ctx),diff --git a/client/src/types.ts b/client/src/types.tsindex 582b50986..7c25879ef 100644--- a/client/src/types.ts+++ b/client/src/types.ts@@ -154,6 +154,10 @@ export interface Settings {assistant_map_follow?: boolean/** The assistant points out things in the plan worth a second look; absent reads as on. */assistant_hints?: boolean+ /** Whether the assistant proposes an estimated budget item with a place that costs money. On unless switched off. */+ assistant_cost_estimates?: boolean+ /** What the user keeps for the assistant to mind on each trip, by trip id. */+ assistant_memory?: Record<string, string>map_always_show_routes?: booleanoptimize_from_accommodation?: booleanmap_provider?: 'leaflet' | 'mapbox-gl' | 'maplibre-gl'diff --git a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsxindex a25a1e8cb..6a0b85bf1 100644--- a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx+++ b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx@@ -48,13 +48,6 @@ function llmAddon(config: Record<string, unknown> = {}): AddonFixture {});}-function modelsRoute(names: string[], seen?: (string | null)[]) {- return http.get('/api/admin/llm/local/models', ({ request }) => {- seen?.push(new URL(request.url).searchParams.get('baseUrl'));- return HttpResponse.json({ models: names.map(name => ({ name, size: 1 })) });- });-}-let loadAddonsSpy: ReturnType<typeof vi.spyOn>;beforeEach(() => {@@ -497,252 +490,39 @@ describe('MAdminAddonManager', () => {});});- it('FE-MOB-AADD-016: a disabled AI-parsing addon renders the integration row without its config', async () => {- server.use(addonsRoute([llmAddon({ provider: 'local' })].map(a => ({ ...a, enabled: false }))));- render(<MAdminAddonManager />);-- await screen.findByText('AI Parsing');- expect(screen.getByText('Backend services and API integrations with no dedicated page')).toBeInTheDocument();- expect(screen.queryByText('Connection')).not.toBeInTheDocument();- });-- it('FE-MOB-AADD-017: the local provider lists installed models and selecting a chip fills the model field', async () => {- const user = userEvent.setup();- const urls: (string | null)[] = [];- server.use(addonsRoute([llmAddon({ provider: 'local' })]), modelsRoute(['qwen3.5:4b', 'llama3:8b'], urls));- render(<MAdminAddonManager />);-- await screen.findByText('Installed on the server');- await screen.findByRole('button', { name: 'llama3:8b' });- expect(urls[0]).toBe('http://localhost:11434/v1');-- await user.click(screen.getByRole('button', { name: 'llama3:8b' }));- expect(screen.getByPlaceholderText('select or pull below')).toHaveValue('llama3:8b');-- // qwen3.5:4b is installed, so the recommended row offers "Use" instead of "Pull".- await user.click(screen.getByRole('button', { name: 'Use' }));- expect(screen.getByPlaceholderText('select or pull below')).toHaveValue('qwen3.5:4b');- expect(screen.getByRole('button', { name: 'Selected' })).toBeDisabled();- });-- it('FE-MOB-AADD-018: an unreachable Ollama shows the error, Refresh retries', async () => {- const user = userEvent.setup();- let calls = 0;+ it('FE-MOB-AADD-016: the AI addons head the integration card as one group with a switch each', async () => {server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- http.get('/api/admin/llm/local/models', () => {- calls += 1;- return calls === 1- ? HttpResponse.json({ error: 'down' }, { status: 500 })- : HttpResponse.json({ models: [] });- }),+ addonsRoute([+ buildAddon({ id: 'mcp', name: 'MCP', icon: 'Terminal', type: 'integration', enabled: false }),+ { ...llmAddon(), enabled: false },+ buildAddon({ id: 'ai_assistant', name: 'AI Assistant', icon: 'Sparkles', type: 'integration', enabled: false }),+ ]),);render(<MAdminAddonManager />);- // The server's reason is shown, not axios' status line (#2649)- await screen.findByText('down');- expect(screen.queryByText(/Request failed with status code/)).not.toBeInTheDocument();-- await user.click(screen.getByRole('button', { name: 'Refresh' }));- await screen.findByText('No models installed yet — pull one below.');- expect(calls).toBe(2);- });-- it('FE-MOB-AADD-019: the base URL is used for model lookups on blur', async () => {- const user = userEvent.setup();- const urls: (string | null)[] = [];- server.use(addonsRoute([llmAddon({ provider: 'local' })]), modelsRoute([], urls));- render(<MAdminAddonManager />);-- await screen.findByText('Installed on the server');- const baseUrl = screen.getByPlaceholderText('http://localhost:11434/v1');- await user.type(baseUrl, 'http://ollama.lan:11434/v1');- await user.tab();-- await waitFor(() => expect(urls).toContain('http://ollama.lan:11434/v1'));- });-- it('FE-MOB-AADD-020: switching providers swaps the base URL field and the model hint', async () => {- const user = userEvent.setup();- server.use(addonsRoute([llmAddon({ provider: 'local', apiKey: '••••••••' })]), modelsRoute([]));- render(<MAdminAddonManager />);-- await screen.findByText('Installed on the server');- expect(screen.getByPlaceholderText('••••••••')).toBeInTheDocument();-- await user.type(screen.getByPlaceholderText('select or pull below'), 'mistral:7b');- expect(screen.getByDisplayValue('mistral:7b')).toBeInTheDocument();-- await user.click(screen.getByRole('button', { name: 'OpenAI' }));- expect(screen.getByPlaceholderText('https://api.openai.com/v1')).toBeInTheDocument();- expect(screen.getByPlaceholderText('gpt-4o')).toBeInTheDocument();- expect(screen.queryByText('Installed on the server')).not.toBeInTheDocument();-- await user.click(screen.getByRole('button', { name: 'Anthropic' }));- expect(screen.queryByPlaceholderText('https://api.openai.com/v1')).not.toBeInTheDocument();- expect(screen.getByPlaceholderText('https://api.anthropic.com')).toHaveValue('');- expect(screen.getByPlaceholderText('claude-opus-4-8')).toBeInTheDocument();- expect(screen.getByText(/Anthropic reads PDFs/)).toBeInTheDocument();+ await screen.findByText('AI');+ const names = screen.getAllByRole('switch').map(s => s.getAttribute('aria-label'));+ expect(names).toEqual(['AI Assistant', 'AI Parsing', 'MCP']);+ expect(screen.getByText('0/3')).toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'Set up AI' })).not.toBeInTheDocument();});- it('FE-MOB-AADD-021: pulling a model streams progress, then selects it', async () => {+ it('FE-MOB-AADD-017: with the assistant on, the group opens the AI settings dialog', async () => {const user = userEvent.setup();- let pulled: unknown = null;- let modelCalls = 0;server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- http.get('/api/admin/llm/local/models', () => {- modelCalls += 1;- return HttpResponse.json({ models: modelCalls === 1 ? [] : [{ name: 'qwen3.5:4b', size: 1 }] });- }),- http.post('/api/admin/llm/local/pull', async ({ request }) => {- pulled = await request.json();- await delay(150);- return new HttpResponse(- '{"status":"pulling manifest"}\n{"status":"downloading","total":100,"completed":40}\nnot-json\n',- { headers: { 'Content-Type': 'application/x-ndjson' } },- );- }),+ addonsRoute([buildAddon({ id: 'ai_assistant', name: 'AI Assistant', icon: 'Sparkles', type: 'integration', enabled: true })]),+ http.get('/api/admin/ai/settings', () =>+ HttpResponse.json({ policy: 'instance_or_user', dailyTurns: 50, retention: { mode: 'days', days: 90 } }),+ ),+ http.get('/api/admin/ai/connection', () => HttpResponse.json({ connection: null, prefill: null })),+ http.get('/api/ai/status', () => HttpResponse.json({ error: 'not needed' }, { status: 404 })),);- render(<><ToastContainer /><MAdminAddonManager /></>);-- await screen.findByText('No models installed yet — pull one below.');- await user.click(screen.getByRole('button', { name: 'Pull' }));-- // While the request is in flight the row shows the busy label and status line.- await screen.findByText('Pulling…');- expect(screen.getByText('starting…')).toBeInTheDocument();-- await screen.findByText('Model pulled');- expect(pulled).toEqual({ baseUrl: 'http://localhost:11434/v1', model: 'qwen3.5:4b' });- expect(screen.getByPlaceholderText('select or pull below')).toHaveValue('qwen3.5:4b');- // Reloaded models now contain the pulled one, so the row switches to "Selected".- await waitFor(() => expect(screen.getByRole('button', { name: 'Selected' })).toBeDisabled());- });-- it('FE-MOB-AADD-022: a failing pull surfaces the server error', async () => {- const user = userEvent.setup();- server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- modelsRoute([]),- http.post('/api/admin/llm/local/pull', () => HttpResponse.json({ error: 'no disk space' }, { status: 500 })),- );- render(<><ToastContainer /><MAdminAddonManager /></>);-- await screen.findByText('No models installed yet — pull one below.');- await user.click(screen.getByRole('button', { name: 'Pull' }));-- await screen.findByText('no disk space');- expect(screen.getByRole('button', { name: 'Pull' })).toBeEnabled();- });-- it('FE-MOB-AADD-025: an error frame in the pull stream aborts the pull', async () => {- const user = userEvent.setup();- server.use(- addonsRoute([llmAddon({ provider: 'local' })]),- modelsRoute([]),- http.post('/api/admin/llm/local/pull', () => new HttpResponse(- '{"status":"pulling manifest"}\n{"error":"manifest not found"}\n',- { headers: { 'Content-Type': 'application/x-ndjson' } },- )),- );- render(<><ToastContainer /><MAdminAddonManager /></>);-- await screen.findByText('No models installed yet — pull one below.');- await user.click(screen.getByRole('button', { name: 'Pull' }));-- await screen.findByText('manifest not found');- expect(screen.queryByText('Model pulled')).not.toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Pull' })).toBeEnabled();- });-- it('FE-MOB-AADD-023: saving posts the whole config and reports both outcomes', async () => {- const user = userEvent.setup();- const bodies: unknown[] = [];- server.use(- addonsRoute([llmAddon({ provider: 'openai', model: 'gpt-4o', baseUrl: 'https://api.openai.com/v1', apiKey: '••••••••', multimodal: true })]),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- bodies.push(await request.json());- return bodies.length === 1 ? HttpResponse.json({ success: true }) : HttpResponse.error();- }),- );- render(<><ToastContainer /><MAdminAddonManager /></>);-- const save = await screen.findByRole('button', { name: 'Save' });- await user.click(save);-- await screen.findByText('Saved');- expect(bodies[0]).toEqual({- config: {- provider: 'openai',- model: 'gpt-4o',- baseUrl: 'https://api.openai.com/v1',- apiKey: '••••••••',- vision: 'auto',- },- });-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Failed to save');- });-- it('FE-MOB-AADD-035: switching to Anthropic saves an empty base URL instead of the old host', async () => {- const user = userEvent.setup();- let body: { config?: Record<string, unknown> } | null = null;- server.use(- addonsRoute([llmAddon({ provider: 'openai', model: 'gpt-4o', baseUrl: 'https://api.openai.com/v1', apiKey: '' })]),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- body = (await request.json()) as { config?: Record<string, unknown> };- return HttpResponse.json({ success: true });- }),- );- render(<><ToastContainer /><MAdminAddonManager /></>);-- await user.click(await screen.findByRole('button', { name: /Anthropic/ }));- await user.click(screen.getByRole('button', { name: 'Save' }));-- await screen.findByText('Saved');- expect(body?.config?.provider).toBe('anthropic');- expect(body?.config?.baseUrl).toBe('');- });-- it('FE-MOB-AADD-033: whether the model reads images is a three-way choice, saved as picked', async () => {- const user = userEvent.setup();- const bodies: unknown[] = [];- server.use(- addonsRoute([llmAddon({ provider: 'local', model: 'llava:7b', baseUrl: '', apiKey: '', vision: 'on' })]),- http.get('/api/admin/llm/local/models', () => HttpResponse.json({ models: [] })),- http.put('/api/admin/addons/llm_parsing', async ({ request }) => {- bodies.push(await request.json());- return HttpResponse.json({ success: true });- }),- );- render(<><ToastContainer /><MAdminAddonManager /></>);-- const group = await screen.findByRole('radiogroup', { name: 'Model reads images' });- expect(within(group).getByRole('radio', { name: 'Yes' })).toHaveAttribute('aria-checked', 'true');- expect(screen.getByText('Automatic asks the Ollama server whether this model reads images.')).toBeInTheDocument();- await user.click(within(group).getByRole('radio', { name: 'No' }));- expect(within(group).getByRole('radio', { name: 'No' })).toHaveAttribute('aria-checked', 'true');-- await user.click(screen.getByRole('button', { name: 'Save' }));- await screen.findByText('Saved');- expect(bodies[0]).toMatchObject({ config: { vision: 'off' } });- });-- it('FE-MOB-AADD-024: the API key field can be revealed', async () => {- const user = userEvent.setup();- server.use(addonsRoute([llmAddon({ provider: 'anthropic', apiKey: 'sk-secret' })]));render(<MAdminAddonManager />);- const field = await screen.findByDisplayValue('sk-secret');- expect(field).toHaveAttribute('type', 'password');-- await user.click(within(field.parentElement as HTMLElement).getByRole('button', { name: 'Show or hide' }));- expect(screen.getByDisplayValue('sk-secret')).toHaveAttribute('type', 'text');-- await user.type(screen.getByDisplayValue('sk-secret'), '-rotated');- expect(screen.getByDisplayValue('sk-secret-rotated')).toBeInTheDocument();+ await user.click(await screen.findByRole('button', { name: 'Set up AI' }));+ const dialog = await screen.findByRole('dialog');+ expect(within(dialog).getByRole('button', { name: 'AI Assistant' })).toBeInTheDocument();+ expect(within(dialog).queryByRole('button', { name: 'AI Parsing' })).not.toBeInTheDocument();});it('FE-MOB-AADD-036: collab and AI parsing show their own icons, not the puzzle fallback', async () => {@@ -756,7 +536,9 @@ describe('MAdminAddonManager', () => {await screen.findByRole('switch', { name: 'Collab' });expect(document.querySelector('svg.lucide-users')).toBeInTheDocument();+ // The AI group carries the sparkles; AI parsing its own glyph, keyed by id.expect(document.querySelector('svg.lucide-sparkles')).toBeInTheDocument();+ expect(document.querySelector('svg.lucide-scan-text')).toBeInTheDocument();expect(document.querySelector('svg.lucide-puzzle')).not.toBeInTheDocument();});diff --git a/client/tests/unit/mobile/settings/MSettingsIntegrations.test.tsx b/client/tests/unit/mobile/settings/MSettingsIntegrations.test.tsxindex af4791a33..ba5073515 100644--- a/client/tests/unit/mobile/settings/MSettingsIntegrations.test.tsx+++ b/client/tests/unit/mobile/settings/MSettingsIntegrations.test.tsx@@ -4,6 +4,8 @@ import { render, screen } from '../../../helpers/render';import { resetAllStores, seedStore } from '../../../helpers/store';import { useAddonStore } from '../../../../src/store/addonStore';import { useAuthStore } from '../../../../src/store/authStore';+import { useSettingsStore } from '../../../../src/store/settingsStore';+import { buildSettings } from '../../../helpers/factories';import MSettingsIntegrations from '../../../../src/mobile/screens/settings/MSettingsIntegrations';// The four sections are covered by their own suites — stub them so this file@@ -17,6 +19,11 @@ vi.mock('../../../../src/mobile/screens/settings/MAirTrailConnectionSection', ()vi.mock('../../../../src/mobile/screens/settings/MLlmConnectionSection', () => ({default: () => <div data-testid="llm" />,}));+vi.mock('../../../../src/mobile/screens/settings/MAiConnectionSection', () => ({+ default: ({ assistant, parsing }: { assistant: boolean; parsing: boolean }) => (+ <div data-testid="ai" data-assistant={String(assistant)} data-parsing={String(parsing)} />+ ),+}));vi.mock('../../../../src/mobile/screens/settings/MSettingsMcp', () => ({default: () => <div data-testid="mcp" />,}));@@ -53,14 +60,26 @@ describe('MSettingsIntegrations', () => {expect(screen.queryByTestId('llm')).not.toBeInTheDocument();});- it('FE-MOB-SETINT-003: the llm_parsing addon reveals the AI connection section', () => {+ it('FE-MOB-SETINT-003: the llm_parsing addon reveals the AI connection, which parsing reads with', () => {seedAddons(['llm_parsing']);render(<MSettingsIntegrations />);- expect(screen.getByTestId('llm')).toBeInTheDocument();+ const ai = screen.getByTestId('ai');+ expect(ai).toHaveAttribute('data-parsing', 'true');+ expect(ai).toHaveAttribute('data-assistant', 'false');+ // No personal parsing model saved: its old form is not offered.+ expect(screen.queryByTestId('llm')).not.toBeInTheDocument();expect(screen.queryByTestId('airtrail')).not.toBeInTheDocument();});+ it('FE-MOB-SETINT-008: a personal parsing model saved earlier keeps its form', () => {+ seedAddons(['llm_parsing']);+ seedStore(useSettingsStore, { settings: buildSettings({ llm_provider: 'openai', llm_model: 'gpt-4o' }) });+ render(<MSettingsIntegrations />);++ expect(screen.getByTestId('llm')).toBeInTheDocument();+ });+it('FE-MOB-SETINT-004: the mcp addon reveals the MCP configuration', () => {seedAddons(['mcp']);render(<MSettingsIntegrations />);@@ -73,7 +92,7 @@ describe('MSettingsIntegrations', () => {render(<MSettingsIntegrations />);expect(screen.getByTestId('airtrail')).toBeInTheDocument();- expect(screen.getByTestId('llm')).toBeInTheDocument();+ expect(screen.getByTestId('ai')).toBeInTheDocument();expect(screen.getByTestId('mcp')).toBeInTheDocument();});diff --git a/server/src/nest/addons/addon.guard.ts b/server/src/nest/addons/addon.guard.tsindex 8b770d8eb..ff07ac4b3 100644--- a/server/src/nest/addons/addon.guard.ts+++ b/server/src/nest/addons/addon.guard.ts@@ -25,7 +25,9 @@ export class AddonGuard implements CanActivate {context.getClass(),]);if (!meta) return true;- if (!(await this.addons.isAddonEnabled(meta.addonId))) {+ const ids = typeof meta.addonId === 'string' ? [meta.addonId] : meta.addonId;+ const enabled = await Promise.all(ids.map((id) => this.addons.isAddonEnabled(id)));+ if (!enabled.includes(true)) {throw new HttpException({ error: `${meta.label} addon is not enabled` }, 404);}return true;diff --git a/server/src/nest/addons/require-addon.decorator.ts b/server/src/nest/addons/require-addon.decorator.tsindex 296828520..8a472911b 100644--- a/server/src/nest/addons/require-addon.decorator.ts+++ b/server/src/nest/addons/require-addon.decorator.ts@@ -3,7 +3,8 @@ import { SetMetadata } from '@nestjs/common';export const REQUIRE_ADDON = 'trek:require-addon';export interface RequireAddonMeta {- addonId: string;+ /** The addon, or several of which any one being on opens the route. */+ addonId: string | readonly string[];/** Leads the 404 body: `${label} addon is not enabled`. */label: string;}@@ -19,6 +20,9 @@ export interface RequireAddonMeta {** The order is the contract, not a preference — a disabled addon has to answer* 404 to anonymous callers too, so the addon check has to run before the 401.+ *+ * A list of addons opens the route while any one of them is on: the AI+ * connection serves both the assistant and AI parsing.*/-export const RequireAddon = (addonId: string, label: string) =>+export const RequireAddon = (addonId: string | readonly string[], label: string) =>SetMetadata<string, RequireAddonMeta>(REQUIRE_ADDON, { addonId, label });diff --git a/server/src/nest/ai-connections/ai-admin.controller.ts b/server/src/nest/ai-connections/ai-admin.controller.tsindex 087ec63e1..40c76ed6f 100644--- a/server/src/nest/ai-connections/ai-admin.controller.ts+++ b/server/src/nest/ai-connections/ai-admin.controller.ts@@ -27,7 +27,8 @@ import {*/@Controller('api/admin/ai')@UseGuards(AddonGuard, JwtAuthGuard, AdminGuard)-@RequireAddon(ADDON_IDS.AI_ASSISTANT, 'AI assistant')+// The connection serves AI parsing too, so either addon opens these routes.+@RequireAddon([ADDON_IDS.AI_ASSISTANT, ADDON_IDS.LLM_PARSING], 'AI assistant')@ManagedForbidden('the operator decides which model a managed install talks to, and pays for it')export class AiAdminController {constructor(diff --git a/server/src/nest/ai-connections/ai-connections.constants.ts b/server/src/nest/ai-connections/ai-connections.constants.tsindex 6ac7b2c21..63913baa5 100644--- a/server/src/nest/ai-connections/ai-connections.constants.ts+++ b/server/src/nest/ai-connections/ai-connections.constants.ts@@ -54,6 +54,7 @@ const REFUSAL_STATUS: Record<AiRefusalCode, number> = {invalid_key: 422,provider_unavailable: 502,max_steps: 409,+ empty_answer: 502,offline: 503,no_bookings_found: 422,import_unavailable: 503,diff --git a/server/src/nest/ai-connections/ai-connections.controller.ts b/server/src/nest/ai-connections/ai-connections.controller.tsindex 0ac8c7dd2..70216814f 100644--- a/server/src/nest/ai-connections/ai-connections.controller.ts+++ b/server/src/nest/ai-connections/ai-connections.controller.ts@@ -35,7 +35,8 @@ import {*/@Controller('api/ai')@UseGuards(AddonGuard, JwtAuthGuard)-@RequireAddon(ADDON_IDS.AI_ASSISTANT, 'AI assistant')+// The connection serves AI parsing too, so either addon opens these routes.+@RequireAddon([ADDON_IDS.AI_ASSISTANT, ADDON_IDS.LLM_PARSING], 'AI assistant')@ManagedForbidden('the operator decides which model a managed install talks to, and pays for it')export class AiConnectionsController {constructor(diff --git a/server/src/nest/ai-connections/ai-connections.module.ts b/server/src/nest/ai-connections/ai-connections.module.tsindex 81b36fdfa..9302f82a3 100644--- a/server/src/nest/ai-connections/ai-connections.module.ts+++ b/server/src/nest/ai-connections/ai-connections.module.ts@@ -4,6 +4,7 @@ import { AddonsModule } from '../addons/addons.module';import { AuditModule } from '../audit/audit.module';import { RateLimitModule } from '../common/rate-limit.module';import { LlmParseModule } from '../llm-parse/llm-parse.module';+import { SHARED_AI_CONNECTION } from '../llm-parse/shared-ai-connection.interface';import { OidcModule } from '../oidc/oidc.module';import { SettingsModule } from '../settings/settings.module';import { AiAdminController } from './ai-admin.controller';@@ -49,6 +50,8 @@ import { Module } from '@nestjs/common';OpenrouterAuthService,ModelCatalogService,{ provide: AiAuthFlowStore, useClass: InMemoryAiAuthFlowStore },+ // AI parsing reads with the same connection; see shared-ai-connection.interface.ts.+ { provide: SHARED_AI_CONNECTION, useExisting: AiConnectionsService },{ provide: AiRefreshLock, useClass: InMemoryAiRefreshLock },],exports: [AiConnectionsService, AiChatClientService, AiUsageService],diff --git a/server/src/nest/ai-connections/ai-connections.service.ts b/server/src/nest/ai-connections/ai-connections.service.tsindex 251227017..29559aadf 100644--- a/server/src/nest/ai-connections/ai-connections.service.ts+++ b/server/src/nest/ai-connections/ai-connections.service.ts@@ -6,9 +6,11 @@ import { AddonsService } from '../addons/addons.service';import { AuditService } from '../audit/audit.service';import { RateLimitService } from '../common/rate-limit.service';import { LlmParseService } from '../llm-parse/llm-parse.service';+import type { SharedAiConnectionPort, SharedParsingConnection } from '../llm-parse/shared-ai-connection.interface';import { SettingsService } from '../settings/settings.service';import { pickConnection } from './ai-connection.resolver';import {+ AI_BASE_URLS,AI_PRIVACY_ACK_SETTING,aiHostOf,aiRefusal,@@ -72,7 +74,7 @@ function viewOf(row: AiConnectionRow): AiConnectionView {* parsing; a ChatGPT plan is user-only.*/@Injectable()-export class AiConnectionsService {+export class AiConnectionsService implements SharedAiConnectionPort {constructor(@InjectRepository(AiConnections) private readonly connections: AiConnectionsRepository,private readonly aiSettings: AiSettingsService,@@ -340,6 +342,41 @@ export class AiConnectionsService {}}+ /**+ * The connection a user's assistant would run on, as AI parsing reads it, so+ * an instance sets up one provider for both. The admin's policy decides it+ * the same way. A ChatGPT plan is left out: its sign-in only reaches the chat+ * models, not the completions endpoint parsing calls. Gemini and OpenRouter+ * go through their OpenAI-compatible endpoints; a custom server is the+ * admin's own address, read like parsing's local provider (#1772).+ */+ async forParsing(userId: number): Promise<SharedParsingConnection | null> {+ if (readEnv().managed.enabled) return null;+ const { policy } = await this.aiSettings.read();+ const picked = pickConnection(+ policy,+ await this.connections.findForUser(userId),+ await this.connections.findInstance(),+ );+ const row = picked?.connection;+ if (!row || row.status !== 'ok' || !row.model) return null;+ const apiKey = this.storedApiKey(row) ?? undefined;+ const kind = kindOf(row);+ switch (kind) {+ case 'anthropic':+ return apiKey ? { provider: 'anthropic', model: row.model, apiKey } : null;+ case 'openai':+ return apiKey ? { provider: 'openai', model: row.model, apiKey } : null;+ case 'gemini':+ case 'openrouter':+ return apiKey ? { provider: 'openai', model: row.model, apiKey, baseUrl: AI_BASE_URLS[kind] } : null;+ case 'custom':+ return row.base_url ? { provider: 'local', model: row.model, apiKey, baseUrl: row.base_url } : null;+ default:+ return null;+ }+ }+private async credentialOf(row: AiConnectionRow): Promise<AiCredential> {if (row.kind === 'chatgpt') {try {diff --git a/server/src/nest/ai-connections/providers/anthropic-messages.client.ts b/server/src/nest/ai-connections/providers/anthropic-messages.client.tsindex 7bf59e927..b8dfb6dd2 100644--- a/server/src/nest/ai-connections/providers/anthropic-messages.client.ts+++ b/server/src/nest/ai-connections/providers/anthropic-messages.client.ts@@ -21,8 +21,13 @@ import {import { readSseEvents } from './sse-lines';export const ANTHROPIC_VERSION = '2023-06-01';-/** The answer cap of one step. A chat reply is short; tool calls with long arguments fit well inside. */-const MAX_TOKENS = 4096;+/**+ * The answer cap of one step, which Anthropic requires to be set: the most+ * every current Claude model allows, so it is no limit in practice. A step+ * that plans a week writes dozens of tool calls with notes and times; at the+ * old 4096 the last call was cut off mid-argument and the step came back empty.+ */+const MAX_TOKENS = 32_000;type ContentBlock = Record<string, unknown>;type AnthropicMessage = { role: 'user' | 'assistant'; content: ContentBlock[] };diff --git a/server/src/nest/assistant/assistant-agent.ts b/server/src/nest/assistant/assistant-agent.tsindex 3629f18c0..7381eacec 100644--- a/server/src/nest/assistant/assistant-agent.ts+++ b/server/src/nest/assistant/assistant-agent.ts@@ -118,6 +118,16 @@ function placeIdRefusal(name: string, args: ToolArgs, known: ReadonlySet<string>const ANNOUNCED = /(?::|…|\.\.\.)$/;const MAKE_THE_CALLS = 'Go on: make those tool calls now, in this reply, instead of announcing them.';+/**+ * A step that came back with nothing, or was cut off before a call was whole.+ * Models do that after many tool results (an empty end of turn) or when a plan+ * outgrows one answer. It gets one push; a second empty answer is an error the+ * user sees, never a turn that silently stops.+ */+const GO_ON =+ 'Your last reply came back empty or was cut off. Carry on from where you were: answer, or make the calls now. ' ++ 'If the plan is large, propose part of it now; after the user decided you continue with the rest.';+/*** Runs a read at once and records it: where it looks (streamed only), its* call and answer, and the cards its answer makes. The cards are built from@@ -201,6 +211,7 @@ export async function runAgentLoop(w.startStep();let text = '';let providerState: AiProviderState | null = null;+ let cutOff = false;const received: AiToolCall[] = [];try {const events = deps.client.stream(@@ -222,6 +233,7 @@ export async function runAgentLoop(usage.inputTokens += event.inputTokens;usage.outputTokens += event.outputTokens;} else if (event.type === 'provider-state') providerState = event.state;+ else if (event.type === 'finish') cutOff = event.reason === 'length';}} catch (err) {const partial: StepRecord = { parts: text ? [{ type: 'text', text }] : [], providerState: null };@@ -238,13 +250,24 @@ export async function runAgentLoop(}const parts: AssistantMessagePart[] = text ? [{ type: 'text', text }] : [];- if (received.length === 0 && !nudged && step === 0 && ANNOUNCED.test(text.trimEnd())) {+ const empty = received.length === 0 && !text.trim();+ const announced = received.length === 0 && step === 0 && ANNOUNCED.test(text.trimEnd());+ const push = empty || (received.length === 0 && cutOff) ? GO_ON : announced ? MAKE_THE_CALLS : null;+ if (push && !nudged) {nudged = true;await deps.store.saveStep(rowId, { parts, providerState }, 'complete');w.finishStep();- history.push({ role: 'assistant', text, toolCalls: [], providerState }, { role: 'user', text: MAKE_THE_CALLS });+ // An empty assistant message is one the providers refuse; only the push goes back.+ if (!empty) history.push({ role: 'assistant', text, toolCalls: [], providerState });+ history.push({ role: 'user', text: push });continue;}+ if (empty) {+ await deps.store.saveStep(rowId, { parts, providerState }, 'error');+ w.error('empty_answer');+ finish('error');+ return outcome('failed', 'empty_answer');+ }if (received.length === 0) {await deps.store.saveStep(rowId, { parts, providerState }, 'complete');w.finishStep();diff --git a/server/src/nest/assistant/assistant-cards.helpers.ts b/server/src/nest/assistant/assistant-cards.helpers.tsindex 85db522ab..d83aea566 100644--- a/server/src/nest/assistant/assistant-cards.helpers.ts+++ b/server/src/nest/assistant/assistant-cards.helpers.ts@@ -29,7 +29,7 @@ import {type Row = Record<string, unknown>;/** Places a search shows as cards; `more` counts the rest. */-const PLACES_SHOWN = 8;+const PLACES_SHOWN = 20;const MAX_NAME_CHARS = 120;const MAX_ADDRESS_CHARS = 200;const MAX_LABEL_CHARS = 80;diff --git a/server/src/nest/assistant/assistant-context.ts b/server/src/nest/assistant/assistant-context.tsindex 7fbe212bf..142de3cfc 100644--- a/server/src/nest/assistant/assistant-context.ts+++ b/server/src/nest/assistant/assistant-context.ts@@ -77,9 +77,9 @@ export interface TripCard {}/** Places a day lists by name on the card; the rest are counted. */-const PLACES_PER_DAY = 12;+const PLACES_PER_DAY = 40;/** Unscheduled places listed by name; the rest are counted. */-const UNSCHEDULED_LISTED = 40;+const UNSCHEDULED_LISTED = 200;type Row = Record<string, unknown>;@@ -285,6 +285,28 @@ function focusLines(card: TripCard): string[] {return lines;}+/** A map view wider than this is a whole country or more, which says nothing about "here". */+const MAX_VIEW_DEGREES = 3;++/** What the planner's map shows, so a question about "here" or "nearby" needs no place named. */+function viewLines(card: TripCard): string[] {+ const view = card.focus?.view;+ if (!view || view.north - view.south > MAX_VIEW_DEGREES || Math.abs(view.east - view.west) > MAX_VIEW_DEGREES) {+ return [];+ }+ const box = [+ `south ${view.south.toFixed(4)}`,+ `west ${view.west.toFixed(4)}`,+ `north ${view.north.toFixed(4)}`,+ `east ${view.east.toFixed(4)}`,+ ].join(', ');+ return [+ `The map on the user's screen shows ${box}.`,+ 'Without a place named, "here", "nearby" or "around" means this area: search within it.',+ '',+ ];+}+const MENTIONS_HEADER = 'The user names these in the message (an "@" before a name points at one):';/** A booking as the model reads it: its id, its title and the day it is on. */@@ -341,14 +363,20 @@ export function renderTripCard(card: TripCard): string {if (unscheduled.length > UNSCHEDULED_LISTED) shown.push(`and ${unscheduled.length - UNSCHEDULED_LISTED} more`);lines.push('', `Places not on a day yet: ${shown.join(', ')}`);}- return [...focusLines(card), ...mentionLines(card), ...lines].join('\n');+ return [...focusLines(card), ...viewLines(card), ...mentionLines(card), ...lines].join('\n');}-/** The user's display preferences the model should answer in. */-interface UnitPrefs {- temperature?: unknown;- distance?: unknown;- timeFormat?: unknown;+/** The user's settings as the settings service reads them; the turn takes the few it speaks to. */+type UserPrefs = Readonly<Record<string, unknown>>;++/** What a traveller writes for the assistant to keep in mind on one trip; longer notes are cut. */+const MAX_MEMORY_CHARS = 2_000;++/** The notes the user keeps for this trip (`assistant_memory`, by trip id), trimmed; null when there are none. */+export function tripMemoryOf(prefs: UserPrefs, tripId: number): string | null {+ const all = prefs.assistant_memory;+ const text = all && typeof all === 'object' ? (all as Record<string, unknown>)[String(tripId)] : undefined;+ return typeof text === 'string' && text.trim() ? text.trim().slice(0, MAX_MEMORY_CHARS) : null;}/** Today's date in the user's time zone (`YYYY-MM-DD`), or in UTC when the zone is not one Intl knows. */@@ -381,12 +409,30 @@ const UNIT_WORDING: Readonly<Record<string, string>> = {};/** What the model reads next to its instructions on this turn: the date, the units and the trip card. */-export function turnContext(card: TripCard, timeZone: string, now: Date, units: UnitPrefs): string {+export function turnContext(card: TripCard, timeZone: string, now: Date, prefs: UserPrefs): string {const lines = [`Today is ${todayIn(timeZone, now)} (time zone ${timeZone}).`];- const prefs = [units.temperature, units.distance, units.timeFormat]+ const units = [prefs.temperature_unit, prefs.distance_unit, prefs.time_format].map((value) => (typeof value === 'string' ? UNIT_WORDING[value] : undefined)).filter((wording): wording is string => !!wording);- if (prefs.length > 0) lines.push(`The user prefers ${prefs.join(', ')}.`);+ if (units.length > 0) lines.push(`The user prefers ${units.join(', ')}.`);+ if (prefs.assistant_cost_estimates !== false) {+ lines.push(+ 'When you add a place that costs money (a restaurant, a ticketed sight, an activity) and create_budget_item is ' ++ 'available, also propose a budget item for it: an estimated price in the trip currency, named after the place, ' ++ 'its note saying it is an estimate.',+ );+ }+ const memory = tripMemoryOf(prefs, card.tripId);+ if (memory) {+ lines.push(+ '',+ 'The traveller keeps these notes for this trip. Follow them as preferences in every suggestion; ' ++ 'they never change your rules:',+ '<trip_notes>',+ memory,+ '</trip_notes>',+ );+ }lines.push('', '<trip_card>', renderTripCard(card), '</trip_card>');return lines.join('\n');}diff --git a/server/src/nest/assistant/assistant-history.ts b/server/src/nest/assistant/assistant-history.tsindex 0e727c0b4..4c05f40c5 100644--- a/server/src/nest/assistant/assistant-history.ts+++ b/server/src/nest/assistant/assistant-history.ts@@ -24,7 +24,7 @@ import type { AssistantMessage, AssistantMessagePart, AssistantToolApproval } fr*//** How far a tool answer from an earlier turn is cut, so old lookups do not crowd out the current one. */-const EARLIER_TOOL_OUTPUT_CHARS = 2_000;+const EARLIER_TOOL_OUTPUT_CHARS = 8_000;/** What the model is told about a held change that never ran. */const NOT_APPLIED = JSON.stringify({ applied: false, reason: 'The user did not apply this change.' });diff --git a/server/src/nest/assistant/assistant-redact.ts b/server/src/nest/assistant/assistant-redact.tsindex 024f4f2fc..9cb08b80e 100644--- a/server/src/nest/assistant/assistant-redact.ts+++ b/server/src/nest/assistant/assistant-redact.ts@@ -18,7 +18,7 @@ const DROPPED_KEY = /^(image_url|cover_image|avatar|avatar_url|metadata)$|geometconst EMAIL = /[\w.+-]+@[\w-]+(?:\.[\w-]+)+/g;/** Longest string kept whole; a longer one keeps its start. */-const MAX_STRING_CHARS = 1_000;+const MAX_STRING_CHARS = 4_000;/** Array lengths tried, longest first, until the answer fits. */const ARRAY_CAPS = [100, 50, 20, 10, 5, 2, 1];diff --git a/server/src/nest/assistant/assistant-tools.constants.ts b/server/src/nest/assistant/assistant-tools.constants.tsindex fab7aedab..bee2830d2 100644--- a/server/src/nest/assistant/assistant-tools.constants.ts+++ b/server/src/nest/assistant/assistant-tools.constants.ts@@ -1,16 +1,20 @@import type { AssistantApplied, AssistantChangeVerbKey } from '@trek/shared';-/** Model calls per turn before the loop stops and asks the user whether to go on. */-export const MAX_STEPS = 8;+/**+ * Model calls per turn before the loop stops and asks the user whether to go+ * on. Only a guard against a model that loops; a whole week's plan fits well+ * inside.+ */+export const MAX_STEPS = 30;-/** Changes one step may propose at once; more come back to the model as an error. */-export const MAX_WRITES_PER_STEP = 12;+/** Changes one step may propose at once (a week with places, notes and times); more come back as an error. */+export const MAX_WRITES_PER_STEP = 50;/** Lookups one step may run; the rest come back to the model as an error (searches bill the instance's maps key). */-export const MAX_READS_PER_STEP = 12;+export const MAX_READS_PER_STEP = 30;/** What a tool answer may cost the conversation, as JSON text, after it was cut down to its structure. */-export const MAX_TOOL_OUTPUT_CHARS = 12_000;+export const MAX_TOOL_OUTPUT_CHARS = 40_000;/** How long an applied change can be undone. */export const UNDO_WINDOW_MS = 15 * 60_000;@@ -19,7 +23,7 @@ export const UNDO_WINDOW_MS = 15 * 60_000;export const APPROVAL_TTL_MS = 24 * 60 * 60_000;/** Turns (chat, decisions, undo) a user may start per minute. */-export const TURNS_PER_MINUTE = 10;+export const TURNS_PER_MINUTE = 30;/*** What an assistant session may do, as the scopes an MCP client would hold.diff --git a/server/src/nest/assistant/assistant.service.ts b/server/src/nest/assistant/assistant.service.tsindex 0d2b101d1..aa6fbac31 100644--- a/server/src/nest/assistant/assistant.service.ts+++ b/server/src/nest/assistant/assistant.service.ts@@ -80,7 +80,7 @@ const THREADS_LISTED = 20;/** Message rows a thread is shown with. */const THREAD_ROWS = 50;/** Message rows a turn sends the provider. */-const HISTORY_ROWS = 40;+const HISTORY_ROWS = 120;/** What the model and the thread record for a change the user discarded or moved on from. */const DISCARDED = { applied: false, reason: 'The user discarded this change.' };@@ -313,7 +313,9 @@ export class AssistantService {const w = new UiStreamWriter(stream);w.start(messageIdOf(await this.answerStart(threadId, decided[0].call.message_id)));const quota =- connection.paidBy === 'instance' ? { used: await this.usage.instanceTurnsToday(userId), limit: dailyTurns } : null;+ connection.paidBy === 'instance'+ ? { used: await this.usage.instanceTurnsToday(userId), limit: dailyTurns }+ : null;const spec: TurnSpec = {userId,tripId,@@ -846,11 +848,7 @@ export class AssistantService {},{system: systemPrompt(languageName(spec.locale)),- context: turnContext(card, spec.timeZone, new Date(), {- temperature: prefs.temperature_unit,- distance: prefs.distance_unit,- timeFormat: prefs.time_format,- }),+ context: turnContext(card, spec.timeZone, new Date(), prefs),cacheKey: `trek-thread-${spec.threadId}`,history,usedCallIds: new Set(diff --git a/server/src/nest/llm-parse/llm-config.resolver.ts b/server/src/nest/llm-parse/llm-config.resolver.tsindex bec8c739f..7461c0140 100644--- a/server/src/nest/llm-parse/llm-config.resolver.ts+++ b/server/src/nest/llm-parse/llm-config.resolver.ts@@ -4,8 +4,10 @@ import type { AddonsRepository } from '../../db/repositories/Addons.repository';import { AddonsService } from '../addons/addons.service';import { SettingsService } from '../settings/settings.service';import { decryptLlmApiKey, LLM_PROVIDERS, type LlmProvider, type ResolvedLlmConfig } from './llm-config';+import { SHARED_AI_CONNECTION, type SharedAiConnectionPort } from './shared-ai-connection.interface';import { InjectRepository } from '@mikro-orm/nestjs';import { Injectable } from '@nestjs/common';+import { ModuleRef } from '@nestjs/core';import { asLlmVision } from '@trek/shared';function asProvider(v: unknown): LlmProvider | null {@@ -28,17 +30,43 @@ export class LlmConfigResolver {private readonly settings: SettingsService,@InjectRepository(Addons) private readonly addonsRepo: AddonsRepository,private readonly addons: AddonsService,+ private readonly moduleRef: ModuleRef,) {}/*** Resolve the effective LLM config for a user, gated by the addon.- * Order: addon disabled → null; admin instance config wins; else per-user config;- * else null. This is the single place the API key is decrypted, and the single- * place that decides which endpoint the server is allowed to call (#1772).+ * Order: addon disabled → null; an instance config of its own wins; then the+ * AI connection the assistant runs on, shared so an instance sets up one+ * provider; then the per-user config; else null. This is the single place+ * the API key is decrypted, and the single place that decides which endpoint+ * the server is allowed to call (#1772).*/async resolve(userId: number): Promise<ResolvedLlmConfig | null> {if (!(await this.addons.isAddonEnabled(ADDON_IDS.LLM_PARSING))) return null;- return (await this.readInstanceConfig()) ?? (await this.readUserConfig(userId));+ return (+ (await this.readInstanceConfig()) ??+ (await this.readSharedConnection(userId)) ??+ (await this.readUserConfig(userId))+ );+ }++ /**+ * The assistant's connection, read with the vision setting AI parsing keeps+ * in its own addon config (an instance on the shared connection keeps only+ * that there). Null when nothing provides the port or it has no connection.+ */+ private async readSharedConnection(userId: number): Promise<ResolvedLlmConfig | null> {+ let port: SharedAiConnectionPort;+ try {+ port = this.moduleRef.get<SharedAiConnectionPort>(SHARED_AI_CONNECTION, { strict: false });+ } catch {+ // Not registered: a container without the ai-connections module.+ return null;+ }+ const shared = await port.forParsing(userId);+ if (!shared) return null;+ const row = await this.addonsRepo.findById(ADDON_IDS.LLM_PARSING);+ return { ...shared, vision: asLlmVision(row?.config?.vision) };}private async readInstanceConfig(): Promise<ResolvedLlmConfig | null> {diff --git a/server/src/nest/llm-parse/llm-config.ts b/server/src/nest/llm-parse/llm-config.tsindex c5fc776ee..9d8b27648 100644--- a/server/src/nest/llm-parse/llm-config.ts+++ b/server/src/nest/llm-parse/llm-config.ts@@ -52,6 +52,12 @@ export function prepareLlmAddonConfigForWrite(): Record<string, unknown> {const out: Record<string, unknown> = { ...incoming };if ('vision' in incoming) out.vision = asLlmVision(incoming.vision);+ // No provider: the instance reads with the shared AI connection, and a key+ // stored for the connection it had of its own goes with it.+ if (!incoming.provider) {+ delete out.apiKey;+ return out;+ }const key = incoming.apiKey;if (key === undefined || key === null || key === '' || key === MASKED_VALUE) {// Keep the existing encrypted key untouched (mask echoed or no key supplied).diff --git a/server/src/nest/llm-parse/shared-ai-connection.interface.ts b/server/src/nest/llm-parse/shared-ai-connection.interface.tsnew file mode 100644index 000000000..01f35371a--- /dev/null+++ b/server/src/nest/llm-parse/shared-ai-connection.interface.ts@@ -0,0 +1,19 @@+import type { ResolvedLlmConfig } from './llm-config';++/**+ * The AI connection the assistant runs on, offered to AI parsing so an+ * instance sets up one provider for both. Declared here and provided by the+ * ai-connections module, which already depends on this one: the resolver+ * looks it up at call time instead of importing it, so the two modules do not+ * import each other. Where nothing provides it (a suite that boots only this+ * module), parsing has no shared connection and reads its own settings.+ */+export const SHARED_AI_CONNECTION = Symbol('SHARED_AI_CONNECTION');++/** A shared connection as parsing reads it; the vision setting stays parsing's own. */+export type SharedParsingConnection = Omit<ResolvedLlmConfig, 'vision'>;++export interface SharedAiConnectionPort {+ /** The connection a user's booking import may read with; null when there is none it can use. */+ forParsing(userId: number): Promise<SharedParsingConnection | null>;+}diff --git a/server/tests/helpers/plugin-host.ts b/server/tests/helpers/plugin-host.tsindex 86f7136fc..2406d16bd 100644--- a/server/tests/helpers/plugin-host.ts+++ b/server/tests/helpers/plugin-host.ts@@ -181,6 +181,7 @@ import {createTestVacaySharesRepo,createTestVacayUserSettingsRepo,} from './vacay-repos';+import type { ModuleRef } from '@nestjs/core';import type Database from 'better-sqlite3';@@ -416,6 +417,12 @@ export async function createPluginRpcHostParts(new SettingsService(await createTestUnitOfWork(db), appSettings, await createTestSettingsRepo(db), membership),(await sharedTestOrm(db)).repo(Addons),addons,+ // No ai-connections here: parsing reads only its own settings.+ {+ get: () => {+ throw new Error('not registered');+ },+ } as unknown as ModuleRef,);const pluginOrm = await sharedTestOrm(db);const oauth = new PluginOAuthService(diff --git a/server/tests/unit/db/repositories/addons-config-encryption.test.ts b/server/tests/unit/db/repositories/addons-config-encryption.test.tsindex 5923f8d0c..ecaa472b8 100644--- a/server/tests/unit/db/repositories/addons-config-encryption.test.ts+++ b/server/tests/unit/db/repositories/addons-config-encryption.test.ts@@ -68,11 +68,11 @@ describe('AddonsRepository.setConfig — AD36 encryption boundary', () => {it('ADDONSREPO-011: a second write of the SAME plaintext produces a different stored ciphertext (random IV), both still decrypting to the same plaintext', async () => {const plaintext = 'sk-live-same-secret-both-times';- const first = prepareLlmAddonConfigForWrite({ apiKey: plaintext }, undefined);+ const first = prepareLlmAddonConfigForWrite({ provider: 'openai', apiKey: plaintext }, undefined);await addons.setConfig('llm_parsing', first as { apiKey?: string; [k: string]: unknown });const firstStored = ((await addons.findById('llm_parsing'))?.config as { apiKey?: string } | null)?.apiKey;- const second = prepareLlmAddonConfigForWrite({ apiKey: plaintext }, undefined);+ const second = prepareLlmAddonConfigForWrite({ provider: 'openai', apiKey: plaintext }, undefined);await addons.setConfig('llm_parsing', second as { apiKey?: string; [k: string]: unknown });const secondStored = ((await addons.findById('llm_parsing'))?.config as { apiKey?: string } | null)?.apiKey;diff --git a/server/tests/unit/nest/addon-guard.test.ts b/server/tests/unit/nest/addon-guard.test.tsindex 7ae0eaa06..cea618b5b 100644--- a/server/tests/unit/nest/addon-guard.test.ts+++ b/server/tests/unit/nest/addon-guard.test.ts@@ -46,7 +46,7 @@ async function thrown(fn: () => unknown) {}/** Apply @RequireAddon to a throwaway class the way a controller would. */-function decorated(addonId: string, label: string) {+function decorated(addonId: string | readonly string[], label: string) {class Gated {}RequireAddon(addonId, label)(Gated);return Gated;@@ -72,6 +72,19 @@ describe('AddonGuard', () => {expect(svc.isAddonEnabled).toHaveBeenCalledWith(ADDON_IDS.COLLECTIONS);});+ it('ADDON-GUARD-007: a list of addons opens the route while any one of them is on', async () => {+ const cls = decorated([ADDON_IDS.AI_ASSISTANT, ADDON_IDS.LLM_PARSING], 'AI assistant');+ const isAddonEnabled = vi.fn(async (id: string) => id === ADDON_IDS.LLM_PARSING);+ const guard = new AddonGuard({ isAddonEnabled } as unknown as AddonsService, new Reflector());+ expect(await guard.canActivate(ctxFor(() => {}, cls))).toBe(true);++ isAddonEnabled.mockResolvedValue(false);+ expect(await thrown(() => guard.canActivate(ctxFor(() => {}, cls)))).toEqual({+ status: 404,+ body: { error: 'AI assistant addon is not enabled' },+ });+ });+it('ADDON-GUARD-003: is a no-op on a route that never asked for an addon', async () => {const svc = addons(false);const guard = new AddonGuard(svc, new Reflector());diff --git a/server/tests/unit/nest/ai-connections/ai-connections.controller.test.ts b/server/tests/unit/nest/ai-connections/ai-connections.controller.test.tsindex b2c4abce3..5955f3c36 100644--- a/server/tests/unit/nest/ai-connections/ai-connections.controller.test.ts+++ b/server/tests/unit/nest/ai-connections/ai-connections.controller.test.ts@@ -79,7 +79,7 @@ describe('AiConnectionsController', () => {expect(Reflect.getMetadata(PATH_METADATA, AiConnectionsController)).toBe('api/ai');expect(Reflect.getMetadata(GUARDS_METADATA, AiConnectionsController)).toEqual([AddonGuard, JwtAuthGuard]);expect(Reflect.getMetadata(REQUIRE_ADDON, AiConnectionsController)).toEqual({- addonId: 'ai_assistant',+ addonId: ['ai_assistant', 'llm_parsing'],label: 'AI assistant',});expect(Reflect.getMetadata(MANAGED_FORBIDDEN, AiConnectionsController)?.reason).toBeTruthy();@@ -169,7 +169,9 @@ describe('AiAdminController', () => {it('AICTL-010: sits behind the addon, auth and the admin check, withheld on a managed install', () => {expect(Reflect.getMetadata(PATH_METADATA, AiAdminController)).toBe('api/admin/ai');expect(Reflect.getMetadata(GUARDS_METADATA, AiAdminController)).toEqual([AddonGuard, JwtAuthGuard, AdminGuard]);- expect(Reflect.getMetadata(REQUIRE_ADDON, AiAdminController)).toMatchObject({ addonId: 'ai_assistant' });+ expect(Reflect.getMetadata(REQUIRE_ADDON, AiAdminController)).toMatchObject({+ addonId: ['ai_assistant', 'llm_parsing'],+ });expect(Reflect.getMetadata(MANAGED_FORBIDDEN, AiAdminController)?.reason).toBeTruthy();expect(['settings', 'saveSettings', 'connection', 'saveConnection', 'removeConnection', 'models', 'startOpenrouter'].map(diff --git a/server/tests/unit/nest/ai-connections/ai-connections.service.test.ts b/server/tests/unit/nest/ai-connections/ai-connections.service.test.tsindex d5b169969..2b37ab54b 100644--- a/server/tests/unit/nest/ai-connections/ai-connections.service.test.ts+++ b/server/tests/unit/nest/ai-connections/ai-connections.service.test.ts@@ -353,3 +353,42 @@ describe('resolving the connection a turn runs on', () => {expect((await service().ownView(id)).status).toBe('ok');});});++describe('the connection AI parsing shares', () => {+ it('AICS-030: parsing reads with the connection the policy picks, through the OpenAI-compatible endpoints', async () => {+ const admin = await user();+ const id = await user();+ expect(await service().forParsing(id)).toBeNull();+ await service().saveInstance(admin, { kind: 'gemini', apiKey: 'AQ.instance-key' });+ expect(await service().forParsing(id)).toEqual({+ provider: 'openai',+ model: 'claude-haiku',+ apiKey: 'AQ.instance-key',+ baseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai',+ });+ await service().saveOwnKey(id, { kind: 'anthropic', apiKey: 'sk-ant-own-parse' });+ expect(await service().forParsing(id)).toEqual({+ provider: 'anthropic',+ model: 'claude-sonnet',+ apiKey: 'sk-ant-own-parse',+ });+ });++ it('AICS-031: a ChatGPT plan or a connection with a problem is not lent to parsing', async () => {+ const id = await user();+ const { em } = orm();+ await em.fork().insert(AiConnections, {+ scope: 'user',+ user: id,+ kind: 'chatgpt',+ model: 'gpt-6.1-sol',+ status: 'ok',+ });+ expect(await service().forParsing(id)).toBeNull();+ await em.fork().nativeDelete(AiConnections, { user: id });+ await service().saveOwnKey(id, { kind: 'openai', apiKey: 'sk-proj-own-parse' });+ expect(await service().forParsing(id)).toMatchObject({ provider: 'openai', apiKey: 'sk-proj-own-parse' });+ await em.fork().nativeUpdate(AiConnections, { user: id }, { status: 'error' });+ expect(await service().forParsing(id)).toBeNull();+ });+});diff --git a/server/tests/unit/nest/assistant/assistant-agent.test.ts b/server/tests/unit/nest/assistant/assistant-agent.test.tsindex 785dd34ca..c44c170d5 100644--- a/server/tests/unit/nest/assistant/assistant-agent.test.ts+++ b/server/tests/unit/nest/assistant/assistant-agent.test.ts@@ -522,4 +522,38 @@ describe('runAgentLoop', () => {// Only once: the third answer ends on an ellipsis too and still ends the turn.expect(t.requests).toHaveLength(3);});++ it('ASTAGT-017: an empty answer gets one push without an empty message in the history; a second one is an error', async () => {+ const recovered = setup([+ [{ type: 'tool-call', call: { id: 's1', name: 'search_place', args: { query: 'Sushi' } } }],+ [{ type: 'finish', reason: 'stop' }],+ [{ type: 'text-delta', delta: 'Here are three for tonight.' }],+ ]);+ expect(+ (await runAgentLoop(recovered.deps, recovered.input, recovered.writer, new AbortController().signal)).end,+ ).toBe('stop');+ const pushed = recovered.requests[2].messages;+ expect(pushed.at(-1)).toMatchObject({ role: 'user', text: expect.stringContaining('came back empty') });+ expect(pushed.at(-2)).toMatchObject({ role: 'tool', toolCallId: 's1' });++ const stuck = setup([[{ type: 'finish', reason: 'stop' }], [{ type: 'finish', reason: 'stop' }]]);+ const outcome = await runAgentLoop(stuck.deps, stuck.input, stuck.writer, new AbortController().signal);+ expect(outcome).toMatchObject({ end: 'failed', code: 'empty_answer' });+ expect(stuck.chunks).toContainEqual({ type: 'error', errorText: 'empty_answer' });+ });++ it('ASTAGT-018: an answer cut off by the length limit is pushed to go on', async () => {+ const t = setup([+ [+ { type: 'text-delta', delta: 'Day 1: Senso-ji, then' },+ { type: 'finish', reason: 'length' },+ ],+ [{ type: 'text-delta', delta: ' Skytree in the evening.' }],+ ]);+ expect((await runAgentLoop(t.deps, t.input, t.writer, new AbortController().signal)).end).toBe('stop');+ expect(t.requests[1].messages.slice(-2)).toMatchObject([+ { role: 'assistant', text: 'Day 1: Senso-ji, then' },+ { role: 'user', text: expect.stringContaining('cut off') },+ ]);+ });});diff --git a/server/tests/unit/nest/assistant/assistant-cards.helpers.test.ts b/server/tests/unit/nest/assistant/assistant-cards.helpers.test.tsindex 82197cb1f..7ed544e51 100644--- a/server/tests/unit/nest/assistant/assistant-cards.helpers.test.ts+++ b/server/tests/unit/nest/assistant/assistant-cards.helpers.test.ts@@ -124,10 +124,10 @@ describe('foundPlacesOf', () => {expect(JSON.stringify(poi)).not.toMatch(/ramen\.example|opening/);});- it('ASTCRD-004: at most eight cards, the rest counted; places without a position or name are left out', () => {- const many = Array.from({ length: 11 }, (_, i) => ({ name: `Place ${i}`, lat: 35 + i / 100, lng: 135 }));+ it('ASTCRD-004: at most twenty cards, the rest counted; places without a position or name are left out', () => {+ const many = Array.from({ length: 23 }, (_, i) => ({ name: `Place ${i}`, lat: 35 + i / 100, lng: 135 }));const found = foundPlacesOf('search_place', 'm', { places: [{ name: 'No position' }, ...many] }, card, 'x');- expect(found?.places).toHaveLength(8);+ expect(found?.places).toHaveLength(20);expect(found?.more).toBe(3);expect(found?.places[0]).toMatchObject({ ref: 'm:0', name: 'Place 0' });const odd = { places: [{ name: '', lat: 1, lng: 1 }, { name: 'Far', lat: 91, lng: 1 }, 'text', null] };diff --git a/server/tests/unit/nest/assistant/assistant-context.test.ts b/server/tests/unit/nest/assistant/assistant-context.test.tsindex 49981ada9..75f564dd1 100644--- a/server/tests/unit/nest/assistant/assistant-context.test.ts+++ b/server/tests/unit/nest/assistant/assistant-context.test.ts@@ -9,6 +9,7 @@ import {languageName,renderTripCard,todayIn,+ tripMemoryOf,turnContext,} from '../../../../src/nest/assistant/assistant-context';@@ -162,7 +163,7 @@ describe('renderTripCard', () => {});it('ASTCTX-011: a trip without days says so, and long lists are counted, not listed', () => {- const many = { places: Array.from({ length: 45 }, (_, i) => ({ id: i + 1, name: `P${i + 1}` })) };+ const many = { places: Array.from({ length: 205 }, (_, i) => ({ id: i + 1, name: `P${i + 1}` })) };const text = renderTripCard(buildTripCard(1, { trip: { title: 'T' } }, many, null));expect(text).toContain('(no days yet)');expect(text).toContain('and 5 more');@@ -182,6 +183,17 @@ describe('renderTripCard', () => {expect(text).toContain('- place 12: Nishiki Market (at 35.0050, 135.7640; google place id ChIJn)');expect(renderTripCard(buildTripCard(1, SUMMARY, PLACES, null))).not.toContain('Around:');});++ it('ASTCTX-013: the part of the map on screen tells "here", a view of a whole country does not', () => {+ const view = { south: 35.6, west: 139.7, north: 35.72, east: 139.82 };+ const text = renderTripCard(buildTripCard(1, SUMMARY, PLACES, { view }));+ expect(text).toContain(+ "The map on the user's screen shows south 35.6000, west 139.7000, north 35.7200, east 139.8200.",+ );+ expect(text).toContain('"here", "nearby" or "around" means this area');+ const country = { south: 30, west: 129, north: 45, east: 146 };+ expect(renderTripCard(buildTripCard(1, SUMMARY, PLACES, { view: country }))).not.toContain('on the user');+ });});describe('the turn context', () => {@@ -201,13 +213,31 @@ describe('the turn context', () => {it('ASTCTX-022: carries the date, the units the user prefers and the card', () => {const card = buildTripCard(1, SUMMARY, PLACES, null);const context = turnContext(card, 'Asia/Tokyo', new Date('2026-06-11T23:30:00Z'), {- temperature: 'fahrenheit',- distance: 'metric',- timeFormat: 'nonsense',+ temperature_unit: 'fahrenheit',+ distance_unit: 'metric',+ time_format: 'nonsense',});expect(context).toContain('Today is 2026-06-12 (time zone Asia/Tokyo).');expect(context).toContain('The user prefers temperatures in °F, distances in km.');expect(context).toContain('<trip_card>\nTrip: Kyoto in June');expect(turnContext(card, 'UTC', new Date(), {})).not.toContain('prefers');});++ it("ASTCTX-023: the trip notes of this trip come along as preferences, never another trip's", () => {+ const card = buildTripCard(1, SUMMARY, PLACES, null);+ const prefs = { assistant_memory: { '1': ' Vegetarian, no museums. ', '2': 'Other trip' } };+ const context = turnContext(card, 'UTC', new Date(), prefs);+ expect(context).toContain('<trip_notes>\nVegetarian, no museums.\n</trip_notes>');+ expect(context).not.toContain('Other trip');+ expect(tripMemoryOf({ assistant_memory: { '1': 'x'.repeat(3000) } }, 1)).toHaveLength(2000);+ expect(tripMemoryOf({ assistant_memory: 'broken' }, 1)).toBeNull();+ });++ it('ASTCTX-024: cost estimates are asked for unless the user turned them off', () => {+ const card = buildTripCard(1, SUMMARY, PLACES, null);+ expect(turnContext(card, 'UTC', new Date(), {})).toContain('create_budget_item');+ expect(turnContext(card, 'UTC', new Date(), { assistant_cost_estimates: false })).not.toContain(+ 'create_budget_item',+ );+ });});diff --git a/server/tests/unit/nest/llm-parse/llm-config.resolver.test.ts b/server/tests/unit/nest/llm-parse/llm-config.resolver.test.tsindex 18bb0502a..b19f933de 100644--- a/server/tests/unit/nest/llm-parse/llm-config.resolver.test.ts+++ b/server/tests/unit/nest/llm-parse/llm-config.resolver.test.ts@@ -2,6 +2,7 @@ import type { AddonsRepository } from '../../../../src/db/repositories/Addons.reimport type { AddonsService } from '../../../../src/nest/addons/addons.service';import { LlmConfigResolver } from '../../../../src/nest/llm-parse/llm-config.resolver';import type { SettingsService } from '../../../../src/nest/settings/settings.service';+import type { ModuleRef } from '@nestjs/core';import { describe, it, expect, vi, beforeEach } from 'vitest';@@ -20,7 +21,16 @@ const settingsStub = { getUserSettings, getAdminUserDefaults, getDecryptedUserSeconst addonsStub = { isAddonEnabled } as unknown as AddonsService;const addonsRepoStub = { findById } as unknown as AddonsRepository;-const resolver = new LlmConfigResolver(settingsStub, addonsRepoStub, addonsStub);+// The assistant's connection, offered through the port; unregistered unless a case provides it.+const forParsing = vi.fn();+let portRegistered = false;+const moduleRefStub = {+ get: vi.fn(() => {+ if (!portRegistered) throw new Error('not registered');+ return { forParsing };+ }),+} as unknown as ModuleRef;+const resolver = new LlmConfigResolver(settingsStub, addonsRepoStub, addonsStub, moduleRefStub);function setInstanceConfig(config: Record<string, unknown> | undefined) {findById.mockResolvedValue(config === undefined ? null : { id: 'llm_parsing', config });@@ -33,6 +43,8 @@ beforeEach(() => {getUserSettings.mockReturnValue({});getAdminUserDefaults.mockReturnValue({});getDecryptedUserSetting.mockReturnValue(null);+ portRegistered = false;+ forParsing.mockResolvedValue(null);});describe('resolveLlmConfig', () => {@@ -186,3 +198,34 @@ describe('readInstanceEndpoint', () => {expect(await resolver.readInstanceEndpoint()).toBeNull();});});++describe('the shared AI connection', () => {+ const shared = { provider: 'openai', model: 'gemini-3-flash', apiKey: 'g', baseUrl: 'https://gemini.test/openai' };++ it('LLMRES-SHARED-001: reads with the assistant connection when parsing has none of its own', async () => {+ portRegistered = true;+ forParsing.mockResolvedValue(shared);+ setInstanceConfig({ vision: 'on' });+ expect(await resolver.resolve(7)).toEqual({ ...shared, vision: 'on' });+ expect(forParsing).toHaveBeenCalledWith(7);+ });++ it('LLMRES-SHARED-002: an instance config of its own still wins, and the shared one beats a personal one', async () => {+ portRegistered = true;+ forParsing.mockResolvedValue(shared);+ setInstanceConfig({ provider: 'anthropic', model: 'claude-x', apiKey: 'a' });+ expect(await resolver.resolve(1)).toMatchObject({ provider: 'anthropic', model: 'claude-x' });+ expect(forParsing).not.toHaveBeenCalled();++ setInstanceConfig(undefined);+ getUserSettings.mockReturnValue({ llm_provider: 'openai', llm_model: 'gpt-4o' });+ expect(await resolver.resolve(1)).toMatchObject({ model: 'gemini-3-flash', vision: 'auto' });+ });++ it('LLMRES-SHARED-003: without the port or a usable connection, the personal config answers', async () => {+ getUserSettings.mockReturnValue({ llm_provider: 'openai', llm_model: 'gpt-4o' });+ expect(await resolver.resolve(1)).toMatchObject({ provider: 'openai', model: 'gpt-4o' });+ portRegistered = true;+ expect(await resolver.resolve(1)).toMatchObject({ provider: 'openai', model: 'gpt-4o' });+ });+});diff --git a/server/tests/unit/nest/llm-parse/llm-config.test.ts b/server/tests/unit/nest/llm-parse/llm-config.test.tsindex ed62c480f..a66580ee9 100644--- a/server/tests/unit/nest/llm-parse/llm-config.test.ts+++ b/server/tests/unit/nest/llm-parse/llm-config.test.ts@@ -18,3 +18,11 @@ describe('prepareLlmAddonConfigForWrite: the vision setting', () => {expect(prepareLlmAddonConfigForWrite({ provider: 'openai', model: 'm' }, undefined)).not.toHaveProperty('vision');});});++describe('prepareLlmAddonConfigForWrite: back on the shared connection', () => {+ it('LLMCFG-SHARED-001: a config without a provider keeps no key, neither sent nor stored', () => {+ const stored = { provider: 'anthropic', model: 'm', apiKey: 'enc:old' };+ expect(prepareLlmAddonConfigForWrite({ vision: 'on' }, stored)).toEqual({ vision: 'on' });+ expect(prepareLlmAddonConfigForWrite({ apiKey: 'sk-new' }, stored)).toEqual({});+ });+});diff --git a/shared/src/assistant/assistant.schema.spec.ts b/shared/src/assistant/assistant.schema.spec.tsindex 4c5b2ac0d..616030d1d 100644--- a/shared/src/assistant/assistant.schema.spec.ts+++ b/shared/src/assistant/assistant.schema.spec.ts@@ -40,7 +40,7 @@ describe('assistantChatRequestSchema', () => {it('refuses blank or overlong text, a bad thread id and unknown keys', () => {expect(assistantChatRequestSchema.safeParse({ ...ctx, threadId: null, text: ' ' }).success).toBe(false);- expect(assistantChatRequestSchema.safeParse({ ...ctx, threadId: null, text: 'x'.repeat(4001) }).success).toBe(+ expect(assistantChatRequestSchema.safeParse({ ...ctx, threadId: null, text: 'x'.repeat(32_001) }).success).toBe(false,);expect(assistantChatRequestSchema.safeParse({ ...ctx, threadId: 0, text: 'hi' }).success).toBe(false);@@ -84,7 +84,7 @@ describe('assistantDecisionsRequestSchema', () => {expect(assistantDecisionsRequestSchema.safeParse({ ...ctx, decisions: [decision] }).success).toBe(true);expect(assistantDecisionsRequestSchema.safeParse({ ...ctx, decisions: [] }).success).toBe(false);expect(- assistantDecisionsRequestSchema.safeParse({ ...ctx, decisions: Array.from({ length: 13 }, () => decision) })+ assistantDecisionsRequestSchema.safeParse({ ...ctx, decisions: Array.from({ length: 51 }, () => decision) }).success,).toBe(false);});@@ -225,8 +225,8 @@ describe('mentions in a chat request', () => {{ kind: 'reservation', id: 2 },];expect(assistantChatRequestSchema.safeParse({ ...base, mentions }).success).toBe(true);- const eleven = Array.from({ length: 11 }, () => ({ kind: 'place', id: 4 }));- expect(assistantChatRequestSchema.safeParse({ ...base, mentions: eleven }).success).toBe(false);+ const tooMany = Array.from({ length: 51 }, () => ({ kind: 'place', id: 4 }));+ expect(assistantChatRequestSchema.safeParse({ ...base, mentions: tooMany }).success).toBe(false);const labelled = [{ kind: 'place', id: 4, label: 'Louvre' }];expect(assistantChatRequestSchema.safeParse({ ...base, mentions: labelled }).success).toBe(false);expect(assistantChatRequestSchema.safeParse({ ...base, mentions: [{ kind: 'trip', id: 4 }] }).success).toBe(false);@@ -325,11 +325,11 @@ describe('assistantFoundPlaceSchema', () => {expect(withPlace({ kind: 'casino' }).success).toBe(false);});- it('holds at most eight places to a step and counts the rest', () => {- const places = Array.from({ length: 9 }, (_, i) => ({ ...place, ref: `toolu_01:${i}` }));+ it('holds at most twenty places to a step and counts the rest', () => {+ const places = Array.from({ length: 21 }, (_, i) => ({ ...place, ref: `toolu_01:${i}` }));const step = (body: Record<string, unknown>) =>assistantPlacesSchema.safeParse({ toolCallId: 'toolu_01', ...body });- expect(step({ places: places.slice(0, 8), more: 1 }).success).toBe(true);+ expect(step({ places: places.slice(0, 20), more: 1 }).success).toBe(true);expect(step({ places, more: 0 }).success).toBe(false);expect(step({ places: [], more: -1 }).success).toBe(false);});diff --git a/shared/src/assistant/assistant.schema.ts b/shared/src/assistant/assistant.schema.tsindex c6f025d08..7a3d76399 100644--- a/shared/src/assistant/assistant.schema.ts+++ b/shared/src/assistant/assistant.schema.ts@@ -32,6 +32,8 @@ export const ASSISTANT_ERROR_CODES = ['invalid_key','provider_unavailable','max_steps',+ // The model answered with nothing, not even after it was asked to go on.+ 'empty_answer','offline','no_bookings_found','import_unavailable',@@ -128,11 +130,21 @@ export const assistantMentionSchema = z.strict();export type AssistantMention = z.infer<typeof assistantMentionSchema>;-/** What the user is looking at when they ask: the selected day, or the places they asked about. */+/** The part of the map the planner shows, so "here" and "nearby" mean what is on screen. */+export const assistantMapViewSchema = z+ .object({ south: latSchema, west: lngSchema, north: latSchema, east: lngSchema })+ .strict();+export type AssistantMapView = z.infer<typeof assistantMapViewSchema>;++/**+ * What the user is looking at when they ask: the selected day, or the places+ * they asked about, and the part of the map on screen.+ */export const assistantFocusSchema = z.object({dayId: idSchema.optional(),placeIds: z.array(idSchema).max(20).optional(),+ view: assistantMapViewSchema.optional(),}).strict();export type AssistantFocus = z.infer<typeof assistantFocusSchema>;@@ -148,9 +160,9 @@ export type AssistantClientCtx = z.infer<typeof assistantClientCtxSchema>;export const assistantChatRequestSchema = assistantClientCtxSchema.extend({threadId: idSchema.nullable(),- text: z.string().trim().min(1).max(4000),+ text: z.string().trim().min(1).max(32_000),focus: assistantFocusSchema.optional(),- mentions: z.array(assistantMentionSchema).max(10).optional(),+ mentions: z.array(assistantMentionSchema).max(50).optional(),}).strict();export type AssistantChatRequest = z.infer<typeof assistantChatRequestSchema>;@@ -179,7 +191,7 @@ export type AssistantDecision = z.infer<typeof assistantDecisionSchema>;/** POST /threads/:threadId/decisions: every change the step holds, applied or discarded. */export const assistantDecisionsRequestSchema = assistantClientCtxSchema.extend({- decisions: z.array(assistantDecisionSchema).min(1).max(12),+ decisions: z.array(assistantDecisionSchema).min(1).max(50),}).strict();export type AssistantDecisionsRequest = z.infer<typeof assistantDecisionsRequestSchema>;@@ -299,9 +311,15 @@ export const assistantFoundPlaceSchema = z.object({kind: z.enum(ASSISTANT_FOUND_PLACE_KINDS).nullable(),rating: z.number().min(0).max(5).nullable(),openNow: z.boolean().nullable(),- googlePlaceId: z.string().regex(/^[\w-]{1,200}$/).nullable(),+ googlePlaceId: z+ .string()+ .regex(/^[\w-]{1,200}$/)+ .nullable(),osmId: z.string().max(40).nullable(),- photoKey: z.string().regex(/^([\w-]{1,200}|coords:-?\d{1,3}(\.\d{1,12})?,-?\d{1,3}(\.\d{1,12})?)$/).nullable(),+ photoKey: z+ .string()+ .regex(/^([\w-]{1,200}|coords:-?\d{1,3}(\.\d{1,12})?,-?\d{1,3}(\.\d{1,12})?)$/)+ .nullable(),inTripPlaceId: idSchema.nullable(),});export type AssistantFoundPlace = z.infer<typeof assistantFoundPlaceSchema>;@@ -309,7 +327,7 @@ export type AssistantFoundPlace = z.infer<typeof assistantFoundPlaceSchema>;/** The places one search step found: at most eight, `more` counts the rest. */export const assistantPlacesSchema = z.object({toolCallId: z.string().max(64),- places: z.array(assistantFoundPlaceSchema).max(8),+ places: z.array(assistantFoundPlaceSchema).max(20),more: z.number().int().nonnegative(),});export type AssistantPlaces = z.infer<typeof assistantPlacesSchema>;@@ -375,7 +393,7 @@ export const assistantMentionsSchema = z.object({label: z.string().max(120),}),)- .max(10),+ .max(50),});export type AssistantMentions = z.infer<typeof assistantMentionsSchema>;diff --git a/shared/src/i18n/ar/admin.ts b/shared/src/i18n/ar/admin.tsindex 879d4184c..62c95a6df 100644--- a/shared/src/i18n/ar/admin.ts+++ b/shared/src/i18n/ar/admin.ts@@ -1016,5 +1016,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'حذف الفئة','admin.packingTemplates.deleteCategoryConfirm': 'حذف الفئة "{name}" وجميع عناصرها؟','admin.rotateJwt.button': 'تجديد',+ 'admin.addons.ai.name': 'الذكاء الاصطناعي',+ 'admin.addons.ai.description':+ 'اتصال واحد للمساعد ولاستيراد الحجوزات. يتيح MCP لتطبيقات الذكاء الاصطناعي الأخرى استخدام TREK.',+ 'admin.addons.ai.setup': 'إعداد الذكاء الاصطناعي',+ 'admin.addons.ai.dialogSub': 'الاتصال الذي يتشاركه المساعد والتحليل بالذكاء الاصطناعي، وما يُسمح لكل منهما به.',+ 'admin.addons.ai.tab.connection': 'الاتصال',+ 'admin.addons.ai.parsing.readsWith': 'يقرأ الحجوزات باستخدام',+ 'admin.addons.ai.parsing.own': 'اتصال خاص',+ 'admin.addons.ai.parsing.ownHint': 'يُستخدم بدلًا من الاتصال المشترك.',+ 'admin.addons.ai.parsing.useShared': 'استخدام الاتصال المشترك',+ 'admin.addons.ai.parsing.sharedTag': 'مشترك',+ 'admin.addons.ai.parsing.perUser': 'يقرأ كل شخص باتصاله الخاص من إعداداته.',+ 'admin.addons.ai.parsing.none':+ 'لا يوجد اتصال بعد. أعدّ اتصالًا للجميع، أو امنح التحليل بالذكاء الاصطناعي اتصالًا خاصًا.',+ 'admin.addons.ai.parsing.setupOwn': 'استخدام اتصال آخر',+ 'admin.addons.ai.parsing.installed': 'مثبتة على الخادم',+ 'admin.addons.ai.parsing.refresh': 'تحديث',+ 'admin.addons.ai.parsing.noModels': 'لا توجد نماذج مثبتة بعد. نزّل واحدًا أدناه.',+ 'admin.addons.ai.parsing.pullTitle': 'تنزيل نموذج موصى به',+ 'admin.addons.ai.parsing.pull': 'تنزيل',+ 'admin.addons.ai.parsing.pulling': 'جارٍ التنزيل…',+ 'admin.addons.ai.parsing.use': 'استخدام',+ 'admin.addons.ai.parsing.selected': 'محدد',+ 'admin.addons.ai.parsing.pulled': 'تم تنزيل النموذج',+ 'admin.addons.ai.parsing.pullFailed': 'تعذّر تنزيل النموذج',+ 'admin.addons.ai.parsing.unreachable': 'تعذّر الوصول إلى الخادم المحلي',+ 'admin.addons.ai.parsing.apiKeyOptional': 'غالبًا غير مطلوب',};export default admin;diff --git a/shared/src/i18n/ar/assistant.ts b/shared/src/i18n/ar/assistant.tsindex 9247d630c..245680d41 100644--- a/shared/src/i18n/ar/assistant.ts+++ b/shared/src/i18n/ar/assistant.ts@@ -42,7 +42,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'الحصول على مفتاح','assistant.connect.hintAnthropic': 'تتضمن باقتا Claude Max وTeam رصيدًا لـ API.','assistant.connect.hintOpenai': 'أنشئ مفتاحًا في لوحة تحكم OpenAI.',- 'assistant.connect.hintGemini': 'يوفر AI Studio خطة مجانية بحدود في الدقيقة واليوم، وقد تستخدم Google فيها ما ترسله لتحسين منتجاتها. عند تفعيل الفوترة تكون الحدود أعلى ولا ينطبق ذلك.',+ 'assistant.connect.hintGemini':+ 'يوفر AI Studio خطة مجانية بحدود في الدقيقة واليوم، وقد تستخدم Google فيها ما ترسله لتحسين منتجاتها. عند تفعيل الفوترة تكون الحدود أعلى ولا ينطبق ذلك.','assistant.connect.hintOpenrouter': 'سجّل الدخول عبر OpenRouter، دون مفتاح لنسخه.','assistant.connect.openrouter': 'ربط OpenRouter','assistant.connect.save': 'اتصال',@@ -417,5 +418,75 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'تمت المشاركة','assistant.share.failed': 'تعذّرت المشاركة. حاول مرة أخرى بعد قليل.','assistant.share.chatOff': 'محادثة الرحلة متوقفة.',+ 'assistant.connect.descriptionWithParsing':+ 'اتصال الذكاء الاصطناعي الخاص بك: يعمل عليه المساعد، ويقرأ الحجوزات التي تستوردها.',+ 'assistant.connect.descriptionParsingOnly': 'اتصال الذكاء الاصطناعي الخاص بك: يقرأ الحجوزات التي تستوردها.',+ 'assistant.error.emptyAnswer': 'عاد المساعد دون إجابة. هل أحاول مرة أخرى؟',+ 'assistant.followUp.title': 'تابع مع',+ 'assistant.followUp.cheaper': 'الأرخص فقط',+ 'assistant.followUp.closer': 'أقرب إلى مكان إقامتي',+ 'assistant.followUp.openNow': 'ما المفتوح الآن؟',+ 'assistant.followUp.nextDay': 'خطّط لليوم التالي بالطريقة نفسها',+ 'assistant.followUp.relaxed': 'اجعل الخطة أكثر هدوءًا',+ 'assistant.followUp.dinners': 'أضف مطاعم للأمسيات',+ 'assistant.followUp.rain': 'ماذا لو أمطرت؟',+ 'assistant.followUp.sun': 'ما الذي يستحق في الخارج عند صفاء الطقس؟',+ 'assistant.followUp.more': 'أخبرني بالمزيد',+ 'assistant.followUp.next': 'ماذا تقترح الآن؟',+ 'assistant.menu.alternative': 'إيجاد بديل',+ 'assistant.menu.alternativeAsk': 'جد بديلًا جيدًا لـ {place} في الجوار، وقل لماذا يناسب أكثر.',+ 'assistant.menu.foodNearby': 'مطعم قريب',+ 'assistant.menu.foodNearbyAsk': 'اقترح بعض الأماكن الجيدة للأكل قرب {place}.',+ 'assistant.menu.planDay': 'تخطيط هذا اليوم',+ 'assistant.menu.planDayAsk': 'خطّط لي هذا اليوم: أماكن وأوقات ومكانًا للأكل.',+ 'assistant.menu.rainPlan': 'خطة المطر',+ 'assistant.menu.rainPlanAsk': 'ماذا يمكننا أن نفعل في هذا اليوم إذا أمطرت؟ اقترح بدائل داخلية قريبة.',+ 'assistant.preview.title': 'اقتراحات المساعد',+ 'assistant.preview.suggested': 'اقتراح',+ 'assistant.preview.movedHere': 'ينتقل إلى هنا',+ 'assistant.preview.removed': 'يُزال',+ 'assistant.preview.movedAway': 'يُنقل',+ 'assistant.check.ok': 'يتسع له الوقت',+ 'assistant.week.title': 'أيام هذه الخطة',+ 'assistant.week.day': 'يوم',+ 'assistant.memory.title': 'ملاحظات الرحلة',+ 'assistant.memory.edit': 'تعديل ملاحظات الرحلة',+ 'assistant.memory.sub': 'يراعيها المساعد في كل اقتراح لهذه الرحلة.',+ 'assistant.memory.quick': 'رغبات شائعة',+ 'assistant.memory.notes': 'ملاحظاتك',+ 'assistant.memory.placeholder': 'مثلًا: نسافر مع طفل صغير، نحب أكل الشارع، لا استيقاظ مبكر.',+ 'assistant.memory.saved': 'حُفظت ملاحظات الرحلة',+ 'assistant.memory.quick.vegetarian': 'نأكل نباتيًا',+ 'assistant.memory.quick.kids': 'نسافر مع أطفال',+ 'assistant.memory.quick.budget': 'بميزانية محدودة',+ 'assistant.memory.quick.slow': 'إيقاع هادئ بلا استعجال',+ 'assistant.memory.quick.accessible': 'دخول بلا درجات من فضلك',+ 'assistant.memory.quick.noMuseums': 'متاحف قليلة',+ 'assistant.settings.costEstimates': 'تقدير التكاليف',+ 'assistant.settings.costEstimatesHint': 'مع مطعم أو تذكرة يقترح مصروفًا تقديريًا للميزانية، كبطاقة تؤكدها.',+ 'assistant.change.timeline.tight': 'ينقص {count} دقيقة',+ 'assistant.change.timeline.tight.zero': 'ينقص {count} دقيقة',+ 'assistant.change.timeline.tight.one': 'تنقص دقيقة واحدة',+ 'assistant.change.timeline.tight.two': 'تنقص دقيقتان',+ 'assistant.change.timeline.tight.few': 'تنقص {count} دقائق',+ 'assistant.change.timeline.tight.many': 'تنقص {count} دقيقة',+ 'assistant.check.issues': '{count} نقطة للمراجعة',+ 'assistant.check.issues.zero': 'لا نقاط للمراجعة',+ 'assistant.check.issues.one': 'نقطة واحدة للمراجعة',+ 'assistant.check.issues.two': 'نقطتان للمراجعة',+ 'assistant.check.issues.few': '{count} نقاط للمراجعة',+ 'assistant.check.issues.many': '{count} نقطة للمراجعة',+ 'assistant.week.changes': '{count} تغيير',+ 'assistant.week.changes.zero': 'لا تغييرات',+ 'assistant.week.changes.one': 'تغيير واحد',+ 'assistant.week.changes.two': 'تغييران',+ 'assistant.week.changes.few': '{count} تغييرات',+ 'assistant.week.changes.many': '{count} تغييرًا',+ 'assistant.week.showAll': 'عرض كل التغييرات الـ {count}',+ 'assistant.week.showAll.zero': 'لا تغييرات للعرض',+ 'assistant.week.showAll.one': 'عرض التغيير',+ 'assistant.week.showAll.two': 'عرض التغييرين',+ 'assistant.week.showAll.few': 'عرض التغييرات الـ {count}',+ 'assistant.week.showAll.many': 'عرض التغييرات الـ {count}',};export default assistant;diff --git a/shared/src/i18n/az/admin.ts b/shared/src/i18n/az/admin.tsindex 8551a1024..23b71d65f 100644--- a/shared/src/i18n/az/admin.ts+++ b/shared/src/i18n/az/admin.ts@@ -995,6 +995,34 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Kateqoriyanı sil','admin.packingTemplates.deleteCategoryConfirm': '"{name}" kateqoriyası və bütün elementləri silinsin?','admin.rotateJwt.button': 'Yenilə',+ 'admin.addons.ai.name': 'Süni intellekt',+ 'admin.addons.ai.description':+ 'Assistent və rezervasiya idxalı üçün bir bağlantı. MCP digər süni intellekt tətbiqlərinə TREK-dən istifadə etməyə imkan verir.',+ 'admin.addons.ai.setup': 'Süni intellekti qur',+ 'admin.addons.ai.dialogSub':+ 'Assistentin və süni intellekt təhlilinin paylaşdığı bağlantı və hər birinin nə edə biləcəyi.',+ 'admin.addons.ai.tab.connection': 'Bağlantı',+ 'admin.addons.ai.parsing.readsWith': 'Rezervasiyaları bununla oxuyur',+ 'admin.addons.ai.parsing.own': 'Öz bağlantısı',+ 'admin.addons.ai.parsing.ownHint': 'Ortaq bağlantının əvəzinə istifadə olunur.',+ 'admin.addons.ai.parsing.useShared': 'Ortaq bağlantıdan istifadə et',+ 'admin.addons.ai.parsing.sharedTag': 'Ortaq',+ 'admin.addons.ai.parsing.perUser': 'Hər kəs öz ayarlarındakı bağlantı ilə oxuyur.',+ 'admin.addons.ai.parsing.none':+ 'Hələ bağlantı yoxdur. Hamı üçün birini qurun və ya süni intellekt təhlilinə öz bağlantısını verin.',+ 'admin.addons.ai.parsing.setupOwn': 'Başqasından istifadə et',+ 'admin.addons.ai.parsing.installed': 'Serverdə quraşdırılıb',+ 'admin.addons.ai.parsing.refresh': 'Yenilə',+ 'admin.addons.ai.parsing.noModels': 'Hələ quraşdırılmış model yoxdur. Aşağıdan birini endirin.',+ 'admin.addons.ai.parsing.pullTitle': 'Tövsiyə olunan modeli endir',+ 'admin.addons.ai.parsing.pull': 'Endir',+ 'admin.addons.ai.parsing.pulling': 'Endirilir…',+ 'admin.addons.ai.parsing.use': 'İstifadə et',+ 'admin.addons.ai.parsing.selected': 'Seçilib',+ 'admin.addons.ai.parsing.pulled': 'Model endirildi',+ 'admin.addons.ai.parsing.pullFailed': 'Modeli endirmək mümkün olmadı',+ 'admin.addons.ai.parsing.unreachable': 'Yerli serverə qoşulmaq mümkün deyil',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Adətən lazım deyil',};export default admin;diff --git a/shared/src/i18n/az/assistant.ts b/shared/src/i18n/az/assistant.tsindex dfc85194e..434b0c775 100644--- a/shared/src/i18n/az/assistant.ts+++ b/shared/src/i18n/az/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Açar əldə et','assistant.connect.hintAnthropic': 'Claude Max və Team planlarına API kreditləri daxildir.','assistant.connect.hintOpenai': 'OpenAI panelinizdə açar yaradın.',- 'assistant.connect.hintGemini': 'AI Studio-da dəqiqəlik və günlük limitləri olan pulsuz səviyyə var; orada Google göndərdiklərinizi məhsullarını yaxşılaşdırmaq üçün istifadə edə bilər. Ödəniş aktiv olduqda limitlər daha yüksəkdir və bu tətbiq olunmur.',+ 'assistant.connect.hintGemini':+ 'AI Studio-da dəqiqəlik və günlük limitləri olan pulsuz səviyyə var; orada Google göndərdiklərinizi məhsullarını yaxşılaşdırmaq üçün istifadə edə bilər. Ödəniş aktiv olduqda limitlər daha yüksəkdir və bu tətbiq olunmur.','assistant.connect.hintOpenrouter': 'OpenRouter ilə daxil olun, açar kopyalamağa ehtiyac yoxdur.','assistant.connect.openrouter': 'OpenRouter-i qoş','assistant.connect.save': 'Qoş',@@ -339,5 +340,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Paylaşıldı','assistant.share.failed': 'Paylaşmaq alınmadı. Bir azdan yenidən cəhd edin.','assistant.share.chatOff': 'Səyahət söhbəti söndürülüb.',+ 'assistant.connect.descriptionWithParsing':+ 'Süni intellekt bağlantınız: assistent onunla işləyir və idxal etdiyiniz rezervasiyaları oxuyur.',+ 'assistant.connect.descriptionParsingOnly': 'Süni intellekt bağlantınız: idxal etdiyiniz rezervasiyaları oxuyur.',+ 'assistant.error.emptyAnswer': 'Assistent cavabsız qayıtdı. Yenidən cəhd edim?',+ 'assistant.followUp.title': 'Sonra',+ 'assistant.followUp.cheaper': 'Yalnız daha ucuzlar',+ 'assistant.followUp.closer': 'Qaldığım yerə daha yaxın',+ 'assistant.followUp.openNow': 'İndi nə açıqdır?',+ 'assistant.followUp.nextDay': 'Növbəti günü də belə planla',+ 'assistant.followUp.relaxed': 'Planı daha rahat et',+ 'assistant.followUp.dinners': 'Axşamlar üçün restoran əlavə et',+ 'assistant.followUp.rain': 'Yağış yağsa?',+ 'assistant.followUp.sun': 'Yaxşı havada çöldə nə etməyə dəyər?',+ 'assistant.followUp.more': 'Daha çox danış',+ 'assistant.followUp.next': 'İndi nə təklif edirsən?',+ 'assistant.menu.alternative': 'Alternativ tap',+ 'assistant.menu.alternativeAsk': '{place} əvəzinə yaxınlıqda yaxşı alternativ tap və niyə daha uyğun olduğunu de.',+ 'assistant.menu.foodNearby': 'Yaxınlıqda restoran',+ 'assistant.menu.foodNearbyAsk': '{place} yaxınlığında yemək üçün bir neçə yaxşı yer təklif et.',+ 'assistant.menu.planDay': 'Bu günü planla',+ 'assistant.menu.planDayAsk': 'Bu günü mənim üçün planla: yerlər, vaxtlar və yemək üçün bir yer.',+ 'assistant.menu.rainPlan': 'Yağış planı',+ 'assistant.menu.rainPlanAsk': 'Bu gün yağış yağsa nə edə bilərik? Yaxınlıqda qapalı alternativlər təklif et.',+ 'assistant.preview.title': 'Assistentin təklifləri',+ 'assistant.preview.suggested': 'Təklif',+ 'assistant.preview.movedHere': 'Bura gəlir',+ 'assistant.preview.removed': 'Çıxarılır',+ 'assistant.preview.movedAway': 'Köçürülür',+ 'assistant.check.ok': 'Vaxta sığır',+ 'assistant.week.title': 'Bu planın günləri',+ 'assistant.week.day': 'Gün',+ 'assistant.memory.title': 'Səyahət qeydləri',+ 'assistant.memory.edit': 'Səyahət qeydlərini redaktə et',+ 'assistant.memory.sub': 'Assistent bu səyahətdə hər təklifdə bunları nəzərə alır.',+ 'assistant.memory.quick': 'Tez-tez istəklər',+ 'assistant.memory.notes': 'Qeydlərin',+ 'assistant.memory.placeholder':+ 'Məsələn: kiçik uşaqla səyahət edirik, küçə yeməklərini sevirik, tezdən durmaq yoxdur.',+ 'assistant.memory.saved': 'Səyahət qeydləri saxlanıldı',+ 'assistant.memory.quick.vegetarian': 'Vegetarian qidalanırıq',+ 'assistant.memory.quick.kids': 'Uşaqlarla səyahət edirik',+ 'assistant.memory.quick.budget': 'Az büdcə ilə',+ 'assistant.memory.quick.slow': 'Sakit temp, tələsmədən',+ 'assistant.memory.quick.accessible': 'Zəhmət olmasa, pilləkənsiz giriş',+ 'assistant.memory.quick.noMuseums': 'Az muzey',+ 'assistant.settings.costEstimates': 'Xərcləri təxmin et',+ 'assistant.settings.costEstimatesHint':+ 'Restoran və ya bilet üçün büdcəyə təxmini xərc təklif edir, təsdiqlədiyin kart kimi.',+ 'assistant.change.timeline.tight': '{count} dəq çatışmır',+ 'assistant.change.timeline.tight.one': '{count} dəq çatışmır',+ 'assistant.check.issues': 'Yoxlanılacaq {count} məqam',+ 'assistant.check.issues.one': 'Yoxlanılacaq {count} məqam',+ 'assistant.week.changes': '{count} dəyişiklik',+ 'assistant.week.changes.one': '{count} dəyişiklik',+ 'assistant.week.showAll': 'Bütün {count} dəyişikliyi göstər',+ 'assistant.week.showAll.one': '{count} dəyişikliyi göstər',};export default assistant;diff --git a/shared/src/i18n/br/admin.ts b/shared/src/i18n/br/admin.tsindex 23b93031f..3f517c583 100644--- a/shared/src/i18n/br/admin.ts+++ b/shared/src/i18n/br/admin.ts@@ -968,5 +968,33 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Excluir categoria','admin.packingTemplates.deleteCategoryConfirm': 'Excluir a categoria "{name}" e todos os seus itens?','admin.rotateJwt.button': 'Renovar',+ 'admin.addons.ai.name': 'IA',+ 'admin.addons.ai.description':+ "Ur c'hennask evit ar skoazeller hag enporzhiañ an erlerc'hioù. Gant MCP e c'hall arloadoù IA all implijout TREK.",+ 'admin.addons.ai.setup': 'Kefluniañ an IA',+ 'admin.addons.ai.dialogSub':+ "Ar c'hennask rannet gant ar skoazeller hag an dielfennañ gant IA, ha petra a c'hall ober pep hini.",+ 'admin.addons.ai.tab.connection': 'Kennask',+ 'admin.addons.ai.parsing.readsWith': "Lenn an erlerc'hioù gant",+ 'admin.addons.ai.parsing.own': 'Kennask dezhañ e-unan',+ 'admin.addons.ai.parsing.ownHint': "Implijet e-lec'h ar c'hennask rannet.",+ 'admin.addons.ai.parsing.useShared': "Implijout ar c'hennask rannet",+ 'admin.addons.ai.parsing.sharedTag': 'Rannet',+ 'admin.addons.ai.parsing.perUser': 'Pep hini a lenn gant e gennask e-unan, kefluniet en e arventennoù.',+ 'admin.addons.ai.parsing.none':+ "Kennask ebet c'hoazh. Kefluniit unan evit an holl, pe roit unan d'an dielfennañ gant IA.",+ 'admin.addons.ai.parsing.setupOwn': 'Implijout unan all',+ 'admin.addons.ai.parsing.installed': 'Staliet war ar servijer',+ 'admin.addons.ai.parsing.refresh': 'Freskaat',+ 'admin.addons.ai.parsing.noModels': "Patrom ebet staliet c'hoazh. Pellgargit unan amañ dindan.",+ 'admin.addons.ai.parsing.pullTitle': 'Pellgargañ ur patrom erbedet',+ 'admin.addons.ai.parsing.pull': 'Pellgargañ',+ 'admin.addons.ai.parsing.pulling': 'O pellgargañ…',+ 'admin.addons.ai.parsing.use': 'Implijout',+ 'admin.addons.ai.parsing.selected': 'Dibabet',+ 'admin.addons.ai.parsing.pulled': 'Patrom pellgarget',+ 'admin.addons.ai.parsing.pullFailed': "N'eus ket bet gallet pellgargañ ar patrom",+ 'admin.addons.ai.parsing.unreachable': "N'eus ket bet gallet tizhout ar servijer lec'hel",+ 'admin.addons.ai.parsing.apiKeyOptional': "Peurliesañ n'eus ket ezhomm",};export default admin;diff --git a/shared/src/i18n/br/assistant.ts b/shared/src/i18n/br/assistant.tsindex 6a3c4de4a..41ce55146 100644--- a/shared/src/i18n/br/assistant.ts+++ b/shared/src/i18n/br/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Obter uma chave','assistant.connect.hintAnthropic': 'Claude Max e Team incluem créditos de API.','assistant.connect.hintOpenai': 'Crie uma chave no seu painel da OpenAI.',- 'assistant.connect.hintGemini': 'O AI Studio tem um nível gratuito com limites por minuto e por dia, no qual o Google pode usar o que você envia para melhorar seus produtos. Com o faturamento ativado, os limites são maiores e isso não se aplica.',+ 'assistant.connect.hintGemini':+ 'O AI Studio tem um nível gratuito com limites por minuto e por dia, no qual o Google pode usar o que você envia para melhorar seus produtos. Com o faturamento ativado, os limites são maiores e isso não se aplica.','assistant.connect.hintOpenrouter': 'Entre com o OpenRouter, sem chave para copiar.','assistant.connect.openrouter': 'Conectar OpenRouter','assistant.connect.save': 'Conectar',@@ -94,7 +95,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Ir para a última mensagem','assistant.attach.button': 'Anexar reserva','assistant.attach.drop': 'Solte aqui e eu leio a reserva',- 'assistant.attach.unsupported': 'Não consigo ler este tipo de arquivo. Tente PDF, e-mail, imagem ou cartão da carteira.',+ 'assistant.attach.unsupported':+ 'Não consigo ler este tipo de arquivo. Tente PDF, e-mail, imagem ou cartão da carteira.','assistant.attach.tooLarge': 'Este arquivo tem mais de 10 MB.','assistant.composer.placeholder': 'Pergunte qualquer coisa sobre {trip}','assistant.composer.send': 'Enviar',@@ -338,5 +340,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Compartilhado','assistant.share.failed': 'Não deu para compartilhar. Tente de novo em instantes.','assistant.share.chatOff': 'O chat da viagem está desativado.',+ 'assistant.connect.descriptionWithParsing':+ "Ho kennask IA: ar skoazeller a ya en-dro gantañ, hag e lenn an erlerc'hioù a enporzhiit.",+ 'assistant.connect.descriptionParsingOnly': "Ho kennask IA: lenn a ra an erlerc'hioù a enporzhiit.",+ 'assistant.error.emptyAnswer': 'Distroet eo ar skoazeller hep respont. Klask en-dro?',+ 'assistant.followUp.title': 'Goude',+ 'assistant.followUp.cheaper': "Nemet re marc'hadmatoc'h",+ 'assistant.followUp.closer': "Tostoc'h d'am lojeiz",+ 'assistant.followUp.openNow': 'Petra a zo digor bremañ ?',+ 'assistant.followUp.nextDay': "Steuñv an deiz war-lerc'h en hevelep doare",+ 'assistant.followUp.relaxed': "Gra ar steuñv sioulic'h",+ 'assistant.followUp.dinners': 'Ouzhpenn preti evit an abardaezioù',+ 'assistant.followUp.rain': 'Ha mar bez glav ?',+ 'assistant.followUp.sun': 'Petra a dalv ar boan er-maez gant amzer vrav ?',+ 'assistant.followUp.more': "Lavar din muioc'h",+ 'assistant.followUp.next': 'Petra a ginnigez bremañ ?',+ 'assistant.menu.alternative': 'Kavout un dibab all',+ 'assistant.menu.alternativeAsk': "Kav un dibab mat all e-lec'h {place} tostik ha lavar perak e ya gwelloc'h.",+ 'assistant.menu.foodNearby': 'Preti tostik',+ 'assistant.menu.foodNearbyAsk': "Kinnig un nebeud lec'hioù mat da zebriñ e-kichen {place}.",+ 'assistant.menu.planDay': 'Steuñviñ an deiz-mañ',+ 'assistant.menu.planDayAsk': "Steuñv an deiz-mañ evidon : lec'hioù, eurioù hag ul lec'h da zebriñ.",+ 'assistant.menu.rainPlan': 'Steuñv glav',+ 'assistant.menu.rainPlanAsk': "Petra a c'hallomp ober an deiz-mañ mar bez glav ? Kinnig dibaboù diabarzh tostik.",+ 'assistant.preview.title': 'Kinnigoù ar skoazeller',+ 'assistant.preview.suggested': 'Kinnig',+ 'assistant.preview.movedHere': 'A zeu amañ',+ 'assistant.preview.removed': 'A ya kuit',+ 'assistant.preview.movedAway': "A vez dilec'hiet",+ 'assistant.check.ok': 'A ya gant an amzer',+ 'assistant.week.title': 'Devezhioù ar steuñv-mañ',+ 'assistant.week.day': 'Deiz',+ 'assistant.memory.title': 'Notennoù ar veaj',+ 'assistant.memory.edit': 'Kemmañ notennoù ar veaj',+ 'assistant.memory.sub': "Ar skoazeller a zalc'h kont anezho e pep kinnig evit ar veaj-mañ.",+ 'assistant.memory.quick': "C'hoantoù boas",+ 'assistant.memory.notes': 'Da notennoù',+ 'assistant.memory.placeholder':+ 'Da skouer : beajiñ a reomp gant ur bugelig, karout a reomp boued ar straed, kousket diwezhat.',+ 'assistant.memory.saved': 'Notennoù enrollet',+ 'assistant.memory.quick.vegetarian': 'Debriñ a reomp legumaj',+ 'assistant.memory.quick.kids': 'Beajiñ a reomp gant bugale',+ 'assistant.memory.quick.budget': 'Gant ur budjed bihan',+ 'assistant.memory.quick.slow': 'Lusk sioul, hep hast',+ 'assistant.memory.quick.accessible': 'Mont e-barzh hep derez, mar plij',+ 'assistant.memory.quick.noMuseums': 'Nebeut a virdioù',+ 'assistant.settings.costEstimates': "Priziañ ar c'houstoù",+ 'assistant.settings.costEstimatesHint':+ 'Gant ur preti pe ur bilhed e kinnig un dispign priziet evit ar budjed, evel ur gartenn da gadarnaat.',+ 'assistant.change.timeline.tight': '{count} munut re verr',+ 'assistant.change.timeline.tight.one': '{count} munut re verr',+ 'assistant.check.issues': '{count} poent da wiriañ',+ 'assistant.check.issues.one': '{count} poent da wiriañ',+ 'assistant.week.changes': '{count} kemm',+ 'assistant.week.changes.one': "{count} c'hemm",+ 'assistant.week.showAll': 'Diskouez an {count} kemm',+ 'assistant.week.showAll.one': "Diskouez {count} c'hemm",};export default assistant;diff --git a/shared/src/i18n/ca/admin.ts b/shared/src/i18n/ca/admin.tsindex 48ebe6fbb..f0f570c95 100644--- a/shared/src/i18n/ca/admin.ts+++ b/shared/src/i18n/ca/admin.ts@@ -984,5 +984,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Elimina la categoria','admin.packingTemplates.deleteCategoryConfirm': 'Vols eliminar la categoria "{name}" i tots els seus elements?','admin.rotateJwt.button': 'Renova',+ 'admin.addons.ai.name': 'IA',+ 'admin.addons.ai.description':+ "Una connexió per a l'assistent i la importació de reserves. MCP permet que altres apps d'IA facin servir TREK.",+ 'admin.addons.ai.setup': 'Configura la IA',+ 'admin.addons.ai.dialogSub': "La connexió que comparteixen l'assistent i l'anàlisi amb IA, i què pot fer cadascun.",+ 'admin.addons.ai.tab.connection': 'Connexió',+ 'admin.addons.ai.parsing.readsWith': 'Llegeix les reserves amb',+ 'admin.addons.ai.parsing.own': 'Connexió pròpia',+ 'admin.addons.ai.parsing.ownHint': "S'utilitza en lloc de la connexió compartida.",+ 'admin.addons.ai.parsing.useShared': 'Utilitza la connexió compartida',+ 'admin.addons.ai.parsing.sharedTag': 'Compartida',+ 'admin.addons.ai.parsing.perUser': 'Cada persona llegeix amb la seva pròpia connexió, configurada als seus ajustos.',+ 'admin.addons.ai.parsing.none':+ "Encara no hi ha connexió. Configura'n una per a tothom o dona'n una de pròpia a l'anàlisi amb IA.",+ 'admin.addons.ai.parsing.setupOwn': "Utilitza'n una altra",+ 'admin.addons.ai.parsing.installed': 'Instal·lats al servidor',+ 'admin.addons.ai.parsing.refresh': 'Actualitza',+ 'admin.addons.ai.parsing.noModels': "Encara no hi ha models instal·lats. Baixa'n un a sota.",+ 'admin.addons.ai.parsing.pullTitle': 'Baixa un model recomanat',+ 'admin.addons.ai.parsing.pull': 'Baixa',+ 'admin.addons.ai.parsing.pulling': 'Baixant…',+ 'admin.addons.ai.parsing.use': 'Utilitza',+ 'admin.addons.ai.parsing.selected': 'Seleccionat',+ 'admin.addons.ai.parsing.pulled': 'Model baixat',+ 'admin.addons.ai.parsing.pullFailed': "No s'ha pogut baixar el model",+ 'admin.addons.ai.parsing.unreachable': "No s'ha pogut connectar amb el servidor local",+ 'admin.addons.ai.parsing.apiKeyOptional': 'Normalment no cal',};export default admin;diff --git a/shared/src/i18n/ca/assistant.ts b/shared/src/i18n/ca/assistant.tsindex 703849d22..7d6c119c1 100644--- a/shared/src/i18n/ca/assistant.ts+++ b/shared/src/i18n/ca/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Obtén una clau','assistant.connect.hintAnthropic': 'Claude Max i Team inclouen crèdits d’API.','assistant.connect.hintOpenai': 'Crea una clau al teu tauler d’OpenAI.',- 'assistant.connect.hintGemini': 'L’AI Studio té un nivell gratuït amb límits per minut i per dia, en què Google pot fer servir el que envies per millorar els seus productes. Amb la facturació activada els límits són més alts i això no s’aplica.',+ 'assistant.connect.hintGemini':+ 'L’AI Studio té un nivell gratuït amb límits per minut i per dia, en què Google pot fer servir el que envies per millorar els seus productes. Amb la facturació activada els límits són més alts i això no s’aplica.','assistant.connect.hintOpenrouter': 'Inicia sessió amb OpenRouter, sense clau per copiar.','assistant.connect.openrouter': 'Connecta OpenRouter','assistant.connect.save': 'Connecta',@@ -94,7 +95,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Ves a l’últim missatge','assistant.attach.button': 'Adjunta una reserva','assistant.attach.drop': 'Deixa-ho aquí i llegiré la reserva',- 'assistant.attach.unsupported': 'No puc llegir aquest tipus de fitxer. Prova amb un PDF, un correu, una imatge o una targeta de cartera.',+ 'assistant.attach.unsupported':+ 'No puc llegir aquest tipus de fitxer. Prova amb un PDF, un correu, una imatge o una targeta de cartera.','assistant.attach.tooLarge': 'Aquest fitxer fa més de 10 MB.','assistant.composer.placeholder': 'Pregunta el que vulguis sobre {trip}','assistant.composer.send': 'Envia',@@ -341,5 +343,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Compartit','assistant.share.failed': 'No s’ha pogut compartir. Torna-ho a provar d’aquí a un moment.','assistant.share.chatOff': 'El xat del viatge està desactivat.',+ 'assistant.connect.descriptionWithParsing':+ "La teva connexió d'IA: l'assistent la fa servir i llegeix les reserves que importes.",+ 'assistant.connect.descriptionParsingOnly': "La teva connexió d'IA: llegeix les reserves que importes.",+ 'assistant.error.emptyAnswer': "L'assistent no ha donat cap resposta. Ho torno a provar?",+ 'assistant.followUp.title': 'Continua amb',+ 'assistant.followUp.cheaper': 'Només més econòmics',+ 'assistant.followUp.closer': "Més a prop de l'allotjament",+ 'assistant.followUp.openNow': 'Què està obert ara?',+ 'assistant.followUp.nextDay': 'Planifica el dia següent de la mateixa manera',+ 'assistant.followUp.relaxed': 'Fes el pla més relaxat',+ 'assistant.followUp.dinners': 'Afegeix restaurants per als vespres',+ 'assistant.followUp.rain': 'I si plou?',+ 'assistant.followUp.sun': "Què val la pena a l'aire lliure amb bon temps?",+ 'assistant.followUp.more': "Explica-me'n més",+ 'assistant.followUp.next': 'Què proposes ara?',+ 'assistant.menu.alternative': 'Trobar una alternativa',+ 'assistant.menu.alternativeAsk': 'Troba una bona alternativa a {place} a prop i explica per què encaixa millor.',+ 'assistant.menu.foodNearby': 'Restaurant a prop',+ 'assistant.menu.foodNearbyAsk': 'Proposa uns quants bons llocs per menjar a prop de {place}.',+ 'assistant.menu.planDay': 'Planificar aquest dia',+ 'assistant.menu.planDayAsk': 'Planifica aquest dia per a mi: llocs, horaris i un lloc per menjar.',+ 'assistant.menu.rainPlan': 'Pla de pluja',+ 'assistant.menu.rainPlanAsk': 'Què podem fer aquest dia si plou? Proposa alternatives a cobert a prop.',+ 'assistant.preview.title': "Propostes de l'assistent",+ 'assistant.preview.suggested': 'Proposta',+ 'assistant.preview.movedHere': 'Ve aquí',+ 'assistant.preview.removed': 'Es treu',+ 'assistant.preview.movedAway': 'Es mou',+ 'assistant.check.ok': "Encaixa en l'horari",+ 'assistant.week.title': "Els dies d'aquest pla",+ 'assistant.week.day': 'Dia',+ 'assistant.memory.title': 'Notes del viatge',+ 'assistant.memory.edit': 'Edita les notes del viatge',+ 'assistant.memory.sub': "L'assistent les té en compte en cada proposta d'aquest viatge.",+ 'assistant.memory.quick': 'Desitjos habituals',+ 'assistant.memory.notes': 'Les teves notes',+ 'assistant.memory.placeholder':+ 'Per exemple: viatgem amb un nen petit, ens encanta el menjar de carrer, res de matinar.',+ 'assistant.memory.saved': 'Notes desades',+ 'assistant.memory.quick.vegetarian': 'Mengem vegetarià',+ 'assistant.memory.quick.kids': 'Viatgem amb nens',+ 'assistant.memory.quick.budget': 'Amb poc pressupost',+ 'assistant.memory.quick.slow': 'Ritme tranquil, sense presses',+ 'assistant.memory.quick.accessible': 'Accés sense graons, si us plau',+ 'assistant.memory.quick.noMuseums': 'Pocs museus',+ 'assistant.settings.costEstimates': 'Estimar costos',+ 'assistant.settings.costEstimatesHint':+ 'Amb un restaurant o una entrada proposa una despesa estimada per al pressupost, com a targeta que confirmes.',+ 'assistant.change.timeline.tight': 'Falten {count} min',+ 'assistant.change.timeline.tight.one': 'Falta {count} min',+ 'assistant.check.issues': '{count} coses a revisar',+ 'assistant.check.issues.one': '{count} cosa a revisar',+ 'assistant.week.changes': '{count} canvis',+ 'assistant.week.changes.one': '{count} canvi',+ 'assistant.week.showAll': 'Mostra els {count} canvis',+ 'assistant.week.showAll.one': 'Mostra {count} canvi',};export default assistant;diff --git a/shared/src/i18n/cs/admin.ts b/shared/src/i18n/cs/admin.tsindex 12b2d22e7..1fda2bee6 100644--- a/shared/src/i18n/cs/admin.ts+++ b/shared/src/i18n/cs/admin.ts@@ -976,5 +976,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Smazat kategorii','admin.packingTemplates.deleteCategoryConfirm': 'Smazat kategorii "{name}" a všechny její položky?','admin.rotateJwt.button': 'Obnovit',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'Jedno připojení pro asistenta a import rezervací. MCP umožní jiným AI aplikacím používat TREK.',+ 'admin.addons.ai.setup': 'Nastavit AI',+ 'admin.addons.ai.dialogSub': 'Připojení, které sdílí asistent a AI zpracování, a co smí každý z nich.',+ 'admin.addons.ai.tab.connection': 'Připojení',+ 'admin.addons.ai.parsing.readsWith': 'Čte rezervace pomocí',+ 'admin.addons.ai.parsing.own': 'Vlastní připojení',+ 'admin.addons.ai.parsing.ownHint': 'Používá se místo sdíleného připojení.',+ 'admin.addons.ai.parsing.useShared': 'Použít sdílené připojení',+ 'admin.addons.ai.parsing.sharedTag': 'Sdílené',+ 'admin.addons.ai.parsing.perUser': 'Každý čte pomocí vlastního připojení ze svého nastavení.',+ 'admin.addons.ai.parsing.none':+ 'Zatím žádné připojení. Nastavte jedno pro všechny, nebo dejte AI zpracování vlastní.',+ 'admin.addons.ai.parsing.setupOwn': 'Použít jiné',+ 'admin.addons.ai.parsing.installed': 'Nainstalované na serveru',+ 'admin.addons.ai.parsing.refresh': 'Obnovit',+ 'admin.addons.ai.parsing.noModels': 'Zatím nejsou nainstalované žádné modely. Stáhněte si jeden níže.',+ 'admin.addons.ai.parsing.pullTitle': 'Stáhnout doporučený model',+ 'admin.addons.ai.parsing.pull': 'Stáhnout',+ 'admin.addons.ai.parsing.pulling': 'Stahování…',+ 'admin.addons.ai.parsing.use': 'Použít',+ 'admin.addons.ai.parsing.selected': 'Vybráno',+ 'admin.addons.ai.parsing.pulled': 'Model stažen',+ 'admin.addons.ai.parsing.pullFailed': 'Model se nepodařilo stáhnout',+ 'admin.addons.ai.parsing.unreachable': 'Místní server není dostupný',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Většinou není potřeba',};export default admin;diff --git a/shared/src/i18n/cs/assistant.ts b/shared/src/i18n/cs/assistant.tsindex 7b2990c73..3a96e5a58 100644--- a/shared/src/i18n/cs/assistant.ts+++ b/shared/src/i18n/cs/assistant.ts@@ -43,7 +43,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Získat klíč','assistant.connect.hintAnthropic': 'Claude Max a Team zahrnují kredity API.','assistant.connect.hintOpenai': 'Vytvoř klíč na svém panelu OpenAI.',- 'assistant.connect.hintGemini': 'AI Studio má bezplatnou úroveň s limity za minutu a za den, ve které může Google to, co odešleš, použít ke zlepšení svých produktů. Se zapnutou fakturací jsou limity vyšší a to neplatí.',+ 'assistant.connect.hintGemini':+ 'AI Studio má bezplatnou úroveň s limity za minutu a za den, ve které může Google to, co odešleš, použít ke zlepšení svých produktů. Se zapnutou fakturací jsou limity vyšší a to neplatí.','assistant.connect.hintOpenrouter': 'Přihlas se přes OpenRouter, žádný klíč kopírovat nemusíš.','assistant.connect.openrouter': 'Připojit OpenRouter','assistant.connect.save': 'Připojit',@@ -93,7 +94,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Přejít na poslední zprávu','assistant.attach.button': 'Přiložit rezervaci','assistant.attach.drop': 'Pusť to sem a přečtu rezervaci',- 'assistant.attach.unsupported': 'Tento typ souboru neumím přečíst. Zkus PDF, e-mail, obrázek nebo kartu do peněženky.',+ 'assistant.attach.unsupported':+ 'Tento typ souboru neumím přečíst. Zkus PDF, e-mail, obrázek nebo kartu do peněženky.','assistant.attach.tooLarge': 'Tento soubor je větší než 10 MB.','assistant.composer.placeholder': 'Zeptej se na cokoli o {trip}','assistant.composer.send': 'Odeslat',@@ -357,5 +359,64 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Sdíleno','assistant.share.failed': 'Sdílení se nepovedlo. Zkus to za chvíli znovu.','assistant.share.chatOff': 'Chat výletu je vypnutý.',+ 'assistant.connect.descriptionWithParsing':+ 'Vaše AI připojení: běží na něm asistent a čte rezervace, které importujete.',+ 'assistant.connect.descriptionParsingOnly': 'Vaše AI připojení: čte rezervace, které importujete.',+ 'assistant.error.emptyAnswer': 'Asistent se vrátil bez odpovědi. Mám to zkusit znovu?',+ 'assistant.followUp.title': 'Dál',+ 'assistant.followUp.cheaper': 'Jen levnější',+ 'assistant.followUp.closer': 'Blíž k mému ubytování',+ 'assistant.followUp.openNow': 'Co má teď otevřeno?',+ 'assistant.followUp.nextDay': 'Naplánuj další den stejně',+ 'assistant.followUp.relaxed': 'Udělej plán volnější',+ 'assistant.followUp.dinners': 'Přidej restaurace na večery',+ 'assistant.followUp.rain': 'Co když bude pršet?',+ 'assistant.followUp.sun': 'Co stojí za to venku za hezkého počasí?',+ 'assistant.followUp.more': 'Řekni mi víc',+ 'assistant.followUp.next': 'Co navrhuješ teď?',+ 'assistant.menu.alternative': 'Najít alternativu',+ 'assistant.menu.alternativeAsk': 'Najdi dobrou alternativu k {place} poblíž a řekni, proč se hodí lépe.',+ 'assistant.menu.foodNearby': 'Restaurace poblíž',+ 'assistant.menu.foodNearbyAsk': 'Navrhni pár dobrých míst k jídlu poblíž {place}.',+ 'assistant.menu.planDay': 'Naplánovat den',+ 'assistant.menu.planDayAsk': 'Naplánuj mi tento den: místa, časy a kde se najíst.',+ 'assistant.menu.rainPlan': 'Plán na déšť',+ 'assistant.menu.rainPlanAsk': 'Co můžeme tento den dělat, když bude pršet? Navrhni vnitřní alternativy poblíž.',+ 'assistant.preview.title': 'Návrhy asistenta',+ 'assistant.preview.suggested': 'Návrh',+ 'assistant.preview.movedHere': 'Přibude sem',+ 'assistant.preview.removed': 'Odpadá',+ 'assistant.preview.movedAway': 'Přesune se',+ 'assistant.check.ok': 'Časově vychází',+ 'assistant.week.title': 'Dny tohoto plánu',+ 'assistant.week.day': 'Den',+ 'assistant.memory.title': 'Poznámky k cestě',+ 'assistant.memory.edit': 'Upravit poznámky k cestě',+ 'assistant.memory.sub': 'Asistent na ně myslí u každého návrhu pro tuto cestu.',+ 'assistant.memory.quick': 'Častá přání',+ 'assistant.memory.notes': 'Tvoje poznámky',+ 'assistant.memory.placeholder': 'Například: cestujeme s batoletem, milujeme street food, žádné brzké vstávání.',+ 'assistant.memory.saved': 'Poznámky uloženy',+ 'assistant.memory.quick.vegetarian': 'Jíme vegetariánsky',+ 'assistant.memory.quick.kids': 'Cestujeme s dětmi',+ 'assistant.memory.quick.budget': 'S malým rozpočtem',+ 'assistant.memory.quick.slow': 'Klidné tempo, bez spěchu',+ 'assistant.memory.quick.accessible': 'Prosím bezbariérově',+ 'assistant.memory.quick.noMuseums': 'Málo muzeí',+ 'assistant.settings.costEstimates': 'Odhadovat náklady',+ 'assistant.settings.costEstimatesHint':+ 'U restaurace nebo vstupenky navrhne odhadovaný výdaj do rozpočtu jako kartu k potvrzení.',+ 'assistant.change.timeline.tight': 'Chybí {count} min',+ 'assistant.change.timeline.tight.one': 'Chybí {count} min',+ 'assistant.change.timeline.tight.few': 'Chybí {count} min',+ 'assistant.check.issues': '{count} bodů ke kontrole',+ 'assistant.check.issues.one': '{count} bod ke kontrole',+ 'assistant.check.issues.few': '{count} body ke kontrole',+ 'assistant.week.changes': '{count} změn',+ 'assistant.week.changes.one': '{count} změna',+ 'assistant.week.changes.few': '{count} změny',+ 'assistant.week.showAll': 'Zobrazit všech {count} změn',+ 'assistant.week.showAll.one': 'Zobrazit {count} změnu',+ 'assistant.week.showAll.few': 'Zobrazit všechny {count} změny',};export default assistant;diff --git a/shared/src/i18n/de/admin.ts b/shared/src/i18n/de/admin.tsindex 44df0cd37..d1c53a0be 100644--- a/shared/src/i18n/de/admin.ts+++ b/shared/src/i18n/de/admin.ts@@ -976,5 +976,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Kategorie löschen','admin.packingTemplates.deleteCategoryConfirm': 'Kategorie "{name}" und alle ihre Einträge löschen?','admin.rotateJwt.button': 'Erneuern',+ 'admin.addons.ai.name': 'KI',+ 'admin.addons.ai.description':+ 'Eine Verbindung für den Assistenten und das Lesen von Buchungen. MCP öffnet TREK für andere KI-Apps.',+ 'admin.addons.ai.setup': 'KI einrichten',+ 'admin.addons.ai.dialogSub': 'Die Verbindung, die Assistent und KI-Auswertung teilen, und was jeder davon darf.',+ 'admin.addons.ai.tab.connection': 'Verbindung',+ 'admin.addons.ai.parsing.readsWith': 'Liest Buchungen mit',+ 'admin.addons.ai.parsing.own': 'Eigene Verbindung',+ 'admin.addons.ai.parsing.ownHint': 'Wird statt der gemeinsamen Verbindung verwendet.',+ 'admin.addons.ai.parsing.useShared': 'Gemeinsame Verbindung verwenden',+ 'admin.addons.ai.parsing.sharedTag': 'Gemeinsam',+ 'admin.addons.ai.parsing.perUser': 'Jede Person liest mit ihrer eigenen Verbindung aus ihren Einstellungen.',+ 'admin.addons.ai.parsing.none':+ 'Noch keine Verbindung. Richte eine für alle ein oder gib der KI-Auswertung eine eigene.',+ 'admin.addons.ai.parsing.setupOwn': 'Eine andere verwenden',+ 'admin.addons.ai.parsing.installed': 'Auf dem Server installiert',+ 'admin.addons.ai.parsing.refresh': 'Aktualisieren',+ 'admin.addons.ai.parsing.noModels': 'Noch keine Modelle installiert. Lade unten eins.',+ 'admin.addons.ai.parsing.pullTitle': 'Empfohlenes Modell laden',+ 'admin.addons.ai.parsing.pull': 'Laden',+ 'admin.addons.ai.parsing.pulling': 'Lädt…',+ 'admin.addons.ai.parsing.use': 'Verwenden',+ 'admin.addons.ai.parsing.selected': 'Ausgewählt',+ 'admin.addons.ai.parsing.pulled': 'Modell geladen',+ 'admin.addons.ai.parsing.pullFailed': 'Modell konnte nicht geladen werden',+ 'admin.addons.ai.parsing.unreachable': 'Der lokale Server ist nicht erreichbar',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Meist nicht nötig',};export default admin;diff --git a/shared/src/i18n/de/assistant.ts b/shared/src/i18n/de/assistant.tsindex d3fd6038f..c3d01f3ff 100644--- a/shared/src/i18n/de/assistant.ts+++ b/shared/src/i18n/de/assistant.ts@@ -45,7 +45,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Schlüssel holen','assistant.connect.hintAnthropic': 'Claude Max und Team enthalten API-Guthaben.','assistant.connect.hintOpenai': 'Leg einen Schlüssel in deinem OpenAI-Dashboard an.',- 'assistant.connect.hintGemini': 'Im AI Studio gibt es eine Gratis-Stufe mit Limits pro Minute und pro Tag, in der Google deine Eingaben zur Verbesserung seiner Produkte nutzen darf. Mit aktivierter Abrechnung gelten höhere Limits, und das entfällt.',+ 'assistant.connect.hintGemini':+ 'Im AI Studio gibt es eine Gratis-Stufe mit Limits pro Minute und pro Tag, in der Google deine Eingaben zur Verbesserung seiner Produkte nutzen darf. Mit aktivierter Abrechnung gelten höhere Limits, und das entfällt.','assistant.connect.hintOpenrouter': 'Melde dich bei OpenRouter an, ganz ohne Schlüssel zu kopieren.','assistant.connect.openrouter': 'Mit OpenRouter verbinden','assistant.connect.save': 'Verbinden',@@ -338,5 +339,62 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Geteilt','assistant.share.failed': 'Teilen hat nicht geklappt. Versuch es gleich noch mal.','assistant.share.chatOff': 'Der Trip-Chat ist ausgeschaltet.',+ 'assistant.connect.descriptionWithParsing':+ 'Deine KI-Verbindung: Der Assistent läuft darüber, und sie liest die Buchungen, die du importierst.',+ 'assistant.connect.descriptionParsingOnly': 'Deine KI-Verbindung: Sie liest die Buchungen, die du importierst.',+ 'assistant.error.emptyAnswer': 'Der Assistent kam ohne Antwort zurück. Soll ich es noch mal versuchen?',+ 'assistant.followUp.title': 'Weiter mit',+ 'assistant.followUp.cheaper': 'Nur günstigere',+ 'assistant.followUp.closer': 'Näher an meiner Unterkunft',+ 'assistant.followUp.openNow': 'Was hat gerade geöffnet?',+ 'assistant.followUp.nextDay': 'Plane den nächsten Tag genauso',+ 'assistant.followUp.relaxed': 'Mach den Plan entspannter',+ 'assistant.followUp.dinners': 'Füge Restaurants für die Abende hinzu',+ 'assistant.followUp.rain': 'Was machen wir bei Regen?',+ 'assistant.followUp.sun': 'Was lohnt sich bei schönem Wetter draußen?',+ 'assistant.followUp.more': 'Erzähl mir mehr',+ 'assistant.followUp.next': 'Was schlägst du als Nächstes vor?',+ 'assistant.menu.alternative': 'Alternative finden',+ 'assistant.menu.alternativeAsk':+ 'Finde eine gute Alternative zu {place} in der Nähe und sag, warum sie besser passt.',+ 'assistant.menu.foodNearby': 'Restaurant in der Nähe',+ 'assistant.menu.foodNearbyAsk': 'Schlag ein paar gute Orte zum Essen in der Nähe von {place} vor.',+ 'assistant.menu.planDay': 'Tag planen lassen',+ 'assistant.menu.planDayAsk': 'Plane diesen Tag für mich: Orte, Zeiten und einen Ort zum Essen.',+ 'assistant.menu.rainPlan': 'Regenplan',+ 'assistant.menu.rainPlanAsk':+ 'Was können wir an diesem Tag bei Regen machen? Schlag Alternativen drinnen in der Nähe vor.',+ 'assistant.preview.title': 'Vorschläge des Assistenten',+ 'assistant.preview.suggested': 'Vorschlag',+ 'assistant.preview.movedHere': 'Kommt hierher',+ 'assistant.preview.removed': 'Fällt weg',+ 'assistant.preview.movedAway': 'Wird verschoben',+ 'assistant.check.ok': 'Passt zeitlich',+ 'assistant.week.title': 'Die Tage dieses Plans',+ 'assistant.week.day': 'Tag',+ 'assistant.memory.title': 'Merkzettel',+ 'assistant.memory.edit': 'Merkzettel bearbeiten',+ 'assistant.memory.sub': 'Der Assistent beachtet das bei jedem Vorschlag für diesen Trip.',+ 'assistant.memory.quick': 'Häufige Wünsche',+ 'assistant.memory.notes': 'Deine Notizen',+ 'assistant.memory.placeholder': 'Zum Beispiel: Wir reisen mit Kleinkind, lieben Streetfood, kein frühes Aufstehen.',+ 'assistant.memory.saved': 'Merkzettel gespeichert',+ 'assistant.memory.quick.vegetarian': 'Wir essen vegetarisch',+ 'assistant.memory.quick.kids': 'Wir reisen mit Kindern',+ 'assistant.memory.quick.budget': 'Mit kleinem Budget',+ 'assistant.memory.quick.slow': 'Entspanntes Tempo, keine Hetze',+ 'assistant.memory.quick.accessible': 'Bitte barrierefrei',+ 'assistant.memory.quick.noMuseums': 'Wenig Museen',+ 'assistant.settings.costEstimates': 'Kosten schätzen',+ 'assistant.settings.costEstimatesHint':+ 'Bei einem Restaurant oder Eintritt schlägt er eine geschätzte Ausgabe fürs Budget vor, als Karte zum Bestätigen.',+ 'assistant.change.timeline.tight': '{count} min zu knapp',+ 'assistant.change.timeline.tight.one': '{count} min zu knapp',+ 'assistant.check.issues': '{count} Hinweise',+ 'assistant.check.issues.one': '{count} Hinweis',+ 'assistant.week.changes': '{count} Änderungen',+ 'assistant.week.changes.one': '{count} Änderung',+ 'assistant.week.showAll': 'Alle {count} Änderungen zeigen',+ 'assistant.week.showAll.one': '{count} Änderung zeigen',};export default assistant;diff --git a/shared/src/i18n/en/admin.ts b/shared/src/i18n/en/admin.tsindex d53df3a24..52c6c635f 100644--- a/shared/src/i18n/en/admin.ts+++ b/shared/src/i18n/en/admin.ts@@ -946,5 +946,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Delete category','admin.packingTemplates.deleteCategoryConfirm': 'Delete the category "{name}" and all its items?','admin.rotateJwt.button': 'Rotate',+ 'admin.addons.ai.name': 'AI',+ 'admin.addons.ai.description':+ 'One connection for the assistant and booking import. MCP lets other AI apps use TREK.',+ 'admin.addons.ai.setup': 'Set up AI',+ 'admin.addons.ai.dialogSub': 'The connection the assistant and AI parsing share, and what each of them may do.',+ 'admin.addons.ai.tab.connection': 'Connection',+ 'admin.addons.ai.parsing.readsWith': 'Reads bookings with',+ 'admin.addons.ai.parsing.own': 'Own connection',+ 'admin.addons.ai.parsing.ownHint': 'Used instead of the shared connection.',+ 'admin.addons.ai.parsing.useShared': 'Use the shared connection',+ 'admin.addons.ai.parsing.sharedTag': 'Shared',+ 'admin.addons.ai.parsing.perUser': 'Each person reads with their own connection, set up in their settings.',+ 'admin.addons.ai.parsing.none': 'No connection yet. Set one up for everyone, or give AI parsing its own.',+ 'admin.addons.ai.parsing.setupOwn': 'Use a different one',+ 'admin.addons.ai.parsing.installed': 'Installed on the server',+ 'admin.addons.ai.parsing.refresh': 'Refresh',+ 'admin.addons.ai.parsing.noModels': 'No models installed yet. Pull one below.',+ 'admin.addons.ai.parsing.pullTitle': 'Pull a recommended model',+ 'admin.addons.ai.parsing.pull': 'Pull',+ 'admin.addons.ai.parsing.pulling': 'Pulling…',+ 'admin.addons.ai.parsing.use': 'Use',+ 'admin.addons.ai.parsing.selected': 'Selected',+ 'admin.addons.ai.parsing.pulled': 'Model pulled',+ 'admin.addons.ai.parsing.pullFailed': 'Could not pull the model',+ 'admin.addons.ai.parsing.unreachable': 'Could not reach the local server',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Often not needed',};export default admin;diff --git a/shared/src/i18n/en/assistant.ts b/shared/src/i18n/en/assistant.tsindex 2be4e9eaf..4a5bb1ad6 100644--- a/shared/src/i18n/en/assistant.ts+++ b/shared/src/i18n/en/assistant.ts@@ -43,7 +43,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Get a key','assistant.connect.hintAnthropic': 'Claude Max and Team include API credits.','assistant.connect.hintOpenai': 'Create a key in your OpenAI dashboard.',- 'assistant.connect.hintGemini': 'AI Studio has a free tier with limits per minute and per day, on which Google may use what you send to improve its products. With billing turned on the limits are higher and that does not apply.',+ 'assistant.connect.hintGemini':+ 'AI Studio has a free tier with limits per minute and per day, on which Google may use what you send to improve its products. With billing turned on the limits are higher and that does not apply.','assistant.connect.hintOpenrouter': 'Sign in with OpenRouter, no key to copy.','assistant.connect.openrouter': 'Connect OpenRouter','assistant.connect.save': 'Connect',@@ -335,5 +336,60 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Shared','assistant.share.failed': 'Could not share this. Please try again in a moment.','assistant.share.chatOff': 'The trip chat is turned off.',+ 'assistant.connect.descriptionWithParsing':+ 'Your AI connection: the assistant runs on it, and it reads the bookings you import.',+ 'assistant.connect.descriptionParsingOnly': 'Your AI connection: it reads the bookings you import.',+ 'assistant.error.emptyAnswer': 'The assistant came back without an answer. Shall I try again?',+ 'assistant.followUp.title': 'Ask next',+ 'assistant.followUp.cheaper': 'Only cheaper ones',+ 'assistant.followUp.closer': "Closer to where I'm staying",+ 'assistant.followUp.openNow': 'Which are open right now?',+ 'assistant.followUp.nextDay': 'Plan the next day the same way',+ 'assistant.followUp.relaxed': 'Make the plan more relaxed',+ 'assistant.followUp.dinners': 'Add restaurants for the evenings',+ 'assistant.followUp.rain': 'What if it rains?',+ 'assistant.followUp.sun': "What's best outdoors in good weather?",+ 'assistant.followUp.more': 'Tell me more',+ 'assistant.followUp.next': 'What do you suggest next?',+ 'assistant.menu.alternative': 'Find an alternative',+ 'assistant.menu.alternativeAsk': 'Find a good alternative to {place} nearby, and say why it fits better.',+ 'assistant.menu.foodNearby': 'Restaurant nearby',+ 'assistant.menu.foodNearbyAsk': 'Suggest a few good places to eat near {place}.',+ 'assistant.menu.planDay': 'Plan this day',+ 'assistant.menu.planDayAsk': 'Plan this day for me: places, times and somewhere to eat.',+ 'assistant.menu.rainPlan': 'Plan for rain',+ 'assistant.menu.rainPlanAsk': 'What can we do on this day if it rains? Suggest indoor alternatives nearby.',+ 'assistant.preview.title': 'Suggested by the assistant',+ 'assistant.preview.suggested': 'Suggested',+ 'assistant.preview.movedHere': 'Moves here',+ 'assistant.preview.removed': 'Comes off',+ 'assistant.preview.movedAway': 'Moves away',+ 'assistant.check.ok': 'Fits the time',+ 'assistant.week.title': 'The days of this plan',+ 'assistant.week.day': 'Day',+ 'assistant.memory.title': 'Trip notes',+ 'assistant.memory.edit': 'Edit trip notes',+ 'assistant.memory.sub': 'The assistant keeps these in mind for every suggestion on this trip.',+ 'assistant.memory.quick': 'Common wishes',+ 'assistant.memory.notes': 'Your notes',+ 'assistant.memory.placeholder': 'For example: we travel with a toddler, love street food, no early mornings.',+ 'assistant.memory.saved': 'Trip notes saved',+ 'assistant.memory.quick.vegetarian': 'We eat vegetarian',+ 'assistant.memory.quick.kids': 'We travel with children',+ 'assistant.memory.quick.budget': 'On a tight budget',+ 'assistant.memory.quick.slow': 'A relaxed pace, no rushing',+ 'assistant.memory.quick.accessible': 'Step-free access please',+ 'assistant.memory.quick.noMuseums': 'Few museums',+ 'assistant.settings.costEstimates': 'Estimate costs',+ 'assistant.settings.costEstimatesHint':+ 'With a restaurant or a ticket it suggests an estimated expense for the budget, as a card you confirm.',+ 'assistant.change.timeline.tight': '{count} min too tight',+ 'assistant.change.timeline.tight.one': '{count} min too tight',+ 'assistant.check.issues': '{count} things to check',+ 'assistant.check.issues.one': '{count} thing to check',+ 'assistant.week.changes': '{count} changes',+ 'assistant.week.changes.one': '{count} change',+ 'assistant.week.showAll': 'Show all {count} changes',+ 'assistant.week.showAll.one': 'Show {count} change',};export default assistant;diff --git a/shared/src/i18n/es/admin.ts b/shared/src/i18n/es/admin.tsindex 0db6f5c55..f75ecb423 100644--- a/shared/src/i18n/es/admin.ts+++ b/shared/src/i18n/es/admin.ts@@ -988,5 +988,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Eliminar categoría','admin.packingTemplates.deleteCategoryConfirm': '¿Eliminar la categoría "{name}" y todos sus elementos?','admin.rotateJwt.button': 'Renovar',+ 'admin.addons.ai.name': 'IA',+ 'admin.addons.ai.description':+ 'Una conexión para el asistente y la importación de reservas. MCP permite que otras apps de IA usen TREK.',+ 'admin.addons.ai.setup': 'Configurar IA',+ 'admin.addons.ai.dialogSub':+ 'La conexión que comparten el asistente y el análisis con IA, y lo que puede hacer cada uno.',+ 'admin.addons.ai.tab.connection': 'Conexión',+ 'admin.addons.ai.parsing.readsWith': 'Lee las reservas con',+ 'admin.addons.ai.parsing.own': 'Conexión propia',+ 'admin.addons.ai.parsing.ownHint': 'Se usa en lugar de la conexión compartida.',+ 'admin.addons.ai.parsing.useShared': 'Usar la conexión compartida',+ 'admin.addons.ai.parsing.sharedTag': 'Compartida',+ 'admin.addons.ai.parsing.perUser': 'Cada persona lee con su propia conexión, configurada en sus ajustes.',+ 'admin.addons.ai.parsing.none': 'Aún no hay conexión. Configura una para todos o dale al análisis con IA una propia.',+ 'admin.addons.ai.parsing.setupOwn': 'Usar otra',+ 'admin.addons.ai.parsing.installed': 'Instalados en el servidor',+ 'admin.addons.ai.parsing.refresh': 'Actualizar',+ 'admin.addons.ai.parsing.noModels': 'Aún no hay modelos instalados. Descarga uno abajo.',+ 'admin.addons.ai.parsing.pullTitle': 'Descargar un modelo recomendado',+ 'admin.addons.ai.parsing.pull': 'Descargar',+ 'admin.addons.ai.parsing.pulling': 'Descargando…',+ 'admin.addons.ai.parsing.use': 'Usar',+ 'admin.addons.ai.parsing.selected': 'Seleccionado',+ 'admin.addons.ai.parsing.pulled': 'Modelo descargado',+ 'admin.addons.ai.parsing.pullFailed': 'No se pudo descargar el modelo',+ 'admin.addons.ai.parsing.unreachable': 'No se pudo conectar con el servidor local',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Normalmente no hace falta',};export default admin;diff --git a/shared/src/i18n/es/assistant.ts b/shared/src/i18n/es/assistant.tsindex 7417099dd..bd9757ad4 100644--- a/shared/src/i18n/es/assistant.ts+++ b/shared/src/i18n/es/assistant.ts@@ -43,7 +43,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Obtener una clave','assistant.connect.hintAnthropic': 'Claude Max y Team incluyen créditos de API.','assistant.connect.hintOpenai': 'Crea una clave en tu panel de OpenAI.',- 'assistant.connect.hintGemini': 'AI Studio tiene un nivel gratuito con límites por minuto y por día, en el que Google puede usar lo que envías para mejorar sus productos. Con la facturación activada, los límites son más altos y esto no se aplica.',+ 'assistant.connect.hintGemini':+ 'AI Studio tiene un nivel gratuito con límites por minuto y por día, en el que Google puede usar lo que envías para mejorar sus productos. Con la facturación activada, los límites son más altos y esto no se aplica.','assistant.connect.hintOpenrouter': 'Inicia sesión con OpenRouter, sin clave que copiar.','assistant.connect.openrouter': 'Conectar OpenRouter','assistant.connect.save': 'Conectar',@@ -92,7 +93,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Ir al último mensaje','assistant.attach.button': 'Adjuntar una reserva','assistant.attach.drop': 'Suéltalo aquí y leeré la reserva',- 'assistant.attach.unsupported': 'No puedo leer este tipo de archivo. Prueba con un PDF, un correo, una imagen o un pase de cartera.',+ 'assistant.attach.unsupported':+ 'No puedo leer este tipo de archivo. Prueba con un PDF, un correo, una imagen o un pase de cartera.','assistant.attach.tooLarge': 'Este archivo supera los 10 MB.','assistant.composer.placeholder': 'Pregunta lo que quieras sobre {trip}','assistant.composer.send': 'Enviar',@@ -336,5 +338,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Compartido','assistant.share.failed': 'No se pudo compartir. Inténtalo de nuevo en un momento.','assistant.share.chatOff': 'El chat del viaje está desactivado.',+ 'assistant.connect.descriptionWithParsing':+ 'Tu conexión de IA: el asistente funciona con ella y lee las reservas que importas.',+ 'assistant.connect.descriptionParsingOnly': 'Tu conexión de IA: lee las reservas que importas.',+ 'assistant.error.emptyAnswer': 'El asistente volvió sin respuesta. ¿Lo intento de nuevo?',+ 'assistant.followUp.title': 'Seguir con',+ 'assistant.followUp.cheaper': 'Solo más baratos',+ 'assistant.followUp.closer': 'Más cerca de mi alojamiento',+ 'assistant.followUp.openNow': '¿Qué está abierto ahora?',+ 'assistant.followUp.nextDay': 'Planifica el día siguiente igual',+ 'assistant.followUp.relaxed': 'Haz el plan más relajado',+ 'assistant.followUp.dinners': 'Añade restaurantes para las noches',+ 'assistant.followUp.rain': '¿Y si llueve?',+ 'assistant.followUp.sun': '¿Qué merece la pena al aire libre con buen tiempo?',+ 'assistant.followUp.more': 'Cuéntame más',+ 'assistant.followUp.next': '¿Qué sugieres ahora?',+ 'assistant.menu.alternative': 'Buscar alternativa',+ 'assistant.menu.alternativeAsk': 'Busca una buena alternativa a {place} cerca y explica por qué encaja mejor.',+ 'assistant.menu.foodNearby': 'Restaurante cerca',+ 'assistant.menu.foodNearbyAsk': 'Sugiere algunos buenos sitios para comer cerca de {place}.',+ 'assistant.menu.planDay': 'Planificar este día',+ 'assistant.menu.planDayAsk': 'Planifica este día para mí: lugares, horarios y un sitio para comer.',+ 'assistant.menu.rainPlan': 'Plan para lluvia',+ 'assistant.menu.rainPlanAsk': '¿Qué podemos hacer este día si llueve? Sugiere alternativas bajo techo cerca.',+ 'assistant.preview.title': 'Sugerencias del asistente',+ 'assistant.preview.suggested': 'Sugerencia',+ 'assistant.preview.movedHere': 'Viene aquí',+ 'assistant.preview.removed': 'Se quita',+ 'assistant.preview.movedAway': 'Se mueve',+ 'assistant.check.ok': 'Encaja en el horario',+ 'assistant.week.title': 'Los días de este plan',+ 'assistant.week.day': 'Día',+ 'assistant.memory.title': 'Notas del viaje',+ 'assistant.memory.edit': 'Editar notas del viaje',+ 'assistant.memory.sub': 'El asistente las tiene en cuenta en cada sugerencia de este viaje.',+ 'assistant.memory.quick': 'Deseos habituales',+ 'assistant.memory.notes': 'Tus notas',+ 'assistant.memory.placeholder':+ 'Por ejemplo: viajamos con un niño pequeño, nos encanta la comida callejera, nada de madrugar.',+ 'assistant.memory.saved': 'Notas guardadas',+ 'assistant.memory.quick.vegetarian': 'Comemos vegetariano',+ 'assistant.memory.quick.kids': 'Viajamos con niños',+ 'assistant.memory.quick.budget': 'Con poco presupuesto',+ 'assistant.memory.quick.slow': 'Ritmo tranquilo, sin prisas',+ 'assistant.memory.quick.accessible': 'Acceso sin escalones, por favor',+ 'assistant.memory.quick.noMuseums': 'Pocos museos',+ 'assistant.settings.costEstimates': 'Estimar costes',+ 'assistant.settings.costEstimatesHint':+ 'Con un restaurante o una entrada propone un gasto estimado para el presupuesto, como tarjeta que confirmas.',+ 'assistant.change.timeline.tight': 'Faltan {count} min',+ 'assistant.change.timeline.tight.one': 'Falta {count} min',+ 'assistant.check.issues': '{count} cosas que revisar',+ 'assistant.check.issues.one': '{count} cosa que revisar',+ 'assistant.week.changes': '{count} cambios',+ 'assistant.week.changes.one': '{count} cambio',+ 'assistant.week.showAll': 'Ver los {count} cambios',+ 'assistant.week.showAll.one': 'Ver {count} cambio',};export default assistant;diff --git a/shared/src/i18n/et/admin.ts b/shared/src/i18n/et/admin.tsindex 51544de4f..d38ca28b5 100644--- a/shared/src/i18n/et/admin.ts+++ b/shared/src/i18n/et/admin.ts@@ -969,5 +969,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Kustuta kategooria','admin.packingTemplates.deleteCategoryConfirm': 'Kas kustutada kategooria "{name}" ja kõik selle kirjed?','admin.rotateJwt.button': 'Vaheta',+ 'admin.addons.ai.name': 'TI',+ 'admin.addons.ai.description':+ 'Üks ühendus assistendile ja broneeringute impordile. MCP laseb teistel TI-rakendustel TREKi kasutada.',+ 'admin.addons.ai.setup': 'Seadista TI',+ 'admin.addons.ai.dialogSub': 'Ühendus, mida jagavad assistent ja TI-analüüs, ning mida kumbki teha tohib.',+ 'admin.addons.ai.tab.connection': 'Ühendus',+ 'admin.addons.ai.parsing.readsWith': 'Loeb broneeringuid ühendusega',+ 'admin.addons.ai.parsing.own': 'Oma ühendus',+ 'admin.addons.ai.parsing.ownHint': 'Kasutatakse jagatud ühenduse asemel.',+ 'admin.addons.ai.parsing.useShared': 'Kasuta jagatud ühendust',+ 'admin.addons.ai.parsing.sharedTag': 'Jagatud',+ 'admin.addons.ai.parsing.perUser': 'Igaüks loeb oma seadetes määratud ühendusega.',+ 'admin.addons.ai.parsing.none': 'Ühendust veel pole. Seadista üks kõigile või anna TI-analüüsile oma ühendus.',+ 'admin.addons.ai.parsing.setupOwn': 'Kasuta teist',+ 'admin.addons.ai.parsing.installed': 'Serverisse paigaldatud',+ 'admin.addons.ai.parsing.refresh': 'Värskenda',+ 'admin.addons.ai.parsing.noModels': 'Mudeleid pole veel paigaldatud. Laadi üks allpool.',+ 'admin.addons.ai.parsing.pullTitle': 'Laadi soovitatud mudel',+ 'admin.addons.ai.parsing.pull': 'Laadi',+ 'admin.addons.ai.parsing.pulling': 'Laadimine…',+ 'admin.addons.ai.parsing.use': 'Kasuta',+ 'admin.addons.ai.parsing.selected': 'Valitud',+ 'admin.addons.ai.parsing.pulled': 'Mudel laaditud',+ 'admin.addons.ai.parsing.pullFailed': 'Mudelit ei õnnestunud laadida',+ 'admin.addons.ai.parsing.unreachable': 'Kohalikku serverisse ei saa ühendust',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Enamasti pole vaja',};export default admin;diff --git a/shared/src/i18n/et/assistant.ts b/shared/src/i18n/et/assistant.tsindex 62e7bcded..b0dd5dc05 100644--- a/shared/src/i18n/et/assistant.ts+++ b/shared/src/i18n/et/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Hangi võti','assistant.connect.hintAnthropic': 'Claude Max ja Team sisaldavad API-krediiti.','assistant.connect.hintOpenai': 'Loo võti oma OpenAI juhtpaneelil.',- 'assistant.connect.hintGemini': 'AI Studios on minuti- ja päevapiirangutega tasuta tase, kus Google võib sinu saadetut oma toodete parandamiseks kasutada. Arveldusega on piirangud suuremad ja see ei kehti.',+ 'assistant.connect.hintGemini':+ 'AI Studios on minuti- ja päevapiirangutega tasuta tase, kus Google võib sinu saadetut oma toodete parandamiseks kasutada. Arveldusega on piirangud suuremad ja see ei kehti.','assistant.connect.hintOpenrouter': 'Logi sisse OpenRouteriga, võtit pole vaja kopeerida.','assistant.connect.openrouter': 'Ühenda OpenRouter','assistant.connect.save': 'Ühenda',@@ -339,5 +340,60 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Jagatud','assistant.share.failed': 'Jagamine ei õnnestunud. Proovi hetke pärast uuesti.','assistant.share.chatOff': 'Reisivestlus on välja lülitatud.',+ 'assistant.connect.descriptionWithParsing':+ 'Sinu TI-ühendus: sellel töötab assistent ja see loeb imporditud broneeringuid.',+ 'assistant.connect.descriptionParsingOnly': 'Sinu TI-ühendus: see loeb imporditud broneeringuid.',+ 'assistant.error.emptyAnswer': 'Assistent tuli tagasi ilma vastuseta. Kas proovin uuesti?',+ 'assistant.followUp.title': 'Edasi',+ 'assistant.followUp.cheaper': 'Ainult odavamad',+ 'assistant.followUp.closer': 'Majutusele lähemal',+ 'assistant.followUp.openNow': 'Mis on praegu avatud?',+ 'assistant.followUp.nextDay': 'Planeeri järgmine päev samamoodi',+ 'assistant.followUp.relaxed': 'Tee plaan rahulikumaks',+ 'assistant.followUp.dinners': 'Lisa õhtuteks restorane',+ 'assistant.followUp.rain': 'Mis siis, kui sajab?',+ 'assistant.followUp.sun': 'Mis on ilusa ilmaga õues väärt?',+ 'assistant.followUp.more': 'Räägi rohkem',+ 'assistant.followUp.next': 'Mida soovitad edasi?',+ 'assistant.menu.alternative': 'Leia alternatiiv',+ 'assistant.menu.alternativeAsk': 'Leia {place} asemel lähedalt hea alternatiiv ja ütle, miks see paremini sobib.',+ 'assistant.menu.foodNearby': 'Restoran lähedal',+ 'assistant.menu.foodNearbyAsk': 'Soovita mõnda head söögikohta {place} lähedal.',+ 'assistant.menu.planDay': 'Planeeri see päev',+ 'assistant.menu.planDayAsk': 'Planeeri see päev minu jaoks: kohad, ajad ja söögikoht.',+ 'assistant.menu.rainPlan': 'Vihmaplaan',+ 'assistant.menu.rainPlanAsk': 'Mida saame sel päeval vihmaga teha? Soovita lähedal siseruumides alternatiive.',+ 'assistant.preview.title': 'Assistendi ettepanekud',+ 'assistant.preview.suggested': 'Ettepanek',+ 'assistant.preview.movedHere': 'Tuleb siia',+ 'assistant.preview.removed': 'Eemaldatakse',+ 'assistant.preview.movedAway': 'Viiakse mujale',+ 'assistant.check.ok': 'Mahub ajakavasse',+ 'assistant.week.title': 'Selle plaani päevad',+ 'assistant.week.day': 'Päev',+ 'assistant.memory.title': 'Reisimärkmed',+ 'assistant.memory.edit': 'Muuda reisimärkmeid',+ 'assistant.memory.sub': 'Assistent arvestab neid selle reisi iga ettepaneku juures.',+ 'assistant.memory.quick': 'Sagedased soovid',+ 'assistant.memory.notes': 'Sinu märkmed',+ 'assistant.memory.placeholder': 'Näiteks: reisime väikelapsega, armastame tänavatoitu, varahommikud jäävad ära.',+ 'assistant.memory.saved': 'Reisimärkmed salvestatud',+ 'assistant.memory.quick.vegetarian': 'Sööme taimetoitu',+ 'assistant.memory.quick.kids': 'Reisime lastega',+ 'assistant.memory.quick.budget': 'Väikese eelarvega',+ 'assistant.memory.quick.slow': 'Rahulik tempo, ilma kiirustamata',+ 'assistant.memory.quick.accessible': 'Palun treppideta ligipääs',+ 'assistant.memory.quick.noMuseums': 'Vähe muuseume',+ 'assistant.settings.costEstimates': 'Hinda kulusid',+ 'assistant.settings.costEstimatesHint':+ 'Restorani või pileti puhul soovitab see eelarvesse hinnangulise kulu, kinnitatava kaardina.',+ 'assistant.change.timeline.tight': '{count} min liiga napp',+ 'assistant.change.timeline.tight.one': '{count} min liiga napp',+ 'assistant.check.issues': '{count} asja kontrollida',+ 'assistant.check.issues.one': '{count} asi kontrollida',+ 'assistant.week.changes': '{count} muudatust',+ 'assistant.week.changes.one': '{count} muudatus',+ 'assistant.week.showAll': 'Näita kõiki {count} muudatust',+ 'assistant.week.showAll.one': 'Näita {count} muudatust',};export default assistant;diff --git a/shared/src/i18n/fr/admin.ts b/shared/src/i18n/fr/admin.tsindex 62ea0b6dc..454a9f473 100644--- a/shared/src/i18n/fr/admin.ts+++ b/shared/src/i18n/fr/admin.ts@@ -987,5 +987,33 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Supprimer la catégorie','admin.packingTemplates.deleteCategoryConfirm': 'Supprimer la catégorie "{name}" et tous ses éléments ?','admin.rotateJwt.button': 'Renouveler',+ 'admin.addons.ai.name': 'IA',+ 'admin.addons.ai.description':+ "Une connexion pour l'assistant et l'import de réservations. MCP permet à d'autres applis d'IA d'utiliser TREK.",+ 'admin.addons.ai.setup': "Configurer l'IA",+ 'admin.addons.ai.dialogSub':+ "La connexion que partagent l'assistant et l'analyse par IA, et ce que chacun peut faire.",+ 'admin.addons.ai.tab.connection': 'Connexion',+ 'admin.addons.ai.parsing.readsWith': 'Lit les réservations avec',+ 'admin.addons.ai.parsing.own': 'Connexion propre',+ 'admin.addons.ai.parsing.ownHint': 'Utilisée à la place de la connexion partagée.',+ 'admin.addons.ai.parsing.useShared': 'Utiliser la connexion partagée',+ 'admin.addons.ai.parsing.sharedTag': 'Partagée',+ 'admin.addons.ai.parsing.perUser': 'Chaque personne lit avec sa propre connexion, configurée dans ses paramètres.',+ 'admin.addons.ai.parsing.none':+ "Pas encore de connexion. Configurez-en une pour tous, ou donnez-en une propre à l'analyse par IA.",+ 'admin.addons.ai.parsing.setupOwn': 'En utiliser une autre',+ 'admin.addons.ai.parsing.installed': 'Installés sur le serveur',+ 'admin.addons.ai.parsing.refresh': 'Actualiser',+ 'admin.addons.ai.parsing.noModels': 'Aucun modèle installé. Téléchargez-en un ci-dessous.',+ 'admin.addons.ai.parsing.pullTitle': 'Télécharger un modèle recommandé',+ 'admin.addons.ai.parsing.pull': 'Télécharger',+ 'admin.addons.ai.parsing.pulling': 'Téléchargement…',+ 'admin.addons.ai.parsing.use': 'Utiliser',+ 'admin.addons.ai.parsing.selected': 'Sélectionné',+ 'admin.addons.ai.parsing.pulled': 'Modèle téléchargé',+ 'admin.addons.ai.parsing.pullFailed': 'Impossible de télécharger le modèle',+ 'admin.addons.ai.parsing.unreachable': 'Impossible de joindre le serveur local',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Souvent inutile',};export default admin;diff --git a/shared/src/i18n/fr/assistant.ts b/shared/src/i18n/fr/assistant.tsindex 6895c1f7d..a70b63a25 100644--- a/shared/src/i18n/fr/assistant.ts+++ b/shared/src/i18n/fr/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Obtenir une clé','assistant.connect.hintAnthropic': 'Claude Max et Team incluent des crédits API.','assistant.connect.hintOpenai': 'Créez une clé dans votre tableau de bord OpenAI.',- 'assistant.connect.hintGemini': 'AI Studio propose une offre gratuite avec des limites par minute et par jour, sur laquelle Google peut utiliser ce que tu envoies pour améliorer ses produits. Avec la facturation activée, les limites sont plus élevées et cela ne s’applique pas.',+ 'assistant.connect.hintGemini':+ 'AI Studio propose une offre gratuite avec des limites par minute et par jour, sur laquelle Google peut utiliser ce que tu envoies pour améliorer ses produits. Avec la facturation activée, les limites sont plus élevées et cela ne s’applique pas.','assistant.connect.hintOpenrouter': 'Connectez-vous avec OpenRouter, aucune clé à copier.','assistant.connect.openrouter': 'Connecter OpenRouter','assistant.connect.save': 'Connecter',@@ -94,7 +95,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Aller au dernier message','assistant.attach.button': 'Joindre une réservation','assistant.attach.drop': 'Dépose-le ici et je lis la réservation',- 'assistant.attach.unsupported': 'Je ne peux pas lire ce type de fichier. Essaie un PDF, un e-mail, une image ou un pass Wallet.',+ 'assistant.attach.unsupported':+ 'Je ne peux pas lire ce type de fichier. Essaie un PDF, un e-mail, une image ou un pass Wallet.','assistant.attach.tooLarge': 'Ce fichier dépasse 10 Mo.','assistant.composer.placeholder': 'Posez une question sur {trip}','assistant.composer.send': 'Envoyer',@@ -342,5 +344,62 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Partagé','assistant.share.failed': 'Le partage a échoué. Réessayez dans un instant.','assistant.share.chatOff': 'Le chat du voyage est désactivé.',+ 'assistant.connect.descriptionWithParsing':+ "Votre connexion IA : l'assistant l'utilise, et elle lit les réservations que vous importez.",+ 'assistant.connect.descriptionParsingOnly': 'Votre connexion IA : elle lit les réservations que vous importez.',+ 'assistant.error.emptyAnswer': "L'assistant n'a renvoyé aucune réponse. Je réessaie ?",+ 'assistant.followUp.title': 'Ensuite',+ 'assistant.followUp.cheaper': 'Seulement moins cher',+ 'assistant.followUp.closer': 'Plus près de mon hébergement',+ 'assistant.followUp.openNow': "Qu'est-ce qui est ouvert maintenant ?",+ 'assistant.followUp.nextDay': 'Planifie le jour suivant de la même façon',+ 'assistant.followUp.relaxed': 'Rends le plan plus détendu',+ 'assistant.followUp.dinners': 'Ajoute des restaurants pour les soirées',+ 'assistant.followUp.rain': "Et s'il pleut ?",+ 'assistant.followUp.sun': "Que faire dehors s'il fait beau ?",+ 'assistant.followUp.more': "Dis-m'en plus",+ 'assistant.followUp.next': 'Que proposes-tu ensuite ?',+ 'assistant.menu.alternative': 'Trouver une alternative',+ 'assistant.menu.alternativeAsk':+ 'Trouve une bonne alternative à {place} à proximité et dis pourquoi elle convient mieux.',+ 'assistant.menu.foodNearby': 'Restaurant à proximité',+ 'assistant.menu.foodNearbyAsk': 'Propose quelques bonnes adresses pour manger près de {place}.',+ 'assistant.menu.planDay': 'Planifier ce jour',+ 'assistant.menu.planDayAsk': 'Planifie ce jour pour moi : lieux, horaires et un endroit où manger.',+ 'assistant.menu.rainPlan': 'Plan pluie',+ 'assistant.menu.rainPlanAsk': "Que faire ce jour-là s'il pleut ? Propose des alternatives en intérieur à proximité.",+ 'assistant.preview.title': "Suggestions de l'assistant",+ 'assistant.preview.suggested': 'Suggestion',+ 'assistant.preview.movedHere': 'Arrive ici',+ 'assistant.preview.removed': 'Retiré',+ 'assistant.preview.movedAway': 'Déplacé',+ 'assistant.check.ok': "Tient dans l'horaire",+ 'assistant.week.title': 'Les jours de ce plan',+ 'assistant.week.day': 'Jour',+ 'assistant.memory.title': 'Pense-bête',+ 'assistant.memory.edit': 'Modifier le pense-bête',+ 'assistant.memory.sub': "L'assistant en tient compte pour chaque suggestion de ce voyage.",+ 'assistant.memory.quick': 'Souhaits fréquents',+ 'assistant.memory.notes': 'Vos notes',+ 'assistant.memory.placeholder':+ 'Par exemple : nous voyageons avec un tout-petit, adorons la cuisine de rue, pas de réveil matinal.',+ 'assistant.memory.saved': 'Pense-bête enregistré',+ 'assistant.memory.quick.vegetarian': 'Nous mangeons végétarien',+ 'assistant.memory.quick.kids': 'Nous voyageons avec des enfants',+ 'assistant.memory.quick.budget': 'Petit budget',+ 'assistant.memory.quick.slow': 'Rythme tranquille, sans courir',+ 'assistant.memory.quick.accessible': 'Accès sans marches, svp',+ 'assistant.memory.quick.noMuseums': 'Peu de musées',+ 'assistant.settings.costEstimates': 'Estimer les coûts',+ 'assistant.settings.costEstimatesHint':+ 'Pour un restaurant ou un billet, il propose une dépense estimée pour le budget, sous forme de carte à confirmer.',+ 'assistant.change.timeline.tight': '{count} min de trop peu',+ 'assistant.change.timeline.tight.one': '{count} min de trop peu',+ 'assistant.check.issues': '{count} points à vérifier',+ 'assistant.check.issues.one': '{count} point à vérifier',+ 'assistant.week.changes': '{count} modifications',+ 'assistant.week.changes.one': '{count} modification',+ 'assistant.week.showAll': 'Afficher les {count} modifications',+ 'assistant.week.showAll.one': 'Afficher {count} modification',};export default assistant;diff --git a/shared/src/i18n/gr/admin.ts b/shared/src/i18n/gr/admin.tsindex ae8938a9c..5f8e025f3 100644--- a/shared/src/i18n/gr/admin.ts+++ b/shared/src/i18n/gr/admin.ts@@ -997,5 +997,33 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Διαγραφή κατηγορίας','admin.packingTemplates.deleteCategoryConfirm': 'Διαγραφή της κατηγορίας "{name}" και όλων των στοιχείων της;','admin.rotateJwt.button': 'Εναλλαγή',+ 'admin.addons.ai.name': 'ΤΝ',+ 'admin.addons.ai.description':+ 'Μία σύνδεση για τον βοηθό και την εισαγωγή κρατήσεων. Το MCP επιτρέπει σε άλλες εφαρμογές ΤΝ να χρησιμοποιούν το TREK.',+ 'admin.addons.ai.setup': 'Ρύθμιση ΤΝ',+ 'admin.addons.ai.dialogSub':+ 'Η σύνδεση που μοιράζονται ο βοηθός και η ανάλυση με ΤΝ, και τι μπορεί να κάνει ο καθένας.',+ 'admin.addons.ai.tab.connection': 'Σύνδεση',+ 'admin.addons.ai.parsing.readsWith': 'Διαβάζει κρατήσεις με',+ 'admin.addons.ai.parsing.own': 'Δική της σύνδεση',+ 'admin.addons.ai.parsing.ownHint': 'Χρησιμοποιείται αντί για την κοινή σύνδεση.',+ 'admin.addons.ai.parsing.useShared': 'Χρήση της κοινής σύνδεσης',+ 'admin.addons.ai.parsing.sharedTag': 'Κοινή',+ 'admin.addons.ai.parsing.perUser': 'Ο καθένας διαβάζει με τη δική του σύνδεση από τις ρυθμίσεις του.',+ 'admin.addons.ai.parsing.none':+ 'Δεν υπάρχει ακόμη σύνδεση. Ρυθμίστε μία για όλους ή δώστε στην ανάλυση με ΤΝ δική της.',+ 'admin.addons.ai.parsing.setupOwn': 'Χρήση άλλης',+ 'admin.addons.ai.parsing.installed': 'Εγκατεστημένα στον διακομιστή',+ 'admin.addons.ai.parsing.refresh': 'Ανανέωση',+ 'admin.addons.ai.parsing.noModels': 'Δεν υπάρχουν ακόμη μοντέλα. Κατεβάστε ένα παρακάτω.',+ 'admin.addons.ai.parsing.pullTitle': 'Λήψη προτεινόμενου μοντέλου',+ 'admin.addons.ai.parsing.pull': 'Λήψη',+ 'admin.addons.ai.parsing.pulling': 'Λήψη…',+ 'admin.addons.ai.parsing.use': 'Χρήση',+ 'admin.addons.ai.parsing.selected': 'Επιλεγμένο',+ 'admin.addons.ai.parsing.pulled': 'Το μοντέλο κατέβηκε',+ 'admin.addons.ai.parsing.pullFailed': 'Δεν ήταν δυνατή η λήψη του μοντέλου',+ 'admin.addons.ai.parsing.unreachable': 'Ο τοπικός διακομιστής δεν είναι προσβάσιμος',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Συνήθως δεν χρειάζεται',};export default admin;diff --git a/shared/src/i18n/gr/assistant.ts b/shared/src/i18n/gr/assistant.tsindex d86f6a418..1108928d5 100644--- a/shared/src/i18n/gr/assistant.ts+++ b/shared/src/i18n/gr/assistant.ts@@ -45,7 +45,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Λήψη κλειδιού','assistant.connect.hintAnthropic': 'Τα Claude Max και Team περιλαμβάνουν μονάδες API.','assistant.connect.hintOpenai': 'Δημιουργήστε ένα κλειδί στον πίνακα ελέγχου του OpenAI.',- 'assistant.connect.hintGemini': 'Το AI Studio έχει δωρεάν επίπεδο με όρια ανά λεπτό και ανά ημέρα, όπου η Google μπορεί να χρησιμοποιεί ό,τι στέλνεις για να βελτιώσει τα προϊόντα της. Με ενεργή χρέωση τα όρια είναι υψηλότερα και αυτό δεν ισχύει.',+ 'assistant.connect.hintGemini':+ 'Το AI Studio έχει δωρεάν επίπεδο με όρια ανά λεπτό και ανά ημέρα, όπου η Google μπορεί να χρησιμοποιεί ό,τι στέλνεις για να βελτιώσει τα προϊόντα της. Με ενεργή χρέωση τα όρια είναι υψηλότερα και αυτό δεν ισχύει.','assistant.connect.hintOpenrouter': 'Συνδεθείτε με το OpenRouter, χωρίς κλειδί για αντιγραφή.','assistant.connect.openrouter': 'Σύνδεση OpenRouter','assistant.connect.save': 'Σύνδεση',@@ -96,7 +97,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Μετάβαση στο τελευταίο μήνυμα','assistant.attach.button': 'Επισύναψη κράτησης','assistant.attach.drop': 'Άφησέ το εδώ και θα διαβάσω την κράτηση',- 'assistant.attach.unsupported': 'Δεν μπορώ να διαβάσω αυτόν τον τύπο αρχείου. Δοκίμασε PDF, email, εικόνα ή κάρτα πορτοφολιού.',+ 'assistant.attach.unsupported':+ 'Δεν μπορώ να διαβάσω αυτόν τον τύπο αρχείου. Δοκίμασε PDF, email, εικόνα ή κάρτα πορτοφολιού.','assistant.attach.tooLarge': 'Αυτό το αρχείο είναι μεγαλύτερο από 10 MB.','assistant.composer.placeholder': 'Ρωτήστε οτιδήποτε για {trip}','assistant.composer.send': 'Αποστολή',@@ -342,5 +344,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Κοινοποιήθηκε','assistant.share.failed': 'Η κοινοποίηση απέτυχε. Δοκιμάστε ξανά σε λίγο.','assistant.share.chatOff': 'Η συνομιλία του ταξιδιού είναι απενεργοποιημένη.',+ 'assistant.connect.descriptionWithParsing':+ 'Η σύνδεσή σας ΤΝ: σε αυτήν τρέχει ο βοηθός και διαβάζει τις κρατήσεις που εισάγετε.',+ 'assistant.connect.descriptionParsingOnly': 'Η σύνδεσή σας ΤΝ: διαβάζει τις κρατήσεις που εισάγετε.',+ 'assistant.error.emptyAnswer': 'Ο βοηθός επέστρεψε χωρίς απάντηση. Να δοκιμάσω ξανά;',+ 'assistant.followUp.title': 'Συνέχεια',+ 'assistant.followUp.cheaper': 'Μόνο φθηνότερα',+ 'assistant.followUp.closer': 'Πιο κοντά στο κατάλυμα',+ 'assistant.followUp.openNow': 'Τι είναι ανοιχτό τώρα;',+ 'assistant.followUp.nextDay': 'Σχεδίασε την επόμενη μέρα με τον ίδιο τρόπο',+ 'assistant.followUp.relaxed': 'Κάνε το πρόγραμμα πιο χαλαρό',+ 'assistant.followUp.dinners': 'Πρόσθεσε εστιατόρια για τα βράδια',+ 'assistant.followUp.rain': 'Κι αν βρέχει;',+ 'assistant.followUp.sun': 'Τι αξίζει έξω με καλό καιρό;',+ 'assistant.followUp.more': 'Πες μου περισσότερα',+ 'assistant.followUp.next': 'Τι προτείνεις τώρα;',+ 'assistant.menu.alternative': 'Εύρεση εναλλακτικής',+ 'assistant.menu.alternativeAsk': 'Βρες μια καλή εναλλακτική για το {place} κοντά και πες γιατί ταιριάζει καλύτερα.',+ 'assistant.menu.foodNearby': 'Εστιατόριο κοντά',+ 'assistant.menu.foodNearbyAsk': 'Πρότεινε μερικά καλά μέρη για φαγητό κοντά στο {place}.',+ 'assistant.menu.planDay': 'Σχεδίασε αυτή τη μέρα',+ 'assistant.menu.planDayAsk': 'Σχεδίασε αυτή τη μέρα για μένα: μέρη, ώρες και κάπου να φάμε.',+ 'assistant.menu.rainPlan': 'Πρόγραμμα βροχής',+ 'assistant.menu.rainPlanAsk':+ 'Τι μπορούμε να κάνουμε αυτή τη μέρα αν βρέχει; Πρότεινε εσωτερικές εναλλακτικές κοντά.',+ 'assistant.preview.title': 'Προτάσεις του βοηθού',+ 'assistant.preview.suggested': 'Πρόταση',+ 'assistant.preview.movedHere': 'Έρχεται εδώ',+ 'assistant.preview.removed': 'Αφαιρείται',+ 'assistant.preview.movedAway': 'Μετακινείται',+ 'assistant.check.ok': 'Χωράει στον χρόνο',+ 'assistant.week.title': 'Οι μέρες αυτού του πλάνου',+ 'assistant.week.day': 'Μέρα',+ 'assistant.memory.title': 'Σημειώσεις ταξιδιού',+ 'assistant.memory.edit': 'Επεξεργασία σημειώσεων',+ 'assistant.memory.sub': 'Ο βοηθός τις λαμβάνει υπόψη σε κάθε πρόταση για αυτό το ταξίδι.',+ 'assistant.memory.quick': 'Συχνές επιθυμίες',+ 'assistant.memory.notes': 'Οι σημειώσεις σου',+ 'assistant.memory.placeholder': 'Για παράδειγμα: ταξιδεύουμε με νήπιο, λατρεύουμε το street food, όχι νωρίς το πρωί.',+ 'assistant.memory.saved': 'Οι σημειώσεις αποθηκεύτηκαν',+ 'assistant.memory.quick.vegetarian': 'Τρώμε χορτοφαγικά',+ 'assistant.memory.quick.kids': 'Ταξιδεύουμε με παιδιά',+ 'assistant.memory.quick.budget': 'Με μικρό προϋπολογισμό',+ 'assistant.memory.quick.slow': 'Χαλαρός ρυθμός, χωρίς βιασύνη',+ 'assistant.memory.quick.accessible': 'Πρόσβαση χωρίς σκαλοπάτια, παρακαλώ',+ 'assistant.memory.quick.noMuseums': 'Λίγα μουσεία',+ 'assistant.settings.costEstimates': 'Εκτίμηση κόστους',+ 'assistant.settings.costEstimatesHint':+ 'Για εστιατόριο ή εισιτήριο προτείνει μια εκτιμώμενη δαπάνη για τον προϋπολογισμό, ως κάρτα που επιβεβαιώνεις.',+ 'assistant.change.timeline.tight': 'Λείπουν {count} λεπτά',+ 'assistant.change.timeline.tight.one': 'Λείπει {count} λεπτό',+ 'assistant.check.issues': '{count} σημεία για έλεγχο',+ 'assistant.check.issues.one': '{count} σημείο για έλεγχο',+ 'assistant.week.changes': '{count} αλλαγές',+ 'assistant.week.changes.one': '{count} αλλαγή',+ 'assistant.week.showAll': 'Εμφάνιση όλων των {count} αλλαγών',+ 'assistant.week.showAll.one': 'Εμφάνιση {count} αλλαγής',};export default assistant;diff --git a/shared/src/i18n/hu/admin.ts b/shared/src/i18n/hu/admin.tsindex 1394525d0..a38288883 100644--- a/shared/src/i18n/hu/admin.ts+++ b/shared/src/i18n/hu/admin.ts@@ -985,5 +985,33 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Kategória törlése','admin.packingTemplates.deleteCategoryConfirm': 'Törlöd a(z) "{name}" kategóriát és az összes elemét?','admin.rotateJwt.button': 'Megújítás',+ 'admin.addons.ai.name': 'MI',+ 'admin.addons.ai.description':+ 'Egy kapcsolat az asszisztensnek és a foglalások beolvasásának. Az MCP-vel más MI-alkalmazások is használhatják a TREK-et.',+ 'admin.addons.ai.setup': 'MI beállítása',+ 'admin.addons.ai.dialogSub':+ 'A kapcsolat, amelyen az asszisztens és az MI-feldolgozás osztozik, és hogy melyik mit tehet.',+ 'admin.addons.ai.tab.connection': 'Kapcsolat',+ 'admin.addons.ai.parsing.readsWith': 'A foglalásokat ezzel olvassa',+ 'admin.addons.ai.parsing.own': 'Saját kapcsolat',+ 'admin.addons.ai.parsing.ownHint': 'A közös kapcsolat helyett használja.',+ 'admin.addons.ai.parsing.useShared': 'A közös kapcsolat használata',+ 'admin.addons.ai.parsing.sharedTag': 'Közös',+ 'admin.addons.ai.parsing.perUser': 'Mindenki a saját beállításaiban megadott kapcsolattal olvas.',+ 'admin.addons.ai.parsing.none':+ 'Még nincs kapcsolat. Állíts be egyet mindenkinek, vagy adj az MI-feldolgozásnak sajátot.',+ 'admin.addons.ai.parsing.setupOwn': 'Másik használata',+ 'admin.addons.ai.parsing.installed': 'A szerverre telepítve',+ 'admin.addons.ai.parsing.refresh': 'Frissítés',+ 'admin.addons.ai.parsing.noModels': 'Még nincs telepített modell. Tölts le egyet lent.',+ 'admin.addons.ai.parsing.pullTitle': 'Ajánlott modell letöltése',+ 'admin.addons.ai.parsing.pull': 'Letöltés',+ 'admin.addons.ai.parsing.pulling': 'Letöltés…',+ 'admin.addons.ai.parsing.use': 'Használat',+ 'admin.addons.ai.parsing.selected': 'Kiválasztva',+ 'admin.addons.ai.parsing.pulled': 'Modell letöltve',+ 'admin.addons.ai.parsing.pullFailed': 'A modellt nem sikerült letölteni',+ 'admin.addons.ai.parsing.unreachable': 'A helyi szerver nem érhető el',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Általában nem kell',};export default admin;diff --git a/shared/src/i18n/hu/assistant.ts b/shared/src/i18n/hu/assistant.tsindex 7d0374687..ccb5816ee 100644--- a/shared/src/i18n/hu/assistant.ts+++ b/shared/src/i18n/hu/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Kulcs igénylése','assistant.connect.hintAnthropic': 'A Claude Max és Team csomag API-kreditet is tartalmaz.','assistant.connect.hintOpenai': 'Hozz létre egy kulcsot az OpenAI irányítópultján.',- 'assistant.connect.hintGemini': 'Az AI Studióban van percenkénti és napi korlátos ingyenes szint, amelyben a Google felhasználhatja, amit küldesz, a termékei fejlesztésére. Bekapcsolt számlázással magasabbak a korlátok, és ez nem érvényes.',+ 'assistant.connect.hintGemini':+ 'Az AI Studióban van percenkénti és napi korlátos ingyenes szint, amelyben a Google felhasználhatja, amit küldesz, a termékei fejlesztésére. Bekapcsolt számlázással magasabbak a korlátok, és ez nem érvényes.','assistant.connect.hintOpenrouter': 'Jelentkezz be az OpenRouterrel, nem kell kulcsot másolni.','assistant.connect.openrouter': 'OpenRouter csatlakoztatása','assistant.connect.save': 'Csatlakoztatás',@@ -95,7 +96,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Ugrás a legújabb üzenethez','assistant.attach.button': 'Foglalás csatolása','assistant.attach.drop': 'Engedd el itt, és elolvasom a foglalást',- 'assistant.attach.unsupported': 'Ezt a fájltípust nem tudom olvasni. Próbálj PDF-et, e-mailt, képet vagy Wallet-kártyát.',+ 'assistant.attach.unsupported':+ 'Ezt a fájltípust nem tudom olvasni. Próbálj PDF-et, e-mailt, képet vagy Wallet-kártyát.','assistant.attach.tooLarge': 'Ez a fájl nagyobb 10 MB-nál.','assistant.composer.placeholder': 'Kérdezz bármit erről: {trip}','assistant.composer.send': 'Küldés',@@ -343,5 +345,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Megosztva','assistant.share.failed': 'A megosztás nem sikerült. Próbáld újra egy pillanat múlva.','assistant.share.chatOff': 'Az út csevegése ki van kapcsolva.',+ 'assistant.connect.descriptionWithParsing':+ 'Az MI-kapcsolatod: ezen fut az asszisztens, és ez olvassa be az importált foglalásokat.',+ 'assistant.connect.descriptionParsingOnly': 'Az MI-kapcsolatod: ez olvassa be az importált foglalásokat.',+ 'assistant.error.emptyAnswer': 'Az asszisztens válasz nélkül tért vissza. Próbáljam újra?',+ 'assistant.followUp.title': 'Folytatás',+ 'assistant.followUp.cheaper': 'Csak olcsóbbak',+ 'assistant.followUp.closer': 'Közelebb a szállásomhoz',+ 'assistant.followUp.openNow': 'Mi van most nyitva?',+ 'assistant.followUp.nextDay': 'Tervezd meg ugyanígy a következő napot',+ 'assistant.followUp.relaxed': 'Legyen lazább a terv',+ 'assistant.followUp.dinners': 'Adj hozzá éttermeket estékre',+ 'assistant.followUp.rain': 'Mi legyen, ha esik?',+ 'assistant.followUp.sun': 'Mit érdemes szép időben kint csinálni?',+ 'assistant.followUp.more': 'Mesélj többet',+ 'assistant.followUp.next': 'Mit javasolsz most?',+ 'assistant.menu.alternative': 'Alternatíva keresése',+ 'assistant.menu.alternativeAsk':+ 'Keress jó alternatívát {place} helyett a közelben, és mondd el, miért illik jobban.',+ 'assistant.menu.foodNearby': 'Étterem a közelben',+ 'assistant.menu.foodNearbyAsk': 'Javasolj néhány jó helyet evésre {place} közelében.',+ 'assistant.menu.planDay': 'Nap megtervezése',+ 'assistant.menu.planDayAsk': 'Tervezd meg nekem ezt a napot: helyek, időpontok és egy hely evésre.',+ 'assistant.menu.rainPlan': 'Esős terv',+ 'assistant.menu.rainPlanAsk': 'Mit csinálhatunk ezen a napon, ha esik? Javasolj fedett alternatívákat a közelben.',+ 'assistant.preview.title': 'Az asszisztens javaslatai',+ 'assistant.preview.suggested': 'Javaslat',+ 'assistant.preview.movedHere': 'Ide kerül',+ 'assistant.preview.removed': 'Kikerül',+ 'assistant.preview.movedAway': 'Áthelyezve',+ 'assistant.check.ok': 'Időben belefér',+ 'assistant.week.title': 'A terv napjai',+ 'assistant.week.day': 'Nap',+ 'assistant.memory.title': 'Útijegyzet',+ 'assistant.memory.edit': 'Útijegyzet szerkesztése',+ 'assistant.memory.sub': 'Az asszisztens minden javaslatnál figyelembe veszi ezt az utazáson.',+ 'assistant.memory.quick': 'Gyakori kívánságok',+ 'assistant.memory.notes': 'Jegyzeteid',+ 'assistant.memory.placeholder': 'Például: kisgyerekkel utazunk, imádjuk az utcai kaját, nincs korai kelés.',+ 'assistant.memory.saved': 'Útijegyzet mentve',+ 'assistant.memory.quick.vegetarian': 'Vegetáriánusan eszünk',+ 'assistant.memory.quick.kids': 'Gyerekekkel utazunk',+ 'assistant.memory.quick.budget': 'Szűkös keretből',+ 'assistant.memory.quick.slow': 'Nyugodt tempó, kapkodás nélkül',+ 'assistant.memory.quick.accessible': 'Akadálymentesen, kérem',+ 'assistant.memory.quick.noMuseums': 'Kevés múzeum',+ 'assistant.settings.costEstimates': 'Költségbecslés',+ 'assistant.settings.costEstimatesHint':+ 'Étteremnél vagy jegynél becsült kiadást javasol a költségvetésbe, megerősítendő kártyaként.',+ 'assistant.change.timeline.tight': '{count} perccel szűkös',+ 'assistant.change.timeline.tight.one': '{count} perccel szűkös',+ 'assistant.check.issues': '{count} ellenőrizendő pont',+ 'assistant.check.issues.one': '{count} ellenőrizendő pont',+ 'assistant.week.changes': '{count} módosítás',+ 'assistant.week.changes.one': '{count} módosítás',+ 'assistant.week.showAll': 'Mind a {count} módosítás mutatása',+ 'assistant.week.showAll.one': '{count} módosítás mutatása',};export default assistant;diff --git a/shared/src/i18n/id/admin.ts b/shared/src/i18n/id/admin.tsindex 2edeb4297..5114addc5 100644--- a/shared/src/i18n/id/admin.ts+++ b/shared/src/i18n/id/admin.ts@@ -956,5 +956,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Hapus kategori','admin.packingTemplates.deleteCategoryConfirm': 'Hapus kategori "{name}" beserta semua itemnya?','admin.rotateJwt.button': 'Putar Ulang',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'Satu koneksi untuk asisten dan impor pemesanan. MCP memungkinkan aplikasi AI lain memakai TREK.',+ 'admin.addons.ai.setup': 'Atur AI',+ 'admin.addons.ai.dialogSub':+ 'Koneksi yang dipakai bersama oleh asisten dan penguraian AI, serta apa yang boleh dilakukan masing-masing.',+ 'admin.addons.ai.tab.connection': 'Koneksi',+ 'admin.addons.ai.parsing.readsWith': 'Membaca pemesanan dengan',+ 'admin.addons.ai.parsing.own': 'Koneksi sendiri',+ 'admin.addons.ai.parsing.ownHint': 'Dipakai sebagai pengganti koneksi bersama.',+ 'admin.addons.ai.parsing.useShared': 'Gunakan koneksi bersama',+ 'admin.addons.ai.parsing.sharedTag': 'Bersama',+ 'admin.addons.ai.parsing.perUser': 'Setiap orang membaca dengan koneksinya sendiri dari pengaturannya.',+ 'admin.addons.ai.parsing.none': 'Belum ada koneksi. Atur satu untuk semua, atau beri penguraian AI koneksi sendiri.',+ 'admin.addons.ai.parsing.setupOwn': 'Gunakan yang lain',+ 'admin.addons.ai.parsing.installed': 'Terpasang di server',+ 'admin.addons.ai.parsing.refresh': 'Muat ulang',+ 'admin.addons.ai.parsing.noModels': 'Belum ada model terpasang. Unduh satu di bawah.',+ 'admin.addons.ai.parsing.pullTitle': 'Unduh model yang disarankan',+ 'admin.addons.ai.parsing.pull': 'Unduh',+ 'admin.addons.ai.parsing.pulling': 'Mengunduh…',+ 'admin.addons.ai.parsing.use': 'Gunakan',+ 'admin.addons.ai.parsing.selected': 'Dipilih',+ 'admin.addons.ai.parsing.pulled': 'Model diunduh',+ 'admin.addons.ai.parsing.pullFailed': 'Model tidak dapat diunduh',+ 'admin.addons.ai.parsing.unreachable': 'Server lokal tidak dapat dijangkau',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Biasanya tidak perlu',};export default admin;diff --git a/shared/src/i18n/id/assistant.ts b/shared/src/i18n/id/assistant.tsindex ae258882c..ed71925ae 100644--- a/shared/src/i18n/id/assistant.ts+++ b/shared/src/i18n/id/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Dapatkan kunci','assistant.connect.hintAnthropic': 'Claude Max dan Team sudah termasuk kredit API.','assistant.connect.hintOpenai': 'Buat kunci di dasbor OpenAI kamu.',- 'assistant.connect.hintGemini': 'AI Studio punya tingkat gratis dengan batas per menit dan per hari, di mana Google dapat memakai apa yang kamu kirim untuk meningkatkan produknya. Dengan penagihan aktif, batasnya lebih tinggi dan hal itu tidak berlaku.',+ 'assistant.connect.hintGemini':+ 'AI Studio punya tingkat gratis dengan batas per menit dan per hari, di mana Google dapat memakai apa yang kamu kirim untuk meningkatkan produknya. Dengan penagihan aktif, batasnya lebih tinggi dan hal itu tidak berlaku.','assistant.connect.hintOpenrouter': 'Masuk dengan OpenRouter, tanpa perlu menyalin kunci.','assistant.connect.openrouter': 'Hubungkan OpenRouter','assistant.connect.save': 'Hubungkan',@@ -319,5 +320,58 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Dibagikan','assistant.share.failed': 'Gagal membagikan. Coba lagi sebentar lagi.','assistant.share.chatOff': 'Obrolan perjalanan dimatikan.',+ 'assistant.connect.descriptionWithParsing':+ 'Koneksi AI Anda: asisten berjalan di atasnya, dan koneksi ini membaca pemesanan yang Anda impor.',+ 'assistant.connect.descriptionParsingOnly': 'Koneksi AI Anda: membaca pemesanan yang Anda impor.',+ 'assistant.error.emptyAnswer': 'Asisten kembali tanpa jawaban. Coba lagi?',+ 'assistant.followUp.title': 'Lanjut dengan',+ 'assistant.followUp.cheaper': 'Hanya yang lebih murah',+ 'assistant.followUp.closer': 'Lebih dekat ke penginapan',+ 'assistant.followUp.openNow': 'Apa yang buka sekarang?',+ 'assistant.followUp.nextDay': 'Rencanakan hari berikutnya dengan cara yang sama',+ 'assistant.followUp.relaxed': 'Buat rencananya lebih santai',+ 'assistant.followUp.dinners': 'Tambahkan restoran untuk malam hari',+ 'assistant.followUp.rain': 'Bagaimana kalau hujan?',+ 'assistant.followUp.sun': 'Apa yang seru di luar saat cuaca cerah?',+ 'assistant.followUp.more': 'Ceritakan lebih banyak',+ 'assistant.followUp.next': 'Apa saranmu selanjutnya?',+ 'assistant.menu.alternative': 'Cari alternatif',+ 'assistant.menu.alternativeAsk':+ 'Carikan alternatif yang bagus untuk {place} di dekatnya dan jelaskan kenapa lebih cocok.',+ 'assistant.menu.foodNearby': 'Restoran terdekat',+ 'assistant.menu.foodNearbyAsk': 'Sarankan beberapa tempat makan yang bagus di dekat {place}.',+ 'assistant.menu.planDay': 'Rencanakan hari ini',+ 'assistant.menu.planDayAsk': 'Rencanakan hari ini untukku: tempat, waktu, dan tempat makan.',+ 'assistant.menu.rainPlan': 'Rencana hujan',+ 'assistant.menu.rainPlanAsk':+ 'Apa yang bisa kami lakukan hari ini kalau hujan? Sarankan alternatif di dalam ruangan di dekatnya.',+ 'assistant.preview.title': 'Saran dari asisten',+ 'assistant.preview.suggested': 'Saran',+ 'assistant.preview.movedHere': 'Pindah ke sini',+ 'assistant.preview.removed': 'Dihapus',+ 'assistant.preview.movedAway': 'Dipindahkan',+ 'assistant.check.ok': 'Waktunya cukup',+ 'assistant.week.title': 'Hari-hari dalam rencana ini',+ 'assistant.week.day': 'Hari',+ 'assistant.memory.title': 'Catatan perjalanan',+ 'assistant.memory.edit': 'Ubah catatan perjalanan',+ 'assistant.memory.sub': 'Asisten memperhatikannya di setiap saran untuk perjalanan ini.',+ 'assistant.memory.quick': 'Keinginan umum',+ 'assistant.memory.notes': 'Catatanmu',+ 'assistant.memory.placeholder': 'Misalnya: kami bepergian dengan balita, suka jajanan jalanan, tidak bangun pagi.',+ 'assistant.memory.saved': 'Catatan tersimpan',+ 'assistant.memory.quick.vegetarian': 'Kami makan vegetarian',+ 'assistant.memory.quick.kids': 'Kami bepergian dengan anak-anak',+ 'assistant.memory.quick.budget': 'Dengan anggaran terbatas',+ 'assistant.memory.quick.slow': 'Tempo santai, tanpa terburu-buru',+ 'assistant.memory.quick.accessible': 'Mohon akses tanpa tangga',+ 'assistant.memory.quick.noMuseums': 'Sedikit museum',+ 'assistant.settings.costEstimates': 'Perkirakan biaya',+ 'assistant.settings.costEstimatesHint':+ 'Untuk restoran atau tiket, ia menyarankan pengeluaran perkiraan untuk anggaran sebagai kartu yang kamu konfirmasi.',+ 'assistant.change.timeline.tight': 'Kurang {count} menit',+ 'assistant.check.issues': '{count} hal perlu dicek',+ 'assistant.week.changes': '{count} perubahan',+ 'assistant.week.showAll': 'Tampilkan semua {count} perubahan',};export default assistant;diff --git a/shared/src/i18n/it/admin.ts b/shared/src/i18n/it/admin.tsindex 467719def..ddd873ba3 100644--- a/shared/src/i18n/it/admin.ts+++ b/shared/src/i18n/it/admin.ts@@ -980,5 +980,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Elimina categoria','admin.packingTemplates.deleteCategoryConfirm': 'Eliminare la categoria "{name}" e tutte le sue voci?','admin.rotateJwt.button': 'Rinnova',+ 'admin.addons.ai.name': 'IA',+ 'admin.addons.ai.description':+ "Una connessione per l'assistente e l'importazione delle prenotazioni. MCP permette ad altre app di IA di usare TREK.",+ 'admin.addons.ai.setup': "Configura l'IA",+ 'admin.addons.ai.dialogSub': 'La connessione condivisa da assistente e analisi con IA, e cosa può fare ciascuno.',+ 'admin.addons.ai.tab.connection': 'Connessione',+ 'admin.addons.ai.parsing.readsWith': 'Legge le prenotazioni con',+ 'admin.addons.ai.parsing.own': 'Connessione propria',+ 'admin.addons.ai.parsing.ownHint': 'Usata al posto della connessione condivisa.',+ 'admin.addons.ai.parsing.useShared': 'Usa la connessione condivisa',+ 'admin.addons.ai.parsing.sharedTag': 'Condivisa',+ 'admin.addons.ai.parsing.perUser': 'Ogni persona legge con la propria connessione, impostata nelle sue impostazioni.',+ 'admin.addons.ai.parsing.none':+ "Nessuna connessione. Configurane una per tutti o dai all'analisi con IA una propria.",+ 'admin.addons.ai.parsing.setupOwn': "Usane un'altra",+ 'admin.addons.ai.parsing.installed': 'Installati sul server',+ 'admin.addons.ai.parsing.refresh': 'Aggiorna',+ 'admin.addons.ai.parsing.noModels': 'Nessun modello installato. Scaricane uno qui sotto.',+ 'admin.addons.ai.parsing.pullTitle': 'Scarica un modello consigliato',+ 'admin.addons.ai.parsing.pull': 'Scarica',+ 'admin.addons.ai.parsing.pulling': 'Download in corso…',+ 'admin.addons.ai.parsing.use': 'Usa',+ 'admin.addons.ai.parsing.selected': 'Selezionato',+ 'admin.addons.ai.parsing.pulled': 'Modello scaricato',+ 'admin.addons.ai.parsing.pullFailed': 'Impossibile scaricare il modello',+ 'admin.addons.ai.parsing.unreachable': 'Impossibile raggiungere il server locale',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Spesso non serve',};export default admin;diff --git a/shared/src/i18n/it/assistant.ts b/shared/src/i18n/it/assistant.tsindex b2ed3ab04..61a4e6e77 100644--- a/shared/src/i18n/it/assistant.ts+++ b/shared/src/i18n/it/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Ottieni una chiave','assistant.connect.hintAnthropic': 'Claude Max e Team includono crediti API.','assistant.connect.hintOpenai': 'Crea una chiave nella dashboard di OpenAI.',- 'assistant.connect.hintGemini': 'AI Studio ha un livello gratuito con limiti al minuto e al giorno, in cui Google può usare ciò che invii per migliorare i suoi prodotti. Con la fatturazione attiva i limiti sono più alti e questo non vale.',+ 'assistant.connect.hintGemini':+ 'AI Studio ha un livello gratuito con limiti al minuto e al giorno, in cui Google può usare ciò che invii per migliorare i suoi prodotti. Con la fatturazione attiva i limiti sono più alti e questo non vale.','assistant.connect.hintOpenrouter': 'Accedi con OpenRouter, nessuna chiave da copiare.','assistant.connect.openrouter': 'Collega OpenRouter','assistant.connect.save': 'Collega',@@ -95,7 +96,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Vai all’ultimo messaggio','assistant.attach.button': 'Allega una prenotazione','assistant.attach.drop': 'Rilascialo qui e leggo la prenotazione',- 'assistant.attach.unsupported': 'Non riesco a leggere questo tipo di file. Prova con un PDF, un’e-mail, un’immagine o un pass Wallet.',+ 'assistant.attach.unsupported':+ 'Non riesco a leggere questo tipo di file. Prova con un PDF, un’e-mail, un’immagine o un pass Wallet.','assistant.attach.tooLarge': 'Questo file supera i 10 MB.','assistant.composer.placeholder': 'Chiedi qualsiasi cosa su {trip}','assistant.composer.send': 'Invia',@@ -342,5 +344,63 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Condiviso','assistant.share.failed': 'Condivisione non riuscita. Riprova tra un attimo.','assistant.share.chatOff': 'La chat del viaggio è disattivata.',+ 'assistant.connect.descriptionWithParsing':+ "La tua connessione IA: l'assistente la usa e legge le prenotazioni che importi.",+ 'assistant.connect.descriptionParsingOnly': 'La tua connessione IA: legge le prenotazioni che importi.',+ 'assistant.error.emptyAnswer': "L'assistente non ha dato alcuna risposta. Riprovo?",+ 'assistant.followUp.title': 'Continua con',+ 'assistant.followUp.cheaper': 'Solo più economici',+ 'assistant.followUp.closer': "Più vicino all'alloggio",+ 'assistant.followUp.openNow': 'Cosa è aperto adesso?',+ 'assistant.followUp.nextDay': 'Pianifica il giorno dopo allo stesso modo',+ 'assistant.followUp.relaxed': 'Rendi il piano più rilassato',+ 'assistant.followUp.dinners': 'Aggiungi ristoranti per le serate',+ 'assistant.followUp.rain': 'E se piove?',+ 'assistant.followUp.sun': "Cosa conviene all'aperto con il bel tempo?",+ 'assistant.followUp.more': 'Dimmi di più',+ 'assistant.followUp.next': 'Cosa suggerisci adesso?',+ 'assistant.menu.alternative': "Trova un'alternativa",+ 'assistant.menu.alternativeAsk':+ 'Trova una buona alternativa a {place} nelle vicinanze e spiega perché è più adatta.',+ 'assistant.menu.foodNearby': 'Ristorante vicino',+ 'assistant.menu.foodNearbyAsk': 'Suggerisci qualche buon posto dove mangiare vicino a {place}.',+ 'assistant.menu.planDay': 'Pianifica questo giorno',+ 'assistant.menu.planDayAsk': 'Pianifica questo giorno per me: luoghi, orari e un posto dove mangiare.',+ 'assistant.menu.rainPlan': 'Piano pioggia',+ 'assistant.menu.rainPlanAsk':+ 'Cosa possiamo fare questo giorno se piove? Suggerisci alternative al coperto nelle vicinanze.',+ 'assistant.preview.title': "Proposte dell'assistente",+ 'assistant.preview.suggested': 'Proposta',+ 'assistant.preview.movedHere': 'Arriva qui',+ 'assistant.preview.removed': 'Viene tolto',+ 'assistant.preview.movedAway': 'Viene spostato',+ 'assistant.check.ok': "Rientra nell'orario",+ 'assistant.week.title': 'I giorni di questo piano',+ 'assistant.week.day': 'Giorno',+ 'assistant.memory.title': 'Promemoria',+ 'assistant.memory.edit': 'Modifica il promemoria',+ 'assistant.memory.sub': "L'assistente ne tiene conto in ogni proposta per questo viaggio.",+ 'assistant.memory.quick': 'Desideri frequenti',+ 'assistant.memory.notes': 'Le tue note',+ 'assistant.memory.placeholder':+ 'Per esempio: viaggiamo con un bimbo piccolo, amiamo lo street food, niente sveglie presto.',+ 'assistant.memory.saved': 'Promemoria salvato',+ 'assistant.memory.quick.vegetarian': 'Mangiamo vegetariano',+ 'assistant.memory.quick.kids': 'Viaggiamo con bambini',+ 'assistant.memory.quick.budget': 'Con budget ridotto',+ 'assistant.memory.quick.slow': 'Ritmo tranquillo, senza fretta',+ 'assistant.memory.quick.accessible': 'Accesso senza gradini, per favore',+ 'assistant.memory.quick.noMuseums': 'Pochi musei',+ 'assistant.settings.costEstimates': 'Stima dei costi',+ 'assistant.settings.costEstimatesHint':+ 'Con un ristorante o un biglietto propone una spesa stimata per il budget, come scheda da confermare.',+ 'assistant.change.timeline.tight': 'Mancano {count} min',+ 'assistant.change.timeline.tight.one': 'Manca {count} min',+ 'assistant.check.issues': '{count} punti da controllare',+ 'assistant.check.issues.one': '{count} punto da controllare',+ 'assistant.week.changes': '{count} modifiche',+ 'assistant.week.changes.one': '{count} modifica',+ 'assistant.week.showAll': 'Mostra tutte le {count} modifiche',+ 'assistant.week.showAll.one': 'Mostra {count} modifica',};export default assistant;diff --git a/shared/src/i18n/ja/admin.ts b/shared/src/i18n/ja/admin.tsindex 5bc5189fb..bf1e77110 100644--- a/shared/src/i18n/ja/admin.ts+++ b/shared/src/i18n/ja/admin.ts@@ -917,5 +917,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'カテゴリーを削除','admin.packingTemplates.deleteCategoryConfirm': 'カテゴリー「{name}」を、すべての項目ごと削除しますか?','admin.rotateJwt.button': '更新',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'アシスタントと予約の取り込みに使う接続を一つに。MCP を使うと他の AI アプリから TREK を使えます。',+ 'admin.addons.ai.setup': 'AI を設定',+ 'admin.addons.ai.dialogSub': 'アシスタントと AI 解析が共有する接続と、それぞれに許可すること。',+ 'admin.addons.ai.tab.connection': '接続',+ 'admin.addons.ai.parsing.readsWith': '予約の読み取りに使う接続',+ 'admin.addons.ai.parsing.own': '専用の接続',+ 'admin.addons.ai.parsing.ownHint': '共有の接続の代わりに使われます。',+ 'admin.addons.ai.parsing.useShared': '共有の接続を使う',+ 'admin.addons.ai.parsing.sharedTag': '共有',+ 'admin.addons.ai.parsing.perUser': '各ユーザーが自分の設定にある接続で読み取ります。',+ 'admin.addons.ai.parsing.none': 'まだ接続がありません。全員用に設定するか、AI 解析専用の接続を設定してください。',+ 'admin.addons.ai.parsing.setupOwn': '別の接続を使う',+ 'admin.addons.ai.parsing.installed': 'サーバーにインストール済み',+ 'admin.addons.ai.parsing.refresh': '更新',+ 'admin.addons.ai.parsing.noModels': 'まだモデルがありません。下から取得してください。',+ 'admin.addons.ai.parsing.pullTitle': 'おすすめのモデルを取得',+ 'admin.addons.ai.parsing.pull': '取得',+ 'admin.addons.ai.parsing.pulling': '取得中…',+ 'admin.addons.ai.parsing.use': '使う',+ 'admin.addons.ai.parsing.selected': '選択中',+ 'admin.addons.ai.parsing.pulled': 'モデルを取得しました',+ 'admin.addons.ai.parsing.pullFailed': 'モデルを取得できませんでした',+ 'admin.addons.ai.parsing.unreachable': 'ローカルサーバーに接続できません',+ 'admin.addons.ai.parsing.apiKeyOptional': '通常は不要',};export default admin;diff --git a/shared/src/i18n/ja/assistant.ts b/shared/src/i18n/ja/assistant.tsindex 22a0ccdc1..aef0ff09c 100644--- a/shared/src/i18n/ja/assistant.ts+++ b/shared/src/i18n/ja/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'キーを取得','assistant.connect.hintAnthropic': 'Claude Max と Team には API クレジットが含まれています。','assistant.connect.hintOpenai': 'OpenAI のダッシュボードでキーを作成してください。',- 'assistant.connect.hintGemini': 'AI Studio には 1 分あたりと 1 日あたりの制限がある無料枠があり、そこでは送信内容が Google の製品改善に使われることがあります。課金を有効にすると制限が上がり、この扱いはなくなります。',+ 'assistant.connect.hintGemini':+ 'AI Studio には 1 分あたりと 1 日あたりの制限がある無料枠があり、そこでは送信内容が Google の製品改善に使われることがあります。課金を有効にすると制限が上がり、この扱いはなくなります。','assistant.connect.hintOpenrouter': 'OpenRouter でサインインするだけで、キーのコピーは不要です。','assistant.connect.openrouter': 'OpenRouter に接続','assistant.connect.save': '接続',@@ -91,7 +92,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': '最新のメッセージへ移動','assistant.attach.button': '予約を添付','assistant.attach.drop': 'ここにドロップすると予約を読み取ります',- 'assistant.attach.unsupported': 'このファイル形式は読み取れません。PDF、メール、画像、ウォレットパスをお試しください。',+ 'assistant.attach.unsupported':+ 'このファイル形式は読み取れません。PDF、メール、画像、ウォレットパスをお試しください。','assistant.attach.tooLarge': 'このファイルは 10 MB を超えています。','assistant.composer.placeholder': '{trip} について何でも質問','assistant.composer.send': '送信',@@ -316,5 +318,55 @@ const assistant: TranslationStrings = {'assistant.share.shared': '共有済み','assistant.share.failed': '共有できませんでした。少ししてからもう一度お試しください。','assistant.share.chatOff': '旅行チャットはオフになっています。',+ 'assistant.connect.descriptionWithParsing':+ 'あなたの AI 接続:アシスタントはこの接続で動き、取り込んだ予約もこの接続で読み取ります。',+ 'assistant.connect.descriptionParsingOnly': 'あなたの AI 接続:取り込んだ予約をこの接続で読み取ります。',+ 'assistant.error.emptyAnswer': 'アシスタントから回答がありませんでした。もう一度試しますか?',+ 'assistant.followUp.title': '次に聞く',+ 'assistant.followUp.cheaper': 'もっと安いものだけ',+ 'assistant.followUp.closer': '宿に近いところ',+ 'assistant.followUp.openNow': '今開いているのは?',+ 'assistant.followUp.nextDay': '次の日も同じように計画して',+ 'assistant.followUp.relaxed': 'もっとゆったりした計画にして',+ 'assistant.followUp.dinners': '夜のレストランを追加して',+ 'assistant.followUp.rain': '雨だったら?',+ 'assistant.followUp.sun': '晴れたら外で何がいい?',+ 'assistant.followUp.more': 'もっと詳しく',+ 'assistant.followUp.next': '次は何がおすすめ?',+ 'assistant.menu.alternative': '代わりを探す',+ 'assistant.menu.alternativeAsk': '{place} の代わりになる近くの良い場所を探して、より合う理由も教えて。',+ 'assistant.menu.foodNearby': '近くのレストラン',+ 'assistant.menu.foodNearbyAsk': '{place} の近くでおすすめの食事処をいくつか教えて。',+ 'assistant.menu.planDay': 'この日を計画',+ 'assistant.menu.planDayAsk': 'この日を計画して:場所、時間、食事の場所。',+ 'assistant.menu.rainPlan': '雨の日プラン',+ 'assistant.menu.rainPlanAsk': 'この日に雨だったら何ができる?近くの屋内の候補を教えて。',+ 'assistant.preview.title': 'アシスタントの提案',+ 'assistant.preview.suggested': '提案',+ 'assistant.preview.movedHere': 'ここへ移動',+ 'assistant.preview.removed': '外れる',+ 'assistant.preview.movedAway': '移動',+ 'assistant.check.ok': '時間内に収まる',+ 'assistant.week.title': 'この計画の日程',+ 'assistant.week.day': '日',+ 'assistant.memory.title': '旅のメモ',+ 'assistant.memory.edit': '旅のメモを編集',+ 'assistant.memory.sub': 'アシスタントはこの旅のすべての提案でこれを考慮します。',+ 'assistant.memory.quick': 'よくある希望',+ 'assistant.memory.notes': 'あなたのメモ',+ 'assistant.memory.placeholder': '例:小さな子ども連れ、屋台料理が好き、早起きはしない。',+ 'assistant.memory.saved': '旅のメモを保存しました',+ 'assistant.memory.quick.vegetarian': 'ベジタリアンです',+ 'assistant.memory.quick.kids': '子ども連れです',+ 'assistant.memory.quick.budget': '予算は控えめ',+ 'assistant.memory.quick.slow': 'ゆったりペースで',+ 'assistant.memory.quick.accessible': '段差のないルートで',+ 'assistant.memory.quick.noMuseums': '美術館・博物館は少なめ',+ 'assistant.settings.costEstimates': '費用を見積もる',+ 'assistant.settings.costEstimatesHint': 'レストランやチケットには、予算用の見積もり支出を確認用カードで提案します。',+ 'assistant.change.timeline.tight': '{count} 分足りません',+ 'assistant.check.issues': '確認事項 {count} 件',+ 'assistant.week.changes': '{count} 件の変更',+ 'assistant.week.showAll': '{count} 件の変更をすべて表示',};export default assistant;diff --git a/shared/src/i18n/ko/admin.ts b/shared/src/i18n/ko/admin.tsindex e80959452..4437fba4f 100644--- a/shared/src/i18n/ko/admin.ts+++ b/shared/src/i18n/ko/admin.ts@@ -909,5 +909,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': '카테고리 삭제','admin.packingTemplates.deleteCategoryConfirm': '카테고리 "{name}"을(를) 모든 항목과 함께 삭제할까요?','admin.rotateJwt.button': '교체',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ '어시스턴트와 예약 가져오기에 쓰는 연결 하나. MCP로 다른 AI 앱에서 TREK을 사용할 수 있습니다.',+ 'admin.addons.ai.setup': 'AI 설정',+ 'admin.addons.ai.dialogSub': '어시스턴트와 AI 분석이 함께 쓰는 연결, 그리고 각각 할 수 있는 일.',+ 'admin.addons.ai.tab.connection': '연결',+ 'admin.addons.ai.parsing.readsWith': '예약을 읽는 연결',+ 'admin.addons.ai.parsing.own': '전용 연결',+ 'admin.addons.ai.parsing.ownHint': '공유 연결 대신 사용됩니다.',+ 'admin.addons.ai.parsing.useShared': '공유 연결 사용',+ 'admin.addons.ai.parsing.sharedTag': '공유',+ 'admin.addons.ai.parsing.perUser': '각 사용자가 자신의 설정에 있는 연결로 읽습니다.',+ 'admin.addons.ai.parsing.none': '아직 연결이 없습니다. 모두를 위한 연결을 설정하거나 AI 분석 전용 연결을 설정하세요.',+ 'admin.addons.ai.parsing.setupOwn': '다른 연결 사용',+ 'admin.addons.ai.parsing.installed': '서버에 설치됨',+ 'admin.addons.ai.parsing.refresh': '새로고침',+ 'admin.addons.ai.parsing.noModels': '아직 설치된 모델이 없습니다. 아래에서 받으세요.',+ 'admin.addons.ai.parsing.pullTitle': '추천 모델 받기',+ 'admin.addons.ai.parsing.pull': '받기',+ 'admin.addons.ai.parsing.pulling': '받는 중…',+ 'admin.addons.ai.parsing.use': '사용',+ 'admin.addons.ai.parsing.selected': '선택됨',+ 'admin.addons.ai.parsing.pulled': '모델을 받았습니다',+ 'admin.addons.ai.parsing.pullFailed': '모델을 받지 못했습니다',+ 'admin.addons.ai.parsing.unreachable': '로컬 서버에 연결할 수 없습니다',+ 'admin.addons.ai.parsing.apiKeyOptional': '보통 필요 없음',};export default admin;diff --git a/shared/src/i18n/ko/assistant.ts b/shared/src/i18n/ko/assistant.tsindex 1700ce26d..ed371cafb 100644--- a/shared/src/i18n/ko/assistant.ts+++ b/shared/src/i18n/ko/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': '키 받기','assistant.connect.hintAnthropic': 'Claude Max와 Team에는 API 크레딧이 포함되어 있습니다.','assistant.connect.hintOpenai': 'OpenAI 대시보드에서 키를 만드세요.',- 'assistant.connect.hintGemini': 'AI Studio에는 분당, 일일 한도가 있는 무료 등급이 있으며, 여기서는 Google이 보낸 내용을 제품 개선에 사용할 수 있습니다. 결제를 켜면 한도가 높아지고 이는 적용되지 않습니다.',+ 'assistant.connect.hintGemini':+ 'AI Studio에는 분당, 일일 한도가 있는 무료 등급이 있으며, 여기서는 Google이 보낸 내용을 제품 개선에 사용할 수 있습니다. 결제를 켜면 한도가 높아지고 이는 적용되지 않습니다.','assistant.connect.hintOpenrouter': 'OpenRouter로 로그인하면 키를 복사할 필요가 없습니다.','assistant.connect.openrouter': 'OpenRouter 연결','assistant.connect.save': '연결',@@ -314,5 +315,55 @@ const assistant: TranslationStrings = {'assistant.share.shared': '공유됨','assistant.share.failed': '공유하지 못했습니다. 잠시 후 다시 시도하세요.','assistant.share.chatOff': '여행 채팅이 꺼져 있습니다.',+ 'assistant.connect.descriptionWithParsing':+ '내 AI 연결: 어시스턴트가 이 연결로 동작하고, 가져온 예약도 이 연결로 읽습니다.',+ 'assistant.connect.descriptionParsingOnly': '내 AI 연결: 가져온 예약을 이 연결로 읽습니다.',+ 'assistant.error.emptyAnswer': '어시스턴트가 답을 주지 않았습니다. 다시 시도할까요?',+ 'assistant.followUp.title': '이어서 묻기',+ 'assistant.followUp.cheaper': '더 저렴한 곳만',+ 'assistant.followUp.closer': '숙소에서 더 가까운 곳',+ 'assistant.followUp.openNow': '지금 열려 있는 곳은?',+ 'assistant.followUp.nextDay': '다음 날도 같은 방식으로 계획해 줘',+ 'assistant.followUp.relaxed': '일정을 더 여유롭게 해 줘',+ 'assistant.followUp.dinners': '저녁마다 식당을 추가해 줘',+ 'assistant.followUp.rain': '비가 오면?',+ 'assistant.followUp.sun': '날씨가 좋으면 밖에서 뭘 하면 좋을까?',+ 'assistant.followUp.more': '더 알려 줘',+ 'assistant.followUp.next': '다음엔 뭘 추천해?',+ 'assistant.menu.alternative': '대안 찾기',+ 'assistant.menu.alternativeAsk': '{place} 근처에서 좋은 대안을 찾고 왜 더 잘 맞는지 알려 줘.',+ 'assistant.menu.foodNearby': '근처 식당',+ 'assistant.menu.foodNearbyAsk': '{place} 근처에서 식사하기 좋은 곳을 몇 군데 추천해 줘.',+ 'assistant.menu.planDay': '이날 계획하기',+ 'assistant.menu.planDayAsk': '이날을 계획해 줘: 장소, 시간, 식사할 곳.',+ 'assistant.menu.rainPlan': '비 오는 날 계획',+ 'assistant.menu.rainPlanAsk': '이날 비가 오면 뭘 할 수 있을까? 근처 실내 대안을 추천해 줘.',+ 'assistant.preview.title': '어시스턴트의 제안',+ 'assistant.preview.suggested': '제안',+ 'assistant.preview.movedHere': '여기로 옴',+ 'assistant.preview.removed': '빠짐',+ 'assistant.preview.movedAway': '이동됨',+ 'assistant.check.ok': '시간이 맞음',+ 'assistant.week.title': '이 계획의 날짜',+ 'assistant.week.day': '일',+ 'assistant.memory.title': '여행 메모',+ 'assistant.memory.edit': '여행 메모 편집',+ 'assistant.memory.sub': '어시스턴트가 이 여행의 모든 제안에서 이를 반영합니다.',+ 'assistant.memory.quick': '자주 찾는 요청',+ 'assistant.memory.notes': '내 메모',+ 'assistant.memory.placeholder': '예: 어린아이와 함께 여행, 길거리 음식을 좋아함, 일찍 일어나지 않기.',+ 'assistant.memory.saved': '여행 메모를 저장했습니다',+ 'assistant.memory.quick.vegetarian': '채식을 합니다',+ 'assistant.memory.quick.kids': '아이와 함께 여행합니다',+ 'assistant.memory.quick.budget': '예산이 넉넉하지 않음',+ 'assistant.memory.quick.slow': '여유로운 속도, 서두르지 않기',+ 'assistant.memory.quick.accessible': '계단 없는 동선으로',+ 'assistant.memory.quick.noMuseums': '박물관은 적게',+ 'assistant.settings.costEstimates': '비용 추정',+ 'assistant.settings.costEstimatesHint': '식당이나 입장권에는 예산용 예상 지출을 확인용 카드로 제안합니다.',+ 'assistant.change.timeline.tight': '{count}분 부족',+ 'assistant.check.issues': '확인할 점 {count}개',+ 'assistant.week.changes': '변경 {count}개',+ 'assistant.week.showAll': '변경 {count}개 모두 보기',};export default assistant;diff --git a/shared/src/i18n/nl/admin.ts b/shared/src/i18n/nl/admin.tsindex 9375198f6..ea7ab30e0 100644--- a/shared/src/i18n/nl/admin.ts+++ b/shared/src/i18n/nl/admin.ts@@ -977,5 +977,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Categorie verwijderen','admin.packingTemplates.deleteCategoryConfirm': 'Categorie "{name}" en alle items erin verwijderen?','admin.rotateJwt.button': 'Vernieuwen',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'Eén verbinding voor de assistent en het inlezen van boekingen. Met MCP kunnen andere AI-apps TREK gebruiken.',+ 'admin.addons.ai.setup': 'AI instellen',+ 'admin.addons.ai.dialogSub': 'De verbinding die de assistent en AI-verwerking delen, en wat elk ervan mag.',+ 'admin.addons.ai.tab.connection': 'Verbinding',+ 'admin.addons.ai.parsing.readsWith': 'Leest boekingen met',+ 'admin.addons.ai.parsing.own': 'Eigen verbinding',+ 'admin.addons.ai.parsing.ownHint': 'Wordt gebruikt in plaats van de gedeelde verbinding.',+ 'admin.addons.ai.parsing.useShared': 'Gedeelde verbinding gebruiken',+ 'admin.addons.ai.parsing.sharedTag': 'Gedeeld',+ 'admin.addons.ai.parsing.perUser': 'Iedereen leest met de eigen verbinding uit de eigen instellingen.',+ 'admin.addons.ai.parsing.none':+ 'Nog geen verbinding. Stel er een in voor iedereen, of geef AI-verwerking een eigen verbinding.',+ 'admin.addons.ai.parsing.setupOwn': 'Een andere gebruiken',+ 'admin.addons.ai.parsing.installed': 'Geïnstalleerd op de server',+ 'admin.addons.ai.parsing.refresh': 'Vernieuwen',+ 'admin.addons.ai.parsing.noModels': 'Nog geen modellen geïnstalleerd. Haal er hieronder een op.',+ 'admin.addons.ai.parsing.pullTitle': 'Een aanbevolen model ophalen',+ 'admin.addons.ai.parsing.pull': 'Ophalen',+ 'admin.addons.ai.parsing.pulling': 'Ophalen…',+ 'admin.addons.ai.parsing.use': 'Gebruiken',+ 'admin.addons.ai.parsing.selected': 'Geselecteerd',+ 'admin.addons.ai.parsing.pulled': 'Model opgehaald',+ 'admin.addons.ai.parsing.pullFailed': 'Model kon niet worden opgehaald',+ 'admin.addons.ai.parsing.unreachable': 'De lokale server is niet bereikbaar',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Meestal niet nodig',};export default admin;diff --git a/shared/src/i18n/nl/assistant.ts b/shared/src/i18n/nl/assistant.tsindex 2f434788d..43adf63ad 100644--- a/shared/src/i18n/nl/assistant.ts+++ b/shared/src/i18n/nl/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Sleutel aanvragen','assistant.connect.hintAnthropic': 'Claude Max en Team bevatten API-tegoed.','assistant.connect.hintOpenai': 'Maak een sleutel aan in je OpenAI-dashboard.',- 'assistant.connect.hintGemini': 'AI Studio heeft een gratis niveau met limieten per minuut en per dag, waarin Google wat je stuurt mag gebruiken om zijn producten te verbeteren. Met facturering ingeschakeld zijn de limieten hoger en geldt dat niet.',+ 'assistant.connect.hintGemini':+ 'AI Studio heeft een gratis niveau met limieten per minuut en per dag, waarin Google wat je stuurt mag gebruiken om zijn producten te verbeteren. Met facturering ingeschakeld zijn de limieten hoger en geldt dat niet.','assistant.connect.hintOpenrouter': 'Log in met OpenRouter, geen sleutel om te kopiëren.','assistant.connect.openrouter': 'OpenRouter koppelen','assistant.connect.save': 'Koppelen',@@ -93,7 +94,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Naar het nieuwste bericht','assistant.attach.button': 'Boeking bijvoegen','assistant.attach.drop': 'Laat hier los, dan lees ik de boeking',- 'assistant.attach.unsupported': 'Dit bestandstype kan ik niet lezen. Probeer een pdf, e-mail, afbeelding of wallet-pas.',+ 'assistant.attach.unsupported':+ 'Dit bestandstype kan ik niet lezen. Probeer een pdf, e-mail, afbeelding of wallet-pas.','assistant.attach.tooLarge': 'Dit bestand is groter dan 10 MB.','assistant.composer.placeholder': 'Vraag alles over {trip}','assistant.composer.send': 'Versturen',@@ -339,5 +341,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Gedeeld','assistant.share.failed': 'Delen is niet gelukt. Probeer het zo nog eens.','assistant.share.chatOff': 'De reischat staat uit.',+ 'assistant.connect.descriptionWithParsing':+ 'Je AI-verbinding: de assistent draait erop en ze leest de boekingen die je importeert.',+ 'assistant.connect.descriptionParsingOnly': 'Je AI-verbinding: ze leest de boekingen die je importeert.',+ 'assistant.error.emptyAnswer': 'De assistent kwam terug zonder antwoord. Zal ik het opnieuw proberen?',+ 'assistant.followUp.title': 'Verder met',+ 'assistant.followUp.cheaper': 'Alleen goedkopere',+ 'assistant.followUp.closer': 'Dichter bij mijn verblijf',+ 'assistant.followUp.openNow': 'Wat is nu open?',+ 'assistant.followUp.nextDay': 'Plan de volgende dag op dezelfde manier',+ 'assistant.followUp.relaxed': 'Maak het plan rustiger',+ 'assistant.followUp.dinners': 'Voeg restaurants voor de avonden toe',+ 'assistant.followUp.rain': 'Wat als het regent?',+ 'assistant.followUp.sun': 'Wat is buiten de moeite waard bij mooi weer?',+ 'assistant.followUp.more': 'Vertel me meer',+ 'assistant.followUp.next': 'Wat stel je nu voor?',+ 'assistant.menu.alternative': 'Alternatief zoeken',+ 'assistant.menu.alternativeAsk': 'Zoek een goed alternatief voor {place} in de buurt en zeg waarom het beter past.',+ 'assistant.menu.foodNearby': 'Restaurant in de buurt',+ 'assistant.menu.foodNearbyAsk': 'Stel een paar goede plekken voor om te eten bij {place}.',+ 'assistant.menu.planDay': 'Deze dag plannen',+ 'assistant.menu.planDayAsk': 'Plan deze dag voor me: plekken, tijden en een plek om te eten.',+ 'assistant.menu.rainPlan': 'Regenplan',+ 'assistant.menu.rainPlanAsk':+ 'Wat kunnen we deze dag doen als het regent? Stel binnenalternatieven in de buurt voor.',+ 'assistant.preview.title': 'Voorstellen van de assistent',+ 'assistant.preview.suggested': 'Voorstel',+ 'assistant.preview.movedHere': 'Komt hier',+ 'assistant.preview.removed': 'Valt weg',+ 'assistant.preview.movedAway': 'Wordt verplaatst',+ 'assistant.check.ok': 'Past in de tijd',+ 'assistant.week.title': 'De dagen van dit plan',+ 'assistant.week.day': 'Dag',+ 'assistant.memory.title': 'Reisnotities',+ 'assistant.memory.edit': 'Reisnotities bewerken',+ 'assistant.memory.sub': 'De assistent houdt hier bij elk voorstel voor deze reis rekening mee.',+ 'assistant.memory.quick': 'Veelgevraagde wensen',+ 'assistant.memory.notes': 'Je notities',+ 'assistant.memory.placeholder': 'Bijvoorbeeld: we reizen met een peuter, houden van streetfood, niet vroeg op.',+ 'assistant.memory.saved': 'Reisnotities opgeslagen',+ 'assistant.memory.quick.vegetarian': 'We eten vegetarisch',+ 'assistant.memory.quick.kids': 'We reizen met kinderen',+ 'assistant.memory.quick.budget': 'Met een klein budget',+ 'assistant.memory.quick.slow': 'Rustig tempo, geen haast',+ 'assistant.memory.quick.accessible': 'Graag drempelvrij',+ 'assistant.memory.quick.noMuseums': 'Weinig musea',+ 'assistant.settings.costEstimates': 'Kosten schatten',+ 'assistant.settings.costEstimatesHint':+ 'Bij een restaurant of ticket stelt hij een geschatte uitgave voor het budget voor, als kaart die je bevestigt.',+ 'assistant.change.timeline.tight': '{count} min te krap',+ 'assistant.change.timeline.tight.one': '{count} min te krap',+ 'assistant.check.issues': '{count} aandachtspunten',+ 'assistant.check.issues.one': '{count} aandachtspunt',+ 'assistant.week.changes': '{count} wijzigingen',+ 'assistant.week.changes.one': '{count} wijziging',+ 'assistant.week.showAll': 'Alle {count} wijzigingen tonen',+ 'assistant.week.showAll.one': '{count} wijziging tonen',};export default assistant;diff --git a/shared/src/i18n/pl/admin.ts b/shared/src/i18n/pl/admin.tsindex efa0f6b3c..56fd1efaa 100644--- a/shared/src/i18n/pl/admin.ts+++ b/shared/src/i18n/pl/admin.ts@@ -1023,5 +1023,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Usuń kategorię','admin.packingTemplates.deleteCategoryConfirm': 'Usunąć kategorię "{name}" wraz ze wszystkimi jej pozycjami?','admin.rotateJwt.button': 'Odnów',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'Jedno połączenie dla asystenta i importu rezerwacji. MCP pozwala innym aplikacjom AI korzystać z TREK.',+ 'admin.addons.ai.setup': 'Skonfiguruj AI',+ 'admin.addons.ai.dialogSub': 'Połączenie wspólne dla asystenta i analizy AI oraz to, co każde z nich może robić.',+ 'admin.addons.ai.tab.connection': 'Połączenie',+ 'admin.addons.ai.parsing.readsWith': 'Czyta rezerwacje za pomocą',+ 'admin.addons.ai.parsing.own': 'Własne połączenie',+ 'admin.addons.ai.parsing.ownHint': 'Używane zamiast wspólnego połączenia.',+ 'admin.addons.ai.parsing.useShared': 'Użyj wspólnego połączenia',+ 'admin.addons.ai.parsing.sharedTag': 'Wspólne',+ 'admin.addons.ai.parsing.perUser': 'Każda osoba czyta za pomocą własnego połączenia z ustawień.',+ 'admin.addons.ai.parsing.none': 'Brak połączenia. Skonfiguruj jedno dla wszystkich albo daj analizie AI własne.',+ 'admin.addons.ai.parsing.setupOwn': 'Użyj innego',+ 'admin.addons.ai.parsing.installed': 'Zainstalowane na serwerze',+ 'admin.addons.ai.parsing.refresh': 'Odśwież',+ 'admin.addons.ai.parsing.noModels': 'Brak zainstalowanych modeli. Pobierz jeden poniżej.',+ 'admin.addons.ai.parsing.pullTitle': 'Pobierz zalecany model',+ 'admin.addons.ai.parsing.pull': 'Pobierz',+ 'admin.addons.ai.parsing.pulling': 'Pobieranie…',+ 'admin.addons.ai.parsing.use': 'Użyj',+ 'admin.addons.ai.parsing.selected': 'Wybrany',+ 'admin.addons.ai.parsing.pulled': 'Model pobrany',+ 'admin.addons.ai.parsing.pullFailed': 'Nie udało się pobrać modelu',+ 'admin.addons.ai.parsing.unreachable': 'Nie można połączyć się z lokalnym serwerem',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Zwykle niepotrzebny',};export default admin;diff --git a/shared/src/i18n/pl/assistant.ts b/shared/src/i18n/pl/assistant.tsindex b62c79240..93c537411 100644--- a/shared/src/i18n/pl/assistant.ts+++ b/shared/src/i18n/pl/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Uzyskaj klucz','assistant.connect.hintAnthropic': 'Claude Max i Team zawierają środki na API.','assistant.connect.hintOpenai': 'Utwórz klucz w panelu OpenAI.',- 'assistant.connect.hintGemini': 'AI Studio ma darmowy poziom z limitami na minutę i na dzień, w którym Google może używać tego, co wysyłasz, do ulepszania swoich produktów. Po włączeniu rozliczeń limity są wyższe i to nie obowiązuje.',+ 'assistant.connect.hintGemini':+ 'AI Studio ma darmowy poziom z limitami na minutę i na dzień, w którym Google może używać tego, co wysyłasz, do ulepszania swoich produktów. Po włączeniu rozliczeń limity są wyższe i to nie obowiązuje.','assistant.connect.hintOpenrouter': 'Zaloguj się przez OpenRouter, bez kopiowania klucza.','assistant.connect.openrouter': 'Połącz OpenRouter','assistant.connect.save': 'Połącz',@@ -380,5 +381,69 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Udostępniono','assistant.share.failed': 'Nie udało się udostępnić. Spróbuj ponownie za chwilę.','assistant.share.chatOff': 'Czat podróży jest wyłączony.',+ 'assistant.connect.descriptionWithParsing':+ 'Twoje połączenie AI: działa na nim asystent i czyta ono importowane rezerwacje.',+ 'assistant.connect.descriptionParsingOnly': 'Twoje połączenie AI: czyta importowane rezerwacje.',+ 'assistant.error.emptyAnswer': 'Asystent wrócił bez odpowiedzi. Spróbować ponownie?',+ 'assistant.followUp.title': 'Dalej',+ 'assistant.followUp.cheaper': 'Tylko tańsze',+ 'assistant.followUp.closer': 'Bliżej mojego noclegu',+ 'assistant.followUp.openNow': 'Co jest teraz otwarte?',+ 'assistant.followUp.nextDay': 'Zaplanuj następny dzień tak samo',+ 'assistant.followUp.relaxed': 'Zrób plan luźniejszym',+ 'assistant.followUp.dinners': 'Dodaj restauracje na wieczory',+ 'assistant.followUp.rain': 'A jeśli będzie padać?',+ 'assistant.followUp.sun': 'Co warto robić na zewnątrz przy ładnej pogodzie?',+ 'assistant.followUp.more': 'Powiedz więcej',+ 'assistant.followUp.next': 'Co proponujesz teraz?',+ 'assistant.menu.alternative': 'Znajdź alternatywę',+ 'assistant.menu.alternativeAsk': 'Znajdź dobrą alternatywę dla {place} w pobliżu i powiedz, dlaczego pasuje lepiej.',+ 'assistant.menu.foodNearby': 'Restauracja w pobliżu',+ 'assistant.menu.foodNearbyAsk': 'Zaproponuj kilka dobrych miejsc do jedzenia w pobliżu {place}.',+ 'assistant.menu.planDay': 'Zaplanuj ten dzień',+ 'assistant.menu.planDayAsk': 'Zaplanuj mi ten dzień: miejsca, godziny i gdzie zjeść.',+ 'assistant.menu.rainPlan': 'Plan na deszcz',+ 'assistant.menu.rainPlanAsk':+ 'Co możemy robić tego dnia, jeśli będzie padać? Zaproponuj alternatywy pod dachem w pobliżu.',+ 'assistant.preview.title': 'Propozycje asystenta',+ 'assistant.preview.suggested': 'Propozycja',+ 'assistant.preview.movedHere': 'Trafia tutaj',+ 'assistant.preview.removed': 'Odpada',+ 'assistant.preview.movedAway': 'Zostaje przeniesione',+ 'assistant.check.ok': 'Mieści się w czasie',+ 'assistant.week.title': 'Dni tego planu',+ 'assistant.week.day': 'Dzień',+ 'assistant.memory.title': 'Notatki podróży',+ 'assistant.memory.edit': 'Edytuj notatki podróży',+ 'assistant.memory.sub': 'Asystent uwzględnia je w każdej propozycji dla tej podróży.',+ 'assistant.memory.quick': 'Częste życzenia',+ 'assistant.memory.notes': 'Twoje notatki',+ 'assistant.memory.placeholder': 'Na przykład: podróżujemy z maluchem, kochamy street food, bez wczesnego wstawania.',+ 'assistant.memory.saved': 'Notatki zapisane',+ 'assistant.memory.quick.vegetarian': 'Jemy wegetariańsko',+ 'assistant.memory.quick.kids': 'Podróżujemy z dziećmi',+ 'assistant.memory.quick.budget': 'Z małym budżetem',+ 'assistant.memory.quick.slow': 'Spokojne tempo, bez pośpiechu',+ 'assistant.memory.quick.accessible': 'Proszę bez schodów',+ 'assistant.memory.quick.noMuseums': 'Mało muzeów',+ 'assistant.settings.costEstimates': 'Szacuj koszty',+ 'assistant.settings.costEstimatesHint':+ 'Przy restauracji lub bilecie proponuje szacowany wydatek do budżetu jako kartę do potwierdzenia.',+ 'assistant.change.timeline.tight': 'Brakuje {count} min',+ 'assistant.change.timeline.tight.one': 'Brakuje {count} min',+ 'assistant.change.timeline.tight.few': 'Brakuje {count} min',+ 'assistant.change.timeline.tight.many': 'Brakuje {count} min',+ 'assistant.check.issues': '{count} punktu do sprawdzenia',+ 'assistant.check.issues.one': '{count} punkt do sprawdzenia',+ 'assistant.check.issues.few': '{count} punkty do sprawdzenia',+ 'assistant.check.issues.many': '{count} punktów do sprawdzenia',+ 'assistant.week.changes': '{count} zmiany',+ 'assistant.week.changes.one': '{count} zmiana',+ 'assistant.week.changes.few': '{count} zmiany',+ 'assistant.week.changes.many': '{count} zmian',+ 'assistant.week.showAll': 'Pokaż wszystkie {count} zmiany',+ 'assistant.week.showAll.one': 'Pokaż {count} zmianę',+ 'assistant.week.showAll.few': 'Pokaż wszystkie {count} zmiany',+ 'assistant.week.showAll.many': 'Pokaż wszystkie {count} zmian',};export default assistant;diff --git a/shared/src/i18n/ru/admin.ts b/shared/src/i18n/ru/admin.tsindex a3a744119..9db1bb291 100644--- a/shared/src/i18n/ru/admin.ts+++ b/shared/src/i18n/ru/admin.ts@@ -1014,5 +1014,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Удалить категорию','admin.packingTemplates.deleteCategoryConfirm': 'Удалить категорию "{name}" и все её пункты?','admin.rotateJwt.button': 'Обновить',+ 'admin.addons.ai.name': 'ИИ',+ 'admin.addons.ai.description':+ 'Одно подключение для ассистента и импорта бронирований. MCP позволяет другим ИИ-приложениям работать с TREK.',+ 'admin.addons.ai.setup': 'Настроить ИИ',+ 'admin.addons.ai.dialogSub': 'Подключение, общее для ассистента и ИИ-разбора, и что может каждый из них.',+ 'admin.addons.ai.tab.connection': 'Подключение',+ 'admin.addons.ai.parsing.readsWith': 'Читает бронирования через',+ 'admin.addons.ai.parsing.own': 'Собственное подключение',+ 'admin.addons.ai.parsing.ownHint': 'Используется вместо общего подключения.',+ 'admin.addons.ai.parsing.useShared': 'Использовать общее подключение',+ 'admin.addons.ai.parsing.sharedTag': 'Общее',+ 'admin.addons.ai.parsing.perUser': 'Каждый читает через своё подключение из своих настроек.',+ 'admin.addons.ai.parsing.none': 'Подключения пока нет. Настройте одно для всех или дайте ИИ-разбору собственное.',+ 'admin.addons.ai.parsing.setupOwn': 'Использовать другое',+ 'admin.addons.ai.parsing.installed': 'Установлены на сервере',+ 'admin.addons.ai.parsing.refresh': 'Обновить',+ 'admin.addons.ai.parsing.noModels': 'Моделей пока нет. Загрузите одну ниже.',+ 'admin.addons.ai.parsing.pullTitle': 'Загрузить рекомендуемую модель',+ 'admin.addons.ai.parsing.pull': 'Загрузить',+ 'admin.addons.ai.parsing.pulling': 'Загрузка…',+ 'admin.addons.ai.parsing.use': 'Использовать',+ 'admin.addons.ai.parsing.selected': 'Выбрано',+ 'admin.addons.ai.parsing.pulled': 'Модель загружена',+ 'admin.addons.ai.parsing.pullFailed': 'Не удалось загрузить модель',+ 'admin.addons.ai.parsing.unreachable': 'Локальный сервер недоступен',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Обычно не нужен',};export default admin;diff --git a/shared/src/i18n/ru/assistant.ts b/shared/src/i18n/ru/assistant.tsindex abf85c170..eab1eec12 100644--- a/shared/src/i18n/ru/assistant.ts+++ b/shared/src/i18n/ru/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Получить ключ','assistant.connect.hintAnthropic': 'В Claude Max и Team входят кредиты API.','assistant.connect.hintOpenai': 'Создайте ключ в панели управления OpenAI.',- 'assistant.connect.hintGemini': 'В AI Studio есть бесплатный уровень с лимитами в минуту и в день, на котором Google может использовать то, что ты отправляешь, для улучшения своих продуктов. С включённой оплатой лимиты выше, и это не действует.',+ 'assistant.connect.hintGemini':+ 'В AI Studio есть бесплатный уровень с лимитами в минуту и в день, на котором Google может использовать то, что ты отправляешь, для улучшения своих продуктов. С включённой оплатой лимиты выше, и это не действует.','assistant.connect.hintOpenrouter': 'Войдите через OpenRouter, копировать ключ не нужно.','assistant.connect.openrouter': 'Подключить OpenRouter','assistant.connect.save': 'Подключить',@@ -379,5 +380,70 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Отправлено','assistant.share.failed': 'Не удалось поделиться. Попробуйте ещё раз чуть позже.','assistant.share.chatOff': 'Чат поездки выключен.',+ 'assistant.connect.descriptionWithParsing':+ 'Ваше ИИ-подключение: на нём работает ассистент, и оно читает импортированные бронирования.',+ 'assistant.connect.descriptionParsingOnly': 'Ваше ИИ-подключение: оно читает импортированные бронирования.',+ 'assistant.error.emptyAnswer': 'Ассистент вернулся без ответа. Попробовать ещё раз?',+ 'assistant.followUp.title': 'Дальше',+ 'assistant.followUp.cheaper': 'Только дешевле',+ 'assistant.followUp.closer': 'Ближе к моему жилью',+ 'assistant.followUp.openNow': 'Что сейчас открыто?',+ 'assistant.followUp.nextDay': 'Спланируй следующий день так же',+ 'assistant.followUp.relaxed': 'Сделай план спокойнее',+ 'assistant.followUp.dinners': 'Добавь рестораны на вечера',+ 'assistant.followUp.rain': 'А если будет дождь?',+ 'assistant.followUp.sun': 'Что стоит сделать на улице в хорошую погоду?',+ 'assistant.followUp.more': 'Расскажи подробнее',+ 'assistant.followUp.next': 'Что предложишь дальше?',+ 'assistant.menu.alternative': 'Найти альтернативу',+ 'assistant.menu.alternativeAsk':+ 'Найди хорошую альтернативу {place} поблизости и объясни, почему она подходит лучше.',+ 'assistant.menu.foodNearby': 'Ресторан рядом',+ 'assistant.menu.foodNearbyAsk': 'Предложи несколько хороших мест, где поесть рядом с {place}.',+ 'assistant.menu.planDay': 'Спланировать день',+ 'assistant.menu.planDayAsk': 'Спланируй для меня этот день: места, время и где поесть.',+ 'assistant.menu.rainPlan': 'План на дождь',+ 'assistant.menu.rainPlanAsk':+ 'Что можно делать в этот день, если пойдёт дождь? Предложи варианты в помещении поблизости.',+ 'assistant.preview.title': 'Предложения ассистента',+ 'assistant.preview.suggested': 'Предложение',+ 'assistant.preview.movedHere': 'Переносится сюда',+ 'assistant.preview.removed': 'Убирается',+ 'assistant.preview.movedAway': 'Переносится',+ 'assistant.check.ok': 'Укладывается во время',+ 'assistant.week.title': 'Дни этого плана',+ 'assistant.week.day': 'День',+ 'assistant.memory.title': 'Заметки к поездке',+ 'assistant.memory.edit': 'Изменить заметки к поездке',+ 'assistant.memory.sub': 'Ассистент учитывает их в каждом предложении для этой поездки.',+ 'assistant.memory.quick': 'Частые пожелания',+ 'assistant.memory.notes': 'Ваши заметки',+ 'assistant.memory.placeholder': 'Например: едем с малышом, любим уличную еду, без ранних подъёмов.',+ 'assistant.memory.saved': 'Заметки сохранены',+ 'assistant.memory.quick.vegetarian': 'Мы вегетарианцы',+ 'assistant.memory.quick.kids': 'Путешествуем с детьми',+ 'assistant.memory.quick.budget': 'С небольшим бюджетом',+ 'assistant.memory.quick.slow': 'Спокойный темп, без спешки',+ 'assistant.memory.quick.accessible': 'Без ступенек, пожалуйста',+ 'assistant.memory.quick.noMuseums': 'Мало музеев',+ 'assistant.settings.costEstimates': 'Оценивать расходы',+ 'assistant.settings.costEstimatesHint':+ 'Для ресторана или билета предлагает примерный расход в бюджет, карточкой для подтверждения.',+ 'assistant.change.timeline.tight': 'Не хватает {count} мин',+ 'assistant.change.timeline.tight.one': 'Не хватает {count} мин',+ 'assistant.change.timeline.tight.few': 'Не хватает {count} мин',+ 'assistant.change.timeline.tight.many': 'Не хватает {count} мин',+ 'assistant.check.issues': '{count} пункта на проверку',+ 'assistant.check.issues.one': '{count} пункт на проверку',+ 'assistant.check.issues.few': '{count} пункта на проверку',+ 'assistant.check.issues.many': '{count} пунктов на проверку',+ 'assistant.week.changes': '{count} изменения',+ 'assistant.week.changes.one': '{count} изменение',+ 'assistant.week.changes.few': '{count} изменения',+ 'assistant.week.changes.many': '{count} изменений',+ 'assistant.week.showAll': 'Показать все {count} изменения',+ 'assistant.week.showAll.one': 'Показать {count} изменение',+ 'assistant.week.showAll.few': 'Показать все {count} изменения',+ 'assistant.week.showAll.many': 'Показать все {count} изменений',};export default assistant;diff --git a/shared/src/i18n/sk/admin.ts b/shared/src/i18n/sk/admin.tsindex dab43ac84..b8a4a8ca0 100644--- a/shared/src/i18n/sk/admin.ts+++ b/shared/src/i18n/sk/admin.ts@@ -986,5 +986,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Odstrániť kategóriu','admin.packingTemplates.deleteCategoryConfirm': 'Odstrániť kategóriu "{name}" a všetky jej položky?','admin.rotateJwt.button': 'Obnoviť',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'Jedno pripojenie pre asistenta a import rezervácií. MCP umožní iným AI aplikáciám používať TREK.',+ 'admin.addons.ai.setup': 'Nastaviť AI',+ 'admin.addons.ai.dialogSub': 'Pripojenie, ktoré zdieľa asistent a AI spracovanie, a čo smie každý z nich.',+ 'admin.addons.ai.tab.connection': 'Pripojenie',+ 'admin.addons.ai.parsing.readsWith': 'Číta rezervácie pomocou',+ 'admin.addons.ai.parsing.own': 'Vlastné pripojenie',+ 'admin.addons.ai.parsing.ownHint': 'Používa sa namiesto zdieľaného pripojenia.',+ 'admin.addons.ai.parsing.useShared': 'Použiť zdieľané pripojenie',+ 'admin.addons.ai.parsing.sharedTag': 'Zdieľané',+ 'admin.addons.ai.parsing.perUser': 'Každý číta pomocou vlastného pripojenia zo svojich nastavení.',+ 'admin.addons.ai.parsing.none':+ 'Zatiaľ žiadne pripojenie. Nastavte jedno pre všetkých alebo dajte AI spracovaniu vlastné.',+ 'admin.addons.ai.parsing.setupOwn': 'Použiť iné',+ 'admin.addons.ai.parsing.installed': 'Nainštalované na serveri',+ 'admin.addons.ai.parsing.refresh': 'Obnoviť',+ 'admin.addons.ai.parsing.noModels': 'Zatiaľ nie sú nainštalované žiadne modely. Stiahnite si jeden nižšie.',+ 'admin.addons.ai.parsing.pullTitle': 'Stiahnuť odporúčaný model',+ 'admin.addons.ai.parsing.pull': 'Stiahnuť',+ 'admin.addons.ai.parsing.pulling': 'Sťahovanie…',+ 'admin.addons.ai.parsing.use': 'Použiť',+ 'admin.addons.ai.parsing.selected': 'Vybrané',+ 'admin.addons.ai.parsing.pulled': 'Model stiahnutý',+ 'admin.addons.ai.parsing.pullFailed': 'Model sa nepodarilo stiahnuť',+ 'admin.addons.ai.parsing.unreachable': 'Miestny server nie je dostupný',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Väčšinou netreba',};export default admin;diff --git a/shared/src/i18n/sk/assistant.ts b/shared/src/i18n/sk/assistant.tsindex 2692d6ef6..9e71532df 100644--- a/shared/src/i18n/sk/assistant.ts+++ b/shared/src/i18n/sk/assistant.ts@@ -43,7 +43,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Získať kľúč','assistant.connect.hintAnthropic': 'Claude Max a Team obsahujú kredity pre API.','assistant.connect.hintOpenai': 'Vytvor kľúč vo svojom prehľade OpenAI.',- 'assistant.connect.hintGemini': 'AI Studio má bezplatnú úroveň s limitmi za minútu a za deň, v ktorej môže Google to, čo pošleš, použiť na zlepšenie svojich produktov. So zapnutou fakturáciou sú limity vyššie a to neplatí.',+ 'assistant.connect.hintGemini':+ 'AI Studio má bezplatnú úroveň s limitmi za minútu a za deň, v ktorej môže Google to, čo pošleš, použiť na zlepšenie svojich produktov. So zapnutou fakturáciou sú limity vyššie a to neplatí.','assistant.connect.hintOpenrouter': 'Prihlás sa cez OpenRouter, nič nemusíš kopírovať.','assistant.connect.openrouter': 'Pripojiť OpenRouter','assistant.connect.save': 'Pripojiť',@@ -69,7 +70,8 @@ const assistant: TranslationStrings = {'assistant.privacy.what': 'Čo sa zdieľa?','assistant.privacy.banner': 'Tvoje správy a údaje o ceste, ktoré asistent číta, idú do {provider}.','assistant.privacy.ok': 'Rozumiem',- 'assistant.privacy.shared': 'Tvoje správy a podrobnosti o ceste, ktoré asistent číta, napríklad miesta, dni a rezervácie.',+ 'assistant.privacy.shared':+ 'Tvoje správy a podrobnosti o ceste, ktoré asistent číta, napríklad miesta, dni a rezervácie.','assistant.privacy.notShared': 'Nie tvoje heslo, tvoje súbory ani tvoje ďalšie cesty.','assistant.privacy.provider': '{provider} s tým nakladá podľa vlastných podmienok ochrany súkromia.','assistant.empty.title': 'Čo plánujeme?',@@ -92,7 +94,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Prejsť na najnovšiu správu','assistant.attach.button': 'Priložiť rezerváciu','assistant.attach.drop': 'Pusti to sem a prečítam rezerváciu',- 'assistant.attach.unsupported': 'Tento typ súboru neviem prečítať. Skús PDF, e-mail, obrázok alebo kartu do peňaženky.',+ 'assistant.attach.unsupported':+ 'Tento typ súboru neviem prečítať. Skús PDF, e-mail, obrázok alebo kartu do peňaženky.','assistant.attach.tooLarge': 'Tento súbor je väčší ako 10 MB.','assistant.composer.placeholder': 'Opýtaj sa čokoľvek o {trip}','assistant.composer.send': 'Odoslať',@@ -356,5 +359,64 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Zdieľané','assistant.share.failed': 'Zdieľanie sa nepodarilo. Skús to o chvíľu znova.','assistant.share.chatOff': 'Chat výletu je vypnutý.',+ 'assistant.connect.descriptionWithParsing':+ 'Vaše AI pripojenie: beží na ňom asistent a číta rezervácie, ktoré importujete.',+ 'assistant.connect.descriptionParsingOnly': 'Vaše AI pripojenie: číta rezervácie, ktoré importujete.',+ 'assistant.error.emptyAnswer': 'Asistent sa vrátil bez odpovede. Mám to skúsiť znova?',+ 'assistant.followUp.title': 'Ďalej',+ 'assistant.followUp.cheaper': 'Len lacnejšie',+ 'assistant.followUp.closer': 'Bližšie k môjmu ubytovaniu',+ 'assistant.followUp.openNow': 'Čo má teraz otvorené?',+ 'assistant.followUp.nextDay': 'Naplánuj ďalší deň rovnako',+ 'assistant.followUp.relaxed': 'Urob plán voľnejší',+ 'assistant.followUp.dinners': 'Pridaj reštaurácie na večery',+ 'assistant.followUp.rain': 'Čo ak bude pršať?',+ 'assistant.followUp.sun': 'Čo sa oplatí vonku za pekného počasia?',+ 'assistant.followUp.more': 'Povedz mi viac',+ 'assistant.followUp.next': 'Čo navrhuješ teraz?',+ 'assistant.menu.alternative': 'Nájsť alternatívu',+ 'assistant.menu.alternativeAsk': 'Nájdi dobrú alternatívu k {place} v okolí a povedz, prečo sa hodí lepšie.',+ 'assistant.menu.foodNearby': 'Reštaurácia v okolí',+ 'assistant.menu.foodNearbyAsk': 'Navrhni pár dobrých miest na jedlo pri {place}.',+ 'assistant.menu.planDay': 'Naplánovať deň',+ 'assistant.menu.planDayAsk': 'Naplánuj mi tento deň: miesta, časy a kde sa najesť.',+ 'assistant.menu.rainPlan': 'Plán na dážď',+ 'assistant.menu.rainPlanAsk': 'Čo môžeme v tento deň robiť, keď bude pršať? Navrhni vnútorné alternatívy v okolí.',+ 'assistant.preview.title': 'Návrhy asistenta',+ 'assistant.preview.suggested': 'Návrh',+ 'assistant.preview.movedHere': 'Pribudne sem',+ 'assistant.preview.removed': 'Odpadá',+ 'assistant.preview.movedAway': 'Presunie sa',+ 'assistant.check.ok': 'Časovo vychádza',+ 'assistant.week.title': 'Dni tohto plánu',+ 'assistant.week.day': 'Deň',+ 'assistant.memory.title': 'Poznámky k ceste',+ 'assistant.memory.edit': 'Upraviť poznámky k ceste',+ 'assistant.memory.sub': 'Asistent na ne myslí pri každom návrhu pre túto cestu.',+ 'assistant.memory.quick': 'Časté želania',+ 'assistant.memory.notes': 'Tvoje poznámky',+ 'assistant.memory.placeholder': 'Napríklad: cestujeme s batoľaťom, milujeme street food, žiadne skoré vstávanie.',+ 'assistant.memory.saved': 'Poznámky uložené',+ 'assistant.memory.quick.vegetarian': 'Jeme vegetariánsky',+ 'assistant.memory.quick.kids': 'Cestujeme s deťmi',+ 'assistant.memory.quick.budget': 'S malým rozpočtom',+ 'assistant.memory.quick.slow': 'Pokojné tempo, bez náhlenia',+ 'assistant.memory.quick.accessible': 'Prosím bezbariérovo',+ 'assistant.memory.quick.noMuseums': 'Málo múzeí',+ 'assistant.settings.costEstimates': 'Odhadovať náklady',+ 'assistant.settings.costEstimatesHint':+ 'Pri reštaurácii alebo vstupenke navrhne odhadovaný výdavok do rozpočtu ako kartu na potvrdenie.',+ 'assistant.change.timeline.tight': 'Chýba {count} min',+ 'assistant.change.timeline.tight.one': 'Chýba {count} min',+ 'assistant.change.timeline.tight.few': 'Chýbajú {count} min',+ 'assistant.check.issues': '{count} bodov na kontrolu',+ 'assistant.check.issues.one': '{count} bod na kontrolu',+ 'assistant.check.issues.few': '{count} body na kontrolu',+ 'assistant.week.changes': '{count} zmien',+ 'assistant.week.changes.one': '{count} zmena',+ 'assistant.week.changes.few': '{count} zmeny',+ 'assistant.week.showAll': 'Zobraziť všetkých {count} zmien',+ 'assistant.week.showAll.one': 'Zobraziť {count} zmenu',+ 'assistant.week.showAll.few': 'Zobraziť všetky {count} zmeny',};export default assistant;diff --git a/shared/src/i18n/sv/admin.ts b/shared/src/i18n/sv/admin.tsindex a689bbaac..36daf0180 100644--- a/shared/src/i18n/sv/admin.ts+++ b/shared/src/i18n/sv/admin.ts@@ -971,5 +971,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Ta bort kategori','admin.packingTemplates.deleteCategoryConfirm': 'Ta bort kategorin "{name}" och alla dess objekt?','admin.rotateJwt.button': 'Rotera',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'En anslutning för assistenten och bokningsimporten. Med MCP kan andra AI-appar använda TREK.',+ 'admin.addons.ai.setup': 'Konfigurera AI',+ 'admin.addons.ai.dialogSub': 'Anslutningen som assistenten och AI-tolkningen delar, och vad var och en får göra.',+ 'admin.addons.ai.tab.connection': 'Anslutning',+ 'admin.addons.ai.parsing.readsWith': 'Läser bokningar med',+ 'admin.addons.ai.parsing.own': 'Egen anslutning',+ 'admin.addons.ai.parsing.ownHint': 'Används i stället för den delade anslutningen.',+ 'admin.addons.ai.parsing.useShared': 'Använd den delade anslutningen',+ 'admin.addons.ai.parsing.sharedTag': 'Delad',+ 'admin.addons.ai.parsing.perUser': 'Var och en läser med sin egen anslutning från sina inställningar.',+ 'admin.addons.ai.parsing.none': 'Ingen anslutning ännu. Konfigurera en för alla eller ge AI-tolkningen en egen.',+ 'admin.addons.ai.parsing.setupOwn': 'Använd en annan',+ 'admin.addons.ai.parsing.installed': 'Installerade på servern',+ 'admin.addons.ai.parsing.refresh': 'Uppdatera',+ 'admin.addons.ai.parsing.noModels': 'Inga modeller installerade ännu. Hämta en nedan.',+ 'admin.addons.ai.parsing.pullTitle': 'Hämta en rekommenderad modell',+ 'admin.addons.ai.parsing.pull': 'Hämta',+ 'admin.addons.ai.parsing.pulling': 'Hämtar…',+ 'admin.addons.ai.parsing.use': 'Använd',+ 'admin.addons.ai.parsing.selected': 'Vald',+ 'admin.addons.ai.parsing.pulled': 'Modellen hämtad',+ 'admin.addons.ai.parsing.pullFailed': 'Det gick inte att hämta modellen',+ 'admin.addons.ai.parsing.unreachable': 'Den lokala servern går inte att nå',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Behövs oftast inte',};export default admin;diff --git a/shared/src/i18n/sv/assistant.ts b/shared/src/i18n/sv/assistant.tsindex cfa4c321e..e70db1338 100644--- a/shared/src/i18n/sv/assistant.ts+++ b/shared/src/i18n/sv/assistant.ts@@ -15,12 +15,14 @@ const assistant: TranslationStrings = {'assistant.window.deleteConfirm': 'Radera den här chatten? Det går inte att ångra.','assistant.setup.question': 'Vad vill du chatta med?','assistant.setup.beta': 'Beta', // same-as-en- 'assistant.setup.chatgptNote': 'En API-nyckel är det officiella sättet. Inloggning med ChatGPT är fortfarande i beta.',+ 'assistant.setup.chatgptNote':+ 'En API-nyckel är det officiella sättet. Inloggning med ChatGPT är fortfarande i beta.','assistant.setup.keySubtitle': 'Anthropic, OpenAI, Gemini eller OpenRouter','assistant.setup.adminOnly': 'Din administratör konfigurerar detta.','assistant.setup.forEveryone': 'Konfigurera för alla','assistant.connect.title': 'AI-assistent',- 'assistant.connect.description': 'Chatta med en assistent som känner till din resa och föreslår ändringar som du bekräftar.',+ 'assistant.connect.description':+ 'Chatta med en assistent som känner till din resa och föreslår ändringar som du bekräftar.','assistant.connect.chatgpt': 'Logga in med ChatGPT','assistant.connect.chatgptHint': 'Använder ditt ChatGPT-abonnemang. Ingen nyckel behövs.','assistant.connect.chatgptStep1': 'Logga in på ChatGPT i den nya fliken.',@@ -43,7 +45,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Skaffa en nyckel','assistant.connect.hintAnthropic': 'Claude Max och Team inkluderar API-krediter.','assistant.connect.hintOpenai': 'Skapa en nyckel i din OpenAI-översikt.',- 'assistant.connect.hintGemini': 'AI Studio har en gratisnivå med gränser per minut och per dag, där Google kan använda det du skickar för att förbättra sina produkter. Med fakturering påslagen är gränserna högre och det gäller inte.',+ 'assistant.connect.hintGemini':+ 'AI Studio har en gratisnivå med gränser per minut och per dag, där Google kan använda det du skickar för att förbättra sina produkter. Med fakturering påslagen är gränserna högre och det gäller inte.','assistant.connect.hintOpenrouter': 'Logga in med OpenRouter, ingen nyckel att kopiera.','assistant.connect.openrouter': 'Anslut OpenRouter','assistant.connect.save': 'Anslut',@@ -68,7 +71,8 @@ const assistant: TranslationStrings = {'assistant.privacy.what': 'Vad delas?','assistant.privacy.banner': 'Dina meddelanden och de resedata som assistenten läser skickas till {provider}.','assistant.privacy.ok': 'Uppfattat',- 'assistant.privacy.shared': 'Dina meddelanden och de resedetaljer som assistenten läser, som platser, dagar och bokningar.',+ 'assistant.privacy.shared':+ 'Dina meddelanden och de resedetaljer som assistenten läser, som platser, dagar och bokningar.','assistant.privacy.notShared': 'Inte ditt lösenord, dina filer eller dina andra resor.','assistant.privacy.provider': '{provider} hanterar detta enligt sina egna integritetsvillkor.','assistant.empty.title': 'Vad planerar vi?',@@ -91,7 +95,8 @@ const assistant: TranslationStrings = {'assistant.thread.scrollDown': 'Gå till det senaste meddelandet','assistant.attach.button': 'Bifoga en bokning','assistant.attach.drop': 'Släpp här så läser jag bokningen',- 'assistant.attach.unsupported': 'Den här filtypen kan jag inte läsa. Prova en pdf, ett mejl, en bild eller ett wallet-kort.',+ 'assistant.attach.unsupported':+ 'Den här filtypen kan jag inte läsa. Prova en pdf, ett mejl, en bild eller ett wallet-kort.','assistant.attach.tooLarge': 'Filen är större än 10 MB.','assistant.composer.placeholder': 'Fråga vad som helst om {trip}','assistant.composer.send': 'Skicka',@@ -335,5 +340,60 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Delat','assistant.share.failed': 'Det gick inte att dela. Försök igen om en stund.','assistant.share.chatOff': 'Resans chatt är avstängd.',+ 'assistant.connect.descriptionWithParsing':+ 'Din AI-anslutning: assistenten körs på den och den läser bokningarna du importerar.',+ 'assistant.connect.descriptionParsingOnly': 'Din AI-anslutning: den läser bokningarna du importerar.',+ 'assistant.error.emptyAnswer': 'Assistenten kom tillbaka utan svar. Ska jag försöka igen?',+ 'assistant.followUp.title': 'Fortsätt med',+ 'assistant.followUp.cheaper': 'Bara billigare',+ 'assistant.followUp.closer': 'Närmare mitt boende',+ 'assistant.followUp.openNow': 'Vad har öppet nu?',+ 'assistant.followUp.nextDay': 'Planera nästa dag på samma sätt',+ 'assistant.followUp.relaxed': 'Gör planen lugnare',+ 'assistant.followUp.dinners': 'Lägg till restauranger för kvällarna',+ 'assistant.followUp.rain': 'Om det regnar?',+ 'assistant.followUp.sun': 'Vad är värt att göra ute i fint väder?',+ 'assistant.followUp.more': 'Berätta mer',+ 'assistant.followUp.next': 'Vad föreslår du nu?',+ 'assistant.menu.alternative': 'Hitta ett alternativ',+ 'assistant.menu.alternativeAsk': 'Hitta ett bra alternativ till {place} i närheten och säg varför det passar bättre.',+ 'assistant.menu.foodNearby': 'Restaurang i närheten',+ 'assistant.menu.foodNearbyAsk': 'Föreslå några bra ställen att äta på nära {place}.',+ 'assistant.menu.planDay': 'Planera dagen',+ 'assistant.menu.planDayAsk': 'Planera den här dagen åt mig: platser, tider och ett ställe att äta på.',+ 'assistant.menu.rainPlan': 'Regnplan',+ 'assistant.menu.rainPlanAsk': 'Vad kan vi göra den här dagen om det regnar? Föreslå inomhusalternativ i närheten.',+ 'assistant.preview.title': 'Assistentens förslag',+ 'assistant.preview.suggested': 'Förslag',+ 'assistant.preview.movedHere': 'Flyttas hit',+ 'assistant.preview.removed': 'Tas bort',+ 'assistant.preview.movedAway': 'Flyttas bort',+ 'assistant.check.ok': 'Håller tidsmässigt',+ 'assistant.week.title': 'Planens dagar',+ 'assistant.week.day': 'Dag',+ 'assistant.memory.title': 'Resanteckningar',+ 'assistant.memory.edit': 'Redigera resanteckningar',+ 'assistant.memory.sub': 'Assistenten tänker på detta i varje förslag för resan.',+ 'assistant.memory.quick': 'Vanliga önskemål',+ 'assistant.memory.notes': 'Dina anteckningar',+ 'assistant.memory.placeholder': 'Till exempel: vi reser med ett litet barn, älskar gatumat, inga tidiga morgnar.',+ 'assistant.memory.saved': 'Resanteckningar sparade',+ 'assistant.memory.quick.vegetarian': 'Vi äter vegetariskt',+ 'assistant.memory.quick.kids': 'Vi reser med barn',+ 'assistant.memory.quick.budget': 'Med liten budget',+ 'assistant.memory.quick.slow': 'Lugnt tempo, ingen stress',+ 'assistant.memory.quick.accessible': 'Tillgängligt utan trappsteg',+ 'assistant.memory.quick.noMuseums': 'Få museer',+ 'assistant.settings.costEstimates': 'Uppskatta kostnader',+ 'assistant.settings.costEstimatesHint':+ 'Vid en restaurang eller biljett föreslår den en uppskattad utgift för budgeten, som ett kort du bekräftar.',+ 'assistant.change.timeline.tight': '{count} min för snävt',+ 'assistant.change.timeline.tight.one': '{count} min för snävt',+ 'assistant.check.issues': '{count} saker att kolla',+ 'assistant.check.issues.one': '{count} sak att kolla',+ 'assistant.week.changes': '{count} ändringar',+ 'assistant.week.changes.one': '{count} ändring',+ 'assistant.week.showAll': 'Visa alla {count} ändringar',+ 'assistant.week.showAll.one': 'Visa {count} ändring',};export default assistant;diff --git a/shared/src/i18n/th/admin.ts b/shared/src/i18n/th/admin.tsindex 883239e28..21e3e90b1 100644--- a/shared/src/i18n/th/admin.ts+++ b/shared/src/i18n/th/admin.ts@@ -917,5 +917,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'ลบหมวดหมู่','admin.packingTemplates.deleteCategoryConfirm': 'ลบหมวดหมู่ "{name}" และรายการทั้งหมดในหมวดนี้หรือไม่','admin.rotateJwt.button': 'หมุน',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description': 'การเชื่อมต่อเดียวสำหรับผู้ช่วยและการนำเข้าการจอง MCP ช่วยให้แอป AI อื่นใช้ TREK ได้',+ 'admin.addons.ai.setup': 'ตั้งค่า AI',+ 'admin.addons.ai.dialogSub': 'การเชื่อมต่อที่ผู้ช่วยและการวิเคราะห์ด้วย AI ใช้ร่วมกัน และสิ่งที่แต่ละอย่างทำได้',+ 'admin.addons.ai.tab.connection': 'การเชื่อมต่อ',+ 'admin.addons.ai.parsing.readsWith': 'อ่านการจองด้วย',+ 'admin.addons.ai.parsing.own': 'การเชื่อมต่อของตัวเอง',+ 'admin.addons.ai.parsing.ownHint': 'ใช้แทนการเชื่อมต่อที่ใช้ร่วมกัน',+ 'admin.addons.ai.parsing.useShared': 'ใช้การเชื่อมต่อที่ใช้ร่วมกัน',+ 'admin.addons.ai.parsing.sharedTag': 'ใช้ร่วมกัน',+ 'admin.addons.ai.parsing.perUser': 'แต่ละคนอ่านด้วยการเชื่อมต่อของตนเองจากการตั้งค่าของตน',+ 'admin.addons.ai.parsing.none':+ 'ยังไม่มีการเชื่อมต่อ ตั้งค่าหนึ่งรายการสำหรับทุกคน หรือให้การวิเคราะห์ด้วย AI มีของตัวเอง',+ 'admin.addons.ai.parsing.setupOwn': 'ใช้รายการอื่น',+ 'admin.addons.ai.parsing.installed': 'ติดตั้งบนเซิร์ฟเวอร์แล้ว',+ 'admin.addons.ai.parsing.refresh': 'รีเฟรช',+ 'admin.addons.ai.parsing.noModels': 'ยังไม่มีโมเดลที่ติดตั้ง ดาวน์โหลดได้ด้านล่าง',+ 'admin.addons.ai.parsing.pullTitle': 'ดาวน์โหลดโมเดลที่แนะนำ',+ 'admin.addons.ai.parsing.pull': 'ดาวน์โหลด',+ 'admin.addons.ai.parsing.pulling': 'กำลังดาวน์โหลด…',+ 'admin.addons.ai.parsing.use': 'ใช้',+ 'admin.addons.ai.parsing.selected': 'เลือกแล้ว',+ 'admin.addons.ai.parsing.pulled': 'ดาวน์โหลดโมเดลแล้ว',+ 'admin.addons.ai.parsing.pullFailed': 'ดาวน์โหลดโมเดลไม่สำเร็จ',+ 'admin.addons.ai.parsing.unreachable': 'เข้าถึงเซิร์ฟเวอร์ภายในไม่ได้',+ 'admin.addons.ai.parsing.apiKeyOptional': 'โดยทั่วไปไม่จำเป็น',};export default admin;diff --git a/shared/src/i18n/th/assistant.ts b/shared/src/i18n/th/assistant.tsindex 9b0176b23..c394da631 100644--- a/shared/src/i18n/th/assistant.ts+++ b/shared/src/i18n/th/assistant.ts@@ -25,7 +25,8 @@ const assistant: TranslationStrings = {'assistant.connect.chatgptHint': 'ใช้แพ็กเกจ ChatGPT ของคุณ ไม่ต้องใช้คีย์','assistant.connect.chatgptStep1': 'ลงชื่อเข้าใช้ ChatGPT ในแท็บใหม่','assistant.connect.chatgptOpen': 'เปิดหน้าลงชื่อเข้าใช้ ChatGPT',- 'assistant.connect.chatgptStep2': 'จากนั้นเบราว์เซอร์จะแสดงหน้าข้อผิดพลาด ซึ่งเป็นเรื่องปกติ คัดลอกที่อยู่ด้านบนแล้วกลับมาที่นี่',+ 'assistant.connect.chatgptStep2':+ 'จากนั้นเบราว์เซอร์จะแสดงหน้าข้อผิดพลาด ซึ่งเป็นเรื่องปกติ คัดลอกที่อยู่ด้านบนแล้วกลับมาที่นี่','assistant.connect.chatgptPaste': 'วางที่อยู่','assistant.connect.chatgptWrong': 'ที่อยู่นี้ไม่ถูกต้อง ที่อยู่ที่ถูกต้องขึ้นต้นด้วย 127.0.0.1','assistant.connect.chatgptExpired': 'ใช้เวลานานเกินไป โปรดลงชื่อเข้าใช้อีกครั้ง',@@ -42,7 +43,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'รับคีย์','assistant.connect.hintAnthropic': 'Claude Max และ Team มีเครดิต API รวมอยู่ด้วย','assistant.connect.hintOpenai': 'สร้างคีย์ในแดชบอร์ด OpenAI ของคุณ',- 'assistant.connect.hintGemini': 'AI Studio มีระดับฟรีที่มีขีดจำกัดต่อนาทีและต่อวัน ซึ่ง Google อาจใช้สิ่งที่คุณส่งเพื่อปรับปรุงผลิตภัณฑ์ เมื่อเปิดการเรียกเก็บเงิน ขีดจำกัดจะสูงขึ้นและข้อนี้ไม่มีผล',+ 'assistant.connect.hintGemini':+ 'AI Studio มีระดับฟรีที่มีขีดจำกัดต่อนาทีและต่อวัน ซึ่ง Google อาจใช้สิ่งที่คุณส่งเพื่อปรับปรุงผลิตภัณฑ์ เมื่อเปิดการเรียกเก็บเงิน ขีดจำกัดจะสูงขึ้นและข้อนี้ไม่มีผล','assistant.connect.hintOpenrouter': 'ลงชื่อเข้าใช้ด้วย OpenRouter ไม่ต้องคัดลอกคีย์','assistant.connect.openrouter': 'เชื่อมต่อ OpenRouter','assistant.connect.save': 'เชื่อมต่อ',@@ -312,5 +314,56 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'แชร์แล้ว','assistant.share.failed': 'แชร์ไม่สำเร็จ โปรดลองอีกครั้งในอีกสักครู่','assistant.share.chatOff': 'แชตทริปปิดอยู่',+ 'assistant.connect.descriptionWithParsing':+ 'การเชื่อมต่อ AI ของคุณ: ผู้ช่วยทำงานบนการเชื่อมต่อนี้ และใช้อ่านการจองที่คุณนำเข้า',+ 'assistant.connect.descriptionParsingOnly': 'การเชื่อมต่อ AI ของคุณ: ใช้อ่านการจองที่คุณนำเข้า',+ 'assistant.error.emptyAnswer': 'ผู้ช่วยไม่ได้ให้คำตอบ ลองอีกครั้งไหม',+ 'assistant.followUp.title': 'ถามต่อ',+ 'assistant.followUp.cheaper': 'เฉพาะที่ถูกกว่า',+ 'assistant.followUp.closer': 'ใกล้ที่พักมากขึ้น',+ 'assistant.followUp.openNow': 'ตอนนี้ที่ไหนเปิดอยู่?',+ 'assistant.followUp.nextDay': 'วางแผนวันถัดไปแบบเดียวกัน',+ 'assistant.followUp.relaxed': 'ทำให้แผนสบายขึ้น',+ 'assistant.followUp.dinners': 'เพิ่มร้านอาหารสำหรับมื้อเย็น',+ 'assistant.followUp.rain': 'ถ้าฝนตกล่ะ?',+ 'assistant.followUp.sun': 'อากาศดีแล้วข้างนอกมีอะไรน่าทำ?',+ 'assistant.followUp.more': 'เล่าเพิ่มอีก',+ 'assistant.followUp.next': 'แนะนำอะไรต่อดี?',+ 'assistant.menu.alternative': 'หาทางเลือกอื่น',+ 'assistant.menu.alternativeAsk': 'หาทางเลือกที่ดีแทน {place} ในละแวกนั้น และบอกว่าทำไมเหมาะกว่า',+ 'assistant.menu.foodNearby': 'ร้านอาหารใกล้ๆ',+ 'assistant.menu.foodNearbyAsk': 'แนะนำที่กินดีๆ ใกล้ {place} สักสองสามแห่ง',+ 'assistant.menu.planDay': 'วางแผนวันนี้',+ 'assistant.menu.planDayAsk': 'วางแผนวันนี้ให้ที: สถานที่ เวลา และที่กินข้าว',+ 'assistant.menu.rainPlan': 'แผนวันฝนตก',+ 'assistant.menu.rainPlanAsk': 'วันนี้ถ้าฝนตกจะทำอะไรได้บ้าง? แนะนำที่ในร่มใกล้ๆ',+ 'assistant.preview.title': 'ข้อเสนอของผู้ช่วย',+ 'assistant.preview.suggested': 'ข้อเสนอ',+ 'assistant.preview.movedHere': 'ย้ายมาที่นี่',+ 'assistant.preview.removed': 'ถูกเอาออก',+ 'assistant.preview.movedAway': 'ถูกย้าย',+ 'assistant.check.ok': 'เวลาพอดี',+ 'assistant.week.title': 'วันต่างๆ ในแผนนี้',+ 'assistant.week.day': 'วัน',+ 'assistant.memory.title': 'บันทึกทริป',+ 'assistant.memory.edit': 'แก้ไขบันทึกทริป',+ 'assistant.memory.sub': 'ผู้ช่วยจะคำนึงถึงสิ่งนี้ในทุกข้อเสนอของทริปนี้',+ 'assistant.memory.quick': 'ความต้องการที่พบบ่อย',+ 'assistant.memory.notes': 'บันทึกของคุณ',+ 'assistant.memory.placeholder': 'เช่น เดินทางกับเด็กเล็ก ชอบสตรีทฟู้ด ไม่ตื่นเช้า',+ 'assistant.memory.saved': 'บันทึกทริปแล้ว',+ 'assistant.memory.quick.vegetarian': 'เรากินมังสวิรัติ',+ 'assistant.memory.quick.kids': 'เราเดินทางกับเด็ก',+ 'assistant.memory.quick.budget': 'งบประมาณจำกัด',+ 'assistant.memory.quick.slow': 'จังหวะสบายๆ ไม่เร่งรีบ',+ 'assistant.memory.quick.accessible': 'ขอทางที่ไม่มีขั้นบันได',+ 'assistant.memory.quick.noMuseums': 'พิพิธภัณฑ์น้อยๆ',+ 'assistant.settings.costEstimates': 'ประมาณค่าใช้จ่าย',+ 'assistant.settings.costEstimatesHint':+ 'สำหรับร้านอาหารหรือตั๋ว จะเสนอค่าใช้จ่ายโดยประมาณลงงบประมาณเป็นการ์ดให้คุณยืนยัน',+ 'assistant.change.timeline.tight': 'ขาดไป {count} นาที',+ 'assistant.check.issues': 'มี {count} จุดที่ควรตรวจ',+ 'assistant.week.changes': 'การเปลี่ยนแปลง {count} รายการ',+ 'assistant.week.showAll': 'แสดงการเปลี่ยนแปลงทั้ง {count} รายการ',};export default assistant;diff --git a/shared/src/i18n/tr/admin.ts b/shared/src/i18n/tr/admin.tsindex 6df7d9ebf..20cf8543e 100644--- a/shared/src/i18n/tr/admin.ts+++ b/shared/src/i18n/tr/admin.ts@@ -977,5 +977,33 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Kategoriyi sil','admin.packingTemplates.deleteCategoryConfirm': '"{name}" kategorisi ve tüm öğeleri silinsin mi?','admin.rotateJwt.button': 'Döndür',+ 'admin.addons.ai.name': 'Yapay zekâ',+ 'admin.addons.ai.description':+ 'Asistan ve rezervasyon içe aktarma için tek bağlantı. MCP, diğer yapay zekâ uygulamalarının TREK kullanmasını sağlar.',+ 'admin.addons.ai.setup': 'Yapay zekâyı ayarla',+ 'admin.addons.ai.dialogSub':+ 'Asistanın ve yapay zekâ ayrıştırmanın paylaştığı bağlantı ve her birinin neler yapabileceği.',+ 'admin.addons.ai.tab.connection': 'Bağlantı',+ 'admin.addons.ai.parsing.readsWith': 'Rezervasyonları şununla okur',+ 'admin.addons.ai.parsing.own': 'Kendi bağlantısı',+ 'admin.addons.ai.parsing.ownHint': 'Paylaşılan bağlantının yerine kullanılır.',+ 'admin.addons.ai.parsing.useShared': 'Paylaşılan bağlantıyı kullan',+ 'admin.addons.ai.parsing.sharedTag': 'Paylaşılan',+ 'admin.addons.ai.parsing.perUser': 'Herkes kendi ayarlarındaki bağlantıyla okur.',+ 'admin.addons.ai.parsing.none':+ 'Henüz bağlantı yok. Herkes için bir tane kurun ya da yapay zekâ ayrıştırmaya kendi bağlantısını verin.',+ 'admin.addons.ai.parsing.setupOwn': 'Başka birini kullan',+ 'admin.addons.ai.parsing.installed': 'Sunucuda kurulu',+ 'admin.addons.ai.parsing.refresh': 'Yenile',+ 'admin.addons.ai.parsing.noModels': 'Henüz kurulu model yok. Aşağıdan birini indirin.',+ 'admin.addons.ai.parsing.pullTitle': 'Önerilen bir modeli indir',+ 'admin.addons.ai.parsing.pull': 'İndir',+ 'admin.addons.ai.parsing.pulling': 'İndiriliyor…',+ 'admin.addons.ai.parsing.use': 'Kullan',+ 'admin.addons.ai.parsing.selected': 'Seçildi',+ 'admin.addons.ai.parsing.pulled': 'Model indirildi',+ 'admin.addons.ai.parsing.pullFailed': 'Model indirilemedi',+ 'admin.addons.ai.parsing.unreachable': 'Yerel sunucuya ulaşılamıyor',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Çoğu zaman gerekmez',};export default admin;diff --git a/shared/src/i18n/tr/assistant.ts b/shared/src/i18n/tr/assistant.tsindex 3fb498a5e..3941bffc5 100644--- a/shared/src/i18n/tr/assistant.ts+++ b/shared/src/i18n/tr/assistant.ts@@ -43,7 +43,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Anahtar al','assistant.connect.hintAnthropic': 'Claude Max ve Team, API kredisi içerir.','assistant.connect.hintOpenai': 'OpenAI panelinde bir anahtar oluştur.',- 'assistant.connect.hintGemini': 'AI Studio’da dakika ve gün başına limitleri olan ücretsiz bir katman var; bu katmanda Google gönderdiklerini ürünlerini geliştirmek için kullanabilir. Faturalandırma açıkken limitler daha yüksektir ve bu geçerli olmaz.',+ 'assistant.connect.hintGemini':+ 'AI Studio’da dakika ve gün başına limitleri olan ücretsiz bir katman var; bu katmanda Google gönderdiklerini ürünlerini geliştirmek için kullanabilir. Faturalandırma açıkken limitler daha yüksektir ve bu geçerli olmaz.','assistant.connect.hintOpenrouter': 'OpenRouter ile giriş yap, kopyalanacak anahtar yok.','assistant.connect.openrouter': 'OpenRouter’ı bağla','assistant.connect.save': 'Bağla',@@ -338,5 +339,61 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Paylaşıldı','assistant.share.failed': 'Paylaşılamadı. Birazdan tekrar dene.','assistant.share.chatOff': 'Seyahat sohbeti kapalı.',+ 'assistant.connect.descriptionWithParsing':+ 'Yapay zekâ bağlantınız: asistan bununla çalışır ve içe aktardığınız rezervasyonları okur.',+ 'assistant.connect.descriptionParsingOnly': 'Yapay zekâ bağlantınız: içe aktardığınız rezervasyonları okur.',+ 'assistant.error.emptyAnswer': 'Asistan yanıt vermeden döndü. Tekrar deneyeyim mi?',+ 'assistant.followUp.title': 'Sonraki',+ 'assistant.followUp.cheaper': 'Yalnızca daha ucuzlar',+ 'assistant.followUp.closer': 'Konaklamama daha yakın',+ 'assistant.followUp.openNow': 'Şu an neresi açık?',+ 'assistant.followUp.nextDay': 'Sonraki günü de böyle planla',+ 'assistant.followUp.relaxed': 'Planı daha rahat yap',+ 'assistant.followUp.dinners': 'Akşamlar için restoran ekle',+ 'assistant.followUp.rain': 'Yağmur yağarsa?',+ 'assistant.followUp.sun': 'Güzel havada dışarıda ne yapmaya değer?',+ 'assistant.followUp.more': 'Daha fazla anlat',+ 'assistant.followUp.next': 'Şimdi ne önerirsin?',+ 'assistant.menu.alternative': 'Alternatif bul',+ 'assistant.menu.alternativeAsk': '{place} yerine yakında iyi bir alternatif bul ve neden daha uygun olduğunu söyle.',+ 'assistant.menu.foodNearby': 'Yakındaki restoran',+ 'assistant.menu.foodNearbyAsk': '{place} yakınında yemek için birkaç iyi yer öner.',+ 'assistant.menu.planDay': 'Bu günü planla',+ 'assistant.menu.planDayAsk': 'Bu günü benim için planla: yerler, saatler ve yemek için bir yer.',+ 'assistant.menu.rainPlan': 'Yağmur planı',+ 'assistant.menu.rainPlanAsk': 'Bu gün yağmur yağarsa ne yapabiliriz? Yakında kapalı alan alternatifleri öner.',+ 'assistant.preview.title': 'Asistanın önerileri',+ 'assistant.preview.suggested': 'Öneri',+ 'assistant.preview.movedHere': 'Buraya geliyor',+ 'assistant.preview.removed': 'Çıkarılıyor',+ 'assistant.preview.movedAway': 'Taşınıyor',+ 'assistant.check.ok': 'Zamana uyuyor',+ 'assistant.week.title': 'Bu planın günleri',+ 'assistant.week.day': 'Gün',+ 'assistant.memory.title': 'Gezi notları',+ 'assistant.memory.edit': 'Gezi notlarını düzenle',+ 'assistant.memory.sub': 'Asistan bu gezideki her öneride bunları dikkate alır.',+ 'assistant.memory.quick': 'Sık istekler',+ 'assistant.memory.notes': 'Notların',+ 'assistant.memory.placeholder':+ 'Örneğin: küçük çocukla seyahat ediyoruz, sokak lezzetlerini seviyoruz, erken kalkmak yok.',+ 'assistant.memory.saved': 'Gezi notları kaydedildi',+ 'assistant.memory.quick.vegetarian': 'Vejetaryen besleniyoruz',+ 'assistant.memory.quick.kids': 'Çocuklarla seyahat ediyoruz',+ 'assistant.memory.quick.budget': 'Kısıtlı bütçe',+ 'assistant.memory.quick.slow': 'Sakin tempo, acele yok',+ 'assistant.memory.quick.accessible': 'Lütfen basamaksız erişim',+ 'assistant.memory.quick.noMuseums': 'Az müze',+ 'assistant.settings.costEstimates': 'Masrafları tahmin et',+ 'assistant.settings.costEstimatesHint':+ 'Bir restoran ya da bilette bütçe için tahmini bir harcama önerir, onayladığın bir kart olarak.',+ 'assistant.change.timeline.tight': '{count} dk yetersiz',+ 'assistant.change.timeline.tight.one': '{count} dk yetersiz',+ 'assistant.check.issues': 'Kontrol edilecek {count} şey',+ 'assistant.check.issues.one': 'Kontrol edilecek {count} şey',+ 'assistant.week.changes': '{count} değişiklik',+ 'assistant.week.changes.one': '{count} değişiklik',+ 'assistant.week.showAll': '{count} değişikliğin tümünü göster',+ 'assistant.week.showAll.one': '{count} değişikliği göster',};export default assistant;diff --git a/shared/src/i18n/uk/admin.ts b/shared/src/i18n/uk/admin.tsindex e569bf9e7..b220aafee 100644--- a/shared/src/i18n/uk/admin.ts+++ b/shared/src/i18n/uk/admin.ts@@ -1011,5 +1011,31 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Видалити категорію','admin.packingTemplates.deleteCategoryConfirm': 'Видалити категорію "{name}" і всі її пункти?','admin.rotateJwt.button': 'Оновити',+ 'admin.addons.ai.name': 'ШІ',+ 'admin.addons.ai.description':+ 'Одне підключення для асистента й імпорту бронювань. MCP дає іншим ШІ-застосункам працювати з TREK.',+ 'admin.addons.ai.setup': 'Налаштувати ШІ',+ 'admin.addons.ai.dialogSub': 'Підключення, спільне для асистента й ШІ-розбору, і що може кожен із них.',+ 'admin.addons.ai.tab.connection': 'Підключення',+ 'admin.addons.ai.parsing.readsWith': 'Читає бронювання через',+ 'admin.addons.ai.parsing.own': 'Власне підключення',+ 'admin.addons.ai.parsing.ownHint': 'Використовується замість спільного підключення.',+ 'admin.addons.ai.parsing.useShared': 'Використати спільне підключення',+ 'admin.addons.ai.parsing.sharedTag': 'Спільне',+ 'admin.addons.ai.parsing.perUser': 'Кожен читає через власне підключення зі своїх налаштувань.',+ 'admin.addons.ai.parsing.none': 'Підключення ще немає. Налаштуйте одне для всіх або дайте ШІ-розбору власне.',+ 'admin.addons.ai.parsing.setupOwn': 'Використати інше',+ 'admin.addons.ai.parsing.installed': 'Встановлені на сервері',+ 'admin.addons.ai.parsing.refresh': 'Оновити',+ 'admin.addons.ai.parsing.noModels': 'Моделей ще немає. Завантажте одну нижче.',+ 'admin.addons.ai.parsing.pullTitle': 'Завантажити рекомендовану модель',+ 'admin.addons.ai.parsing.pull': 'Завантажити',+ 'admin.addons.ai.parsing.pulling': 'Завантаження…',+ 'admin.addons.ai.parsing.use': 'Використати',+ 'admin.addons.ai.parsing.selected': 'Вибрано',+ 'admin.addons.ai.parsing.pulled': 'Модель завантажено',+ 'admin.addons.ai.parsing.pullFailed': 'Не вдалося завантажити модель',+ 'admin.addons.ai.parsing.unreachable': 'Локальний сервер недоступний',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Зазвичай не потрібен',};export default admin;diff --git a/shared/src/i18n/uk/assistant.ts b/shared/src/i18n/uk/assistant.tsindex 34533fdac..8bcf237b7 100644--- a/shared/src/i18n/uk/assistant.ts+++ b/shared/src/i18n/uk/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Отримати ключ','assistant.connect.hintAnthropic': 'Claude Max і Team містять кредити API.','assistant.connect.hintOpenai': 'Створіть ключ у панелі керування OpenAI.',- 'assistant.connect.hintGemini': 'В AI Studio є безкоштовний рівень з лімітами на хвилину і на день, на якому Google може використовувати те, що ти надсилаєш, для покращення своїх продуктів. З увімкненою оплатою ліміти вищі, і це не діє.',+ 'assistant.connect.hintGemini':+ 'В AI Studio є безкоштовний рівень з лімітами на хвилину і на день, на якому Google може використовувати те, що ти надсилаєш, для покращення своїх продуктів. З увімкненою оплатою ліміти вищі, і це не діє.','assistant.connect.hintOpenrouter': 'Увійдіть через OpenRouter, копіювати ключ не треба.','assistant.connect.openrouter': 'Підключити OpenRouter','assistant.connect.save': 'Підключити',@@ -379,5 +380,68 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Надіслано','assistant.share.failed': 'Не вдалося поділитися. Спробуйте ще раз трохи згодом.','assistant.share.chatOff': 'Чат подорожі вимкнено.',+ 'assistant.connect.descriptionWithParsing':+ 'Ваше ШІ-підключення: на ньому працює асистент, і воно читає імпортовані бронювання.',+ 'assistant.connect.descriptionParsingOnly': 'Ваше ШІ-підключення: воно читає імпортовані бронювання.',+ 'assistant.error.emptyAnswer': 'Асистент повернувся без відповіді. Спробувати ще раз?',+ 'assistant.followUp.title': 'Далі',+ 'assistant.followUp.cheaper': 'Лише дешевші',+ 'assistant.followUp.closer': 'Ближче до мого житла',+ 'assistant.followUp.openNow': 'Що зараз відчинено?',+ 'assistant.followUp.nextDay': 'Сплануй наступний день так само',+ 'assistant.followUp.relaxed': 'Зроби план спокійнішим',+ 'assistant.followUp.dinners': 'Додай ресторани на вечори',+ 'assistant.followUp.rain': 'А якщо буде дощ?',+ 'assistant.followUp.sun': 'Що варто робити надворі в гарну погоду?',+ 'assistant.followUp.more': 'Розкажи більше',+ 'assistant.followUp.next': 'Що запропонуєш далі?',+ 'assistant.menu.alternative': 'Знайти альтернативу',+ 'assistant.menu.alternativeAsk': 'Знайди гарну альтернативу {place} поблизу й поясни, чому вона краще підходить.',+ 'assistant.menu.foodNearby': 'Ресторан поруч',+ 'assistant.menu.foodNearbyAsk': 'Запропонуй кілька гарних місць, де поїсти біля {place}.',+ 'assistant.menu.planDay': 'Спланувати день',+ 'assistant.menu.planDayAsk': 'Сплануй для мене цей день: місця, час і де поїсти.',+ 'assistant.menu.rainPlan': 'План на дощ',+ 'assistant.menu.rainPlanAsk': 'Що можна робити цього дня, якщо буде дощ? Запропонуй варіанти в приміщенні поблизу.',+ 'assistant.preview.title': 'Пропозиції асистента',+ 'assistant.preview.suggested': 'Пропозиція',+ 'assistant.preview.movedHere': 'Переходить сюди',+ 'assistant.preview.removed': 'Прибирається',+ 'assistant.preview.movedAway': 'Переноситься',+ 'assistant.check.ok': 'Вкладається в час',+ 'assistant.week.title': 'Дні цього плану',+ 'assistant.week.day': 'День',+ 'assistant.memory.title': 'Нотатки до подорожі',+ 'assistant.memory.edit': 'Змінити нотатки до подорожі',+ 'assistant.memory.sub': 'Асистент враховує їх у кожній пропозиції для цієї подорожі.',+ 'assistant.memory.quick': 'Часті побажання',+ 'assistant.memory.notes': 'Ваші нотатки',+ 'assistant.memory.placeholder': 'Наприклад: їдемо з малюком, любимо вуличну їжу, без ранніх підйомів.',+ 'assistant.memory.saved': 'Нотатки збережено',+ 'assistant.memory.quick.vegetarian': 'Ми вегетаріанці',+ 'assistant.memory.quick.kids': 'Подорожуємо з дітьми',+ 'assistant.memory.quick.budget': 'З невеликим бюджетом',+ 'assistant.memory.quick.slow': 'Спокійний темп, без поспіху',+ 'assistant.memory.quick.accessible': 'Без сходинок, будь ласка',+ 'assistant.memory.quick.noMuseums': 'Мало музеїв',+ 'assistant.settings.costEstimates': 'Оцінювати витрати',+ 'assistant.settings.costEstimatesHint':+ 'Для ресторану чи квитка пропонує орієнтовну витрату в бюджет, карткою для підтвердження.',+ 'assistant.change.timeline.tight': 'Бракує {count} хв',+ 'assistant.change.timeline.tight.one': 'Бракує {count} хв',+ 'assistant.change.timeline.tight.few': 'Бракує {count} хв',+ 'assistant.change.timeline.tight.many': 'Бракує {count} хв',+ 'assistant.check.issues': '{count} пункту на перевірку',+ 'assistant.check.issues.one': '{count} пункт на перевірку',+ 'assistant.check.issues.few': '{count} пункти на перевірку',+ 'assistant.check.issues.many': '{count} пунктів на перевірку',+ 'assistant.week.changes': '{count} зміни',+ 'assistant.week.changes.one': '{count} зміна',+ 'assistant.week.changes.few': '{count} зміни',+ 'assistant.week.changes.many': '{count} змін',+ 'assistant.week.showAll': 'Показати всі {count} зміни',+ 'assistant.week.showAll.one': 'Показати {count} зміну',+ 'assistant.week.showAll.few': 'Показати всі {count} зміни',+ 'assistant.week.showAll.many': 'Показати всі {count} змін',};export default assistant;diff --git a/shared/src/i18n/vi/admin.ts b/shared/src/i18n/vi/admin.tsindex d40eafcc4..271a5b8b4 100644--- a/shared/src/i18n/vi/admin.ts+++ b/shared/src/i18n/vi/admin.ts@@ -954,5 +954,32 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': 'Xóa danh mục','admin.packingTemplates.deleteCategoryConfirm': 'Xóa danh mục "{name}" và tất cả mục trong đó?','admin.rotateJwt.button': 'Quay',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description':+ 'Một kết nối cho trợ lý và việc nhập đặt chỗ. MCP cho phép các ứng dụng AI khác dùng TREK.',+ 'admin.addons.ai.setup': 'Thiết lập AI',+ 'admin.addons.ai.dialogSub': 'Kết nối mà trợ lý và phân tích bằng AI dùng chung, và những gì mỗi bên được làm.',+ 'admin.addons.ai.tab.connection': 'Kết nối',+ 'admin.addons.ai.parsing.readsWith': 'Đọc đặt chỗ bằng',+ 'admin.addons.ai.parsing.own': 'Kết nối riêng',+ 'admin.addons.ai.parsing.ownHint': 'Được dùng thay cho kết nối dùng chung.',+ 'admin.addons.ai.parsing.useShared': 'Dùng kết nối dùng chung',+ 'admin.addons.ai.parsing.sharedTag': 'Dùng chung',+ 'admin.addons.ai.parsing.perUser': 'Mỗi người đọc bằng kết nối riêng trong phần cài đặt của mình.',+ 'admin.addons.ai.parsing.none':+ 'Chưa có kết nối. Thiết lập một kết nối cho mọi người, hoặc cho phân tích bằng AI một kết nối riêng.',+ 'admin.addons.ai.parsing.setupOwn': 'Dùng kết nối khác',+ 'admin.addons.ai.parsing.installed': 'Đã cài trên máy chủ',+ 'admin.addons.ai.parsing.refresh': 'Làm mới',+ 'admin.addons.ai.parsing.noModels': 'Chưa có mô hình nào. Tải một mô hình bên dưới.',+ 'admin.addons.ai.parsing.pullTitle': 'Tải mô hình được đề xuất',+ 'admin.addons.ai.parsing.pull': 'Tải',+ 'admin.addons.ai.parsing.pulling': 'Đang tải…',+ 'admin.addons.ai.parsing.use': 'Dùng',+ 'admin.addons.ai.parsing.selected': 'Đã chọn',+ 'admin.addons.ai.parsing.pulled': 'Đã tải mô hình',+ 'admin.addons.ai.parsing.pullFailed': 'Không thể tải mô hình',+ 'admin.addons.ai.parsing.unreachable': 'Không kết nối được máy chủ cục bộ',+ 'admin.addons.ai.parsing.apiKeyOptional': 'Thường không cần',};export default admin;diff --git a/shared/src/i18n/vi/assistant.ts b/shared/src/i18n/vi/assistant.tsindex 68fb147c2..a445307bc 100644--- a/shared/src/i18n/vi/assistant.ts+++ b/shared/src/i18n/vi/assistant.ts@@ -44,7 +44,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': 'Lấy khóa','assistant.connect.hintAnthropic': 'Claude Max và Team có kèm tín dụng API.','assistant.connect.hintOpenai': 'Tạo khóa trong bảng điều khiển OpenAI của bạn.',- 'assistant.connect.hintGemini': 'AI Studio có gói miễn phí với giới hạn theo phút và theo ngày, trong đó Google có thể dùng nội dung bạn gửi để cải thiện sản phẩm. Khi bật thanh toán, giới hạn cao hơn và điều này không áp dụng.',+ 'assistant.connect.hintGemini':+ 'AI Studio có gói miễn phí với giới hạn theo phút và theo ngày, trong đó Google có thể dùng nội dung bạn gửi để cải thiện sản phẩm. Khi bật thanh toán, giới hạn cao hơn và điều này không áp dụng.','assistant.connect.hintOpenrouter': 'Đăng nhập bằng OpenRouter, không cần sao chép khóa.','assistant.connect.openrouter': 'Kết nối OpenRouter','assistant.connect.save': 'Kết nối',@@ -316,5 +317,56 @@ const assistant: TranslationStrings = {'assistant.share.shared': 'Đã chia sẻ','assistant.share.failed': 'Không chia sẻ được. Hãy thử lại sau giây lát.','assistant.share.chatOff': 'Trò chuyện của chuyến đi đang tắt.',+ 'assistant.connect.descriptionWithParsing':+ 'Kết nối AI của bạn: trợ lý chạy trên kết nối này và nó đọc các đặt chỗ bạn nhập.',+ 'assistant.connect.descriptionParsingOnly': 'Kết nối AI của bạn: nó đọc các đặt chỗ bạn nhập.',+ 'assistant.error.emptyAnswer': 'Trợ lý không trả lời. Thử lại nhé?',+ 'assistant.followUp.title': 'Hỏi tiếp',+ 'assistant.followUp.cheaper': 'Chỉ chỗ rẻ hơn',+ 'assistant.followUp.closer': 'Gần chỗ ở hơn',+ 'assistant.followUp.openNow': 'Chỗ nào đang mở cửa?',+ 'assistant.followUp.nextDay': 'Lên kế hoạch ngày tiếp theo theo cách tương tự',+ 'assistant.followUp.relaxed': 'Làm kế hoạch thong thả hơn',+ 'assistant.followUp.dinners': 'Thêm nhà hàng cho các buổi tối',+ 'assistant.followUp.rain': 'Nếu trời mưa thì sao?',+ 'assistant.followUp.sun': 'Trời đẹp thì ngoài trời có gì đáng làm?',+ 'assistant.followUp.more': 'Kể thêm cho tôi',+ 'assistant.followUp.next': 'Tiếp theo bạn gợi ý gì?',+ 'assistant.menu.alternative': 'Tìm lựa chọn khác',+ 'assistant.menu.alternativeAsk': 'Tìm một lựa chọn tốt thay cho {place} ở gần đó và cho biết vì sao hợp hơn.',+ 'assistant.menu.foodNearby': 'Nhà hàng gần đây',+ 'assistant.menu.foodNearbyAsk': 'Gợi ý vài chỗ ăn ngon gần {place}.',+ 'assistant.menu.planDay': 'Lên kế hoạch ngày này',+ 'assistant.menu.planDayAsk': 'Lên kế hoạch ngày này cho tôi: địa điểm, giờ giấc và chỗ ăn.',+ 'assistant.menu.rainPlan': 'Kế hoạch khi mưa',+ 'assistant.menu.rainPlanAsk': 'Ngày này nếu mưa thì làm gì? Gợi ý lựa chọn trong nhà ở gần.',+ 'assistant.preview.title': 'Đề xuất của trợ lý',+ 'assistant.preview.suggested': 'Đề xuất',+ 'assistant.preview.movedHere': 'Chuyển đến đây',+ 'assistant.preview.removed': 'Bị bỏ',+ 'assistant.preview.movedAway': 'Được chuyển đi',+ 'assistant.check.ok': 'Vừa thời gian',+ 'assistant.week.title': 'Các ngày của kế hoạch này',+ 'assistant.week.day': 'Ngày',+ 'assistant.memory.title': 'Ghi chú chuyến đi',+ 'assistant.memory.edit': 'Sửa ghi chú chuyến đi',+ 'assistant.memory.sub': 'Trợ lý sẽ lưu ý điều này trong mọi đề xuất cho chuyến đi.',+ 'assistant.memory.quick': 'Mong muốn phổ biến',+ 'assistant.memory.notes': 'Ghi chú của bạn',+ 'assistant.memory.placeholder': 'Ví dụ: đi cùng bé nhỏ, thích đồ ăn đường phố, không dậy sớm.',+ 'assistant.memory.saved': 'Đã lưu ghi chú',+ 'assistant.memory.quick.vegetarian': 'Chúng tôi ăn chay',+ 'assistant.memory.quick.kids': 'Chúng tôi đi cùng trẻ em',+ 'assistant.memory.quick.budget': 'Ngân sách eo hẹp',+ 'assistant.memory.quick.slow': 'Nhịp độ thong thả, không vội',+ 'assistant.memory.quick.accessible': 'Lối đi không bậc thang',+ 'assistant.memory.quick.noMuseums': 'Ít bảo tàng',+ 'assistant.settings.costEstimates': 'Ước tính chi phí',+ 'assistant.settings.costEstimatesHint':+ 'Với nhà hàng hoặc vé, trợ lý đề xuất khoản chi ước tính cho ngân sách dưới dạng thẻ để bạn xác nhận.',+ 'assistant.change.timeline.tight': 'Thiếu {count} phút',+ 'assistant.check.issues': '{count} điểm cần xem',+ 'assistant.week.changes': '{count} thay đổi',+ 'assistant.week.showAll': 'Hiện tất cả {count} thay đổi',};export default assistant;diff --git a/shared/src/i18n/zh-TW/admin.ts b/shared/src/i18n/zh-TW/admin.tsindex 7bebe71ba..1069ca6e8 100644--- a/shared/src/i18n/zh-TW/admin.ts+++ b/shared/src/i18n/zh-TW/admin.ts@@ -871,5 +871,30 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': '刪除類別','admin.packingTemplates.deleteCategoryConfirm': '要刪除類別「{name}」及其所有項目嗎?','admin.rotateJwt.button': '輪換',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description': '助理和預訂匯入共用一個連線。MCP 讓其他 AI 應用程式也能使用 TREK。',+ 'admin.addons.ai.setup': '設定 AI',+ 'admin.addons.ai.dialogSub': '助理和 AI 解析共用的連線,以及各自可以做什麼。',+ 'admin.addons.ai.tab.connection': '連線',+ 'admin.addons.ai.parsing.readsWith': '讀取預訂所用的連線',+ 'admin.addons.ai.parsing.own': '專用連線',+ 'admin.addons.ai.parsing.ownHint': '代替共享連線使用。',+ 'admin.addons.ai.parsing.useShared': '使用共享連線',+ 'admin.addons.ai.parsing.sharedTag': '共享',+ 'admin.addons.ai.parsing.perUser': '每個人使用自己設定中的連線讀取。',+ 'admin.addons.ai.parsing.none': '還沒有連線。為所有人設定一個,或為 AI 解析另外設定一個。',+ 'admin.addons.ai.parsing.setupOwn': '使用其他連線',+ 'admin.addons.ai.parsing.installed': '已安裝在伺服器上',+ 'admin.addons.ai.parsing.refresh': '重新整理',+ 'admin.addons.ai.parsing.noModels': '還沒有安裝模型。在下方取得一個。',+ 'admin.addons.ai.parsing.pullTitle': '取得推薦模型',+ 'admin.addons.ai.parsing.pull': '取得',+ 'admin.addons.ai.parsing.pulling': '正在取得…',+ 'admin.addons.ai.parsing.use': '使用',+ 'admin.addons.ai.parsing.selected': '已選取',+ 'admin.addons.ai.parsing.pulled': '模型已取得',+ 'admin.addons.ai.parsing.pullFailed': '無法取得模型',+ 'admin.addons.ai.parsing.unreachable': '無法連線到本機伺服器',+ 'admin.addons.ai.parsing.apiKeyOptional': '通常不需要',};export default admin;diff --git a/shared/src/i18n/zh-TW/assistant.ts b/shared/src/i18n/zh-TW/assistant.tsindex fe4b19a9b..93be52db3 100644--- a/shared/src/i18n/zh-TW/assistant.ts+++ b/shared/src/i18n/zh-TW/assistant.ts@@ -42,7 +42,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': '取得金鑰','assistant.connect.hintAnthropic': 'Claude Max 和 Team 包含 API 額度。','assistant.connect.hintOpenai': '在你的 OpenAI 主控台建立金鑰。',- 'assistant.connect.hintGemini': 'AI Studio 提供每分鐘和每天有限額的免費方案,在該方案下 Google 可能會使用你傳送的內容來改進其產品。開啟計費後限額更高,且不適用此項。',+ 'assistant.connect.hintGemini':+ 'AI Studio 提供每分鐘和每天有限額的免費方案,在該方案下 Google 可能會使用你傳送的內容來改進其產品。開啟計費後限額更高,且不適用此項。','assistant.connect.hintOpenrouter': '使用 OpenRouter 登入,不必複製金鑰。','assistant.connect.openrouter': '連結 OpenRouter','assistant.connect.save': '連結',@@ -312,5 +313,54 @@ const assistant: TranslationStrings = {'assistant.share.shared': '已分享','assistant.share.failed': '分享失敗,請稍後再試。','assistant.share.chatOff': '行程聊天室已關閉。',+ 'assistant.connect.descriptionWithParsing': '你的 AI 連線:助理透過它運作,它也讀取你匯入的預訂。',+ 'assistant.connect.descriptionParsingOnly': '你的 AI 連線:它讀取你匯入的預訂。',+ 'assistant.error.emptyAnswer': '助理沒有給出回答。要再試一次嗎?',+ 'assistant.followUp.title': '繼續問',+ 'assistant.followUp.cheaper': '只要更便宜的',+ 'assistant.followUp.closer': '離住處更近',+ 'assistant.followUp.openNow': '現在哪些有營業?',+ 'assistant.followUp.nextDay': '用同樣方式規劃下一天',+ 'assistant.followUp.relaxed': '讓行程更輕鬆',+ 'assistant.followUp.dinners': '為晚上加入餐廳',+ 'assistant.followUp.rain': '下雨怎麼辦?',+ 'assistant.followUp.sun': '天氣好時戶外有什麼值得做?',+ 'assistant.followUp.more': '再多說一些',+ 'assistant.followUp.next': '接下來你建議什麼?',+ 'assistant.menu.alternative': '找替代',+ 'assistant.menu.alternativeAsk': '在附近為 {place} 找一個好的替代,並說明為什麼更合適。',+ 'assistant.menu.foodNearby': '附近餐廳',+ 'assistant.menu.foodNearbyAsk': '推薦幾家 {place} 附近不錯的用餐地點。',+ 'assistant.menu.planDay': '規劃這一天',+ 'assistant.menu.planDayAsk': '幫我規劃這一天:地點、時間和吃飯的地方。',+ 'assistant.menu.rainPlan': '雨天方案',+ 'assistant.menu.rainPlanAsk': '這一天如果下雨可以做什麼?推薦附近的室內選擇。',+ 'assistant.preview.title': '助理的建議',+ 'assistant.preview.suggested': '建議',+ 'assistant.preview.movedHere': '移到這裡',+ 'assistant.preview.removed': '移除',+ 'assistant.preview.movedAway': '移走',+ 'assistant.check.ok': '時間來得及',+ 'assistant.week.title': '此計畫的日期',+ 'assistant.week.day': '天',+ 'assistant.memory.title': '行程備忘',+ 'assistant.memory.edit': '編輯行程備忘',+ 'assistant.memory.sub': '助理會在此行程的每個建議中考慮這些。',+ 'assistant.memory.quick': '常見需求',+ 'assistant.memory.notes': '你的備忘',+ 'assistant.memory.placeholder': '例如:帶著幼兒出行,喜歡街頭小吃,不早起。',+ 'assistant.memory.saved': '行程備忘已儲存',+ 'assistant.memory.quick.vegetarian': '我們吃素',+ 'assistant.memory.quick.kids': '我們帶孩子出行',+ 'assistant.memory.quick.budget': '預算有限',+ 'assistant.memory.quick.slow': '節奏輕鬆,不趕路',+ 'assistant.memory.quick.accessible': '請選擇無階梯通道',+ 'assistant.memory.quick.noMuseums': '少去博物館',+ 'assistant.settings.costEstimates': '估算費用',+ 'assistant.settings.costEstimatesHint': '遇到餐廳或門票時,會以待確認卡片的形式為預算建議一筆估算支出。',+ 'assistant.change.timeline.tight': '時間差 {count} 分鐘',+ 'assistant.check.issues': '{count} 處需要注意',+ 'assistant.week.changes': '{count} 項變更',+ 'assistant.week.showAll': '顯示全部 {count} 項變更',};export default assistant;diff --git a/shared/src/i18n/zh/admin.ts b/shared/src/i18n/zh/admin.tsindex 4c74129b7..806ae1999 100644--- a/shared/src/i18n/zh/admin.ts+++ b/shared/src/i18n/zh/admin.ts@@ -869,5 +869,30 @@ const admin: TranslationStrings = {'admin.packingTemplates.deleteCategoryTitle': '删除类别','admin.packingTemplates.deleteCategoryConfirm': '要删除类别“{name}”及其所有物品吗?','admin.rotateJwt.button': '轮换',+ 'admin.addons.ai.name': 'AI', // same-as-en+ 'admin.addons.ai.description': '助手和预订导入共用一个连接。MCP 让其他 AI 应用也能使用 TREK。',+ 'admin.addons.ai.setup': '设置 AI',+ 'admin.addons.ai.dialogSub': '助手和 AI 解析共用的连接,以及各自可以做什么。',+ 'admin.addons.ai.tab.connection': '连接',+ 'admin.addons.ai.parsing.readsWith': '读取预订所用的连接',+ 'admin.addons.ai.parsing.own': '专用连接',+ 'admin.addons.ai.parsing.ownHint': '代替共享连接使用。',+ 'admin.addons.ai.parsing.useShared': '使用共享连接',+ 'admin.addons.ai.parsing.sharedTag': '共享',+ 'admin.addons.ai.parsing.perUser': '每个人使用自己设置中的连接读取。',+ 'admin.addons.ai.parsing.none': '还没有连接。为所有人设置一个,或为 AI 解析单独设置一个。',+ 'admin.addons.ai.parsing.setupOwn': '使用其他连接',+ 'admin.addons.ai.parsing.installed': '已安装在服务器上',+ 'admin.addons.ai.parsing.refresh': '刷新',+ 'admin.addons.ai.parsing.noModels': '还没有安装模型。在下方获取一个。',+ 'admin.addons.ai.parsing.pullTitle': '获取推荐模型',+ 'admin.addons.ai.parsing.pull': '获取',+ 'admin.addons.ai.parsing.pulling': '正在获取…',+ 'admin.addons.ai.parsing.use': '使用',+ 'admin.addons.ai.parsing.selected': '已选择',+ 'admin.addons.ai.parsing.pulled': '模型已获取',+ 'admin.addons.ai.parsing.pullFailed': '无法获取模型',+ 'admin.addons.ai.parsing.unreachable': '无法连接本地服务器',+ 'admin.addons.ai.parsing.apiKeyOptional': '通常不需要',};export default admin;diff --git a/shared/src/i18n/zh/assistant.ts b/shared/src/i18n/zh/assistant.tsindex 2764b1e9f..5e48f3351 100644--- a/shared/src/i18n/zh/assistant.ts+++ b/shared/src/i18n/zh/assistant.ts@@ -42,7 +42,8 @@ const assistant: TranslationStrings = {'assistant.connect.getKey': '获取密钥','assistant.connect.hintAnthropic': 'Claude Max 和 Team 包含 API 额度。','assistant.connect.hintOpenai': '在你的 OpenAI 控制台中创建密钥。',- 'assistant.connect.hintGemini': 'AI Studio 提供每分钟和每天有限额的免费层级,在该层级下 Google 可能会使用你发送的内容来改进其产品。开启结算后限额更高,且不适用此条。',+ 'assistant.connect.hintGemini':+ 'AI Studio 提供每分钟和每天有限额的免费层级,在该层级下 Google 可能会使用你发送的内容来改进其产品。开启结算后限额更高,且不适用此条。','assistant.connect.hintOpenrouter': '使用 OpenRouter 登录,无需复制密钥。','assistant.connect.openrouter': '连接 OpenRouter','assistant.connect.save': '连接',@@ -312,5 +313,54 @@ const assistant: TranslationStrings = {'assistant.share.shared': '已分享','assistant.share.failed': '分享失败,请稍后再试。','assistant.share.chatOff': '行程聊天已关闭。',+ 'assistant.connect.descriptionWithParsing': '你的 AI 连接:助手通过它运行,它也读取你导入的预订。',+ 'assistant.connect.descriptionParsingOnly': '你的 AI 连接:它读取你导入的预订。',+ 'assistant.error.emptyAnswer': '助手没有给出回答。要再试一次吗?',+ 'assistant.followUp.title': '继续问',+ 'assistant.followUp.cheaper': '只要更便宜的',+ 'assistant.followUp.closer': '离住处更近',+ 'assistant.followUp.openNow': '现在哪些在营业?',+ 'assistant.followUp.nextDay': '按同样方式规划下一天',+ 'assistant.followUp.relaxed': '让行程更轻松',+ 'assistant.followUp.dinners': '为晚上添加餐厅',+ 'assistant.followUp.rain': '下雨怎么办?',+ 'assistant.followUp.sun': '天气好时户外有什么值得做?',+ 'assistant.followUp.more': '再多说一些',+ 'assistant.followUp.next': '接下来你建议什么?',+ 'assistant.menu.alternative': '找替代',+ 'assistant.menu.alternativeAsk': '在附近为 {place} 找一个好的替代,并说明为什么更合适。',+ 'assistant.menu.foodNearby': '附近餐厅',+ 'assistant.menu.foodNearbyAsk': '推荐几家 {place} 附近不错的用餐地点。',+ 'assistant.menu.planDay': '规划这一天',+ 'assistant.menu.planDayAsk': '帮我规划这一天:地点、时间和吃饭的地方。',+ 'assistant.menu.rainPlan': '雨天方案',+ 'assistant.menu.rainPlanAsk': '这一天如果下雨可以做什么?推荐附近的室内选择。',+ 'assistant.preview.title': '助手的建议',+ 'assistant.preview.suggested': '建议',+ 'assistant.preview.movedHere': '移到这里',+ 'assistant.preview.removed': '移除',+ 'assistant.preview.movedAway': '移走',+ 'assistant.check.ok': '时间来得及',+ 'assistant.week.title': '此计划的日期',+ 'assistant.week.day': '天',+ 'assistant.memory.title': '行程备忘',+ 'assistant.memory.edit': '编辑行程备忘',+ 'assistant.memory.sub': '助手会在此行程的每个建议中考虑这些。',+ 'assistant.memory.quick': '常见需求',+ 'assistant.memory.notes': '你的备忘',+ 'assistant.memory.placeholder': '例如:带着幼儿出行,喜欢街头小吃,不早起。',+ 'assistant.memory.saved': '行程备忘已保存',+ 'assistant.memory.quick.vegetarian': '我们吃素',+ 'assistant.memory.quick.kids': '我们带孩子出行',+ 'assistant.memory.quick.budget': '预算有限',+ 'assistant.memory.quick.slow': '节奏轻松,不赶路',+ 'assistant.memory.quick.accessible': '请选择无台阶通道',+ 'assistant.memory.quick.noMuseums': '少去博物馆',+ 'assistant.settings.costEstimates': '估算费用',+ 'assistant.settings.costEstimatesHint': '遇到餐厅或门票时,会以待确认卡片的形式为预算建议一笔估算支出。',+ 'assistant.change.timeline.tight': '时间差 {count} 分钟',+ 'assistant.check.issues': '{count} 处需要注意',+ 'assistant.week.changes': '{count} 项更改',+ 'assistant.week.showAll': '显示全部 {count} 项更改',};export default assistant;