-
Notifications
You must be signed in to change notification settings - Fork 240
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
update custom recipes: support premade, save user recipes to file #279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -136,7 +136,7 @@ export class MyPrompt implements Recipe { | |||
if (commandOutput) { | |||
contextMessages.push(...MyPrompt.getTerminalOutputContext(commandOutput)) | |||
} | |||
return contextMessages.slice(-12) | |||
return contextMessages.slice(-15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can extract as a constant. Also why slice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that's a good idea! I do have some questions regarding the number so will do that in a follow up.
Also why slice?
This is to return the last n context messages if more than n context messages are generated for the prompts & The context messages that are more important are added toward the end for Cody to read.
Summary
Changes included:
Non Custom Recipes related changes
Custom Recipes related changes
custom premade
andstarter
for prompt testing purposes.vscode
directory in user's home directory instead of global storagefilePath
anddirectoryPath
Test Plan
Non Custom Recipes related changes
ok?
to check if Cody is replying to the language prompt or notCustom Recipes related changes
This feature is only available to users connected to S2 instance.
+
button in the Recipes tab and see if you can create a new recipe that is saved to the .vscode/cody.json for user recipes. You should see a step that allows you to select the context needed for the recipeTo test custom premade:
This feature is only available to users connected to S2 instance.
Once you have saved the file, ask Cody a question. You should expect Cody to reply as Rick from Rick and Morty.