• Will Chen's avatar
    Support concurrent chats (#1478) · 9691c983
    Will Chen 提交于
    Fixes #212 
    
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > Add concurrent chat support with per-chat state, chat activity UI, IPC
    per-chat handling, and accompanying tests.
    > 
    > - **Frontend (Chat concurrency)**
    > - Replace global chat atoms with per-chat maps:
    `chatMessagesByIdAtom`, `isStreamingByIdAtom`, `chatErrorByIdAtom`,
    `chatStreamCountByIdAtom`, `recentStreamChatIdsAtom`.
    > - Update `ChatPanel`, `ChatInput`, `MessagesList`,
    `DyadMarkdownParser`, and `useVersions` to read/write per-chat state.
    > - Add `useSelectChat` to centralize selecting/navigating chats; wire
    into `ChatList`.
    > - **UI**
    > - Add chat activity popover: `ChatActivityButton` and list; integrate
    into `preview_panel/ActionHeader` (renamed from `PreviewHeader`) and
    swap in `TitleBar`.
    > - **IPC/Main**
    > - Send error payloads with `chatId` on `chat:response:error`; update
    `ipc_client` to route errors per chat.
    > - Persist streaming partial assistant content periodically; improve
    cancellation/end handling.
    > - Make `FileUploadsState` per-chat (`addFileUpload({chatId,fileId},
    ...)`, `clear(chatId)`, `getFileUploadsForChat(chatId)`); update
    handlers/processors accordingly.
    > - **Testing**
    > - Add e2e `concurrent_chat.spec.ts` and snapshots; extend helpers
    (`snapshotMessages` timeout, chat activity helpers).
    > - Fake LLM server: support `tc=` with options, optional sleep delay to
    simulate concurrency.
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    9035f30b73a1f2e5a366a0cac1c63411742b16f3. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    9691c983
名称
最后提交
最后更新
..
app_env_var_utils.ts 正在载入提交数据...
cleanFullResponse.ts 正在载入提交数据...
context_paths_utils.ts 正在载入提交数据...
debug_fetch.ts 正在载入提交数据...
dyad_tag_parser.ts 正在载入提交数据...
fallback_ai_model.ts 正在载入提交数据...
file_uploads_state.ts 正在载入提交数据...
file_utils.ts 正在载入提交数据...
findLanguageModel.ts 正在载入提交数据...
get_model_client.ts 正在载入提交数据...
git_author.ts 正在载入提交数据...
git_utils.ts 正在载入提交数据...
llm_engine_provider.ts 正在载入提交数据...
lm_studio_utils.ts 正在载入提交数据...
lock_utils.ts 正在载入提交数据...
mcp_consent.ts 正在载入提交数据...
mcp_manager.ts 正在载入提交数据...
mention_apps.ts 正在载入提交数据...
neon_timestamp_utils.ts 正在载入提交数据...
ollama_provider.ts 正在载入提交数据...
path_utils.ts 正在载入提交数据...
port_utils.ts 正在载入提交数据...
process_manager.ts 正在载入提交数据...
read_env.ts 正在载入提交数据...
replacePromptReference.ts 正在载入提交数据...
retryOnLocked.ts 正在载入提交数据...
runShellCommand.ts 正在载入提交数据...
safe_sender.ts 正在载入提交数据...
simpleSpawn.ts 正在载入提交数据...
start_proxy_server.ts 正在载入提交数据...
template_utils.ts 正在载入提交数据...
test_utils.ts 正在载入提交数据...
thinking_utils.ts 正在载入提交数据...
token_utils.ts 正在载入提交数据...
vercel_utils.ts 正在载入提交数据...