Skip to content

Commit

Permalink
v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
K-dizzled committed Nov 15, 2023
1 parent e74b214 commit 28b1a86
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

### 1.4.3
- Tiny patch with shuffling of the hole array.

### 1.4.2
- Now no need to add dot in the end of the tactic, when configuring a single tactic solver.
- Automatic reload settings on change in the settings file. Not all settings are reloaded automatically,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/K-dizzled/coqpilot"
},
"publisher": "JetBrains-Research",
"version": "1.4.2",
"version": "1.4.3",
"engines": {
"vscode": "^1.82.0"
},
Expand Down Expand Up @@ -153,6 +153,11 @@
"type": "boolean",
"default": true,
"markdownDescription": "Whether to use gpt as one of the used LLMs."
},
"coqpilot.shuffleHoles": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to shuffle the order of proving the holes."
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { makeAuxfname } from "./coqLspClient/utils";
import * as lspUtils from "./coqLspClient/utils";
import { ProofStep } from "./lib/pvTypes";
import * as utils from "./coqLspClient/utils";
import { shuffleArray } from "./coqLlmInteraction/utils";

export class Coqpilot implements Disposable {

Expand Down Expand Up @@ -214,6 +215,10 @@ export class Coqpilot implements Disposable {
}

async proveHoles(editor: TextEditor, holes: ProofStep[]) {
if (this.config.config.shuffleHoles) {
shuffleArray(holes);
}

for (const hole of holes) {
// Run proof generation at the start of the hole
const position = lspUtils.toVPosition(hole.range.start);
Expand Down
4 changes: 3 additions & 1 deletion src/extension/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface CoqpilotConfig {
coqLspPath: string;
useGpt: boolean;
extraCommandsList: string[];
shuffleHoles: boolean;
}

export class CoqpilotConfigWrapper {
Expand Down Expand Up @@ -68,7 +69,8 @@ export namespace CoqpilotConfig {
parseFileOnInit: wsConfig.parseFileOnInit,
coqLspPath: wsConfig.coqLspPath,
useGpt: wsConfig.useGpt,
extraCommandsList: preprocessExtraCommands(wsConfig.extraCommandsList)
extraCommandsList: preprocessExtraCommands(wsConfig.extraCommandsList),
shuffleHoles: wsConfig.shuffleHoles
};
} catch (error) {
console.error(error);
Expand Down
9 changes: 6 additions & 3 deletions src/test/mock/mockConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export function mockConfig(): CoqpilotConfig {
parseFileOnEditorChange: false,
coqLspPath: "coq-lsp",
useGpt: false,
extraCommandsList: []
extraCommandsList: [],
shuffleHoles: false
};
}

Expand All @@ -28,7 +29,8 @@ export function mockConfigRealGpt(apikey: string): CoqpilotConfig {
parseFileOnEditorChange: false,
coqLspPath: "coq-lsp",
useGpt: true,
extraCommandsList: []
extraCommandsList: [],
shuffleHoles: false
};
}

Expand All @@ -44,6 +46,7 @@ export function simpleSolverMockConfig(tactics: string[]): CoqpilotConfig {
parseFileOnEditorChange: false,
coqLspPath: "coq-lsp",
useGpt: false,
extraCommandsList: tactics
extraCommandsList: tactics,
shuffleHoles: false
};
}

0 comments on commit 28b1a86

Please sign in to comment.