dsh-neotui 0.1.25 → 0.1.26
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/panels.js +10 -19
package/package.json
CHANGED
package/src/panels.js
CHANGED
|
@@ -1977,7 +1977,7 @@ export class ModelPanel extends Widget {
|
|
|
1977
1977
|
formLines.push([{ t: ` ${truncate(it.sub, w - 8)}`, fg: K.FAINT, bg: T.BG2 }]);
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
|
-
formLines.push([{ t: isSub ? " ↑/↓ 移动 · Enter 编辑或执行 · Esc 返回" : " ↑/↓
|
|
1980
|
+
formLines.push([{ t: isSub ? " ↑/↓ 移动 · Enter 编辑或执行 · Esc 返回" : " ↑/↓ 移动 · → 进入选项 · ← 返回列表 · Enter 编辑或执行 · Esc 退出", fg: K.FAINT }]);
|
|
1981
1981
|
}
|
|
1982
1982
|
this.formView.setLines(formLines);
|
|
1983
1983
|
}
|
|
@@ -2243,39 +2243,30 @@ export class ModelPanel extends Widget {
|
|
|
2243
2243
|
return false;
|
|
2244
2244
|
}
|
|
2245
2245
|
if (ev.name === "escape") { this.editing = null; return false; } // App falls back to chat mode
|
|
2246
|
-
//
|
|
2247
|
-
//
|
|
2246
|
+
// dual-focus navigation: ↑/↓ move the cursor INSIDE the focused region —
|
|
2247
|
+
// the provider column in list focus, the option rows in form focus.
|
|
2248
|
+
// → enters the form, ← returns to the list.
|
|
2248
2249
|
if (ev.name === "up" || (ev.name === "char" && ev.key === "k" && !ev.ctrl)) {
|
|
2249
|
-
this.sel = Math.max(0, this.sel - 1);
|
|
2250
|
-
this.
|
|
2250
|
+
if (this.mode === "list") this.sel = Math.max(0, this.sel - 1);
|
|
2251
|
+
else this.formIdx = Math.max(0, this.formIdx - 1);
|
|
2251
2252
|
this.#rebuild();
|
|
2252
2253
|
this.app.redraw();
|
|
2253
2254
|
return true;
|
|
2254
2255
|
}
|
|
2255
2256
|
if (ev.name === "down" || (ev.name === "char" && ev.key === "j" && !ev.ctrl)) {
|
|
2256
|
-
this.sel = Math.min(this.routes.length, this.sel + 1);
|
|
2257
|
-
this.
|
|
2257
|
+
if (this.mode === "list") this.sel = Math.min(this.routes.length, this.sel + 1);
|
|
2258
|
+
else this.formIdx = Math.min(Math.max(0, this.formItems.length - 1), this.formIdx + 1);
|
|
2258
2259
|
this.#rebuild();
|
|
2259
2260
|
this.app.redraw();
|
|
2260
2261
|
return true;
|
|
2261
2262
|
}
|
|
2262
|
-
// →/Tab: into the form, then down its rows; ←/Shift+Tab: up the form,
|
|
2263
|
-
// and at the top back to the provider list
|
|
2264
2263
|
if (ev.name === "right" || (ev.name === "char" && ev.key === "l" && !ev.ctrl) || ev.name === "tab") {
|
|
2265
|
-
if (this.#route() != null) {
|
|
2266
|
-
if (this.mode === "form") this.formIdx = Math.min(Math.max(0, this.formItems.length - 1), this.formIdx + 1);
|
|
2267
|
-
else this.mode = "form";
|
|
2268
|
-
this.#rebuild();
|
|
2269
|
-
}
|
|
2264
|
+
if (this.#route() != null && this.mode !== "form") { this.mode = "form"; this.#rebuild(); }
|
|
2270
2265
|
this.app.redraw();
|
|
2271
2266
|
return true;
|
|
2272
2267
|
}
|
|
2273
2268
|
if (ev.name === "left" || (ev.name === "char" && ev.key === "h" && !ev.ctrl) || ev.name === "backtab") {
|
|
2274
|
-
if (this.mode === "form") {
|
|
2275
|
-
if (this.formIdx > 0) this.formIdx--;
|
|
2276
|
-
else this.mode = "list";
|
|
2277
|
-
this.#rebuild();
|
|
2278
|
-
}
|
|
2269
|
+
if (this.mode === "form") { this.mode = "list"; this.#rebuild(); }
|
|
2279
2270
|
this.app.redraw();
|
|
2280
2271
|
return true;
|
|
2281
2272
|
}
|