mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
fix merge
This commit is contained in:
@@ -111,6 +111,7 @@ suite('AgentSideEffects', () => {
|
||||
const noAgentSideEffects = disposables.add(new AgentSideEffects(stateManager, {
|
||||
getAgent: () => undefined,
|
||||
agents: emptyAgents,
|
||||
sessionDataService: {} as ISessionDataService,
|
||||
}, new NullLogService(), fileService));
|
||||
|
||||
const envelopes: IActionEnvelope[] = [];
|
||||
@@ -256,6 +257,7 @@ suite('AgentSideEffects', () => {
|
||||
const noAgentSideEffects = disposables.add(new AgentSideEffects(stateManager, {
|
||||
getAgent: () => undefined,
|
||||
agents: emptyAgents,
|
||||
sessionDataService: {} as ISessionDataService,
|
||||
}, new NullLogService(), fileService));
|
||||
|
||||
await assert.rejects(
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Emitter } from '../../../../base/common/event.js';
|
||||
import { URI } from '../../../../base/common/uri.js';
|
||||
import type { IAuthorizationProtectedResourceMetadata } from '../../../../base/common/oauth.js';
|
||||
import { AgentSession, type AgentProvider, type IAgent, type IAgentAttachment, type IAgentCreateSessionConfig, type IAgentDescriptor, type IAgentMessageEvent, type IAgentModelInfo, type IAgentProgressEvent, type IAgentSessionMetadata, type IAgentToolCompleteEvent, type IAgentToolStartEvent } from '../../common/agentService.js';
|
||||
import { PermissionKind } from '../../common/state/sessionState.js';
|
||||
import { PermissionKind, ToolResultContentType } from '../../common/state/sessionState.js';
|
||||
|
||||
/**
|
||||
* General-purpose mock agent for unit tests. Tracks all method calls
|
||||
@@ -146,7 +146,7 @@ export class ScriptedMockAgent implements IAgent {
|
||||
case 'use-tool':
|
||||
this._fireSequence(session, [
|
||||
{ type: 'tool_start', session, toolCallId: 'tc-1', toolName: 'echo_tool', displayName: 'Echo Tool', invocationMessage: 'Running echo tool...' },
|
||||
{ type: 'tool_complete', session, toolCallId: 'tc-1', success: true, pastTenseMessage: 'Ran echo tool', toolOutput: 'echoed' },
|
||||
{ type: 'tool_complete', session, toolCallId: 'tc-1', result: { pastTenseMessage: 'Ran echo tool', content: [{ type: ToolResultContentType.Text, text: 'echoed' }], success: true } },
|
||||
{ type: 'delta', session, messageId: 'msg-1', content: 'Tool done.' },
|
||||
{ type: 'idle', session },
|
||||
]);
|
||||
|
||||
@@ -9,10 +9,11 @@ import { DisposableStore } from '../../../../base/common/lifecycle.js';
|
||||
import { URI } from '../../../../base/common/uri.js';
|
||||
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../base/test/common/utils.js';
|
||||
import { NullLogService } from '../../../log/common/log.js';
|
||||
import { IFetchContentResult } from '../../common/state/protocol/commands.js';
|
||||
import { ActionType, type ISessionAction } from '../../common/state/sessionActions.js';
|
||||
import { isJsonRpcNotification, isJsonRpcResponse, JSON_RPC_INTERNAL_ERROR, ProtocolError, type ICreateSessionParams, type IInitializeResult, type IProtocolMessage, type IAhpNotification, type IReconnectResult, type IStateSnapshot } from '../../common/state/sessionProtocol.js';
|
||||
import { SessionStatus, type ISessionSummary } from '../../common/state/sessionState.js';
|
||||
import { PROTOCOL_VERSION } from '../../common/state/sessionCapabilities.js';
|
||||
import { isJsonRpcNotification, isJsonRpcResponse, JSON_RPC_INTERNAL_ERROR, ProtocolError, type IAhpNotification, type ICreateSessionParams, type IInitializeResult, type IProtocolMessage, type IReconnectResult, type IStateSnapshot } from '../../common/state/sessionProtocol.js';
|
||||
import { SessionStatus, type ISessionSummary } from '../../common/state/sessionState.js';
|
||||
import type { IProtocolServer, IProtocolTransport } from '../../common/state/sessionTransport.js';
|
||||
import { ProtocolServerHandler, type IProtocolSideEffectHandler } from '../../node/protocolServerHandler.js';
|
||||
import { SessionStateManager } from '../../node/sessionStateManager.js';
|
||||
@@ -92,7 +93,7 @@ class MockSideEffectHandler implements IProtocolSideEffectHandler {
|
||||
getDefaultDirectory(): string {
|
||||
return URI.file('/home/testuser').toString();
|
||||
}
|
||||
async handleFetchContent(_uri: string): Promise<{ data: string; encoding: 'utf-8'; contentType?: string }> {
|
||||
async handleFetchContent(_uri: string): Promise<IFetchContentResult> {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user