feat(app): a chat names its model (recorded, last reply's, or the agent default) and each reply shows the model that answered

This commit is contained in:
2026-10-23 18:57:36 +01:00
parent 1d9fd08b31
commit 35e343fe40
5 changed files with 102 additions and 2 deletions
@@ -202,18 +202,30 @@ class ChatMessageView extends StatelessWidget {
for (final part in parts)
if (isChatToolPart(part)) part,
];
final model = '${row['model'] ?? ''}'.trim();
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (content.isNotEmpty) bubble,
// Reasoning and tool calls share one quiet row below the answer.
if (reasoning.isNotEmpty || tools.isNotEmpty)
if (reasoning.isNotEmpty || tools.isNotEmpty || model.isNotEmpty)
Wrap(
spacing: 8,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
if (reasoning.isNotEmpty) ChatReasoningChip(steps: reasoning),
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)),
),
),
],
),
],