diff --git a/browse_command.py b/browse_command.py index b77e5f9..7be5a78 100644 --- a/browse_command.py +++ b/browse_command.py @@ -40,6 +40,11 @@ async def button_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -> subdir = data.split(":")[1] await query.edit_message_text(f"Navigating to [{subdir}] is not yet implemented.") elif data.startswith("file:"): - # Handle file selection (for future implementation) + # Handle file selection file = data.split(":")[1] - await query.edit_message_text(f"Viewing contents of {file} is not yet implemented.") \ No newline at end of file + file_path = os.path.join('prompts', file) + os.environ['SYSTEM_PROMPT_PATH'] = file_path + await query.edit_message_text(f"Selected: {file}. SYSTEM_PROMPT_PATH updated.") + + # Optionally, you may want to reload the system prompt here if needed. + # bot.system_prompt = bot.load_system_prompt() # Uncomment if you have access to the bot instance. \ No newline at end of file