Some checks failed
CI — Test & Build / Test & Build (push) Has been cancelled
- Implemented a status bar item for LexAI with dynamic status updates (ready, processing, notReady). - Created a suggestion panel for displaying and interacting with AI-generated suggestions. - Added functionality for accepting, regenerating, and discarding suggestions within the suggestion zone. - Introduced configuration options for writing style, prompt patterns, personas, and formats. - Integrated progress indicators for long-running tasks and improved user feedback. - Established TypeScript configuration for the vscode package.
35 lines
962 B
JavaScript
35 lines
962 B
JavaScript
import * as esbuild from 'esbuild';
|
|
import { resolve, dirname } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const watch = process.argv.includes('--watch');
|
|
const libRoot = resolve(__dirname, '../../src/lib');
|
|
|
|
/** @type {import('esbuild').BuildOptions} */
|
|
const options = {
|
|
entryPoints: [resolve(__dirname, 'src/extension.ts')],
|
|
bundle: true,
|
|
outfile: resolve(__dirname, 'out/extension.js'),
|
|
external: ['vscode'],
|
|
format: 'cjs',
|
|
platform: 'node',
|
|
target: 'node22',
|
|
sourcemap: true,
|
|
sourcesContent: false,
|
|
logLevel: 'info',
|
|
// Share the Chrome extension's portable core without relocating it.
|
|
alias: {
|
|
'@lib': libRoot,
|
|
},
|
|
};
|
|
|
|
if (watch) {
|
|
const ctx = await esbuild.context(options);
|
|
await ctx.watch();
|
|
console.log('[lexai-vscode] watching…');
|
|
} else {
|
|
await esbuild.build(options);
|
|
console.log('[lexai-vscode] compiled → out/extension.js');
|
|
}
|