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 | 4871ff4f6e579570613887b2570ae6dd86d83684 (patch) | |
| tree | cbb32365acc4937a80898654801f383124758944 /continuedev/src | |
| parent | db854dd80282391a7f826eac3aa68b9237024115 (diff) | |
| download | sncontinue-4871ff4f6e579570613887b2570ae6dd86d83684.tar.gz sncontinue-4871ff4f6e579570613887b2570ae6dd86d83684.tar.bz2 sncontinue-4871ff4f6e579570613887b2570ae6dd86d83684.zip | |
older @types/vscode version to match older engine
Diffstat (limited to 'continuedev/src')
| -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() | 
