✨ shortcut to fix grammar / spelling mistakes

This commit is contained in:
Nate Sesti 2024-01-24 10:18:01 -08:00
parent 5cd0c876ef
commit 44d40db724
3 changed files with 16 additions and 1 deletions

View file

@ -152,6 +152,11 @@
"command": "continue.optimizeCode",
"category": "Continue",
"title": "Optimize this Code"
},
{
"command": "continue.fixGrammar",
"category": "Continue",
"title": "Fix Grammar / Spelling"
}
],
"keybindings": [
@ -241,6 +246,11 @@
"command": "continue.optimizeCode",
"group": "Continue",
"when": "editorHasSelection"
},
{
"command": "continue.fixGrammar",
"group": "Continue",
"when": "editorHasSelection && editorLangId == 'markdown'"
}
],
"explorer/context": [

View file

@ -90,7 +90,7 @@ if (args[2] === "--target") {
}
// Copy over native / wasm modules //
if (!ghAction() && fs.existsSync("../bin")) {
if (!ghAction() && fs.existsSync("./bin")) {
return;
}

View file

@ -172,6 +172,11 @@ const commandsMap: { [command: string]: (...args: any) => any } = {
"continue.optimizeCode": async () => {
await streamEdit("Optimize this code");
},
"continue.fixGrammar": async () => {
await streamEdit(
"If there are any grammar or spelling mistakes in this writing, fix them"
);
},
"continue.viewLogs": async () => {
// Open ~/.continue/continue.log
const logFile = path.join(os.homedir(), ".continue", "continue.log");