Skip to content

Conversation

@petobens
Copy link
Contributor

@petobens petobens commented Apr 6, 2025

This addresses my second comment #959 (comment) by adding a blank line between the system role content and the user role heading.

spacer

@olimorris
Copy link
Owner

I notice that this causes a blank line to be inserted if there's only a user role in a chat buffer. If we can add a check for that this will be good to merge.

@petobens
Copy link
Contributor Author

Hi! Sorry for the late reply. Added a guard for your request (assuming I understood correctly)

@petobens
Copy link
Contributor Author

@olimorris I used a simple user role only prompt like the following to test this out:

['Test'] = {
            strategy = 'chat',
            description = 'Act as an test developer.',
            opts = {
                short_name = 'test_role',
                is_slash_cmd = true,
                auto_submit = false,
                ignore_system_prompt = true,
            },
            prompts = {
                {
                    role = 'user',
                    content = [[Foo]],
                },
            },
        }

@petobens
Copy link
Contributor Author

Hi @olimorris. Sorry for the ping ,but do you want me to make further changes to this PR?

@olimorris
Copy link
Owner

Hey thanks for this. I'm fully tied up with another PR so will try and take a look in the week. There were a few additional scenarios I wanted to test.

@petobens
Copy link
Contributor Author

Makes sense. Thanks for the reply

@olimorris olimorris merged commit ddda7e8 into olimorris:main Apr 30, 2025
5 checks passed
@olimorris
Copy link
Owner

Thanks for this @petobens! Fixes a stupid UI annoyance really nicely.

@petobens
Copy link
Contributor Author

Thanks for an awesome plugin and kudos on the function tools work :)

cleong14 pushed a commit to cleong14/codecompanion.nvim that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants