cody icon indicating copy to clipboard operation
cody copied to clipboard

Chat: update code context template formatting

Open abeatrix opened this issue 1 year ago • 0 comments

The changes in this commit improve the formatting of the code context templates used in the Cody prompt. Specifically:

  • The populateCodeContextTemplate function now uses a more concise template for the "edit" case, removing the {filePath} and {inRepo} placeholders.
  • The SELECTED_CODE_CONTEXT_TEMPLATE has been updated to include the {languageID} and {filePathToParse} placeholders, providing more context about the selected code.
  • The populateCurrentSelectedCodeContextTemplate function has been updated to leverage the new placeholders in the SELECTED_CODE_CONTEXT_TEMPLATE.

These changes aim to provide a cleaner and more informative presentation of the code context in the Cody prompt.

Test plan

Check recordings.

Changelog

abeatrix avatar Sep 24 '24 17:09 abeatrix