From 6f6a7a1ad0bccdeccbee5f90a212790823f8cc8f Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Thu, 6 Jul 2023 23:42:26 -0700
Subject: update user input step to see input for cust cmds

---
 continuedev/src/continuedev/core/policy.py          | 2 +-
 continuedev/src/continuedev/steps/chat.py           | 6 ------
 continuedev/src/continuedev/steps/custom_command.py | 4 +++-
 continuedev/src/continuedev/steps/on_traceback.py   | 8 ++++----
 4 files changed, 8 insertions(+), 12 deletions(-)

(limited to 'continuedev')

diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py
index 6ee2d03f..7a72b596 100644
--- a/continuedev/src/continuedev/core/policy.py
+++ b/continuedev/src/continuedev/core/policy.py
@@ -82,6 +82,6 @@ class DemoPolicy(Policy):
             if custom_command is not None:
                 return custom_command
 
-            return SimpleChatStep(user_input=user_input)
+            return SimpleChatStep()
 
         return None
diff --git a/continuedev/src/continuedev/steps/chat.py b/continuedev/src/continuedev/steps/chat.py
index c26f8ff9..e4fc3f72 100644
--- a/continuedev/src/continuedev/steps/chat.py
+++ b/continuedev/src/continuedev/steps/chat.py
@@ -19,17 +19,11 @@ openai.api_key = OPENAI_API_KEY
 
 
 class SimpleChatStep(Step):
-    user_input: str
     name: str = "Generating Response..."
     manage_own_chat_context: bool = True
     description: str = ""
 
     async def run(self, sdk: ContinueSDK):
-        if self.user_input.strip() == "":
-            self.user_input = "Explain this code's function is a concise list of markdown bullets."
-            self.description = ""
-        await sdk.update_ui()
-
         completion = ""
         async for chunk in sdk.models.gpt4.stream_chat(await sdk.get_chat_context()):
             if sdk.current_step_was_deleted():
diff --git a/continuedev/src/continuedev/steps/custom_command.py b/continuedev/src/continuedev/steps/custom_command.py
index 9d675091..b162679e 100644
--- a/continuedev/src/continuedev/steps/custom_command.py
+++ b/continuedev/src/continuedev/steps/custom_command.py
@@ -1,5 +1,6 @@
 from ..core.main import Step
 from ..core.sdk import ContinueSDK
+from ..steps.core.core import UserInputStep
 from ..steps.chat import ChatWithFunctions, SimpleChatStep
 
 
@@ -14,4 +15,5 @@ class CustomCommandStep(Step):
 
     async def run(self, sdk: ContinueSDK):
         prompt_user_input = f"Task: {self.prompt}. Additional info: {self.user_input}"
-        await sdk.run_step(SimpleChatStep(user_input=prompt_user_input))
+        await sdk.run_step(UserInputStep(user_input=self.user_input))
+        await sdk.run_step(SimpleChatStep())
diff --git a/continuedev/src/continuedev/steps/on_traceback.py b/continuedev/src/continuedev/steps/on_traceback.py
index 3f8c5a76..efb4c703 100644
--- a/continuedev/src/continuedev/steps/on_traceback.py
+++ b/continuedev/src/continuedev/steps/on_traceback.py
@@ -1,4 +1,6 @@
 import os
+
+from .core.core import UserInputStep
 from ..core.main import ChatMessage, Step
 from ..core.sdk import ContinueSDK
 from .chat import SimpleChatStep
@@ -21,7 +23,5 @@ class DefaultOnTracebackStep(Step):
                         content=f"The contents of {seg}:\n```\n{file_contents}\n```",
                         summary=""
                     ))
-
-        await sdk.run_step(SimpleChatStep(
-            name="Help With Traceback",
-            user_input=f"""I got the following error, can you please help explain how to fix it?\n\n{self.output}"""))
+        await sdk.run_step(UserInputStep(user_input=f"""I got the following error, can you please help explain how to fix it?\n\n{self.output}"""))
+        await sdk.run_step(SimpleChatStep(name="Help With Traceback"))
-- 
cgit v1.2.3-70-g09d2