Add query cancellation controls (#41)

Co-authored-by: SuLe <sule@SuLedeMacBook-Air.local>
Co-authored-by: skyler <77960507+t8y2@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-05-01 00:05:15 +08:00
1 parent c840ab4e45
commit 806a855ef0
17 files changed
+358 -42

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
export interface QueryExecutionStateLike {
isExecuting: boolean;
isCancelling?: boolean;
executionId?: string;
}
export function canCancelQueryExecution(state: QueryExecutionStateLike): boolean {
return state.isExecuting && !!state.executionId && !state.isCancelling;
}
export function queryExecutionLabelKey(state: Pick<QueryExecutionStateLike, "isCancelling">): "common.loading" | "common.stopping" {
return state.isCancelling ? "common.stopping" : "common.loading";
}