dsh-neotui 0.0.7 → 0.0.8
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 +1 -0
- package/src/views.js +13 -2
package/package.json
CHANGED
package/src/panels.js
CHANGED
|
@@ -222,6 +222,7 @@ export function buildCommandPalette(app) {
|
|
|
222
222
|
const w = Math.min(70, app.screen.w - 4), h = Math.min(26, app.screen.h - 4);
|
|
223
223
|
const items = [
|
|
224
224
|
{ label: "新建会话", hint: "n", action: () => app.newSession(), keywords: "new session create" },
|
|
225
|
+
{ label: "新建工作区…", action: () => app.addWorkspace(), keywords: "new workspace create directory" },
|
|
225
226
|
{ label: "打开会话…", hint: "o", action: () => app.openSessionPicker(), keywords: "open session" },
|
|
226
227
|
{ label: "搜索会话", hint: "/", action: () => app.startSearch(), keywords: "search find" },
|
|
227
228
|
{ label: "重命名当前会话", action: () => app.renameCurrent(), keywords: "rename title" },
|
package/src/views.js
CHANGED
|
@@ -460,11 +460,19 @@ class SidebarTree extends Widget {
|
|
|
460
460
|
if (ev.kind === "press" && ev.button === 2) {
|
|
461
461
|
const idx = this.scrollY + (ev.y - this.y - 2);
|
|
462
462
|
const row = this.rows[idx];
|
|
463
|
-
if (!row)
|
|
463
|
+
if (!row) {
|
|
464
|
+
// right-click on empty sidebar space → workspace-level actions
|
|
465
|
+
this.app.openMenu([
|
|
466
|
+
{ label: "新建工作区…", action: () => this.app.addWorkspace() },
|
|
467
|
+
{ label: "新建会话", action: () => this.app.newSessionIn(null) },
|
|
468
|
+
], ev);
|
|
469
|
+
return true;
|
|
470
|
+
}
|
|
464
471
|
this.sel = idx;
|
|
465
472
|
if (row.kind === "group") {
|
|
466
473
|
const items = [
|
|
467
474
|
{ label: "新建会话", action: () => this.app.newSessionIn(row.group) },
|
|
475
|
+
{ label: "新建工作区…", action: () => this.app.addWorkspace() },
|
|
468
476
|
{ label: "折叠全部", action: () => { this.collapseAll(); this.app.redraw(); } },
|
|
469
477
|
{ label: "展开全部", action: () => { this.expandAll(); this.app.redraw(); } },
|
|
470
478
|
];
|
|
@@ -2263,7 +2271,10 @@ export class App {
|
|
|
2263
2271
|
if (ev.ctrl && ev.key === "m") { this.overlay = buildModelPicker(this); this.redraw(); return; }
|
|
2264
2272
|
if (ev.name === "f8") { this.rotatePermission(); return; }
|
|
2265
2273
|
if (ev.name === "f9") { this.showModePicker(); return; }
|
|
2266
|
-
if (ev.ctrl && ev.key === "w") {
|
|
2274
|
+
if (ev.ctrl && ev.key === "w") {
|
|
2275
|
+
if (ev.shift) { this.addWorkspace(); return; }
|
|
2276
|
+
this.setMode("workspace"); return;
|
|
2277
|
+
}
|
|
2267
2278
|
if (ev.ctrl && ev.key === "t") { this.setMode("trajectory"); return; }
|
|
2268
2279
|
if (ev.ctrl && ev.key === "j") { this.showJobs(); return; }
|
|
2269
2280
|
if (ev.ctrl && ev.key === "g") { this.showGoal(); return; }
|