Skip to content

Commit 5d85963

Browse files
roblourenspierceboggan
authored andcommitted
Don't add empty #thinking sections to logs (#537)
1 parent 2e21df0 commit 5d85963

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/extension/prompt/vscode-node/requestLoggerImpl.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,14 @@ export class RequestLogger extends AbstractRequestLogger {
219219
result.push(`~~~`);
220220
}
221221

222-
if (entry.thinking) {
222+
if (entry.thinking?.text) {
223223
result.push(`## Thinking`);
224224
if (entry.thinking.id) {
225225
result.push(`thinkingId: ${entry.thinking.id}`);
226226
}
227-
if (entry.thinking.text) {
228-
result.push(`~~~`);
229-
result.push(entry.thinking.text);
230-
result.push(`~~~`);
231-
}
227+
result.push(`~~~`);
228+
result.push(entry.thinking.text);
229+
result.push(`~~~`);
232230
}
233231

234232
return result.join('\n');

0 commit comments

Comments
 (0)