Merge pull request #84 from covespace/pip_upgrade

Update package version and improve installation process
This commit is contained in:
boob.yang 2023-05-18 22:29:27 +08:00 committed by GitHub
commit b8d9029a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -2,7 +2,7 @@
"name": "devchat", "name": "devchat",
"displayName": "DevChat", "displayName": "DevChat",
"description": "Write prompts, not code", "description": "Write prompts, not code",
"version": "0.0.34", "version": "0.0.38",
"icon": "assets/devchat.png", "icon": "assets/devchat.png",
"publisher": "merico", "publisher": "merico",
"engines": { "engines": {

View File

@ -65,7 +65,7 @@ function checkDependencyPackage() {
if (selectedAction === installAction) { if (selectedAction === installAction) {
// Install devchat using pip3 install devchat // Install devchat using pip3 install devchat
const terminal = vscode.window.createTerminal("DevChat Install"); const terminal = vscode.window.createTerminal("DevChat Install");
terminal.sendText("pip3 install devchat"); terminal.sendText("pip3 install --upgrade devchat");
terminal.show(); terminal.show();
} }
}); });

View File

@ -64,7 +64,12 @@ function activate(context: vscode.ExtensionContext) {
// 2. dependence is invalid // 2. dependence is invalid
// 3. ready // 3. ready
if (devchatStatus === '' || devchatStatus === 'waitting install devchat') { if (devchatStatus === '' || devchatStatus === 'waitting install devchat') {
const bOk = checkDevChatDependency(); let bOk = true;
let devChat : string|undefined = vscode.workspace.getConfiguration('DevChat').get('DevChatPath');
if (!devChat) {
bOk = false;
}
if (bOk) { if (bOk) {
devchatStatus = 'ready'; devchatStatus = 'ready';
} else { } else {
@ -76,7 +81,7 @@ function activate(context: vscode.ExtensionContext) {
if (devchatStatus === 'not ready') { if (devchatStatus === 'not ready') {
// auto install devchat // auto install devchat
const terminal = vscode.window.createTerminal("DevChat Install"); const terminal = vscode.window.createTerminal("DevChat Install");
terminal.sendText("pip3 install devchat"); terminal.sendText("pip3 install --upgrade devchat");
terminal.show(); terminal.show();
devchatStatus = 'waitting install devchat'; devchatStatus = 'waitting install devchat';
} }