@c4a/core 0.5.20 → 0.5.29-beta.16

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/index.js +19 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -13613,6 +13613,23 @@ function isVersionVisible(record, versionCode) {
13613
13613
  }
13614
13614
  return (record.valid_from == null || record.valid_from <= versionCode) && (record.valid_until == null || record.valid_until > versionCode);
13615
13615
  }
13616
+ // src/utils/factContent.ts
13617
+ var SEARCH_PREFIX_RE = /^\[c4a:search [^\]\n]+\]\n\n/;
13618
+ function buildSearchPrefix(keywords) {
13619
+ if (!keywords || keywords.length === 0)
13620
+ return "";
13621
+ const cleaned = keywords.map((k) => k.trim()).filter((k) => k.length > 0);
13622
+ if (cleaned.length === 0)
13623
+ return "";
13624
+ return `[c4a:search ${cleaned.join(" ")}]
13625
+
13626
+ `;
13627
+ }
13628
+ function stripSearchPrefix(content) {
13629
+ if (!content)
13630
+ return content ?? "";
13631
+ return content.replace(SEARCH_PREFIX_RE, "");
13632
+ }
13616
13633
  // src/constants.ts
13617
13634
  var DEFAULT_WORKSPACE_NAME = "My Brain";
13618
13635
  var DEFAULT_CLOUD_LIBRARY_NAME = "My Drive";
@@ -13822,6 +13839,7 @@ export {
13822
13839
  visibilitySchema,
13823
13840
  transitionAtomSchema,
13824
13841
  symbolKindSchema,
13842
+ stripSearchPrefix,
13825
13843
  stateAtomSchema,
13826
13844
  sourceSpanSchema,
13827
13845
  sourceRefSpanSchema,
@@ -13884,6 +13902,7 @@ export {
13884
13902
  comparisonDimensionValueSchema,
13885
13903
  comparisonDimensionSchema,
13886
13904
  comparisonAtomSchema,
13905
+ buildSearchPrefix,
13887
13906
  buildRef,
13888
13907
  boundaryAtomSchema,
13889
13908
  behaviorAtomSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/core",
3
- "version": "0.5.20",
3
+ "version": "0.5.29-beta.16",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "picomatch": "^4.0.4",