Missing upstream method.
What's missing
Upstream TS `Thread` exposes `async getParticipants(): Promise<Author[]>` — returns the unique non-bot authors who've posted in the thread. Iterates `messages()` and dedupes.
- `vercel-chat/packages/chat/src/thread.ts:359`
- `chat.test.ts` has 4 tests under `[getParticipants]`: unique authors, exclude bots, empty array for bot-only threads, include `currentMessage` author.
Python `ThreadImpl` has no equivalent. Fidelity check flags all 4 tests as missing.
Impact
Consumers building:
- "@-mention all participants in this thread"
- "show thread member list in a card"
- "notify everyone involved in this discussion"
… have to manually iterate `thread.messages()` and dedupe. Works, but adds boilerplate across every consumer.
Fix
Port the method to `src/chat_sdk/thread.py`:
```python
async def get_participants(self) -> list[Author]:
seen: set[str] = set()
result: list[Author] = []
async for msg in self.messages():
if msg.author.is_bot or msg.author.user_id in seen:
continue
seen.add(msg.author.user_id)
result.append(msg.author)
# Include currentMessage author (may not be in fetched history yet)
if self._current_message and not self._current_message.author.is_bot:
if self._current_message.author.user_id not in seen:
result.append(self._current_message.author)
return result
```
Add the 4 faithful tests from `chat.test.ts`.
Acceptance
Missing upstream method.
What's missing
Upstream TS `Thread` exposes `async getParticipants(): Promise<Author[]>` — returns the unique non-bot authors who've posted in the thread. Iterates `messages()` and dedupes.
Python `ThreadImpl` has no equivalent. Fidelity check flags all 4 tests as missing.
Impact
Consumers building:
… have to manually iterate `thread.messages()` and dedupe. Works, but adds boilerplate across every consumer.
Fix
Port the method to `src/chat_sdk/thread.py`:
```python
async def get_participants(self) -> list[Author]:
seen: set[str] = set()
result: list[Author] = []
async for msg in self.messages():
if msg.author.is_bot or msg.author.user_id in seen:
continue
seen.add(msg.author.user_id)
result.append(msg.author)
# Include currentMessage author (may not be in fetched history yet)
if self._current_message and not self._current_message.author.is_bot:
if self._current_message.author.user_id not in seen:
result.append(self._current_message.author)
return result
```
Add the 4 faithful tests from `chat.test.ts`.
Acceptance