diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-01 14:21:26 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-01 14:21:26 -0700 |
commit | 452af6002addd67d7047ce4faa39a680ef2b4439 (patch) | |
tree | 1c3cd18ac86f295d17ce3634e90fc55c8e05630a /continuedev | |
parent | 14be889aa17e266621d35e03dc1585b84a302ec4 (diff) | |
download | sncontinue-452af6002addd67d7047ce4faa39a680ef2b4439.tar.gz sncontinue-452af6002addd67d7047ce4faa39a680ef2b4439.tar.bz2 sncontinue-452af6002addd67d7047ce4faa39a680ef2b4439.zip |
older @types/vscode version to match older engine
Diffstat (limited to 'continuedev')
-rw-r--r-- | continuedev/src/continuedev/steps/chat.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/continuedev/src/continuedev/steps/chat.py b/continuedev/src/continuedev/steps/chat.py index 8494563b..9bb75ab4 100644 --- a/continuedev/src/continuedev/steps/chat.py +++ b/continuedev/src/continuedev/steps/chat.py @@ -29,12 +29,20 @@ class SimpleChatStep(Step): self.description = "" await sdk.update_ui() - async for chunk in sdk.models.default.stream_complete(self.user_input, with_history=await sdk.get_chat_context()): + messages = await sdk.get_chat_context() + messages.append(ChatMessage( + role="user", + content=self.user_input, + summary=self.user_input + )) + + async for chunk in sdk.models.default.stream_chat(messages): if sdk.current_step_was_deleted(): return - self.description += chunk - await sdk.update_ui() + if "content" in chunk: + self.description += chunk["content"] + await sdk.update_ui() self.name = (await sdk.models.gpt35.complete( f"Write a short title for the following chat message: {self.description}")).strip() |