Files
pipelines/android/app
alan 291cec2bda Show chat tool calls as expandable INPUT/OUTPUT chips
Render each assistant turn's tool calls the way the reference jarvis chat
does: one compact chip per call showing the tool name, its duration and a
spinner while it runs, with consecutive calls of a turn grouped into one
wrapping row so the transcript stays scannable (ChatScreen AssistantParts /
ToolCalls).

Tapping a chip opens a floating panel over the transcript with INPUT as
pretty-printed JSON and OUTPUT as monospace, plus copy actions. The panel is
dismissible by tapping outside or its Close action and is positioned by
ToolPanelPositionProvider so it never moves the conversation (the transcript
scroll position is untouched while the overlay is open).

A failed call is shown as failed and renders both its diff (when present) and
an ERROR block. ERROR text now comes from the new toolErrorText, which prefers
the server's error message over any partial output, while toolOutputText is the
OUTPUT derivation again; toolFailed identifies the error state.

While a turn streams, the transcript follows the newest content with a hard
jump unless the operator has dragged away, driven by
listState.interactionSource.interactions (DragInteraction.Start/Stop/Cancel)
rather than programmatic scrolls. The running indicator and its live elapsed
time derive from the turn's own start (ChatThread.elapsedMillis, an injectable
clock in ChatStore) so they survive a chat switch.

A reconnecting socket now settles every open chat and re-fetches its history
(ChatStore.streamResumed, AppViewModel.observeConnection), and a server-pushed
stream error with no session id settles the sole/active running turn with the
server's message instead of leaving the indicator spinning.

Tests: ChatFormatTest covers toolErrorText; new ChatStreamTest covers the
streaming/elapsed/reconnect/stream-error guarantees against an injected clock;
new ToolPanelPositionProviderTest covers the panel's below/flip/margin
placement. README's chat section documents the follow-the-stream mechanism.
2026-10-16 14:17:50 +01:00
..