Skip to content

Commit

Permalink
fix LanguageModelChatMessage#User so that it passes the true conten…
Browse files Browse the repository at this point in the history
…t down to the ctor (#231920)
  • Loading branch information
jrieken authored Oct 22, 2024
1 parent 161661c commit c50ff3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/vs/workbench/api/common/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4599,8 +4599,7 @@ export class LanguageModelToolResultPart implements vscode.LanguageModelToolResu
export class LanguageModelChatMessage implements vscode.LanguageModelChatMessage {

static User(content: string | (LanguageModelTextPart | LanguageModelToolResultPart | LanguageModelToolCallPart)[], name?: string): LanguageModelChatMessage {
const value = new LanguageModelChatMessage(LanguageModelChatMessageRole.User, typeof content === 'string' ? content : '', name);
return value;
return new LanguageModelChatMessage(LanguageModelChatMessageRole.User, content, name);
}

static Assistant(content: string | (LanguageModelTextPart | LanguageModelToolResultPart | LanguageModelToolCallPart)[], name?: string): LanguageModelChatMessage {
Expand Down

0 comments on commit c50ff3b

Please sign in to comment.