Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteef7106

Browse files
committed
change progress location from window to notification
1 parentac20b6c commiteef7106

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

‎package-lock.json

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

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"publisher":"shengchen",
88
"icon":"resources/LeetCode.png",
99
"engines": {
10-
"vscode":"^1.20.0"
10+
"vscode":"^1.23.0"
1111
},
1212
"repository": {
1313
"type":"git",

‎src/commands/show.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as vscode from "vscode";
55
import{LeetCodeNode}from"../leetCodeExplorer";
66
import{leetCodeManager}from"../leetCodeManager";
77
import{IQuickItemEx,languages,leetCodeBinaryPath,ProblemState}from"../shared";
8-
import{executeCommand}from"../utils/cpUtils";
8+
import{executeCommandWithProgress}from"../utils/cpUtils";
99
import{DialogOptions,DialogType,promptForOpenOutputChannel,promptForSignIn}from"../utils/uiUtils";
1010
import{selectWorkspaceFolder}from"../utils/workspaceUtils";
1111
import*aswslfrom"../utils/wslUtils";
@@ -50,7 +50,7 @@ async function showProblemInternal(id: string): Promise<void> {
5050

5151
constoutdir:string=awaitselectWorkspaceFolder();
5252
awaitfse.ensureDir(outdir);
53-
constresult:string=awaitexecuteCommand("node",[leetCodeBinaryPath,"show",id,"-gx","-l",language,"-o",`"${outdir}"`]);
53+
constresult:string=awaitexecuteCommandWithProgress("Fetching problem data...","node",[leetCodeBinaryPath,"show",id,"-gx","-l",language,"-o",`"${outdir}"`]);
5454
constreg:RegExp=/\*SourceCode:\s*(.*)/;
5555
constmatch:RegExpMatchArray|null=result.match(reg);
5656
if(match&&match.length>=2){

‎src/utils/cpUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function executeCommand(command: string, args: string[], options: c
3434

3535
exportasyncfunctionexecuteCommandWithProgress(message:string,command:string,args:string[],options:cp.SpawnOptions={shell:true}):Promise<string>{
3636
letresult:string="";
37-
awaitvscode.window.withProgress({location:vscode.ProgressLocation.Window},async(p:vscode.Progress<{}>)=>{
37+
awaitvscode.window.withProgress({location:vscode.ProgressLocation.Notification},async(p:vscode.Progress<{}>)=>{
3838
returnnewPromise(async(resolve:()=>void,reject:(e:Error)=>void):Promise<void>=>{
3939
p.report({ message});
4040
try{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp