@brimveyn/aimux-config 0.6.3 → 0.6.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimveyn/aimux-config",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "TypeScript configuration API for aimux — keymaps, themes, and backends with a fluent builder.",
5
5
  "keywords": [
6
6
  "aimux",
package/src/actions.ts CHANGED
@@ -68,6 +68,13 @@ export function switchSessionByIndex(index: number): KeyResult {
68
68
  return r([], [{ index, type: 'switch-session-by-index' }])
69
69
  }
70
70
 
71
+ export function switchTabByIndex(index: number): KeyResult {
72
+ return r([], [{ index, type: 'switch-tab-by-index' }])
73
+ }
74
+
75
+ export const nextSidebarItem: KeyResult = r([], [{ direction: 1, type: 'cycle-sidebar-item' }])
76
+ export const prevSidebarItem: KeyResult = r([], [{ direction: -1, type: 'cycle-sidebar-item' }])
77
+
71
78
  export const splitVertical: KeyResult = r(
72
79
  [{ direction: 'vertical', type: 'open-split-picker' }],
73
80
  [],
@@ -122,6 +129,10 @@ export function reorderTab(delta: number): KeyResult {
122
129
  return r([{ delta, type: 'reorder-active-tab' }])
123
130
  }
124
131
 
132
+ export function reorderSession(delta: number): KeyResult {
133
+ return r([{ delta, type: 'reorder-active-session' }])
134
+ }
135
+
125
136
  export function resizeSidebar(delta: number): KeyResult {
126
137
  return r([{ delta, type: 'resize-sidebar' }])
127
138
  }
package/src/defaults.ts CHANGED
@@ -45,10 +45,14 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
45
45
  .map('<C-d>', actions.enterGitMode, 'Enter git mode')
46
46
  .map('<C-j>', actions.resizeGitPane(-0.05), 'Git pane smaller')
47
47
  .map('<C-k>', actions.resizeGitPane(0.05), 'Git pane larger')
48
- .map('J', actions.reorderTab(1), 'Move tab right')
49
- .map('j', actions.nextTab, 'Next tab')
50
- .map('K', actions.reorderTab(-1), 'Move tab left')
51
- .map('k', actions.prevTab, 'Prev tab')
48
+ .map('j', actions.nextSidebarItem, 'Next workspace/worktree')
49
+ .map('k', actions.prevSidebarItem, 'Prev workspace/worktree')
50
+ .map('l', actions.nextTab, 'Next tab')
51
+ .map('h', actions.prevTab, 'Prev tab')
52
+ .map('L', actions.reorderTab(1), 'Move tab right')
53
+ .map('H', actions.reorderTab(-1), 'Move tab left')
54
+ .map('J', actions.reorderSession(1), 'Move workspace down')
55
+ .map('K', actions.reorderSession(-1), 'Move workspace up')
52
56
  .map('r', actions.renameTab, 'Rename tab')
53
57
  .map('i', actions.enterInsert, 'Focus terminal')
54
58
  .map('?', actions.helpModal(), 'Help')
@@ -81,15 +85,15 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
81
85
  m
82
86
  .map('<Leader>b', actions.toggleSessionBar, 'Toggle session bar')
83
87
  .map('<Leader>u', actions.toggleAIUsage, 'Toggle AI usage')
84
- .map('<Leader>1', actions.switchSessionByIndex(1), 'Session 1')
85
- .map('<Leader>2', actions.switchSessionByIndex(2), 'Session 2')
86
- .map('<Leader>3', actions.switchSessionByIndex(3), 'Session 3')
87
- .map('<Leader>4', actions.switchSessionByIndex(4), 'Session 4')
88
- .map('<Leader>5', actions.switchSessionByIndex(5), 'Session 5')
89
- .map('<Leader>6', actions.switchSessionByIndex(6), 'Session 6')
90
- .map('<Leader>7', actions.switchSessionByIndex(7), 'Session 7')
91
- .map('<Leader>8', actions.switchSessionByIndex(8), 'Session 8')
92
- .map('<Leader>9', actions.switchSessionByIndex(9), 'Session 9')
88
+ .map('<Leader>1', actions.switchTabByIndex(1), 'Tab 1')
89
+ .map('<Leader>2', actions.switchTabByIndex(2), 'Tab 2')
90
+ .map('<Leader>3', actions.switchTabByIndex(3), 'Tab 3')
91
+ .map('<Leader>4', actions.switchTabByIndex(4), 'Tab 4')
92
+ .map('<Leader>5', actions.switchTabByIndex(5), 'Tab 5')
93
+ .map('<Leader>6', actions.switchTabByIndex(6), 'Tab 6')
94
+ .map('<Leader>7', actions.switchTabByIndex(7), 'Tab 7')
95
+ .map('<Leader>8', actions.switchTabByIndex(8), 'Tab 8')
96
+ .map('<Leader>9', actions.switchTabByIndex(9), 'Tab 9')
93
97
  )
94
98
 
95
99
  // -----------------------------------------------------------------------
package/src/index.ts CHANGED
@@ -29,6 +29,7 @@ export { getDefaultKeymapConfig } from './defaults'
29
29
  export { resolveConfig } from './resolver'
30
30
  export { isAutoCommitEnabled, setAutoCommitEnabled } from './auto-commit-runtime'
31
31
  export { getMultiRepoConfig, setMultiRepoConfig } from './multi-repo-runtime'
32
+ export { getStatusBarSeparator, setStatusBarSeparator } from './status-bar-runtime'
32
33
  export {
33
34
  DEFAULT_EDITOR_ARGS,
34
35
  getExternalEditorConfig,
@@ -84,5 +85,6 @@ export type {
84
85
  SnippetVar,
85
86
  SplitDirection,
86
87
  StatusBarConfig,
88
+ StatusBarSeparator,
87
89
  TabSession,
88
90
  } from './types'
package/src/resolver.ts CHANGED
@@ -73,7 +73,6 @@ function resolveSessionBar(
73
73
  ): ResolvedConfig['sessionBar'] {
74
74
  if (!userConfig) return {}
75
75
  return {
76
- initialPosition: userConfig.initialPosition ?? userConfig.position,
77
76
  initialVisible: userConfig.initialVisible ?? userConfig.visible,
78
77
  }
79
78
  }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Module-level singleton mirroring `statusBar.separator` from the resolved
3
+ * config. The status bar component reads this each render; the app sets it
4
+ * once at startup so the value is stable for the session.
5
+ *
6
+ * Same pattern as `auto-commit-runtime` / `external-editor-runtime` — avoids
7
+ * threading config through React props or contexts.
8
+ */
9
+
10
+ import type { StatusBarSeparator } from './types'
11
+
12
+ const DEFAULT_SEPARATOR: StatusBarSeparator = 'arrow'
13
+
14
+ let separator: StatusBarSeparator = DEFAULT_SEPARATOR
15
+
16
+ export function setStatusBarSeparator(value: StatusBarSeparator | undefined): void {
17
+ separator = value ?? DEFAULT_SEPARATOR
18
+ }
19
+
20
+ export function getStatusBarSeparator(): StatusBarSeparator {
21
+ return separator
22
+ }
package/src/types.ts CHANGED
@@ -388,11 +388,8 @@ export interface LayoutState {
388
388
  terminalRows: number
389
389
  }
390
390
 
391
- export type SessionBarPosition = 'top' | 'bottom'
392
-
393
391
  export interface SessionBarState {
394
392
  visible: boolean
395
- position: SessionBarPosition
396
393
  }
397
394
 
398
395
  export type AutoCommitSuggestion =
@@ -502,6 +499,7 @@ export type SessionAction =
502
499
  | { type: 'rename-session-record'; sessionId: string; name: string }
503
500
  | { type: 'delete-session-record'; sessionId: string; openSessionPicker?: boolean }
504
501
  | { type: 'reorder-sessions'; orderedIds: string[] }
502
+ | { type: 'reorder-active-session'; delta: number }
505
503
  | { type: 'set-session-status'; sessionId: string; status: SessionStatus }
506
504
  | { type: 'add-worktree-record'; sessionId: string; worktree: WorktreeRecord; activate?: boolean }
507
505
  | { type: 'remove-worktree-record'; sessionId: string; worktreeId: string }
@@ -578,7 +576,6 @@ export type UIAction =
578
576
  | { type: 'set-git-pane-position'; position: 'top' | 'bottom' | 'left' | 'right' }
579
577
  | { type: 'set-pending-chords'; chords: string[] | null }
580
578
  | { type: 'toggle-session-bar' }
581
- | { type: 'set-session-bar-position'; position: SessionBarPosition }
582
579
 
583
580
  export interface GitRefreshPayload {
584
581
  branch: string | null
@@ -717,6 +714,8 @@ export type SideEffect =
717
714
  | { type: 'git-push' }
718
715
  | { type: 'confirm-update-selection' }
719
716
  | { type: 'switch-session-by-index'; index: number }
717
+ | { type: 'cycle-sidebar-item'; direction: 1 | -1 }
718
+ | { type: 'switch-tab-by-index'; index: number }
720
719
  | { type: 'delete-session'; sessionId: string }
721
720
  | { type: 'delete-worktree'; sessionId: string; worktreeId: string; force?: boolean }
722
721
  | {
@@ -857,12 +856,8 @@ export interface KeymapBuilderApi {
857
856
  export interface SessionBarConfig {
858
857
  /** Startup override for the session bar visibility. Reapplied on each launch. */
859
858
  initialVisible?: boolean
860
- /** Startup override for the session bar position. Reapplied on each launch. */
861
- initialPosition?: SessionBarPosition
862
859
  /** @deprecated Use `initialVisible` instead. */
863
860
  visible?: boolean
864
- /** @deprecated Use `initialPosition` instead. */
865
- position?: SessionBarPosition
866
861
  }
867
862
 
868
863
  // ─── Git pane config (discriminated union) ────────────────────────────────────
@@ -969,8 +964,21 @@ export interface AIUsageToolConfig {
969
964
  tools?: AIUsageTool[]
970
965
  }
971
966
 
967
+ export type StatusBarSeparator = 'arrow' | 'round' | 'slant' | 'flame' | 'none'
968
+
972
969
  export interface StatusBarConfig {
973
970
  aiUsage?: AIUsageToolConfig
971
+ /**
972
+ * Powerline-style glyph used between status bar sections.
973
+ * - `arrow` (default): solid triangles ( / )
974
+ * - `round`: solid semicircles ( / )
975
+ * - `slant`: solid slopes ( / )
976
+ * - `flame`: solid flame ribbons ( / )
977
+ * - `none`: no glyph, sections snap via background colour only
978
+ *
979
+ * All non-`none` options require a nerd-font / powerline-capable font.
980
+ */
981
+ separator?: StatusBarSeparator
974
982
  }
975
983
 
976
984
  export interface ExternalEditorConfig {
@@ -1055,7 +1063,6 @@ export interface ResolvedConfig {
1055
1063
  sidebar: SidebarConfig
1056
1064
  sessionBar: {
1057
1065
  initialVisible?: boolean
1058
- initialPosition?: SessionBarPosition
1059
1066
  }
1060
1067
  gitPane:
1061
1068
  | {