Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/extension/prompt/node/responseProcessorContext.ts
13399 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Raw } from '@vscode/prompt-tsx';
7
import { InteractionOutcomeComputer, ISessionTurnStorage, OutcomeAnnotation } from '../../inlineChat/node/promptCraftingTypes';
8
import { Turn } from '../common/conversation';
9
import { IResponseProcessorContext } from './intents';
10
11
export class ResponseProcessorContext implements IResponseProcessorContext {
12
13
constructor(
14
public readonly chatSessionId: string,
15
public readonly turn: Turn,
16
public readonly messages: readonly Raw.ChatMessage[],
17
private readonly _interactionOutcomeComputer: InteractionOutcomeComputer
18
) { }
19
20
addAnnotations(annotations: OutcomeAnnotation[]): void {
21
this._interactionOutcomeComputer.addAnnotations(annotations);
22
}
23
24
storeInInlineSession(store: ISessionTurnStorage): void {
25
this._interactionOutcomeComputer.storeInInlineSession(store);
26
}
27
}
28
29