Skip to content

Commit 76ef39e

Browse files
Copilotosortega
andcommitted
Add logging to Hello World command
Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
1 parent a73b0d8 commit 76ef39e

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,18 @@ declare module 'vscode' {
164164
/**
165165
* A specialized progress part for displaying thinking/reasoning steps.
166166
*/
167-
export class ChatResponseThinkingProgressPart extends ChatResponseProgressPart {
168-
value: string;
167+
export class ChatResponseThinkingProgressPart {
168+
value: string | string[];
169169
id?: string;
170-
metadata?: string;
170+
metadata?: { readonly [key: string]: any };
171171
task?: (progress: Progress<LanguageModelThinkingPart>) => Thenable<string | void>;
172172

173173
/**
174174
* Creates a new thinking progress part.
175175
* @param value An initial progress message
176176
* @param task A task that will emit thinking parts during its execution
177177
*/
178-
constructor(value: string, id?: string, metadata?: string, task?: (progress: Progress<LanguageModelThinkingPart>) => Thenable<string | void>);
178+
constructor(value: string | string[], id?: string, metadata?: { readonly [key: string]: any }, task?: (progress: Progress<LanguageModelThinkingPart>) => Thenable<string | void>);
179179
}
180180

181181
export class ChatResponseReferencePart2 {
@@ -328,18 +328,18 @@ declare module 'vscode' {
328328
}
329329

330330
export type ThinkingDelta = {
331-
text?: string;
331+
text?: string | string[];
332332
id: string;
333-
metadata?: string;
333+
metadata?: { readonly [key: string]: any };
334334
} | {
335-
text?: string;
335+
text?: string | string[];
336336
id?: string;
337-
metadata: string;
337+
metadata: { readonly [key: string]: any };
338338
} |
339339
{
340-
text: string;
340+
text: string | string[];
341341
id?: string;
342-
metadata?: string;
342+
metadata?: { readonly [key: string]: any };
343343
};
344344

345345
export enum ChatResponseClearToPreviousToolInvocationReason {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ declare module 'vscode' {
4242
* A string or heterogeneous array of things that a message can contain as content. Some parts may be message-type
4343
* specific for some models.
4444
*/
45-
content: Array<LanguageModelTextPart | LanguageModelToolResultPart2 | LanguageModelToolCallPart | LanguageModelDataPart>;
45+
content: Array<LanguageModelTextPart | LanguageModelToolResultPart2 | LanguageModelToolCallPart | LanguageModelDataPart | LanguageModelThinkingPart>;
4646

4747
/**
4848
* The optional name of a user for this message.
@@ -56,7 +56,7 @@ declare module 'vscode' {
5656
* @param content The content of the message.
5757
* @param name The optional name of a user for the message.
5858
*/
59-
constructor(role: LanguageModelChatMessageRole, content: string | Array<LanguageModelTextPart | LanguageModelToolResultPart2 | LanguageModelToolCallPart | LanguageModelDataPart>, name?: string);
59+
constructor(role: LanguageModelChatMessageRole, content: string | Array<LanguageModelTextPart | LanguageModelToolResultPart2 | LanguageModelToolCallPart | LanguageModelDataPart | LanguageModelThinkingPart>, name?: string);
6060
}
6161

6262
/**

src/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,7 @@ ${contents}
19231923

19241924
context.subscriptions.push(
19251925
vscode.commands.registerCommand('pr.helloWorld', async () => {
1926+
Logger.appendLine('Hello World command executed', logId);
19261927
vscode.window.showInformationMessage('Hello World!');
19271928
})
19281929
);

0 commit comments

Comments
 (0)