diff options
Diffstat (limited to 'packages/desktop')
| -rw-r--r-- | packages/desktop/package.json | 2 | ||||
| -rw-r--r-- | packages/desktop/src/env.d.ts | 9 | ||||
| -rw-r--r-- | packages/desktop/src/index.tsx | 1 | ||||
| -rw-r--r-- | packages/desktop/vite.config.ts | 6 |
4 files changed, 15 insertions, 3 deletions
diff --git a/packages/desktop/package.json b/packages/desktop/package.json index ff81acaaf..61ef5d05c 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -15,6 +15,7 @@ "dependencies": { "@opencode-ai/app": "workspace:*", "@opencode-ai/ui": "workspace:*", + "@sentry/solid": "catalog:", "@solid-primitives/i18n": "2.2.1", "@solid-primitives/storage": "catalog:", "@tauri-apps/api": "^2", @@ -35,6 +36,7 @@ }, "devDependencies": { "@actions/artifact": "4.0.0", + "@sentry/vite-plugin": "catalog:", "@tauri-apps/cli": "^2", "@types/bun": "catalog:", "@typescript/native-preview": "catalog:", diff --git a/packages/desktop/src/env.d.ts b/packages/desktop/src/env.d.ts new file mode 100644 index 000000000..aff016842 --- /dev/null +++ b/packages/desktop/src/env.d.ts @@ -0,0 +1,9 @@ +interface ImportMetaEnv { + readonly VITE_SENTRY_DSN?: string + readonly VITE_SENTRY_ENVIRONMENT?: string + readonly VITE_SENTRY_RELEASE?: string +} + +interface ImportMeta { + readonly env: ImportMetaEnv +} diff --git a/packages/desktop/src/index.tsx b/packages/desktop/src/index.tsx index a760cb409..1a0da014d 100644 --- a/packages/desktop/src/index.tsx +++ b/packages/desktop/src/index.tsx @@ -14,6 +14,7 @@ import { ServerConnection, useCommand, } from "@opencode-ai/app" +import * as Sentry from "@sentry/solid" import type { AsyncStorage } from "@solid-primitives/storage" import { getCurrentWindow } from "@tauri-apps/api/window" import { readImage } from "@tauri-apps/plugin-clipboard-manager" diff --git a/packages/desktop/vite.config.ts b/packages/desktop/vite.config.ts index 62c3a099a..e8f8f8465 100644 --- a/packages/desktop/vite.config.ts +++ b/packages/desktop/vite.config.ts @@ -15,9 +15,9 @@ export default defineConfig({ // Improves production stack traces keepNames: true, }, - // build: { - // sourcemap: true, - // }, + build: { + sourcemap: true, + }, // 2. tauri expects a fixed port, fail if that port is not available server: { port: 1420, |
