Skip to content

Add multi-agent chat selection and routing#2

Merged
kentcdodds merged 10 commits intomainfrom
cursor/chat-agent-selection-ecfe
Mar 17, 2026
Merged

Add multi-agent chat selection and routing#2
kentcdodds merged 10 commits intomainfrom
cursor/chat-agent-selection-ecfe

Conversation

@kentcdodds
Copy link
Copy Markdown
Member

Summary

  • add ordered multi-agent thread selection, including a public active-agent API and thread updates for agent membership
  • add a keyboard-searchable multi-select combobox to chat and keep the selected agent count visible in both empty and active thread states
  • route each user turn through the selected agents, combine the responding agents' replies into a chat response, and label the output with agent names
  • cover the new flow with chat Playwright coverage for multi-agent selection plus the existing chat journeys

Testing

  • bun run typecheck
  • bun run lint
  • bun run test:e2e e2e/chat.spec.ts
  • manual remote-AI browser walkthrough using two constrained agents (math gate agent and greeting gate agent) to verify math turns route to the math agent and greeting turns route to the greeting agent
Open in Web Open in Cursor 

cursoragent and others added 6 commits March 17, 2026 01:32
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds kentcdodds marked this pull request as ready for review March 17, 2026 03:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 17, 2026

🔎 Preview deployed: https://pea-pr-2.kentcdodds.workers.dev

Worker: pea-pr-2
D1: pea-pr-2-db
KV: pea-pr-2-oauth-kv

Mocks:

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
- Introduced session info fetching to improve chat initialization.
- Updated thread ID extraction logic to handle trailing slashes.
- Increased thread list pagination limit and added prefetching for better performance.
- Implemented abort controllers for thread refresh and loading operations.
- Enhanced error handling and state management during chat data loading.
- Updated routing to maintain chat state across different URLs.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Keep the chat list and thread views separate on small screens so the interface fits comfortably, and stack the header controls earlier to avoid overlap.

Made-with: Cursor
@kentcdodds kentcdodds merged commit 5d35f60 into main Mar 17, 2026
7 checks passed
@kentcdodds kentcdodds deleted the cursor/chat-agent-selection-ecfe branch March 17, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants