Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(ui): das Chat-Modell steht nicht mehr als Chip in der Composer-Zeile

purple6e9816a637bc
diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsx
index 0648e197..3f69f32a 100644
--- a/src/components/chat/ChatView.tsx
+++ b/src/components/chat/ChatView.tsx
@@ -15,7 +15,7 @@ import { useSettingsStore } from '../../stores/settingsStore'
import { FileText, ChevronDown, Download, Wrench, Radio, RefreshCw, X } from 'lucide-react'
import { PluginsDropdown } from './PluginsDropdown'
import { ModelSelector } from '../models/ModelSelector'
-import { ConversationModelNote } from './ConversationModelNote'
+import { useConversationModelHint } from './ConversationModelNote'
import { GoalBar } from './GoalBar'
import { PlanBar } from './PlanBar'
import { LoopBar } from './LoopBar'
@@ -44,6 +44,10 @@ export function ChatView() {
const conversations = useChatStore((s) => s.conversations)
const activeModel = useModelStore((s) => s.activeModel)
const models = useModelStore((s) => s.models)
+ // Meldung 4 (R5 re-measure): the model that wrote the answers on screen,
+ // when it is not the one the picker stands on. Handed to the picker, which
+ // marks itself with a dot and says the whole sentence in its tooltip.
+ const conversationModelHint = useConversationModelHint()
const [ragPanelOpen, setRagPanelOpen] = useState(false)
const [exportOpen, setExportOpen] = useState(false)
const [exportToast, setExportToast] = useState<string>('')
@@ -360,12 +364,11 @@ export function ChatView() {
slashCommands={isAgentActive}
onAttachDocs={appMode !== 'cloud' ? () => setRagPanelOpen(true) : undefined}
composerModel={
- <div className="flex items-center gap-1.5">
- {/* What this chat's answers were written by, when that is
- not what the picker says (Meldung 4, R5 re-measure). */}
- <ConversationModelNote />
- <ModelSelector openUpward />
- </div>
+ /* What this chat's answers were written by rides on the
+ picker itself now, as a dot plus a tooltip, instead of a
+ second chip in the row (Meldung 4, R5 re-measure; David
+ 2026-09-02 wanted it hidden away). */
+ <ModelSelector openUpward answeredBy={conversationModelHint} />
}
// No plan lives here. The prompt window is the prompt window
// (David, 2026-08-22): the plan band sits under the header row
diff --git a/src/components/chat/ConversationModelNote.tsx b/src/components/chat/ConversationModelNote.tsx
index 5c745f5f..2f10e36f 100644
--- a/src/components/chat/ConversationModelNote.tsx
+++ b/src/components/chat/ConversationModelNote.tsx
@@ -12,9 +12,15 @@
* job and is true. This says what the answers on screen came from, which
* nothing said. It is sourced from the conversation alone (the last assistant
* turn's own record, falling back to the conversation field for chats from
- * before that record existed) and never from the global pick, and it is drawn
- * only when the two differ, so a chat continuing on its own model shows one
- * name and not the same name twice.
+ * before that record existed) and never from the global pick, and it is only
+ * there when the two differ, so a chat continuing on its own model does not
+ * print the same name twice.
+ *
+ * It used to be a chip of its own in the composer row, printing the model name
+ * under a small label. David on 2026-09-02: "mach das woanders hin, versteckter
+ * bitte, muss nicht so sein". So the row carries no extra text any more. The
+ * information rides on the picker itself instead: a 4 px dot on its corner,
+ * and the full sentence in the picker's tooltip. Nothing is lost, it is just quiet until asked.
*/
import { useChatStore } from '../../stores/chatStore'
@@ -22,20 +28,15 @@ import { useModelStore } from '../../stores/modelStore'
import { conversationModel, conversationModelDiffers } from '../../lib/conversation-model'
import { displayModelName } from '../../api/providers/registry'
-export function ConversationModelNote() {
+/**
+ * The display name of the model that wrote the open chat's answers, when that
+ * is not the model the picker stands on. `null` otherwise, which is the normal
+ * case and draws nothing at all.
+ */
+export function useConversationModelHint(): string | null {
const conv = useChatStore((s) => s.conversations.find((c) => c.id === s.activeConversationId))
const activeModel = useModelStore((s) => s.activeModel)
if (!conversationModelDiffers(conv, activeModel)) return null
- const ran = conversationModel(conv)
-
- return (
- <span
- className="hidden sm:flex items-center gap-1 h-[26px] px-2 rounded-md border border-white/[0.06] text-[0.6rem] text-gray-500 dark:text-gray-400 shrink-0"
- title={`The answers in this chat were written by ${ran}. The picker beside this is what the next answer would run on.`}
- >
- <span className="opacity-70">answers:</span>
- <span className="max-w-[110px] truncate leading-none">{displayModelName(ran).split(':')[0]}</span>
- </span>
- )
+ return displayModelName(conversationModel(conv)).split(':')[0]
}
diff --git a/src/components/chat/__tests__/conversation-model-hint.test.ts b/src/components/chat/__tests__/conversation-model-hint.test.ts
new file mode 100644
index 00000000..770b2a48
--- /dev/null
+++ b/src/components/chat/__tests__/conversation-model-hint.test.ts
@@ -0,0 +1,116 @@
+/**
+ * @vitest-environment jsdom
+ *
+ * Meldung 4, after David moved it out of sight (2026-09-02).
+ *
+ * "mach das woanders hin, versteckter bitte, muss nicht so sein."
+ *
+ * The information itself stays: a chat whose answers were written by another
+ * model than the one picked right now still says so. It just says it on the
+ * picker instead of in a chip of its own, as a 4 px dot plus the full sentence
+ * in the tooltip. This file mounts the real composer and checks both ends of
+ * that: the mark and the sentence are there when the two models differ, and
+ * nothing at all is there when they do not.
+ *
+ * Run: npx vitest run src/components/chat/__tests__/conversation-model-hint.test.ts
+ */
+import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
+import { createElement } from 'react'
+import { render, screen, cleanup } from '@testing-library/react'
+import { ChatView } from '../ChatView'
+import { useChatStore } from '../../../stores/chatStore'
+import { useModelStore } from '../../../stores/modelStore'
+import { useUIStore } from '../../../stores/uiStore'
+import { useCompareStore } from '../../../stores/compareStore'
+import type { Conversation } from '../../../types/chat'
+
+// The composer's dictation button reaches for the microphone and the Tauri
+// bridge on mount. Neither exists here and neither is what this file is about.
+vi.mock('../VoiceButton', () => ({ VoiceButton: () => null }))
+
+const HERMES = 'openai::Hermes-3-Llama-3.2-3B.Q4_K_M'
+const QWEN = 'openai::Qwen3-4B-Q4_K_M'
+const NOW = Date.UTC(2026, 8, 2, 12, 0, 0)
+
+/** A chat with one question and one answer, the answer recorded as `by`. */
+const chat = (by: string): Conversation => ({
+ id: 'c1',
+ title: 'KANARIE2',
+ messages: [
+ { id: 'm1', role: 'user', content: 'q', timestamp: NOW - 2000 },
+ { id: 'm2', role: 'assistant', content: 'a', timestamp: NOW - 1000, modelId: by },
+ ],
+ model: by,
+ systemPrompt: '',
+ mode: 'lu',
+ createdAt: NOW - 3000,
+ updatedAt: NOW - 1000,
+} as Conversation)
+
+/** Open `conv` with the global pick standing on `picked`. */
+function show(conv: Conversation, picked: string) {
+ useChatStore.setState({ conversations: [conv], activeConversationId: conv.id })
+ useModelStore.setState({ activeModel: picked, models: [] })
+ render(createElement(ChatView))
+}
+
+/** The picker in the composer row. */
+const picker = () => screen.getAllByLabelText('Select chat model')[0]
+
+beforeEach(() => {
+ useUIStore.setState({ currentView: 'chat', sidebarOpen: false })
+ useCompareStore.setState({ isComparing: false })
+})
+
+afterEach(() => {
+ cleanup()
+})
+
+describe('what the open chat ran on, now hidden on the picker', () => {
+ it('the models differ: a dot marks the picker', () => {
+ show(chat(HERMES), QWEN)
+ const dot = screen.getByTestId('conversation-model-dot')
+ // 4 px, gray, barely there. A mark, not a message.
+ expect(dot.className).toContain('w-1')
+ expect(dot.className).toContain('h-1')
+ expect(dot.className).toContain('bg-gray-500')
+ expect(dot.className).toContain('opacity-60')
+ // Absolute, so the row keeps its width whether the dot is drawn or not.
+ expect(dot.className).toContain('absolute')
+ })
+
+ it('the models differ: the picker tooltip says the whole thing', () => {
+ show(chat(HERMES), QWEN)
+ expect(picker().getAttribute('title')).toBe(
+ 'The answers in this chat were written by Hermes-3-Llama-3.2-3B.Q4_K_M. ' +
+ 'The next answer runs on the model picked here.',
+ )
+ })
+
+ it('the models differ: the row still shows no second model name', () => {
+ // This is the point of the move. The information is reachable, it is not
+ // printed. The chip used to write "answers: <name>" right here.
+ show(chat(HERMES), QWEN)
+ expect(document.body.textContent).not.toContain('answers:')
+ expect(picker().textContent).not.toContain('Hermes')
+ })
+
+ it('NEGATIVE CONTROL: same model, no dot and the ordinary tooltip', () => {
+ // A chat continuing on the picked model has nothing to report, and saying
+ // it anyway would print the same name twice.
+ show(chat(QWEN), QWEN)
+ expect(screen.queryByTestId('conversation-model-dot')).toBeNull()
+ expect(picker().getAttribute('title')).toBe(
+ 'Model: Qwen3-4B-Q4_K_M, click to switch',
+ )
+ })
+
+ it('NEGATIVE CONTROL: a chat with no answer yet claims nothing', () => {
+ const fresh = { ...chat(HERMES), messages: [chat(HERMES).messages[0]] } as Conversation
+ show(fresh, QWEN)
+ expect(screen.queryByTestId('conversation-model-dot')).toBeNull()
+ expect(picker().getAttribute('title')).toBe(
+ 'Model: Qwen3-4B-Q4_K_M, click to switch',
+ )
+ })
+})
diff --git a/src/components/models/ModelSelector.tsx b/src/components/models/ModelSelector.tsx
index 01da369f..1762cfff 100644
--- a/src/components/models/ModelSelector.tsx
+++ b/src/components/models/ModelSelector.tsx
@@ -497,12 +497,21 @@ export interface ModelSelectorProps {
* not the run says so.
*/
surface?: 'chat' | 'code'
+ /**
+ * The model that wrote the answers of the open chat, when that is not the
+ * model picked here (Meldung 4 of the R5 re-measure). It used to be a chip
+ * of its own beside the picker; David wanted it out of the row on
+ * 2026-09-02, so the picker carries it: a 4 px dot on the corner and the
+ * full sentence in the tooltip. `null`/undefined is the normal case and
+ * changes nothing about the trigger, not even its width.
+ */
+ answeredBy?: string | null
}
// `openUpward` flips the dropdown to open above the trigger, right-aligned —
// used when the picker lives in the composer action bar (bottom of the screen)
// instead of the header. Header usage keeps the default downward/centered menu.
-export function ModelSelector({ openUpward = false, surface = 'chat' }: ModelSelectorProps = {}) {
+export function ModelSelector({ openUpward = false, surface = 'chat', answeredBy = null }: ModelSelectorProps = {}) {
const { models, activeModel, setActiveModel, fetchModels } = useModels()
const isModelLoading = useModelStore((s) => s.isModelLoading)
// G20: useModels hides every local model while the app is in Cloud mode.
@@ -811,7 +820,11 @@ export function ModelSelector({ openUpward = false, surface = 'chat' }: ModelSel
{/* ── Trigger Button ── */}
<button
onClick={() => setOpen(!open)}
- title={activeModel ? `Model: ${activeDisplayName}, click to switch` : 'Select a chat model'}
+ title={
+ answeredBy
+ ? `The answers in this chat were written by ${answeredBy}. The next answer runs on the model picked here.`
+ : activeModel ? `Model: ${activeDisplayName}, click to switch` : 'Select a chat model'
+ }
aria-label="Select chat model"
className={`
group flex items-center gap-1.5 h-[26px] px-2 rounded-md
@@ -841,6 +854,17 @@ export function ModelSelector({ openUpward = false, surface = 'chat' }: ModelSel
)}
</button>
+ {/* The open chat ran on another model than the one picked here. Absolute
+ so the row keeps its width to the pixel, and quiet enough that it is
+ a mark rather than a message: the sentence lives in the tooltip. */}
+ {answeredBy && (
+ <span
+ data-testid="conversation-model-dot"
+ aria-hidden="true"
+ className="pointer-events-none absolute -top-0.5 -right-0.5 w-1 h-1 rounded-full bg-gray-500 opacity-60"
+ />
+ )}
+
{/* ── Dropdown ── */}
<AnimatePresence>
{open && (
diff --git a/src/lib/__tests__/conversation-model.test.ts b/src/lib/__tests__/conversation-model.test.ts
index 008240a7..5d505549 100644
--- a/src/lib/__tests__/conversation-model.test.ts
+++ b/src/lib/__tests__/conversation-model.test.ts
@@ -128,10 +128,26 @@ describe('the conversation displays read the conversation, not the picker', () =
expect(src('lib/chat-export.ts')).toMatch(/_Model: \$\{conversationModelOf\(conversation\)\}/)
})
- it('THE FIX: the composer says what the open chat ran on when it differs', () => {
+ it('THE FIX: the composer still knows what the open chat ran on when it differs', () => {
+ // David on 2026-09-02: "mach das woanders hin, versteckter bitte". The
+ // chip in the composer row is gone; the reader behind it is not. It hands
+ // the picker the name, and the picker carries the dot and the sentence
+ // (proved by rendering in
+ // components/chat/__tests__/conversation-model-hint.test.ts).
const note = src('components/chat/ConversationModelNote.tsx')
expect(note).toMatch(/conversationModelDiffers\(conv, activeModel\)/)
- expect(src('components/chat/ChatView.tsx')).toMatch(/<ConversationModelNote \/>/)
+ expect(note).toMatch(/export function useConversationModelHint/)
+ expect(src('components/chat/ChatView.tsx'))
+ .toMatch(/<ModelSelector openUpward answeredBy=\{conversationModelHint\} \/>/)
+ expect(src('components/models/ModelSelector.tsx'))
+ .toMatch(/The answers in this chat were written by \$\{answeredBy\}/)
+ })
+
+ it('NEGATIVE CONTROL: no chip prints the name in the row any more', () => {
+ // The old shape wrote "answers: <name>" beside the picker. Nothing draws
+ // that text now, in either file, or the move would have been cosmetic.
+ expect(src('components/chat/ConversationModelNote.tsx')).not.toMatch(/answers:/)
+ expect(src('components/chat/ChatView.tsx')).not.toMatch(/<ConversationModelNote \/>/)
})
it('NEGATIVE CONTROL: nothing writes a model into an old message', () => {