fix: upgrade toast notification (#4159)

This commit is contained in:
denesbeck
2025-11-10 17:28:28 +01:00
committed by GitHub
parent c7808a4b01
commit 0a92af60a0

View File

@@ -22,7 +22,7 @@ import { Home } from "@tui/routes/home"
import { Session } from "@tui/routes/session"
import { PromptHistoryProvider } from "./component/prompt/history"
import { DialogAlert } from "./ui/dialog-alert"
import { ToastProvider, useToast } from "./ui/toast"
import { ToastProvider, useToast, Toast } from "./ui/toast"
import { ExitProvider, useExit } from "./context/exit"
import { Session as SessionApi } from "@/session"
import { TuiEvent } from "./event"
@@ -393,6 +393,15 @@ function App() {
})
})
event.on(Installation.Event.Updated.type, (evt) => {
toast.show({
variant: "success",
title: "Update Complete",
message: `OpenCode updated to v${evt.properties.version}`,
duration: 5000,
})
})
return (
<box
width={dimensions().width}
@@ -453,6 +462,7 @@ function App() {
</text>
</box>
</box>
<Toast />
</box>
)
}