Skip to content

Commit 633992c

Browse files
authored
remove XYZTurn#agent#agentId because it is now just agent (microsoft#205266)
microsoft#199908
1 parent 6722b81 commit 633992c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/vs/workbench/api/common/extHostChatAgents2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ export class ExtHostChatAgents2 implements ExtHostChatAgentsShape2 {
235235
{ ...ehResult, metadata: undefined };
236236

237237
// REQUEST turn
238-
res.push(new extHostTypes.ChatAgentRequestTurn(h.request.message, h.request.command, h.request.variables.variables.map(typeConvert.ChatAgentResolvedVariable.to), { extensionId: '', agent: h.request.agentId, agentId: h.request.agentId }));
238+
res.push(new extHostTypes.ChatAgentRequestTurn(h.request.message, h.request.command, h.request.variables.variables.map(typeConvert.ChatAgentResolvedVariable.to), { extensionId: '', agent: h.request.agentId }));
239239

240240
// RESPONSE turn
241241
const parts = coalesce(h.response.map(r => typeConvert.ChatResponsePart.from(r, this.commands.converter)));
242-
res.push(new extHostTypes.ChatAgentResponseTurn(parts, result, { extensionId: '', agent: h.request.agentId, agentId: h.request.agentId }));
242+
res.push(new extHostTypes.ChatAgentResponseTurn(parts, result, { extensionId: '', agent: h.request.agentId }));
243243
}
244244

245245
return res;

src/vs/workbench/api/common/extHostTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,7 +4265,7 @@ export class ChatAgentRequestTurn implements vscode.ChatAgentRequestTurn {
42654265
readonly prompt: string,
42664266
readonly command: string | undefined,
42674267
readonly variables: vscode.ChatAgentResolvedVariable[],
4268-
readonly agent: { extensionId: string; agent: string; agentId: string },
4268+
readonly agent: { extensionId: string; agent: string },
42694269
) { }
42704270
}
42714271

@@ -4274,7 +4274,7 @@ export class ChatAgentResponseTurn implements vscode.ChatAgentResponseTurn {
42744274
constructor(
42754275
readonly response: ReadonlyArray<ChatResponseTextPart | ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>,
42764276
readonly result: vscode.ChatAgentResult2,
4277-
readonly agent: { extensionId: string; agent: string; agentId: string }
4277+
readonly agent: { extensionId: string; agent: string }
42784278
) { }
42794279
}
42804280

src/vscode-dts/vscode.proposed.chatAgents2.d.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ declare module 'vscode' {
1919
readonly prompt: string;
2020

2121
/**
22-
* The ID of the chat agent to which this request was directed.
22+
* The name of the chat agent and contributing extension to which this request was directed.
2323
*/
24-
// TODO@API NAME: agentId shouldbe agentName or just agent (because it is ChatAgent#name)
25-
readonly agent: { readonly extensionId: string; readonly agent: string; readonly agentId: string };
24+
readonly agent: { readonly extensionId: string; readonly agent: string };
2625

2726
/**
2827
* The name of the {@link ChatAgentCommand command} that was selected for this request.
@@ -34,7 +33,7 @@ declare module 'vscode' {
3433
*/
3534
readonly variables: ChatAgentResolvedVariable[];
3635

37-
private constructor(prompt: string, command: string | undefined, variables: ChatAgentResolvedVariable[], agent: { extensionId: string; agentId: string });
36+
private constructor(prompt: string, command: string | undefined, variables: ChatAgentResolvedVariable[], agent: { extensionId: string; agent: string });
3837
}
3938

4039
// TODO@API name: Turn?
@@ -50,10 +49,12 @@ declare module 'vscode' {
5049
*/
5150
readonly result: ChatAgentResult2;
5251

53-
// TODO@API NAME: agentId shouldbe agentName or just agent (because it is ChatAgent#name)
54-
readonly agent: { readonly extensionId: string; readonly agent: string; readonly agentId: string };
52+
/**
53+
* The name of the chat agent and contributing extension to which this request was directed.
54+
*/
55+
readonly agent: { readonly extensionId: string; readonly agent: string };
5556

56-
private constructor(response: ReadonlyArray<ChatResponseTextPart | ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>, result: ChatAgentResult2, agentId: { extensionId: string; agentId: string });
57+
private constructor(response: ReadonlyArray<ChatResponseTextPart | ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart | ChatResponseCommandButtonPart>, result: ChatAgentResult2, agentId: { extensionId: string; agent: string });
5758
}
5859

5960
export interface ChatAgentContext {

0 commit comments

Comments
 (0)