summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordenesbeck <[email protected]>2025-11-10 17:28:28 +0100
committerGitHub <[email protected]>2025-11-10 10:28:28 -0600
commit0a92af60a0e255e1b72f04e6d62e84c760dfec42 (patch)
tree983f1ae89d6cc7e0e1620932aa104b0516bf5370
parentc7808a4b01c5171c50de156dac41e71ca2fdac0c (diff)
downloadopencode-0a92af60a0e255e1b72f04e6d62e84c760dfec42.tar.gz
opencode-0a92af60a0e255e1b72f04e6d62e84c760dfec42.zip
fix: upgrade toast notification (#4159)
-rw-r--r--packages/opencode/src/cli/cmd/tui/app.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/app.tsx b/packages/opencode/src/cli/cmd/tui/app.tsx
index dc4eabfdd..671169085 100644
--- a/packages/opencode/src/cli/cmd/tui/app.tsx
+++ b/packages/opencode/src/cli/cmd/tui/app.tsx
@@ -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>
)
}