Add the ability to clear a ChatResponseStream, passing in a reason which results in a warning being displayed (#257271) (#259370)

* Add the ability to clear a ChatResponseStream, passing in a reason which results in a warning being displayed

* Changing ChatResponseStream.clear to ChatResponseStream.clearToPreviousToolInvocation and only clearing up to the last tool invocation

* Remove unnecessary code block

Co-authored-by: James Wang <120431051+jwangxx@users.noreply.github.com>
This commit is contained in:
Rob Lourens
2025-08-03 17:37:35 -07:00
committed by GitHub
parent e151f76c84
commit 67212013a4
7 changed files with 77 additions and 5 deletions

View File

@@ -1859,6 +1859,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
ChatPrepareToolInvocationPart: extHostTypes.ChatPrepareToolInvocationPart,
ChatResponseMultiDiffPart: extHostTypes.ChatResponseMultiDiffPart,
ChatResponseReferencePartStatusKind: extHostTypes.ChatResponseReferencePartStatusKind,
ChatResponseClearToPreviousToolInvocationReason: extHostTypes.ChatResponseClearToPreviousToolInvocationReason,
ChatRequestTurn: extHostTypes.ChatRequestTurn,
ChatRequestTurn2: extHostTypes.ChatRequestTurn,
ChatResponseTurn: extHostTypes.ChatResponseTurn,