Skip to content

Commit ee79b01

Browse files
committed
fix typings
1 parent 6dc6554 commit ee79b01

File tree

4 files changed

+33
-27
lines changed

4 files changed

+33
-27
lines changed

common/sessionParsing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ export function parseToolCallDetails(
117117
// Use the terminal-specific data for bash commands
118118
if (args.command) {
119119
details.toolSpecificData = {
120-
command: args.command,
120+
commandLine: {
121+
original: args.command,
122+
},
121123
language: 'bash'
122124
};
123125
}

src/@types/vscode.proposed.chatParticipantAdditions.d.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,8 @@ declare module 'vscode' {
8383
toolName: string;
8484
constructor(toolName: string);
8585
}
86-
export interface ChatTerminalToolInvocationData {
87-
command: string;
88-
language: string;
89-
}
9086

91-
export interface ChatTerminalToolInvocationData2 {
87+
export interface ChatTerminalToolInvocationData {
9288
commandLine: {
9389
original: string;
9490
userEdited?: string;
@@ -106,12 +102,12 @@ declare module 'vscode' {
106102
pastTenseMessage?: string | MarkdownString;
107103
isConfirmed?: boolean;
108104
isComplete?: boolean;
109-
toolSpecificData?: ChatTerminalToolInvocationData | ChatTerminalToolInvocationData2;
105+
toolSpecificData?: ChatTerminalToolInvocationData;
110106

111107
constructor(toolName: string, toolCallId: string, isError?: boolean);
112108
}
113109

114-
export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseNotebookEditPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2 | ChatResponseMovePart | ChatResponseExtensionsPart | ChatPrepareToolInvocationPart | ChatToolInvocationPart;
110+
export type ExtendedChatResponsePart = ChatResponsePart | ChatResponseTextEditPart | ChatResponseNotebookEditPart | ChatResponseConfirmationPart | ChatResponseCodeCitationPart | ChatResponseReferencePart2 | ChatResponseMovePart | ChatResponseExtensionsPart | ChatPrepareToolInvocationPart;
115111

116112
export class ChatResponseWarningPart {
117113
value: MarkdownString;

src/@types/vscode.proposed.chatParticipantPrivate.d.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -205,24 +205,6 @@ declare module 'vscode' {
205205
presentation?: 'hidden' | undefined;
206206
}
207207

208-
export interface LanguageModelTool<T> {
209-
prepareInvocation2?(options: LanguageModelToolInvocationPrepareOptions<T>, token: CancellationToken): ProviderResult<PreparedTerminalToolInvocation>;
210-
}
211-
212-
export class PreparedTerminalToolInvocation {
213-
readonly command: string;
214-
readonly language: string;
215-
readonly confirmationMessages?: LanguageModelToolConfirmationMessages;
216-
readonly presentation?: 'hidden' | undefined;
217-
218-
constructor(
219-
command: string,
220-
language: string,
221-
confirmationMessages?: LanguageModelToolConfirmationMessages,
222-
presentation?: 'hidden'
223-
);
224-
}
225-
226208
export class ExtendedLanguageModelToolResult extends LanguageModelToolResult {
227209
toolResultMessage?: string | MarkdownString;
228210
toolResultDetails?: Array<Uri | Location>;

src/@types/vscode.proposed.chatSessionsProvider.d.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,28 @@ declare module 'vscode' {
1111
/**
1212
* Label of the extension that registers the provider.
1313
*/
14-
readonly label: string;
14+
readonly label: string; // TODO: move to contribution or registration
1515

1616
/**
1717
* Event that the provider can fire to signal that chat sessions have changed.
1818
*/
1919
readonly onDidChangeChatSessionItems: Event<void>;
2020

21+
// /**
22+
// * Create a new chat session item
23+
// */
24+
// provideNewChatSessionItem(context: {
25+
// // This interface should be extracted
26+
// readonly triggerChat?: {
27+
// readonly prompt: string;
28+
// readonly history: ReadonlyArray<ChatRequestTurn | ChatResponseTurn>;
29+
// };
30+
// }, token: CancellationToken): Thenable<ChatSessionItem> | ChatSessionItem;
31+
2132
/**
2233
* Provides a list of chat sessions.
34+
*
35+
* TODO: Do we need a flag to try auth if needed?
2336
*/
2437
provideChatSessionItems(token: CancellationToken): ProviderResult<ChatSessionItem[]>;
2538
}
@@ -113,6 +126,19 @@ declare module 'vscode' {
113126
* @param chatSessionType A unique identifier for the chat session type. This is used to differentiate between different chat session providers.
114127
*/
115128
export function registerChatSessionContentProvider(chatSessionType: string, provider: ChatSessionContentProvider): Disposable;
129+
}
130+
131+
export interface ChatSessionShowOptions {
132+
/**
133+
* The editor view column to show the chat session in.
134+
*
135+
* If not provided, the chat session will be shown in the chat panel instead.
136+
*/
137+
readonly viewColumn?: ViewColumn;
138+
}
139+
140+
export namespace window {
116141

142+
export function showChatSession(chatSessionType: string, id: string, options: ChatSessionShowOptions): Thenable<void>;
117143
}
118144
}

0 commit comments

Comments
 (0)