Clear pasted and picked attachments from the composer at send

The chips stayed until the server accepted the prompt, a few seconds
after the sent turn already showed the files. They now leave the field
with the text as the prompt goes out; a refusal that gives the composer
its text back restores the same chips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 10:45:28 +00:00
parent 33874005c4
commit a70a4a3c86
2 changed files with 19 additions and 8 deletions
@@ -356,10 +356,10 @@ void main() {
expect(primary().onPressed, isNull);
expect(attach().onPressed, isNull);
expect(gateway.promptBodies.single['attachments'], _wireParts([file]));
// The chips stay until the prompt is accepted.
// The chips leave the field with the text as the prompt goes out.
expect(
find.byKey(const Key('chat-composer-attachments')),
findsOneWidget,
findsNothing,
);
reply.complete(const {});