Skip to content

Commit 2f4e6a9

Browse files
author
Nick Seagull
authored
Fix markdown format (#4)
1 parent 2e3186b commit 2f4e6a9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/extension/src/extension.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ class ChatSidebarViewProvider implements vscode.WebviewViewProvider {
119119
question: message.content,
120120
}),
121121
}
122-
).then((response) => response.text());
122+
)
123+
.then((response) => response.text())
124+
// Trim triple backticks
125+
.then((text) => {
126+
console.log("Received response:", text);
127+
return text.replace(/^`{3}[a-zA-Z]*/, "").replace(/`{3}$/, "");
128+
});
123129
sendMessage(response);
124130
} catch (error) {
125131
const parsedError = error as Error;

0 commit comments

Comments
 (0)