@micha.bigler/ui-core-micha 4.23.0 → 4.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.25.0 - UCM-CHAT-12
4
+
5
+ Visible change in every app: the chat model picker is a compact panel. Title "Modell"; a flat model list without
6
+ quality groups or hints; one line per model with one short muted cost value ("Abo", "≈ 2–6k Token" or the cost dots);
7
+ no provider line and no per-answer average cost; effort "Aufwand" with Low · Medium · High · Max in every language and
8
+ no hint sentence; the balance caption stays. The long-conversation alert is no longer inside the picker (the
9
+ composer's notice is unchanged). The panel is a ~300 px popover on wide viewports and a bottom sheet only below `md`,
10
+ whatever the chat container's width: `ChatWorkspace` no longer passes `sheet`, and `ModelPicker`'s `longChat` /
11
+ `onNewChat` props are gone (the explicit `sheet` prop is removed as well). The trigger label and thread captions keep their
12
+ localised effort names. New keys `Chat.subscriptionShort`, `Chat.estimateTokensShort`; `Chat.pickerTitle` shortened;
13
+ removed `Chat.level.*`, `Chat.levelHint.*`, `Chat.by`, `Chat.effortQuestion`, `Chat.effortHint(Tokens)`,
14
+ `Chat.noTokenSubscription`, `Chat.estimateTokens`, `Chat.estimatePerAnswer`.
15
+
16
+ ## 4.24.0 - UCM-CHAT-11
17
+
18
+ Visible change in every app: the chat thread no longer shows the "N earlier messages left out" chip. The server
19
+ still trims the history and still sends the `history_trimmed` notice; `ChatWorkspace` ignores it. Removed with it:
20
+ the `ChatThread` prop `trimmedCount` (an old caller passing it sees no effect), the export `CHAT_THREAD_TRIMMED_SX`,
21
+ the public kit-sx registry entry `ChatThread.trimmed` in `CHAT_KIT_SX_REGISTRY`, `CHAT_NOTICE_CODES`, and the keys
22
+ `Chat.historyTrimmed_one` / `_other`. No consuming app (maana, cockpit, hram, survey_app) referenced any of them.
23
+
3
24
  ## 4.23.0 - UCM-CHAT-10
4
25
 
5
26
  `ChatWorkspace` (and `ChatThread`) accept an optional `renderTurnError({ turn, chat, retry })`. For a failed or
package/README.md CHANGED
@@ -203,7 +203,8 @@ Since 4.22.0, with django-core-micha's DCM-CHAT-16 data:
203
203
  - `ChatWorkspace` shows the per-user period limit (`GET <apiBase>limit/`) as a meter in the composer and disables the
204
204
  composer at the limit with the reset date. Without a limit, or against an older backend, the composer is unchanged.
205
205
  - Answers show their stored tool steps after reload.
206
- - The model picker adds "≈ <cost> USD per answer" when the catalogue sends `average_cost_usd_micros`.
206
+ - Since 4.25.0 (UCM-CHAT-12) the compact model picker no longer shows `average_cost_usd_micros`; each model shows one
207
+ short cost value ("Abo", a token range or the cost dots).
207
208
  - Links in answers are clickable. Pass `onNavigate={(path) => navigate(path)}` to route same-origin links through the
208
209
  app's router, which keeps the chat panel open. External http(s) links open in a new tab, and other schemes stay text.
209
210
  `MarkdownReply` takes the same `onNavigate`.
@@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next';
5
5
  import MarkdownReply from './MarkdownReply';
6
6
  export const CHAT_THREAD_TOOL_CHIP_SX = { alignSelf: 'flex-start' };
7
7
  export const CHAT_THREAD_NOTICE_SX = { mb: 2 };
8
- export const CHAT_THREAD_TRIMMED_SX = { mb: 1.5 };
9
8
  export const CHAT_THREAD_TOOL_STEPS_SX = { alignItems: 'flex-start' };
10
9
  const selectionLine = (turn, t) => [turn.model, turn.effort && t(`Chat.effort.${turn.effort}`)].filter(Boolean).join(' · ');
11
10
  const sameSelection = (a, b) => a.driver === b.driver && a.model === b.model && a.effort === b.effort;
@@ -39,7 +38,7 @@ function Answer({ turn, tool, onRetry, chat, renderAnswerExtra, renderTurnError,
39
38
  * The turns of one chat. The streaming answer is simply the last turn in state `generating`; the caller keeps its text
40
39
  * up to date. `notice` is a connection or limit message shown under the last turn. `readOnly` (an archived chat) hides Retry.
41
40
  */
42
- export function ChatThread({ turns = [], tool = null, notice = null, hasOlder = false, olderBusy = false, onLoadOlder, onRetry, readOnly = false, sx, chat, renderAnswerExtra, renderTurnError, trimmedCount, summary = null, usageToTokens, onNavigate }) {
41
+ export function ChatThread({ turns = [], tool = null, notice = null, hasOlder = false, olderBusy = false, onLoadOlder, onRetry, readOnly = false, sx, chat, renderAnswerExtra, renderTurnError, summary = null, usageToTokens, onNavigate }) {
43
42
  var _a, _b;
44
43
  const { t } = useTranslation();
45
44
  const end = useRef(null);
@@ -86,6 +85,6 @@ export function ChatThread({ turns = [], tool = null, notice = null, hasOlder =
86
85
  var _a;
87
86
  const previous = turns[index - 1];
88
87
  return (_jsxs(Box, { sx: { mb: 3 }, children: [!summaryRendered && summaryVisible && turn.seq > summary.up_to_seq ? (summaryRendered = true, renderSummary()) : null, previous && !sameSelection(previous, turn) ? (_jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { mb: 2, color: 'text.secondary' }, role: "separator", children: [_jsx(Box, { sx: { flex: 1, borderTop: 1, borderColor: 'divider' } }), _jsx(Typography, { variant: "caption", children: t('Chat.modelChanged', { model: selectionLine(turn, t) }) }), _jsx(Box, { sx: { flex: 1, borderTop: 1, borderColor: 'divider' } })] })) : null, _jsx(Box, { sx: { display: 'flex', justifyContent: 'flex-end', mb: 1.5 }, children: _jsx(Typography, { sx: { maxWidth: '85%', whiteSpace: 'pre-wrap', overflowWrap: 'anywhere', bgcolor: 'action.hover', borderRadius: 2, px: 1.5, py: 1 }, children: turn.user_text }) }), _jsx(Answer, { turn: turn, tool: index === turns.length - 1 ? tool : null, onRetry: readOnly ? undefined : onRetry, chat: chat, renderAnswerExtra: renderAnswerExtra, renderTurnError: renderTurnError, usageToTokens: usageToTokens, onNavigate: onNavigate })] }, (_a = turn.id) !== null && _a !== void 0 ? _a : index));
89
- }), !summaryRendered ? renderSummary() : null, trimmedCount ? _jsx(Chip, { size: "small", variant: "outlined", label: t(trimmedCount === 1 ? 'Chat.historyTrimmed_one' : 'Chat.historyTrimmed_other', { count: trimmedCount }), sx: CHAT_THREAD_TRIMMED_SX }) : null, notice ? (_jsx(Alert, { severity: notice.severity || 'warning', sx: CHAT_THREAD_NOTICE_SX, action: notice.action ? _jsx(Button, { color: "inherit", size: "small", onClick: notice.action.onClick, children: notice.action.label }) : null, children: notice.text })) : null, _jsx("div", { ref: end })] }));
88
+ }), !summaryRendered ? renderSummary() : null, notice ? (_jsx(Alert, { severity: notice.severity || 'warning', sx: CHAT_THREAD_NOTICE_SX, action: notice.action ? _jsx(Button, { color: "inherit", size: "small", onClick: notice.action.onClick, children: notice.action.label }) : null, children: notice.text })) : null, _jsx("div", { ref: end })] }));
90
89
  }
91
90
  export default ChatThread;
@@ -116,7 +116,6 @@ export function ChatWorkspace({ apiBase, wsUrl, api: apiOverrides, scope, preloa
116
116
  const focusPending = useRef(false);
117
117
  const [problem, setProblem] = useState(null);
118
118
  const [unavailableReason, setUnavailableReason] = useState(null);
119
- const [trimmedCount, setTrimmedCount] = useState(null);
120
119
  const [sidePanelOpen, setSidePanelOpen] = useState(false);
121
120
  const turnsRef = useRef(turns);
122
121
  useEffect(() => { turnsRef.current = turns; }, [turns]);
@@ -312,7 +311,6 @@ export function ChatWorkspace({ apiBase, wsUrl, api: apiOverrides, scope, preloa
312
311
  setOlderCursor(null);
313
312
  setTool(null);
314
313
  setProblem(null);
315
- setTrimmedCount(null);
316
314
  setSidePanelOpen(false);
317
315
  setDraft('');
318
316
  setOpenedOnce(false);
@@ -347,8 +345,6 @@ export function ChatWorkspace({ apiBase, wsUrl, api: apiOverrides, scope, preloa
347
345
  const running = turnsRef.current.findLast(isGenerating);
348
346
  (_a = appFrameCallback.current) === null || _a === void 0 ? void 0 : _a.call(appFrameCallback, { name: frame.name, payload: frame.payload, chatId, turnId: running === null || running === void 0 ? void 0 : running.id });
349
347
  }
350
- else if (frame.type === 'notice' && frame.code === 'history_trimmed')
351
- setTrimmedCount(frame.left_out || 0);
352
348
  else if (frame.type === 'notice' && frame.code === 'summarised') {
353
349
  api.listTurns(chatId).then((page) => { if (shownChatId.current === chatId)
354
350
  setSummary(page.summary || null); }).catch(() => { });
@@ -583,9 +579,9 @@ export function ChatWorkspace({ apiBase, wsUrl, api: apiOverrides, scope, preloa
583
579
  if (unavailable) {
584
580
  return (_jsx(Stack, { alignItems: "center", justifyContent: "center", spacing: 1, sx: Object.assign({ minHeight: 320, p: 3, textAlign: 'center' }, sx), children: _jsx(Typography, { color: "text.secondary", children: unavailableText || t('Chat.notAvailableHere') }) }));
585
581
  }
586
- return (_jsxs(Box, { ref: rootRef, sx: Object.assign({ display: 'grid', gridTemplateColumns: narrow ? 'minmax(0, 1fr)' : `minmax(240px, 320px) minmax(0, 1fr)${chat && sidePanel ? ' minmax(240px, 320px)' : ''}`, height: '100%', minHeight: 480, border: 1, borderColor: 'divider', borderRadius: 1, overflow: 'hidden', bgcolor: 'background.paper' }, sx), children: [narrow ? null : _jsx(Box, { sx: { borderRight: 1, borderColor: 'divider', minHeight: 0 }, children: list }), _jsxs(Stack, { sx: { minWidth: 0, minHeight: 0 }, children: [_jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { px: 1.5, py: 0.5, borderBottom: 1, borderColor: 'divider', minHeight: 56 }, children: [narrow ? _jsx(Button, { color: "inherit", onClick: () => setListOpen(true), children: t('Chat.chats') }) : null, _jsx(Typography, { noWrap: true, sx: { flex: 1, fontWeight: 600 }, children: chat ? (chat.title || t('Chat.untitled')) : '' }), socket.status === 'connecting' && openedOnce ? _jsx(Chip, { size: "small", color: "warning", variant: "outlined", label: t('Chat.reconnecting') }) : null, isArchived ? _jsx(Chip, { size: "small", label: t('Chat.archived') }) : null, isArchived ? _jsx(Button, { size: "small", onClick: () => updateChat(chat, { archived: false }), children: t('Chat.restore') }) : null, chat && sidePanel && narrow ? _jsx(Button, { color: "inherit", onClick: () => setSidePanelOpen(true), children: sidePanelLabel || t('Chat.sidePanel') }) : null] }), chat ? (_jsxs(_Fragment, { children: [_jsx(ChatThread, { turns: turns, chat: chat, renderAnswerExtra: answerExtra, renderTurnError: renderTurnError, trimmedCount: trimmedCount, tool: tool, notice: noticeFor(), hasOlder: Boolean(olderCursor), olderBusy: olderBusy, onLoadOlder: loadOlder, onRetry: retry, readOnly: isArchived, summary: summary, usageToTokens: usageToTokens, onNavigate: onNavigate }), isArchived ? _jsx(Typography, { variant: "caption", color: "text.secondary", sx: { px: 2, pb: 1 }, children: t('Chat.archivedReadOnly') }) : null, renderComposerExtra ? _jsx(Box, { children: renderComposerExtra({ chat }) }, chat.id) : null, composerLayout !== 'compact' && longChat ? _jsx(Alert, { severity: "info", action: _jsx(Button, { color: "inherit", size: "small", onClick: createChat, children: t('Chat.newConversation') }), children: t('Chat.longChat') }) : null, _jsx(ChatComposer, { layout: composerLayout, context: composerLayout === 'compact' ? renderComposerContext === null || renderComposerContext === void 0 ? void 0 : renderComposerContext({ chat }) : undefined, notice: composerLayout === 'compact' && longChat && !dismissedComposerNotices.has(`${chat.id}:long-chat`) ? {
582
+ return (_jsxs(Box, { ref: rootRef, sx: Object.assign({ display: 'grid', gridTemplateColumns: narrow ? 'minmax(0, 1fr)' : `minmax(240px, 320px) minmax(0, 1fr)${chat && sidePanel ? ' minmax(240px, 320px)' : ''}`, height: '100%', minHeight: 480, border: 1, borderColor: 'divider', borderRadius: 1, overflow: 'hidden', bgcolor: 'background.paper' }, sx), children: [narrow ? null : _jsx(Box, { sx: { borderRight: 1, borderColor: 'divider', minHeight: 0 }, children: list }), _jsxs(Stack, { sx: { minWidth: 0, minHeight: 0 }, children: [_jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, sx: { px: 1.5, py: 0.5, borderBottom: 1, borderColor: 'divider', minHeight: 56 }, children: [narrow ? _jsx(Button, { color: "inherit", onClick: () => setListOpen(true), children: t('Chat.chats') }) : null, _jsx(Typography, { noWrap: true, sx: { flex: 1, fontWeight: 600 }, children: chat ? (chat.title || t('Chat.untitled')) : '' }), socket.status === 'connecting' && openedOnce ? _jsx(Chip, { size: "small", color: "warning", variant: "outlined", label: t('Chat.reconnecting') }) : null, isArchived ? _jsx(Chip, { size: "small", label: t('Chat.archived') }) : null, isArchived ? _jsx(Button, { size: "small", onClick: () => updateChat(chat, { archived: false }), children: t('Chat.restore') }) : null, chat && sidePanel && narrow ? _jsx(Button, { color: "inherit", onClick: () => setSidePanelOpen(true), children: sidePanelLabel || t('Chat.sidePanel') }) : null] }), chat ? (_jsxs(_Fragment, { children: [_jsx(ChatThread, { turns: turns, chat: chat, renderAnswerExtra: answerExtra, renderTurnError: renderTurnError, tool: tool, notice: noticeFor(), hasOlder: Boolean(olderCursor), olderBusy: olderBusy, onLoadOlder: loadOlder, onRetry: retry, readOnly: isArchived, summary: summary, usageToTokens: usageToTokens, onNavigate: onNavigate }), isArchived ? _jsx(Typography, { variant: "caption", color: "text.secondary", sx: { px: 2, pb: 1 }, children: t('Chat.archivedReadOnly') }) : null, renderComposerExtra ? _jsx(Box, { children: renderComposerExtra({ chat }) }, chat.id) : null, composerLayout !== 'compact' && longChat ? _jsx(Alert, { severity: "info", action: _jsx(Button, { color: "inherit", size: "small", onClick: createChat, children: t('Chat.newConversation') }), children: t('Chat.longChat') }) : null, _jsx(ChatComposer, { layout: composerLayout, context: composerLayout === 'compact' ? renderComposerContext === null || renderComposerContext === void 0 ? void 0 : renderComposerContext({ chat }) : undefined, notice: composerLayout === 'compact' && longChat && !dismissedComposerNotices.has(`${chat.id}:long-chat`) ? {
587
583
  id: 'long-chat', text: t('Chat.longChatShort'), action: t('Chat.newChat'), onAction: createChat,
588
584
  onDismiss: () => setDismissedComposerNotices((current) => new Set(current).add(`${chat.id}:long-chat`)),
589
- } : null, value: draft, onChange: setDraft, onSend: send, onStop: () => socket.send({ type: 'stop' }), running: running, archived: isArchived, connected: socket.connected, inputRef: composerInputRef, usageLimit: usageLimit, actions: _jsx(ModelPicker, { entries: catalogue.entries, selection: selection, disabled: isArchived || running || (catalogueLoading && catalogueChatId !== chat.id), open: pickerOpen, onOpenChange: setPickerOpen, onChange: (next) => updateChat(chat, { selection: next }), sheet: narrow, balance: tokenBalance, longChat: longChat, onNewChat: createChat, shortLabel: composerLayout === 'compact' }) })] })) : (_jsxs(Stack, { alignItems: "center", justifyContent: "center", spacing: 2, sx: { flex: 1, p: 3 }, children: [_jsx(Typography, { color: "text.secondary", align: "center", children: t('Chat.selectChat') }), _jsx(Button, { variant: "contained", onClick: createChat, children: t('Chat.newChat') })] }))] }), chat && sidePanel && !narrow ? _jsx(Box, { sx: { borderLeft: 1, borderColor: 'divider', minHeight: 0, overflow: 'auto' }, children: sidePanel(chat) }, chat.id) : null, narrow && chat && sidePanel ? _jsx(Drawer, { anchor: "right", open: sidePanelOpen, onClose: () => setSidePanelOpen(false), slotProps: { paper: { 'aria-label': sidePanelLabel || t('Chat.sidePanel') } }, children: _jsx(Box, { children: sidePanel(chat) }, chat.id) }) : null, narrow ? _jsx(Drawer, { open: listOpen, onClose: () => setListOpen(false), slotProps: { paper: { sx: { width: 'min(320px, 86vw)' } } }, children: list }) : null] }));
585
+ } : null, value: draft, onChange: setDraft, onSend: send, onStop: () => socket.send({ type: 'stop' }), running: running, archived: isArchived, connected: socket.connected, inputRef: composerInputRef, usageLimit: usageLimit, actions: _jsx(ModelPicker, { entries: catalogue.entries, selection: selection, disabled: isArchived || running || (catalogueLoading && catalogueChatId !== chat.id), open: pickerOpen, onOpenChange: setPickerOpen, onChange: (next) => updateChat(chat, { selection: next }), balance: tokenBalance, shortLabel: composerLayout === 'compact' }) })] })) : (_jsxs(Stack, { alignItems: "center", justifyContent: "center", spacing: 2, sx: { flex: 1, p: 3 }, children: [_jsx(Typography, { color: "text.secondary", align: "center", children: t('Chat.selectChat') }), _jsx(Button, { variant: "contained", onClick: createChat, children: t('Chat.newChat') })] }))] }), chat && sidePanel && !narrow ? _jsx(Box, { sx: { borderLeft: 1, borderColor: 'divider', minHeight: 0, overflow: 'auto' }, children: sidePanel(chat) }, chat.id) : null, narrow && chat && sidePanel ? _jsx(Drawer, { anchor: "right", open: sidePanelOpen, onClose: () => setSidePanelOpen(false), slotProps: { paper: { 'aria-label': sidePanelLabel || t('Chat.sidePanel') } }, children: _jsx(Box, { children: sidePanel(chat) }, chat.id) }) : null, narrow ? _jsx(Drawer, { open: listOpen, onClose: () => setListOpen(false), slotProps: { paper: { sx: { width: 'min(320px, 86vw)' } } }, children: list }) : null] }));
590
586
  }
591
587
  export default ChatWorkspace;
@@ -1,16 +1,21 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useMemo, useRef, useState } from 'react';
3
- import { Alert, Box, Button, Drawer, IconButton, List, ListItemButton, ListItemText, Popover, Stack, ToggleButton, ToggleButtonGroup, Typography, useMediaQuery, useTheme } from '@mui/material';
3
+ import { Box, Button, Drawer, IconButton, List, ListItemButton, Popover, Stack, ToggleButton, ToggleButtonGroup, Typography, useMediaQuery, useTheme } from '@mui/material';
4
4
  import CloseIcon from '@mui/icons-material/Close';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  const LEVELS = ['top', 'best', 'balanced', 'fast'];
7
7
  const EFFORTS = ['low', 'medium', 'high', 'max'];
8
+ const EFFORT_LABELS = { low: 'Low', medium: 'Medium', high: 'High', max: 'Max' };
8
9
  export const CHAT_MODEL_TRIGGER_SX = { minWidth: 0, px: 1.25, color: 'text.secondary', whiteSpace: 'nowrap', flexShrink: 0, maxWidth: { xs: 140, sm: 'none' } };
9
10
  // The short label sits at the end of the compact composer's context row, which clips the host content first.
10
11
  export const CHAT_MODEL_TRIGGER_SHORT_SX = Object.assign(Object.assign({}, CHAT_MODEL_TRIGGER_SX), { maxWidth: 'none' });
11
- export const CHAT_MODEL_ENTRY_SX = { borderRadius: 1, alignItems: 'flex-start' };
12
+ export const CHAT_MODEL_ENTRY_SX = { borderRadius: 1, alignItems: 'center' };
13
+ export const CHAT_MODEL_ENTRY_CONTENT_SX = { display: 'flex', alignItems: 'center', width: '100%', gap: 1 };
14
+ export const CHAT_MODEL_COST_SX = { ml: 'auto', textAlign: 'right', whiteSpace: 'nowrap', flexShrink: 0 };
12
15
  export const CHAT_MODEL_EFFORT_SX = { flex: 1, minWidth: 0 };
13
16
  export const CHAT_MODEL_CLOSE_SX = { ml: 'auto' };
17
+ export const CHAT_MODEL_PANEL_SX = { p: 2, width: 300, maxWidth: '100%', maxHeight: 'min(640px, 80vh)', overflowY: 'auto' };
18
+ export const CHAT_MODEL_PANEL_SHEET_SX = Object.assign(Object.assign({}, CHAT_MODEL_PANEL_SX), { width: '100%', maxHeight: '82vh' });
14
19
  const supported = (entry, effort) => { var _a; return (_a = entry === null || entry === void 0 ? void 0 : entry.efforts) === null || _a === void 0 ? void 0 : _a.includes(effort); };
15
20
  const validSelection = (entries, selection) => {
16
21
  const entry = entries.find((item) => item.id === (selection === null || selection === void 0 ? void 0 : selection.entry));
@@ -28,13 +33,18 @@ const cleanLabel = (entry, shortLabel = false) => {
28
33
  function estimateText(entry, effort, t, language) {
29
34
  var _a;
30
35
  if (entry.billing === 'subscription')
31
- return t('Chat.noTokenSubscription');
36
+ return t('Chat.subscriptionShort');
32
37
  const estimate = (_a = entry.estimate) === null || _a === void 0 ? void 0 : _a[effort];
33
38
  if (!estimate)
34
39
  return null;
35
40
  if (estimate.unit === 'tokens') {
41
+ // One short value per row (UCM-CHAT-12 prototype "≈ 2–6k Token"): thousands are shown as "k" so the label never wraps.
42
+ if (estimate.max >= 1000) {
43
+ const thousands = new Intl.NumberFormat(language, { maximumFractionDigits: 1 });
44
+ return t('Chat.estimateTokensShort', { lo: thousands.format(estimate.min / 1000), hi: `${thousands.format(estimate.max / 1000)}k` });
45
+ }
36
46
  const format = new Intl.NumberFormat(language);
37
- return t('Chat.estimateTokens', { lo: format.format(estimate.min), hi: format.format(estimate.max) });
47
+ return t('Chat.estimateTokensShort', { lo: format.format(estimate.min), hi: format.format(estimate.max) });
38
48
  }
39
49
  if (estimate.unit === 'level') {
40
50
  const level = Math.min(3, Math.max(1, Math.round(estimate.min)));
@@ -42,12 +52,13 @@ function estimateText(entry, effort, t, language) {
42
52
  }
43
53
  return null;
44
54
  }
45
- export function ModelPicker({ entries = [], selection, onChange, disabled = false, open, onOpenChange, sheet, balance = null, longChat = false, onNewChat, shortLabel = false }) {
55
+ export function ModelPicker({ entries = [], selection, onChange, disabled = false, open, onOpenChange, balance = null, shortLabel = false }) {
46
56
  const { t, i18n } = useTranslation();
47
57
  const language = typeof (i18n === null || i18n === void 0 ? void 0 : i18n.language) === 'string' ? i18n.language.split('_')[0] || undefined : undefined;
48
58
  const theme = useTheme();
49
59
  const viewportNarrow = useMediaQuery(theme.breakpoints.down('md'));
50
- const narrow = sheet !== null && sheet !== void 0 ? sheet : viewportNarrow;
60
+ // The bottom sheet only on a narrow viewport, whatever the chat container's width (UCM-CHAT-12).
61
+ const narrow = viewportNarrow;
51
62
  const anchor = useRef(null);
52
63
  const [innerOpen, setInnerOpen] = useState(false);
53
64
  const isOpen = open !== null && open !== void 0 ? open : innerOpen;
@@ -55,21 +66,16 @@ export function ModelPicker({ entries = [], selection, onChange, disabled = fals
55
66
  const activeSelection = useMemo(() => validSelection(entries, selection) || fallback(entries), [entries, selection]);
56
67
  const active = entries.find((entry) => entry.id === (activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.entry));
57
68
  const effort = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.effort;
58
- const hasTokenEstimates = entries.some((entry) => Object.values(entry.estimate || {}).some((item) => item.unit === 'tokens'));
59
69
  const grouped = LEVELS.map((level) => [level, entries.filter((entry) => entry.level === level)]).filter(([, items]) => items.length);
60
70
  const unknown = entries.filter((entry) => !LEVELS.includes(entry.level));
71
+ const orderedEntries = [...grouped.flatMap(([, items]) => items), ...unknown];
61
72
  const selectEntry = (entry) => { var _a; return onChange === null || onChange === void 0 ? void 0 : onChange({ entry: entry.id, effort: supported(entry, effort) ? effort : (_a = entry.efforts) === null || _a === void 0 ? void 0 : _a[0] }); };
62
- const providerName = (entry) => ({ anthropic: 'Anthropic', claude_code: 'Anthropic', openai: 'OpenAI' })[entry.provider];
63
73
  const entryRow = (entry) => {
64
74
  var _a;
65
75
  const shown = supported(entry, effort) ? effort : (_a = entry.efforts) === null || _a === void 0 ? void 0 : _a[0];
66
76
  const estimate = estimateText(entry, shown, t, language);
67
- const averageCost = Number.isInteger(entry.average_cost_usd_micros) && entry.average_cost_usd_micros >= 0
68
- ? t('Chat.estimatePerAnswer', { cost: new Intl.NumberFormat(language, { maximumSignificantDigits: 2 }).format(entry.average_cost_usd_micros / 1000000) })
69
- : null;
70
- const provider = providerName(entry);
71
77
  const checked = entry.id === (active === null || active === void 0 ? void 0 : active.id);
72
- return _jsx(ListItemButton, { role: "radio", "aria-checked": checked, tabIndex: checked ? 0 : -1, "data-model-entry": entry.id, selected: checked, sx: CHAT_MODEL_ENTRY_SX, onClick: () => selectEntry(entry), children: _jsx(ListItemText, { primary: _jsx(Typography, { variant: "body2", sx: { fontWeight: 600 }, children: entry.label || entry.model }), secondary: _jsxs(_Fragment, { children: [provider ? t('Chat.by', { provider }) : null, estimate ? _jsx(Box, { component: "span", sx: { display: 'block' }, children: estimate }) : null, averageCost ? _jsx(Box, { component: "span", sx: { display: 'block' }, children: averageCost }) : null] }) }) }, entry.id);
78
+ return _jsx(ListItemButton, { role: "radio", "aria-checked": checked, tabIndex: checked ? 0 : -1, "data-model-entry": entry.id, selected: checked, sx: CHAT_MODEL_ENTRY_SX, onClick: () => selectEntry(entry), children: _jsxs(Box, { sx: CHAT_MODEL_ENTRY_CONTENT_SX, children: [_jsx(Typography, { variant: "body2", fontWeight: checked ? 600 : 400, children: entry.label || entry.model }), estimate ? _jsx(Typography, { variant: "caption", color: "text.secondary", sx: CHAT_MODEL_COST_SX, children: estimate }) : null] }) }, entry.id);
73
79
  };
74
80
  // Radio-group keyboard behaviour: arrows move the focus and the choice, only the checked row is a tab stop.
75
81
  const moveSelection = (event) => {
@@ -77,17 +83,16 @@ export function ModelPicker({ entries = [], selection, onChange, disabled = fals
77
83
  const keys = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1 };
78
84
  if (!(event.key in keys))
79
85
  return;
80
- const order = [...grouped.flatMap(([, items]) => items), ...unknown];
81
- const at = order.findIndex((entry) => entry.id === (active === null || active === void 0 ? void 0 : active.id));
82
- const next = order[(at + keys[event.key] + order.length) % order.length];
86
+ const at = orderedEntries.findIndex((entry) => entry.id === (active === null || active === void 0 ? void 0 : active.id));
87
+ const next = orderedEntries[(at + keys[event.key] + orderedEntries.length) % orderedEntries.length];
83
88
  if (!next)
84
89
  return;
85
90
  event.preventDefault();
86
91
  selectEntry(next);
87
92
  (_a = [...event.currentTarget.querySelectorAll('[data-model-entry]')].find((node) => node.dataset.modelEntry === next.id)) === null || _a === void 0 ? void 0 : _a.focus();
88
93
  };
89
- const content = (_jsx(Box, { role: "dialog", "aria-labelledby": "chat-model-picker-title", sx: { p: 2, width: narrow ? 'auto' : 360, maxWidth: '100%', maxHeight: narrow ? '82vh' : 'min(640px, 80vh)', overflowY: 'auto' }, children: _jsxs(Stack, { spacing: 1.25, children: [_jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, children: [_jsx(Typography, { id: "chat-model-picker-title", variant: "subtitle1", sx: { fontWeight: 600 }, children: t('Chat.pickerTitle') }), _jsx(IconButton, { "aria-label": t('Chat.close'), size: "small", sx: CHAT_MODEL_CLOSE_SX, onClick: () => setOpen(false), children: _jsx(CloseIcon, { fontSize: "small" }) })] }), _jsxs(Box, { role: "radiogroup", "aria-labelledby": "chat-model-picker-title", onKeyDown: moveSelection, children: [grouped.map(([level, items]) => _jsxs(Box, { children: [_jsx(Typography, { variant: "subtitle2", children: t(`Chat.level.${level}`) }), _jsx(Typography, { variant: "caption", color: "text.secondary", children: t(`Chat.levelHint.${level}`) }), _jsx(List, { dense: true, disablePadding: true, children: items.map(entryRow) })] }, level)), unknown.length ? _jsx(List, { dense: true, disablePadding: true, children: unknown.map(entryRow) }) : null] }), active ? _jsxs(Box, { children: [_jsx(Typography, { variant: "subtitle2", sx: { mb: 0.75 }, children: t('Chat.effortQuestion') }), _jsx(ToggleButtonGroup, { exclusive: true, fullWidth: true, size: "small", value: effort || null, "aria-label": t('Chat.effortQuestion'), onChange: (_event, next) => { if (next)
90
- onChange === null || onChange === void 0 ? void 0 : onChange({ entry: active.id, effort: next }); }, children: EFFORTS.filter((item) => { var _a; return (_a = active.efforts) === null || _a === void 0 ? void 0 : _a.includes(item); }).map((item) => _jsx(ToggleButton, { value: item, sx: CHAT_MODEL_EFFORT_SX, children: t(`Chat.effort.${item}`) }, item)) }), _jsx(Typography, { variant: "caption", color: "text.secondary", children: t(hasTokenEstimates ? 'Chat.effortHintTokens' : 'Chat.effortHint') })] }) : null, longChat ? _jsx(Alert, { severity: "warning", action: onNewChat ? _jsx(Button, { color: "inherit", size: "small", onClick: onNewChat, children: t('Chat.newConversation') }) : null, children: t('Chat.longChat') }) : null, Number.isInteger(balance) && balance >= 0 ? _jsx(Typography, { variant: "caption", color: "text.secondary", children: t('Chat.balanceLabel', { n: new Intl.NumberFormat(language).format(balance) }) }) : null] }) }));
94
+ const content = (_jsx(Box, { role: "dialog", "aria-labelledby": "chat-model-picker-title", sx: narrow ? CHAT_MODEL_PANEL_SHEET_SX : CHAT_MODEL_PANEL_SX, children: _jsxs(Stack, { spacing: 1.25, children: [_jsxs(Stack, { direction: "row", alignItems: "center", gap: 1, children: [_jsx(Typography, { id: "chat-model-picker-title", variant: "subtitle1", sx: { fontWeight: 600 }, children: t('Chat.pickerTitle') }), _jsx(IconButton, { "aria-label": t('Chat.close'), size: "small", sx: CHAT_MODEL_CLOSE_SX, onClick: () => setOpen(false), children: _jsx(CloseIcon, { fontSize: "small" }) })] }), _jsx(Box, { role: "radiogroup", "aria-labelledby": "chat-model-picker-title", onKeyDown: moveSelection, children: _jsx(List, { dense: true, disablePadding: true, children: orderedEntries.map(entryRow) }) }), active ? _jsxs(Box, { children: [_jsx(Typography, { variant: "subtitle2", sx: { mb: 0.75 }, children: t('Chat.effortLabel') }), _jsx(ToggleButtonGroup, { exclusive: true, fullWidth: true, size: "small", value: effort || null, "aria-label": t('Chat.effortLabel'), onChange: (_event, next) => { if (next)
95
+ onChange === null || onChange === void 0 ? void 0 : onChange({ entry: active.id, effort: next }); }, children: EFFORTS.filter((item) => { var _a; return (_a = active.efforts) === null || _a === void 0 ? void 0 : _a.includes(item); }).map((item) => _jsx(ToggleButton, { value: item, sx: CHAT_MODEL_EFFORT_SX, children: EFFORT_LABELS[item] }, item)) })] }) : null, Number.isInteger(balance) && balance >= 0 ? _jsx(Typography, { variant: "caption", color: "text.secondary", children: t('Chat.balanceLabel', { n: new Intl.NumberFormat(language).format(balance) }) }) : null] }) }));
91
96
  const trigger = _jsx(Button, { ref: anchor, size: "small", color: "inherit", sx: shortLabel ? CHAT_MODEL_TRIGGER_SHORT_SX : CHAT_MODEL_TRIGGER_SX, disabled: disabled || !entries.length, onClick: () => setOpen(true), "aria-haspopup": "dialog", children: _jsx(Box, { component: "span", sx: { overflow: 'hidden', textOverflow: 'ellipsis' }, children: active ? `${cleanLabel(active, shortLabel)} · ${t(`Chat.effort.${effort}`)} ▾` : t('Chat.chooseModel') }) });
92
97
  return _jsxs(_Fragment, { children: [trigger, narrow ? _jsx(Drawer, { anchor: "bottom", open: isOpen, onClose: () => setOpen(false), children: content }) : _jsx(Popover, { open: isOpen, anchorEl: anchor.current, onClose: () => setOpen(false), anchorOrigin: { vertical: 'top', horizontal: 'left' }, transformOrigin: { vertical: 'bottom', horizontal: 'left' }, children: content })] });
93
98
  }
@@ -1,8 +1,8 @@
1
1
  import { createKitSxEntry } from '../theme/kitSxEntry';
2
2
  import { CHAT_COMPOSER_INPUT_SX, CHAT_COMPOSER_COMPACT_ROOT_SX, CHAT_COMPOSER_CONTEXT_ROW_SX, CHAT_COMPOSER_CONTEXT_SX, CHAT_COMPOSER_CONTEXT_ACTIONS_SX, CHAT_COMPOSER_INPUT_ROW_SX, CHAT_COMPOSER_COMPACT_FIELD_SX, CHAT_COMPOSER_ACTION_SX, CHAT_COMPOSER_SEND_SX, CHAT_COMPOSER_NOTICE_SX, CHAT_COMPOSER_NOTICE_TEXT_SX, CHAT_COMPOSER_NOTICE_ACTION_SX, CHAT_COMPOSER_NOTICE_CLOSE_SX, CHAT_COMPOSER_USAGE_METER_SX, } from './ChatComposer';
3
3
  import { CHAT_LIST_ARCHIVED_ACTION_SX, CHAT_LIST_ROW_ACTION_SX } from './ChatList';
4
- import { CHAT_THREAD_NOTICE_SX, CHAT_THREAD_TOOL_CHIP_SX, CHAT_THREAD_TOOL_STEPS_SX, CHAT_THREAD_TRIMMED_SX } from './ChatThread';
5
- import { CHAT_MODEL_TRIGGER_SX, CHAT_MODEL_TRIGGER_SHORT_SX, CHAT_MODEL_ENTRY_SX, CHAT_MODEL_EFFORT_SX, CHAT_MODEL_CLOSE_SX } from './ModelPicker';
4
+ import { CHAT_THREAD_NOTICE_SX, CHAT_THREAD_TOOL_CHIP_SX, CHAT_THREAD_TOOL_STEPS_SX } from './ChatThread';
5
+ import { CHAT_MODEL_TRIGGER_SX, CHAT_MODEL_TRIGGER_SHORT_SX, CHAT_MODEL_ENTRY_SX, CHAT_MODEL_ENTRY_CONTENT_SX, CHAT_MODEL_COST_SX, CHAT_MODEL_EFFORT_SX, CHAT_MODEL_CLOSE_SX, CHAT_MODEL_PANEL_SX, CHAT_MODEL_PANEL_SHEET_SX } from './ModelPicker';
6
6
  export const CHAT_KIT_SX_REGISTRY = [
7
7
  createKitSxEntry('ChatComposer.input', 'MuiTextField', CHAT_COMPOSER_INPUT_SX, 'CHAT_COMPOSER_INPUT_SX'),
8
8
  createKitSxEntry('ChatComposer.compactRoot', 'MuiStack', CHAT_COMPOSER_COMPACT_ROOT_SX, 'CHAT_COMPOSER_COMPACT_ROOT_SX'),
@@ -21,12 +21,15 @@ export const CHAT_KIT_SX_REGISTRY = [
21
21
  createKitSxEntry('ModelPicker.trigger', 'MuiButton', CHAT_MODEL_TRIGGER_SX, 'CHAT_MODEL_TRIGGER_SX'),
22
22
  createKitSxEntry('ModelPicker.triggerShort', 'MuiButton', CHAT_MODEL_TRIGGER_SHORT_SX, 'CHAT_MODEL_TRIGGER_SHORT_SX'),
23
23
  createKitSxEntry('ModelPicker.entry', 'MuiListItemButton', CHAT_MODEL_ENTRY_SX, 'CHAT_MODEL_ENTRY_SX'),
24
+ createKitSxEntry('ModelPicker.entryContent', 'MuiBox', CHAT_MODEL_ENTRY_CONTENT_SX, 'CHAT_MODEL_ENTRY_CONTENT_SX'),
25
+ createKitSxEntry('ModelPicker.cost', 'MuiTypography', CHAT_MODEL_COST_SX, 'CHAT_MODEL_COST_SX'),
24
26
  createKitSxEntry('ModelPicker.effort', 'MuiToggleButton', CHAT_MODEL_EFFORT_SX, 'CHAT_MODEL_EFFORT_SX'),
25
27
  createKitSxEntry('ModelPicker.close', 'MuiIconButton', CHAT_MODEL_CLOSE_SX, 'CHAT_MODEL_CLOSE_SX'),
28
+ createKitSxEntry('ModelPicker.panel', 'MuiBox', CHAT_MODEL_PANEL_SX, 'CHAT_MODEL_PANEL_SX'),
29
+ createKitSxEntry('ModelPicker.panelSheet', 'MuiBox', CHAT_MODEL_PANEL_SHEET_SX, 'CHAT_MODEL_PANEL_SHEET_SX'),
26
30
  createKitSxEntry('ChatList.rowAction', 'MuiIconButton', CHAT_LIST_ROW_ACTION_SX, 'CHAT_LIST_ROW_ACTION_SX'),
27
31
  createKitSxEntry('ChatList.archivedAction', 'MuiButton', CHAT_LIST_ARCHIVED_ACTION_SX, 'CHAT_LIST_ARCHIVED_ACTION_SX'),
28
32
  createKitSxEntry('ChatThread.toolChip', 'MuiChip', CHAT_THREAD_TOOL_CHIP_SX, 'CHAT_THREAD_TOOL_CHIP_SX'),
29
33
  createKitSxEntry('ChatThread.toolSteps', 'MuiStack', CHAT_THREAD_TOOL_STEPS_SX, 'CHAT_THREAD_TOOL_STEPS_SX'),
30
- createKitSxEntry('ChatThread.trimmed', 'MuiChip', CHAT_THREAD_TRIMMED_SX, 'CHAT_THREAD_TRIMMED_SX'),
31
34
  createKitSxEntry('ChatThread.notice', 'MuiAlert', CHAT_THREAD_NOTICE_SX, 'CHAT_THREAD_NOTICE_SX'),
32
35
  ];
package/dist/chat/wire.js CHANGED
@@ -6,4 +6,3 @@ export const chatApiUrls = (base = '/api/assistant/') => {
6
6
  };
7
7
  export const defaultChatWsUrl = (chatId) => (window.location.protocol === 'https:' ? 'wss:' : 'ws:') + '//' + window.location.host + '/ws/assistant/chats/' + encodeURIComponent(chatId) + '/';
8
8
  export const CHAT_FRAME_TYPES = { APP: 'app', NOTICE: 'notice' };
9
- export const CHAT_NOTICE_CODES = { HISTORY_TRIMMED: 'history_trimmed' };
@@ -26,25 +26,13 @@ export const chatTranslations = {
26
26
  'Chat.effort.medium': { de: 'Gründlich', en: 'Thorough', fr: 'Approfondi', sw: 'Kwa kina' },
27
27
  'Chat.effort.high': { de: 'Sehr gründlich', en: 'Very thorough', fr: 'Très approfondi', sw: 'Kwa kina zaidi' },
28
28
  'Chat.effort.max': { de: 'Maximal', en: 'Maximum', fr: 'Maximum', sw: 'Kiwango cha juu' },
29
- 'Chat.pickerTitle': { de: 'Modell für diese Unterhaltung', en: 'Model for this conversation', fr: 'Modèle pour cette conversation', sw: 'Modeli ya mazungumzo haya' },
29
+ 'Chat.pickerTitle': { de: 'Modell', en: 'Model', fr: 'Modèle', sw: 'Modeli' },
30
30
  'Chat.close': { de: 'Schliessen', en: 'Close', fr: 'Fermer', sw: 'Funga' },
31
- 'Chat.level.top': { de: 'Höchste Qualität', en: 'Highest quality', fr: 'Qualité maximale', sw: 'Ubora wa juu zaidi' },
32
- 'Chat.levelHint.top': { de: 'für besonders anspruchsvolle Auswertungen', en: 'for especially demanding analysis', fr: 'pour les analyses particulièrement exigeantes', sw: 'kwa uchanganuzi wenye mahitaji makubwa' },
33
- 'Chat.level.best': { de: 'Hohe Qualität', en: 'High quality', fr: 'Haute qualité', sw: 'Ubora wa juu' },
34
- 'Chat.levelHint.best': { de: 'für schwierige Abgrenzungs- und Codierfragen', en: 'for difficult distinction and coding questions', fr: 'pour les questions difficiles de distinction et de codage', sw: 'kwa maswali magumu ya kutofautisha na kuweka misimbo' },
35
- 'Chat.level.balanced': { de: 'Ausgewogen', en: 'Balanced', fr: 'Équilibré', sw: 'Wastani' },
36
- 'Chat.levelHint.balanced': { de: 'für die meisten Fragen', en: 'for most questions', fr: 'pour la plupart des questions', sw: 'kwa maswali mengi' },
37
- 'Chat.level.fast': { de: 'Schnell und günstig', en: 'Fast and cheap', fr: 'Rapide et économique', sw: 'Haraka na nafuu' },
38
- 'Chat.levelHint.fast': { de: 'für kurze Nachfragen', en: 'for short follow-up questions', fr: 'pour les courtes questions de suivi', sw: 'kwa maswali mafupi ya ufuatiliaji' },
39
- 'Chat.by': { de: 'von {{provider}}', en: 'by {{provider}}', fr: 'par {{provider}}', sw: 'na {{provider}}' },
40
- 'Chat.estimateTokens': { de: '≈ {{lo}}–{{hi}} Token pro Antwort', en: '≈ {{lo}}–{{hi}} tokens per reply', fr: '≈ {{lo}}–{{hi}} jetons par réponse', sw: '≈ {{lo}}–{{hi}} tokeni kwa jibu' },
41
- 'Chat.noTokenSubscription': { de: 'ohne Token · Claude-Abo', en: 'no tokens · Claude subscription', fr: 'sans jetons · abonnement Claude', sw: 'bila tokeni · usajili wa Claude' },
31
+ 'Chat.subscriptionShort': { de: 'Abo', en: 'Subscription', fr: 'Abonnement', sw: 'Usajili' },
32
+ 'Chat.estimateTokensShort': { de: '≈ {{lo}}–{{hi}} Token', en: '≈ {{lo}}–{{hi}} tokens', fr: '≈ {{lo}}–{{hi}} jetons', sw: '≈ {{lo}}–{{hi}} tokeni' },
42
33
  'Chat.costScale.1': { de: 'Kosten niedrig', en: 'Low cost', fr: 'Coût faible', sw: 'Gharama ndogo' },
43
34
  'Chat.costScale.2': { de: 'Kosten mittel', en: 'Medium cost', fr: 'Coût moyen', sw: 'Gharama ya wastani' },
44
35
  'Chat.costScale.3': { de: 'Kosten hoch', en: 'High cost', fr: 'Coût élevé', sw: 'Gharama kubwa' },
45
- 'Chat.effortQuestion': { de: 'Wie gründlich soll die Antwort sein?', en: 'How thorough should the answer be?', fr: 'Quel niveau d’approfondissement souhaitez-vous ?', sw: 'Jibu liwe na kina kiasi gani?' },
46
- 'Chat.effortHintTokens': { de: 'Gründlicher heisst bessere Antworten, aber längere Wartezeit und mehr Token.', en: 'More thorough means better answers, but longer waits and more tokens.', fr: 'Une réponse plus approfondie est meilleure, mais prend plus de temps et consomme plus de jetons.', sw: 'Jibu lenye kina zaidi huwa bora, lakini husubiriwa muda mrefu na hutumia tokeni zaidi.' },
47
- 'Chat.effortHint': { de: 'Gründlicher heisst bessere Antworten, aber längere Wartezeit.', en: 'More thorough means better answers, but longer waits.', fr: 'Une réponse plus approfondie est meilleure, mais prend plus de temps.', sw: 'Jibu lenye kina zaidi huwa bora, lakini husubiriwa muda mrefu.' },
48
36
  'Chat.longChat': { de: 'Diese Unterhaltung ist lang. Ältere Teile werden zusammengefasst; eine neue Unterhaltung ist günstiger.', en: 'This conversation is long. Older parts will be summarized; a new conversation costs less.', fr: 'Cette conversation est longue. Les anciens passages seront résumés ; une nouvelle conversation coûte moins cher.', sw: 'Mazungumzo haya ni marefu. Sehemu za awali zitafupishwa; mazungumzo mapya yatagharimu kidogo.' },
49
37
  'Chat.longChatShort': { de: 'Lange Unterhaltung: ältere Teile werden zusammengefasst.', en: 'Long conversation: older parts will be summarized.', fr: 'Discussion longue : les anciens passages seront résumés.', sw: 'Mazungumzo marefu: sehemu za awali zitafupishwa.' },
50
38
  'Chat.newConversation': { de: 'Neue Unterhaltung', en: 'New conversation', fr: 'Nouvelle conversation', sw: 'Mazungumzo mapya' },
@@ -59,12 +47,9 @@ export const chatTranslations = {
59
47
  'Chat.limitReached.month': { de: 'Monatslimit erreicht', en: 'Monthly limit reached', fr: 'Limite mensuelle atteinte', sw: 'Kikomo cha mwezi kimefikiwa' },
60
48
  'Chat.limitReached.day': { de: 'Tageslimit erreicht', en: 'Daily limit reached', fr: 'Limite journalière atteinte', sw: 'Kikomo cha siku kimefikiwa' },
61
49
  'Chat.limitResets': { de: 'Zurückgesetzt am {{date}}', en: 'Resets {{date}}', fr: 'Réinitialisation le {{date}}', sw: 'Huwekwa upya {{date}}' },
62
- 'Chat.estimatePerAnswer': { de: '≈ {{cost}} USD pro Antwort', en: '≈ {{cost}} USD per answer', fr: '≈ {{cost}} USD par réponse', sw: '≈ {{cost}} USD kwa jibu' },
63
50
  'Chat.toolSteps': { de: 'Verwendete Werkzeuge', en: 'Tools used', fr: 'Outils utilisés', sw: 'Zana zilizotumika' },
64
51
  'Chat.answerIncomplete': { de: 'Die Antwort konnte nicht abgeschlossen werden.', en: 'The answer could not be completed.', fr: 'La réponse n’a pas pu être terminée.', sw: 'Jibu halikuweza kukamilishwa.' },
65
52
  'Chat.notAvailableHere': { de: 'Der Assistent ist hier nicht verfügbar.', en: 'The assistant is not available here.', fr: 'L’assistant n’est pas disponible ici.', sw: 'Msaidizi hapatikani hapa.' },
66
- 'Chat.historyTrimmed_one': { de: '{{count}} frühere Nachricht wurde ausgelassen', en: '{{count}} earlier message left out', fr: '{{count}} message précédent omis', sw: 'Ujumbe {{count}} wa awali umeachwa' },
67
- 'Chat.historyTrimmed_other': { de: '{{count}} frühere Nachrichten wurden ausgelassen', en: '{{count}} earlier messages left out', fr: '{{count}} messages précédents omis', sw: 'Ujumbe {{count}} wa awali umeachwa' },
68
53
  'Chat.sidePanel': { de: 'Details', en: 'Details', fr: 'Détails', sw: 'Maelezo' },
69
54
  'Chat.unavailable': { de: 'Chat ist nicht verfügbar', en: 'Chat is not available', fr: 'Le chat n’est pas disponible', sw: 'Mazungumzo hayapatikani' },
70
55
  'Chat.noModel': { de: 'Auf diesem Server ist kein Sprachmodell konfiguriert.', en: 'No language model is configured on this server.', fr: 'Aucun modèle de langage n’est configuré sur ce serveur.', sw: 'Hakuna modeli ya lugha iliyosanidiwa kwenye seva hii.' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micha.bigler/ui-core-micha",
3
- "version": "4.23.0",
3
+ "version": "4.25.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "exports": {