* feat: add initial VS Code extension plan and implementation tasks * feat(vscode): added initial version of an Openchamber VSCode extension * feat(vscode): enhance VS Code extension with theme integration and session management * feat(vscode): implement connection status handling and overlay in VSCode layout * feat: move extension to secondary sidebar * chore: upgrade @opencode-ai/sdk to 1.0.150 * vscode: editor bridge, file picker, click-to-open in tool parts * vscode: layout session lifecycle, theme sync, typography overrides * ui: compact mode for vscode, model search, autocomplete width fixes * perf: scroll force flag, raf placeholder, git polling backoff * ui: tool output styling, markdown code block fix, gitignore * refactor: update typography handling for VSCode runtime, remove unused styles * docs: update README with VS Code extension details and add extension image * docs: update changelog with new features and performance improvements
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
root: path.resolve(__dirname, 'webview'),
|
|
base: './', // Use relative paths for VS Code webview
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, '../ui/src'),
|
|
'@vscode': path.resolve(__dirname, './webview'),
|
|
'@openchamber/ui': path.resolve(__dirname, '../ui/src'),
|
|
'@opencode-ai/sdk': path.resolve(__dirname, '../../node_modules/@opencode-ai/sdk/dist/client.js'),
|
|
},
|
|
},
|
|
define: {
|
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
'global': 'globalThis',
|
|
},
|
|
envPrefix: ['VITE_'],
|
|
optimizeDeps: {
|
|
include: ['@opencode-ai/sdk'],
|
|
},
|
|
build: {
|
|
outDir: path.resolve(__dirname, 'dist/webview'),
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
input: path.resolve(__dirname, 'webview/index.html'),
|
|
external: ['node:child_process', 'node:fs', 'node:path', 'node:url'],
|
|
output: {
|
|
entryFileNames: 'assets/[name].js',
|
|
chunkFileNames: 'assets/[name].js',
|
|
assetFileNames: 'assets/[name].[ext]',
|
|
},
|
|
},
|
|
},
|
|
});
|