Задача #26
closedЭпик #23: Переключение модели и режимов поведения AI в чате
Frontend: UI переключения модели и режима в чате
100%
Description
Описание¶
UI-элементы в header чата для выбора модели и режима поведения.
Дизайн¶
В header NarratorPanel (рядом с session tabs) добавить:
-
Model selector — compact dropdown/segmented control:
- GPT-4o (значок OpenAI)
- Claude Sonnet (значок Anthropic)
- Сохраняется per-session
-
Behavior mode — 3 кнопки (segmented control):
- Lightning Light — "Быстро, по делу"
- Balance Standard — "Сбалансированный" (default)
- Fire Extended — "Тщательный, проверяет всё"
- Tooltip с описанием каждого режима
- Сохраняется per-session
-
Визуальная индикация — маленький badge рядом с input area показывающий текущую модель
Хранение¶
- В narrator.store.ts: selectedModel, behaviorMode per session
- Передаётся в sendCommandStreaming() → CommandDto
- Default: GPT-4o + Standard
- При создании новой сессии — наследует настройки предыдущей
Файлы¶
- frontend/src/components/story/NarratorPanel.tsx — UI
- frontend/src/stores/narrator.store.ts — state
- frontend/src/lib/narrator-ws.ts — передача параметров
HU Updated by Hardelele User about 2 hours ago
- Status changed from Новая to В работе
Начата работа: исследование NarratorPanel и store для UI переключения.
HU Updated by Hardelele User about 2 hours ago
- Status changed from В работе to Решена
- % Done changed from 0 to 100
Implemented frontend UI for behavior mode switching:
-
narrator.store.ts: Added
behaviorModestate,setBehaviorModeaction, localStorage persistence per-project, initialization from localStorage on session init. -
NarratorPanel.tsx: Added SegmentedControl in header with 3 modes (Light/Std/Ext) with icons. Hidden on mobile for space. Tooltip with descriptions.
-
narrator-ws.ts: Extended streamCommandWs data type to include
behaviorModefield. -
NarratorPanel.module.css: Added
.modeSelectorstyles.
behaviorMode is persisted per-project in localStorage and passed through WebSocket to backend on every command.
HU Updated by Hardelele User 23 minutes ago
- Status changed from Решена to Закрыта
Закрытие: behavior mode UI готов. Остаток (перенос селектора модели из настроек аккаунта в чат) покрыт задачей #31.