@g9tm/aiassistant-lynx 1.4.1 → 1.4.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.
Files changed (2) hide show
  1. package/dist/pages.jsx +3 -2
  2. package/package.json +2 -2
package/dist/pages.jsx CHANGED
@@ -146,12 +146,13 @@ function HistoryBody(props) {
146
146
  const change = (call) => { void call.then(load, () => load().then(() => setFailed(true))); };
147
147
  const tabs = historyTabs(rows ?? [], new Date(timer(ui.assistant.host).now()), search);
148
148
  const counts = tabCounts(tabs);
149
- const shown = tabs[tab];
149
+ const shown = new Map(Object.entries(tabs)).get(tab) ?? [];
150
+ const countOf = (k) => new Map(Object.entries(counts)).get(k) ?? 0;
150
151
  const open = async (id) => { await ui.assistant.open(id); props.onOpen?.(id); };
151
152
  return (<Frame failed={failed} flow={props.flow}>
152
153
  <input style={{ ...field(ui), marginBottom: "8px" }} placeholder={t("history.search")} accessibility-label={t("history.search")} bindinput={(e) => setSearch(e.detail.value)}/>
153
154
  <view className="g9a-history-tabs" style={{ ...rowOf(ui, "6px"), flexWrap: "wrap", marginBottom: "8px" }}>
154
- {HISTORY_TABS.map((k) => <Tab key={k} label={t("history." + k)} count={counts[k]} on={tab === k} onTap={() => setTab(k)}/>)}
155
+ {HISTORY_TABS.map((k) => <Tab key={k} label={t("history." + k)} count={countOf(k)} on={tab === k} onTap={() => setTab(k)}/>)}
155
156
  </view>
156
157
  {rows !== null && shown.length === 0 ? <Empty words={t("history.empty")}/> : shown.map((c) => (<HistoryRow key={c.id} row={c} onOpen={() => void open(c.id)} onPin={() => change(pageCalls.pin(api, c.id, !c.pinned))} onDelete={() => setDoomed(c)}/>))}
157
158
  <Dialog open={doomed !== null} label={t("history.delete_confirm")} onClose={() => setDoomed(null)}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/aiassistant-lynx",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "ReactLynx components for the G9 AI assistant, fully customisable (layouts, tokens, per-part classes, overrides, parts).",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -29,7 +29,7 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@g9tm/aiassistant": "1.4.1"
32
+ "@g9tm/aiassistant": "1.4.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@lynx-js/react": "0.129.2",