From 8cd1d86cb7f4cc0291e8b7ccf21cb68d961168c5 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 28 Aug 2024 18:51:38 -0700 Subject: [PATCH] Fix slash comands in /help that don't have sample queries (#227027) Fix microsoft/vscode-copilot#7742 --- src/vs/workbench/contrib/chat/common/chatServiceImpl.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts b/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts index 3ca4524e80e..7082bc267cd 100644 --- a/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts +++ b/src/vs/workbench/contrib/chat/common/chatServiceImpl.ts @@ -481,9 +481,8 @@ export class ChatService extends Disposable implements IChatService { } async sendRequest(sessionId: string, request: string, options?: IChatSendRequestOptions): Promise { - this.trace('sendRequest', `sessionId: ${sessionId}, message: ${request.substring(0, 20)}${request.length > 20 ? '[...]' : ''}}`); - if (!request.trim()) { + if (!request.trim() && !options?.slashCommand && !options?.agentId) { this.trace('sendRequest', 'Rejected empty message'); return; }