@brimveyn/aimux-config 0.8.6 → 0.10.1
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/README.md +77 -6
- package/package.json +1 -1
- package/src/actions.ts +239 -150
- package/src/defaults.ts +114 -50
- package/src/index.ts +2 -5
- package/src/resolver.ts +6 -5
- package/src/status-bar-runtime.ts +1 -1
- package/src/types.ts +280 -201
package/src/defaults.ts
CHANGED
|
@@ -49,7 +49,8 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
49
49
|
m
|
|
50
50
|
.map('<C-c>', actions.quit, 'Quit')
|
|
51
51
|
.map('<C-n>', actions.newTab, 'New tab')
|
|
52
|
-
.map('<C-
|
|
52
|
+
.map('<C-p>', actions.createWorkspaceModal, 'Create workspace')
|
|
53
|
+
.map('<C-g>', actions.projectPicker, 'Project picker')
|
|
53
54
|
.map('<C-z>', actions.ctrlZSidebar, 'Focus sidebar')
|
|
54
55
|
.map('dd', actions.closeTab, 'Close tab')
|
|
55
56
|
.map('<C-b>', actions.toggleSidebar, 'Toggle sidebar')
|
|
@@ -62,14 +63,14 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
62
63
|
.map('<C-d>', actions.enterGitMode, 'Enter git mode')
|
|
63
64
|
.map('<C-j>', actions.resizeGitPane(-0.05), 'Git pane smaller')
|
|
64
65
|
.map('<C-k>', actions.resizeGitPane(0.05), 'Git pane larger')
|
|
65
|
-
.map('j', actions.nextSidebarItem, 'Next workspace
|
|
66
|
-
.map('k', actions.prevSidebarItem, 'Prev workspace
|
|
66
|
+
.map('j', actions.nextSidebarItem, 'Next project/workspace')
|
|
67
|
+
.map('k', actions.prevSidebarItem, 'Prev project/workspace')
|
|
67
68
|
.map('l', actions.nextTab, 'Next tab')
|
|
68
69
|
.map('h', actions.prevTab, 'Prev tab')
|
|
69
70
|
.map('L', actions.reorderTab(1), 'Move tab right')
|
|
70
71
|
.map('H', actions.reorderTab(-1), 'Move tab left')
|
|
71
|
-
.map('J', actions.
|
|
72
|
-
.map('K', actions.
|
|
72
|
+
.map('J', actions.reorderProject(1), 'Move project down')
|
|
73
|
+
.map('K', actions.reorderProject(-1), 'Move project up')
|
|
73
74
|
.map('r', actions.renameTab, 'Rename tab')
|
|
74
75
|
.map('i', actions.enterInsert, 'Focus terminal')
|
|
75
76
|
.map('S', actions.openFlashJump, 'Flash jump')
|
|
@@ -97,13 +98,14 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
97
98
|
)
|
|
98
99
|
|
|
99
100
|
// -----------------------------------------------------------------------
|
|
100
|
-
//
|
|
101
|
+
// Project bar: same chords from nav and while typing in the terminal
|
|
101
102
|
// -----------------------------------------------------------------------
|
|
102
103
|
.mode(['navigation', 'terminal-input'], (m) =>
|
|
103
104
|
m
|
|
104
|
-
.map('<Leader>b', actions.
|
|
105
|
+
.map('<Leader>b', actions.toggleProjectBar, 'Toggle project bar')
|
|
105
106
|
.map('<Leader>B', actions.toggleBar('right'), 'Toggle right bar')
|
|
106
107
|
.map('<Leader>u', actions.toggleAIUsage, 'Toggle AI usage')
|
|
108
|
+
.map('<Leader>,', actions.enterSettings, 'Settings')
|
|
107
109
|
.map('<Leader>1', actions.switchTabByIndex(1), 'Tab 1')
|
|
108
110
|
.map('<Leader>2', actions.switchTabByIndex(2), 'Tab 2')
|
|
109
111
|
.map('<Leader>3', actions.switchTabByIndex(3), 'Tab 3')
|
|
@@ -127,7 +129,7 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
127
129
|
.map('e', actions.gitToggleFoldAll, 'Expand/collapse all folds')
|
|
128
130
|
.map('o', actions.openSelectedGitFileInEditor, 'Open in editor')
|
|
129
131
|
.map('c', actions.gitCommitOpen, 'Commit')
|
|
130
|
-
.map('m', actions.
|
|
132
|
+
.map('m', actions.openWorkspaceMove, 'Move workspace')
|
|
131
133
|
.map('p', actions.gitPush, 'Push')
|
|
132
134
|
.map('v', actions.toggleGitDiffView, 'Toggle split/stacked')
|
|
133
135
|
.map('b', actions.toggleGitReviewBase, 'Review vs base')
|
|
@@ -154,6 +156,36 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
154
156
|
.map('<Up>', actions.scrollGitDiff(-1), 'Scroll up')
|
|
155
157
|
)
|
|
156
158
|
|
|
159
|
+
// -----------------------------------------------------------------------
|
|
160
|
+
// Settings screen
|
|
161
|
+
//
|
|
162
|
+
// `h`/`l` always mean "change column", never "change value": a number row
|
|
163
|
+
// would otherwise make them ambiguous. Values move on <Space>/<CR> (toggle,
|
|
164
|
+
// next option) and on -/+ (step a number).
|
|
165
|
+
// -----------------------------------------------------------------------
|
|
166
|
+
.mode('settings', (m) =>
|
|
167
|
+
m
|
|
168
|
+
.map('<Esc>', actions.exitSettings, 'Close settings')
|
|
169
|
+
.map('<Leader>,', actions.exitSettings, 'Close settings')
|
|
170
|
+
.map('h', actions.focusSettingsPane('nav'), 'Sections')
|
|
171
|
+
.map('<Left>', actions.focusSettingsPane('nav'))
|
|
172
|
+
.map('l', actions.activateSettingsRow, 'Settings of the section')
|
|
173
|
+
.map('<Right>', actions.activateSettingsRow)
|
|
174
|
+
.map('<CR>', actions.activateSettingsRow, 'Change')
|
|
175
|
+
.map('<Space>', actions.activateSettingsRow, 'Change')
|
|
176
|
+
.map('j', actions.moveSettingsSelection(1), 'Next', { repeatable: true })
|
|
177
|
+
.map('k', actions.moveSettingsSelection(-1), 'Prev', { repeatable: true })
|
|
178
|
+
.map('<Down>', actions.moveSettingsSelection(1), undefined, { repeatable: true })
|
|
179
|
+
.map('<Up>', actions.moveSettingsSelection(-1), undefined, { repeatable: true })
|
|
180
|
+
.map('<C-n>', actions.moveSettingsSelection(1))
|
|
181
|
+
.map('<C-p>', actions.moveSettingsSelection(-1))
|
|
182
|
+
.map('+', actions.adjustSettingsRow(1), 'Increase', { repeatable: true })
|
|
183
|
+
.map('-', actions.adjustSettingsRow(-1), 'Decrease', { repeatable: true })
|
|
184
|
+
.map('r', actions.resetSettingsRow, 'Reset to default')
|
|
185
|
+
.map('/', actions.openSettingsSearch, 'Search settings')
|
|
186
|
+
.map('?', actions.helpModal('settings'), 'Help')
|
|
187
|
+
)
|
|
188
|
+
|
|
157
189
|
// -----------------------------------------------------------------------
|
|
158
190
|
// Modal: help (always in filter mode via Picker)
|
|
159
191
|
// -----------------------------------------------------------------------
|
|
@@ -187,7 +219,13 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
187
219
|
// Modal: ai-usage (info-only)
|
|
188
220
|
// -----------------------------------------------------------------------
|
|
189
221
|
.mode('modal.ai-usage', (m) =>
|
|
190
|
-
m
|
|
222
|
+
m
|
|
223
|
+
.map('<Esc>', actions.closeModal, 'Close')
|
|
224
|
+
.map('<Leader>u', actions.toggleAIUsage, 'Close')
|
|
225
|
+
.map('l', actions.moveModalSelection(1), 'Next page')
|
|
226
|
+
.map('h', actions.moveModalSelection(-1), 'Prev page')
|
|
227
|
+
.map('<Right>', actions.moveModalSelection(1))
|
|
228
|
+
.map('<Left>', actions.moveModalSelection(-1))
|
|
191
229
|
)
|
|
192
230
|
|
|
193
231
|
// -----------------------------------------------------------------------
|
|
@@ -208,9 +246,9 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
208
246
|
)
|
|
209
247
|
|
|
210
248
|
// -----------------------------------------------------------------------
|
|
211
|
-
// Modal:
|
|
249
|
+
// Modal: workspace-move
|
|
212
250
|
// -----------------------------------------------------------------------
|
|
213
|
-
.mode('modal.
|
|
251
|
+
.mode('modal.workspace-move', (m) =>
|
|
214
252
|
m
|
|
215
253
|
.map('<Esc>', actions.closeModal, 'Cancel')
|
|
216
254
|
.map('j', actions.moveModalSelection(1), 'Next')
|
|
@@ -219,30 +257,30 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
219
257
|
.map('<Up>', actions.moveModalSelection(-1))
|
|
220
258
|
.map('<C-n>', actions.moveModalSelection(1))
|
|
221
259
|
.map('<C-p>', actions.moveModalSelection(-1))
|
|
222
|
-
.map('d', actions.
|
|
223
|
-
.map('<CR>', actions.
|
|
260
|
+
.map('d', actions.toggleWorkspaceMoveDelete, 'Toggle delete source')
|
|
261
|
+
.map('<CR>', actions.confirmWorkspaceMove, 'Move')
|
|
224
262
|
)
|
|
225
263
|
|
|
226
264
|
// -----------------------------------------------------------------------
|
|
227
|
-
// Modal:
|
|
265
|
+
// Modal: workspace-move recoverable-failure confirmation (stash / conflicts)
|
|
228
266
|
// -----------------------------------------------------------------------
|
|
229
|
-
.mode('modal.
|
|
267
|
+
.mode('modal.workspace-move-confirm', (m) =>
|
|
230
268
|
m
|
|
231
269
|
.map('<Esc>', actions.closeModal, 'Cancel')
|
|
232
270
|
.map('n', actions.closeModal, 'Cancel')
|
|
233
|
-
.map('<CR>', actions.
|
|
234
|
-
.map('y', actions.
|
|
271
|
+
.map('<CR>', actions.confirmWorkspaceMoveRetry, 'Confirm')
|
|
272
|
+
.map('y', actions.confirmWorkspaceMoveRetry, 'Confirm')
|
|
235
273
|
)
|
|
236
274
|
|
|
237
275
|
// -----------------------------------------------------------------------
|
|
238
|
-
// Modal: standalone
|
|
276
|
+
// Modal: standalone workspace delete confirmation (sidebar "Remove workspace")
|
|
239
277
|
// -----------------------------------------------------------------------
|
|
240
|
-
.mode('modal.
|
|
278
|
+
.mode('modal.workspace-delete-confirm', (m) =>
|
|
241
279
|
m
|
|
242
280
|
.map('<Esc>', actions.closeModal, 'Cancel')
|
|
243
281
|
.map('n', actions.closeModal, 'Cancel')
|
|
244
|
-
.map('<CR>', actions.
|
|
245
|
-
.map('y', actions.
|
|
282
|
+
.map('<CR>', actions.confirmWorkspaceDeleteModal, 'Delete workspace')
|
|
283
|
+
.map('y', actions.confirmWorkspaceDeleteModal, 'Delete workspace')
|
|
246
284
|
)
|
|
247
285
|
|
|
248
286
|
// -----------------------------------------------------------------------
|
|
@@ -266,12 +304,36 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
266
304
|
)
|
|
267
305
|
|
|
268
306
|
// -----------------------------------------------------------------------
|
|
269
|
-
// Modal:
|
|
307
|
+
// Modal: search every setting (always filtering, like the other pickers)
|
|
308
|
+
// -----------------------------------------------------------------------
|
|
309
|
+
.mode('modal.settings-search.filtering', (m) =>
|
|
310
|
+
m
|
|
311
|
+
.map('<Esc>', actions.closeSettingsModal, 'Close')
|
|
312
|
+
.map('<CR>', actions.confirmSettingsSearch, 'Go to setting')
|
|
313
|
+
.map('<C-n>', actions.moveModalSelection(1), 'Next')
|
|
314
|
+
.map('<C-p>', actions.moveModalSelection(-1), 'Prev')
|
|
315
|
+
.map('<Down>', actions.moveModalSelection(1))
|
|
316
|
+
.map('<Up>', actions.moveModalSelection(-1))
|
|
317
|
+
.passthrough()
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
// -----------------------------------------------------------------------
|
|
321
|
+
// Modal: one text field over a settings row
|
|
322
|
+
// -----------------------------------------------------------------------
|
|
323
|
+
.mode('modal.setting-text', (m) =>
|
|
324
|
+
m
|
|
325
|
+
.map('<Esc>', actions.closeSettingsModal, 'Cancel')
|
|
326
|
+
.map('<CR>', actions.confirmSettingText, 'Confirm')
|
|
327
|
+
.passthrough()
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
// -----------------------------------------------------------------------
|
|
331
|
+
// Modal: rename-workspace
|
|
270
332
|
// -----------------------------------------------------------------------
|
|
271
|
-
.mode('modal.rename-
|
|
333
|
+
.mode('modal.rename-workspace', (m) =>
|
|
272
334
|
m
|
|
273
335
|
.map('<Esc>', actions.closeModal, 'Cancel')
|
|
274
|
-
.map('<CR>', actions.
|
|
336
|
+
.map('<CR>', actions.confirmRenameWorkspace, 'Confirm')
|
|
275
337
|
.passthrough()
|
|
276
338
|
)
|
|
277
339
|
|
|
@@ -282,9 +344,6 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
282
344
|
m
|
|
283
345
|
.map('<Esc>', actions.cancelNewTabModal, 'Cancel')
|
|
284
346
|
.map('<CR>', actions.launchSelectedAssistant, 'Launch')
|
|
285
|
-
.map('<C-w>', actions.toggleNewTabWorktree, 'WT')
|
|
286
|
-
.map('<C-d>', actions.deleteSelectedWorktree, 'Delete WT')
|
|
287
|
-
.map('<Tab>', actions.switchField, 'Next field')
|
|
288
347
|
.map('<C-n>', actions.moveModalSelection(1), 'Next')
|
|
289
348
|
.map('<C-p>', actions.moveModalSelection(-1), 'Prev')
|
|
290
349
|
.map('<Down>', actions.moveModalSelection(1))
|
|
@@ -301,23 +360,12 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
301
360
|
)
|
|
302
361
|
|
|
303
362
|
// -----------------------------------------------------------------------
|
|
304
|
-
// Modal:
|
|
305
|
-
// -----------------------------------------------------------------------
|
|
306
|
-
.mode('modal.new-tab.worktree-delete-confirm', (m) =>
|
|
307
|
-
m
|
|
308
|
-
.map('<Esc>', actions.cancelDeleteWorktree, 'Cancel')
|
|
309
|
-
.map('n', actions.cancelDeleteWorktree, 'Cancel')
|
|
310
|
-
.map('<CR>', actions.confirmDeleteWorktree, 'Delete worktree')
|
|
311
|
-
.map('y', actions.confirmDeleteWorktree, 'Delete worktree')
|
|
312
|
-
)
|
|
313
|
-
|
|
314
|
-
// -----------------------------------------------------------------------
|
|
315
|
-
// Modal: session-picker (always in filter mode via Picker)
|
|
363
|
+
// Modal: project-picker (always in filter mode via Picker)
|
|
316
364
|
// -----------------------------------------------------------------------
|
|
317
|
-
.mode('modal.
|
|
365
|
+
.mode('modal.project-picker.filtering', (m) =>
|
|
318
366
|
m
|
|
319
|
-
.map('<Esc>', actions.
|
|
320
|
-
.map('<CR>', actions.
|
|
367
|
+
.map('<Esc>', actions.projectPickerEscape, 'Cancel')
|
|
368
|
+
.map('<CR>', actions.confirmSelectedProject, 'Open')
|
|
321
369
|
.map('<C-n>', actions.moveModalSelection(1), 'Next')
|
|
322
370
|
.map('<C-p>', actions.moveModalSelection(-1), 'Prev')
|
|
323
371
|
.map('<Down>', actions.moveModalSelection(1))
|
|
@@ -326,23 +374,39 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
326
374
|
)
|
|
327
375
|
|
|
328
376
|
// -----------------------------------------------------------------------
|
|
329
|
-
// Modal:
|
|
377
|
+
// Modal: project-name
|
|
330
378
|
// -----------------------------------------------------------------------
|
|
331
|
-
.mode('modal.
|
|
379
|
+
.mode('modal.project-name', (m) =>
|
|
332
380
|
m
|
|
333
|
-
.map('<Esc>', actions.
|
|
334
|
-
.map('<CR>', actions.
|
|
381
|
+
.map('<Esc>', actions.backToProjectPicker, 'Cancel')
|
|
382
|
+
.map('<CR>', actions.confirmProjectRename, 'Confirm')
|
|
335
383
|
.passthrough()
|
|
336
384
|
)
|
|
337
385
|
|
|
338
386
|
// -----------------------------------------------------------------------
|
|
339
|
-
// Modal: create-
|
|
387
|
+
// Modal: create-project
|
|
340
388
|
// -----------------------------------------------------------------------
|
|
341
|
-
.mode('modal.create-
|
|
389
|
+
.mode('modal.create-project', (m) =>
|
|
342
390
|
m
|
|
343
|
-
.map('<Esc>', actions.
|
|
391
|
+
.map('<Esc>', actions.createProjectEscape, 'Cancel')
|
|
344
392
|
.map('<Tab>', actions.switchField, 'Next field')
|
|
345
|
-
.map('<CR>', actions.
|
|
393
|
+
.map('<CR>', actions.confirmCreateProject, 'Confirm')
|
|
394
|
+
.map('<C-n>', actions.moveModalSelection(1), 'Next')
|
|
395
|
+
.map('<C-p>', actions.moveModalSelection(-1), 'Prev')
|
|
396
|
+
.map('<Down>', actions.moveModalSelection(1))
|
|
397
|
+
.map('<Up>', actions.moveModalSelection(-1))
|
|
398
|
+
.passthrough()
|
|
399
|
+
)
|
|
400
|
+
|
|
401
|
+
// -----------------------------------------------------------------------
|
|
402
|
+
// Modal: create-workspace (a project inside the current project)
|
|
403
|
+
// -----------------------------------------------------------------------
|
|
404
|
+
.mode('modal.create-workspace', (m) =>
|
|
405
|
+
m
|
|
406
|
+
.map('<Esc>', actions.createWorkspaceEscape, 'Back/Cancel')
|
|
407
|
+
.map('<Tab>', actions.switchCreateWorkspaceField, 'Next field')
|
|
408
|
+
.map('<CR>', actions.confirmCreateWorkspace, 'Create')
|
|
409
|
+
.map('<C-CR>', actions.createWorkspaceNewline, 'Newline')
|
|
346
410
|
.map('<C-n>', actions.moveModalSelection(1), 'Next')
|
|
347
411
|
.map('<C-p>', actions.moveModalSelection(-1), 'Prev')
|
|
348
412
|
.map('<Down>', actions.moveModalSelection(1))
|
package/src/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ export {
|
|
|
38
38
|
} from './external-editor-runtime'
|
|
39
39
|
export { DEFAULT_MULTI_REPO_CONFIG } from './defaults'
|
|
40
40
|
|
|
41
|
-
// User-facing config types (keymap/backends/
|
|
41
|
+
// User-facing config types (keymap/backends/projects/etc.).
|
|
42
42
|
export type {
|
|
43
43
|
Action,
|
|
44
44
|
ActionFn,
|
|
@@ -75,9 +75,9 @@ export type {
|
|
|
75
75
|
ModeKeymapDef,
|
|
76
76
|
MultiRepoConfig,
|
|
77
77
|
MultiRepoState,
|
|
78
|
+
ProjectRecord,
|
|
78
79
|
ResolvedConfig,
|
|
79
80
|
ResolvedKeymapConfig,
|
|
80
|
-
SessionRecord,
|
|
81
81
|
SidebarConfig,
|
|
82
82
|
SideEffect,
|
|
83
83
|
SnippetDef,
|
|
@@ -88,7 +88,4 @@ export type {
|
|
|
88
88
|
StatusBarConfig,
|
|
89
89
|
StatusBarSeparator,
|
|
90
90
|
TabSession,
|
|
91
|
-
WorktreeTemplate,
|
|
92
|
-
WorktreeTemplatePane,
|
|
93
|
-
WorktreeTemplateTab,
|
|
94
91
|
} from './types'
|
package/src/resolver.ts
CHANGED
|
@@ -60,13 +60,14 @@ export function resolveConfig(userConfig: AimuxUserConfig): ResolvedConfig {
|
|
|
60
60
|
integrations: resolveIntegrations(userConfig.integrations),
|
|
61
61
|
keymaps,
|
|
62
62
|
multiRepo,
|
|
63
|
-
|
|
63
|
+
// ponytail: `sessionBar` is the pre-rename key. Unknown keys parse
|
|
64
|
+
// silently, so without the fallback the setting just vanishes.
|
|
65
|
+
projectBar: resolveProjectBar(userConfig.projectBar ?? userConfig.sessionBar),
|
|
64
66
|
sidebar: userConfig.sidebar ?? {},
|
|
65
67
|
snippets: userConfig.snippets ?? [],
|
|
66
68
|
snippetTriggerChar: resolveSnippetTriggerChar(userConfig.snippetTriggerChar),
|
|
67
69
|
statusBar: userConfig.statusBar ?? {},
|
|
68
70
|
theme: resolveTheme(userConfig.theme),
|
|
69
|
-
worktreeTemplates: userConfig.worktreeTemplates ?? [],
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -96,9 +97,9 @@ function resolveTheme(userConfig: AimuxUserConfig['theme']): ResolvedConfig['the
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
function
|
|
100
|
-
userConfig: AimuxUserConfig['
|
|
101
|
-
): ResolvedConfig['
|
|
100
|
+
function resolveProjectBar(
|
|
101
|
+
userConfig: AimuxUserConfig['projectBar']
|
|
102
|
+
): ResolvedConfig['projectBar'] {
|
|
102
103
|
if (!userConfig) return {}
|
|
103
104
|
return {
|
|
104
105
|
initialVisible: userConfig.initialVisible ?? userConfig.visible,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Module-level singleton mirroring `statusBar.separator` from the resolved
|
|
3
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
|
|
4
|
+
* once at startup so the value is stable for the project.
|
|
5
5
|
*
|
|
6
6
|
* Same pattern as `auto-commit-runtime` / `external-editor-runtime` — avoids
|
|
7
7
|
* threading config through React props or contexts.
|