
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@vscode/copilot-api
Advanced tools
A module used for interacting with the GitHub Copilot API.
With npm:
npm install @vscode/copilot-api
With yarn:
yarn add @vscode/copilot-api
import { CAPIClient, RequestType } from '@vscode/copilot-api';
// Create a new client instance
const client = new CAPIClient(editorDetails, license, optionalFetcherService);
// Update domains (if needed)
const domainChanges = client.updateDomains(copilotToken, enterpriseUrlConfig);
// Make requests
const response = await client.makeRequest(fetchOptions, RequestType.ChatCompletions);
RequestType.CopilotToken
- Get Copilot tokenRequestType.ChatCompletions
- Chat completionsRequestType.RemoteAgent
- Remote agent requestsRequestType.Embeddings
- EmbeddingsRequestType.Models
- Available modelsRequestType.Chunks
- Code chunksRequestType.EmbeddingsCodeSearch
- Embeddings code searchRequestType.ListSkills
- List available skillsRequestType.SearchSkill
- Search skillsRequestType.ContentExclusion
- Content exclusionRequestType.Telemetry
- TelemetryRequestType.CopilotUserInfo
- User infoRequestType.OriginTracker
- Origin trackingThe package is built using esbuild to create a single platform-neutral ESM module that works in both Node.js and web environments:
# Build for production (minified)
npm run build
# Build for development (unminified)
npm run build:dev
# Clean build artifacts
npm run clean
dist/index.js
- Platform-neutral ESM builddist/index.d.ts
- TypeScript declarationsThe package is configured with a simplified ESM export structure:
{
"exports": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
This project uses Vitest for testing. Run tests with:
# Run tests once
npm test
# Run tests in watch mode
npm run test:watch
FAQs
A module used for interacting with the GitHub Copilot API.
The npm package @vscode/copilot-api receives a total of 96,468 weekly downloads. As such, @vscode/copilot-api popularity was classified as popular.
We found that @vscode/copilot-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.