Skip to content

feat: multi-chat sessions#213

Open
sandy081 wants to merge 8 commits into
mainfrom
sandy081/multi-chat-reapply
Open

feat: multi-chat sessions#213
sandy081 wants to merge 8 commits into
mainfrom
sandy081/multi-chat-reapply

Conversation

@sandy081

Copy link
Copy Markdown
Member

Re-applies the multi-chat work from #197, which was accidentally merged and then reverted in #212. This restores the exact tree of the original PR head (b55919a); diff vs that commit is empty.

Summary

  • Adds multi-chat session support to the protocol (types/) and all clients (Rust/Kotlin/Swift/TypeScript/Go).
  • New actions: createChat / disposeChat; session actions SessionChatAdded/SessionChatRemoved/SessionChatUpdated/DefaultChatChanged.
  • SessionState.chats: ChatSummary[] + defaultChat?; breaking removal of SessionState.turns/activeTurn.
  • Includes the Kotlin compile fix from b55919a.

Why a new PR

#197 cannot be reopened (its branch was merged then reverted). This PR re-applies the work via revert-of-revert.

Gate

Per @connor4312, hold merge until the VS Code adoption PR is ready.

@sandy081 sandy081 requested a review from connor4312 June 10, 2026 12:08
@sandy081 sandy081 self-assigned this Jun 10, 2026
sandy081 and others added 2 commits June 10, 2026 16:00
Adds a feature-level walkthrough of multi-chat sessions for reviewers
and UX exploration. Lives under docs/proposals (not wired into public
nav).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds `interactivity?: "full" | "read-only" | "hidden"` to
`ChatSummary` and `ChatState` to support agent-team patterns where
worker chats are read-only (visible for observability) or hidden
(internal implementation detail).

- "full" — user can send messages and watch (default when absent)
- "read-only" — user can watch but not send messages
- "hidden" — internal worker not shown in UI

Harness sets this based on chat role; UI uses it for controls.
Example: Claude Code Agent Teams shows all chats with lead interactive,
workers read-only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread types/channels-chat/state.ts Outdated
sandy081 and others added 3 commits June 12, 2026 01:12
…eapply

# Conflicts:
#	clients/rust/crates/ahp/src/reducers.rs
#	clients/swift/AgentHostProtocol/Sources/AgentHostProtocol/Generated/State.generated.swift
#	clients/swift/CHANGELOG.md
Convert ChatInteractivity from a string-union type alias to a `const
enum` (Full/ReadOnly/Hidden) to match the existing style used by
ChatOriginKind and other discriminants, per PR review feedback.

Update all five client generators to emit it as an enum rather than a
string alias, and regenerate clients + schema.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 enabled auto-merge (squash) June 15, 2026 08:29
sandy081 and others added 2 commits June 15, 2026 10:42
Chats are a subscribable channel (ahp-chat:/<uuid>) as the doc comment
already notes, but the Snapshot.state union omitted ChatState, so
per-chat snapshots did not type-check.
Commit b88a4a3 added ChatState to the Snapshot.state union in types/
but the per-client generators match the union by exact string, so the
new variant fell through to a verbatim `A | B | ...` emission and broke
Rust generation. Register the new union string in all four generators
and regenerate the schema (now includes ChatState in the snapshot
oneOf). The hand-written SnapshotState enums already carry a Chat
variant, so generated client sources are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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