Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(chat): Remove parenthesis wrapping of other files when calling selectedCodePromptWithExtraFiles #7022

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ichim-david
Copy link
Collaborator

@ichim-david ichim-david commented Feb 8, 2025

refactor(chat): Remove file mention duplication for default commands.
Based on the comments:
#6910 (review)
#6910 (comment)

I'm opening this pull request in order to get rid of the extra setup parentheses between the primary mention and the other mentions.
For extra context on reason see this comment #6910 (comment)

I am also removing the duplication of context mention from the default commands because these commands have been duplicated as default prompts and they do not duplicate the context mention leaving just the context mention with the file range.

Test plan

  1. Run default commands such as explain code and notice the lack of context mention duplication
  2. Run a prompt that uses a cody-context such as cody://current-tabs and notice that the tabs following the first tab are no longer wrapped with parenthesis

@ichim-david
Copy link
Collaborator Author

@vovakulikov I'm going to need some help with the tests that fail because the polly recordings will need to be updated.
Can you please handle this as part of the code review?

ichim-david and others added 3 commits February 12, 2025 18:53
This aligns the output of these commands with the output we get from the default prompts.
…ng `selectedCodePromptWithExtraFiles`

- The addition of parenthesis was confusing because this was called in prompt hydration such as cody://current-tabs
  and the tab replacement showed the tabs as such @tab1 (@tab2 @Tab3) instead of simply @tab1 @tab2 @Tab3
@dominiccooney dominiccooney force-pushed the ichimdav/commands_like_prompts branch from 7de6d67 to 7401a14 Compare February 12, 2025 09:56
Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure about this. What we probably need is a better prompt which asks to explain/document/etc. the and then mentions the rest of the file as context later in the request.

Copy link
Contributor

@dominiccooney dominiccooney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More feedback inline.

I think you should not drop those extra context items from smell and explain.

…uested in review

- Now they also show up in the prompt, no longer  being added as context
  without showing up as duplicate context chip
- Simplified `selectedCodePromptWithExtraFiles` return as instructed by
  @dominiccooney
@ichim-david ichim-david enabled auto-merge (squash) February 27, 2025 19:21
@ichim-david
Copy link
Collaborator Author

@dominiccooney I've addressed your suggestions in a48d316
I will need help again with the updating of the agent recordings.

I really hope that as @kalanchan is prioritizing the changelog generator, a similar effort can be put into giving someone like myself a script or a bot command that I can run to update without needing extra permissions or software in order to avoid having to ask another dev todo this for me.

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