oh-pi 0.1.15 → 0.1.16
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/utils/install.js
CHANGED
|
@@ -56,6 +56,7 @@ export function applyConfig(config) {
|
|
|
56
56
|
enableSkillCommands: true,
|
|
57
57
|
compaction: { enabled: true, reserveTokens, keepRecentTokens: 20000 },
|
|
58
58
|
retry: { enabled: true, maxRetries: 3 },
|
|
59
|
+
quietStartup: true,
|
|
59
60
|
};
|
|
60
61
|
if (config.providers.length > 1) {
|
|
61
62
|
settings.enabledModels = config.providers.flatMap((p) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* oh-pi Compact Header — replaces verbose startup with dense info block
|
|
2
|
+
* oh-pi Compact Header — replaces verbose startup with dense, styled info block
|
|
3
3
|
*/
|
|
4
4
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
5
|
+
import { VERSION } from "@mariozechner/pi-coding-agent";
|
|
5
6
|
import { truncateToWidth } from "@mariozechner/pi-tui";
|
|
6
7
|
|
|
7
8
|
export default function (pi: ExtensionAPI) {
|
|
@@ -10,38 +11,47 @@ export default function (pi: ExtensionAPI) {
|
|
|
10
11
|
|
|
11
12
|
ctx.ui.setHeader((_tui, theme) => ({
|
|
12
13
|
render(width: number): string[] {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const d = (s: string) => theme.fg("dim", s);
|
|
15
|
+
const a = (s: string) => theme.fg("accent", s);
|
|
16
|
+
const m = (s: string) => theme.fg("muted", s);
|
|
17
|
+
const bar = d("─".repeat(width));
|
|
16
18
|
|
|
17
|
-
// Gather info
|
|
18
19
|
const cmds = pi.getCommands();
|
|
19
20
|
const prompts = cmds.filter(c => c.source === "prompt").map(c => `/${c.name}`);
|
|
20
21
|
const skills = cmds.filter(c => c.source === "skill").map(c => c.name);
|
|
21
|
-
const exts = cmds.filter(c => c.source === "extension").map(c => `/${c.name}`);
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const model = ctx.model ? `${ctx.model.provider}/${ctx.model.id}` : "no model";
|
|
24
|
+
const thinking = pi.getThinkingLevel();
|
|
24
25
|
|
|
25
|
-
// Line 1:
|
|
26
|
+
// Line 1: pi version + model + thinking
|
|
27
|
+
const l1 = `${a("pi")} ${d(`v${VERSION}`)} ${m(model)} ${d("thinking:")}${a(thinking)}`;
|
|
28
|
+
|
|
29
|
+
// Line 2: keybindings (compact)
|
|
26
30
|
const keys = [
|
|
27
|
-
`${
|
|
28
|
-
`${
|
|
29
|
-
`${
|
|
30
|
-
`${
|
|
31
|
-
`${
|
|
32
|
-
`${
|
|
33
|
-
`${
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// Line
|
|
31
|
+
`${a("esc")}${d(":")}interrupt`,
|
|
32
|
+
`${a("^C")}${d(":")}clear`,
|
|
33
|
+
`${a("^P")}${d(":")}model`,
|
|
34
|
+
`${a("S-tab")}${d(":")}thinking`,
|
|
35
|
+
`${a("^O")}${d(":")}expand`,
|
|
36
|
+
`${a("/")}${d(":")}cmd`,
|
|
37
|
+
`${a("!")}${d(":")}bash`,
|
|
38
|
+
`${a("^G")}${d(":")}editor`,
|
|
39
|
+
].join(d(" "));
|
|
40
|
+
|
|
41
|
+
// Line 3: prompts + skills
|
|
38
42
|
const parts: string[] = [];
|
|
39
|
-
if (prompts.length) parts.push(`${
|
|
40
|
-
if (skills.length) parts.push(`${
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
if (prompts.length) parts.push(`${d("prompts")} ${a(prompts.join(" "))}`);
|
|
44
|
+
if (skills.length) parts.push(`${d("skills")} ${a(skills.join(" "))}`);
|
|
45
|
+
|
|
46
|
+
const lines = [
|
|
47
|
+
"",
|
|
48
|
+
truncateToWidth(l1, width),
|
|
49
|
+
truncateToWidth(keys, width),
|
|
50
|
+
];
|
|
51
|
+
if (parts.length) lines.push(truncateToWidth(parts.join(d(" │ ")), width));
|
|
52
|
+
lines.push(bar);
|
|
43
53
|
|
|
44
|
-
return
|
|
54
|
+
return lines;
|
|
45
55
|
},
|
|
46
56
|
invalidate() {},
|
|
47
57
|
}));
|