feat: show tool activity sub-lines in progress messages
Display subagent tool descriptions as sub-lines under the main progress text, updating in-place via Discord message edit. Shows up to 5 recent tool activities (e.g., "Reading index.ts").
This commit is contained in:
@@ -32,7 +32,7 @@ interface ContainerInput {
|
||||
|
||||
interface ContainerOutput {
|
||||
status: 'success' | 'error';
|
||||
phase?: 'progress' | 'final';
|
||||
phase?: 'progress' | 'final' | 'tool-activity';
|
||||
result: string | null;
|
||||
newSessionId?: string;
|
||||
error?: string;
|
||||
@@ -554,6 +554,7 @@ async function runQuery(
|
||||
if (message.type === 'system' && (message as { subtype?: string }).subtype === 'task_progress') {
|
||||
const tp = message as Record<string, unknown>;
|
||||
const summary = typeof tp.summary === 'string' ? tp.summary : '';
|
||||
const description = typeof tp.description === 'string' ? tp.description : '';
|
||||
if (summary) {
|
||||
log(`Subagent progress: ${summary.slice(0, 200)}`);
|
||||
writeOutput({
|
||||
@@ -563,6 +564,14 @@ async function runQuery(
|
||||
newSessionId,
|
||||
});
|
||||
}
|
||||
if (description) {
|
||||
writeOutput({
|
||||
status: 'success',
|
||||
phase: 'tool-activity',
|
||||
result: description,
|
||||
newSessionId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (message.type === 'system' && (message as { subtype?: string }).subtype === 'task_started') {
|
||||
|
||||
Reference in New Issue
Block a user