Skip to content

Commit d09d094

Browse files
authored
Release v2.2.6+0.1.8+8.19
Merge pull request #38 from JetBrains-Research/v2.3.0-dev
2 parents 8e5738c + 4688d6d commit d09d094

26 files changed

+348
-136
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## 2.2.6
4+
5+
### Public changes
6+
7+
- Allow manually modifying the location of the `coq-lsp` executable in the settings. This is useful when the `coq-lsp` executable is not in the PATH. Alongside, correctly handle the case when the `coq-lsp` executable is not found.
8+
- Improve proof extraction from the LLM services for proofs, containing `Proof using X Y Z.` and similar constructs. Improve the handling of the obfuscatedly generated proofs by small language models, such as `LLaMA` through `LMStudio`.
9+
- Add a hotkey for solving admits inside selection: `ctrl+shift+[BracketRight]` on Windows and Linux, `shift+cmd+[BracketRight]` on MacOS.
10+
11+
### Internal changes
12+
- Update private headers, sent to JetBrains-AI services, to identify the client as CoqPilot.
13+
314
## 2.2.5
415

516
- Contribute the new benchmarking report for 300 theorems.

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- 🔍 [Brief Technical Overview](#brief-technical-overview)
1212
- 💡 [Example Usage](#example-usage)
1313
- 🛠 [Installation](#installation)
14-
- ▶️ [Coq-lsp Installation](#coq-lsp-installation)
14+
- ▶️ [Coq-LSP Installation](#coq-lsp-installation)
1515
- 🤖 [Building Locally](#building-locally)
1616
- ⚠️ [Important Information](#important)
1717
- ⚙️ [Extension Settings](#extension-settings)
@@ -62,16 +62,18 @@ As soon as at least one valid proof is found, it is substituted in the editor an
6262

6363
## Installation
6464

65-
### Coq-lsp installation
65+
### Coq-LSP installation
6666

67-
To make the extension running you will have to install `coq-lsp` server. You can install it using opam:
67+
To run the extension, you must install a `coq-lsp` server. Depending on the system used in your project, you should install it using `opam` or `nix`. A well-configured `nix` project should have the `coq-lsp` server installed as a dependency. To install `coq-lsp` using `opam`, you can use the following commands:
6868
```bash
6969
opam pin add coq-lsp 0.1.8+8.19.0
7070
opam install coq-lsp
7171
```
7272
For more information on how to install `coq-lsp` please refer to [coq-lsp](https://github.com/ejgallego/coq-lsp).
7373

74-
With coq-lsp, extension should have everything it needs to run.
74+
Either way around, if the [coq-lsp](https://github.com/ejgallego/coq-lsp) extension works well and you can see the goals and theorems in the VSCode, then `CoqPilot` should work as well. However, using [coq-lsp](https://github.com/ejgallego/coq-lsp) as a plugin for Coq support is not mandatory for `CoqPilot` to work.
75+
76+
If your installation of `coq-lsp` is not in the default path, you can specify the path to the `coq-lsp` server in the settings using the `coqpilot.coqLspServerPath` setting. Default value should work well for most of the cases.
7577

7678
### Building locally
7779

@@ -93,7 +95,7 @@ npm install
9395
npm run compile
9496
```
9597

96-
To run the extension from the vscode, you can press `F5` or click on `Run extension` in the `Run and Debug` section. It will open a new window with the extension running.
98+
To run the extension from the VSCode, you can press `F5` or click on `Run extension` in the `Run and Debug` section. It will open a new window with the extension running.
9799

98100
To run all tests properly (i.e. with rebuilding the resources and the code first), execute the following task:
99101
```bash
@@ -111,20 +113,21 @@ The extension's architecture overview is stored in the [ARCHITECTURE.md](https:/
111113
CoqPilot generates aux files with `_cp_aux.v` suffix. Sometimes when generation fails with exception, it is possible that such file will not be deleted. When a project is open, extension shall show a window that asks if you want to add such files to the local project gitignore.
112114

113115
Moreover, this repository contains a script for your convenience that adds the format of such files to the global gitignore file on your system.
114-
- Copy the [`set_gitignore.sh`](https://github.com/K-dizzled/coqpilot/blob/main/set_gitignore.sh) file to your computer. Then:
116+
- Copy the [`set_gitignore.sh`](https://github.com/JetBrains-Research/coqpilot/blob/main/set_gitignore.sh) file to your computer. Then:
115117
```bash
116118
chmod +x set_gitignore.sh
117119
./set_gitignore.sh
118120
```
119121
It will add the format of CoqPilot aux files to your global gitignore file on the system, so that even if CoqPilot forgets to clean files up, they will not be marked as new files in git.
120-
Comment: Such files are not visible in the vscode explorer, because plugin adds them to the `files.exclude` setting on startup.
122+
Comment: Such files are not visible in the VSCode explorer, because plugin adds them to the `files.exclude` setting on startup.
121123

122124
## Extension Settings
123125

124126
This extension contributes the following settings:
125127

126128
* `coqpilot.contextTheoremsRankerType` : The type of theorems ranker that will be used to select theorems for proof generation (when context is smaller than taking all of them). Either randomly, by Jacard index (similarity metric) or by distance from the theorem, with the currently observed admit.
127129
* `coqpilot.loggingVerbosity` : Verbosity of the logs. Could be `info`, `debug`.
130+
* `coqpilot.coqLspServerPath` : Path to the coq-lsp server. By default, it is set to `coq-lsp`.
128131

129132
* `coqpilot.predefinedProofsModelsParameters`, `coqpilot.openAiModelsParameters`, `coqpilot.grazieModelsParameters` and `coqpilot.lmStudioModelsParameters`:
130133

@@ -227,11 +230,11 @@ First things first, the process of running the benchmark is not perfectly automa
227230
cachix use weakmemory
228231
```
229232

230-
3. Go to the `imm` subdirectory, apply the nix environment (without it the project will NOT build) and build the project:
233+
3. Go to the `imm` subdirectory, apply the nix environment (without it the project will **NOT** build) and build the project:
231234
```bash
232235
cd dataset/imm
233-
nix-build
234236
nix-shell
237+
make
235238
```
236239
4. Make sure the `_CoqProject` was successfully generated in the root of your project. Return to the project root not exiting the nix-shell. Run the benchmark:
237240
```bash

package-lock.json

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "coqpilot",
3-
"displayName": "Сoqpilot",
3+
"displayName": "СoqPilot",
44
"description": "An ai based completion extension for Coq interactive prover.",
55
"icon": "etc/img/logo.ico",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/K-dizzled/coqpilot"
8+
"url": "https://github.com/JetBrains-Research/coqpilot"
99
},
1010
"publisher": "JetBrains-Research",
11-
"version": "2.2.5",
11+
"version": "2.2.6",
1212
"engines": {
1313
"vscode": "^1.82.0"
1414
},
@@ -37,15 +37,22 @@
3737
"commands": [
3838
{
3939
"command": "coqpilot.perform_completion_under_cursor",
40-
"title": "Coqpilot: Try to generate proof for the goal under the cursor"
40+
"title": "CoqPilot: Try to generate proof for the goal under the cursor"
4141
},
4242
{
4343
"command": "coqpilot.perform_completion_for_all_admits",
44-
"title": "Coqpilot: Try to prove all holes (admitted goals) in the current file"
44+
"title": "CoqPilot: Try to prove all holes (admitted goals) in the current file"
4545
},
4646
{
4747
"command": "coqpilot.perform_completion_in_selection",
48-
"title": "Coqpilot: Try to prove holes (admitted goals) in the selection"
48+
"title": "CoqPilot: Try to prove holes (admitted goals) in the selection"
49+
}
50+
],
51+
"keybindings": [
52+
{
53+
"command": "coqpilot.perform_completion_in_selection",
54+
"key": "ctrl+shift+[BracketRight]",
55+
"mac": "shift+cmd+[BracketRight]"
4956
}
5057
],
5158
"menus": {
@@ -107,7 +114,7 @@
107114
},
108115
"modelName": {
109116
"type": "string",
110-
"markdownDescription": "Model to use from the OpenAI platform. List of models known to Coqpilot: \n * gpt-4o \n * gpt-4o-2024-05-13 \n * gpt-4-turbo \n * gpt-4-turbo-2024-04-09 \n * gpt-4-turbo-preview \n * gpt-4-0125-preview \n * gpt-4-1106-preview \n * gpt-4-vision-preview \n * gpt-4-1106-vision-preview \n * gpt-4 \n * gpt-4-0314 \n * gpt-4-0613 \n * gpt-4-32k \n * gpt-4-32k-0314 \n * gpt-4-32k-0613 \n * gpt-3.5-turbo-0125 \n * gpt-3.5-turbo \n * gpt-3.5-turbo-1106 \n * gpt-3.5-turbo-instruct \n * gpt-3.5-turbo-16k \n * gpt-3.5-turbo-16k-0613 \n * gpt-3.5-turbo-0613 \n * gpt-3.5-turbo-0301",
117+
"markdownDescription": "Model to use from the OpenAI platform. List of models known to CoqPilot: \n * gpt-4o \n * gpt-4o-2024-05-13 \n * gpt-4-turbo \n * gpt-4-turbo-2024-04-09 \n * gpt-4-turbo-preview \n * gpt-4-0125-preview \n * gpt-4-1106-preview \n * gpt-4-vision-preview \n * gpt-4-1106-vision-preview \n * gpt-4 \n * gpt-4-0314 \n * gpt-4-0613 \n * gpt-4-32k \n * gpt-4-32k-0314 \n * gpt-4-32k-0613 \n * gpt-3.5-turbo-0125 \n * gpt-3.5-turbo \n * gpt-3.5-turbo-1106 \n * gpt-3.5-turbo-instruct \n * gpt-3.5-turbo-16k \n * gpt-3.5-turbo-16k-0613 \n * gpt-3.5-turbo-0613 \n * gpt-3.5-turbo-0301",
111118
"default": "gpt-3.5-turbo-0301"
112119
},
113120
"temperature": {
@@ -132,12 +139,12 @@
132139
},
133140
"maxTokensToGenerate": {
134141
"type": "number",
135-
"description": "Number of tokens that the model is allowed to generate as a response message (i.e. message with proof). For known models, Coqpilot provides a recommended default value, but it can be customized for more advanced proof generation. The default value is the maximum allowed value for the model if it takes no more than half of `tokensLimit`, otherwise the minimum of half of `tokensLimit` and 4096.",
142+
"description": "Number of tokens that the model is allowed to generate as a response message (i.e. message with proof). For known models, CoqPilot provides a recommended default value, but it can be customized for more advanced proof generation. The default value is the maximum allowed value for the model if it takes no more than half of `tokensLimit`, otherwise the minimum of half of `tokensLimit` and 4096.",
136143
"default": 2048
137144
},
138145
"tokensLimit": {
139146
"type": "number",
140-
"description": "Total length of input and generated tokens, it is determined by the model. For known models, Coqpilot provides a recommended default value (the maximum model context length), but it can be customized for more advanced proof generation.",
147+
"description": "Total length of input and generated tokens, it is determined by the model. For known models, CoqPilot provides a recommended default value (the maximum model context length), but it can be customized for more advanced proof generation.",
141148
"default": 4096
142149
},
143150
"multiroundProfile": {
@@ -358,6 +365,12 @@
358365
"description": "The verbosity of the logs.",
359366
"default": "info",
360367
"order": 5
368+
},
369+
"coqpilot.coqLspServerPath": {
370+
"type": "string",
371+
"description": "Path to the Coq LSP server. If not specified, CoqPilot will try to find the server automatically at the default location: coq-lsp at PATH.",
372+
"default": "coq-lsp",
373+
"order": 6
361374
}
362375
}
363376
}

0 commit comments

Comments
 (0)