From aeb9acd97c9012c9c5685013e485801771d1001d Mon Sep 17 00:00:00 2001 From: cyclop-bot <178948048+cyclop-bot@users.noreply.github.com> Date: Tue, 3 Jun 2025 14:06:59 -0500 Subject: [PATCH] Ensure browse_command updates bot.system_prompt_path when prompt file is selected --- browse_command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browse_command.py b/browse_command.py index b263146..2122b17 100644 --- a/browse_command.py +++ b/browse_command.py @@ -62,5 +62,7 @@ async def button_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -> # Handle file selection file_path = data.split(":")[1] os.environ['SYSTEM_PROMPT_PATH'] = file_path + if hasattr(browse_command_bot, 'system_prompt_path'): + browse_command_bot.system_prompt_path = file_path browse_command_bot.system_prompt = browse_command_bot.load_system_prompt() - await query.edit_message_text(f"Selected: {file_path}. System prompt updated.") \ No newline at end of file + await query.edit_message_text(f"Selected: {file_path}. System prompt updated.")