From 97a05896a3d3d4c7fb53216bb82e5d4afb26d27c Mon Sep 17 00:00:00 2001 From: Glenn Date: Thu, 4 Jan 2024 23:03:21 +0100 Subject: [PATCH] feat: add defaults (template & config) as files --- static/default_config.yml | 24 ++++++++++++++++++++++++ static/default_template.j2 | 16 ++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 static/default_config.yml create mode 100644 static/default_template.j2 diff --git a/static/default_config.yml b/static/default_config.yml new file mode 100644 index 0000000..82822ee --- /dev/null +++ b/static/default_config.yml @@ -0,0 +1,24 @@ +--- +# Example configuration for Code-Preloader + +# List of repository paths to preload +# source_list: +# - "path/to/repo1" +# - "path/to/repo2" + +# List of patterns to ignore during preloading +ignore_list: + - ^\.git/.* + +# Path to the output file (if null, output to STDOUT) +output_path: null + +prompt: + # Optional: Path to a file containing the prompt header + header_path: null + + # Optional: Path to a file containing the prompt footer + footer_path: null + + # Optional: Path to a file container a jinja template to structure the prompt + template_path: null diff --git a/static/default_template.j2 b/static/default_template.j2 new file mode 100644 index 0000000..4268cd6 --- /dev/null +++ b/static/default_template.j2 @@ -0,0 +1,16 @@ +{%- if prompt_header -%} +@@ CONTEXT + +{{ prompt_header }} +{%- endif -%} +{%- for file in prompt_files -%} +@@ FILE "{{ file.path }}" WITH MIME-TYPE "{{ file.mime_type }}" + +{{- file.content -}} + +{%- endfor -%} +{%- if prompt_footer -%} +@@ REQUEST + +{{ prompt_footer }} +{%- endif -%}