feat(app): chat composer sends with an icon; no filler running line
This commit is contained in:
@@ -777,26 +777,38 @@ class _ChatComposerBarState extends State<ChatComposerBar> {
|
||||
}
|
||||
}
|
||||
|
||||
final label = Text(stop ? chatStopLabel : chatSendLabel);
|
||||
// One icon control, named Send or Stop for assistive technology: a send
|
||||
// arrow, or a stop square in the error colour while a turn runs.
|
||||
final label = stop ? chatStopLabel : chatSendLabel;
|
||||
if (cupertino) {
|
||||
return CupertinoButton(
|
||||
key: const Key('chat-composer-primary'),
|
||||
color: stop ? CupertinoColors.systemRed.resolveFrom(context) : null,
|
||||
onPressed: enabled ? press : null,
|
||||
child: label,
|
||||
return Semantics(
|
||||
button: true,
|
||||
label: label,
|
||||
excludeSemantics: true,
|
||||
child: CupertinoButton.filled(
|
||||
key: const Key('chat-composer-primary'),
|
||||
sizeStyle: CupertinoButtonSize.small,
|
||||
color: stop ? CupertinoColors.systemRed.resolveFrom(context) : null,
|
||||
onPressed: enabled ? press : null,
|
||||
child: Icon(
|
||||
stop ? CupertinoIcons.stop_fill : CupertinoIcons.arrow_up,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
return FilledButton(
|
||||
return IconButton.filled(
|
||||
key: const Key('chat-composer-primary'),
|
||||
tooltip: label,
|
||||
style: stop
|
||||
? FilledButton.styleFrom(
|
||||
? IconButton.styleFrom(
|
||||
backgroundColor: scheme.error,
|
||||
foregroundColor: scheme.onError,
|
||||
)
|
||||
: null,
|
||||
onPressed: enabled ? press : null,
|
||||
child: label,
|
||||
icon: Icon(stop ? Icons.stop : Icons.send),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -586,10 +586,6 @@ class _ChatThreadViewState extends State<ChatThreadView> {
|
||||
permissionErrorFor: _controller.permissionErrorFor,
|
||||
formErrorFor: _controller.questionErrorFor,
|
||||
);
|
||||
// A pending approval/question means the turn is waiting on the operator,
|
||||
// not generating, so the transcript indicator and its live region stand
|
||||
// down; the composer's Stop control still follows `running`.
|
||||
final awaiting = cards.any(chatCardAwaitingOperator);
|
||||
final allRows = transcriptRows(messages, trailing: cards);
|
||||
// A transcript held from before a socket gap may still say a compaction is
|
||||
// running even when the repair's read is refused. That running state is
|
||||
@@ -804,15 +800,6 @@ class _ChatThreadViewState extends State<ChatThreadView> {
|
||||
notice: notice,
|
||||
onDismiss: _dismiss,
|
||||
),
|
||||
if (_controller.running && !awaiting)
|
||||
Padding(
|
||||
key: const Key('chat-running'),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Semantics(
|
||||
liveRegion: true,
|
||||
child: const Text('Assistant is responding…'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (showJump)
|
||||
|
||||
Reference in New Issue
Block a user