@brimveyn/aimux 1.12.6 → 1.13.2
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 +3 -0
- package/package.json +4 -3
- package/src/app-runtime/auto-commit-driver.ts +8 -4
- package/src/app-runtime/auto-commit-ref.ts +1 -1
- package/src/app-runtime/backend-attach-runtime.ts +29 -13
- package/src/app-runtime/backend-runtime-events.ts +1 -1
- package/src/app-runtime/selection-scroll.ts +2 -2
- package/src/app-runtime/session-actions.ts +16 -4
- package/src/app-runtime/side-effects.ts +563 -85
- package/src/app-runtime/snippet-actions.ts +3 -3
- package/src/app-runtime/use-auto-commit-driver.ts +7 -4
- package/src/app-runtime/use-backend-runtime.ts +3 -3
- package/src/app-runtime/use-directory-search.ts +7 -5
- package/src/app-runtime/use-mouse-handlers.ts +11 -6
- package/src/app-runtime/use-pane-size-report.ts +1 -1
- package/src/app-runtime/use-renderer-bindings.ts +6 -5
- package/src/app.tsx +12 -7
- package/src/auto-commit/headless-commands.ts +4 -6
- package/src/daemon/daemon.ts +21 -11
- package/src/daemon/runtime-paths.ts +1 -1
- package/src/daemon/session-manager.ts +1 -1
- package/src/daemon/session-registry.ts +10 -3
- package/src/diff-parser/parse-patch-files.ts +18 -18
- package/src/git/command-queue.ts +19 -3
- package/src/git/divergence.ts +46 -0
- package/src/git/git-diff.ts +12 -5
- package/src/git/git-poller.ts +33 -11
- package/src/git/git-status.ts +14 -3
- package/src/git/move-worktree.ts +96 -0
- package/src/git/use-repo-discovery.ts +2 -1
- package/src/git/worktree-divergence-poller.ts +59 -0
- package/src/git/worktree.ts +99 -0
- package/src/index.tsx +1 -1
- package/src/input/keymap/describe-bindings.ts +27 -9
- package/src/input/keymap/key-chord.ts +4 -4
- package/src/input/keymap/key-format.ts +2 -2
- package/src/input/keymap/sequence-resolver.ts +1 -1
- package/src/input/keymap/trie.ts +1 -1
- package/src/input/modes/bridge.ts +7 -0
- package/src/input/modes/transitions.ts +2 -1
- package/src/input/modes/types.ts +11 -1
- package/src/input/raw-input-handler.ts +1 -1
- package/src/input/terminal-text-extraction.ts +9 -5
- package/src/integrations/claude-syntax-overlay.ts +8 -8
- package/src/integrations/claude-theme-sync.ts +12 -12
- package/src/ipc/protocol.ts +3 -3
- package/src/platform/clipboard.ts +4 -2
- package/src/platform/worktree-deps.ts +22 -0
- package/src/platform/worktree-paths.ts +67 -0
- package/src/profile-paths.ts +3 -3
- package/src/pty/assistant-status-detection-loop.ts +2 -2
- package/src/pty/assistant-status-detector.ts +15 -6
- package/src/pty/command-registry.ts +2 -1
- package/src/pty/pty-manager.ts +1 -1
- package/src/services/ai-usage/adapters/claude.ts +5 -5
- package/src/services/ai-usage/adapters/codex.ts +8 -8
- package/src/services/ai-usage/cache.ts +2 -2
- package/src/services/ai-usage/pace.ts +3 -6
- package/src/services/ai-usage/provider.ts +1 -1
- package/src/session-backend/bootstrap.ts +2 -2
- package/src/session-backend/local-session-backend.ts +11 -11
- package/src/session-backend/remote-session-backend.ts +60 -45
- package/src/session-backend/types.ts +2 -2
- package/src/snippets/expand-variables.ts +7 -7
- package/src/snippets/run-shell-var.ts +1 -1
- package/src/snippets/trigger-detector.ts +1 -1
- package/src/state/ai-usage-store.ts +1 -1
- package/src/state/git-tree.ts +8 -4
- package/src/state/layout-tree.ts +8 -5
- package/src/state/reducers/git-mode-state.ts +44 -14
- package/src/state/reducers/git-panel-state.ts +38 -2
- package/src/state/reducers/modal-state.ts +355 -21
- package/src/state/reducers/session-state.ts +60 -1
- package/src/state/reducers/tab-state.ts +151 -85
- package/src/state/selectors.ts +6 -4
- package/src/state/session-catalog.ts +20 -5
- package/src/state/session-persistence.ts +8 -4
- package/src/state/session-worktrees.ts +227 -0
- package/src/state/store.ts +1 -0
- package/src/state/toast-store.ts +95 -0
- package/src/state/types.ts +92 -13
- package/src/state/validation.ts +25 -2
- package/src/terminal-manager/manager-client.ts +15 -13
- package/src/ui/components/git/diff-renderer/fold-strip.tsx +32 -24
- package/src/ui/components/git/diff-renderer/pierre-diff.tsx +1 -1
- package/src/ui/components/git/diff-renderer/prepare-diff.ts +2 -2
- package/src/ui/components/git/diff-renderer/split-view.tsx +39 -11
- package/src/ui/components/git/diff-renderer/stacked-view.tsx +29 -7
- package/src/ui/components/git/diff-renderer/use-diff-prefetch.ts +28 -11
- package/src/ui/components/git/diff-renderer/use-diff-preparation.ts +10 -8
- package/src/ui/components/git/git-panel.tsx +129 -83
- package/src/ui/components/git/git-view.tsx +96 -28
- package/src/ui/components/git/image-diff/image-diff-view.tsx +2 -2
- package/src/ui/components/git/image-diff/terminal-image-pane.tsx +14 -13
- package/src/ui/components/git/pane/git-pane-context-menu.ts +2 -2
- package/src/ui/components/git/pane/git-pane-widget.tsx +6 -4
- package/src/ui/components/layout/session-bar.tsx +135 -117
- package/src/ui/components/layout/sidebar/sidebar.tsx +244 -82
- package/src/ui/components/layout/sidebar/tab-item.tsx +68 -41
- package/src/ui/components/layout/sidebar/use-sidebar-auto-scroll.ts +2 -2
- package/src/ui/components/layout/sidebar/use-sidebar-branch.ts +1 -1
- package/src/ui/components/layout/split-layout.tsx +27 -20
- package/src/ui/components/layout/terminal-pane.tsx +163 -120
- package/src/ui/components/modals/app/ai-usage-modal.tsx +8 -5
- package/src/ui/components/modals/app/help-modal.tsx +29 -20
- package/src/ui/components/modals/git/git-commit-modal.tsx +17 -10
- package/src/ui/components/modals/sessions/create-session-modal.tsx +18 -10
- package/src/ui/components/modals/sessions/session-picker-modal.tsx +36 -28
- package/src/ui/components/modals/shared/form.tsx +6 -6
- package/src/ui/components/modals/shared/modal-shell.tsx +3 -3
- package/src/ui/components/modals/shared/picker.tsx +71 -32
- package/src/ui/components/modals/snippets/snippet-picker-modal.tsx +50 -29
- package/src/ui/components/modals/tabs/new-tab-modal.tsx +209 -25
- package/src/ui/components/modals/themes/theme-picker-modal.tsx +24 -15
- package/src/ui/components/modals/worktree/worktree-move-modal.tsx +111 -0
- package/src/ui/components/overlays/ai-usage/ai-usage-indicator.tsx +14 -9
- package/src/ui/components/overlays/context-menu/context-menu-box.tsx +20 -11
- package/src/ui/components/overlays/context-menu/context-menu-overlay.tsx +69 -34
- package/src/ui/components/overlays/toast/toast-item.tsx +88 -0
- package/src/ui/components/overlays/toast/toast-position.ts +45 -0
- package/src/ui/components/overlays/toast/toast-stack.tsx +30 -0
- package/src/ui/components/overlays/toast/toast-viewport.tsx +24 -0
- package/src/ui/components/overlays/toast/use-toast-animation.ts +64 -0
- package/src/ui/components/primitives/input-field.tsx +1 -1
- package/src/ui/components/primitives/list-item.tsx +23 -7
- package/src/ui/filter-themes.ts +1 -1
- package/src/ui/root.tsx +121 -38
- package/src/ui/session-ordering.ts +2 -2
- package/src/ui/status-bar-model.ts +14 -7
- package/src/ui/terminal-graphics/capabilities.ts +1 -1
- package/src/ui/terminal-graphics/format-fallback.ts +7 -9
- package/src/ui/terminal-graphics/kitty.ts +2 -7
- package/src/update/version-check.ts +1 -1
|
@@ -3,6 +3,7 @@ import type { ModeId, ResolvedKeymapConfig } from '@brimveyn/aimux-config'
|
|
|
3
3
|
import type { AppState, TabSession } from '../state/types'
|
|
4
4
|
|
|
5
5
|
import { describeBindings } from '../input/keymap/describe-bindings'
|
|
6
|
+
import { getSessionProjectPath } from '../state/session-worktrees'
|
|
6
7
|
import { buildHintText } from './keymap-context'
|
|
7
8
|
import { abbreviatePath } from './path-format'
|
|
8
9
|
|
|
@@ -58,13 +59,16 @@ export function getStatusBarModel(
|
|
|
58
59
|
activeTab: TabSession | undefined,
|
|
59
60
|
config: ResolvedKeymapConfig
|
|
60
61
|
): StatusBarModel {
|
|
61
|
-
const currentSession =
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
const currentSession =
|
|
63
|
+
state.currentSessionId != null && state.currentSessionId !== ''
|
|
64
|
+
? state.sessions.find((session) => session.id === state.currentSessionId)
|
|
65
|
+
: undefined
|
|
64
66
|
const sessionName = currentSession?.name ?? 'no workspace'
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
const sessionPath = getSessionProjectPath(currentSession)
|
|
68
|
+
const sessionLabel =
|
|
69
|
+
sessionPath != null && sessionPath !== ''
|
|
70
|
+
? `${sessionName} (${abbreviatePath(sessionPath)})`
|
|
71
|
+
: sessionName
|
|
68
72
|
|
|
69
73
|
// \u{f0b1} = nf-fa-briefcase (session icon)
|
|
70
74
|
const sessionIcon = '\u{f0b1}'
|
|
@@ -87,9 +91,10 @@ export function getStatusBarModel(
|
|
|
87
91
|
case 'git': {
|
|
88
92
|
const headOffset = state.gitMode.headOffset
|
|
89
93
|
const offsetTag = headOffset > 0 ? ` HEAD~${headOffset}` : ''
|
|
94
|
+
const reviewTag = state.gitMode.reviewBase ? ' vs base' : ''
|
|
90
95
|
return {
|
|
91
96
|
help: helpHintForMode(config, 'git-mode'),
|
|
92
|
-
left: `${sessionIcon} ${sessionLabel}${offsetTag}`,
|
|
97
|
+
left: `${sessionIcon} ${sessionLabel}${offsetTag}${reviewTag}`,
|
|
93
98
|
right: hintForGitMode(config, headOffset),
|
|
94
99
|
}
|
|
95
100
|
}
|
|
@@ -127,6 +132,8 @@ function deriveModalModeId(modalType: AppState['modal']['type']): ModeId | null
|
|
|
127
132
|
return 'modal.theme-picker.filtering'
|
|
128
133
|
case 'update-available':
|
|
129
134
|
return 'modal.update-available'
|
|
135
|
+
case 'worktree-move':
|
|
136
|
+
return 'modal.worktree-move'
|
|
130
137
|
default:
|
|
131
138
|
return null
|
|
132
139
|
}
|
|
@@ -11,7 +11,7 @@ let cached: GraphicsProtocol | null = null
|
|
|
11
11
|
export function detectGraphicsProtocol(renderer: CliRenderer): GraphicsProtocol {
|
|
12
12
|
if (cached !== null) return cached
|
|
13
13
|
const caps = (renderer as RendererWithCapabilities).capabilities
|
|
14
|
-
if (caps?.kitty_graphics) {
|
|
14
|
+
if (caps?.kitty_graphics === true) {
|
|
15
15
|
cached = 'kitty'
|
|
16
16
|
return cached
|
|
17
17
|
}
|
|
@@ -24,10 +24,8 @@ async function tryConverter(
|
|
|
24
24
|
stdout: 'pipe',
|
|
25
25
|
})
|
|
26
26
|
const writer = proc.stdin
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
await writer.end()
|
|
30
|
-
}
|
|
27
|
+
void writer.write(bytes)
|
|
28
|
+
await writer.end()
|
|
31
29
|
const timer = setTimeout(() => proc.kill(), timeoutMs)
|
|
32
30
|
const [out, code] = await Promise.all([new Response(proc.stdout).bytes(), proc.exited])
|
|
33
31
|
clearTimeout(timer)
|
|
@@ -85,11 +83,11 @@ export async function convertToPng(bytes: Uint8Array, mime: string): Promise<Con
|
|
|
85
83
|
const png = await renderSvgToPng(bytes)
|
|
86
84
|
result = png ? { kind: 'ok', png } : { kind: 'error', reason: 'failed to render SVG' }
|
|
87
85
|
} else {
|
|
88
|
-
const attempts:
|
|
89
|
-
() => tryConverter(['magick', '-', 'png:-'], bytes, 1500),
|
|
90
|
-
() => tryConverter(['convert', '-', 'png:-'], bytes, 1500),
|
|
91
|
-
() => trySips(bytes),
|
|
92
|
-
() =>
|
|
86
|
+
const attempts: (() => Promise<Uint8Array | null>)[] = [
|
|
87
|
+
async () => tryConverter(['magick', '-', 'png:-'], bytes, 1500),
|
|
88
|
+
async () => tryConverter(['convert', '-', 'png:-'], bytes, 1500),
|
|
89
|
+
async () => trySips(bytes),
|
|
90
|
+
async () =>
|
|
93
91
|
tryConverter(
|
|
94
92
|
[
|
|
95
93
|
'ffmpeg',
|
|
@@ -53,13 +53,8 @@ export function uploadPngEscape(pngBytes: Uint8Array, id: number): string {
|
|
|
53
53
|
for (let i = 0; i < chunks.length; i++) {
|
|
54
54
|
const isLast = i === chunks.length - 1
|
|
55
55
|
const m = isLast ? 0 : 1
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
// a=t (transmit), t=d (direct), f=100 (PNG), q=2 (quiet).
|
|
59
|
-
header = `q=2,a=t,t=d,f=100,i=${id},m=${m}`
|
|
60
|
-
} else {
|
|
61
|
-
header = `m=${m},q=2`
|
|
62
|
-
}
|
|
56
|
+
// a=t (transmit), t=d (direct), f=100 (PNG), q=2 (quiet).
|
|
57
|
+
const header = i === 0 ? `q=2,a=t,t=d,f=100,i=${id},m=${m}` : `m=${m},q=2`
|
|
63
58
|
parts.push(`${ESC}_G${header};${chunks[i]}${ST}`)
|
|
64
59
|
}
|
|
65
60
|
return wrapForTmux(parts.join(''))
|
|
@@ -9,7 +9,7 @@ export async function getCurrentPackageVersion(): Promise<string> {
|
|
|
9
9
|
|
|
10
10
|
export async function fetchLatestNpmVersion(packageName: string): Promise<string | null> {
|
|
11
11
|
const debugOverride = process.env.AIMUX_DEBUG_UPDATE_LATEST
|
|
12
|
-
if (debugOverride) {
|
|
12
|
+
if (debugOverride != null && debugOverride !== '') {
|
|
13
13
|
return debugOverride
|
|
14
14
|
}
|
|
15
15
|
|