Skip to content

Commit

Permalink
never minify agent
Browse files Browse the repository at this point in the history
  • Loading branch information
sqs committed Oct 3, 2024
1 parent c24f9b3 commit 49c61c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"build:for-tests": "pnpm run -s build:root && pnpm run -s build:agent",
"build:webviews": "pnpm -C ../vscode run -s _build:webviews --mode production --outDir ../../agent/dist/webviews",
"build": "pnpm run -s build:root && pnpm run -s build:webviews && pnpm run -s build:agent",
"build-minify": "pnpm run build --minify",
"agent": "pnpm run build:for-tests && node --enable-source-maps dist/index.js",
"agent:skip-root-build": "pnpm run build:agent && node --enable-source-maps dist/index.js",
"agent:debug": "pnpm run build && CODY_AGENT_TRACE_PATH=/tmp/agent.json CODY_AGENT_DEBUG_REMOTE=true node --enable-source-maps ./dist/index.js api jsonrpc-stdio",
Expand Down
8 changes: 2 additions & 6 deletions agent/src/esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ main().catch(err => {

async function main() {
await verifyShim()

const minify = process.argv.includes('--minify')
await buildAgent(minify)
await buildAgent()
}

async function verifyShim() {
Expand Down Expand Up @@ -44,10 +42,9 @@ async function verifyShim() {

/**
* Builds the Cody agent using esbuild.
* @param {boolean} minify - Whether to minify the output or not.
* @returns {Promise<void>} - A promise that resolves when the build process is complete.
*/
async function buildAgent(minify) {
async function buildAgent() {
/** @type {import('esbuild').BuildOptions} */
const esbuildOptions = {
entryPoints: ['./src/index.ts'],
Expand All @@ -57,7 +54,6 @@ async function buildAgent(minify) {
sourcemap: true,
logLevel: 'error',
external: ['typescript'],
minify: minify,

alias: {
vscode: path.resolve(process.cwd(), 'src', 'vscode-shim.ts'),
Expand Down

0 comments on commit 49c61c0

Please sign in to comment.