feat: add mock GitHub authentication provider and update activation events for mock chat provider

This commit is contained in:
Osvaldo Ortega
2026-02-27 14:34:59 -08:00
parent 100d1749cf
commit d373331a40
2 changed files with 25 additions and 1 deletions
@@ -11,6 +11,30 @@ const vscode = require('vscode');
* @param {vscode.ExtensionContext} context
*/
function activate(context) {
// Register a fake GitHub auth provider so the sessions welcome overlay
// sees a signed-in user and dismisses itself.
const fakeSession = {
id: 'fake-session-id',
accessToken: 'fake-token',
account: { id: 'test-user', label: 'Test User' },
scopes: ['read:user'],
};
context.subscriptions.push(
vscode.authentication.registerAuthenticationProvider(
'github',
'GitHub (Mock)',
{
onDidChangeSessions: new vscode.EventEmitter().event,
getSessions: async () => [fakeSession],
createSession: async () => fakeSession,
removeSession: async () => { },
},
{ supportsMultipleAccounts: false }
)
);
// Register a mock chat participant so chat input works without a real LLM.
const participant = vscode.chat.createChatParticipant(
'mock-chat-provider.mock',
async (_request, _context, stream, _token) => {
@@ -4,7 +4,7 @@
"description": "Provides a mock chat participant for agent sessions testing",
"version": "0.0.1",
"engines": { "vscode": "*" },
"activationEvents": ["onStartupFinished"],
"activationEvents": ["*"],
"main": "./extension.js",
"contributes": {
"chatParticipants": [