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.
This commit is contained in:
Paul Gauthier 2023-05-29 11:46:57 -07:00
parent 4a4d0efe89
commit 507442da3f

View file

@ -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