This repository was archived by the owner on May 15, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
cli/cmd/tui/routes/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ import { DialogTimeline } from "./dialog-timeline"
5858import { DialogForkFromTimeline } from "./dialog-fork-from-timeline"
5959import { DialogSessionRename } from "../../component/dialog-session-rename"
6060import { Sidebar } from "./sidebar"
61+ import { Flag } from "@/flag/flag"
6162import { LANGUAGE_EXTENSIONS } from "@/lsp/language"
6263import parsers from "../../../../../../parsers-config.ts"
6364import { Clipboard } from "../../util/clipboard"
@@ -1338,15 +1339,26 @@ function TextPart(props: { last: boolean; part: TextPart; message: AssistantMess
13381339 return (
13391340 < Show when = { props . part . text . trim ( ) } >
13401341 < box id = { "text-" + props . part . id } paddingLeft = { 3 } marginTop = { 1 } flexShrink = { 0 } >
1341- < code
1342- filetype = "markdown"
1343- drawUnstyledText = { false }
1344- streaming = { true }
1345- syntaxStyle = { syntax ( ) }
1346- content = { props . part . text . trim ( ) }
1347- conceal = { ctx . conceal ( ) }
1348- fg = { theme . text }
1349- />
1342+ < Switch >
1343+ < Match when = { Flag . OPENCODE_EXPERIMENTAL_MARKDOWN } >
1344+ < markdown
1345+ syntaxStyle = { syntax ( ) }
1346+ content = { props . part . text . trim ( ) }
1347+ conceal = { ctx . conceal ( ) }
1348+ />
1349+ </ Match >
1350+ < Match when = { ! Flag . OPENCODE_EXPERIMENTAL_MARKDOWN } >
1351+ < code
1352+ filetype = "markdown"
1353+ drawUnstyledText = { false }
1354+ streaming = { true }
1355+ syntaxStyle = { syntax ( ) }
1356+ content = { props . part . text . trim ( ) }
1357+ conceal = { ctx . conceal ( ) }
1358+ fg = { theme . text }
1359+ />
1360+ </ Match >
1361+ </ Switch >
13501362 </ box >
13511363 </ Show >
13521364 )
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export namespace Flag {
4646 export const OPENCODE_EXPERIMENTAL_LSP_TOOL = OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_LSP_TOOL" )
4747 export const OPENCODE_DISABLE_FILETIME_CHECK = truthy ( "OPENCODE_DISABLE_FILETIME_CHECK" )
4848 export const OPENCODE_EXPERIMENTAL_PLAN_MODE = OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_PLAN_MODE" )
49+ export const OPENCODE_EXPERIMENTAL_MARKDOWN = OPENCODE_EXPERIMENTAL || truthy ( "OPENCODE_EXPERIMENTAL_MARKDOWN" )
4950 export const OPENCODE_MODELS_URL = process . env [ "OPENCODE_MODELS_URL" ]
5051
5152 function number ( key : string ) {
You can’t perform that action at this time.
0 commit comments