cleanup old setAuthToken

This commit is contained in:
Connor Peet
2026-03-18 14:25:42 -07:00
parent f3b0544950
commit e3547da62c
12 changed files with 6 additions and 92 deletions

View File

@@ -126,20 +126,6 @@ suite('AgentService (node dispatcher)', () => {
});
});
// ---- setAuthToken ---------------------------------------------------
suite('setAuthToken', () => {
test('broadcasts token to all registered providers', async () => {
service.registerProvider(copilotAgent);
await service.setAuthToken('my-token');
assert.strictEqual(copilotAgent.setAuthTokenCalls.length, 1);
assert.strictEqual(copilotAgent.setAuthTokenCalls[0], 'my-token');
});
});
// ---- listSessions / listModels --------------------------------------
suite('aggregation', () => {

View File

@@ -19,7 +19,7 @@ export class MockAgent implements IAgent {
private readonly _sessions = new Map<string, URI>();
private _nextId = 1;
readonly setAuthTokenCalls: string[] = [];
readonly sendMessageCalls: { session: URI; prompt: string }[] = [];
readonly disposeSessionCalls: URI[] = [];
readonly abortSessionCalls: URI[] = [];
@@ -80,10 +80,6 @@ export class MockAgent implements IAgent {
this.changeModelCalls.push({ session, model });
}
async setAuthToken(token: string): Promise<void> {
this.setAuthTokenCalls.push(token);
}
async authenticate(resource: string, token: string): Promise<boolean> {
this.authenticateCalls.push({ resource, token });
return true;
@@ -241,8 +237,6 @@ export class ScriptedMockAgent implements IAgent {
}
}
async setAuthToken(_token: string): Promise<void> { }
async authenticate(_resource: string, _token: string): Promise<boolean> {
return true;
}

View File

@@ -74,7 +74,6 @@ class MockSideEffectHandler implements IProtocolSideEffectHandler {
async handleCreateSession(_command: ICreateSessionParams): Promise<void> { /* session created via state manager */ }
handleDisposeSession(_session: string): void { }
async handleListSessions(): Promise<ISessionSummary[]> { return []; }
handleSetAuthToken(_token: string): void { }
handleGetResourceMetadata() { return { resources: [] }; }
async handleAuthenticate(_params: { resource: string; token: string }) { return { authenticated: true }; }
async handleBrowseDirectory(uri: string): Promise<{ entries: { name: string; type: 'file' | 'directory' }[] }> {