Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove XYZTurn#agent#agentId because it is now just agent #205266

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vs/workbench/api/common/extHostChatAgents2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ export class ExtHostChatAgents2 implements ExtHostChatAgentsShape2 {
{ ...ehResult, metadata: undefined };

// REQUEST turn
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 }));
res.push(new extHostTypes.ChatAgentRequestTurn(h.request.message, h.request.command, h.request.variables.variables.map(typeConvert.ChatAgentResolvedVariable.to), { extensionId: '', agent: h.request.agentId }));

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

return res;
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/api/common/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4265,7 +4265,7 @@ export class ChatAgentRequestTurn implements vscode.ChatAgentRequestTurn {
readonly prompt: string,
readonly command: string | undefined,
readonly variables: vscode.ChatAgentResolvedVariable[],
readonly agent: { extensionId: string; agent: string; agentId: string },
readonly agent: { extensionId: string; agent: string },
) { }
}

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

Expand Down
15 changes: 8 additions & 7 deletions src/vscode-dts/vscode.proposed.chatAgents2.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ declare module 'vscode' {
readonly prompt: string;

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

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

private constructor(prompt: string, command: string | undefined, variables: ChatAgentResolvedVariable[], agent: { extensionId: string; agentId: string });
private constructor(prompt: string, command: string | undefined, variables: ChatAgentResolvedVariable[], agent: { extensionId: string; agent: string });
}

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

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

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

export interface ChatAgentContext {
Expand Down