@brimveyn/aimux-config 0.8.6 → 0.10.0

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/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-g>', actions.sessionPicker, 'Session picker')
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/worktree')
66
- .map('k', actions.prevSidebarItem, 'Prev workspace/worktree')
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.reorderSession(1), 'Move workspace down')
72
- .map('K', actions.reorderSession(-1), 'Move workspace up')
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
- // Session bar: same chords from nav and while typing in the terminal
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.toggleSessionBar, 'Toggle session bar')
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.openWorktreeMove, 'Move worktree')
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
  // -----------------------------------------------------------------------
@@ -208,9 +240,9 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
208
240
  )
209
241
 
210
242
  // -----------------------------------------------------------------------
211
- // Modal: worktree-move
243
+ // Modal: workspace-move
212
244
  // -----------------------------------------------------------------------
213
- .mode('modal.worktree-move', (m) =>
245
+ .mode('modal.workspace-move', (m) =>
214
246
  m
215
247
  .map('<Esc>', actions.closeModal, 'Cancel')
216
248
  .map('j', actions.moveModalSelection(1), 'Next')
@@ -219,30 +251,30 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
219
251
  .map('<Up>', actions.moveModalSelection(-1))
220
252
  .map('<C-n>', actions.moveModalSelection(1))
221
253
  .map('<C-p>', actions.moveModalSelection(-1))
222
- .map('d', actions.toggleWorktreeMoveDelete, 'Toggle delete source')
223
- .map('<CR>', actions.confirmWorktreeMove, 'Move')
254
+ .map('d', actions.toggleWorkspaceMoveDelete, 'Toggle delete source')
255
+ .map('<CR>', actions.confirmWorkspaceMove, 'Move')
224
256
  )
225
257
 
226
258
  // -----------------------------------------------------------------------
227
- // Modal: worktree-move recoverable-failure confirmation (stash / conflicts)
259
+ // Modal: workspace-move recoverable-failure confirmation (stash / conflicts)
228
260
  // -----------------------------------------------------------------------
229
- .mode('modal.worktree-move-confirm', (m) =>
261
+ .mode('modal.workspace-move-confirm', (m) =>
230
262
  m
231
263
  .map('<Esc>', actions.closeModal, 'Cancel')
232
264
  .map('n', actions.closeModal, 'Cancel')
233
- .map('<CR>', actions.confirmWorktreeMoveRetry, 'Confirm')
234
- .map('y', actions.confirmWorktreeMoveRetry, 'Confirm')
265
+ .map('<CR>', actions.confirmWorkspaceMoveRetry, 'Confirm')
266
+ .map('y', actions.confirmWorkspaceMoveRetry, 'Confirm')
235
267
  )
236
268
 
237
269
  // -----------------------------------------------------------------------
238
- // Modal: standalone worktree delete confirmation (sidebar "Remove worktree")
270
+ // Modal: standalone workspace delete confirmation (sidebar "Remove workspace")
239
271
  // -----------------------------------------------------------------------
240
- .mode('modal.worktree-delete-confirm', (m) =>
272
+ .mode('modal.workspace-delete-confirm', (m) =>
241
273
  m
242
274
  .map('<Esc>', actions.closeModal, 'Cancel')
243
275
  .map('n', actions.closeModal, 'Cancel')
244
- .map('<CR>', actions.confirmWorktreeDeleteModal, 'Delete worktree')
245
- .map('y', actions.confirmWorktreeDeleteModal, 'Delete worktree')
276
+ .map('<CR>', actions.confirmWorkspaceDeleteModal, 'Delete workspace')
277
+ .map('y', actions.confirmWorkspaceDeleteModal, 'Delete workspace')
246
278
  )
247
279
 
248
280
  // -----------------------------------------------------------------------
@@ -266,12 +298,36 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
266
298
  )
267
299
 
268
300
  // -----------------------------------------------------------------------
269
- // Modal: rename-worktree
301
+ // Modal: search every setting (always filtering, like the other pickers)
270
302
  // -----------------------------------------------------------------------
271
- .mode('modal.rename-worktree', (m) =>
303
+ .mode('modal.settings-search.filtering', (m) =>
304
+ m
305
+ .map('<Esc>', actions.closeSettingsModal, 'Close')
306
+ .map('<CR>', actions.confirmSettingsSearch, 'Go to setting')
307
+ .map('<C-n>', actions.moveModalSelection(1), 'Next')
308
+ .map('<C-p>', actions.moveModalSelection(-1), 'Prev')
309
+ .map('<Down>', actions.moveModalSelection(1))
310
+ .map('<Up>', actions.moveModalSelection(-1))
311
+ .passthrough()
312
+ )
313
+
314
+ // -----------------------------------------------------------------------
315
+ // Modal: one text field over a settings row
316
+ // -----------------------------------------------------------------------
317
+ .mode('modal.setting-text', (m) =>
318
+ m
319
+ .map('<Esc>', actions.closeSettingsModal, 'Cancel')
320
+ .map('<CR>', actions.confirmSettingText, 'Confirm')
321
+ .passthrough()
322
+ )
323
+
324
+ // -----------------------------------------------------------------------
325
+ // Modal: rename-workspace
326
+ // -----------------------------------------------------------------------
327
+ .mode('modal.rename-workspace', (m) =>
272
328
  m
273
329
  .map('<Esc>', actions.closeModal, 'Cancel')
274
- .map('<CR>', actions.confirmRenameWorktree, 'Confirm')
330
+ .map('<CR>', actions.confirmRenameWorkspace, 'Confirm')
275
331
  .passthrough()
276
332
  )
277
333
 
@@ -282,9 +338,6 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
282
338
  m
283
339
  .map('<Esc>', actions.cancelNewTabModal, 'Cancel')
284
340
  .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
341
  .map('<C-n>', actions.moveModalSelection(1), 'Next')
289
342
  .map('<C-p>', actions.moveModalSelection(-1), 'Prev')
290
343
  .map('<Down>', actions.moveModalSelection(1))
@@ -301,23 +354,12 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
301
354
  )
302
355
 
303
356
  // -----------------------------------------------------------------------
304
- // Modal: new-tab worktree delete confirmation dialog
357
+ // Modal: project-picker (always in filter mode via Picker)
305
358
  // -----------------------------------------------------------------------
306
- .mode('modal.new-tab.worktree-delete-confirm', (m) =>
359
+ .mode('modal.project-picker.filtering', (m) =>
307
360
  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)
316
- // -----------------------------------------------------------------------
317
- .mode('modal.session-picker.filtering', (m) =>
318
- m
319
- .map('<Esc>', actions.sessionPickerEscape, 'Cancel')
320
- .map('<CR>', actions.confirmSelectedSession, 'Open')
361
+ .map('<Esc>', actions.projectPickerEscape, 'Cancel')
362
+ .map('<CR>', actions.confirmSelectedProject, 'Open')
321
363
  .map('<C-n>', actions.moveModalSelection(1), 'Next')
322
364
  .map('<C-p>', actions.moveModalSelection(-1), 'Prev')
323
365
  .map('<Down>', actions.moveModalSelection(1))
@@ -326,23 +368,39 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
326
368
  )
327
369
 
328
370
  // -----------------------------------------------------------------------
329
- // Modal: session-name
371
+ // Modal: project-name
330
372
  // -----------------------------------------------------------------------
331
- .mode('modal.session-name', (m) =>
373
+ .mode('modal.project-name', (m) =>
332
374
  m
333
- .map('<Esc>', actions.backToSessionPicker, 'Cancel')
334
- .map('<CR>', actions.confirmSessionRename, 'Confirm')
375
+ .map('<Esc>', actions.backToProjectPicker, 'Cancel')
376
+ .map('<CR>', actions.confirmProjectRename, 'Confirm')
335
377
  .passthrough()
336
378
  )
337
379
 
338
380
  // -----------------------------------------------------------------------
339
- // Modal: create-session
381
+ // Modal: create-project
340
382
  // -----------------------------------------------------------------------
341
- .mode('modal.create-session', (m) =>
383
+ .mode('modal.create-project', (m) =>
342
384
  m
343
- .map('<Esc>', actions.createSessionEscape, 'Cancel')
385
+ .map('<Esc>', actions.createProjectEscape, 'Cancel')
344
386
  .map('<Tab>', actions.switchField, 'Next field')
345
- .map('<CR>', actions.confirmCreateSession, 'Confirm')
387
+ .map('<CR>', actions.confirmCreateProject, 'Confirm')
388
+ .map('<C-n>', actions.moveModalSelection(1), 'Next')
389
+ .map('<C-p>', actions.moveModalSelection(-1), 'Prev')
390
+ .map('<Down>', actions.moveModalSelection(1))
391
+ .map('<Up>', actions.moveModalSelection(-1))
392
+ .passthrough()
393
+ )
394
+
395
+ // -----------------------------------------------------------------------
396
+ // Modal: create-workspace (a project inside the current project)
397
+ // -----------------------------------------------------------------------
398
+ .mode('modal.create-workspace', (m) =>
399
+ m
400
+ .map('<Esc>', actions.createWorkspaceEscape, 'Back/Cancel')
401
+ .map('<Tab>', actions.switchCreateWorkspaceField, 'Next field')
402
+ .map('<CR>', actions.confirmCreateWorkspace, 'Create')
403
+ .map('<C-CR>', actions.createWorkspaceNewline, 'Newline')
346
404
  .map('<C-n>', actions.moveModalSelection(1), 'Next')
347
405
  .map('<C-p>', actions.moveModalSelection(-1), 'Prev')
348
406
  .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/sessions/etc.).
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
- sessionBar: resolveSessionBar(userConfig.sessionBar),
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 resolveSessionBar(
100
- userConfig: AimuxUserConfig['sessionBar']
101
- ): ResolvedConfig['sessionBar'] {
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 session.
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.