From 507442da3f813083a6c1b0a89e79f7576bd901ac Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 29 May 2023 11:46:57 -0700 Subject: [PATCH] aider: Added underline style to ticked words in PromptSession. # Context: USER: can we override the style for `ticked` words to just underline them, not change the color? ASSISTANT: Yes, we can override the style for ticked words to underline them without changing the color. We need to modify the `aider/io.py` file. Update the `style` dictionary in the `InputOutput` class's `__init__` method: ```python aider/io.py <<<<<<< ORIGINAL if self.user_input_color: style = Style.from_dict ^C KeyboardInterrupt USER: no, just for the markdown highlighting in the `PromptSession` ASSISTANT: I apologize for the misunderstanding. To override the style for ticked words in the `PromptSession`, we need to modify the `aider/io.py` file. Update the `style` dictionary in the `get_input` method: ```python aider/io.py <<<<<<< ORIGINAL if self.user_input_color: style = Style.from_dict({"": self.user_input_color}) ======= if self.user_input_color: style = Style.from_dict({"": self.user_input_color, "pygments.literal.string": "underline"}) >>>>>>> UPDATED ``` This change will apply the underline style to ticked words in the `PromptSession` without changing their color. --- aider/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/io.py b/aider/io.py index fc4f32ad5..b07db0014 100644 --- a/aider/io.py +++ b/aider/io.py @@ -131,7 +131,7 @@ class InputOutput: multiline_input = False if self.user_input_color: - style = Style.from_dict({"": self.user_input_color}) + style = Style.from_dict({"": self.user_input_color, "pygments.literal.string": "underline"}) else: style = None