Typed Snapshot: move Telegram preview styling out of pi transport #36
No reviewers
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!36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sandcastle/issue-32"
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?
Summary
Introduces a typed
Snapshotenum (Text(String)|Thinking(String)) insrc/pi.rsto replace the rawStringpreviously sent over the snapshot channel. This separates what the pi transport observed from how a given interface chooses to render it.Key decisions:
thinking_preview(emoji prefix + 3800-char tail trim) and its constant were moved verbatim fromsrc/pi.rstosrc/telegram/mod.rs, which is the only caller that needs Telegram-specific sizing.Snapshotfor consistency (src/http.rs).pi.rswere updated to assert on typedSnapshotvariants; three focused unit tests forthinking_previewwere added directly insrc/telegram/mod.rs.Reviewer should check:
Snapshotenum variants and their doc comments insrc/pi.rs.thinking_previewinsrc/telegram/mod.rsis functionally identical to what was removed fromsrc/pi.rs.tokio::select!arms indeliver_response(telegram) correctly dispatchSnapshot::TextandSnapshot::Thinking.Closes #32
rebase on main
dff9573e94ae3d410bfbae3d410bfbc162d27155c162d2715594b7f65cf394b7f65cf38aed3cb04f8aed3cb04fbc71ab5b69bc71ab5b69ab4e4753a5