Typed Snapshot: move Telegram preview styling out of the pi transport #32
Labels
No labels
in-review
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weiwen/evie#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
The pi module — the streaming transport shared by both interfaces — forwards live snapshots as plain strings and bakes in Telegram-specific presentation: a
💭emoji prefix and a ~3800-char tail-trim derived from Telegram's 4096 message cap. Only the Telegram interface consumes snapshots (the HTTP interface discards them). Forward a typed snapshot from pi and move the presentation into the Telegram interface, so the shared transport stops carrying one interface's display constants.Justified by locality (not variance — there is only one snapshot consumer today).
Decision from grilling:
UnboundedSender<Snapshot>end-to-end (through the session manager and both callers). HTTP passes a detached channel and ignores it.Textwhen the assistant message carries text, elseThinkingwith the raw thinking text — no emoji, no trim.💭prefix and the tail-trim (preview()+ the char-limit constant) move into the Telegram interface, which rendersTextas-is andThinkingviapreview().Acceptance criteria
Snapshot { Text, Thinking }defined in the pi module; snapshot channel retyped end-to-end.💭prefix or any Telegram-derived char cap; dedup of consecutive identical snapshots stays in pi.just checkgreen.Blocked by
None - can start immediately.
Implemented typed snapshot refactor (commit
dff9573on branch sandcastle/issue-32).Key changes:
pub enum Snapshot { Text(String), Thinking(String) }(with PartialEq) in pi modulethinking_preview()Cannot push to forge (SSH port 22 refused in this sandbox); CI pending push.