@vecteur/cli 0.2.3 → 0.2.4
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/dist/session.js +9 -1
- package/dist/ui/App.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/session.js
CHANGED
|
@@ -69,8 +69,16 @@ export function unitsAsTime(units) {
|
|
|
69
69
|
export function formatUsage(sub) {
|
|
70
70
|
const lines = [];
|
|
71
71
|
const t = sub.tokens;
|
|
72
|
+
const f = sub.usage_framing;
|
|
72
73
|
lines.push(`plan: ${(sub.account_type ?? "free").toUpperCase()}`);
|
|
73
|
-
|
|
74
|
+
// Percent/prompt framing first (same vocabulary as web); time as fallback.
|
|
75
|
+
if (f && f.daily_used_pct !== null) {
|
|
76
|
+
const prompts = f.prompts_left_today !== null ? ` · ≈ ${f.prompts_left_today.toLocaleString()} prompts left` : "";
|
|
77
|
+
lines.push(`today: ${f.daily_used_pct}% used${prompts}`);
|
|
78
|
+
if (f.monthly_used_pct !== null)
|
|
79
|
+
lines.push(`this month: ${f.monthly_used_pct}% used`);
|
|
80
|
+
}
|
|
81
|
+
else if (t) {
|
|
74
82
|
const dailyLeft = Math.max(0, t.daily_limit - t.daily_used);
|
|
75
83
|
const monthlyLeft = Math.max(0, t.monthly_limit - t.monthly_used);
|
|
76
84
|
lines.push(`today: ${unitsAsTime(t.daily_used)} used · ≈ ${unitsAsTime(dailyLeft)} left of ${unitsAsTime(t.daily_limit)}`);
|
package/dist/ui/App.js
CHANGED
|
@@ -171,5 +171,5 @@ export function App({ project, cwd, created, updateNotice }) {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsx(Header, { cwd: cwd, project: project }), updateNotice ? _jsxs(Text, { color: "yellow", children: ["\u2191 ", updateNotice] }) : null, items.length === 0 && turns === 0 ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(Logo, {}), _jsx(Text, { dimColor: true, children: "
|
|
174
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsx(Header, { cwd: cwd, project: project }), updateNotice ? _jsxs(Text, { color: "yellow", children: ["\u2191 ", updateNotice] }) : null, items.length === 0 && turns === 0 ? (_jsxs(Box, { flexDirection: "column", children: [_jsx(Logo, {}), _jsx(Text, { dimColor: true, children: "Ask space-engineering questions in plain language \u2014 the Vecteur oracle and its" }), _jsx(Text, { dimColor: true, children: "subagents run on our servers and answer with cited results." }), _jsx(Text, { children: " " }), _jsxs(Text, { dimColor: true, children: [" ", _jsx(Text, { color: "cyan", children: "@file" }), " attach a local file", " ", _jsx(Text, { color: "cyan", children: "/help" }), " commands", " ", _jsx(Text, { color: "cyan", children: "\u2191\u2193" }), " history", " ", _jsx(Text, { color: "cyan", children: "ctrl-d" }), " exit"] }), _jsxs(Text, { dimColor: true, children: [" ", "Try ", _jsx(Text, { color: "white", children: "\"design a sun-synchronous orbit at 550 km\"" }), " \u2014 or @mention a file to analyze."] })] })) : null, _jsx(Static, { items: items, children: (item) => _jsx(TranscriptTurn, { item: item, project: project }, item.id) }), streaming ? _jsx(RunStatus, { stages: stages.length ? stages : ["starting run"] }) : null, _jsx(Prompt, { value: input, onChange: onInputChange, onSubmit: submit, disabled: streaming }), _jsx(SlashMenu, { value: input, selected: selected }), notice ? _jsx(Text, { dimColor: true, children: notice }) : null, _jsxs(Box, { justifyContent: "space-between", width: "100%", children: [_jsx(Text, { dimColor: true, children: "enter send \u00B7 /help \u00B7 ctrl-d exit" }), _jsxs(Text, { dimColor: true, children: ["tokens: ", tokenTotal] })] })] }));
|
|
175
175
|
}
|
package/dist/version.js
CHANGED
package/package.json
CHANGED