Project

General

Profile

Actions

Задача #26

closed
HU

Эпик #23: Переключение модели и режимов поведения AI в чате

Frontend: UI переключения модели и режима в чате

Задача #26: Frontend: UI переключения модели и режима в чате

Added by Hardelele User about 5 hours ago. Updated 23 minutes ago.

Status:
Закрыта
Priority:
Нормальный
Assignee:
-
Start date:
02/16/2026
Due date:
% Done:

100%

Estimated time:

Description

Описание

UI-элементы в header чата для выбора модели и режима поведения.

Дизайн

В header NarratorPanel (рядом с session tabs) добавить:

  1. Model selector — compact dropdown/segmented control:

    • GPT-4o (значок OpenAI)
    • Claude Sonnet (значок Anthropic)
    • Сохраняется per-session
  2. Behavior mode — 3 кнопки (segmented control):

    • Lightning Light — "Быстро, по делу"
    • Balance Standard — "Сбалансированный" (default)
    • Fire Extended — "Тщательный, проверяет всё"
    • Tooltip с описанием каждого режима
    • Сохраняется per-session
  3. Визуальная индикация — маленький 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 Actions #1

  • Status changed from Новая to В работе

Начата работа: исследование NarratorPanel и store для UI переключения.

HU Updated by Hardelele User about 2 hours ago Actions #2

  • Status changed from В работе to Решена
  • % Done changed from 0 to 100

Implemented frontend UI for behavior mode switching:

  1. narrator.store.ts: Added behaviorMode state, setBehaviorMode action, localStorage persistence per-project, initialization from localStorage on session init.

  2. NarratorPanel.tsx: Added SegmentedControl in header with 3 modes (Light/Std/Ext) with icons. Hidden on mobile for space. Tooltip with descriptions.

  3. narrator-ws.ts: Extended streamCommandWs data type to include behaviorMode field.

  4. NarratorPanel.module.css: Added .modeSelector styles.

behaviorMode is persisted per-project in localStorage and passed through WebSocket to backend on every command.

HU Updated by Hardelele User 23 minutes ago Actions #3

  • Status changed from Решена to Закрыта

Закрытие: behavior mode UI готов. Остаток (перенос селектора модели из настроек аккаунта в чат) покрыт задачей #31.

Actions

Also available in: PDF Atom