diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000000..f300981288 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,66 @@ +name: CI + +on: + pull_request: + +permissions: + contents: read + +jobs: + test-suite: + name: Test suite + runs-on: macos-15 + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 2 + + - name: Set up Node.js + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: '20' + cache: npm + + - name: Enforce package quarantine + run: npm run check:package-quarantine + + - name: Install dependencies + run: | + for attempt in 1 2 3; do + npm ci && break + if [ "$attempt" -eq 3 ]; then + exit 1 + fi + done + + - name: Compile + run: npm run compile + + - name: Run hygiene checks + run: npm run hygiene + + - name: Run lint + run: npm run lint + + - name: Verify command registrations + run: npm run check:commands + + - name: Run test suite + run: npm run test + env: + TEST_JUNIT_XML_PATH: ${{ runner.temp }}/test-results.xml + + - name: Publish test summary + if: ${{ !cancelled() }} + uses: test-summary/action@37b508cfee6d4d080eedd00b5bb240a6a784a6a5 # v2 + with: + paths: ${{ runner.temp }}/*test-results.xml + + - name: Upload test results + if: ${{ !cancelled() }} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: mocha-test-results + path: ${{ runner.temp }}/*test-results.xml diff --git a/azure-pipeline.pr.yml b/azure-pipeline.pr.yml deleted file mode 100644 index 4eab95d713..0000000000 --- a/azure-pipeline.pr.yml +++ /dev/null @@ -1,51 +0,0 @@ -jobs: - - job: test_suite - displayName: Test suite - pool: - vmImage: 'macos-15' - steps: - - checkout: self - fetchDepth: 2 - - - template: scripts/ci/common-setup.yml - - - script: npm run compile - displayName: Compile - - - script: npm run hygiene - displayName: Run hygiene checks - - - script: npm run lint - displayName: Run lint - - - script: npm run check:commands - displayName: Verify command registrations - - - script: npm run test - displayName: Run test suite - env: - TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml - - # - script: npm run browsertest --browserType=chromium - # displayName: Run test suite (chromium) - # env: - # TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/browser-chromium-test-results.xml - - # - script: npm run browsertest --browserType=firefox - # displayName: Run test suite (firefox) - # env: - # TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/browser-firefox-test-results.xml - - # - script: npm run browsertest --browserType=webkit - # displayName: Run test suite (webkit) - # env: - # TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/browser-webkit-test-results.xml - - - task: PublishTestResults@2 - displayName: Publish test results - inputs: - testResultsFormat: JUnit - testResultsFiles: $(Agent.HomeDirectory)/*test-results.xml - testRunTitle: Mocha test suite - failTaskOnFailedTests: true - condition: succeededOrFailed() diff --git a/build/filters.js b/build/filters.js index 95672b1ff2..5d96404c5d 100644 --- a/build/filters.js +++ b/build/filters.js @@ -44,6 +44,7 @@ module.exports.indentationFilter = [ '!**/LICENSE.{txt,rtf}', '!**/LICENSE', '!**/*.yml', + '!.github/**/*.yml', '!resources/emojis.json', // except multiple specific files diff --git a/src/@types/vscode.proposed.authIssuers.d.ts b/src/@types/vscode.proposed.authIssuers.d.ts index c184e42e4d..577bf75858 100644 --- a/src/@types/vscode.proposed.authIssuers.d.ts +++ b/src/@types/vscode.proposed.authIssuers.d.ts @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ declare module 'vscode' { + + // https://github.com/microsoft/vscode/issues/248775 + export interface AuthenticationSession { /** * The authorization server that issued this session, when provided by the authentication provider. diff --git a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts index 46b9977968..3ec459e6ca 100644 --- a/src/@types/vscode.proposed.chatParticipantAdditions.d.ts +++ b/src/@types/vscode.proposed.chatParticipantAdditions.d.ts @@ -49,10 +49,15 @@ declare module 'vscode' { ranges: Range[]; } + /** The Auto routing tier a request was resolved with. */ + export type ChatAutoModeTier = 'efficiency' | 'balance' | 'intelligence' | 'fast'; + export class ChatResponseTextEditPart { uri: Uri; edits: TextEdit[]; isDone?: boolean; + /** The Auto routing tier that produced these edits, for edit attribution. */ + autoTier?: ChatAutoModeTier; constructor(uri: Uri, done: true); constructor(uri: Uri, edits: TextEdit | TextEdit[]); } @@ -61,6 +66,8 @@ declare module 'vscode' { uri: Uri; edits: NotebookEdit[]; isDone?: boolean; + /** The Auto routing tier that produced these edits, for edit attribution. */ + autoTier?: ChatAutoModeTier; constructor(uri: Uri, done: true); constructor(uri: Uri, edits: NotebookEdit | NotebookEdit[]); } diff --git a/src/@types/vscode.proposed.chatSessionsProvider.d.ts b/src/@types/vscode.proposed.chatSessionsProvider.d.ts index 844de8f23d..ed09833f59 100644 --- a/src/@types/vscode.proposed.chatSessionsProvider.d.ts +++ b/src/@types/vscode.proposed.chatSessionsProvider.d.ts @@ -722,6 +722,8 @@ declare module 'vscode' { }; readonly maxInputTokens?: number; readonly maxOutputTokens?: number; + /** The total context window, independent of the input and output token limits. */ + readonly maxContextWindowTokens?: number; readonly capabilities?: { readonly vision?: boolean; readonly toolCalling?: boolean;