Files
vscode/extensions/copilot/test/simulation/slash-test/testGen.cpp.stest.ts
Johannes Rieken fcbff5831a InlineChatIntent (#1549)
* remove references to old setting `github.copilot.chat.advanced.inlineChat2`

* play with `InlineChatIntent`

* wip

* move things, better/simpler prompt

* cleanup, renames, stuff

* more wip

* done after tool call

* edit and generate stest for new InlineChatIntent

* use codebook for diagnostics

* inline chat fixing stests

* stest run

* remove old Inline2 tests

* remove slash commands for v2, remove the editCodeIntent path for v2

* 💄

* 💄

* Don't use `diagnosticsTimeout` when with inline chat because the new diagnostics will never be read but slow down the result

* fix compile error

* stest run

* update baseline

* prevent some JSON errors from empty output

* unfresh baseline.json

* use `MockGithubAvailableEmbeddingTypesService` in stests

* back to hamfisted skipping of stests

* send telemetry from inline chat intent

* tweak some stests
2025-10-29 10:44:00 +00:00

35 lines
1.3 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { Intent } from '../../../src/extension/common/constants';
import { ssuite, stest } from '../../base/stest';
import { forInline, simulateInlineChatWithStrategy } from '../inlineChatSimulator';
import { assertWorkspaceEdit, fromFixture } from '../stestUtil';
forInline((strategy, nonExtensionConfigurations, suffix) => {
ssuite({ title: `/tests${suffix}`, location: 'inline', language: 'cpp', nonExtensionConfigurations }, () => {
stest({ description: 'can create a new test file' }, (testingServiceCollection) => {
return simulateInlineChatWithStrategy(strategy, testingServiceCollection, {
files: [
fromFixture('cpp/basic/main.cpp'),
],
queries: [{
file: 'main.cpp',
selection: [10, 16],
query: '/tests',
expectedIntent: Intent.Tests,
validate: async (outcome, workspace, accessor) => {
assertWorkspaceEdit(outcome);
assert.strictEqual(outcome.files.length, 1);
}
}]
});
});
});
});