feat(cli): add terminal create, split, rename, focus, close, tui-idle wait (#734)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
This commit is contained in:
Ramzi
2026-04-22 17:51:32 -07:00
committed by GitHub
co-authored by Claude Sonnet 4.6 Jinwoo-H
parent c07db38dfe
commit 4f7b488d22
13 changed files with 1534 additions and 50 deletions
@@ -144,6 +144,40 @@ function registerRuntimeWindowLifecycle(
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('ui:activateWorktree', { repoId, worktreeId, setup })
}
},
createTerminal: (worktreeId, opts) => {
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('ui:createTerminal', {
worktreeId,
command: opts.command,
title: opts.title
})
}
},
splitTerminal: (tabId, paneRuntimeId, opts) => {
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('ui:splitTerminal', {
tabId,
paneRuntimeId,
direction: opts.direction,
command: opts.command
})
}
},
renameTerminal: (tabId, title) => {
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('ui:renameTerminal', { tabId, title })
}
},
focusTerminal: (tabId, worktreeId) => {
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('ui:focusTerminal', { tabId, worktreeId })
}
},
closeTerminal: (tabId, paneRuntimeId) => {
if (!mainWindow.isDestroyed()) {
mainWindow.webContents.send('ui:closeTerminal', { tabId, paneRuntimeId })
}
}
})
// Why: the runtime must fail closed while the renderer graph is being torn