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:
committed by
GitHub
parent
8410c41b01
commit
e1ff21bc0a
@@ -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': '新建工作树草稿',
|
||||
'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': '未知错误',
|
||||
|
||||
Reference in New Issue
Block a user