mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-12 11:39:57 +01:00
tools: let hydrated tool calls have presentation options (#281634)
Editor side for https://github.com/microsoft/vscode/issues/281633
This commit is contained in:
@@ -46,7 +46,7 @@ import { IChatAgentMarkdownContentWithVulnerability, IChatCodeCitation, IChatCom
|
||||
import { LocalChatSessionUri } from '../../contrib/chat/common/chatUri.js';
|
||||
import { ChatRequestToolReferenceEntry, IChatRequestVariableEntry, isImageVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry } from '../../contrib/chat/common/chatVariableEntries.js';
|
||||
import { ChatAgentLocation } from '../../contrib/chat/common/constants.js';
|
||||
import { IToolInvocationContext, IToolResult, IToolResultInputOutputDetails, IToolResultOutputDetails, ToolDataSource } from '../../contrib/chat/common/languageModelToolsService.js';
|
||||
import { IToolInvocationContext, IToolResult, IToolResultInputOutputDetails, IToolResultOutputDetails, ToolDataSource, ToolInvocationPresentation } from '../../contrib/chat/common/languageModelToolsService.js';
|
||||
import * as chatProvider from '../../contrib/chat/common/languageModels.js';
|
||||
import { IChatMessageDataPart, IChatResponseDataPart, IChatResponsePromptTsxPart, IChatResponseTextPart } from '../../contrib/chat/common/languageModels.js';
|
||||
import { DebugTreeItemCollapsibleState, IDebugVisualizationTreeItem } from '../../contrib/debug/common/debug.js';
|
||||
@@ -2841,7 +2841,11 @@ export namespace ChatToolInvocationPart {
|
||||
source: ToolDataSource.External,
|
||||
// isError: part.isError ?? false,
|
||||
toolSpecificData: part.toolSpecificData ? convertToolSpecificData(part.toolSpecificData) : undefined,
|
||||
presentation: undefined,
|
||||
presentation: part.presentation === 'hidden'
|
||||
? ToolInvocationPresentation.Hidden
|
||||
: part.presentation === 'hiddenAfterComplete'
|
||||
? ToolInvocationPresentation.HiddenAfterComplete
|
||||
: undefined,
|
||||
fromSubAgent: part.fromSubAgent
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3370,6 +3370,7 @@ export class ChatToolInvocationPart {
|
||||
isComplete?: boolean;
|
||||
toolSpecificData?: ChatTerminalToolInvocationData2;
|
||||
fromSubAgent?: boolean;
|
||||
presentation?: 'hidden' | 'hiddenAfterComplete' | undefined;
|
||||
|
||||
constructor(toolName: string,
|
||||
toolCallId: string,
|
||||
|
||||
@@ -105,6 +105,7 @@ declare module 'vscode' {
|
||||
isComplete?: boolean;
|
||||
toolSpecificData?: ChatTerminalToolInvocationData;
|
||||
fromSubAgent?: boolean;
|
||||
presentation?: 'hidden' | 'hiddenAfterComplete' | undefined;
|
||||
|
||||
constructor(toolName: string, toolCallId: string, isError?: boolean);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user