fix(talk): address PR #741 reviewer feedback
Four targeted fixes from the AI code review: 1. TalkConversation.description: drop the misleading `str | None` union (spreed always sends `""`, never null) — type is now `str` with default `""`. 2. get_messages: guard the X-Chat-Last-Given int parse with try/except so a misbehaving proxy can't crash the read flow; logs a warning and falls back to None. 3. get_messages: clamp `limit` to [1, 200] in the client (spreed caps server-side at 200 and silently truncates) so the returned `count` always matches what was actually requested. Both client and server-tool docstrings updated to state the valid range. 4. Add an integration test covering the 32000-char message ceiling in talk_send_message — the empty-message case was already tested, the over-length case was not. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
69814f30e3
commit
b6eb7a6bb8
@@ -53,7 +53,7 @@ class TalkConversation(BaseModel):
|
||||
type: int
|
||||
name: str
|
||||
displayName: str
|
||||
description: str | None = ""
|
||||
description: str = ""
|
||||
participantType: int | None = None
|
||||
unreadMessages: int = 0
|
||||
unreadMention: bool = False
|
||||
|
||||
Reference in New Issue
Block a user