@hashimkarim/usagestat-darwin-arm64 2.0.0-alpha.3 → 2.3.2
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/native-manifest.json +1532 -134
- package/package.json +235 -2
- package/plugins/UPSTREAM-LICENSES.md +6 -2
- package/plugins/_provider-icons/LICENSE +21 -0
- package/plugins/_provider-icons/NOTICE +12 -0
- package/plugins/_provider-icons/licenses/CodexBar-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/LobeHub-MIT.txt +21 -0
- package/plugins/_provider-icons/licenses/UsageStat-Bar-MIT.txt +21 -0
- package/plugins/_provider-icons/manifest.json +1219 -0
- package/plugins/_provider-icons/provenance.json +269 -0
- package/plugins/_provider-icons/source.json +4 -0
- package/plugins/abacus-ai/icon-color.svg +18 -0
- package/plugins/abliteration/LICENSE +21 -0
- package/plugins/abliteration/icon.svg +5 -0
- package/plugins/abliteration/plugin.js +89 -0
- package/plugins/abliteration/plugin.json +24 -0
- package/plugins/aerostack/LICENSE +21 -0
- package/plugins/aerostack/icon.svg +1 -0
- package/plugins/aerostack/plugin.js +94 -0
- package/plugins/aerostack/plugin.json +24 -0
- package/plugins/aixy/LICENSE +21 -0
- package/plugins/aixy/icon.svg +1 -0
- package/plugins/aixy/plugin.js +266 -0
- package/plugins/aixy/plugin.json +32 -0
- package/plugins/antigravity/plugin.js +189 -65
- package/plugins/antigravity-cli/icon-color.svg +1 -0
- package/plugins/antigravity-cli/icon.svg +1 -3
- package/plugins/antigravity-cli/plugin.js +32 -20
- package/plugins/antigravity-ide/icon-color.svg +1 -0
- package/plugins/antigravity-ide/icon.svg +1 -3
- package/plugins/antigravity-ide/plugin.js +19 -7
- package/plugins/atlascloud/LICENSE +21 -0
- package/plugins/atlascloud/icon-color.svg +1 -0
- package/plugins/atlascloud/icon.svg +1 -0
- package/plugins/atlascloud/plugin.js +54 -0
- package/plugins/atlascloud/plugin.json +24 -0
- package/plugins/augment/icon-color.svg +14 -0
- package/plugins/bifrost/LICENSE +21 -0
- package/plugins/bifrost/icon.svg +3 -0
- package/plugins/bifrost/plugin.js +366 -0
- package/plugins/bifrost/plugin.json +31 -0
- package/plugins/chatbox/LICENSE +21 -0
- package/plugins/chatbox/icon.svg +4 -0
- package/plugins/chatbox/plugin.js +208 -0
- package/plugins/chatbox/plugin.json +24 -0
- package/plugins/claude/plugin.js +340 -153
- package/plugins/claude/plugin.json +1 -1
- package/plugins/claudeplatform/LICENSE +21 -0
- package/plugins/claudeplatform/icon.svg +3 -0
- package/plugins/claudeplatform/plugin.js +244 -0
- package/plugins/claudeplatform/plugin.json +25 -0
- package/plugins/clinepass/plugin.js +19 -3
- package/plugins/codebuff/icon-color.svg +92 -0
- package/plugins/coderabbit/plugin.js +25 -0
- package/plugins/coderabbit/plugin.json +12 -0
- package/plugins/codex/plugin.js +15 -8
- package/plugins/codex/plugin.json +11 -2
- package/plugins/command-code/icon-color.svg +3 -0
- package/plugins/command-code/plugin.js +7 -3
- package/plugins/copilot/icon.svg +1 -1
- package/plugins/copilot/plugin.json +1 -0
- package/plugins/cosmic/LICENSE +21 -0
- package/plugins/cosmic/icon.svg +1 -0
- package/plugins/cosmic/plugin.js +134 -0
- package/plugins/cosmic/plugin.json +32 -0
- package/plugins/crof/icon-color.svg +3 -0
- package/plugins/crofai/icon-color.svg +3 -0
- package/plugins/crofai/icon.svg +2 -15
- package/plugins/cursor/icon-color.svg +1 -0
- package/plugins/cursor/plugin.js +51 -14
- package/plugins/cursor-nightly/plugin.json +1 -1
- package/plugins/deepinfra/icon-color.svg +1 -0
- package/plugins/deepinfra/icon.svg +1 -4
- package/plugins/deepseek/plugin.js +150 -59
- package/plugins/deepseek/plugin.json +3 -1
- package/plugins/devin/plugin.js +3 -0
- package/plugins/devpass/LICENSE +21 -0
- package/plugins/devpass/icon.svg +3 -0
- package/plugins/devpass/plugin.js +120 -0
- package/plugins/devpass/plugin.json +24 -0
- package/plugins/elevenlabs/icon-color.svg +4 -0
- package/plugins/exa/LICENSE +21 -0
- package/plugins/exa/icon-color.svg +1 -0
- package/plugins/exa/icon.svg +1 -0
- package/plugins/exa/plugin.js +75 -0
- package/plugins/exa/plugin.json +32 -0
- package/plugins/factory/icon-color.svg +1 -0
- package/plugins/fal/LICENSE +21 -0
- package/plugins/fal/icon-color.svg +1 -0
- package/plugins/fal/icon.svg +1 -0
- package/plugins/fal/plugin.js +74 -0
- package/plugins/fal/plugin.json +24 -0
- package/plugins/fireworks-ai/icon-color.svg +1 -0
- package/plugins/fireworks-ai/icon.svg +1 -6
- package/plugins/flora/LICENSE +21 -0
- package/plugins/flora/icon.svg +4 -0
- package/plugins/flora/plugin.js +93 -0
- package/plugins/flora/plugin.json +32 -0
- package/plugins/futureagi/LICENSE +21 -0
- package/plugins/futureagi/icon.svg +24 -0
- package/plugins/futureagi/plugin.js +139 -0
- package/plugins/futureagi/plugin.json +32 -0
- package/plugins/gemini-apps/LICENSE +21 -0
- package/plugins/gemini-apps/icon-color.svg +1 -0
- package/plugins/gemini-apps/icon.svg +1 -0
- package/plugins/gemini-apps/plugin.js +141 -0
- package/plugins/gemini-apps/plugin.json +25 -0
- package/plugins/gitkraken/LICENSE +21 -0
- package/plugins/gitkraken/icon.svg +2 -0
- package/plugins/gitkraken/plugin.js +158 -0
- package/plugins/gitkraken/plugin.json +32 -0
- package/plugins/googledeveloper/LICENSE +21 -0
- package/plugins/googledeveloper/icon.svg +3 -0
- package/plugins/googledeveloper/plugin.js +204 -0
- package/plugins/googledeveloper/plugin.json +25 -0
- package/plugins/grok/icon-color.svg +1 -0
- package/plugins/groqcloud/icon-color.svg +1 -0
- package/plugins/helmcode/LICENSE +21 -0
- package/plugins/helmcode/icon.svg +5 -0
- package/plugins/helmcode/plugin.js +253 -0
- package/plugins/helmcode/plugin.json +32 -0
- package/plugins/huggingface/LICENSE +21 -0
- package/plugins/huggingface/icon-color.svg +1 -0
- package/plugins/huggingface/icon.svg +1 -0
- package/plugins/huggingface/plugin.js +298 -0
- package/plugins/huggingface/plugin.json +26 -0
- package/plugins/hyper/LICENSE +21 -0
- package/plugins/hyper/plugin.js +137 -0
- package/plugins/hyper/plugin.json +27 -0
- package/plugins/jetbrains-ai-assistant/LICENSE +22 -0
- package/plugins/jetbrains-ai-assistant/plugin.js +502 -16
- package/plugins/jetbrains-ai-assistant/plugin.json +27 -4
- package/plugins/kilo/icon-color.svg +1 -0
- package/plugins/kimi/plugin.js +54 -14
- package/plugins/kimi/plugin.json +46 -6
- package/plugins/langdock/LICENSE +21 -0
- package/plugins/langdock/icon.svg +4 -0
- package/plugins/langdock/plugin.js +106 -0
- package/plugins/langdock/plugin.json +25 -0
- package/plugins/linkup/LICENSE +21 -0
- package/plugins/linkup/icon.svg +10 -0
- package/plugins/linkup/plugin.js +46 -0
- package/plugins/linkup/plugin.json +24 -0
- package/plugins/litellm/plugin.js +54 -3
- package/plugins/lithosai/LICENSE +21 -0
- package/plugins/lithosai/icon.svg +1 -0
- package/plugins/lithosai/plugin.js +130 -0
- package/plugins/lithosai/plugin.json +26 -0
- package/plugins/llmman/LICENSE +21 -0
- package/plugins/llmman/icon.svg +4 -0
- package/plugins/llmman/plugin.js +138 -0
- package/plugins/llmman/plugin.json +31 -0
- package/plugins/longcat/icon-color.svg +1 -0
- package/plugins/longcat/icon.svg +1 -4
- package/plugins/manus/icon-color.svg +6 -0
- package/plugins/mimo/icon-color.svg +4 -0
- package/plugins/mimo/icon.svg +4 -1
- package/plugins/mistral/plugin.js +164 -27
- package/plugins/moonshot/icon-color.svg +1 -0
- package/plugins/munito/LICENSE +21 -0
- package/plugins/munito/icon.svg +7 -0
- package/plugins/munito/plugin.js +171 -0
- package/plugins/munito/plugin.json +24 -0
- package/plugins/muse/LICENSE +21 -0
- package/plugins/muse/icon.svg +3 -0
- package/plugins/muse/plugin.js +288 -0
- package/plugins/muse/plugin.json +34 -0
- package/plugins/museai/LICENSE +21 -0
- package/plugins/museai/icon.svg +3 -0
- package/plugins/museai/plugin.js +161 -0
- package/plugins/museai/plugin.json +26 -0
- package/plugins/nous/LICENSE +21 -0
- package/plugins/nous/icon-color.svg +1 -0
- package/plugins/nous/icon.svg +1 -0
- package/plugins/nous/plugin.js +129 -0
- package/plugins/nous/plugin.json +32 -0
- package/plugins/ollama/icon-color.svg +1 -0
- package/plugins/ollama/plugin.js +58 -0
- package/plugins/openai-api/icon-color.svg +1 -0
- package/plugins/opencode/icon-color.svg +1 -0
- package/plugins/opencode-go/icon-color.svg +1 -0
- package/plugins/opencode-go/plugin.js +104 -37
- package/plugins/opendesign/LICENSE +21 -0
- package/plugins/opendesign/icon.svg +4 -0
- package/plugins/opendesign/plugin.js +108 -0
- package/plugins/opendesign/plugin.json +25 -0
- package/plugins/openrouter/icon-color.svg +1 -0
- package/plugins/parallel/LICENSE +21 -0
- package/plugins/parallel/icon.svg +11 -0
- package/plugins/parallel/plugin.js +97 -0
- package/plugins/parallel/plugin.json +25 -0
- package/plugins/perplexity/LICENSE +22 -0
- package/plugins/perplexity/plugin.js +122 -0
- package/plugins/perplexity/plugin.json +36 -7
- package/plugins/pi/plugin.js +113 -0
- package/plugins/pi/plugin.json +11 -0
- package/plugins/qwencloud/LICENSE +21 -0
- package/plugins/qwencloud/icon-color.svg +1 -0
- package/plugins/qwencloud/icon.svg +1 -4
- package/plugins/qwencloud/plugin.js +197 -0
- package/plugins/qwencloud/plugin.json +17 -0
- package/plugins/raycast/LICENSE +21 -0
- package/plugins/raycast/icon.svg +4 -0
- package/plugins/raycast/plugin.js +179 -0
- package/plugins/raycast/plugin.json +32 -0
- package/plugins/replicate/LICENSE +21 -0
- package/plugins/replicate/icon-color.svg +1 -0
- package/plugins/replicate/icon.svg +1 -0
- package/plugins/replicate/plugin.js +170 -0
- package/plugins/replicate/plugin.json +25 -0
- package/plugins/sailresearch/LICENSE +21 -0
- package/plugins/sailresearch/icon.svg +4 -0
- package/plugins/sailresearch/plugin.js +104 -0
- package/plugins/sailresearch/plugin.json +24 -0
- package/plugins/siliconflow/LICENSE +21 -0
- package/plugins/siliconflow/icon.svg +3 -0
- package/plugins/siliconflow/plugin.js +87 -0
- package/plugins/siliconflow/plugin.json +32 -0
- package/plugins/sofya/LICENSE +21 -0
- package/plugins/sofya/icon.svg +3 -0
- package/plugins/sofya/plugin.js +86 -0
- package/plugins/sofya/plugin.json +24 -0
- package/plugins/soniox/LICENSE +21 -0
- package/plugins/soniox/icon.svg +3 -0
- package/plugins/soniox/plugin.js +103 -0
- package/plugins/soniox/plugin.json +24 -0
- package/plugins/synthetic/icon-color.svg +14 -0
- package/plugins/synthetic/plugin.js +12 -0
- package/plugins/synthetic/plugin.json +51 -9
- package/plugins/tavily/LICENSE +21 -0
- package/plugins/tavily/icon.svg +3 -0
- package/plugins/tavily/plugin.js +61 -0
- package/plugins/tavily/plugin.json +24 -0
- package/plugins/tinyapi/LICENSE +21 -0
- package/plugins/tinyapi/icon.svg +4 -0
- package/plugins/tinyapi/plugin.js +73 -0
- package/plugins/tinyapi/plugin.json +25 -0
- package/plugins/traecn/LICENSE +21 -0
- package/plugins/traecn/icon.svg +3 -0
- package/plugins/traecn/plugin.js +103 -0
- package/plugins/traecn/plugin.json +25 -0
- package/plugins/tripo/LICENSE +21 -0
- package/plugins/tripo/icon.svg +4 -0
- package/plugins/tripo/plugin.js +60 -0
- package/plugins/tripo/plugin.json +24 -0
- package/plugins/typesafe/LICENSE +21 -0
- package/plugins/typesafe/icon.svg +4 -0
- package/plugins/typesafe/plugin.js +181 -0
- package/plugins/typesafe/plugin.json +25 -0
- package/plugins/v0/LICENSE +21 -0
- package/plugins/v0/icon-color.svg +1 -0
- package/plugins/v0/icon.svg +1 -0
- package/plugins/v0/plugin.js +219 -0
- package/plugins/v0/plugin.json +32 -0
- package/plugins/venice/plugin.js +50 -1
- package/plugins/venice/plugin.json +2 -1
- package/plugins/vercel/LICENSE +21 -0
- package/plugins/vercel/icon-color.svg +1 -0
- package/plugins/vercel/icon.svg +1 -0
- package/plugins/vercel/plugin.js +202 -0
- package/plugins/vercel/plugin.json +54 -0
- package/plugins/windsurf/icon-color.svg +1 -0
- package/plugins/workbuddy/LICENSE +21 -0
- package/plugins/workbuddy/icon.svg +1 -0
- package/plugins/workbuddy/plugin.js +318 -0
- package/plugins/workbuddy/plugin.json +63 -0
- package/plugins/xai/icon-color.svg +1 -0
- package/plugins/xai/icon.svg +1 -7
- package/plugins/xai/plugin.js +9 -0
- package/plugins/xapi/LICENSE +21 -0
- package/plugins/xapi/icon.svg +1 -0
- package/plugins/xapi/plugin.js +90 -0
- package/plugins/xapi/plugin.json +25 -0
- package/plugins/xkiro/LICENSE +21 -0
- package/plugins/xkiro/icon.svg +1 -0
- package/plugins/xkiro/plugin.js +104 -0
- package/plugins/xkiro/plugin.json +24 -0
- package/plugins/zai/icon-color.svg +1 -0
- package/plugins/zai/plugin.js +5 -1
- package/plugins/zenmux/icon-color.svg +1 -0
- package/plugins/zenmux/icon.svg +1 -3
- package/usagestat +0 -0
- package/usagestatd +0 -0
- package/plugins/cursor-nightly/plugin.js +0 -1416
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Peter Steinberger
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M16 4a9 9 0 1 0 0 16l-2-3a5.5 5.5 0 1 1 0-10Z"/><path fill="currentColor" d="m19 3 1.2 3.8L24 8l-3.8 1.2L19 13l-1.2-3.8L14 8l3.8-1.2Z"/></svg>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// Generated by tools/vendor-codexbar-providers.cjs; see LICENSE.
|
|
2
|
+
globalThis.__usagestat_bundled_options = {"labels":["Input tokens","Output tokens","Additional"],"defaults":{},"autoMode":"api"};
|
|
3
|
+
(function(defineProvider) {
|
|
4
|
+
// BEGIN UPSTREAM Sources/CodexBarCore/Resources/Plugins/cosmic.js
|
|
5
|
+
function _optionalChain(ops) {
|
|
6
|
+
let lastAccessLHS = undefined;
|
|
7
|
+
let value = ops[0];
|
|
8
|
+
let i = 1;
|
|
9
|
+
while (i < ops.length) {
|
|
10
|
+
const op = ops[i];
|
|
11
|
+
const fn = ops[i + 1];
|
|
12
|
+
i += 2;
|
|
13
|
+
if ((op === "optionalAccess" || op === "optionalCall") && value == null) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
if (op === "access" || op === "optionalAccess") {
|
|
17
|
+
lastAccessLHS = value;
|
|
18
|
+
value = fn(value);
|
|
19
|
+
} else if (op === "call" || op === "optionalCall") {
|
|
20
|
+
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
21
|
+
lastAccessLHS = undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
defineProvider({
|
|
27
|
+
id: "cosmic",
|
|
28
|
+
name: "Cosmic AI",
|
|
29
|
+
endpoints: ["https://dapi.cosmicjs.com"],
|
|
30
|
+
auth: { type: "bearer", secret: "COSMIC_TOKEN" },
|
|
31
|
+
settings: [
|
|
32
|
+
{ key: "COSMIC_TOKEN", title: "Personal Access Token", type: "secure" },
|
|
33
|
+
{ key: "COSMIC_PROJECT_ID", title: "Project ID", type: "plain" },
|
|
34
|
+
],
|
|
35
|
+
capabilities: ["http-status"],
|
|
36
|
+
async fetchUsage(ctx) {
|
|
37
|
+
const project = _optionalChain([
|
|
38
|
+
ctx,
|
|
39
|
+
"access",
|
|
40
|
+
(_) => _.settings,
|
|
41
|
+
"access",
|
|
42
|
+
(_2) => _2.get,
|
|
43
|
+
"call",
|
|
44
|
+
(_3) => _3("COSMIC_PROJECT_ID"),
|
|
45
|
+
"optionalAccess",
|
|
46
|
+
(_4) => _4.trim,
|
|
47
|
+
"call",
|
|
48
|
+
(_5) => _5(),
|
|
49
|
+
]);
|
|
50
|
+
if (!project) throw ctx.fail.missingCredential("Set a Cosmic Project ID in Settings or COSMIC_PROJECT_ID.");
|
|
51
|
+
const response = await ctx.http.get(
|
|
52
|
+
`https://dapi.cosmicjs.com/v3/projects/usage?project_id=${encodeURIComponent(project)}`,
|
|
53
|
+
{ headers: { Origin: "https://app.cosmicjs.com" } },
|
|
54
|
+
);
|
|
55
|
+
const message = `Cosmic AI returned HTTP ${response.status}.`;
|
|
56
|
+
if (response.status === 401) throw ctx.fail.authenticationExpired(message);
|
|
57
|
+
if (response.status === 403) throw ctx.fail.permissionDenied(message);
|
|
58
|
+
if (response.status === 429) throw ctx.fail.rateLimited(message);
|
|
59
|
+
if (response.status >= 500) throw ctx.fail.providerUnavailable(message);
|
|
60
|
+
if (response.status !== 200) throw ctx.fail.apiFailure(message);
|
|
61
|
+
const fail = () => {
|
|
62
|
+
throw ctx.fail.parseFailure("Cosmic AI returned an unrecognized project AI-token usage response.");
|
|
63
|
+
};
|
|
64
|
+
const record = (value) => (value && typeof value === "object" && !Array.isArray(value) ? value : undefined);
|
|
65
|
+
let decoded;
|
|
66
|
+
try {
|
|
67
|
+
decoded = JSON.parse(response.bodyText);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
void error;
|
|
70
|
+
return fail();
|
|
71
|
+
}
|
|
72
|
+
const root = record(decoded);
|
|
73
|
+
const usage = record(
|
|
74
|
+
_optionalChain([
|
|
75
|
+
record,
|
|
76
|
+
"call",
|
|
77
|
+
(_6) => _6(_optionalChain([root, "optionalAccess", (_7) => _7.usage])),
|
|
78
|
+
"optionalAccess",
|
|
79
|
+
(_8) => _8.ai,
|
|
80
|
+
]),
|
|
81
|
+
);
|
|
82
|
+
const allowance = record(
|
|
83
|
+
_optionalChain([
|
|
84
|
+
record,
|
|
85
|
+
"call",
|
|
86
|
+
(_9) => _9(_optionalChain([root, "optionalAccess", (_10) => _10.plan_info])),
|
|
87
|
+
"optionalAccess",
|
|
88
|
+
(_11) => _11.ai_tokens,
|
|
89
|
+
]),
|
|
90
|
+
);
|
|
91
|
+
const count = (value) => {
|
|
92
|
+
if (value === undefined || value === null) return undefined;
|
|
93
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : fail();
|
|
94
|
+
};
|
|
95
|
+
const limit = (value) => {
|
|
96
|
+
if (typeof value !== "string") return count(value);
|
|
97
|
+
const match = /^(\d+(?:\.\d+)?)\s*([km]?)$/i.exec(value.trim());
|
|
98
|
+
if (!match) return undefined;
|
|
99
|
+
return count(Number(match[1]) * (match[2].toLowerCase() === "m" ? 1000000 : match[2] ? 1000 : 1));
|
|
100
|
+
};
|
|
101
|
+
const details = [];
|
|
102
|
+
const window = (name, rawUsed, rawLimit) => {
|
|
103
|
+
const used = count(rawUsed);
|
|
104
|
+
const total = limit(rawLimit);
|
|
105
|
+
const rows = [];
|
|
106
|
+
if (used !== undefined) rows.push({ label: "Used", value: ctx.format.number(used) });
|
|
107
|
+
if (total !== undefined) rows.push({ label: "Allowance", value: ctx.format.number(total) });
|
|
108
|
+
else if (typeof rawLimit === "string" && rawLimit.trim()) {
|
|
109
|
+
rows.push({ label: "Allowance", value: /^unlimited$/i.test(rawLimit.trim()) ? "Unlimited" : "Not reported" });
|
|
110
|
+
}
|
|
111
|
+
if (used !== undefined && total !== undefined) {
|
|
112
|
+
rows.push({ label: "Remaining", value: ctx.format.number(Math.max(0, total - used)) });
|
|
113
|
+
if (used > total) rows.push({ label: "Above allowance", value: ctx.format.number(used - total) });
|
|
114
|
+
}
|
|
115
|
+
if (rows.length) details.push({ title: name, rows });
|
|
116
|
+
return used !== undefined && total !== undefined && total > 0 ? { usedPercent: ctx.pct(used, total) } : undefined;
|
|
117
|
+
};
|
|
118
|
+
const primary = window(
|
|
119
|
+
"Input tokens",
|
|
120
|
+
_optionalChain([usage, "optionalAccess", (_12) => _12.input_tokens]),
|
|
121
|
+
_optionalChain([allowance, "optionalAccess", (_13) => _13.max_input]),
|
|
122
|
+
);
|
|
123
|
+
const secondary = window(
|
|
124
|
+
"Output tokens",
|
|
125
|
+
_optionalChain([usage, "optionalAccess", (_14) => _14.output_tokens]),
|
|
126
|
+
_optionalChain([allowance, "optionalAccess", (_15) => _15.max_output]),
|
|
127
|
+
);
|
|
128
|
+
if (!details.length) return fail();
|
|
129
|
+
return { primary, secondary, details, dataConfidence: "exact" };
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// END UPSTREAM
|
|
134
|
+
})(globalThis.defineProvider);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "cosmic",
|
|
4
|
+
"name": "Cosmic AI",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"entry": "plugin.js",
|
|
7
|
+
"enabledByDefault": false,
|
|
8
|
+
"supportedModes": [
|
|
9
|
+
"api"
|
|
10
|
+
],
|
|
11
|
+
"autoMode": "api",
|
|
12
|
+
"usageDashboardUrl": "https://app.cosmicjs.com",
|
|
13
|
+
"envVars": [
|
|
14
|
+
"COSMIC_TOKEN",
|
|
15
|
+
"COSMIC_PROJECT_ID"
|
|
16
|
+
],
|
|
17
|
+
"setupFields": [
|
|
18
|
+
{
|
|
19
|
+
"key": "COSMIC_PROJECT_ID",
|
|
20
|
+
"title": "Project ID",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Provider-specific account or source selection."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"upstream": {
|
|
26
|
+
"repository": "https://github.com/steipete/CodexBar",
|
|
27
|
+
"revision": "1f6da9bec44455288ddee5ef6f3617a803d8eb2a",
|
|
28
|
+
"path": "Sources/CodexBarCore/Resources/Plugins/cosmic.js",
|
|
29
|
+
"sha256": "eb869360f719b3b3b96311617c173e624efa05b91c0f7d31ce985f0a3a77d7a6",
|
|
30
|
+
"license": "MIT"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M44.2 8.5H82.4C85.6 8.5 88.1 11.1 87.8 14.2C87.7 15.5 87.2 16.7 86.4 17.8L73.3 35.5C69.7 40.3 64.1 43.1 58.1 43.1H28.1L40.2 60.1H68.4C72.8 60.1 76.9 62.1 79.6 65.6L88.2 76.9C89.8 79.1 89.7 82.1 87.8 84.2C86.6 85.5 84.9 86.3 83.1 86.3H45.1C36.5 86.3 28.5 82.1 23.6 75L8.9 53.6C5.2 48.2 5.3 41 9.2 35.7L20.6 20.1C26.1 12.8 34.8 8.5 44.2 8.5ZM28.1 43.1H15.4C13.5 43.1 12.4 45.2 13.5 46.8L27.3 66.9C31.3 72.8 38 76.3 45.1 76.3H75L68.6 68.1C67.2 66.3 65.1 65.2 62.8 65.2H38.6C34.4 65.2 30.5 63.2 28.1 59.8L19.7 48.1C18.2 45.9 19.8 43.1 22.5 43.1H28.1Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M44.2 8.5H82.4C85.6 8.5 88.1 11.1 87.8 14.2C87.7 15.5 87.2 16.7 86.4 17.8L73.3 35.5C69.7 40.3 64.1 43.1 58.1 43.1H28.1L40.2 60.1H68.4C72.8 60.1 76.9 62.1 79.6 65.6L88.2 76.9C89.8 79.1 89.7 82.1 87.8 84.2C86.6 85.5 84.9 86.3 83.1 86.3H45.1C36.5 86.3 28.5 82.1 23.6 75L8.9 53.6C5.2 48.2 5.3 41 9.2 35.7L20.6 20.1C26.1 12.8 34.8 8.5 44.2 8.5ZM28.1 43.1H15.4C13.5 43.1 12.4 45.2 13.5 46.8L27.3 66.9C31.3 72.8 38 76.3 45.1 76.3H75L68.6 68.1C67.2 66.3 65.1 65.2 62.8 65.2H38.6C34.4 65.2 30.5 63.2 28.1 59.8L19.7 48.1C18.2 45.9 19.8 43.1 22.5 43.1H28.1Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
package/plugins/crofai/icon.svg
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path
|
|
3
|
-
M 103 107
|
|
4
|
-
H 161
|
|
5
|
-
V 135
|
|
6
|
-
C 173 114, 195 103, 226 103
|
|
7
|
-
C 264 103, 285 131, 285 185
|
|
8
|
-
V 294
|
|
9
|
-
H 226
|
|
10
|
-
V 189
|
|
11
|
-
C 226 159, 215 146, 194 146
|
|
12
|
-
C 172 146, 161 163, 161 193
|
|
13
|
-
V 294
|
|
14
|
-
H 103
|
|
15
|
-
Z"/>
|
|
1
|
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M44.2 8.5H82.4C85.6 8.5 88.1 11.1 87.8 14.2C87.7 15.5 87.2 16.7 86.4 17.8L73.3 35.5C69.7 40.3 64.1 43.1 58.1 43.1H28.1L40.2 60.1H68.4C72.8 60.1 76.9 62.1 79.6 65.6L88.2 76.9C89.8 79.1 89.7 82.1 87.8 84.2C86.6 85.5 84.9 86.3 83.1 86.3H45.1C36.5 86.3 28.5 82.1 23.6 75L8.9 53.6C5.2 48.2 5.3 41 9.2 35.7L20.6 20.1C26.1 12.8 34.8 8.5 44.2 8.5ZM28.1 43.1H15.4C13.5 43.1 12.4 45.2 13.5 46.8L27.3 66.9C31.3 72.8 38 76.3 45.1 76.3H75L68.6 68.1C67.2 66.3 65.1 65.2 62.8 65.2H38.6C34.4 65.2 30.5 63.2 28.1 59.8L19.7 48.1C18.2 45.9 19.8 43.1 22.5 43.1H28.1Z" fill="currentColor"/>
|
|
16
3
|
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Cursor</title><path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"></path></svg>
|
package/plugins/cursor/plugin.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
2
1
|
(function () {
|
|
3
2
|
const KEYCHAIN_ACCESS_TOKEN_SERVICE = "cursor-access-token"
|
|
4
3
|
const KEYCHAIN_REFRESH_TOKEN_SERVICE = "cursor-refresh-token"
|
|
@@ -198,15 +197,16 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
198
197
|
const injected = readInjectedCredential(ctx)
|
|
199
198
|
if (injected) return injected
|
|
200
199
|
|
|
201
|
-
const
|
|
202
|
-
const
|
|
200
|
+
const usable = value => typeof value === "string" && value.trim() && !value.trim().startsWith("cursor-safe-storage:") ? value.trim() : null
|
|
201
|
+
const sqliteAccessToken = usable(readStateValue(ctx, "cursorAuth/accessToken"))
|
|
202
|
+
const sqliteRefreshToken = usable(readStateValue(ctx, "cursorAuth/refreshToken"))
|
|
203
203
|
if (sqliteAccessToken || sqliteRefreshToken) {
|
|
204
204
|
return { accessToken: sqliteAccessToken, refreshToken: sqliteRefreshToken, source: "sqlite" }
|
|
205
205
|
}
|
|
206
206
|
// Generic CLI keychain targets are shared, not tied to an IDE variant.
|
|
207
207
|
// They cannot represent Nightly or an explicitly selected database profile.
|
|
208
|
-
const keychainAccessToken = sharedCredentialsAllowed(ctx) ? readKeychainValue(ctx, KEYCHAIN_ACCESS_TOKEN_SERVICE) : null
|
|
209
|
-
const keychainRefreshToken = sharedCredentialsAllowed(ctx) ? readKeychainValue(ctx, KEYCHAIN_REFRESH_TOKEN_SERVICE) : null
|
|
208
|
+
const keychainAccessToken = sharedCredentialsAllowed(ctx) ? usable(readKeychainValue(ctx, KEYCHAIN_ACCESS_TOKEN_SERVICE)) : null
|
|
209
|
+
const keychainRefreshToken = sharedCredentialsAllowed(ctx) ? usable(readKeychainValue(ctx, KEYCHAIN_REFRESH_TOKEN_SERVICE)) : null
|
|
210
210
|
|
|
211
211
|
if (keychainAccessToken || keychainRefreshToken) {
|
|
212
212
|
return {
|
|
@@ -216,6 +216,13 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
if (sharedCredentialsAllowed(ctx) && (!ctx.provider?.instanceId || ctx.provider.instanceId === "cursor") && ctx.host.cursorPaths?.readCliAuth) {
|
|
220
|
+
try {
|
|
221
|
+
const cli = ctx.util.tryParseJson(ctx.host.cursorPaths.readCliAuth())
|
|
222
|
+
if (cli && (usable(cli.accessToken) || usable(cli.refreshToken)))
|
|
223
|
+
return {accessToken:usable(cli.accessToken),refreshToken:usable(cli.refreshToken),source:"cli-file"}
|
|
224
|
+
} catch (_) {}
|
|
225
|
+
}
|
|
219
226
|
return {
|
|
220
227
|
accessToken: null,
|
|
221
228
|
refreshToken: null,
|
|
@@ -232,6 +239,8 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
232
239
|
if (!credential) return null
|
|
233
240
|
const accessToken = String(credential.accessToken || credential.sessionKey || "").trim()
|
|
234
241
|
const refreshToken = String(credential.refreshToken || "").trim()
|
|
242
|
+
if (accessToken.startsWith("cursor-safe-storage:") || refreshToken.startsWith("cursor-safe-storage:"))
|
|
243
|
+
throw {code:"credential-malformed",message:"Cursor safe-storage values are encrypted, not provider access tokens."}
|
|
235
244
|
if (!accessToken && !refreshToken) return null
|
|
236
245
|
return {
|
|
237
246
|
accessToken: accessToken || null,
|
|
@@ -239,6 +248,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
239
248
|
source: "provider-account",
|
|
240
249
|
}
|
|
241
250
|
} catch (e) {
|
|
251
|
+
if (e && e.code) throw e
|
|
242
252
|
ctx.host.log.warn("provider account credential read failed: " + String(e))
|
|
243
253
|
return null
|
|
244
254
|
}
|
|
@@ -313,6 +323,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
313
323
|
}
|
|
314
324
|
|
|
315
325
|
function persistAccessToken(ctx, source, accessToken) {
|
|
326
|
+
if (source === "cli-file") return false // The Cursor CLI owns its credential file.
|
|
316
327
|
if (source === "provider-account") {
|
|
317
328
|
try {
|
|
318
329
|
if (ctx.host.credentials && typeof ctx.host.credentials.update === "function") {
|
|
@@ -643,11 +654,21 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
643
654
|
const hasPlanUsageLimit = hasPlanUsage && Number.isFinite(limitN)
|
|
644
655
|
const planUsageLimitMissing = hasPlanUsage && !hasPlanUsageLimit
|
|
645
656
|
const hasTotalUsagePercent = hasPlanUsage && Number.isFinite(pctN)
|
|
657
|
+
const auto = hasPlanUsage && typeof pu.autoPercentUsed === "number" ? pu.autoPercentUsed : NaN
|
|
658
|
+
const api = hasPlanUsage && typeof pu.apiPercentUsed === "number" ? pu.apiPercentUsed : NaN
|
|
659
|
+
const reportedSpend = hasPlanUsage ? readFiniteNumber(pu.totalSpend) : NaN
|
|
660
|
+
const remaining = hasPlanUsage ? readFiniteNumber(pu.remaining) : NaN
|
|
661
|
+
const spent = Number.isFinite(reportedSpend) ? reportedSpend
|
|
662
|
+
: (Number.isFinite(limitN) ? limitN - (Number.isFinite(remaining) ? remaining : limitN) : 0)
|
|
663
|
+
// Legacy Teams reports zero pool placeholders beside positive dollar spend.
|
|
664
|
+
const hasModelPools = Number.isFinite(auto) && auto >= 0 && Number.isFinite(api) && api >= 0 &&
|
|
665
|
+
(auto > 0 || api > 0 || spent === 0)
|
|
646
666
|
return {
|
|
647
667
|
hasPlanUsage: hasPlanUsage,
|
|
648
668
|
hasPlanUsageLimit: hasPlanUsageLimit,
|
|
649
|
-
planUsageLimitMissing: planUsageLimitMissing,
|
|
669
|
+
planUsageLimitMissing: planUsageLimitMissing && !hasModelPools,
|
|
650
670
|
hasTotalUsagePercent: hasTotalUsagePercent,
|
|
671
|
+
hasModelPools: hasModelPools,
|
|
651
672
|
pu: pu,
|
|
652
673
|
}
|
|
653
674
|
}
|
|
@@ -676,7 +697,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
676
697
|
const hasTotalUsagePercent = flags.hasTotalUsagePercent
|
|
677
698
|
const pu = flags.pu
|
|
678
699
|
|
|
679
|
-
if (!hasPlanUsageLimit && !hasTotalUsagePercent) {
|
|
700
|
+
if (!hasPlanUsageLimit && !hasTotalUsagePercent && !flags.hasModelPools) {
|
|
680
701
|
throw "Total usage limit missing from API response."
|
|
681
702
|
}
|
|
682
703
|
|
|
@@ -734,7 +755,14 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
734
755
|
(su && typeof su.pooledLimit === "number" && su.pooledLimit > 0)
|
|
735
756
|
)
|
|
736
757
|
|
|
737
|
-
if (isTeamAccount) {
|
|
758
|
+
if (isTeamAccount && flags.hasModelPools) {
|
|
759
|
+
// A combined percentage cannot be reconstructed from independent pools.
|
|
760
|
+
if (hasTotalUsagePercent) lines.push(ctx.line.progress({
|
|
761
|
+
label: "Total usage", used: pu.totalPercentUsed, limit: 100,
|
|
762
|
+
format: { kind: "percent" }, resetsAt: ctx.util.toIso(usage.billingCycleEnd),
|
|
763
|
+
periodDurationMs: billingPeriodMs,
|
|
764
|
+
}))
|
|
765
|
+
} else if (isTeamAccount) {
|
|
738
766
|
if (!hasPlanUsageLimit) {
|
|
739
767
|
return null
|
|
740
768
|
}
|
|
@@ -761,7 +789,8 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
761
789
|
}))
|
|
762
790
|
}
|
|
763
791
|
|
|
764
|
-
|
|
792
|
+
const showModelPools = !(isTeamAccount && !flags.hasModelPools && pu.autoPercentUsed === 0 && pu.apiPercentUsed === 0)
|
|
793
|
+
if (showModelPools && typeof pu.autoPercentUsed === "number" && Number.isFinite(pu.autoPercentUsed) && pu.autoPercentUsed >= 0) {
|
|
765
794
|
lines.push(ctx.line.progress({
|
|
766
795
|
label: "Cursor Models",
|
|
767
796
|
used: pu.autoPercentUsed,
|
|
@@ -772,7 +801,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
772
801
|
}))
|
|
773
802
|
}
|
|
774
803
|
|
|
775
|
-
if (typeof pu.apiPercentUsed === "number" && Number.isFinite(pu.apiPercentUsed)) {
|
|
804
|
+
if (showModelPools && typeof pu.apiPercentUsed === "number" && Number.isFinite(pu.apiPercentUsed) && pu.apiPercentUsed >= 0) {
|
|
776
805
|
lines.push(ctx.line.progress({
|
|
777
806
|
label: "Other Models",
|
|
778
807
|
used: pu.apiPercentUsed,
|
|
@@ -1119,13 +1148,21 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
1119
1148
|
if (!Number.isFinite(percent) || percent < 0) return result
|
|
1120
1149
|
const resetMs = ctx.util.parseDateMs(usage.nextResetTimestampUtc)
|
|
1121
1150
|
const startMs = ctx.util.parseDateMs(usage.currentPeriodStart)
|
|
1151
|
+
const paid = usage.hasNonZeroIncludedLimit === true || usage.includedLimitZero === false
|
|
1152
|
+
const requestsPrimary = result.lines.some(item => item.type === 'progress' && item.label === 'Requests')
|
|
1153
|
+
if (usage.isUnified === true && paid && Number.isFinite(resetMs) && resetMs > Date.parse(ctx.nowIso) && !requestsPrimary) {
|
|
1154
|
+
result.lines = result.lines.filter(item => !['Total usage','Cursor Models','Other Models','Grok Bot usage'].includes(item.label))
|
|
1155
|
+
result.lines.unshift(ctx.line.progress({label:'Weekly',used:Math.min(100,percent),limit:100,format:{kind:'percent'},
|
|
1156
|
+
resetsAt:ctx.util.toIso(resetMs),periodDurationMs:7*24*60*60*1000}))
|
|
1157
|
+
return result
|
|
1158
|
+
}
|
|
1122
1159
|
const line = ctx.line.progress({
|
|
1123
1160
|
label: "Grok Bot usage",
|
|
1124
1161
|
used: Math.min(100, percent),
|
|
1125
1162
|
limit: 100,
|
|
1126
1163
|
format: { kind: "percent" },
|
|
1127
1164
|
resetsAt: Number.isFinite(resetMs) ? ctx.util.toIso(resetMs) : undefined,
|
|
1128
|
-
periodDurationMs: Number.isFinite(startMs) && Number.isFinite(resetMs) && resetMs > startMs
|
|
1165
|
+
periodDurationMs: paid ? 7*24*60*60*1000 : Number.isFinite(startMs) && Number.isFinite(resetMs) && resetMs > startMs
|
|
1129
1166
|
? resetMs - startMs : 7 * 24 * 60 * 60 * 1000,
|
|
1130
1167
|
})
|
|
1131
1168
|
let insertAt = result.lines.length
|
|
@@ -1155,7 +1192,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
1155
1192
|
|
|
1156
1193
|
if (!accessToken && !refreshTokenValue) {
|
|
1157
1194
|
ctx.host.log.error("probe failed: no access or refresh token in sqlite/keychain")
|
|
1158
|
-
throw "Not logged in. " + LOGIN_HINT
|
|
1195
|
+
throw "Not logged in. Cursor encrypted sign-ins require `agent login` for the stable CLI, or explicit provider credentials. " + LOGIN_HINT
|
|
1159
1196
|
}
|
|
1160
1197
|
|
|
1161
1198
|
ctx.host.log.info("tokens loaded from " + authSource + ": accessToken=" + (accessToken ? "yes" : "no") + " refreshToken=" + (refreshTokenValue ? "yes" : "no"))
|
|
@@ -1177,7 +1214,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
1177
1214
|
accessToken = refreshed
|
|
1178
1215
|
} else if (!accessToken) {
|
|
1179
1216
|
ctx.host.log.error("refresh failed and no access token available")
|
|
1180
|
-
throw "Not logged in. " + LOGIN_HINT
|
|
1217
|
+
throw "Not logged in. Cursor encrypted sign-ins require `agent login` for the stable CLI, or explicit provider credentials. " + LOGIN_HINT
|
|
1181
1218
|
}
|
|
1182
1219
|
}
|
|
1183
1220
|
|
|
@@ -1335,7 +1372,7 @@ globalThis.__OPENUSAGE_PLUGIN_REGISTRATION_ID__ = "cursor";
|
|
|
1335
1372
|
const hasPlanUsageLimit = hasPlanUsage &&
|
|
1336
1373
|
typeof usage.planUsage.limit === "number" &&
|
|
1337
1374
|
Number.isFinite(usage.planUsage.limit)
|
|
1338
|
-
const planUsageLimitMissing = hasPlanUsage && !hasPlanUsageLimit
|
|
1375
|
+
const planUsageLimitMissing = hasPlanUsage && !hasPlanUsageLimit && !getConnectUsageMetricFlags(usage).hasModelPools
|
|
1339
1376
|
const hasTotalUsagePercent = hasPlanUsage &&
|
|
1340
1377
|
typeof usage.planUsage.totalPercentUsed === "number" &&
|
|
1341
1378
|
Number.isFinite(usage.planUsage.totalPercentUsed)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>DeepInfra</title><path d="M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z" fill="#2A3275"></path><path d="M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z" fill="#5699DB"></path></svg>
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<title>DeepInfra</title>
|
|
3
|
-
<path fill="currentColor" d="M2.833 10.66A2.837 2.837 0 0 1 0 7.825a2.837 2.837 0 0 1 2.833-2.834 2.837 2.837 0 0 1 2.834 2.834 2.837 2.837 0 0 1-2.834 2.833m0-4.555a1.723 1.723 0 0 0 0 3.445 1.724 1.724 0 0 0 0-3.445m0 12.552A2.837 2.837 0 0 1 0 15.822a2.837 2.837 0 0 1 2.833-2.834 2.837 2.837 0 0 1 2.834 2.834 2.837 2.837 0 0 1-2.834 2.833m0-4.554a1.722 1.722 0 0 0 0 3.443 1.722 1.722 0 1 0 0-3.443m0 12.539A2.837 2.837 0 0 1 0 23.806a2.837 2.837 0 0 1 2.833-2.833 2.837 2.837 0 0 1 2.834 2.833 2.837 2.837 0 0 1-2.834 2.834m0-4.555a1.723 1.723 0 0 0 0 3.445c.95 0 1.723-.772 1.723-1.722s-.772-1.723-1.723-1.723M24.376 10.66a2.837 2.837 0 0 1-2.833-2.834 2.837 2.837 0 0 1 2.833-2.834 2.837 2.837 0 0 1 2.834 2.834 2.837 2.837 0 0 1-2.834 2.833m0-4.555c-.948 0-1.722.772-1.722 1.722a1.724 1.724 0 0 0 3.445 0c0-.95-.772-1.722-1.723-1.722m0 12.551a2.837 2.837 0 0 1-2.833-2.833 2.837 2.837 0 0 1 2.833-2.834 2.837 2.837 0 0 1 2.834 2.834 2.837 2.837 0 0 1-2.834 2.833m0-4.554c-.948 0-1.722.772-1.722 1.72 0 .95.772 1.723 1.722 1.723s1.723-.772 1.723-1.722-.772-1.721-1.723-1.721m0 12.539a2.837 2.837 0 0 1-2.833-2.834 2.837 2.837 0 0 1 2.833-2.833 2.837 2.837 0 0 1 2.834 2.833 2.837 2.837 0 0 1-2.834 2.834m0-4.555a1.724 1.724 0 1 0 1.723 1.723c0-.95-.772-1.723-1.723-1.723m-10.771-7.43a2.837 2.837 0 0 1-2.834-2.833 2.837 2.837 0 0 1 2.834-2.834 2.837 2.837 0 0 1 2.833 2.834 2.837 2.837 0 0 1-2.833 2.833m0-4.554c-.949 0-1.723.772-1.723 1.722s.773 1.723 1.723 1.723 1.723-.772 1.723-1.723c0-.95-.773-1.722-1.723-1.722m0-3.434a2.837 2.837 0 0 1-2.834-2.834A2.837 2.837 0 0 1 13.606 1a2.837 2.837 0 0 1 2.833 2.833 2.837 2.837 0 0 1-2.833 2.834m0-4.554c-.949 0-1.723.772-1.723 1.722a1.724 1.724 0 0 0 3.446 0c0-.95-.773-1.722-1.723-1.722m-.001 20.534a2.837 2.837 0 0 1-2.834-2.833 2.837 2.837 0 0 1 2.834-2.834 2.837 2.837 0 0 1 2.833 2.834 2.837 2.837 0 0 1-2.833 2.833m0-4.554a1.724 1.724 0 0 0 0 3.445 1.724 1.724 0 0 0 0-3.445m0 12.547a2.837 2.837 0 0 1-2.834-2.834 2.837 2.837 0 0 1 2.834-2.833 2.837 2.837 0 0 1 2.833 2.833 2.837 2.837 0 0 1-2.833 2.834m0-4.555a1.724 1.724 0 1 0 1.723 1.723c0-.95-.773-1.723-1.723-1.723M9.094 11.154a.9.9 0 0 1-.342-.066l-1.845-.735a.926.926 0 1 1 .687-1.72l1.845.735a.926.926 0 0 1-.344 1.786zm0 7.835a.9.9 0 0 1-.342-.066l-1.845-.735a.925.925 0 1 1 .687-1.72l1.845.736a.925.925 0 0 1-.344 1.785zm10.82-3.914a.9.9 0 0 1-.342-.066l-1.844-.735a.926.926 0 0 1 .685-1.72l1.845.736a.926.926 0 0 1-.344 1.785m0-7.835a.9.9 0 0 1-.342-.066l-1.844-.735a.926.926 0 0 1 .685-1.72l1.845.735a.926.926 0 0 1-.344 1.786m0 15.668a.9.9 0 0 1-.342-.066l-1.844-.735a.926.926 0 0 1 .685-1.72l1.845.735a.926.926 0 0 1-.344 1.785m-12.616.281a.926.926 0 0 1-.344-1.785l1.845-.735a.925.925 0 1 1 .687 1.72l-1.845.734a.9.9 0 0 1-.342.066zm0-7.793a.926.926 0 0 1-.344-1.785l1.845-.735a.925.925 0 1 1 .687 1.72l-1.845.734a.9.9 0 0 1-.342.066zm0-8.18a.926.926 0 0 1-.344-1.785L8.8 4.695a.925.925 0 1 1 .687 1.72L7.64 7.15a.9.9 0 0 1-.342.065zm1.796 20.169a.9.9 0 0 1-.342-.066l-1.845-.735a.925.925 0 0 1 .686-1.72l1.844.736a.926.926 0 0 1-.343 1.785m8.976-16.229a.926.926 0 0 1-.344-1.787l1.844-.735a.927.927 0 0 1 .687 1.72l-1.844.736a.9.9 0 0 1-.342.066zm0 7.835a.926.926 0 0 1-.344-1.786l1.844-.736a.927.927 0 0 1 .687 1.721l-1.844.736a.9.9 0 0 1-.342.066zm0 8.393a.925.925 0 0 1-.343-1.785l1.843-.735a.925.925 0 1 1 .686 1.72l-1.845.735a.9.9 0 0 1-.342.065"/>
|
|
4
|
-
</svg>
|
|
1
|
+
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>DeepInfra</title><path d="M3.294 7.821A2.297 2.297 0 011 5.527a2.297 2.297 0 012.294-2.295A2.297 2.297 0 015.59 5.527 2.297 2.297 0 013.294 7.82zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM3.294 14.293A2.297 2.297 0 011 11.998a2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.295 2.295zm0-3.688a1.395 1.395 0 000 2.788 1.395 1.395 0 100-2.788zM3.294 20.761A2.297 2.297 0 011 18.467a2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 000 2.79 1.396 1.396 0 000-2.79zM20.738 7.821a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM20.738 14.293a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688c-.769 0-1.395.625-1.395 1.393a1.396 1.396 0 002.79 0c0-.77-.626-1.393-1.395-1.393zM20.738 20.761a2.297 2.297 0 01-2.295-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.294 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 11.057a2.297 2.297 0 01-2.294-2.294 2.297 2.297 0 012.294-2.295 2.297 2.297 0 012.295 2.295 2.297 2.297 0 01-2.295 2.294zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395zM12.017 4.589a2.297 2.297 0 01-2.295-2.295A2.297 2.297 0 0112.017 0a2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.017 17.529a2.297 2.297 0 01-2.295-2.295 2.297 2.297 0 012.295-2.294 2.297 2.297 0 012.294 2.294 2.297 2.297 0 01-2.294 2.295zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.626-1.395-1.395-1.395zM12.016 24a2.297 2.297 0 01-2.294-2.295 2.297 2.297 0 012.294-2.294 2.297 2.297 0 012.295 2.294A2.297 2.297 0 0112.016 24zm0-3.688a1.396 1.396 0 101.395 1.395c0-.77-.625-1.395-1.395-1.395z"></path><path d="M8.363 8.222a.742.742 0 01-.277-.053l-1.494-.596a.75.75 0 11.557-1.392l1.493.595a.75.75 0 01-.278 1.446h-.001zM8.363 14.566a.743.743 0 01-.277-.053l-1.494-.595a.75.75 0 11.557-1.393l1.493.596a.75.75 0 01-.278 1.445h-.001zM17.124 11.397a.741.741 0 01-.277-.054l-1.493-.595a.75.75 0 11.555-1.392l1.493.595a.75.75 0 01-.278 1.446zM17.124 5.05a.744.744 0 01-.277-.054L15.354 4.4a.75.75 0 01.555-1.392l1.493.596a.75.75 0 01-.278 1.445zM17.124 17.739a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 11.556-1.392l1.493.596a.75.75 0 01-.278 1.445zM6.91 17.966a.75.75 0 01-.279-1.445l1.494-.595a.749.749 0 11.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 11.66a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.595a.743.743 0 01-.277.053H6.91zM6.91 5.033a.75.75 0 01-.279-1.446l1.494-.595a.75.75 0 01.556 1.392l-1.493.596a.744.744 0 01-.277.053H6.91zM8.363 21.364a.743.743 0 01-.277-.053l-1.494-.596a.75.75 0 01.555-1.392l1.494.595a.75.75 0 01-.278 1.446zM15.63 8.223a.75.75 0 01-.278-1.447l1.494-.595a.75.75 0 01.556 1.393l-1.494.595a.744.744 0 01-.276.054h-.002zM15.63 14.567a.75.75 0 01-.278-1.446l1.494-.596a.75.75 0 01.556 1.394l-1.494.595a.743.743 0 01-.276.053h-.002zM15.63 21.363a.749.749 0 01-.278-1.445l1.494-.595a.75.75 0 11.555 1.392l-1.494.595a.741.741 0 01-.277.053z"></path></svg>
|