Show recorded timing and progress in background task lists
This commit is contained in:
@@ -256,7 +256,33 @@ JsonMap? perfChatReply(JsonMap request) {
|
||||
// watch the sent message itself.
|
||||
return {'id': id, 'type': 'chat_prompt', 'chat_queued': false};
|
||||
case 'chat_shells':
|
||||
return {'id': id, 'type': 'chat_shells', 'chat_shells': const []};
|
||||
return {
|
||||
'id': id,
|
||||
'type': 'chat_shells',
|
||||
'chat_shells': _params['tasks'] == 'rich'
|
||||
? backgroundTaskFixture()
|
||||
: const [],
|
||||
};
|
||||
case 'chat_shell_output':
|
||||
final outputQuery = request['chat_shell_output_query'];
|
||||
final outputId = outputQuery is Map ? outputQuery['shell_id'] : null;
|
||||
final selectedTask = _params['tasks'] == 'rich'
|
||||
? backgroundTaskFixture()
|
||||
.where((task) => task['id'] == outputId)
|
||||
.firstOrNull
|
||||
: null;
|
||||
return {
|
||||
'id': id,
|
||||
'type': 'chat_shell_output',
|
||||
'chat_shell_output': selectedTask == null
|
||||
? {'unavailable': true}
|
||||
: {
|
||||
'shell': selectedTask,
|
||||
'output':
|
||||
'Checking the integration changes…\nTargeted checks passed.\nReviewing remaining findings.',
|
||||
'cursor': 0,
|
||||
},
|
||||
};
|
||||
case 'chat_messages':
|
||||
final query = request['chat_query'];
|
||||
final session = query is Map ? '${query['session_id'] ?? ''}' : '';
|
||||
@@ -321,3 +347,35 @@ List<JsonMap> perfChatRows() => [for (var i = 0; i < _chats; i++) _chatRow(i)];
|
||||
/// The text of message `perf-m<m>` in the bench's short transcript, newest
|
||||
/// last (20 messages).
|
||||
String perfChatMessageText(int m) => m.isEven ? 'Question $m' : _answer(m);
|
||||
|
||||
/// Opt-in recorded task facts for background-list captures; never contacts a backend.
|
||||
List<JsonMap> backgroundTaskFixture() => [
|
||||
{
|
||||
'id': 'task-review',
|
||||
'status': 'running',
|
||||
'command': 'Agent: Review the integration changes',
|
||||
'task_type': 'agent',
|
||||
'description': 'Review the integration changes',
|
||||
'started_at': DateTime.utc(2026, 11, 6, 9, 5).millisecondsSinceEpoch,
|
||||
'updated_at': DateTime.utc(2026, 11, 6, 9, 24).millisecondsSinceEpoch,
|
||||
'progress': 'Checking tests and reviewing the remaining findings',
|
||||
'last_tool': 'Read',
|
||||
'tool_count': 18,
|
||||
'token_count': 12450,
|
||||
},
|
||||
{
|
||||
'id': 'task-checks',
|
||||
'status': 'running',
|
||||
'command': 'flutter analyze && integration checks',
|
||||
'task_type': 'shell',
|
||||
'started_at': DateTime.utc(2026, 11, 6, 9, 18).millisecondsSinceEpoch,
|
||||
'progress': 'Analyzing application sources',
|
||||
'tool_count': 0,
|
||||
},
|
||||
{
|
||||
'id': 'task-legacy',
|
||||
'status': 'running',
|
||||
'command': 'Wait for upstream release',
|
||||
'duration_ms': 74000,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user