81
const command = unwrapShellInvocation(item.command ?? '');
82
if (pendingPreflight && pendingPreflight.command === command) {
84
>
// item (it carries the real output/approval), dropping the
85
>
// output-less pre-flight box.
86
>
pendingPreflight = undefined;
87
>
parts.push(shellToolCallPart(item, command));
88
>
continue;
89
>
}
90
flushPreflight();
91
const success = item.status === 'completed' && (item.exitCode === 0 || item.exitCode === null);
92
const output = item.aggregatedOutput ?? '';
93
if (success && !output) {
95
>
continue;
96
>
}
97
parts.push(shellToolCallPart(item, command));
98
continue;