Path: blob/main/src/vs/platform/agentHost/common/state/sessionReducers.ts
13399 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45// Re-exports the protocol reducers and adds VS Code-specific helpers.6// The actual reducer logic lives in the auto-generated protocol layer.78// Re-export reducers from the protocol layer9export { rootReducer, sessionReducer, softAssertNever, isClientDispatchable } from './protocol/reducers.js';1011import type { ICompletedToolCall, ToolCallState } from './sessionState.js';1213/**14* Extracts the VS Code-specific `toolKind` hint from a tool call's `_meta`15* bag. This is not part of the protocol and is injected by the agent adapter16* (e.g. `copilotEventMapper`).17*/18export function getToolKind(tc: ToolCallState | ICompletedToolCall): 'terminal' | 'subagent' | undefined {19return tc._meta?.toolKind as 'terminal' | 'subagent' | undefined;20}212223