@tokz/cli 0.2.22 → 0.2.23

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.
@@ -2775,7 +2775,7 @@ function HelpOverlay() {
2775
2775
  // src/ui/App.tsx
2776
2776
  import { Fragment, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2777
2777
  var HINTS = {
2778
- agents: "\u2191\u2193 navigate \xB7 \u23CE select \xB7 ? help \xB7 q quit",
2778
+ agents: "\u2191\u2193 navigate \xB7 \u23CE select \xB7 t timeframe \xB7 ? help \xB7 q quit",
2779
2779
  menu: "\u2191\u2193 navigate \xB7 \u23CE select \xB7 esc agents \xB7 ? help \xB7 q quit",
2780
2780
  list: "\u2191\u2193 move \xB7 \u23CE open \xB7 / filter \xB7 s sort \xB7 a all \xB7 esc back \xB7 ? help \xB7 q quit",
2781
2781
  project: "1\u20136 \u2190\u2192 tabs \xB7 esc back \xB7 ? help \xB7 q quit",
@@ -2832,10 +2832,14 @@ function App({
2832
2832
  const [help, setHelp] = useState5(false);
2833
2833
  const [filterCapture, setFilterCapture] = useState5(false);
2834
2834
  const [timeframe, setTimeframe] = useState5("30d");
2835
- const scoped = useMemo2(
2836
- () => applyTimeframe(activeProjects, timeframeRange(timeframe)),
2837
- [activeProjects, timeframe]
2838
- );
2835
+ const scopedAgentList = useMemo2(() => {
2836
+ const tf = timeframeRange(timeframe);
2837
+ return agentList.map((a) => ({
2838
+ ...a,
2839
+ projects: applyTimeframe(a.projects, tf)
2840
+ }));
2841
+ }, [agentList, timeframe]);
2842
+ const scoped = scopedAgentList[agentIdx]?.projects ?? [];
2839
2843
  const totals = useMemo2(() => aggregate(scoped), [scoped]);
2840
2844
  const activeAdapter = agentList[agentIdx]?.adapter;
2841
2845
  const agentName = activeAdapter ? activeAdapter.name + (activeAdapter.estimated ? " (estimated)" : "") : "";
@@ -2847,7 +2851,7 @@ function App({
2847
2851
  if (filterCapture) return;
2848
2852
  if (input === "q") exit();
2849
2853
  if (input === "?") setHelp(true);
2850
- if (input === "t" && view !== "agents") setTimeframe((tf) => nextTimeframe(tf));
2854
+ if (input === "t") setTimeframe((tf) => nextTimeframe(tf));
2851
2855
  if (key.escape) {
2852
2856
  if (view === "project") setView("list");
2853
2857
  else if (view === "aggregate") setView(aggFrom);
@@ -2865,7 +2869,7 @@ function App({
2865
2869
  content = /* @__PURE__ */ jsx10(
2866
2870
  AgentPicker,
2867
2871
  {
2868
- agents: agentList,
2872
+ agents: scopedAgentList,
2869
2873
  onSelect: (i) => {
2870
2874
  setAgentIdx(i);
2871
2875
  setSelected(void 0);
package/dist/cli.js CHANGED
@@ -276,7 +276,7 @@ program.action(async () => {
276
276
  const [{ render }, React, { Root }, { Fullscreen }] = await Promise.all([
277
277
  import("ink"),
278
278
  import("react"),
279
- import("./Root-GBSQBWNF.js"),
279
+ import("./Root-UTHGAOXG.js"),
280
280
  import("./Fullscreen-GK2ZYXHV.js")
281
281
  ]);
282
282
  render(React.createElement(Fullscreen, null, React.createElement(Root)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokz/cli",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "See where your coding agents' tokens and dollars actually go.",
5
5
  "keywords": [
6
6
  "claude",