Skip to content

Commit 3b14f1c

Browse files
authored
agent sessions - strip markdown from description (workaround #279938) (#279965)
1 parent b299fed commit 3b14f1c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6+
import { renderAsPlaintext } from '../../../../../base/browser/markdownRenderer.js';
67
import { coalesce } from '../../../../../base/common/arrays.js';
78
import { CancellationToken } from '../../../../../base/common/cancellation.js';
89
import { Codicon } from '../../../../../base/common/codicons.js';
@@ -150,7 +151,7 @@ export class LocalAgentsSessionsProvider extends Disposable implements IChatSess
150151
const sessionItem = this.toChatSessionItem(history);
151152
return sessionItem ? {
152153
...sessionItem,
153-
//todo@bpasero comment
154+
//todo@bpasero remove this property once classic view is gone
154155
history: true
155156
} : undefined;
156157
}));
@@ -176,7 +177,7 @@ export class LocalAgentsSessionsProvider extends Disposable implements IChatSess
176177
if (!description) {
177178
const responseValue = lastResponse?.response.toString();
178179
if (responseValue) {
179-
description = truncate(responseValue.replace(/\r?\n/g, ' '), 100);
180+
description = truncate(renderAsPlaintext({ value: responseValue }).replace(/\r?\n/g, ' '), 100); // ensure to strip any markdown
180181
}
181182
}
182183

0 commit comments

Comments
 (0)