Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "atc-helper",
"displayName": "AtCoder Helper neo",
"version": "1.1.0",
"version": "1.1.2",
"description": "AtCoder 助手",
"publisher": "Hoshino",
"icon": "img.png",
Expand Down
3 changes: 2 additions & 1 deletion apps/vscode-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,14 @@ export async function handleFetchSubHistory(contest: string, send: (payload: Rec

async function pullSubmitStatu(contest: string, taskName: string, send: (payload: Record<string, unknown>) => void,): Promise<void> {
const maxSetp = 15;
const judgeStatus = new Set(["AC", "WA", "TLE", "MLE", "RE", "CE", "OLE"]);
for (let i = 1; i <= maxSetp; i++) {
await sleep(2000);
try {
const statusMap = await fetchSubStatus(contest);
send({ type: "statusUpdate", statuses: Object.fromEntries(statusMap) });
const status = statusMap.get(taskName);
if (status && status !== "WJ") {
if (status && judgeStatus.has(status)) {
send({ type: "update", text: `评测结果: ${status}` });
return;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/webview/src/WebviewApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ const WebviewApp: React.FC<WebviewAppProps> = ({
if (message.type === "submissionHistory") {
const m = message as any;
setSubmissionHistory(m.submissions ?? []);
const latest: Record<string, string> = {};
for (const s of (m.submissions ?? [])) {
if (!(s.taskScreenName in latest)) latest[s.taskScreenName] = s.status;
}
setTasks(prev => prev.map(t => ({ ...t, status: latest[t.value] })));
setLoadingHistory(false);
setStatus(`已获取 ${(m.submissions ?? []).length} 条提交记录`);
setShowSubmissionHistory(true);
Expand Down
Binary file modified release/extension.vsix
Binary file not shown.
Loading