fix(tui): handle events across workspaces (#30281)

This commit is contained in:
James Long
2026-06-01 19:47:37 +00:00
committed by GitHub
parent 5f2b4eab28
commit fa23fb5d38
4 changed files with 12 additions and 21 deletions
@@ -319,7 +319,8 @@ export function Prompt(props: PromptProps) {
let promptPartTypeId = 0
const event = useEvent()
event.on(TuiEvent.PromptAppend.type, (evt) => {
event.on(TuiEvent.PromptAppend.type, (evt, { workspace }) => {
if (workspace !== project.workspace.current()) return
if (!input || input.isDestroyed) return
input.insertText(evt.properties.text)
setTimeout(() => {