dsh-neotui 0.0.5 → 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 +1 -1
- package/src/views.js +1 -3
- package/src/widgets.js +0 -2
package/package.json
CHANGED
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.
|
|
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
|
|
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 });
|