@micha.bigler/ui-core-micha 4.24.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 +13 -0
- package/README.md +2 -1
- package/dist/chat/ChatWorkspace.js +1 -1
- package/dist/chat/ModelPicker.js +23 -18
- package/dist/chat/kitSxRegistry.js +5 -1
- package/dist/i18n/chatTranslations.js +3 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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
|
+
|
|
3
16
|
## 4.24.0 - UCM-CHAT-11
|
|
4
17
|
|
|
5
18
|
Visible change in every app: the chat thread no longer shows the "N earlier messages left out" chip. The server
|
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
|
-
-
|
|
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`.
|
|
@@ -582,6 +582,6 @@ export function ChatWorkspace({ apiBase, wsUrl, api: apiOverrides, scope, preloa
|
|
|
582
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`) ? {
|
|
583
583
|
id: 'long-chat', text: t('Chat.longChatShort'), action: t('Chat.newChat'), onAction: createChat,
|
|
584
584
|
onDismiss: () => setDismissedComposerNotices((current) => new Set(current).add(`${chat.id}:long-chat`)),
|
|
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 }),
|
|
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] }));
|
|
586
586
|
}
|
|
587
587
|
export default ChatWorkspace;
|
package/dist/chat/ModelPicker.js
CHANGED
|
@@ -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 {
|
|
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: '
|
|
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.
|
|
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.
|
|
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,
|
|
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
|
-
|
|
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:
|
|
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
|
|
81
|
-
const
|
|
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:
|
|
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:
|
|
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
|
}
|
|
@@ -2,7 +2,7 @@ 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
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_EFFORT_SX, CHAT_MODEL_CLOSE_SX } from './ModelPicker';
|
|
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,8 +21,12 @@ 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'),
|
|
@@ -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
|
|
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.
|
|
32
|
-
'Chat.
|
|
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,7 +47,6 @@ 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.' },
|