@brimveyn/aimux-config 0.6.2 → 0.6.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/package.json +1 -1
- package/src/actions.ts +11 -0
- package/src/defaults.ts +17 -13
- package/src/resolver.ts +0 -1
- package/src/types.ts +3 -9
package/package.json
CHANGED
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('
|
|
49
|
-
.map('
|
|
50
|
-
.map('
|
|
51
|
-
.map('
|
|
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.
|
|
85
|
-
.map('<Leader>2', actions.
|
|
86
|
-
.map('<Leader>3', actions.
|
|
87
|
-
.map('<Leader>4', actions.
|
|
88
|
-
.map('<Leader>5', actions.
|
|
89
|
-
.map('<Leader>6', actions.
|
|
90
|
-
.map('<Leader>7', actions.
|
|
91
|
-
.map('<Leader>8', actions.
|
|
92
|
-
.map('<Leader>9', actions.
|
|
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/resolver.ts
CHANGED
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) ────────────────────────────────────
|
|
@@ -1055,7 +1050,6 @@ export interface ResolvedConfig {
|
|
|
1055
1050
|
sidebar: SidebarConfig
|
|
1056
1051
|
sessionBar: {
|
|
1057
1052
|
initialVisible?: boolean
|
|
1058
|
-
initialPosition?: SessionBarPosition
|
|
1059
1053
|
}
|
|
1060
1054
|
gitPane:
|
|
1061
1055
|
| {
|