mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-27 04:07:13 +01:00
Add missing requestIDs (#195857)
This commit is contained in:
@@ -28,7 +28,7 @@ import { CHAT_CATEGORY } from 'vs/workbench/contrib/chat/browser/actions/chatAct
|
||||
import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
|
||||
import { ICodeBlockActionContext } from 'vs/workbench/contrib/chat/browser/codeBlockPart';
|
||||
import { CONTEXT_IN_CHAT_SESSION, CONTEXT_PROVIDER_EXISTS } from 'vs/workbench/contrib/chat/common/chatContextKeys';
|
||||
import { IChatCopyAction, IChatService, IChatUserActionEvent, IDocumentContext, InteractiveSessionCopyKind } from 'vs/workbench/contrib/chat/common/chatService';
|
||||
import { IChatCopyAction, IChatService, IDocumentContext, InteractiveSessionCopyKind } from 'vs/workbench/contrib/chat/common/chatService';
|
||||
import { IChatResponseViewModel, isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel';
|
||||
import { CTX_INLINE_CHAT_VISIBLE } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
|
||||
import { insertCell } from 'vs/workbench/contrib/notebook/browser/controller/cellOperations';
|
||||
@@ -106,7 +106,7 @@ export function registerChatCodeBlockActions() {
|
||||
|
||||
if (isResponseVM(context.element)) {
|
||||
const chatService = accessor.get(IChatService);
|
||||
chatService.notifyUserAction(<IChatUserActionEvent>{
|
||||
chatService.notifyUserAction({
|
||||
providerId: context.element.providerId,
|
||||
agentId: context.element.agent?.id,
|
||||
sessionId: context.element.sessionId,
|
||||
@@ -330,13 +330,14 @@ export function registerChatCodeBlockActions() {
|
||||
private notifyUserAction(accessor: ServicesAccessor, context: ICodeBlockActionContext) {
|
||||
if (isResponseVM(context.element)) {
|
||||
const chatService = accessor.get(IChatService);
|
||||
chatService.notifyUserAction(<IChatUserActionEvent>{
|
||||
chatService.notifyUserAction({
|
||||
providerId: context.element.providerId,
|
||||
agentId: context.element.agent?.id,
|
||||
sessionId: context.element.sessionId,
|
||||
requestId: context.element.requestId,
|
||||
action: {
|
||||
kind: 'insert',
|
||||
responseId: context.element.providerResponseId,
|
||||
responseId: context.element.providerResponseId!,
|
||||
codeBlockIndex: context.codeBlockIndex,
|
||||
totalCharacters: context.code.length,
|
||||
}
|
||||
@@ -378,13 +379,14 @@ export function registerChatCodeBlockActions() {
|
||||
editorService.openEditor(<IUntitledTextResourceEditorInput>{ contents: context.code, languageId: context.languageId, resource: undefined });
|
||||
|
||||
if (isResponseVM(context.element)) {
|
||||
chatService.notifyUserAction(<IChatUserActionEvent>{
|
||||
chatService.notifyUserAction({
|
||||
providerId: context.element.providerId,
|
||||
agentId: context.element.agent?.id,
|
||||
sessionId: context.element.sessionId,
|
||||
requestId: context.element.requestId,
|
||||
action: {
|
||||
kind: 'insert',
|
||||
responseId: context.element.providerResponseId,
|
||||
responseId: context.element.providerResponseId!,
|
||||
codeBlockIndex: context.codeBlockIndex,
|
||||
totalCharacters: context.code.length,
|
||||
newFile: true
|
||||
@@ -463,13 +465,14 @@ export function registerChatCodeBlockActions() {
|
||||
terminal.sendText(context.code, false, true);
|
||||
|
||||
if (isResponseVM(context.element)) {
|
||||
chatService.notifyUserAction(<IChatUserActionEvent>{
|
||||
chatService.notifyUserAction({
|
||||
providerId: context.element.providerId,
|
||||
agentId: context.element.agent?.id,
|
||||
sessionId: context.element.sessionId,
|
||||
requestId: context.element.requestId,
|
||||
action: {
|
||||
kind: 'runInTerminal',
|
||||
responseId: context.element.providerResponseId,
|
||||
responseId: context.element.providerResponseId!,
|
||||
codeBlockIndex: context.codeBlockIndex,
|
||||
languageId: context.languageId,
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import { ResourceNotebookCellEdit } from 'vs/workbench/contrib/bulkEdit/browser/
|
||||
import { CHAT_CATEGORY } from 'vs/workbench/contrib/chat/browser/actions/chatActions';
|
||||
import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
|
||||
import { CONTEXT_IN_CHAT_INPUT, CONTEXT_IN_CHAT_SESSION, CONTEXT_REQUEST, CONTEXT_RESPONSE, CONTEXT_RESPONSE_FILTERED, CONTEXT_RESPONSE_VOTE } from 'vs/workbench/contrib/chat/common/chatContextKeys';
|
||||
import { IChatService, IChatUserActionEvent, InteractiveSessionVoteDirection } from 'vs/workbench/contrib/chat/common/chatService';
|
||||
import { IChatService, InteractiveSessionVoteDirection } from 'vs/workbench/contrib/chat/common/chatService';
|
||||
import { isRequestVM, isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel';
|
||||
import { INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
|
||||
import { CellEditType, CellKind, NOTEBOOK_EDITOR_ID } from 'vs/workbench/contrib/notebook/common/notebookCommon';
|
||||
@@ -52,14 +52,15 @@ export function registerChatTitleActions() {
|
||||
}
|
||||
|
||||
const chatService = accessor.get(IChatService);
|
||||
chatService.notifyUserAction(<IChatUserActionEvent>{
|
||||
chatService.notifyUserAction({
|
||||
providerId: item.providerId,
|
||||
agentId: item.agent?.id,
|
||||
sessionId: item.sessionId,
|
||||
requestId: item.requestId,
|
||||
action: {
|
||||
kind: 'vote',
|
||||
direction: InteractiveSessionVoteDirection.Up,
|
||||
responseId: item.providerResponseId,
|
||||
responseId: item.providerResponseId!,
|
||||
}
|
||||
});
|
||||
item.setVote(InteractiveSessionVoteDirection.Up);
|
||||
@@ -94,14 +95,15 @@ export function registerChatTitleActions() {
|
||||
}
|
||||
|
||||
const chatService = accessor.get(IChatService);
|
||||
chatService.notifyUserAction(<IChatUserActionEvent>{
|
||||
chatService.notifyUserAction({
|
||||
providerId: item.providerId,
|
||||
agentId: item.agent?.id,
|
||||
sessionId: item.sessionId,
|
||||
requestId: item.requestId,
|
||||
action: {
|
||||
kind: 'vote',
|
||||
direction: InteractiveSessionVoteDirection.Down,
|
||||
responseId: item.providerResponseId,
|
||||
responseId: item.providerResponseId!,
|
||||
}
|
||||
});
|
||||
item.setVote(InteractiveSessionVoteDirection.Down);
|
||||
|
||||
Reference in New Issue
Block a user