@hienlh/ppm 0.19.10 → 0.19.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/dist/web/assets/{accounts-settings-section-B54qbh-_.js → accounts-settings-section-C1YP1iCb.js} +1 -1
- package/dist/web/assets/{ai-resource-editor-BXuRvCii.js → ai-resource-editor-iMqzzz5c.js} +1 -1
- package/dist/web/assets/{ai-settings-section-ByXxu5Jp.js → ai-settings-section-B-1z-PRb.js} +1 -1
- package/dist/web/assets/{ai-settings-section-D8-z9POX.js → ai-settings-section-BJPgHUqk.js} +1 -1
- package/dist/web/assets/{appearance-settings-section-OZIxYrXu.js → appearance-settings-section-2XZgB0mV.js} +1 -1
- package/dist/web/assets/{chat-tab-CYhKZEQb.js → chat-tab-Bn4vZVZJ.js} +8 -8
- package/dist/web/assets/{code-editor-CtMXFx5E.js → code-editor-DN5GJXT3.js} +2 -2
- package/dist/web/assets/{conflict-editor-DCTjpFtC.js → conflict-editor-BpdoTEfv.js} +1 -1
- package/dist/web/assets/{csv-preview-oAb_uhuk.js → csv-preview-C3DoHISX.js} +1 -1
- package/dist/web/assets/{database-viewer-C-qFE_XB.js → database-viewer-CxZ2fdcd.js} +1 -1
- package/dist/web/assets/{diff-viewer-DPc5AiW_.js → diff-viewer-DxzD_YSO.js} +1 -1
- package/dist/web/assets/{explorer-body-CFvpR1ZN.js → explorer-body-Bpe6UX0b.js} +1 -1
- package/dist/web/assets/{explorer-window-content-DplJ_PMM.js → explorer-window-content-DixZaLLP.js} +1 -1
- package/dist/web/assets/{extension-manager-section-Da827Nnv.js → extension-manager-section-D_rKLp-o.js} +1 -1
- package/dist/web/assets/{extension-webview-BxGlHycs.js → extension-webview-kEtrZoRZ.js} +1 -1
- package/dist/web/assets/{files-settings-section-B0ED_J-Q.js → files-settings-section-B0wLfQ9S.js} +1 -1
- package/dist/web/assets/{general-settings-section-nuoOnutx.js → general-settings-section-DZ3xpgwh.js} +1 -1
- package/dist/web/assets/{git-log-panel-DK1MWTgZ.js → git-log-panel-BNicD2In.js} +1 -1
- package/dist/web/assets/{glide-data-grid-DbE9VFqa.js → glide-data-grid-CdK5dW5L.js} +1 -1
- package/dist/web/assets/{group-chat-tab-c6DU8xYR.js → group-chat-tab-D-HXdnoU.js} +1 -1
- package/dist/web/assets/{index-DgJJy_D0.js → index-DdMq4zqb.js} +4 -4
- package/dist/web/assets/{jira-watcher-section-CAjH1D-v.js → jira-watcher-section-DL_boZNh.js} +1 -1
- package/dist/web/assets/{keybindings-store-Hupd6B3g.js → keybindings-store-DQkz4a35.js} +1 -1
- package/dist/web/assets/{keyboard-shortcuts-section-BZNwSm4a.js → keyboard-shortcuts-section-DzQzV49E.js} +1 -1
- package/dist/web/assets/{markdown-renderer-DOTEwBPU.js → markdown-renderer-BfoCOrL8.js} +1 -1
- package/dist/web/assets/{markdown-renderer-CXuSaI_B.js → markdown-renderer-C35QMvZp.js} +1 -1
- package/dist/web/assets/{mobile-explorer-sheet-CKuKGmoo.js → mobile-explorer-sheet-ZHfT5IN3.js} +1 -1
- package/dist/web/assets/{notification-store-CaP8GdjN.js → notification-store-J1yP_Ebb.js} +1 -1
- package/dist/web/assets/{notifications-settings-section-BXOwi-as.js → notifications-settings-section-BXCaGBVc.js} +1 -1
- package/dist/web/assets/{pdf-preview-DUCPeqdU.js → pdf-preview-DbRFOtQD.js} +1 -1
- package/dist/web/assets/{postgres-viewer-Dw5GcVrG.js → postgres-viewer-BrQRqTso.js} +1 -1
- package/dist/web/assets/{ppmbot-settings-section-BDhcXJn2.js → ppmbot-settings-section-BEV23_SM.js} +1 -1
- package/dist/web/assets/{process-table-Dr-usEYu.js → process-table-CG8d5eXs.js} +1 -1
- package/dist/web/assets/{proxy-settings-section-DYuVzg21.js → proxy-settings-section-Cw0Wtsv0.js} +1 -1
- package/dist/web/assets/{query-audit-section-fYtxmDrt.js → query-audit-section-50B7mQal.js} +1 -1
- package/dist/web/assets/{remote-desktop-mobile-sheet-BcJZbFnp.js → remote-desktop-mobile-sheet-DhcAyXE5.js} +2 -2
- package/dist/web/assets/{remote-desktop-mobile-view-BV0WkCO0.js → remote-desktop-mobile-view-DPF_b_jd.js} +1 -1
- package/dist/web/assets/{remote-desktop-readiness-gate-BejKUMGH.js → remote-desktop-readiness-gate-J7E6355i.js} +1 -1
- package/dist/web/assets/{remote-desktop-window-content-6F1Oaygj.js → remote-desktop-window-content-0xsAifZH.js} +1 -1
- package/dist/web/assets/{schedules-settings-section-DVv3TujZ.js → schedules-settings-section-BFzMEPTd.js} +1 -1
- package/dist/web/assets/{settings-body-BGsYkBkl.js → settings-body-CUTsPLea.js} +2 -2
- package/dist/web/assets/{settings-tab-BUoekCNf.js → settings-tab-DVV26vPK.js} +1 -1
- package/dist/web/assets/{settings-window-content-CgBwhXex.js → settings-window-content-z64J3tfm.js} +1 -1
- package/dist/web/assets/{sql-query-editor-DNp7d1Fp.js → sql-query-editor-CwOcDbp4.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-CxAYuvMa.js → sqlite-viewer-DYdcqZv1.js} +1 -1
- package/dist/web/assets/{system-monitor-body-CeQHDXUr.js → system-monitor-body-CugdEvdh.js} +2 -2
- package/dist/web/assets/{system-monitor-tab-Ba3dB3lY.js → system-monitor-tab-jnPQtmvK.js} +1 -1
- package/dist/web/assets/{system-monitor-window-content-D1u2-cq_.js → system-monitor-window-content-CJfcQqc2.js} +1 -1
- package/dist/web/assets/{tab-host-window-content-gCdL-dfg.js → tab-host-window-content-5Ga7BheG.js} +1 -1
- package/dist/web/assets/{team-member-sheet-D6HBfQBL.js → team-member-sheet-8FDCVZMG.js} +2 -2
- package/dist/web/assets/{team-member-window-content-CSB85Rx7.js → team-member-window-content-0JRiWRdG.js} +1 -1
- package/dist/web/assets/{terminal-tab-BoYE74U4.js → terminal-tab-CkxJIjii.js} +1 -1
- package/dist/web/assets/{tool-cards-D5Bfnd4O.js → tool-cards-DuTlfeWN.js} +2 -2
- package/dist/web/assets/{use-accounts-data-DF_fHEHm.js → use-accounts-data--pdg01TI.js} +1 -1
- package/dist/web/assets/{use-monaco-theme-qPgB4FLP.js → use-monaco-theme-DOhDvEKJ.js} +1 -1
- package/dist/web/assets/{use-remote-desktop-display-choice-CdLY-Uvx.js → use-remote-desktop-display-choice-B3VIBQxC.js} +1 -1
- package/dist/web/assets/{use-websocket-C0qf6WqW.js → use-websocket-D9MsDysx.js} +1 -1
- package/dist/web/assets/{video-preview-Ccps7Y-_.js → video-preview-VL2Br0YM.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/web/components/chat/codex-usage-panel.tsx +13 -33
|
@@ -1,40 +1,20 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback } from "react";
|
|
2
2
|
import { X, Loader2, RefreshCw } from "lucide-react";
|
|
3
3
|
import { api } from "@/lib/api-client";
|
|
4
|
+
import { AccountUsageBar } from "@/components/settings/accounts/account-bucket-row";
|
|
5
|
+
import { formatResetTime } from "@/components/settings/accounts/account-usage-format";
|
|
4
6
|
import type { UsageInfo } from "../../../types/chat";
|
|
5
7
|
|
|
6
8
|
interface CodexAccount { id: string; label: string; type: string; planType?: string | null }
|
|
7
|
-
|
|
9
|
+
type Usage = Pick<UsageInfo, "fiveHour" | "sevenDay" | "session" | "weekly">;
|
|
8
10
|
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
function barColor(p: number): string {
|
|
15
|
-
if (p >= 90) return "bg-error";
|
|
16
|
-
if (p >= 70) return "bg-warning";
|
|
17
|
-
return "bg-success";
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function UsageBar({ label, frac }: { label: string; frac?: number }) {
|
|
11
|
+
function UsageBar({ label, frac, bucket }: {
|
|
12
|
+
label: string;
|
|
13
|
+
frac?: number;
|
|
14
|
+
bucket?: UsageInfo["session"];
|
|
15
|
+
}) {
|
|
21
16
|
const pct = frac != null ? Math.round(frac * 100) : null;
|
|
22
|
-
return (
|
|
23
|
-
<div className="space-y-1">
|
|
24
|
-
<div className="flex items-center justify-between">
|
|
25
|
-
<span className="text-xs font-medium text-text-primary">{label}</span>
|
|
26
|
-
<span className={`text-xs font-medium tabular-nums ${pct != null ? pctColor(pct) : "text-text-subtle"}`}>
|
|
27
|
-
{pct != null ? `${pct}%` : "—"}
|
|
28
|
-
</span>
|
|
29
|
-
</div>
|
|
30
|
-
<div className="h-2 rounded-full bg-border overflow-hidden">
|
|
31
|
-
<div
|
|
32
|
-
className={`h-full rounded-full transition-all ${pct != null ? barColor(pct) : ""}`}
|
|
33
|
-
style={{ width: `${Math.min(pct ?? 0, 100)}%` }}
|
|
34
|
-
/>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
17
|
+
return <AccountUsageBar label={label} pct={pct} reset={formatResetTime(bucket)} />;
|
|
38
18
|
}
|
|
39
19
|
|
|
40
20
|
/** Read-only usage panel opened from the chat toolbar badge (Claude parity).
|
|
@@ -89,8 +69,8 @@ export function CodexUsagePanel({ onClose, usage }: { onClose: () => void; usage
|
|
|
89
69
|
<span className="text-sm text-text-primary truncate flex-1 min-w-0">{usage.activeAccountLabel || "Default login"}</span>
|
|
90
70
|
<span className="text-[10px] uppercase tracking-wide text-text-subtle border border-border rounded px-1">~/.codex</span>
|
|
91
71
|
</div>
|
|
92
|
-
<UsageBar label="5-Hour" frac={usage.fiveHour} />
|
|
93
|
-
<UsageBar label="Weekly" frac={usage.sevenDay} />
|
|
72
|
+
<UsageBar label="5-Hour" frac={usage.fiveHour} bucket={usage.session} />
|
|
73
|
+
<UsageBar label="Weekly" frac={usage.sevenDay} bucket={usage.weekly} />
|
|
94
74
|
</div>
|
|
95
75
|
<p className="text-[11px] text-text-subtle">Using your default <code>~/.codex</code> login. Add managed accounts in Settings → AI Provider → Codex.</p>
|
|
96
76
|
</>
|
|
@@ -105,8 +85,8 @@ export function CodexUsagePanel({ onClose, usage }: { onClose: () => void; usage
|
|
|
105
85
|
<span className="text-[10px] uppercase tracking-wide text-text-subtle border border-border rounded px-1">{a.type}</span>
|
|
106
86
|
{a.planType && <span className="text-[10px] text-text-subtle">{a.planType}</span>}
|
|
107
87
|
</div>
|
|
108
|
-
<UsageBar label="5-Hour" frac={u.fiveHour} />
|
|
109
|
-
<UsageBar label="Weekly" frac={u.sevenDay} />
|
|
88
|
+
<UsageBar label="5-Hour" frac={u.fiveHour} bucket={u.session} />
|
|
89
|
+
<UsageBar label="Weekly" frac={u.sevenDay} bucket={u.weekly} />
|
|
110
90
|
</div>
|
|
111
91
|
);
|
|
112
92
|
})}
|