@@ -3,7 +3,6 @@ import * as fs from "node:fs";
33import * as path from "node:path" ;
44import * as os from "node:os" ;
55import OpenAI from "openai" ;
6- import MarkdownIt from "markdown-it" ;
76import type { SessionMessage } from "@vegamo/deepcode-core" ;
87import {
98 SessionManager ,
@@ -32,27 +31,21 @@ export class DeepCodeViewProvider implements vscode.WebviewViewProvider {
3231
3332 private readonly context : vscode . ExtensionContext ;
3433 private webviewView : vscode . WebviewView | undefined ;
35- private readonly md : MarkdownIt ;
3634 private readonly sessionManager : SessionManager ;
3735
3836 constructor ( context : vscode . ExtensionContext ) {
3937 this . context = context ;
40- this . md = new MarkdownIt ( {
41- html : false ,
42- linkify : false ,
43- breaks : true ,
44- } ) ;
4538 this . sessionManager = new SessionManager ( {
4639 projectRoot : this . getWorkspaceRoot ( ) ,
4740 createOpenAIClient : ( ) => this . createOpenAIClient ( ) ,
4841 getResolvedSettings : ( ) => this . resolveCurrentSettings ( ) ,
49- renderMarkdown : ( text ) => this . md . render ( text ) ,
42+ renderMarkdown : ( text ) => text ,
5043 onAssistantMessage : ( message : SessionMessage , shouldConnect : boolean ) => {
5144 if ( ! this . webviewView ) return ;
52- if ( message . visible === false ) return ;
45+ if ( ! message . visible ) return ;
5346 if ( message . role !== "tool" ) {
5447 const reasoningContent = ( message . messageParams as ReasoningMessageParams | null ) ?. reasoning_content ;
55- message . html = this . md . render ( message . content || reasoningContent || "" ) ;
48+ message . content = message . content || reasoningContent || "" ;
5649 }
5750 this . webviewView . webview . postMessage ( { type : "appendMessage" , message, shouldConnect } ) ;
5851 } ,
@@ -100,7 +93,6 @@ export class DeepCodeViewProvider implements vscode.WebviewViewProvider {
10093 const rpcContext : RouterContext = {
10194 sessionManager : this . sessionManager ,
10295 postMessage : ( message ) => this . webviewView ?. webview . postMessage ( message ) ,
103- renderMarkdown : ( text ) => this . md . render ( text ) ,
10496 copyToClipboard : ( text ) => void vscode . env . clipboard . writeText ( text ) ,
10597 openFileInEditor : ( filePath , line ) => this . openFileInEditor ( filePath , line ) ,
10698 getWorkspaceRoot : ( ) => this . getWorkspaceRoot ( ) ,
0 commit comments