@pi-unipi/footer 0.1.2 → 0.1.4

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/src/types.ts CHANGED
@@ -9,39 +9,64 @@ import type { Theme, ThemeColor } from "@mariozechner/pi-coding-agent";
9
9
 
10
10
  // ─── Semantic Colors ────────────────────────────────────────────────────────
11
11
 
12
+ /** Zone assignment for segment positioning */
13
+ export type SegmentZone = "left" | "center" | "right";
14
+
12
15
  /** Semantic color names mapped to segment groups */
13
16
  export type SemanticColor =
17
+ // ── Model & Identity (Left zone) ──
14
18
  | "model"
15
19
  | "path"
16
20
  | "git"
17
- | "compactor"
18
- | "memory"
19
- | "mcp"
20
- | "ralph"
21
- | "ralphOn"
22
- | "ralphOff"
21
+ | "gitClean"
22
+ | "gitDirty"
23
+ | "session"
24
+ | "worktree"
25
+ // ── Workflow (Left zone) ──
23
26
  | "workflow"
27
+ | "workflowNone"
24
28
  | "workflowBrainstorm"
25
29
  | "workflowPlan"
26
30
  | "workflowWork"
27
31
  | "workflowReview"
28
32
  | "workflowAuto"
33
+ | "workflowDebug"
34
+ | "workflowChoreExec"
29
35
  | "workflowOther"
36
+ // ── TPS tiers (Center zone) ──
37
+ | "tpsSlow"
38
+ | "tpsModerate"
39
+ | "tpsGood"
40
+ | "tpsFast"
41
+ | "tpsBlazing"
42
+ | "tpsIdle"
43
+ // ── Metrics (Center zone) ──
44
+ | "compactor"
45
+ | "memory"
46
+ | "mcp"
47
+ | "ralph"
48
+ | "ralphOn"
49
+ | "ralphOff"
30
50
  | "kanboard"
31
51
  | "notify"
32
- | "separator"
33
- | "border"
34
52
  | "context"
35
53
  | "contextWarn"
36
54
  | "contextError"
37
55
  | "cost"
38
56
  | "tokens"
57
+ // ── Time (Right zone) ──
58
+ | "clock"
59
+ | "duration"
60
+ // ── Thinking levels ──
39
61
  | "thinking"
40
62
  | "thinkingMinimal"
41
63
  | "thinkingLow"
42
64
  | "thinkingMedium"
43
65
  | "thinkingHigh"
44
- | "thinkingXhigh";
66
+ | "thinkingXhigh"
67
+ // ── UI chrome ──
68
+ | "separator"
69
+ | "border";
45
70
 
46
71
  /** A theme color name or custom hex color */
47
72
  export type ColorValue = ThemeColor | `#${string}`;
@@ -98,6 +123,8 @@ export interface FooterSegmentContext {
98
123
  piContext?: unknown;
99
124
  /** Footer data provider (for core segments that need git, extension statuses) */
100
125
  footerData?: unknown;
126
+ /** Label mode: compact (shortLabel) or labeled (full label) */
127
+ labelMode?: "compact" | "labeled";
101
128
  }
102
129
 
103
130
  /** Segment render function type */
@@ -107,8 +134,14 @@ export type SegmentRenderFn = (ctx: FooterSegmentContext) => RenderedSegment;
107
134
  export interface FooterSegment {
108
135
  /** Unique segment identifier (e.g., "model", "compactions") */
109
136
  id: string;
110
- /** Display label */
137
+ /** Display label (full name, used in labeled mode) */
111
138
  label: string;
139
+ /** Compact display name (used in compact mode, e.g. "ses", "tps", "ctx") */
140
+ shortLabel: string;
141
+ /** Human-readable description (shown in footer-help overlay) */
142
+ description: string;
143
+ /** Layout zone assignment */
144
+ zone: SegmentZone;
112
145
  /** Icon glyph (Nerd Font or ASCII) */
113
146
  icon: string;
114
147
  /** Render function */
@@ -153,6 +186,10 @@ export interface FooterSettings {
153
186
  separator: SeparatorStyle;
154
187
  /** Icon style: nerd (Nerd Font glyphs), emoji (Unicode emoji), text (plain labels) */
155
188
  iconStyle: IconStyle;
189
+ /** Zone separator string (between zones, default: "│") */
190
+ zoneSeparator?: string;
191
+ /** Show full labels instead of compact short labels */
192
+ showFullLabels?: boolean;
156
193
  /** Per-group settings */
157
194
  groups: Record<string, FooterGroupSettings>;
158
195
  }
@@ -174,10 +211,12 @@ export interface PresetDef {
174
211
  rightSegments: string[];
175
212
  /** Secondary row segments (shown when terminal is narrow) */
176
213
  secondarySegments: string[];
177
- /** Separator style for this preset */
178
- separator: SeparatorStyle;
179
214
  /** Color scheme for this preset */
180
215
  colors?: ColorScheme;
181
216
  /** Per-segment options */
182
217
  segmentOptions?: Record<string, Record<string, unknown>>;
218
+ /** Zone order (default: left, center, right) */
219
+ zoneOrder?: ("left" | "center" | "right")[];
220
+ /** Zone separator string (between zones) */
221
+ zoneSeparator?: string;
183
222
  }