Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/types/RenderContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,12 @@ export interface RenderContext {
minimalist?: boolean;
lineIndex?: number; // Index of the current line being rendered (for theme cycling)
globalSeparatorIndex?: number; // Global separator index that continues across lines

// For git widget thresholds
gitData?: {
changedFiles?: number;
insertions?: number;
deletions?: number;
};
globalPowerlineThemeIndex?: number; // Global powerline theme index that continues across lines
}
7 changes: 7 additions & 0 deletions src/types/StatusJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ export const StatusJSONSchema = z.looseObject({
remaining_percentage: CoercedNumberSchema.nullable().optional()
}).nullable().optional(),
vim: z.object({ mode: z.string().optional() }).nullable().optional(),
worktree: z.object({
name: z.string().optional(),
path: z.string().optional(),
branch: z.string().optional(),
original_cwd: z.string().optional(),
original_branch: z.string().optional()
}).nullable().optional(),
rate_limits: z.object({
five_hour: RateLimitPeriodSchema.optional(),
seven_day: RateLimitPeriodSchema.optional()
Expand Down
3 changes: 3 additions & 0 deletions src/types/Widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ export const WidgetItemSchema = z.object({
character: z.string().optional(),
rawValue: z.boolean().optional(),
customText: z.string().optional(),
customSymbol: z.string().optional(),
commandPath: z.string().optional(),
maxWidth: z.number().optional(),
preserveColors: z.boolean().optional(),
timeout: z.number().optional(),
merge: z.union([z.boolean(), z.literal('no-padding')]).optional(),
hide: z.boolean().optional(),
metadata: z.record(z.string(), z.string()).optional()
});

Expand All @@ -42,6 +44,7 @@ export interface Widget {
supportsRawValue(): boolean;
supportsColors(item: WidgetItem): boolean;
handleEditorAction?(action: string, item: WidgetItem): WidgetItem | null;
getNumericValue?(context: RenderContext, item: WidgetItem): number | null;
}

export interface WidgetEditorProps {
Expand Down
Loading