Skip to content

Commit 76d275b

Browse files
committed
Switch to request CLI handler
1 parent d3debbc commit 76d275b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/copilotRequestHandler.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
import internal = require('stream');
12
import * as vscode from 'vscode';
23

34
interface ResponseData {
45
success: boolean;
56
message: string;
67
}
78

9+
interface HandlerResponse {
10+
data: string;
11+
status: internal;
12+
error: string;
13+
}
14+
815
type Dictionary = {
916
[key: string]: any
1017
};
@@ -55,7 +62,7 @@ export async function copilotRequestHandler(request: vscode.ChatRequest, context
5562

5663
const chatResponse = await sendPostRequest(endpointUrl, auth_token, postData);
5764
stream.progress('Requesting the CLI copilot handler......');
58-
stream.markdown(JSON.stringify(chatResponse['data']));
65+
stream.markdown(JSON.stringify(chatResponse['data'][0]));
5966

6067
// for await (const fragment of chatResponse.message) {
6168
// stream.markdown(fragment);

0 commit comments

Comments
 (0)