@phren/cli 0.1.46 → 0.1.47
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/dist/cli/namespaces-utils.d.ts +5 -0
- package/dist/cli/namespaces-utils.js +12 -12
- package/dist/editor/buffer.d.ts +48 -0
- package/dist/editor/buffer.js +312 -0
- package/dist/editor/launch.d.ts +41 -0
- package/dist/editor/launch.js +92 -0
- package/dist/editor/save.d.ts +15 -0
- package/dist/editor/save.js +70 -0
- package/dist/shell/editor-view.d.ts +8 -0
- package/dist/shell/editor-view.js +67 -0
- package/dist/shell/entry.js +31 -4
- package/dist/shell/input.d.ts +24 -0
- package/dist/shell/input.js +73 -6
- package/dist/shell/render-api.js +1 -0
- package/dist/shell/render.js +9 -2
- package/dist/shell/shell.d.ts +23 -1
- package/dist/shell/shell.js +125 -1
- package/dist/shell/view.d.ts +5 -1
- package/dist/shell/view.js +21 -4
- package/package.json +1 -1
package/dist/shell/view.js
CHANGED
|
@@ -83,11 +83,11 @@ function renderBottomBar(state, navMode, inputCtx, inputBuf) {
|
|
|
83
83
|
// Only what you reach for constantly. Everything else is one `?` away, so
|
|
84
84
|
// the bar never costs more than a single row.
|
|
85
85
|
const essentials = {
|
|
86
|
-
Projects: [`${k("↑↓")} ${d("move")}`, `${k("↵")} ${d("open")}`],
|
|
86
|
+
Projects: [`${k("↑↓")} ${d("move")}`, `${k("↵")} ${d("open")}`, `${k("e")} ${d("edit CLAUDE.md")}`],
|
|
87
87
|
Tasks: [`${k("↑↓")} ${d("move")}`, `${k("a")} ${d("add")}`, `${k("↵")} ${d("done")}`],
|
|
88
88
|
Findings: [`${k("↑↓")} ${d("move")}`, `${k("a")} ${d("add")}`],
|
|
89
89
|
"Review Queue": [`${k("↑↓")} ${d("move")}`, `${k("↵")} ${d("inspect")}`],
|
|
90
|
-
Skills: [`${k("↑↓")} ${d("move")}`, `${k("t")} ${d("toggle")}`],
|
|
90
|
+
Skills: [`${k("↑↓")} ${d("move")}`, `${k("e")} ${d("edit")}`, `${k("t")} ${d("toggle")}`],
|
|
91
91
|
Hooks: [`${k("↑↓")} ${d("move")}`, `${k("a")} ${d("enable")}`],
|
|
92
92
|
Health: [`${k("↑↓")} ${d("scroll")}`],
|
|
93
93
|
Graph: [`${k("↑↓←→")} ${d("walk")}`, `${k("↵")} ${d("select")}`, `${k("w")} ${d("watch")}`, `${k("a")} ${d("agents")}`],
|
|
@@ -467,6 +467,11 @@ export function getProjectSkills(phrenPath, project) {
|
|
|
467
467
|
name: skill.name,
|
|
468
468
|
path: skill.path,
|
|
469
469
|
enabled: skill.enabled,
|
|
470
|
+
// Carried so actions do not have to guess: a global skill toggled with the
|
|
471
|
+
// project as its scope writes a key nothing reads, and a path recovered by
|
|
472
|
+
// splitting a display string breaks on any path containing the separator.
|
|
473
|
+
scopeType: skill.scopeType,
|
|
474
|
+
storePath,
|
|
470
475
|
}));
|
|
471
476
|
}
|
|
472
477
|
/** Max lines of skill content to show inline when selected. */
|
|
@@ -664,7 +669,7 @@ function renderHealthView(phrenPath, doctor, cursor, height, currentScroll, setS
|
|
|
664
669
|
return { lines: vp.lines, lineCount };
|
|
665
670
|
}
|
|
666
671
|
// ── Main render ────────────────────────────────────────────────────────────
|
|
667
|
-
export async function renderShell(ctx, navMode, inputCtx, inputBuf, showHelp, message, doctorSnapshot, subsectionsCache, setHealthLineCount, setSubsectionsCache) {
|
|
672
|
+
export async function renderShell(ctx, navMode, inputCtx, inputBuf, showHelp, helpScroll, message, doctorSnapshot, subsectionsCache, setHealthLineCount, setSubsectionsCache) {
|
|
668
673
|
const graphSummaryLine = ctx.state.view === "Graph" && ctx.graph ? graphSummary(ctx.graph()) : "";
|
|
669
674
|
const topBar = renderTopBar(ctx.state, graphSummaryLine);
|
|
670
675
|
const bottomBar = renderBottomBar(ctx.state, navMode, inputCtx, inputBuf);
|
|
@@ -674,7 +679,19 @@ export async function renderShell(ctx, navMode, inputCtx, inputBuf, showHelp, me
|
|
|
674
679
|
const height = contentHeight(topBar, bottomBar, hasMessage);
|
|
675
680
|
let contentLines;
|
|
676
681
|
if (showHelp) {
|
|
677
|
-
|
|
682
|
+
// The help is longer than a small terminal, and used to be clipped in
|
|
683
|
+
// silence — on 24 rows more than half of it simply was not there.
|
|
684
|
+
const all = shellHelpText().split("\n");
|
|
685
|
+
if (all.length <= height) {
|
|
686
|
+
contentLines = all;
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
const maxScroll = all.length - (height - 1);
|
|
690
|
+
const start = Math.max(0, Math.min(helpScroll, maxScroll));
|
|
691
|
+
contentLines = all.slice(start, start + height - 1);
|
|
692
|
+
const atEnd = start >= maxScroll;
|
|
693
|
+
contentLines.push(style.dim(` ━━━ ${start + 1}-${start + height - 1} of ${all.length} ${atEnd ? "↑ back" : "↑↓ scroll"}`));
|
|
694
|
+
}
|
|
678
695
|
}
|
|
679
696
|
else {
|
|
680
697
|
switch (ctx.state.view) {
|