@miphamai/cli 0.24.10 → 0.24.12
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/bin/mipham.ts +27 -0
- package/package.json +1 -1
- package/src/agent-view/dashboard.tsx +3 -3
package/bin/mipham.ts
CHANGED
|
@@ -308,6 +308,33 @@ async function runUpdate(): Promise<boolean> {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
async function main() {
|
|
311
|
+
// ── Disable terminal special characters ──────────────────────────────────
|
|
312
|
+
// Terminal intercepts Ctrl+S (XOFF), Ctrl+T (SIGINFO/status), Ctrl+R (rprnt)
|
|
313
|
+
// before the app sees them. Disable these so Agent Dashboard shortcuts work.
|
|
314
|
+
const { execSync } = await import('node:child_process')
|
|
315
|
+
let savedStty = ''
|
|
316
|
+
try {
|
|
317
|
+
savedStty = execSync('stty -g 2>/dev/null || true', { encoding: 'utf-8' }).trim()
|
|
318
|
+
// Disable: flow control (^S/^Q), status (^T), reprint (^R)
|
|
319
|
+
execSync('stty -ixon stop undef start undef status undef rprnt undef 2>/dev/null || true', {
|
|
320
|
+
stdio: 'ignore',
|
|
321
|
+
})
|
|
322
|
+
} catch {
|
|
323
|
+
// Non-POSIX platform (Windows) — no special chars to disable
|
|
324
|
+
}
|
|
325
|
+
// Restore original terminal settings on exit
|
|
326
|
+
const restoreTerminal = () => {
|
|
327
|
+
if (!savedStty) return
|
|
328
|
+
try {
|
|
329
|
+
execSync(`stty ${savedStty} 2>/dev/null || true`, { stdio: 'ignore' })
|
|
330
|
+
} catch {
|
|
331
|
+
/* ignore */
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
process.on('exit', restoreTerminal)
|
|
335
|
+
process.on('SIGINT', restoreTerminal)
|
|
336
|
+
process.on('SIGTERM', restoreTerminal)
|
|
337
|
+
|
|
311
338
|
// ── Read version fresh from package.json at startup (bypasses Bun module cache) ──
|
|
312
339
|
const { readFileSync } = await import('node:fs')
|
|
313
340
|
const { join } = await import('node:path')
|
package/package.json
CHANGED
|
@@ -103,8 +103,8 @@ export function AgentViewDashboard({ manager, onAttach, onExit }: DashboardProps
|
|
|
103
103
|
return
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// Ctrl+
|
|
107
|
-
if (input === '\
|
|
106
|
+
// Ctrl+T — toggle group by (status ↔ directory)
|
|
107
|
+
if (input === '\x14') {
|
|
108
108
|
setGroupBy((prev) => (prev === 'status' ? 'directory' : 'status'))
|
|
109
109
|
showFeedback(`Grouped by ${_groupBy === 'status' ? 'directory' : 'status'}`)
|
|
110
110
|
return
|
|
@@ -207,7 +207,7 @@ export function AgentViewDashboard({ manager, onAttach, onExit }: DashboardProps
|
|
|
207
207
|
</Box>
|
|
208
208
|
<Box>
|
|
209
209
|
<Text dimColor>
|
|
210
|
-
j/k navigate · Space peek · Enter attach · Ctrl+
|
|
210
|
+
j/k navigate · Space peek · Enter attach · Ctrl+T group · Ctrl+R rename · Esc back
|
|
211
211
|
</Text>
|
|
212
212
|
</Box>
|
|
213
213
|
</Box>
|