Show injected Claude input as agent reports and notices, not operator bubbles
Claude Code records subagent/peer reports, task notifications, reminders and skill bodies as user-role entries. Classify them server-side (history and live stream) by origin/isMeta/queued_command mode: reports become kind agent_report, task notifications kind notice, harness meta is hidden, and the mid-turn wrapper is unwrapped to the operator's text. The app draws a collapsed Agent report card and a one-line system notice on the agent's side.
This commit is contained in:
@@ -373,7 +373,8 @@ class ChatThreadController extends ChangeNotifier {
|
||||
_running = next['running'] == true;
|
||||
if (!_running) {
|
||||
_liveAssistantMessageId = null;
|
||||
} else if (const ['text', 'reasoning', 'tool'].contains(body['kind'])) {
|
||||
} else if (const ['text', 'reasoning', 'tool'].contains(body['kind']) &&
|
||||
chatInjectedKind({'kind': body['message_kind']}) == null) {
|
||||
_liveAssistantMessageId = body['message_id'] as String?;
|
||||
}
|
||||
if (body['kind'] == 'step' &&
|
||||
|
||||
@@ -16,6 +16,7 @@ import '../ui/sessions/chat_adaptive.dart';
|
||||
import '../ui/sessions/session_actions.dart';
|
||||
import '../ui/transcript/chat_markdown_view.dart';
|
||||
import '../ui/transcript/chat_message_view.dart';
|
||||
import '../ui/transcript/chat_injected_rows.dart';
|
||||
import 'chat_background_tasks.dart';
|
||||
import 'chat_command_actions.dart';
|
||||
import 'chat_composer_bar.dart';
|
||||
@@ -1160,6 +1161,10 @@ class _ChatThreadViewState extends State<ChatThreadView> {
|
||||
if (kind == 'activity') {
|
||||
return _ChatActivityLine(row: row, onDismiss: onDismissCompaction);
|
||||
}
|
||||
if (kind == 'agent_report') {
|
||||
return ChatAgentReportCard(row: row, textBuilder: chatMarkdownText);
|
||||
}
|
||||
if (kind == 'system_notice') return ChatSystemNoticeLine(row: row);
|
||||
if (kind == 'permission' || kind == 'question') {
|
||||
return ChatTranscriptCard(
|
||||
row: row,
|
||||
|
||||
Reference in New Issue
Block a user