dsh-neotui 0.0.4 → 0.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-neotui",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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/screen.js CHANGED
@@ -53,7 +53,13 @@ export class Screen {
53
53
  const cell = this.cells[y][x];
54
54
  const wide = wcwidth(ch.codePointAt(0)) === 2;
55
55
  if (wide && x + 1 >= this.w) ch = " "; // clip wide char at the right edge (terminal wrap corruption)
56
- cell.ch = ch; cell.fg = fg; cell.bg = bg; cell.attrs = attrs; cell.link = link;
56
+ cell.ch = ch; cell.fg = fg;
57
+ // bg -1 = transparent: KEEP the cell's existing background (the layer
58
+ // underneath) instead of resetting it to the terminal default — this is
59
+ // what used to leave "unexplained dark blocks" wherever widgets drew
60
+ // text/fills without an explicit background.
61
+ if (bg !== -1) cell.bg = bg;
62
+ cell.attrs = attrs; cell.link = link;
57
63
  cell.wide = wide && x + 1 < this.w;
58
64
  if (cell.wide) {
59
65
  const cont = this.cells[y][x + 1];
@@ -62,7 +68,7 @@ export class Screen {
62
68
  const next = this.cells[y][x + 2];
63
69
  next.ch = " "; next.wide = false; next.link = "";
64
70
  }
65
- cont.ch = ""; cont.fg = fg; cont.bg = bg; cont.attrs = attrs; cont.link = link; cont.wide = false;
71
+ cont.ch = ""; cont.fg = fg; cont.bg = cell.bg; cont.attrs = attrs; cont.link = link; cont.wide = false;
66
72
  }
67
73
  }
68
74
 
package/src/views.js CHANGED
@@ -541,7 +541,7 @@ export class ChatView extends Widget {
541
541
  this.input = new Input({
542
542
  x: this.x, y: this.y + this.h - 2, w: this.w, h: 1,
543
543
  multi: true, maxLines: 6,
544
- bg: T.BG2, border: T.BORDER2,
544
+ bg: T.PANEL,
545
545
  placeholder: "输入消息…(Ctrl+J 换行,Enter 发送)",
546
546
  onEnter: (v) => this.send(v),
547
547
  onChange: () => this.inputChanged(),
@@ -1094,7 +1094,6 @@ export class ChatView extends Widget {
1094
1094
  const isBlank = this.app.sessions.find((s) => s.sessionId === this.sessionId)?.blank ?? false;
1095
1095
  if (this.nodes.length === 0 && isBlank) {
1096
1096
  this.#renderWelcome(screen);
1097
- screen.hline(this.x, this.x + this.w - 1, this.input.y - 1, "─", { fg: T.BORDER2 });
1098
1097
  this.input.render(screen);
1099
1098
  return;
1100
1099
  }
@@ -1120,7 +1119,6 @@ export class ChatView extends Widget {
1120
1119
  }
1121
1120
  }
1122
1121
  this.#renderTodos(screen);
1123
- screen.hline(this.x, this.x + this.w - 1, this.input.y - 1, "─", { fg: T.BORDER2 });
1124
1122
  this.input.render(screen);
1125
1123
  }
1126
1124
 
@@ -2376,7 +2374,7 @@ export class App {
2376
2374
  renderFrame() {
2377
2375
  this.chat.flushRebuild();
2378
2376
  const s = this.screen;
2379
- s.clear(T.BG);
2377
+ s.clear(-1, T.BG);
2380
2378
  this.#renderTabBar(s);
2381
2379
  if (this.sidebarVisible) {
2382
2380
  if (this.searchActive) {
package/src/widgets.js CHANGED
@@ -336,7 +336,6 @@ export class Input extends Widget {
336
336
  if (!this.multi) {
337
337
  // single-line: horizontal scroll (search/rename/picker inputs)
338
338
  screen.fillRect(this.x, this.y, this.x + this.w - 1, this.y, " ", { bg: this.bg });
339
- screen.hline(this.x, this.x + this.w - 1, this.y, "─", { fg: this.border, bg: this.bg });
340
339
  const promptW = strWidth(this.prompt);
341
340
  const inner = Math.max(0, this.w - promptW - 2);
342
341
  screen.text(this.x, this.y, this.prompt, { fg: T.ACCENT, bg: this.bg });
@@ -358,7 +357,6 @@ export class Input extends Widget {
358
357
  const rows = this.#visualRows();
359
358
  const h = Math.min(this.maxLines, rows.length);
360
359
  screen.fillRect(this.x, this.y, this.x + this.w - 1, this.y + h - 1, " ", { bg: this.bg });
361
- screen.hline(this.x, this.x + this.w - 1, this.y, "─", { fg: this.border, bg: this.bg });
362
360
  if (this.value === "" && this.placeholder) {
363
361
  screen.text(this.x, this.y, this.prompt, { fg: T.ACCENT, bg: this.bg });
364
362
  screen.text(this.x + strWidth(this.prompt), this.y, truncate(this.placeholder, this.w - strWidth(this.prompt) - 2), { fg: T.FAINT, bg: this.bg });