Skip to content

Commit c7a8215

Browse files
committed
去除删除session操作
1 parent 6e02b3d commit c7a8215

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/commands/session.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ export async function getSessionList(): Promise<ISession[]> {
3333
}
3434

3535
export async function manageSessions(): Promise<void> {
36-
const choice: IQuickItemEx<ISession | string> | undefined = await vscode.window.showQuickPick(parseSessionsToPicks(true /* includeOperation */));
37-
if (!choice || choice.description === "Active") {
38-
return;
39-
}
40-
if (choice.value === ":createSession") {
41-
await createSession();
42-
return;
43-
}
44-
if (choice.value === ":deleteSession") {
45-
await deleteSession();
46-
return;
47-
}
48-
try {
49-
await leetCodeExecutor.enableSession((choice.value as ISession).id);
50-
vscode.window.showInformationMessage(`Successfully switched to session '${choice.label}'.`);
51-
await vscode.commands.executeCommand("leetcode.refreshExplorer");
52-
} catch (error) {
53-
await promptForOpenOutputChannel("Failed to switch session. Please open the output channel for details.", DialogType.error);
54-
}
36+
// const choice: IQuickItemEx<ISession | string> | undefined = await vscode.window.showQuickPick(parseSessionsToPicks(true /* includeOperation */));
37+
// if (!choice || choice.description === "Active") {
38+
// return;
39+
// }
40+
// if (choice.value === ":createSession") {
41+
// await createSession();
42+
// return;
43+
// }
44+
// if (choice.value === ":deleteSession") {
45+
// await deleteSession();
46+
// return;
47+
// }
48+
// try {
49+
// await leetCodeExecutor.enableSession((choice.value as ISession).id);
50+
// vscode.window.showInformationMessage(`Successfully switched to session '${choice.label}'.`);
51+
// await vscode.commands.executeCommand("leetcode.refreshExplorer");
52+
// } catch (error) {
53+
// await promptForOpenOutputChannel("Failed to switch session. Please open the output channel for details.", DialogType.error);
54+
// }
5555
}
5656

5757
async function parseSessionsToPicks(includeOperations: boolean = false): Promise<Array<IQuickItemEx<ISession | string>>> {

src/statusbar/LeetCodeStatusBarItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class LeetCodeStatusBarItem implements vscode.Disposable {
1616
switch (status) {
1717
case UserStatus.SignedIn:
1818
if (UserContestInfo && UserContestInfo.attendedContestsCount > 0) {
19-
this.statusBarItem.text = `用户: ${user}, 积分: ${UserContestInfo.rating}, 名次: ${UserContestInfo.localRanking} / ${UserContestInfo.localTotalParticipants} (${UserContestInfo.topPercentage}%), 全部名次: ${UserContestInfo.globalRanking} / ${UserContestInfo.globalTotalParticipants}`;
19+
this.statusBarItem.text = `用户: ${user}, 积分: ${Math.floor(UserContestInfo.rating)}, 名次: ${UserContestInfo.localRanking} / ${UserContestInfo.localTotalParticipants} (${UserContestInfo.topPercentage}%), 全部名次: ${UserContestInfo.globalRanking} / ${UserContestInfo.globalTotalParticipants}`;
2020
} else {
2121
this.statusBarItem.text = `user: ${user}`;
2222
}

0 commit comments

Comments
 (0)