Skip to content

Commit 23eabd6

Browse files
ysfscreamRed-Asuka
authored andcommitted
chore(desktop): fix: resolve Vue Devtools installation error
1 parent 8abf62c commit 23eabd6

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"babel-plugin-prismjs": "^2.1.0",
118118
"chai": "^4.1.2",
119119
"electron": "^22.0.0",
120-
"electron-devtools-installer": "^3.2.0",
120+
"electron-devtools-installer": "^3.1.1",
121121
"eslint": "6.5.1",
122122
"eslint-config-prettier": "^6.11.0",
123123
"eslint-plugin-prettier": "^3.1.4",

src/background.ts

+10-12
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import ORMConfig from './database/database.config'
2020
import version from '@/version'
2121
import { initialize } from '@electron/remote/main'
2222
import { initMCPHandlers, cleanupMCPConnections } from './main/ai/mcp/MCPManager'
23-
// import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
2423

2524
declare const __static: string
2625

@@ -255,17 +254,16 @@ async function createWindow() {
255254
// initialization and is ready to create browser windows.
256255
// Some APIs can only be used after this event occurs.
257256
app.on('ready', async () => {
258-
// if (isDevelopment && !process.env.IS_TEST) {
259-
// // Install Vue Devtools - modified to handle errors better
260-
// try {
261-
// await installExtension(VUEJS_DEVTOOLS, {
262-
// loadExtensionOptions: { allowFileAccess: true },
263-
// })
264-
// } catch (e) {
265-
// console.error('Vue Devtools failed to install:', e)
266-
// // Continue without Vue Devtools if installation fails
267-
// }
268-
// }
257+
// Install Vue Devtools on development mode
258+
if (isDevelopment && !process.env.IS_TEST) {
259+
try {
260+
const installExtension = require('electron-devtools-installer').default
261+
await installExtension('iaajmlceplecbljialhhkmedjlpdblhp')
262+
console.log('Vue Devtools installed successfully')
263+
} catch (e) {
264+
console.error('Vue Devtools failed to install:', e)
265+
}
266+
}
269267
createWindow()
270268
})
271269

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -5282,10 +5282,10 @@ [email protected], electron-builder@^22.2.0:
52825282
simple-update-notifier "^1.0.7"
52835283
yargs "^17.5.1"
52845284

5285-
electron-devtools-installer@^3.2.0:
5286-
version "3.2.0"
5287-
resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-3.2.0.tgz#acc48d24eb7033fe5af284a19667e73b78d406d0"
5288-
integrity sha512-t3UczsYugm4OAbqvdImMCImIMVdFzJAHgbwHpkl5jmfu1izVgUcP/mnrPqJIpEeCK1uZGpt+yHgWEN+9EwoYhQ==
5285+
electron-devtools-installer@^3.1.1:
5286+
version "3.2.1"
5287+
resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-3.2.1.tgz#338a0ada7b4232ee42cd88fe5cf305c6be95cfe9"
5288+
integrity sha512-FaCi+oDCOBTw0gJUsuw5dXW32b2Ekh5jO8lI1NRCQigo3azh2VogsIi0eelMVrP1+LkN/bewyH3Xoo1USjO0eQ==
52895289
dependencies:
52905290
rimraf "^3.0.2"
52915291
semver "^7.2.1"

0 commit comments

Comments
 (0)