Skip to content

Commit 0f0d87f

Browse files
authored
fix thinking header (#267293)
* remove \n\n from header regex check * fix in chat contribution
1 parent e790554 commit 0f0d87f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ configurationRegistry.registerConfiguration({
638638
},
639639
[ChatConfiguration.ThinkingStyle]: {
640640
type: 'string',
641-
default: 'collapsedPreview',
641+
default: 'collapsed',
642642
enum: ['collapsed', 'collapsedPreview', 'expanded', 'none'],
643643
enumDescriptions: [
644644
nls.localize('chat.agent.thinkingMode.collapsed', "Thinking parts will be collapsed by default."),

src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function extractTextFromPart(content: IChatThinkingPart): string {
2121
}
2222

2323
function extractTitleFromThinkingContent(content: string): string | undefined {
24-
const headerMatch = content.match(/^\*\*([^*]+)\*\*\s*\n\n/);
24+
const headerMatch = content.match(/^\*\*([^*]+)\*\*\s*/);
2525
return headerMatch ? headerMatch[1].trim() : undefined;
2626
}
2727

0 commit comments

Comments
 (0)