feat(app): chat reasoning is a chip beside the tool chip, opening its own sheet
This commit is contained in:
@@ -188,8 +188,8 @@ class ChatMessageView extends StatelessWidget {
|
||||
return widgets;
|
||||
}
|
||||
|
||||
/// The agent turn as the web lays it out: its reasoning as a quiet line
|
||||
/// above the answer, the answer in the bubble, and one tool chip below.
|
||||
/// The agent turn: the answer in the bubble, then one row with its reasoning
|
||||
/// and tool-call chips, each opening its own sheet.
|
||||
Widget _agentTurn(BuildContext context, List<Widget> content, Widget bubble) {
|
||||
final parts = _partsOf(row);
|
||||
final reasoning = [
|
||||
@@ -206,16 +206,16 @@ class ChatMessageView extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (reasoning.isNotEmpty)
|
||||
NativeDisclosure(
|
||||
key: const Key('chat-reasoning'),
|
||||
label: reasoning.length == 1
|
||||
? 'Reasoning'
|
||||
: 'Reasoning · ${reasoning.length} steps',
|
||||
childBuilder: (context) => SelectableText(reasoning.join('\n\n')),
|
||||
),
|
||||
if (content.isNotEmpty) bubble,
|
||||
if (tools.isNotEmpty) ChatToolCallsChip(calls: tools),
|
||||
// Reasoning and tool calls share one quiet row below the answer.
|
||||
if (reasoning.isNotEmpty || tools.isNotEmpty)
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
children: [
|
||||
if (reasoning.isNotEmpty) ChatReasoningChip(steps: reasoning),
|
||||
if (tools.isNotEmpty) ChatToolCallsChip(calls: tools),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user