dsh-neotui 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/md.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-neotui",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "Neo-TUI: mouse-driven terminal UI client for DeepSeek Harness (B-tier per dsh-tui-design.md)",
5
5
  "type": "module",
6
6
  "bin": { "dsh-neotui": "bin/dsh-tui.js" },
package/src/md.js CHANGED
@@ -246,7 +246,10 @@ export function renderMd(text, width) {
246
246
  const codeLines = codeBuf.length === 0 ? [""] : codeBuf;
247
247
  let maxLen = Math.max(...codeLines.map((l) => strWidth(l)), 1);
248
248
  const barW = Math.min(hw, maxLen + 2);
249
- lines.push([SEG("┌" + "─".repeat(Math.max(1, barW - 2)) + "┐", { fg: C.hr }), SEG(" " + lang, { fg: C.dim })]);
249
+ // a fence WITHOUT a language gets no label the bare "text" tag next
250
+ // to the box corner just looks like a rendering artifact
251
+ const tag = lang && lang !== "text" ? " " + lang : "";
252
+ lines.push([SEG("┌" + "─".repeat(Math.max(1, barW - 2)) + "┐" + tag, { fg: C.hr })]);
250
253
  for (const cl of codeLines) {
251
254
  const hls = highlightLine(cl, lang);
252
255
  lines.push([SEG("│ ", { fg: C.hr }), ...wrapSegs(hls, hw, { pad: true }).map((l) => l).flatMap((l, k) => (k === 0 ? l : [SEG(" ", { fg: C.hr }), ...l])), SEG(" │", { fg: C.hr })]);