|
|
@@ -958,11 +958,13 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
|
|
|
bindings: tuiConfig.keybinds.gather("app_exit", ["app.exit"]),
|
|
|
}))
|
|
|
|
|
|
- event.on(TuiEvent.CommandExecute.type, (evt) => {
|
|
|
+ event.on(TuiEvent.CommandExecute.type, (evt, { workspace }) => {
|
|
|
+ if (workspace !== project.workspace.current()) return
|
|
|
keymap.dispatchCommand(evt.properties.command)
|
|
|
})
|
|
|
|
|
|
- event.on(TuiEvent.ToastShow.type, (evt) => {
|
|
|
+ event.on(TuiEvent.ToastShow.type, (evt, { workspace }) => {
|
|
|
+ if (workspace !== project.workspace.current()) return
|
|
|
toast.show({
|
|
|
title: evt.properties.title,
|
|
|
message: evt.properties.message,
|
|
|
@@ -971,7 +973,8 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
- event.on(TuiEvent.SessionSelect.type, (evt) => {
|
|
|
+ event.on(TuiEvent.SessionSelect.type, (evt, { workspace }) => {
|
|
|
+ if (workspace !== project.workspace.current()) return
|
|
|
route.navigate({
|
|
|
type: "session",
|
|
|
sessionID: evt.properties.sessionID,
|
|
|
@@ -988,7 +991,8 @@ function App(props: { onSnapshot?: () => Promise<string[]> }) {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- event.on("session.error", (evt) => {
|
|
|
+ event.on("session.error", (evt, { workspace }) => {
|
|
|
+ if (workspace !== project.workspace.current()) return
|
|
|
const error = evt.properties.error
|
|
|
if (error && typeof error === "object" && error.name === "MessageAbortedError") return
|
|
|
const message = errorMessage(error)
|