@lotics/cli 0.294.0 → 0.294.1

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/src/cli.js +11 -7
  2. package/package.json +1 -1
package/dist/src/cli.js CHANGED
@@ -42413,7 +42413,7 @@ function resultSideEffects(result) {
42413
42413
  }
42414
42414
 
42415
42415
  // src/version.ts
42416
- var VERSION = "0.294.0";
42416
+ var VERSION = "0.294.1";
42417
42417
  var APP_SDK_VERSION = "0.115.4";
42418
42418
 
42419
42419
  // src/timezone.ts
@@ -42690,12 +42690,18 @@ function docRows(text) {
42690
42690
  });
42691
42691
  return found;
42692
42692
  }
42693
+ var PARSED = /* @__PURE__ */ new Map();
42694
+ function parsedDoc(text) {
42695
+ const held = PARSED.get(text);
42696
+ if (held !== void 0) return held;
42697
+ const parsed = { lines: text.split("\n"), sections: docSections(text), rows: docRows(text) };
42698
+ PARSED.set(text, parsed);
42699
+ return parsed;
42700
+ }
42693
42701
  var oneNewline = (s) => `${s.replace(/\n+$/, "")}
42694
42702
  `;
42695
42703
  function renderDocPage(text, args) {
42696
- const lines = text.split("\n");
42697
- const sections = docSections(text);
42698
- const rows = docRows(text);
42704
+ const { lines, sections, rows } = parsedDoc(text);
42699
42705
  const place = locateDocPlace(sections, rows, args.section);
42700
42706
  if (place.kind === "miss") return { error: missError(lines, sections, rows, place, { ...args, budget: NAV_BYTES }) };
42701
42707
  if (place.kind === "row") return { text: oneNewline([...tableHeader(lines, place.row.line), lines[place.row.line]].join("\n")) };
@@ -42737,9 +42743,7 @@ function readDocs(areas, path17, surface) {
42737
42743
  function docScope(areas, path17, surface) {
42738
42744
  const asked = resolveDocPath(areas, path17, surface);
42739
42745
  if ("error" in asked) return asked;
42740
- const lines = asked.area.text.split("\n");
42741
- const sections = docSections(asked.area.text);
42742
- const rows = docRows(asked.area.text);
42746
+ const { lines, sections, rows } = parsedDoc(asked.area.text);
42743
42747
  const place = locateDocPlace(sections, rows, asked.section);
42744
42748
  if (place.kind === "miss") {
42745
42749
  return { error: missError(lines, sections, rows, place, { area: asked.area.area, link: surface.link, budget: NAV_BYTES }), kind: "no_part", area: asked.area.area };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.294.0",
3
+ "version": "0.294.1",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {