mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
ba3e341666
This commit properly configures Monaco Editor to work reliably in the Electron/Vite environment by using direct module imports instead of relying on problematic plugin configurations. Changes: - Add monaco-editor as direct dependency (v0.52.2) - Configure @monaco-editor/react loader to use bundled Monaco instance - Update vite.renderer.config.mts with proper worker and bundling config - Replace lazy loading with direct import in RichChatInput - Add Monaco-specific CSS for consistent theming - Improve loading state UI with better feedback Technical approach: Instead of using vite-plugin-monaco-editor (which has ESM compatibility issues), we import monaco-editor directly and configure the loader to use that instance. Vite handles worker bundling via the 'worker.format' config, and we manually chunk Monaco for optimal loading. This ensures Monaco loads instantly and reliably when entering code mode (e.g., typing #python in the chat input), with full IDE features like syntax highlighting, autocomplete, and error detection. Fixes: Monaco Editor infinite spinner and loading failures Related: PR #5502
165 lines
6.4 KiB
JSON
165 lines
6.4 KiB
JSON
{
|
|
"name": "goose-app",
|
|
"productName": "Goose",
|
|
"version": "1.11.0",
|
|
"description": "Goose App",
|
|
"engines": {
|
|
"node": "^22.17.1"
|
|
},
|
|
"main": ".vite/build/main.js",
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"generate-api": "openapi-ts",
|
|
"start-gui": "npm run generate-api && electron-forge start",
|
|
"start-gui-debug": "npm run generate-api && electron-forge start -- --inspect=9229",
|
|
"start": "cd ../.. && just run-ui",
|
|
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
|
|
"package": "electron-forge package",
|
|
"make": "electron-forge make",
|
|
"bundle:default": "node scripts/prepare-platform-binaries.js && npm run make && (cd out/Goose-darwin-arm64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose.zip) || echo 'out/Goose-darwin-arm64 not found; either the binary is not built or you are not on macOS'",
|
|
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true npm run make && (cd out/Goose-darwin-arm64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose_alpha.zip) || echo 'out/Goose-darwin-arm64 not found; either the binary is not built or you are not on macOS'",
|
|
"bundle:windows": "node scripts/build-main.js && ELECTRON_PLATFORM=win32 node scripts/prepare-platform-binaries.js && npm run make -- --platform=win32 --arch=x64",
|
|
"bundle:intel": "node scripts/prepare-platform-binaries.js && npm run make -- --arch=x64 && cd out/Goose-darwin-x64 && ditto -c -k --sequesterRsrc --keepParent Goose.app Goose_intel_mac.zip",
|
|
"debug": "echo 'run --remote-debugging-port=8315' && lldb out/Goose-darwin-arm64/Goose.app",
|
|
"test-e2e": "npm run generate-api && playwright test",
|
|
"test-e2e:dev": "npm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1",
|
|
"test-e2e:ui": "npm run generate-api && playwright test --ui",
|
|
"test-e2e:debug": "npm run generate-api && playwright test --debug",
|
|
"test-e2e:report": "playwright show-report",
|
|
"test-e2e:single": "npm run generate-api && playwright test -g",
|
|
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix --no-warn-ignored",
|
|
"lint:check": "npm run typecheck && eslint \"src/**/*.{ts,tsx}\" --max-warnings 0 --no-warn-ignored",
|
|
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
|
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
|
|
"test": "vitest",
|
|
"test:run": "vitest run",
|
|
"test:ui": "vitest --ui",
|
|
"test:coverage": "vitest run --coverage",
|
|
"prepare": "cd ../.. && husky install",
|
|
"start-alpha-gui": "ALPHA=true npm run start-gui"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/openai": "^2.0.52",
|
|
"@ai-sdk/ui-utils": "^1.2.11",
|
|
"@mcp-ui/client": "^5.13.0",
|
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
"@radix-ui/react-icons": "^1.3.2",
|
|
"@radix-ui/react-popover": "^1.1.15",
|
|
"@radix-ui/react-radio-group": "^1.3.8",
|
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-slot": "^1.2.3",
|
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
"@radix-ui/themes": "^3.2.1",
|
|
"@tanstack/react-form": "^1.23.7",
|
|
"@types/react-router-dom": "^5.3.3",
|
|
"ai": "^5.0.76",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"compare-versions": "^6.1.1",
|
|
"cors": "^2.8.5",
|
|
"cronstrue": "^3.3.0",
|
|
"date-fns": "^4.1.0",
|
|
"dotenv": "^17.2.3",
|
|
"electron-log": "^5.4.3",
|
|
"electron-squirrel-startup": "^1.0.1",
|
|
"electron-updater": "^6.6.2",
|
|
"electron-window-state": "^5.0.3",
|
|
"express": "^5.1.0",
|
|
"lodash": "^4.17.21",
|
|
"lucide-react": "^0.546.0",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"react-icons": "^5.5.0",
|
|
"react-markdown": "^10.1.0",
|
|
"react-router-dom": "^7.9.4",
|
|
"react-select": "^5.10.2",
|
|
"react-syntax-highlighter": "^15.6.6",
|
|
"react-toastify": "^11.0.5",
|
|
"@monaco-editor/react": "^4.6.0",
|
|
"monaco-editor": "^0.52.2",
|
|
"remark-breaks": "^4.0.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"split-type": "^0.3.4",
|
|
"swr": "^2.3.6",
|
|
"tailwind-merge": "^3.3.1",
|
|
"tailwindcss-animate": "^1.0.7",
|
|
"tw-animate-css": "^1.4.0",
|
|
"typo-js": "^1.3.1",
|
|
"unist-util-visit": "^5.0.0",
|
|
"uuid": "^13.0.0",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@electron-forge/cli": "^7.10.2",
|
|
"@electron-forge/maker-deb": "^7.10.2",
|
|
"@electron-forge/maker-rpm": "^7.10.2",
|
|
"@electron-forge/maker-squirrel": "^7.10.2",
|
|
"@electron-forge/maker-zip": "^7.10.2",
|
|
"@electron-forge/plugin-auto-unpack-natives": "^7.10.2",
|
|
"@electron-forge/plugin-fuses": "^7.10.2",
|
|
"@electron-forge/plugin-vite": "^7.10.2",
|
|
"@electron/fuses": "^1.8.0",
|
|
"@electron/remote": "^2.1.3",
|
|
"@eslint/js": "^9.33.0",
|
|
"@hey-api/openapi-ts": "^0.85.2",
|
|
"@modelcontextprotocol/sdk": "^1.20.1",
|
|
"@playwright/test": "^1.56.1",
|
|
"@tailwindcss/line-clamp": "^0.4.4",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"@tailwindcss/vite": "^4.1.14",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.0",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@types/cors": "^2.8.19",
|
|
"@types/electron-squirrel-startup": "^1.0.2",
|
|
"@types/express": "^5.0.3",
|
|
"@types/lodash": "^4.17.20",
|
|
"@types/react": "^19.2.2",
|
|
"@types/react-dom": "^19.2.2",
|
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
"@types/typo-js": "^1.2.2",
|
|
"@types/yauzl": "^2.10.3",
|
|
"@typescript-eslint/eslint-plugin": "^8.39.1",
|
|
"@typescript-eslint/parser": "^8.39.1",
|
|
"@vitejs/plugin-react": "^5.0.4",
|
|
"@vitest/coverage-v8": "^3.2.4",
|
|
"@vitest/ui": "^3.2.4",
|
|
"autoprefixer": "^10.4.21",
|
|
"electron": "^38.3.0",
|
|
"electron-devtools-installer": "^4.0.0",
|
|
"eslint": "^9.33.0",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^27.0.0",
|
|
"knip": "^5.66.0",
|
|
"lint-staged": "^16.2.4",
|
|
"postcss": "^8.5.6",
|
|
"prettier": "^3.6.2",
|
|
"tailwindcss": "^4.1.14",
|
|
"typescript": "~5.9.3",
|
|
"vite": "^7.1.10",
|
|
"vite-plugin-monaco-editor": "^1.1.0",
|
|
"vitest": "^3.2.4"
|
|
},
|
|
"keywords": [],
|
|
"license": "Apache-2.0",
|
|
"overrides": {
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0"
|
|
},
|
|
"lint-staged": {
|
|
"src/**/*.{ts,tsx}": [
|
|
"bash -c 'npm run typecheck'",
|
|
"eslint --fix --max-warnings 0 --no-warn-ignored",
|
|
"prettier --write"
|
|
],
|
|
"src/**/*.{css,json}": [
|
|
"prettier --write"
|
|
]
|
|
}
|
|
}
|