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:
co-authored by
Claude Sonnet 4.6
Jinwoo-H
parent
c07db38dfe
commit
4f7b488d22
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user