Skip to content

Commit e03a61b

Browse files
authored
Fix microsoft/vscode#259022 always fallback when tool call content is empty (#7479)
* fix microsoft/vscode#258589 * Adopt checkboxes support * Fix microsoft/vscode#259022 always fallback when tool call content is empty
1 parent dea54e8 commit e03a61b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/sessionParsing.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ export function parseToolCallDetails(
201201
} else if (name === 'think') {
202202
return {
203203
toolName: 'Thought',
204-
invocationMessage: content
204+
invocationMessage: content || 'Thought',
205205
};
206206
} else if (name === 'report_progress') {
207207
const details: ParsedToolCallDetails = {
208208
toolName: 'Progress Update',
209-
invocationMessage: `${args.prDescription}` || content
209+
invocationMessage: `${args.prDescription}` || content || 'Progress Update'
210210
};
211211
if (args.commitMessage) {
212212
details.originMessage = `Commit: ${args.commitMessage}`;
@@ -217,7 +217,7 @@ export function parseToolCallDetails(
217217
const bashContent = [command, content].filter(Boolean).join('\n');
218218
const details: ParsedToolCallDetails = {
219219
toolName: 'Run Bash command',
220-
invocationMessage: bashContent
220+
invocationMessage: bashContent || 'Run Bash command',
221221
};
222222

223223
// Use the terminal-specific data for bash commands
@@ -235,7 +235,7 @@ export function parseToolCallDetails(
235235
// Unknown tool type
236236
return {
237237
toolName: name || 'unknown',
238-
invocationMessage: content
238+
invocationMessage: content || name || 'unknown'
239239
};
240240
}
241241
}

0 commit comments

Comments
 (0)