From ba4d613cbc7dd261d400dab61931df089d92ba6b Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sun, 20 Apr 2025 11:32:42 -0700 Subject: [PATCH] feat: Give udiff-simple its own prompts, inheriting from udiff prompts --- aider/coders/udiff_simple.py | 6 ++---- aider/coders/udiff_simple_prompts.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/aider/coders/udiff_simple.py b/aider/coders/udiff_simple.py index 290178ed4..9cc51991d 100644 --- a/aider/coders/udiff_simple.py +++ b/aider/coders/udiff_simple.py @@ -1,4 +1,5 @@ from .udiff_coder import UnifiedDiffCoder +from .udiff_simple_prompts import UnifiedDiffSimplePrompts class UnifiedDiffSimpleCoder(UnifiedDiffCoder): @@ -10,7 +11,4 @@ class UnifiedDiffSimpleCoder(UnifiedDiffCoder): edit_format = "udiff-simple" - # We can inherit the prompts if they are suitable or override them here - # For now, let's assume the base UnifiedDiffPrompts are sufficient - # If specific prompts are needed for the "simple" version, they would be defined here. - # gpt_prompts = UnifiedDiffSimplePrompts() + gpt_prompts = UnifiedDiffSimplePrompts() diff --git a/aider/coders/udiff_simple_prompts.py b/aider/coders/udiff_simple_prompts.py index e69de29bb..b604f78dc 100644 --- a/aider/coders/udiff_simple_prompts.py +++ b/aider/coders/udiff_simple_prompts.py @@ -0,0 +1,16 @@ +from .udiff_prompts import UnifiedDiffPrompts + + +class UnifiedDiffSimplePrompts(UnifiedDiffPrompts): + """ + Prompts for the UnifiedDiffSimpleCoder. + Inherits from UnifiedDiffPrompts and can override specific prompts + if a simpler wording is desired for this edit format. + """ + + # For now, we inherit all prompts. Override specific ones below if needed. + # For example, to override the main_system prompt: + # main_system = """ + # A simpler version of the main system prompt for udiff-simple. + # """ + pass