Skip to content

Commit d457d16

Browse files
release 2.0.1-beta
1 parent aefa766 commit d457d16

4 files changed

Lines changed: 44 additions & 25 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
- name: Install Dependencies
2626
run: npm install
2727

28+
- name: Build Code
29+
run: npm run compile
30+
2831
- name: Install vsce
2932
run: npm install -g @vscode/vsce
3033

@@ -45,31 +48,13 @@ jobs:
4548
vsce publish -p $VSCE_PAT --packagePath ./extension.vsix
4649
fi
4750
48-
- name: Extract Release Notes
49-
id: extract_release_notes
50-
uses: anton-prakapovich/extract-release-notes-action@v1
51-
with:
52-
filename: CHANGELOG.md
53-
# 如果你的标签是 v1.0.0 但 CHANGELOG 里是 [1.0.0],去掉开头的 v
54-
version: ${{ github.ref_name }}
55-
56-
- name: Get Previous Tag
57-
id: pre_tag
58-
run: |
59-
# 增加容错,如果没有上一个 tag 则不输出
60-
prev_tag=$(git describe --abbrev=0 --tags ${{ github.ref_name }}^ 2>/dev/null || echo "")
61-
echo "prev=$prev_tag" >> $GITHUB_OUTPUT
62-
6351
- name: Create GitHub Release
6452
uses: softprops/action-gh-release@v2
6553
with:
66-
# 如果是预发布版,GitHub Release 也会标记为 Pre-release
54+
# 自动根据两个 Tag 之间的 Commit 记录生成日志,非常省心
55+
generate_release_notes: true
56+
# 如果 Tag 包含 '-',GitHub 界面会标记为 Pre-release
6757
prerelease: ${{ contains(github.ref_name, '-') }}
68-
body: |
69-
${{ steps.extract_release_notes.outputs.contents }}
70-
71-
---
72-
${{ steps.pre_tag.outputs.prev != '' && format('**Full Changelog**: https://github.com/{0}/compare/{1}...{2}', github.repository, steps.pre_tag.outputs.prev, github.ref_name) || 'Initial Release' }}
7358
files: |
7459
./extension.vsix
7560
env:

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to the "sagemath" extension will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.0.1-beta] - 2026-02-24
8+
9+
### Added
10+
11+
- Add text for Env selection button
12+
- Add Github Actions for publishing and generate release
13+
14+
### Changed
15+
16+
- Using python package [sage-lsp](https://pypi.org/project/sage-lsp/) to start LSP server, which is more stable and faster than the old method.
17+
18+
### Fixed
19+
20+
- Support SageMath 10.8 and later
21+
722
## [2.0.0] - 2025-11-13
823

924
### Added

package.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "sagemath-for-vscode",
33
"displayName": "SageMath for VScode",
44
"description": "An extension for SageMath support in VS Code. Includes highighting and run",
5-
"version": "2.0.0",
5+
"version": "2.0.1-beta",
66
"publisher": "SeanDictionary",
77
"license": "AGPL-3.0",
88
"repository": {
@@ -98,6 +98,24 @@
9898
"type": "boolean",
9999
"default": true,
100100
"markdownDescription": "Enable or disable the SageMath Language Server Protocol.\n\nIt will take effect after restarting the editor."
101+
},
102+
"sagemath-for-vscode.LSP.LSPLogLevel": {
103+
"title": "SageMath LSP Log Level",
104+
"type": "string",
105+
"enum": [
106+
"error",
107+
"warn",
108+
"info",
109+
"debug"
110+
],
111+
"enumDescriptions": [
112+
"Log only errors.",
113+
"Log warnings and errors.",
114+
"Log informational messages, warnings, and errors.",
115+
"Log debug messages, informational messages, warnings, and errors."
116+
],
117+
"default": "info",
118+
"markdownDescription": "Log level for the SageMath Language Server Protocol."
101119
}
102120
}
103121
},
@@ -133,4 +151,4 @@
133151
"dependencies": {
134152
"vscode-languageclient": "^9.0.1"
135153
}
136-
}
154+
}

src/extension.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function activate(context: vscode.ExtensionContext) {
3030

3131
const filePath = editor.document.uri.fsPath;
3232
const dirpath = dirname(filePath);
33-
const command = `cd '${dirpath}' && sage '${filePath}'`;
33+
const command = `cd '${dirpath}' && sage '${filePath}'; rm -f '${filePath}.py'`;
3434
const terminalName = !condaEnvPath ? 'SageMath' : `SageMath (${condaEnvName})`;
3535

3636
let terminal = vscode.window.terminals.find(t => t.name === terminalName);
@@ -151,10 +151,11 @@ export function activate(context: vscode.ExtensionContext) {
151151
const condaEnvPath = await getCondaEnvPath();
152152
const command = path.resolve(condaEnvPath!, './bin/python');
153153
const PATH = `${condaEnvPath}/bin:${process.env.PATH}`;
154+
const LogLevel = vscode.workspace.getConfiguration('sagemath-for-vscode.LSP').get<string>('LSPLogLevel', 'INFO');
154155
const serverOptions: ServerOptions = {
155156
run: {
156157
command: command,
157-
args: ["-m", "sagelsp"],
158+
args: ["-m", "sagelsp", "--log", LogLevel],
158159
options: { env: { ...process.env, PATH } },
159160
},
160161
debug: {

0 commit comments

Comments
 (0)