class Jeeves::CLI
def setup_config_dir
def setup_config_dir unless Dir.exist?(CONFIG_DIR) FileUtils.mkdir_p(CONFIG_DIR) end unless File.exist?(PROMPT_FILE) # Check for bundled prompt file in the config directory config_prompt = File.join(File.dirname(__FILE__), '..', 'config', 'prompt') if File.exist?(config_prompt) puts "Copying bundled prompt file to #{PROMPT_FILE}" FileUtils.cp(config_prompt, PROMPT_FILE) puts "Prompt file installed successfully." else puts "Error: Prompt file not found at #{PROMPT_FILE}" puts "No bundled prompt file found at: #{config_prompt}" puts "Please create a prompt file with your custom prompt." exit 1 unless defined?(TESTING_MODE) && TESTING_MODE end end end