Show the workspace credit balance in the topbar
Read from GET /organizations/me, refreshed after every action and every 30 seconds, since agents and schedules spend credits in the background. The date is dropped from the topbar, and its items wrap on phones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,12 @@ export async function waitReady(id: number, onProgress?: (d: EngineDocument) =>
|
||||
}
|
||||
}
|
||||
|
||||
// ── Workspace wallet ──
|
||||
|
||||
// The organization's credit balance: Express spends workspace credits, never personal ones.
|
||||
export const workspaceCredits = async () =>
|
||||
(await request<{ organization: { credit_balance: number } | null }>('/organizations/me')).organization?.credit_balance ?? null
|
||||
|
||||
// ── Compose (text content) ──
|
||||
|
||||
export interface ComposeSet { id: number; name: string }
|
||||
|
||||
Reference in New Issue
Block a user