oh-pi 0.1.18 → 0.1.20
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.
|
@@ -4,7 +4,7 @@ const PRESETS = {
|
|
|
4
4
|
starter: {
|
|
5
5
|
labelKey: "preset.starter", hintKey: "preset.starterHint",
|
|
6
6
|
config: {
|
|
7
|
-
theme: "
|
|
7
|
+
theme: "dark", keybindings: "default", thinking: "medium",
|
|
8
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"],
|
|
@@ -51,7 +51,7 @@ const PRESETS = {
|
|
|
51
51
|
full: {
|
|
52
52
|
labelKey: "preset.full", hintKey: "preset.fullHint",
|
|
53
53
|
config: {
|
|
54
|
-
theme: "
|
|
54
|
+
theme: "dark", keybindings: "default", thinking: "high",
|
|
55
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"],
|
package/dist/types.js
CHANGED
|
@@ -28,13 +28,13 @@ export const PROVIDERS = {
|
|
|
28
28
|
mistral: { env: "MISTRAL_API_KEY", label: "Mistral", models: ["mistral-large-latest"] },
|
|
29
29
|
};
|
|
30
30
|
export const THEMES = [
|
|
31
|
+
{ name: "dark", label: "Pi Default Dark", style: "dark" },
|
|
31
32
|
{ name: "oh-p-dark", label: "oh-pi Dark (Cyan+Purple)", style: "dark" },
|
|
32
33
|
{ name: "cyberpunk", label: "Cyberpunk (Neon)", style: "dark" },
|
|
33
34
|
{ name: "nord", label: "Nord (Arctic)", style: "dark" },
|
|
34
35
|
{ name: "catppuccin-mocha", label: "Catppuccin Mocha (Pastel)", style: "dark" },
|
|
35
36
|
{ name: "tokyo-night", label: "Tokyo Night (Blue+Purple)", style: "dark" },
|
|
36
37
|
{ name: "gruvbox-dark", label: "Gruvbox Dark (Warm)", style: "dark" },
|
|
37
|
-
{ name: "dark", label: "Pi Default Dark", style: "dark" },
|
|
38
38
|
{ name: "light", label: "Pi Default Light", style: "light" },
|
|
39
39
|
];
|
|
40
40
|
export const EXTENSIONS = [
|
package/package.json
CHANGED
|
@@ -15,34 +15,36 @@ export default function (pi: ExtensionAPI) {
|
|
|
15
15
|
const a = (s: string) => theme.fg("accent", s);
|
|
16
16
|
|
|
17
17
|
const cmds = pi.getCommands();
|
|
18
|
-
const prompts = cmds.filter(c => c.source === "prompt").map(c => `/${c.name}`).join("
|
|
19
|
-
const skills = cmds.filter(c => c.source === "skill").map(c => c.name).join("
|
|
18
|
+
const prompts = cmds.filter(c => c.source === "prompt").map(c => `/${c.name}`).join(" ");
|
|
19
|
+
const skills = cmds.filter(c => c.source === "skill").map(c => c.name).join(" ");
|
|
20
20
|
const model = ctx.model ? `${ctx.model.provider}/${ctx.model.id}` : "no model";
|
|
21
21
|
const thinking = pi.getThinkingLevel();
|
|
22
22
|
|
|
23
|
-
// Pad visible width (ignoring ANSI codes)
|
|
24
23
|
const pad = (s: string, w: number) => s + " ".repeat(Math.max(0, w - visibleWidth(s)));
|
|
24
|
+
const t = (s: string) => truncateToWidth(s, width);
|
|
25
|
+
|
|
26
|
+
const c0 = 8, c1 = 14, c2 = 6, c3 = 14, c4 = 6;
|
|
27
|
+
const sep = d(" │ ");
|
|
25
28
|
|
|
26
|
-
// Table rows: [key, value, key, value, key, value]
|
|
27
29
|
const rows = [
|
|
28
30
|
[d("version"), a(`v${VERSION}`), d("esc"), a("interrupt"), d("S-tab"), a("thinking")],
|
|
29
31
|
[d("model"), a(model), d("^C"), a("clear/exit"), d("^O"), a("expand")],
|
|
30
32
|
[d("think"), a(thinking), d("^P"), a("cycle model"), d("^G"), a("ext editor")],
|
|
31
|
-
[d("
|
|
32
|
-
[d("
|
|
33
|
+
[d(""), a(""), d("/"), a("commands"), d("^V"), a("paste img")],
|
|
34
|
+
[d(""), a(""), d("!"), a("bash"), d(""), a("")],
|
|
33
35
|
];
|
|
34
36
|
|
|
35
|
-
// Column widths
|
|
36
|
-
const c0 = 8, c1 = Math.max(20, Math.min(40, width - 50)), c2 = 6, c3 = 14, c4 = 6, c5 = 12;
|
|
37
|
-
const sep = d(" │ ");
|
|
38
|
-
const hbar = d("─".repeat(width));
|
|
39
|
-
|
|
40
37
|
const lines: string[] = [""];
|
|
41
38
|
for (const [k0, v0, k1, v1, k2, v2] of rows) {
|
|
42
39
|
const line = pad(k0, c0) + pad(v0, c1) + sep + pad(k1, c2) + pad(v1, c3) + sep + pad(k2, c4) + v2;
|
|
43
|
-
lines.push(
|
|
40
|
+
lines.push(t(line));
|
|
44
41
|
}
|
|
45
|
-
|
|
42
|
+
|
|
43
|
+
// Prompts and skills below the table
|
|
44
|
+
if (prompts) lines.push(t(`${pad(d("prompts"), c0)}${a(prompts)}`));
|
|
45
|
+
if (skills) lines.push(t(`${pad(d("skills"), c0)}${a(skills)}`));
|
|
46
|
+
lines.push(d("─".repeat(width)));
|
|
47
|
+
|
|
46
48
|
return lines;
|
|
47
49
|
},
|
|
48
50
|
invalidate() {},
|