.kilo/plans/jetbrains-mdview-vscode-styling.md
Improve JetBrains markdown output so assistant/user transcript markdown visually matches the VS Code webview markdown style while keeping the existing Swing/JBHtmlPane + editor-backed code block architecture.
packages/ui/src/components/markdown.css, packages/kilo-ui/src/components/markdown.css, packages/kilo-ui/src/styles/vscode-bridge.css, and message-part overrides.textLinkForeground, text/strong/code-block use editor foreground, inline code uses charts/syntax green, quote/emphasis use description foreground, HR uses panel border.MdViewHybrid and MdViewHtmlPane, with shared CSS from MdCommon.rules() and defaults from MdCommon.defaults().EditorTextField with real IDE syntax highlighting and streaming retention. Preserve this instead of switching to web/JCEF rendering.Expand JetBrains markdown style tokens.
MdStyle for heading, strong, emphasis, inline code foreground, list marker, HR, table/header, and code block border colors.MdView override API stable unless a new external override is clearly needed.MdCommon.defaults(style) from IntelliJ/editor theme sources and centralized Kilo semantic colors where no platform key matches.JBColor.namedColor("Kilo.Markdown.*", fallback) for Kilo-specific markdown palette fallbacks, so themes can override them and runtime code avoids scattered hardcoded colors.Mirror VS Code markdown CSS in MdCommon.rules().
JBHtmlPane CSS.::marker, fall back to li { color: ... } plus child text color reset only if supported; otherwise keep list text normal and document the limitation in tests.JBHtmlPane supports it.MdViewHybrid currently filters thematic breaks, so this mainly benefits MdViewHtmlPane and future reuse.JBHtmlPane configuration already draws them acceptably.Polish JetBrains code block containers without losing IDE highlighting.
EditorTextField for fenced/indented blocks and JBTextArea fallback.JBScrollPane code blocks to match VS Code’s markdown-code wrapper feel: subtle background, subtle border, rounded-ish platform arc if feasible, 12px-ish padding, and thin horizontal scrollbar behavior.SessionUiStyle.View.Code for geometry constants. Add only minimal new constants there if current values cannot represent the VS Code spacing.SessionEditorStyle.applyToEditor(ed) so code blocks follow IDE syntax highlighting and editor font changes.Add file/path affordance parity where safe.
href looks like a relative file path, keep existing link dispatch so the current caller can open files/URLs appropriately.file-link class only when an openFile callback is available through the existing usage path. If the current MdView abstraction only has openUrl, do not widen it unless the call sites can pass file opening cleanly.Preserve retained Swing behavior.
MdViewHybrid.sync() prefix reuse logic unchanged unless necessary.reloadCssStylesheets() and reassign text only for retained JBHtmlPane blocks, not by rebuilding all blocks.Add focused tests.
MdViewTest and/or MdViewHybridTest to assert overrideSheet() contains the new VS Code-equivalent rules for headings, strong/emphasis, links, inline code foreground, list/table/blockquote spacing, HR, and code block/table border separation.applyStyle().@kilocode/kilo-jetbrains patch with user-facing wording such as Improve markdown readability in JetBrains chat transcripts.packages/kilo-jetbrains/: ./gradlew frontend:test --tests '*MdView*' if the Gradle module supports it; otherwise run the closest supported targeted Gradle test command.bun run typecheck from packages/kilo-jetbrains/../gradlew test from packages/kilo-jetbrains/.packages/kilo-jetbrains/ and .changeset/ unless a shared Kilo UI source of truth is explicitly required.kilocode_change markers are needed for JetBrains or Kilo UI paths.