Fix slash comands in /help that don't have sample queries (#227027)

Fix microsoft/vscode-copilot#7742
pull/227028/head
Rob Lourens 2024-08-28 18:51:38 -07:00 committed by GitHub
parent 40a85d83f0
commit 8cd1d86cb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -481,9 +481,8 @@ export class ChatService extends Disposable implements IChatService {
}
async sendRequest(sessionId: string, request: string, options?: IChatSendRequestOptions): Promise<IChatSendRequestData | undefined> {
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;
}