Skip to content

feat(android-llmservice): chat actions — stop, copy, regenerate, clear + offline badge#315

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/android-llmservice-chat-actions
Jul 10, 2026
Merged

feat(android-llmservice): chat actions — stop, copy, regenerate, clear + offline badge#315
bernardladenthin merged 1 commit into
mainfrom
claude/android-llmservice-chat-actions

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

Small chat-quality quick wins from android-llmservice/TODO.md (all XS–S, no new dependency, no network, no foundational work):

  • Stop generation — a Stop button replaces Send while a reply streams; it cancels the streaming coroutine (the generateChatFlow source closes on cancellation), keeps the partial reply, and shows no error (CancellationException is rethrown rather than turned into a generation error). Lets a runaway/repetitive reply be cut off.
  • Copy + Regenerate — an actions row under the last assistant reply: Copy puts the reply on the clipboard (toast); Regenerate drops the trailing reply and re-runs the last user turn (handy after tuning the sampling settings). send() and regenerate() now share one startGeneration() path.
  • Clear chat — 🗑 in the top bar (enabled only with messages present and not generating) + a confirm dialog.
  • Offline/privacy badge — a 🔒 Offline · fully on-device chip on the model-picker screen, reinforcing the zero-network posture.
  • i18n — new UI strings added to the default resources and translated across all 13 shipped languages.
  • Docs: TODO.md rows (Copy/regenerate/stop/clear, Offline badge, Clear chat history) flipped to ✅; README.md layout note updated.

The instrumented UI test is unaffected: it clicks sendButton while idle (present) and asserts via uiState; the Stop/Copy/Regenerate/Clear affordances are additive and carry their own test tags (stopButton/copyButton/regenerateButton/clearButton).

Test plan

  • CI is green on this branch — build-android-llmservice compiles the app + runs the on-device Compose test on the emulator
  • Docs updated — TODO.md + README.md

Related issues / PRs

Follow-up to the android-llmservice app (PRs #310#314). No related issue number.

Checklist

  • My commits follow Conventional Commits
  • No security-sensitive changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m


Generated by Claude Code

…r + offline badge

Small chat-quality wins on top of the settings/log work:

- Stop generation: a Stop button replaces Send while a reply streams;
  it cancels the streaming coroutine (the generateChatFlow source closes
  on cancellation), keeping the partial reply and showing no error
  (CancellationException is rethrown, not turned into a generation
  error). Lets a runaway/repetitive reply be cut off.
- Copy + Regenerate: an actions row under the last assistant reply —
  Copy puts the reply on the clipboard (toast), Regenerate drops the
  trailing reply and re-runs the last user turn (useful after tuning
  the sampling settings). send()/regenerate() now share one
  startGeneration() path.
- Clear chat: 🗑 in the top bar (enabled when there are messages and not
  generating) with a confirm dialog.
- Offline badge: a '🔒 Offline · fully on-device' chip on the model-
  picker screen, reinforcing the zero-network posture.
- New UI strings translated across all 13 shipped languages.
- TODO.md / README.md updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
@sonarqubecloud

Copy link
Copy Markdown

@bernardladenthin bernardladenthin merged commit 3cf4486 into main Jul 10, 2026
13 of 17 checks passed
@bernardladenthin bernardladenthin deleted the claude/android-llmservice-chat-actions branch July 10, 2026 06:15
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.

2 participants