Spaces:
Running
Running
Auto-clear conversation when system prompt changes
Browse filesCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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)
|