jostlebot Claude Opus 4.5 commited on
Commit
77cb52d
·
1 Parent(s): eedbb82

Auto-clear conversation when system prompt changes

Browse files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -981,6 +981,9 @@ with gr.Blocks(title="PromptWork", theme=gr.themes.Soft()) as app:
981
 
982
  clear_btn.click(clear_chat, [], [chatbot])
983
 
 
 
 
984
  # Session log events
985
  def update_session_dropdown(sessions):
986
  choices = get_session_choices(sessions)
 
981
 
982
  clear_btn.click(clear_chat, [], [chatbot])
983
 
984
+ # Auto-clear conversation when system prompt changes
985
+ prompt_input.change(clear_chat, [], [chatbot])
986
+
987
  # Session log events
988
  def update_session_dropdown(sessions):
989
  choices = get_session_choices(sessions)