dsh-neotui 0.1.23 → 0.1.24

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/panels.js +30 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-neotui",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
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": {
package/src/panels.js CHANGED
@@ -1947,7 +1947,7 @@ export class ModelPanel extends Widget {
1947
1947
  }
1948
1948
  formLines.push([{ t: truncate(t, w), fg: cur ? T.SELFG : T.TXT, bg: cur ? T.MENUSEL : T.BG2 }]);
1949
1949
  }
1950
- formLines.push([{ t: " ↑/↓ 移动 · Enter 编辑或执行 · ← 回列表 · Esc 退出", fg: K.FAINT }]);
1950
+ formLines.push([{ t: " ↑/↓ 换供应商 · →/Tab 进表单(再按下移) · ← 上移/回列表 · Enter 编辑或执行 · Esc 退出", fg: K.FAINT }]);
1951
1951
  }
1952
1952
  this.formView.setLines(formLines);
1953
1953
  }
@@ -1955,7 +1955,7 @@ export class ModelPanel extends Widget {
1955
1955
  screen.fillRect(this.x, this.y, this.x + this.w - 1, this.y + this.h - 1, " ", {});
1956
1956
  const mid = this.x + 26;
1957
1957
  screen.vline(mid, this.y, this.y + this.h - 1, "│", { fg: T.BORDER });
1958
- screen.text(this.x + 1, this.y, " 模型供应商 — CC Switch 式", { fg: K.DIM });
1958
+ screen.text(this.x + 1, this.y, " 模型供应商", { fg: K.DIM });
1959
1959
  this.listView.render(screen);
1960
1960
  this.formView.render(screen);
1961
1961
  if (this.editing) {
@@ -2195,20 +2195,39 @@ export class ModelPanel extends Widget {
2195
2195
  return false;
2196
2196
  }
2197
2197
  if (ev.name === "escape") { this.editing = null; return false; } // App falls back to chat mode
2198
- if (ev.name === "left" || (ev.name === "char" && ev.key === "h" && !ev.ctrl)) { this.mode = "list"; this.#rebuild(); return true; }
2199
- if (ev.name === "right" || (ev.name === "char" && ev.key === "l" && !ev.ctrl) || ev.name === "tab") {
2200
- if (this.#route() != null) { this.mode = "form"; this.#rebuild(); }
2201
- return true;
2202
- }
2198
+ // ↑/↓ ALWAYS walk the provider column (the list is the primary axis
2199
+ // UCAS and 添加供应商 are both reachable by the arrow keys alone)
2203
2200
  if (ev.name === "up" || (ev.name === "char" && ev.key === "k" && !ev.ctrl)) {
2204
- if (this.mode === "list") this.sel = Math.max(0, this.sel - 1);
2205
- else { this.formIdx = Math.max(0, this.formIdx - 1); this.#rebuild(); }
2201
+ this.sel = Math.max(0, this.sel - 1);
2202
+ this.mode = "list";
2203
+ this.#rebuild();
2206
2204
  this.app.redraw();
2207
2205
  return true;
2208
2206
  }
2209
2207
  if (ev.name === "down" || (ev.name === "char" && ev.key === "j" && !ev.ctrl)) {
2210
- if (this.mode === "list") this.sel = Math.min(this.routes.length, this.sel + 1);
2211
- else { this.formIdx = Math.min(Math.max(0, this.formItems.length - 1), this.formIdx + 1); this.#rebuild(); }
2208
+ this.sel = Math.min(this.routes.length, this.sel + 1);
2209
+ this.mode = "list";
2210
+ this.#rebuild();
2211
+ this.app.redraw();
2212
+ return true;
2213
+ }
2214
+ // →/Tab: into the form, then down its rows; ←/Shift+Tab: up the form,
2215
+ // and at the top back to the provider list
2216
+ if (ev.name === "right" || (ev.name === "char" && ev.key === "l" && !ev.ctrl) || ev.name === "tab") {
2217
+ if (this.#route() != null) {
2218
+ if (this.mode === "form") this.formIdx = Math.min(Math.max(0, this.formItems.length - 1), this.formIdx + 1);
2219
+ else this.mode = "form";
2220
+ this.#rebuild();
2221
+ }
2222
+ this.app.redraw();
2223
+ return true;
2224
+ }
2225
+ if (ev.name === "left" || (ev.name === "char" && ev.key === "h" && !ev.ctrl) || ev.name === "backtab") {
2226
+ if (this.mode === "form") {
2227
+ if (this.formIdx > 0) this.formIdx--;
2228
+ else this.mode = "list";
2229
+ this.#rebuild();
2230
+ }
2212
2231
  this.app.redraw();
2213
2232
  return true;
2214
2233
  }