This commit is contained in:
1 parent
a56408711e
commit
d918d56dc3
8 files changed
+107
-11
No files matched your search
@@ -95,6 +95,23 @@ export function canStartPollingInExtensionContext(ctx: unknown): boolean {
|
||||
return !isExtensionContextPassiveRunMode(ctx);
|
||||
}
|
||||
|
||||
export interface PiTopStatusSegmentPorts {
|
||||
setStatusSegment?: (
|
||||
key: string,
|
||||
text: string | undefined,
|
||||
options: { placement: "after-cost" },
|
||||
) => void;
|
||||
}
|
||||
|
||||
export function setExtensionContextTopStatusSegment(
|
||||
ctx: ExtensionContext,
|
||||
key: string,
|
||||
text: string,
|
||||
): void {
|
||||
const ui = ctx.ui as ExtensionContext["ui"] & PiTopStatusSegmentPorts;
|
||||
ui.setStatusSegment?.(key, text, { placement: "after-cost" });
|
||||
}
|
||||
|
||||
export function formatPollingStartBlockedByRunMode(ctx: unknown): string {
|
||||
const mode = getExtensionContextMode(ctx);
|
||||
return mode
|
||||
|
||||
Reference in new issue
Block a user