Skip to content

fix: subscription events inherit pretty tool call display_as#40

Draft
shadaj wants to merge 1 commit into
mainfrom
sandbox-23067c05-3f9d-43fb-a5a5-f3b8eaf7aa4e
Draft

fix: subscription events inherit pretty tool call display_as#40
shadaj wants to merge 1 commit into
mainfrom
sandbox-23067c05-3f9d-43fb-a5a5-f3b8eaf7aa4e

Conversation

@shadaj

@shadaj shadaj commented Jun 18, 2026

Copy link
Copy Markdown
Member

In both the live processing path (batch_processor.rs) and the history
replay path (display.rs), subscription events now use the display_as
string from the originating InfinityMessage::ToolCall when available,
falling back to name(args) only when no pretty display was computed.

The history lookup iterates in reverse since the subscription tool call
is typically near the end of the conversation.

Added a unit test (subscription_event_uses_display_as) that seeds
history with a tool call + result (subscription started), then sends a
synthetic subscription event and asserts the display uses the pretty
display_as string rather than raw name(args).

Co-authored-by: Infinity 🤖 infinity@hydro.run

In both the live processing path (batch_processor.rs) and the history
replay path (display.rs), subscription events now use the `display_as`
string from the originating `InfinityMessage::ToolCall` when available,
falling back to `name(args)` only when no pretty display was computed.

The history lookup iterates in reverse since the subscription tool call
is typically near the end of the conversation.

Added a unit test (`subscription_event_uses_display_as`) that seeds
history with a tool call + result (subscription started), then sends a
synthetic subscription event and asserts the display uses the pretty
`display_as` string rather than raw `name(args)`.


Co-authored-by: Infinity 🤖 <infinity@hydro.run>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploying infinity with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2b0cc07
Status: ✅  Deploy successful!
Preview URL: https://11a38c90.infinity-dc7.pages.dev
Branch Preview URL: https://sandbox-23067c05-3f9d-43fb-a.infinity-dc7.pages.dev

View logs

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.

1 participant