Support for attempt and enableCommandDetection in chat model/service (#209826)

* add `IChatRequestModel#attempt` so that rerun request/response can be supported

* - support to run with/without command detection enabled
- adopt agent brigde to new chat request
- add share rerun-commands (but only enable them for inline chat for now)
This commit is contained in:
Johannes Rieken
2024-04-08 14:08:22 +02:00
committed by GitHub
parent 4e9e0e2529
commit ef6345ae05
22 changed files with 237 additions and 170 deletions

View File

@@ -82,8 +82,8 @@ class BridgeAgent implements IChatAgentImplementation {
const inlineRequest: IInlineChatRequest = {
requestId: request.requestId,
prompt: request.message,
attempt: session.lastInput.attempt,
withIntentDetection: session.lastInput.withIntentDetection,
attempt: request.attempt ?? 0,
withIntentDetection: request.enableCommandDetection ?? true,
live: session.editMode !== EditMode.Preview,
previewDocument: session.textModelN.uri,
selection: editor.getSelection()!,