diff options
| author | Adam <[email protected]> | 2025-12-19 07:38:33 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-19 07:38:38 -0600 |
| commit | e1ad2a355c84422ef8c6a20f998bc71f2881713a (patch) | |
| tree | b37c2dc4ff16bf6d9fcfd83f35a2ff5aea37d5aa /packages/desktop/src/context/global-sync.tsx | |
| parent | 4f318f913e034ccd2fe4456461bf56b22a37eed9 (diff) | |
| download | opencode-e1ad2a355c84422ef8c6a20f998bc71f2881713a.tar.gz opencode-e1ad2a355c84422ef8c6a20f998bc71f2881713a.zip | |
fix(desktop): error handling
Diffstat (limited to 'packages/desktop/src/context/global-sync.tsx')
| -rw-r--r-- | packages/desktop/src/context/global-sync.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/desktop/src/context/global-sync.tsx b/packages/desktop/src/context/global-sync.tsx index 6c6a02432..fffef5b5f 100644 --- a/packages/desktop/src/context/global-sync.tsx +++ b/packages/desktop/src/context/global-sync.tsx @@ -21,6 +21,8 @@ import { Binary } from "@opencode-ai/util/binary" import { useGlobalSDK } from "./global-sdk" import { ErrorPage, type InitError } from "../pages/error" import { createContext, useContext, onMount, type ParentProps, Switch, Match } from "solid-js" +import { showToast } from "@opencode-ai/ui/toast" +import { getFilename } from "@opencode-ai/util/path" type State = { ready: boolean @@ -118,7 +120,8 @@ function createGlobalSync() { }) .catch((err) => { console.error("Failed to load sessions", err) - setGlobalStore("error", err) + const project = getFilename(directory) + showToast({ title: `Failed to load sessions for ${project}`, description: err.message }) }) } |
