✨ option to recap /edit changes
This commit is contained in:
parent
c5b8341c91
commit
97e54cf8e4
3 changed files with 43 additions and 0 deletions
|
|
@ -552,6 +552,25 @@ const EditSlashCommand: SlashCommand = {
|
|||
}
|
||||
|
||||
await sendDiffUpdate(lines, true);
|
||||
|
||||
if (params?.recap) {
|
||||
const prompt = `This is the code before editing:
|
||||
\`\`\`
|
||||
${contents}
|
||||
\`\`\`
|
||||
|
||||
This is the code after editing:
|
||||
|
||||
\`\`\`
|
||||
${lines.join("\n")}
|
||||
\`\`\`
|
||||
|
||||
Please briefly explain the changes made to the code above. Give no more than 2-3 sentences, and use markdown bullet points:`;
|
||||
|
||||
for await (const update of llm.streamComplete(prompt)) {
|
||||
yield update;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -780,6 +780,27 @@
|
|||
},
|
||||
"required": ["params"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"enum": ["edit"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"params": {
|
||||
"properties": {
|
||||
"recap": {
|
||||
"type": "boolean",
|
||||
"description": "If recap is set to `true`, Continue will generate a summary of the changes after making the edit."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"required": ["name", "description"]
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ class VsCodeIde implements IDE {
|
|||
const configPath = getConfigJsonPath();
|
||||
let contents = fs.readFileSync(configPath, "utf8");
|
||||
let config = JSON.parse(contents) as SerializedContinueConfig;
|
||||
if (config.allowAnonymousTelemetry === undefined) {
|
||||
config.allowAnonymousTelemetry = true;
|
||||
}
|
||||
config.allowAnonymousTelemetry =
|
||||
config.allowAnonymousTelemetry &&
|
||||
vscode.workspace.getConfiguration("continue").get("telemetryEnabled");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue