@brimveyn/aimux-config 0.6.12 → 0.8.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/package.json +1 -1
- package/src/actions.ts +6 -0
- package/src/defaults.ts +11 -0
- package/src/types.ts +27 -0
package/package.json
CHANGED
package/src/actions.ts
CHANGED
|
@@ -45,6 +45,12 @@ export function helpModal(scope?: ModeId): KeyResult {
|
|
|
45
45
|
return r([{ scope, type: 'open-help-modal' }])
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export const openFlashJump: KeyResult = r(
|
|
49
|
+
[{ type: 'open-flash-jump-modal' }],
|
|
50
|
+
[],
|
|
51
|
+
'modal.flash-jump'
|
|
52
|
+
)
|
|
53
|
+
|
|
48
54
|
export const toggleSidebar: KeyResult = r([{ type: 'toggle-sidebar' }])
|
|
49
55
|
export const toggleGitPane: KeyResult = r([{ type: 'toggle-git-pane' }])
|
|
50
56
|
export const toggleSessionBar: KeyResult = r([{ type: 'toggle-session-bar' }])
|
package/src/defaults.ts
CHANGED
|
@@ -55,6 +55,7 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
55
55
|
.map('K', actions.reorderSession(-1), 'Move workspace up')
|
|
56
56
|
.map('r', actions.renameTab, 'Rename tab')
|
|
57
57
|
.map('i', actions.enterInsert, 'Focus terminal')
|
|
58
|
+
.map('S', actions.openFlashJump, 'Flash jump')
|
|
58
59
|
.map('?', actions.helpModal(), 'Help')
|
|
59
60
|
)
|
|
60
61
|
|
|
@@ -226,6 +227,16 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
|
|
|
226
227
|
.map('y', actions.confirmWorktreeDeleteModal, 'Delete worktree')
|
|
227
228
|
)
|
|
228
229
|
|
|
230
|
+
// -----------------------------------------------------------------------
|
|
231
|
+
// Modal: flash-jump (flash.nvim-style label jump)
|
|
232
|
+
// -----------------------------------------------------------------------
|
|
233
|
+
.mode('modal.flash-jump', (m) =>
|
|
234
|
+
m
|
|
235
|
+
.map('<Esc>', actions.closeModal, 'Cancel')
|
|
236
|
+
.map('<Space>', actions.closeModal, 'Cancel')
|
|
237
|
+
.passthrough()
|
|
238
|
+
)
|
|
239
|
+
|
|
229
240
|
// -----------------------------------------------------------------------
|
|
230
241
|
// Modal: rename-tab
|
|
231
242
|
// -----------------------------------------------------------------------
|
package/src/types.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type ModeId =
|
|
|
33
33
|
| 'modal.worktree-move'
|
|
34
34
|
| 'modal.worktree-move-confirm'
|
|
35
35
|
| 'modal.ai-usage'
|
|
36
|
+
| 'modal.flash-jump'
|
|
36
37
|
|
|
37
38
|
// ─── Primitive app types ──────────────────────────────────────────────────────
|
|
38
39
|
|
|
@@ -422,6 +423,29 @@ export interface ModalWorktreeDeleteConfirm extends ModalBase {
|
|
|
422
423
|
force: boolean
|
|
423
424
|
}
|
|
424
425
|
|
|
426
|
+
export type FlashJumpTargetKind = 'workspace' | 'worktree' | 'tab'
|
|
427
|
+
|
|
428
|
+
export interface FlashJumpTarget {
|
|
429
|
+
kind: FlashJumpTargetKind
|
|
430
|
+
sessionIndex: number
|
|
431
|
+
sessionId: string
|
|
432
|
+
worktreeId?: string
|
|
433
|
+
tabId?: string
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export interface FlashLabel {
|
|
437
|
+
key: string
|
|
438
|
+
label: string
|
|
439
|
+
target: FlashJumpTarget
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface ModalFlashJump extends ModalBase {
|
|
443
|
+
type: 'flash-jump'
|
|
444
|
+
labels: FlashLabel[]
|
|
445
|
+
buffer: string
|
|
446
|
+
pendingJump: FlashJumpTarget | null
|
|
447
|
+
}
|
|
448
|
+
|
|
425
449
|
export type ModalState =
|
|
426
450
|
| ModalClosed
|
|
427
451
|
| ModalNewTab
|
|
@@ -441,6 +465,7 @@ export type ModalState =
|
|
|
441
465
|
| ModalWorktreeMove
|
|
442
466
|
| ModalWorktreeMoveConfirm
|
|
443
467
|
| ModalWorktreeDeleteConfirm
|
|
468
|
+
| ModalFlashJump
|
|
444
469
|
|
|
445
470
|
export interface LayoutState {
|
|
446
471
|
terminalCols: number
|
|
@@ -581,6 +606,8 @@ export type ModalAction =
|
|
|
581
606
|
closeTabs: boolean
|
|
582
607
|
force: boolean
|
|
583
608
|
}
|
|
609
|
+
| { type: 'open-flash-jump-modal' }
|
|
610
|
+
| { type: 'clear-flash-jump-pending' }
|
|
584
611
|
|
|
585
612
|
export type SessionAction =
|
|
586
613
|
| { type: 'load-session'; sessionId: string; workspaceSnapshot?: WorkspaceSnapshotV1 }
|