@g9tm/aiassistant 1.4.0 → 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.
package/dist/csv.js CHANGED
@@ -6,7 +6,7 @@ export function csvCell(value) {
6
6
  }
7
7
  /** The whole file: a BOM, a header row of the column labels, then the rows, lines ended with CRLF. */
8
8
  export function toCsv(labels, rows) {
9
- const lines = [labels.map(csvCell).join(","), ...rows.map((r) => labels.map((_, i) => csvCell(r[i] ?? "")).join(","))];
9
+ const lines = [labels.map(csvCell).join(","), ...rows.map((r) => labels.map((_, i) => csvCell(r.at(i) ?? "")).join(","))];
10
10
  return BOM + lines.join("\r\n") + "\r\n";
11
11
  }
12
12
  /** A file name from a title: letters, digits and dashes only, with the extension. */
package/dist/pages.js CHANGED
@@ -68,6 +68,7 @@ const PAGE_FA = {
68
68
  "page.learned.empty": "هنوز چیزی آموخته نشده است",
69
69
  "page.findings.empty": "چیزی نیاز به توجه ندارد",
70
70
  "page.actions.empty": "هنوز کاری انجام نشده است",
71
+ "routine.type_to_search": "نامش را بنویسید",
71
72
  };
72
73
  const PAGE_EN = {
73
74
  "history.tabs": "Conversations",
@@ -105,6 +106,7 @@ const PAGE_EN = {
105
106
  "page.learned.empty": "Nothing learned yet",
106
107
  "page.findings.empty": "Nothing needs attention",
107
108
  "page.actions.empty": "No actions yet",
109
+ "routine.type_to_search": "Type its name",
108
110
  };
109
111
  /** The pages' texts over the assistant's: the host's texts and the core's win, then the pages' own. */
110
112
  export function pageTexts(texts) {
@@ -144,7 +146,8 @@ export function withHostTexts(texts, own) {
144
146
  locale: texts.locale,
145
147
  t(key, args) {
146
148
  const v = texts.t(key, args);
147
- const words = own()[key];
149
+ const mine = own();
150
+ const words = Object.hasOwn(mine, key) ? new Map(Object.entries(mine)).get(key) : undefined; // never a prototype's member
148
151
  return v !== key || words === undefined ? v : createTexts(texts.locale, { [key]: words }).t(key, args);
149
152
  },
150
153
  };
package/dist/routine.js CHANGED
@@ -37,6 +37,7 @@ export function slotValue(slot, text) {
37
37
  return null;
38
38
  if (slot.field === "number" || slot.field === "money") {
39
39
  const n = t.replace(/[,\u066C\u060C\s]/gu, "").replace(/\u066B/gu, ".");
40
+ // eslint-disable-next-line security/detect-unsafe-regex -- one optional group after digits: linear, no backtracking blow-up
40
41
  return /^-?\d+(\.\d+)?$/u.test(n) ? n : null;
41
42
  }
42
43
  if (slot.field === "date")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/aiassistant",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Headless client of the G9 AI assistant: API client, run state, transports, block view models, safe text and Persian helpers. No DOM, no framework.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@g9tm/aiassistant-contracts": "1.4.0"
36
+ "@g9tm/aiassistant-contracts": "1.4.2"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsc -p tsconfig.json",