oh-pi 0.1.14 → 0.1.15

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/index.js CHANGED
@@ -36,7 +36,7 @@ async function quickFlow(env) {
36
36
  providers,
37
37
  theme,
38
38
  keybindings: "default",
39
- extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer"],
39
+ extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header"],
40
40
  skills: ["quick-setup", "debug-helper", "git-workflow"],
41
41
  prompts: ["review", "fix", "explain", "commit", "test"],
42
42
  agents: "general-developer",
@@ -5,7 +5,7 @@ const PRESETS = {
5
5
  labelKey: "preset.starter", hintKey: "preset.starterHint",
6
6
  config: {
7
7
  theme: "oh-p-dark", keybindings: "default", thinking: "medium",
8
- extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer"],
8
+ extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header"],
9
9
  skills: ["quick-setup", "debug-helper"],
10
10
  prompts: ["review", "fix", "explain", "commit"],
11
11
  agents: "general-developer",
@@ -15,7 +15,7 @@ const PRESETS = {
15
15
  labelKey: "preset.pro", hintKey: "preset.proHint",
16
16
  config: {
17
17
  theme: "catppuccin-mocha", keybindings: "default", thinking: "high",
18
- extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer"],
18
+ extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header"],
19
19
  skills: ["quick-setup", "debug-helper", "git-workflow"],
20
20
  prompts: ["review", "fix", "explain", "commit", "test", "refactor", "optimize", "document", "pr"],
21
21
  agents: "fullstack-developer",
@@ -25,7 +25,7 @@ const PRESETS = {
25
25
  labelKey: "preset.security", hintKey: "preset.securityHint",
26
26
  config: {
27
27
  theme: "cyberpunk", keybindings: "default", thinking: "high",
28
- extensions: ["safe-guard", "custom-footer"],
28
+ extensions: ["safe-guard", "custom-footer", "compact-header"],
29
29
  skills: ["debug-helper"],
30
30
  prompts: ["review", "security", "fix", "explain"],
31
31
  agents: "security-researcher",
@@ -35,7 +35,7 @@ const PRESETS = {
35
35
  labelKey: "preset.dataai", hintKey: "preset.dataaiHint",
36
36
  config: {
37
37
  theme: "tokyo-night", keybindings: "default", thinking: "medium",
38
- extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer"],
38
+ extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header"],
39
39
  skills: ["quick-setup", "debug-helper"],
40
40
  prompts: ["review", "fix", "explain", "optimize", "document", "test"],
41
41
  agents: "data-ai-engineer",
@@ -52,7 +52,7 @@ const PRESETS = {
52
52
  labelKey: "preset.full", hintKey: "preset.fullHint",
53
53
  config: {
54
54
  theme: "oh-p-dark", keybindings: "default", thinking: "high",
55
- extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "ant-colony"],
55
+ extensions: ["safe-guard", "git-guard", "auto-session-name", "custom-footer", "compact-header", "ant-colony"],
56
56
  skills: ["quick-setup", "debug-helper", "git-workflow", "ant-colony"],
57
57
  prompts: ["review", "fix", "explain", "commit", "test", "refactor", "optimize", "security", "document", "pr"],
58
58
  agents: "colony-operator",
package/dist/types.js CHANGED
@@ -42,6 +42,7 @@ export const EXTENSIONS = [
42
42
  { name: "git-guard", label: "📦 Git Guard — Auto stash checkpoint + dirty repo warning + notify", default: true },
43
43
  { name: "auto-session-name", label: "📝 Auto Session Name — Name sessions from first message", default: true },
44
44
  { name: "custom-footer", label: "📊 Custom Footer — Enhanced status bar with tokens, cost, time, git, cwd", default: true },
45
+ { name: "compact-header", label: "⚡ Compact Header — Dense startup info replacing verbose output", default: true },
45
46
  { name: "ant-colony", label: "🐜 Ant Colony — Autonomous multi-agent swarm with adaptive concurrency", default: false },
46
47
  ];
47
48
  export const KEYBINDING_SCHEMES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-pi",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "One-click setup for pi-coding-agent. Like oh-my-zsh for pi.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,49 @@
1
+ /**
2
+ * oh-pi Compact Header — replaces verbose startup with dense info block
3
+ */
4
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
5
+ import { truncateToWidth } from "@mariozechner/pi-tui";
6
+
7
+ export default function (pi: ExtensionAPI) {
8
+ pi.on("session_start", async (_event, ctx) => {
9
+ if (!ctx.hasUI) return;
10
+
11
+ ctx.ui.setHeader((_tui, theme) => ({
12
+ 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);
16
+
17
+ // Gather info
18
+ const cmds = pi.getCommands();
19
+ const prompts = cmds.filter(c => c.source === "prompt").map(c => `/${c.name}`);
20
+ 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
+
23
+ const lines: string[] = [];
24
+
25
+ // Line 1: keys
26
+ 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
38
+ 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
+
44
+ return ["", ...lines, ""];
45
+ },
46
+ invalidate() {},
47
+ }));
48
+ });
49
+ }