mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
cloud agent fix attaching uri to context (#278905)
This commit is contained in:
@@ -306,7 +306,7 @@ class CreateRemoteAgentJobFromEditorAction {
|
|||||||
if (!model || !isITextModel(model)) {
|
if (!model || !isITextModel(model)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const fileUri = model.uri as URI;
|
const uri = model.uri;
|
||||||
const chatModelReference = chatService.startSession(ChatAgentLocation.Chat, CancellationToken.None, {});
|
const chatModelReference = chatService.startSession(ChatAgentLocation.Chat, CancellationToken.None, {});
|
||||||
const { sessionResource } = chatModelReference.object;
|
const { sessionResource } = chatModelReference.object;
|
||||||
if (!sessionResource) {
|
if (!sessionResource) {
|
||||||
@@ -315,11 +315,9 @@ class CreateRemoteAgentJobFromEditorAction {
|
|||||||
await editorService2.openEditor({ resource: sessionResource }, undefined);
|
await editorService2.openEditor({ resource: sessionResource }, undefined);
|
||||||
const attachedContext: IChatRequestVariableEntry[] = [{
|
const attachedContext: IChatRequestVariableEntry[] = [{
|
||||||
kind: 'file',
|
kind: 'file',
|
||||||
id: 'vscode.implicit.selection',
|
id: 'editor.uri',
|
||||||
name: basename(fileUri),
|
name: basename(uri),
|
||||||
value: {
|
value: uri
|
||||||
uri: fileUri
|
|
||||||
},
|
|
||||||
}];
|
}];
|
||||||
await chatService.sendRequest(sessionResource, `Implement this.`, {
|
await chatService.sendRequest(sessionResource, `Implement this.`, {
|
||||||
agentIdSilent: continuationTargetType,
|
agentIdSilent: continuationTargetType,
|
||||||
|
|||||||
Reference in New Issue
Block a user