mirror of
https://github.com/voideditor/void
synced 2026-05-24 01:48:25 +00:00
always create terminal when apply
This commit is contained in:
parent
a0eb7d6192
commit
e8b7c9c470
1 changed files with 1 additions and 8 deletions
|
|
@ -273,14 +273,7 @@ export const ApplyButtonsHTML = ({
|
|||
if (isShellLanguage) {
|
||||
try {
|
||||
setIsShellRunning(true)
|
||||
// create a terminal if none exists or use terminal 1
|
||||
const terminalIds = terminalToolService.listPersistentTerminalIds()
|
||||
|
||||
let terminalId: string
|
||||
if (terminalIds.length !== 0)
|
||||
terminalId = terminalIds[0] // use 1st terminal id
|
||||
else
|
||||
terminalId = await terminalToolService.createPersistentTerminal({ cwd: null })
|
||||
const terminalId = await terminalToolService.createPersistentTerminal({ cwd: null })
|
||||
|
||||
const { interrupt } = await terminalToolService.runCommand(
|
||||
codeStr,
|
||||
|
|
|
|||
Loading…
Reference in a new issue