feat: add Electron Mini Chat windows (#1161)

Add dedicated Electron Mini Chat windows for focused chat sessions without the full desktop shell. Mini Chat can open existing sessions or draft sessions, supports pinning above other windows, transfers sessions or drafts back to the main window, and deduplicates existing-session windows.

Expose Mini Chat entry points from the main header, session sidebar, command palette, and `mod+alt+n`. Add a dedicated Vite entry and React runtime so the compact surface can stay isolated from full-app chrome while still sharing chat, sync, theme, locale, model, agent, and worktree behavior.

Keep Mini Chat behavior scoped to the compact surface:
- limit assistant/user message actions to the appropriate Mini Chat set
- hide workspace changed-files UI in Mini Chat
- keep draft worktree selection and streaming directory state in sync
- mark sessions viewed while they are open in Mini Chat
- support Mini Chat-specific keyboard shortcuts for input focus, model selection, thinking variant cycling, favorite model cycling, and opening new Mini Chat drafts

Harden Electron integration by gating Mini Chat controls on desktop IPC availability, restricting pin/unpin IPC to Mini Chat windows, and only closing Mini Chat after the main window handoff succeeds.
This commit is contained in:
Bohdan Triapitsyn
2026-05-08 12:22:59 +03:00
committed by GitHub
parent 8410c41b01
commit e1ff21bc0a
37 changed files with 1312 additions and 29 deletions
+21
View File
@@ -1617,6 +1617,7 @@ export const dict: Record<I18nKey, string> = {
"commandPalette.empty.noResults": "Результатів не знайдено.",
"commandPalette.empty.searchingFiles": "Пошук файлів...",
"commandPalette.item.newSession": "Нова сесія",
"commandPalette.item.newMiniChat": "Нове вікно Mini Chat",
"commandPalette.item.newWorktreeDraft": "Чернетка нового worktree",
"commandPalette.item.addProject": "Додати проєкт",
"commandPalette.item.showSessionSwitcher": "Показати перемикач сесій",
@@ -1922,6 +1923,26 @@ export const dict: Record<I18nKey, string> = {
"desktopHostSwitcher.toast.sshConnected": "Інстанс SSH \"{host}\" підключено",
"desktopHostSwitcher.toast.sshFailedToConnect": "Не вдалося підключитися до інстанса SSH \"{host}\".",
"desktopHostSwitcher.toast.instanceUnreachable": "Інстанс \"{host}\" недоступний",
"miniChat.header.newSession": "Нова сесія",
"miniChat.header.session": "Сесія",
"miniChat.header.defaultAgent": "Агент за замовчуванням",
"miniChat.header.noModel": "Модель не вибрано",
"miniChat.status.busy": "Виконується",
"miniChat.status.retry": "Повторна спроба",
"miniChat.status.idle": "Очікує",
"miniChat.actions.pin": "Закріпити над іншими вікнами",
"miniChat.actions.unpin": "Відкріпити вікно",
"miniChat.actions.pinAria": "Закріпити вікно Mini Chat",
"miniChat.actions.unpinAria": "Відкріпити вікно Mini Chat",
"miniChat.actions.openMain": "Відкрити в головному вікні",
"miniChat.actions.openMainAria": "Відкрити сесію в головному вікні",
"miniChat.unavailable.title": "Сесія недоступна",
"miniChat.unavailable.description": "Не вдалося завантажити цю сесію. Її могли видалити, заархівувати або відкрити з іншого контексту проєкту.",
"sessions.sidebar.session.menu.openMiniChatWindow": "Відкрити у вікні Mini Chat",
"header.actions.newMiniChat": "Нове вікно Mini Chat",
"header.actions.newMiniChatAria": "Відкрити нове вікно Mini Chat",
"header.actions.openSessionMiniChat": "Відкрити сесію в Mini Chat",
"header.actions.openSessionMiniChatAria": "Відкрити поточну сесію в Mini Chat",
"errorBoundary.title": "Щось пішло не так",
"errorBoundary.description": "У програмі сталася неочікувана помилка. Це було зареєстровано для налагодження.",
"errorBoundary.state.unknownError": "Невідома помилка",