@brimveyn/aimux 1.14.10 → 1.14.13
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brimveyn/aimux",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.13",
|
|
4
4
|
"description": "A terminal multiplexer for AI CLIs. Run Claude, Codex, OpenCode side-by-side with tabbed navigation, split panes, and persistent sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"bump": "bun run scripts/bump.ts"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@brimveyn/aimux-config": "0.6.
|
|
63
|
+
"@brimveyn/aimux-config": "0.6.8",
|
|
64
64
|
"@opentui/core": "^0.1.90",
|
|
65
65
|
"@opentui/react": "^0.1.90",
|
|
66
66
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
removeGitWorktree,
|
|
30
30
|
} from '../git/worktree'
|
|
31
31
|
import { createPrefixedId } from '../platform/id'
|
|
32
|
-
import { linkNodeModules } from '../platform/worktree-deps'
|
|
33
32
|
import {
|
|
34
33
|
assertSafeAimuxWorktreePath,
|
|
35
34
|
isInsideAimuxWorktreeRoot,
|
|
@@ -1337,9 +1336,6 @@ async function createAimuxTempWorktree(
|
|
|
1337
1336
|
await mkdir(dirname(targetPath), { recursive: true })
|
|
1338
1337
|
await assertSafeAimuxWorktreePath(targetPath)
|
|
1339
1338
|
await createGitWorktree({ baseRef, branchName, repoPath: repoRoot, targetPath })
|
|
1340
|
-
// For JS projects, reuse the source checkout's installed dependencies instead
|
|
1341
|
-
// of forcing a fresh install in the new worktree.
|
|
1342
|
-
const linkedModules = await linkNodeModules(sourcePath, targetPath).catch(() => false)
|
|
1343
1339
|
const now = new Date().toISOString()
|
|
1344
1340
|
|
|
1345
1341
|
const worktree: WorktreeRecord = {
|
|
@@ -1364,11 +1360,7 @@ async function createAimuxTempWorktree(
|
|
|
1364
1360
|
}))
|
|
1365
1361
|
saveSessionCatalog(sessions)
|
|
1366
1362
|
ctx.dispatch({ sessions, type: 'set-sessions' })
|
|
1367
|
-
toast.success(
|
|
1368
|
-
linkedModules
|
|
1369
|
-
? `Created worktree ${branchName} (linked node_modules)`
|
|
1370
|
-
: `Created worktree ${branchName}`
|
|
1371
|
-
)
|
|
1363
|
+
toast.success(`Created worktree ${branchName}`)
|
|
1372
1364
|
return worktree
|
|
1373
1365
|
}
|
|
1374
1366
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MouseEvent as OtuiMouseEvent } from '@opentui/core'
|
|
1
|
+
import type { MouseEvent as OtuiMouseEvent, TextRenderable } from '@opentui/core'
|
|
2
2
|
|
|
3
3
|
import { memo, type ReactNode, useCallback, useMemo } from 'react'
|
|
4
4
|
|
|
@@ -104,6 +104,27 @@ interface TerminalViewportProps {
|
|
|
104
104
|
buffer: string
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
const NOOP = (): void => {}
|
|
108
|
+
|
|
109
|
+
// aimux renders the exact visible window and owns scrollback through the backend
|
|
110
|
+
// xterm buffer (viewportY); opentui's built-in text scroll (_scrollY) must never
|
|
111
|
+
// engage. During any transient where the rendered content is briefly taller than
|
|
112
|
+
// the box (resize lag, or — with the old default wrapMode="word" — a line that
|
|
113
|
+
// wraps) a wheel event bumps _scrollY, and opentui's onResize never re-clamps it,
|
|
114
|
+
// so the offset sticks for the renderable's life: the viewport shifts up, dead
|
|
115
|
+
// rows appear at the bottom, and the prompt scrolls off-screen after `clear`.
|
|
116
|
+
// Pin the offset to 0 and disable the built-in wheel handler outright (it also
|
|
117
|
+
// drives horizontal scroll once wrapMode is "none"). The event still bubbles to
|
|
118
|
+
// forwardScrollEvent, so local scrollback / mouse-forwarding keep working, and
|
|
119
|
+
// selection is unaffected (it's driven by the renderer, not handleScroll).
|
|
120
|
+
// handleScroll is protected; reach it via Reflect, mirroring the scrollY reset
|
|
121
|
+
// already used in TerminalPane.
|
|
122
|
+
const pinTerminalScroll = (node: TextRenderable | null): void => {
|
|
123
|
+
if (!node) return
|
|
124
|
+
Reflect.set(node, 'handleScroll', NOOP)
|
|
125
|
+
if (node.scrollY !== 0) node.scrollY = 0
|
|
126
|
+
}
|
|
127
|
+
|
|
107
128
|
const TerminalViewport = memo(function TerminalViewport({
|
|
108
129
|
buffer,
|
|
109
130
|
viewport,
|
|
@@ -112,7 +133,7 @@ const TerminalViewport = memo(function TerminalViewport({
|
|
|
112
133
|
if (viewport && viewport.lines.length > 0) {
|
|
113
134
|
const lines = viewport.lines
|
|
114
135
|
return (
|
|
115
|
-
<text fg={t.text}>
|
|
136
|
+
<text ref={pinTerminalScroll} fg={t.text} wrapMode="none">
|
|
116
137
|
{lines.map((line, lineIndex) => (
|
|
117
138
|
// Terminal rows are a fixed positional grid; the row index is the identity.
|
|
118
139
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -125,7 +146,11 @@ const TerminalViewport = memo(function TerminalViewport({
|
|
|
125
146
|
)
|
|
126
147
|
}
|
|
127
148
|
|
|
128
|
-
return
|
|
149
|
+
return (
|
|
150
|
+
<text ref={pinTerminalScroll} fg={t.text} wrapMode="none">
|
|
151
|
+
{buffer.length > 0 ? buffer : 'Waiting for workspace output...'}
|
|
152
|
+
</text>
|
|
153
|
+
)
|
|
129
154
|
})
|
|
130
155
|
|
|
131
156
|
export function TerminalPane({
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs'
|
|
2
|
-
import { realpath, symlink } from 'node:fs/promises'
|
|
3
|
-
import { join } from 'node:path'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Symlink the source checkout's `node_modules` into a freshly created worktree
|
|
7
|
-
* so a JS project's dependencies don't need reinstalling. No-op when the source
|
|
8
|
-
* isn't a JS project, has no installed `node_modules`, or the worktree already
|
|
9
|
-
* has one. Returns true when a symlink was created.
|
|
10
|
-
*/
|
|
11
|
-
export async function linkNodeModules(sourceDir: string, worktreePath: string): Promise<boolean> {
|
|
12
|
-
if (!existsSync(join(sourceDir, 'package.json'))) return false
|
|
13
|
-
const sourceModules = join(sourceDir, 'node_modules')
|
|
14
|
-
if (!existsSync(sourceModules)) return false
|
|
15
|
-
const targetModules = join(worktreePath, 'node_modules')
|
|
16
|
-
if (existsSync(targetModules)) return false
|
|
17
|
-
// Resolve through any existing symlink so the new link points at the real
|
|
18
|
-
// dependency store rather than chaining through another worktree.
|
|
19
|
-
const resolved = await realpath(sourceModules)
|
|
20
|
-
await symlink(resolved, targetModules, 'dir')
|
|
21
|
-
return true
|
|
22
|
-
}
|