oh-pi 0.1.5 → 0.1.7

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
@@ -30,7 +30,7 @@ export async function run() {
30
30
  }
31
31
  async function quickFlow(env) {
32
32
  const providers = await setupProviders(env);
33
- const theme = "oh-p-dark";
33
+ const theme = await selectTheme();
34
34
  return {
35
35
  providers,
36
36
  theme,
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: false },
45
+ { name: "startup-banner", label: "⚡ Startup Banner — Clean compact startup info (replaces 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 = {
@@ -49,6 +49,7 @@ export function applyConfig(config) {
49
49
  enableSkillCommands: true,
50
50
  compaction: { enabled: true, reserveTokens, keepRecentTokens: 20000 },
51
51
  retry: { enabled: true, maxRetries: 3 },
52
+ quietStartup: true,
52
53
  };
53
54
  if (config.providers.length > 1) {
54
55
  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.5",
3
+ "version": "0.1.7",
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,32 @@
1
+ import type { ExtensionContext, PiSdk } from "@anthropic/pi-sdk";
2
+
3
+ export default function activate(pi: PiSdk) {
4
+ pi.on("session_start", async (_event, ctx: ExtensionContext) => {
5
+ const model = ctx.model;
6
+ const thinking = pi.getThinkingLevel();
7
+ const usage = ctx.getContextUsage();
8
+ const branch = ctx.sessionManager.getBranch();
9
+ const session = ctx.sessionManager.getSessionFile() ?? "ephemeral";
10
+ const cwd = process.cwd().replace(process.env.HOME ?? "", "~");
11
+
12
+ // Git branch
13
+ let git = "";
14
+ try {
15
+ const { execSync } = await import("node:child_process");
16
+ git = execSync("git rev-parse --abbrev-ref HEAD", { encoding: "utf8", timeout: 2000 }).trim();
17
+ } catch { /* not a git repo */ }
18
+
19
+ const modelStr = model ? `${model.provider}/${model.id}` : "no model";
20
+ const thinkStr = thinking !== "off" ? ` • 🧠 ${thinking}` : "";
21
+ const ctxStr = usage ? ` • 📊 ${Math.round(usage.percent)}%` : "";
22
+ const gitStr = git ? ` • 🌿 ${git}` : "";
23
+ const costStr = branch ? ` • $${(branch.totalCost ?? 0).toFixed(3)}` : "";
24
+
25
+ const line = `⚡ ${modelStr}${thinkStr}${ctxStr}${costStr} │ 📂 ${cwd}${gitStr} │ 📋 ${session.split("/").pop()}`;
26
+
27
+ ctx.ui.setWidget("startup-banner", [line], { placement: "belowEditor" });
28
+
29
+ // Auto-hide after 8 seconds
30
+ setTimeout(() => ctx.ui.setWidget("startup-banner", undefined), 8000);
31
+ });
32
+ }