mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
cleanup
This commit is contained in:
parent
c3f48317c0
commit
d549d5ecab
1 changed files with 6 additions and 9 deletions
15
aider/gui.py
15
aider/gui.py
|
@ -235,21 +235,18 @@ class GUI:
|
|||
self.do_messages_container()
|
||||
|
||||
self.prompt = st.chat_input("Say something", on_submit=self.clear_controls)
|
||||
self.chat()
|
||||
|
||||
def chat(self):
|
||||
if self.prompt:
|
||||
self.chat(self.prompt)
|
||||
return
|
||||
|
||||
if self.old_prompt:
|
||||
prompt = self.old_prompt
|
||||
st.session_state.recent_msgs_num += 1
|
||||
self.reset_recent_msgs()
|
||||
elif self.prompt:
|
||||
prompt = self.prompt
|
||||
else:
|
||||
prompt = None
|
||||
|
||||
if not prompt:
|
||||
return
|
||||
self.chat(prompt)
|
||||
|
||||
def chat(self, prompt):
|
||||
self.clear_controls()
|
||||
|
||||
st.session_state.messages.append({"role": "user", "content": prompt})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue