diff --git a/.gitignore b/.gitignore index 60fa6678..700c6ccc 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ release data binaries .env + +# Sentry Config File +.env.sentry-build-plugin diff --git a/electron/main/llm/ipcHandlers.ts b/electron/main/llm/ipcHandlers.ts index 17c8f342..f44d2844 100644 --- a/electron/main/llm/ipcHandlers.ts +++ b/electron/main/llm/ipcHandlers.ts @@ -12,6 +12,7 @@ export const ollamaService = new OllamaService() export const registerLLMSessionHandlers = (store: Store) => { ipcMain.handle('set-default-llm', (event, modelName: string) => { store.set(StoreKeys.DefaultLLM, modelName) + event.sender.send('llm-configs-changed') }) ipcMain.handle('get-default-llm-name', () => store.get(StoreKeys.DefaultLLM)) @@ -22,14 +23,17 @@ export const registerLLMSessionHandlers = (store: Store) => { ipcMain.handle('add-or-update-llm-config', async (event, llmConfig: LLMConfig) => { await addOrUpdateLLMInStore(store, llmConfig) + event.sender.send('llm-configs-changed') }) ipcMain.handle('add-or-update-llm-api-config', async (event, llmAPIConfig: LLMAPIConfig) => { await addOrUpdateLLMAPIInStore(store, llmAPIConfig) + event.sender.send('llm-configs-changed') }) ipcMain.handle('remove-llm', async (event, modelNameToDelete: string) => { await removeLLM(store, ollamaService, modelNameToDelete) + event.sender.send('llm-configs-changed') }) ipcMain.handle('pull-ollama-model', async (event, modelName: string) => { @@ -37,9 +41,11 @@ export const registerLLMSessionHandlers = (store: Store) => { event.sender.send('ollamaDownloadProgress', modelName, progress) } await ollamaService.pullModel(modelName, handleProgress) + event.sender.send('llm-configs-changed') }) ipcMain.handle('delete-llm', async (event, modelName: string) => { await ollamaService.deleteModel(modelName) + event.sender.send('llm-configs-changed') }) } diff --git a/package-lock.json b/package-lock.json index ab0b27b3..c59185c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,7 @@ "@radix-ui/react-tabs": "^1.1.1", "@radix-ui/react-tooltip": "^1.1.3", "@sentry/electron": "^5.3.0", + "@sentry/vite-plugin": "^2.22.6", "@tailwindcss/typography": "^0.5.10", "@tiptap/core": "^2.5.0", "@tiptap/extension-bubble-menu": "^2.4.0", @@ -397,7 +398,6 @@ }, "node_modules/@ampproject/remapping": { "version": "2.2.1", - "dev": true, "license": "Apache-2.0", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", @@ -457,7 +457,6 @@ }, "node_modules/@babel/compat-data": { "version": "7.23.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -465,7 +464,6 @@ }, "node_modules/@babel/core": { "version": "7.23.9", - "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -494,12 +492,10 @@ }, "node_modules/@babel/core/node_modules/convert-source-map": { "version": "2.0.0", - "dev": true, "license": "MIT" }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -507,7 +503,6 @@ }, "node_modules/@babel/generator": { "version": "7.23.6", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.23.6", @@ -521,7 +516,6 @@ }, "node_modules/@babel/helper-compilation-targets": { "version": "7.23.6", - "dev": true, "license": "MIT", "dependencies": { "@babel/compat-data": "^7.23.5", @@ -536,7 +530,6 @@ }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { "version": "6.3.1", - "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -544,7 +537,6 @@ }, "node_modules/@babel/helper-environment-visitor": { "version": "7.22.20", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -552,7 +544,6 @@ }, "node_modules/@babel/helper-function-name": { "version": "7.23.0", - "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.22.15", @@ -564,7 +555,6 @@ }, "node_modules/@babel/helper-hoist-variables": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" @@ -585,7 +575,6 @@ }, "node_modules/@babel/helper-module-transforms": { "version": "7.23.3", - "dev": true, "license": "MIT", "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -611,7 +600,6 @@ }, "node_modules/@babel/helper-simple-access": { "version": "7.22.5", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" @@ -622,7 +610,6 @@ }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.22.6", - "dev": true, "license": "MIT", "dependencies": { "@babel/types": "^7.22.5" @@ -648,7 +635,6 @@ }, "node_modules/@babel/helper-validator-option": { "version": "7.23.5", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -656,7 +642,6 @@ }, "node_modules/@babel/helpers": { "version": "7.23.9", - "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.23.9", @@ -681,7 +666,6 @@ }, "node_modules/@babel/parser": { "version": "7.23.9", - "dev": true, "license": "MIT", "bin": { "parser": "bin/babel-parser.js" @@ -893,7 +877,6 @@ }, "node_modules/@babel/template": { "version": "7.23.9", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.23.5", @@ -906,7 +889,6 @@ }, "node_modules/@babel/traverse": { "version": "7.23.9", - "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.23.5", @@ -2350,7 +2332,6 @@ }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/set-array": "^1.0.1", @@ -2363,7 +2344,6 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2371,7 +2351,6 @@ }, "node_modules/@jridgewell/set-array": { "version": "1.1.2", - "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2379,12 +2358,10 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", - "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.22", - "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -5269,6 +5246,14 @@ "node": ">=14.18" } }, + "node_modules/@sentry/babel-plugin-component-annotate": { + "version": "2.22.6", + "resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.6.tgz", + "integrity": "sha512-V2g1Y1I5eSe7dtUVMBvAJr8BaLRr4CLrgNgtPaZyMT4Rnps82SrZ5zqmEkLXPumlXhLUWR6qzoMNN2u+RXVXfQ==", + "engines": { + "node": ">= 14" + } + }, "node_modules/@sentry/browser": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.20.0.tgz", @@ -5286,6 +5271,199 @@ "node": ">=14.18" } }, + "node_modules/@sentry/bundler-plugin-core": { + "version": "2.22.6", + "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.6.tgz", + "integrity": "sha512-1esQdgSUCww9XAntO4pr7uAM5cfGhLsgTK9MEwAKNfvpMYJi9NUTYa3A7AZmdA8V6107Lo4OD7peIPrDRbaDCg==", + "dependencies": { + "@babel/core": "^7.18.5", + "@sentry/babel-plugin-component-annotate": "2.22.6", + "@sentry/cli": "^2.36.1", + "dotenv": "^16.3.1", + "find-up": "^5.0.0", + "glob": "^9.3.2", + "magic-string": "0.30.8", + "unplugin": "1.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@sentry/bundler-plugin-core/node_modules/glob": { + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@sentry/bundler-plugin-core/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@sentry/bundler-plugin-core/node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/cli": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.38.1.tgz", + "integrity": "sha512-XFO04nP7cn0tboMQ4ALR81QRF/6xoWAFzNld7Io6jHbaFzihqewjxAqy7pSvVPaieepUjqe7m/Ippt00kKOACg==", + "hasInstallScript": true, + "dependencies": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.7", + "progress": "^2.0.3", + "proxy-from-env": "^1.1.0", + "which": "^2.0.2" + }, + "bin": { + "sentry-cli": "bin/sentry-cli" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@sentry/cli-darwin": "2.38.1", + "@sentry/cli-linux-arm": "2.38.1", + "@sentry/cli-linux-arm64": "2.38.1", + "@sentry/cli-linux-i686": "2.38.1", + "@sentry/cli-linux-x64": "2.38.1", + "@sentry/cli-win32-i686": "2.38.1", + "@sentry/cli-win32-x64": "2.38.1" + } + }, + "node_modules/@sentry/cli-darwin": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.38.1.tgz", + "integrity": "sha512-IHuxm072aSTAvwuHtLg065cF00Pxm2wprnrRr2lkyWp8nLOoO7DmumWZ4pjHvhB8yZXsAbM/PSxLRBoDIRDPzQ==", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@sentry/cli-linux-arm": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.38.1.tgz", + "integrity": "sha512-xyf4f56O4/eeirol8t1tTQw0cwF34b3v69zn6wHtKfx2lW5IEBGO+agVNdOdosnCx6j3UadgdRXUJlSyM9kx/w==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@sentry/cli-linux-arm64": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.38.1.tgz", + "integrity": "sha512-3bj5DS4wDusL0YHwG5qeI+O19kz4N4KDDmnWqIew56MmSSAEM5B0qKk5Hivu1vRU5vPKFwVn8BVjLnKXu9idjg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@sentry/cli-linux-i686": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.38.1.tgz", + "integrity": "sha512-VygJO2oTc6GfiqqmPYNpO2bW1hzszuNyn37SSmeRuuhq1/kRwD+ZQj4OmXYEASjSLg+8mDPoWOurPjHEPKNtNw==", + "cpu": [ + "x86", + "ia32" + ], + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@sentry/cli-linux-x64": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.38.1.tgz", + "integrity": "sha512-9SaPJK5yAGR7qGsDubTT9O7VpNQG9KIolCOov4xJU7scbmjGaFyYBm9c7ZIqbq6B+56YchPbtD0RewZC6CiF2w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux", + "freebsd" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@sentry/cli-win32-i686": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.38.1.tgz", + "integrity": "sha512-BVUM5y+ZDBK/LqyVvt0C7oolmg8aq7PI/u04/Pp6FLRExySqwyQim0vNyL2FRjIeX1yhbk7x4Z79UjEKqJBltA==", + "cpu": [ + "x86", + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@sentry/cli-win32-x64": { + "version": "2.38.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.38.1.tgz", + "integrity": "sha512-+HgsdM3LFSzUNlDpicPRdTKfr5u+nJ2C5p4aDYPb2G+qoYW+66FI4NxgWSyzJsj3nVQ8lW5/6AoMP6U5z/e/0A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, "node_modules/@sentry/core": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.20.0.tgz", @@ -5399,6 +5577,18 @@ "node": ">=14.18" } }, + "node_modules/@sentry/vite-plugin": { + "version": "2.22.6", + "resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-2.22.6.tgz", + "integrity": "sha512-zIieP1VLWQb3wUjFJlwOAoaaJygJhXeUoGd0e/Ha2RLb2eW2S+4gjf6y6NqyY71tZ74LYVZKg/4prB6FAZSMXQ==", + "dependencies": { + "@sentry/bundler-plugin-core": "2.22.6", + "unplugin": "1.0.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "dev": true, @@ -6604,7 +6794,6 @@ }, "node_modules/agent-base": { "version": "6.0.2", - "dev": true, "license": "MIT", "dependencies": { "debug": "4" @@ -7514,7 +7703,6 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, "license": "MIT" }, "node_modules/bare-events": { @@ -7599,7 +7787,6 @@ }, "node_modules/brace-expansion": { "version": "2.0.1", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -7617,7 +7804,6 @@ }, "node_modules/browserslist": { "version": "4.23.0", - "dev": true, "funding": [ { "type": "opencollective", @@ -7900,7 +8086,6 @@ "version": "1.0.30001651", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", - "dev": true, "funding": [ { "type": "opencollective", @@ -9742,7 +9927,6 @@ }, "node_modules/electron-to-chromium": { "version": "1.4.673", - "dev": true, "license": "ISC" }, "node_modules/electron-updater": { @@ -10074,7 +10258,6 @@ }, "node_modules/escalade": { "version": "3.1.2", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -11505,7 +11688,6 @@ }, "node_modules/find-up": { "version": "5.0.0", - "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", @@ -11730,7 +11912,6 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -11777,7 +11958,6 @@ }, "node_modules/gensync": { "version": "1.0.0-beta.2", - "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" @@ -11947,7 +12127,6 @@ }, "node_modules/globals": { "version": "11.12.0", - "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -12333,7 +12512,6 @@ }, "node_modules/https-proxy-agent": { "version": "5.0.1", - "dev": true, "license": "MIT", "dependencies": { "agent-base": "6", @@ -13020,7 +13198,6 @@ }, "node_modules/isexe": { "version": "2.0.0", - "dev": true, "license": "ISC" }, "node_modules/istanbul-lib-coverage": { @@ -14721,7 +14898,6 @@ }, "node_modules/jsesc": { "version": "2.5.2", - "dev": true, "license": "MIT", "bin": { "jsesc": "bin/jsesc" @@ -14772,7 +14948,6 @@ }, "node_modules/json5": { "version": "2.2.3", - "dev": true, "license": "MIT", "bin": { "json5": "lib/cli.js" @@ -15284,7 +15459,6 @@ }, "node_modules/locate-path": { "version": "6.0.0", - "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" @@ -15370,7 +15544,6 @@ }, "node_modules/lru-cache": { "version": "5.1.1", - "dev": true, "license": "ISC", "dependencies": { "yallist": "^3.0.2" @@ -15384,6 +15557,17 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc" } }, + "node_modules/magic-string": { + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "4.0.0", "dev": true, @@ -16124,7 +16308,6 @@ }, "node_modules/minipass": { "version": "5.0.0", - "dev": true, "license": "ISC", "engines": { "node": ">=8" @@ -16316,7 +16499,6 @@ }, "node_modules/node-releases": { "version": "2.0.14", - "dev": true, "license": "MIT" }, "node_modules/normalize-package-data": { @@ -19291,7 +19473,6 @@ }, "node_modules/p-limit": { "version": "3.1.0", - "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" @@ -19305,7 +19486,6 @@ }, "node_modules/p-locate": { "version": "5.0.0", - "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" @@ -19434,7 +19614,6 @@ }, "node_modules/path-exists": { "version": "4.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -19462,7 +19641,6 @@ }, "node_modules/path-scurry": { "version": "1.10.1", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^9.1.1 || ^10.0.0", @@ -19477,7 +19655,6 @@ }, "node_modules/path-scurry/node_modules/lru-cache": { "version": "10.2.0", - "dev": true, "license": "ISC", "engines": { "node": "14 || >=16.14" @@ -19525,7 +19702,6 @@ }, "node_modules/picocolors": { "version": "1.0.0", - "dev": true, "license": "ISC" }, "node_modules/picomatch": { @@ -20135,7 +20311,6 @@ }, "node_modules/progress": { "version": "2.0.3", - "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -22900,9 +23075,19 @@ "node": ">= 4.0.0" } }, + "node_modules/unplugin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", + "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", + "dependencies": { + "acorn": "^8.8.1", + "chokidar": "^3.5.3", + "webpack-sources": "^3.2.3", + "webpack-virtual-modules": "^0.5.0" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.13", - "dev": true, "funding": [ { "type": "opencollective", @@ -23286,6 +23471,19 @@ "version": "3.0.1", "license": "BSD-2-Clause" }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-virtual-modules": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", + "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==" + }, "node_modules/whatwg-fetch": { "version": "3.6.20", "license": "MIT" @@ -23300,7 +23498,6 @@ }, "node_modules/which": { "version": "2.0.2", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -23531,7 +23728,6 @@ }, "node_modules/yallist": { "version": "3.1.1", - "dev": true, "license": "ISC" }, "node_modules/yaml": { @@ -23577,7 +23773,6 @@ }, "node_modules/yocto-queue": { "version": "0.1.0", - "dev": true, "license": "MIT", "engines": { "node": ">=10" diff --git a/package.json b/package.json index 39dadda2..d419b02a 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@radix-ui/react-tabs": "^1.1.1", "@radix-ui/react-tooltip": "^1.1.3", "@sentry/electron": "^5.3.0", + "@sentry/vite-plugin": "^2.22.6", "@tailwindcss/typography": "^0.5.10", "@tiptap/core": "^2.5.0", "@tiptap/extension-bubble-menu": "^2.4.0", diff --git a/src/App.tsx b/src/App.tsx index d258eacc..0cdb007a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -79,7 +79,15 @@ const App: React.FC = () => { return (
- + {' '} {!userHasConfiguredSettingsForIndexing && ( diff --git a/src/components/Chat/ChatConfigComponents/exampleAgents.ts b/src/components/Chat/ChatConfigComponents/exampleAgents.ts index 22fe3759..6b29235a 100644 --- a/src/components/Chat/ChatConfigComponents/exampleAgents.ts +++ b/src/components/Chat/ChatConfigComponents/exampleAgents.ts @@ -14,7 +14,7 @@ Here are some guidelines you must follow: }, { role: 'user', - content: `{QUERY}`, + content: `The user's query is: {QUERY}`, }, ] @@ -65,7 +65,7 @@ const exampleAgents: AgentConfig[] = [ files: [], name: 'Default', dbSearchFilters: { - limit: 30, + limit: 20, minDate: undefined, maxDate: undefined, passFullNoteIntoContext: true, diff --git a/src/components/Chat/ChatInput.tsx b/src/components/Chat/ChatInput.tsx index 22aabb44..00808157 100644 --- a/src/components/Chat/ChatInput.tsx +++ b/src/components/Chat/ChatInput.tsx @@ -1,13 +1,21 @@ import React from 'react' import { PiPaperPlaneRight } from 'react-icons/pi' -import { LoadingState } from '../../lib/llm/types' +import { AgentConfig, LoadingState } from '../../lib/llm/types' +import { Button } from '../ui/button' +import LLMSelectOrButton from '../Settings/LLMSettings/LLMSelectOrButton' +import { Switch } from '@/components/ui/switch' +import { Label } from '@/components/ui/label' interface ChatInputProps { userTextFieldInput: string setUserTextFieldInput: (value: string) => void handleSubmitNewMessage: () => void loadingState: LoadingState + selectedLLM: string | undefined + setSelectedLLM: (value: string | undefined) => void + agentConfig: AgentConfig | undefined + setAgentConfig: React.Dispatch> } const ChatInput: React.FC = ({ @@ -15,48 +23,95 @@ const ChatInput: React.FC = ({ setUserTextFieldInput, handleSubmitNewMessage, loadingState, -}) => ( -
-
-
-
-