Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions extensions/copilot/script/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ const treeSitterGrammars: ITreeSitterGrammar[] = [

const REPO_ROOT = path.join(__dirname, '..');

async function removeCopilotCLIShim() {
const shimsPath = path.join(REPO_ROOT, 'node_modules', '@github', 'copilot', 'shims.txt');
await fs.promises.rm(shimsPath, { force: true }).catch(() => { /* ignore */ });
}

/**
* @github/copilot/sdk/index.js depends on @github/copilot/worker/*.js files.
* We need to copy these files into the sdk directory to ensure they are available at runtime.
Expand Down Expand Up @@ -173,6 +178,7 @@ async function main() {
'node_modules/@github/blackbird-external-ingest-utils/pkg/nodejs/external_ingest_utils_bg.wasm',
], 'dist');

await removeCopilotCLIShim();
await copyCopilotCliWorkerFiles();
await copyCopilotCliSharpFiles();
await copyCopilotCliDefinitionFiles();
Expand Down
Loading