feat(android-llmservice): chat actions — stop, copy, regenerate, clear + offline badge#315
Merged
Merged
Conversation
…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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Small chat-quality quick wins from
android-llmservice/TODO.md(all XS–S, no new dependency, no network, no foundational work):generateChatFlowsource closes on cancellation), keeps the partial reply, and shows no error (CancellationExceptionis rethrown rather than turned into a generation error). Lets a runaway/repetitive reply be cut off.send()andregenerate()now share onestartGeneration()path.🔒 Offline · fully on-devicechip on the model-picker screen, reinforcing the zero-network posture.TODO.mdrows (Copy/regenerate/stop/clear,Offline badge,Clear chat history) flipped to ✅;README.mdlayout note updated.The instrumented UI test is unaffected: it clicks
sendButtonwhile idle (present) and asserts viauiState; the Stop/Copy/Regenerate/Clear affordances are additive and carry their own test tags (stopButton/copyButton/regenerateButton/clearButton).Test plan
build-android-llmservicecompiles the app + runs the on-device Compose test on the emulatorTODO.md+README.mdRelated issues / PRs
Follow-up to the
android-llmserviceapp (PRs #310–#314). No related issue number.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
Generated by Claude Code