fix(chat): place per-message reasoning left of the tools count
This commit is contained in:
@@ -203,6 +203,18 @@ class ChatMessageView extends StatelessWidget {
|
||||
if (isChatToolPart(part)) part,
|
||||
];
|
||||
final model = '${row['model'] ?? ''}'.trim();
|
||||
final footer = <Widget>[
|
||||
if (tools.isNotEmpty) ChatToolCallsChip(calls: tools),
|
||||
if (model.isNotEmpty)
|
||||
Text(
|
||||
model,
|
||||
key: const Key('chat-reply-model'),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: _secondaryColor(context, _isCupertino(context)),
|
||||
),
|
||||
),
|
||||
];
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -213,24 +225,13 @@ class ChatMessageView extends StatelessWidget {
|
||||
key: const Key('chat-turn-reasoning'),
|
||||
steps: reasoning,
|
||||
streaming: row['streaming'] == true,
|
||||
trailing: footer,
|
||||
),
|
||||
if (tools.isNotEmpty || model.isNotEmpty)
|
||||
if (reasoning.isEmpty && footer.isNotEmpty)
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
if (tools.isNotEmpty) ChatToolCallsChip(calls: tools),
|
||||
// Which model answered, quietly, after the chips.
|
||||
if (model.isNotEmpty)
|
||||
Text(
|
||||
model,
|
||||
key: const Key('chat-reply-model'),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: _secondaryColor(context, _isCupertino(context)),
|
||||
),
|
||||
),
|
||||
],
|
||||
children: footer,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user