(ctx: ExtensionContext)
| 120 | } |
| 121 | |
| 122 | function resolveSessionId(ctx: ExtensionContext): string | undefined { |
| 123 | const getSessionId = ( |
| 124 | ctx.sessionManager as { getSessionId?: () => string | undefined } |
| 125 | ).getSessionId; |
| 126 | if (typeof getSessionId !== "function") return undefined; |
| 127 | try { |
| 128 | const id = getSessionId.call(ctx.sessionManager); |
| 129 | return typeof id === "string" && id.length > 0 ? id : undefined; |
| 130 | } catch { |
| 131 | return undefined; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | function fmt(n: number): string { |
| 136 | const abs = Math.abs(n); |
no test coverage detected