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.
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-pi",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "One-click setup for pi-coding-agent. Like oh-my-zsh for pi.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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 dim = (s: string) => theme.fg("dim", s);
14
- const acc = (s: string) => theme.fg("accent", s);
15
- const mut = (s: string) => theme.fg("muted", s);
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 lines: string[] = [];
23
+ const model = ctx.model ? `${ctx.model.provider}/${ctx.model.id}` : "no model";
24
+ const thinking = pi.getThinkingLevel();
24
25
 
25
- // Line 1: keys
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
- `${acc("esc")} interrupt`,
28
- `${acc("ctrl+c")} clear/exit`,
29
- `${acc("shift+tab")} thinking`,
30
- `${acc("ctrl+p")} model`,
31
- `${acc("ctrl+o")} expand`,
32
- `${acc("/")} commands`,
33
- `${acc("!")} bash`,
34
- ].join(dim(" "));
35
- lines.push(truncateToWidth(keys, width));
36
-
37
- // Line 2: prompts + skills
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(`${mut("prompts")} ${acc(prompts.join(" "))}`);
40
- if (skills.length) parts.push(`${mut("skills")} ${acc(skills.join(" "))}`);
41
- if (exts.length) parts.push(`${mut("cmds")} ${acc(exts.join(" "))}`);
42
- if (parts.length) lines.push(truncateToWidth(parts.join(dim(" ")), width));
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 ["", ...lines, ""];
54
+ return lines;
45
55
  },
46
56
  invalidate() {},
47
57
  }));