Path: blob/main/extensions/copilot/src/extension/agentDebug/common/toolResultRenderer.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*--------------------------------------------------------------------------------------------*/45import { createServiceIdentifier } from '../../../util/common/services';67export const IToolResultContentRenderer = createServiceIdentifier<IToolResultContentRenderer>('IToolResultContentRenderer');89/**10* Renders tool result content parts into human-readable strings.11* Injected from the vscode-node layer to avoid layering violations12* (the rendering depends on @vscode/prompt-tsx which lives in vscode-node).13*/14export interface IToolResultContentRenderer {15readonly _serviceBrand: undefined;1617/**18* Extracts a text representation from the content parts of a tool result.19* Handles LanguageModelTextPart, LanguageModelPromptTsxPart, and LanguageModelDataPart.20* Uses lightweight string conversion to avoid expensive rendering on the hot path.21*/22renderToolResultContent(content: Iterable<unknown>): string[];23}242526