diff options
| author | adamelmore <[email protected]> | 2026-01-12 08:38:29 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2026-01-15 07:29:13 -0600 |
| commit | 9f66a45970d1edf12ae9b3e7a22d77711b5e51c3 (patch) | |
| tree | a34f43cddd3fc53a731af7c2fb631f3ec05c012c /packages/app/src/context | |
| parent | 779610d668e239c07014c9d350d47e2213c07b26 (diff) | |
| download | opencode-9f66a45970d1edf12ae9b3e7a22d77711b5e51c3.tar.gz opencode-9f66a45970d1edf12ae9b3e7a22d77711b5e51c3.zip | |
feat(app): new layout
Diffstat (limited to 'packages/app/src/context')
| -rw-r--r-- | packages/app/src/context/global-sync.tsx | 9 | ||||
| -rw-r--r-- | packages/app/src/context/platform.tsx | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/packages/app/src/context/global-sync.tsx b/packages/app/src/context/global-sync.tsx index ea0b90d5d..a0b257056 100644 --- a/packages/app/src/context/global-sync.tsx +++ b/packages/app/src/context/global-sync.tsx @@ -124,12 +124,19 @@ function createGlobalSync() { return globalSDK.client.session .list({ directory, roots: true }) .then((x) => { - const fourHoursAgo = Date.now() - 4 * 60 * 60 * 1000 const nonArchived = (x.data ?? []) .filter((s) => !!s?.id) .filter((s) => !s.time?.archived) .slice() .sort((a, b) => a.id.localeCompare(b.id)) + + const sandboxWorkspace = globalStore.project.some((p) => (p.sandboxes ?? []).includes(directory)) + if (sandboxWorkspace) { + setStore("session", reconcile(nonArchived, { key: "id" })) + return + } + + const fourHoursAgo = Date.now() - 4 * 60 * 60 * 1000 // Include up to the limit, plus any updated in the last 4 hours const sessions = nonArchived.filter((s, i) => { if (i < limit) return true diff --git a/packages/app/src/context/platform.tsx b/packages/app/src/context/platform.tsx index b0822e707..6d2d3db06 100644 --- a/packages/app/src/context/platform.tsx +++ b/packages/app/src/context/platform.tsx @@ -5,6 +5,9 @@ export type Platform = { /** Platform discriminator */ platform: "web" | "desktop" + /** Desktop OS (Tauri only) */ + os?: "macos" | "windows" | "linux" + /** App version */ version?: string |
