Reenable agent sanity test (#3814)

* Reenable agent sanity test

* This way
This commit is contained in:
Rob Lourens
2026-02-18 16:47:40 +00:00
committed by GitHub
parent 089a83b6e7
commit d4b9313fa6
2 changed files with 12 additions and 4 deletions

View File

@@ -20,6 +20,10 @@ import { ContributedToolName } from '../../tools/common/toolNames';
import { IToolsService } from '../../tools/common/toolsService';
import { TestChatRequest } from '../node/testHelpers';
/**
* Running these locally? You may have to run `npm run setup` again
*/
suite('Copilot Chat Sanity Test', function () {
this.timeout(1000 * 60 * 1); // 1 minute
@@ -95,7 +99,11 @@ suite('Copilot Chat Sanity Test', function () {
});
});
test.skip('E2E Production agent mode', async function () {
/**
* Runs tools outside of a real chat session which is unusual but lets us spy more
* Uses an empty window with no folder open
*/
test('E2E Production agent mode', async function () {
assert.ok(realInstaAccessor, 'Instantiation service accessor is not available');
await realInstaAccessor.invokeFunction(async (accessor) => {
@@ -107,8 +115,8 @@ suite('Copilot Chat Sanity Test', function () {
try {
conversationFeature.activated = true;
let stream = new SpyChatResponseStream();
const testRequest = new TestChatRequest(`You must use the search tool to search for "foo". It may fail, that's ok, just testing`);
testRequest.tools.set(ContributedToolName.FindTextInFiles, true);
const testRequest = new TestChatRequest(`You must use the get_errors tool to check the window for errors. It may fail, that's ok, just testing, don't retry.`);
testRequest.tools.set(ContributedToolName.GetErrors, true);
let interactiveSession = instaService.createInstance(ChatParticipantRequestHandler, [], testRequest, stream, fakeToken, { agentName: '', agentId: '', intentId: Intent.Agent }, () => false);
const onWillInvokeTool = Event.toPromise(toolsService.onWillInvokeTool);

View File

@@ -69,7 +69,7 @@ export function getOrCreateTestingCopilotTokenManager(deviceId: string): SyncDes
}
if (process.env.GITHUB_OAUTH_TOKEN) {
return new SyncDescriptor(CopilotTokenManagerFromGitHubToken, [process.env.GITHUB_OAUTH_TOKEN]);
return new SyncDescriptor(CopilotTokenManagerFromGitHubToken, [process.env.GITHUB_OAUTH_TOKEN, 'unknown']);
}
if (process.env.GITHUB_PAT) {