pi-powerline-footer 0.2.13 → 0.2.14
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/CHANGELOG.md +6 -0
- package/index.ts +4 -3
- package/package.json +1 -1
- package/theme.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.14] - 2026-01-26
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Theme type mismatch crash** — Fixed `TypeError: theme.fg is not a function` caused by passing `EditorTheme` (from pi-tui) instead of `Theme` (from pi-coding-agent) to segment rendering
|
|
9
|
+
- **Invalid theme color** — Changed `"primary"` to `"text"` in default colors since `"primary"` is not a valid `ThemeColor`
|
|
10
|
+
|
|
5
11
|
## [0.2.13] - 2026-01-27
|
|
6
12
|
|
|
7
13
|
### Added
|
package/index.ts
CHANGED
|
@@ -420,9 +420,9 @@ export default function powerlineFooter(pi: ExtensionAPI) {
|
|
|
420
420
|
function setupCustomEditor(ctx: any) {
|
|
421
421
|
// Import CustomEditor dynamically and create wrapper
|
|
422
422
|
import("@mariozechner/pi-coding-agent").then(({ CustomEditor }) => {
|
|
423
|
-
ctx.ui.setEditorComponent((tui: any,
|
|
423
|
+
ctx.ui.setEditorComponent((tui: any, editorTheme: any, keybindings: any) => {
|
|
424
424
|
// Create custom editor that overrides render for status in top border
|
|
425
|
-
const editor = new CustomEditor(tui,
|
|
425
|
+
const editor = new CustomEditor(tui, editorTheme, keybindings);
|
|
426
426
|
|
|
427
427
|
// Override handleInput to dismiss welcome on first keypress
|
|
428
428
|
const originalHandleInput = editor.handleInput.bind(editor);
|
|
@@ -477,7 +477,8 @@ export default function powerlineFooter(pi: ExtensionAPI) {
|
|
|
477
477
|
|
|
478
478
|
// Top border: ╭─ status ────────────╮
|
|
479
479
|
// Use responsive layout - overflow goes to secondary row
|
|
480
|
-
|
|
480
|
+
// Note: ctx.ui.theme is the pi Theme with fg(), editorTheme is the pi-tui EditorTheme for styling
|
|
481
|
+
const layout = getResponsiveLayout(width, ctx.ui.theme);
|
|
481
482
|
const statusContent = layout.topContent;
|
|
482
483
|
const statusWidth = visibleWidth(statusContent);
|
|
483
484
|
const topFillWidth = width - 4; // Reserve 4 for corners (╭─ and ─╮)
|
package/package.json
CHANGED
package/theme.ts
CHANGED
|
@@ -16,7 +16,7 @@ import type { ColorScheme, ColorValue, SemanticColor } from "./types.js";
|
|
|
16
16
|
// Default color scheme (uses pi theme colors)
|
|
17
17
|
const DEFAULT_COLORS: Required<ColorScheme> = {
|
|
18
18
|
pi: "accent",
|
|
19
|
-
model: "
|
|
19
|
+
model: "text",
|
|
20
20
|
path: "muted",
|
|
21
21
|
git: "success",
|
|
22
22
|
gitDirty: "warning",
|
|
@@ -26,7 +26,7 @@ const DEFAULT_COLORS: Required<ColorScheme> = {
|
|
|
26
26
|
context: "dim",
|
|
27
27
|
contextWarn: "warning",
|
|
28
28
|
contextError: "error",
|
|
29
|
-
cost: "
|
|
29
|
+
cost: "text",
|
|
30
30
|
tokens: "muted",
|
|
31
31
|
separator: "dim",
|
|
32
32
|
border: "borderMuted",
|