fix: clean up progress tracking, fix subagent summary field handling

- Use system/task_progress subtype (not top-level type) for subagent events
- Extract intermediate assistant text between tool calls as progress
- Only show SDK-generated summaries for subagent progress (skip noisy per-tool updates)
- Truncate progress messages to Discord 2000 char limit
- Remove verbose debug logging from production
This commit is contained in:
Eyejoker
2026-03-23 17:59:49 +09:00
parent 7908115ea8
commit 0438d9113b
3 changed files with 24 additions and 7 deletions

View File

@@ -212,7 +212,10 @@ export class MessageTurnController {
if (minutes > 0) elapsedParts.push(`${minutes}`);
elapsedParts.push(`${seconds}`);
return `${TASK_STATUS_MESSAGE_PREFIX}${text}\n\n${elapsedParts.join(' ')}`;
const suffix = `\n\n${elapsedParts.join(' ')}`;
const maxText = 2000 - TASK_STATUS_MESSAGE_PREFIX.length - suffix.length;
const truncated = text.length > maxText ? text.slice(0, maxText - 1) + '…' : text;
return `${TASK_STATUS_MESSAGE_PREFIX}${truncated}${suffix}`;
}
private clearProgressTicker(): void {