cortico-world-hands 0.20.17 → 0.20.18

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/index.js +5 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2984,6 +2984,11 @@ ${text.slice(0, 2200)}`;
2984
2984
  const value = typeof args.value === "string" ? args.value.trim() : "";
2985
2985
  if (!key || !value) return failed("\u8981 key \u548C value\u3002");
2986
2986
  const tags = typeof args.tags === "string" ? args.tags : void 0;
2987
+ const trivial = value.length < 16 && !/[0-9]{4}|主人|他|约定|答应|纪念|生日|我们|第一次|以后/.test(key + value);
2988
+ if (trivial) {
2989
+ const note = await this.hands.noteAdd(`${key}\uFF1A${value}`, "think");
2990
+ return note.ok ? `\u8FD9\u6761\u66F4\u50CF\u4FBF\u7B7E\uFF08\u7410\u4E8B\uFF09\uFF0C\u5DF2\u7ECF\u8BB0\u5230\u4FBF\u7B7E\u677F\u4E0A\u4E86\uFF1A\u300C${key}\u300D` : failed(`\u6CA1\u8BB0\u6210\u4FBF\u7B7E\uFF1A${note.detail || "\u6CA1\u54CD\u5E94"}`);
2991
+ }
2987
2992
  const decision = classify(key, value);
2988
2993
  const r = await this.hands.memorySave(key, value, tags);
2989
2994
  if (!r.ok) return failed(`\u6CA1\u8BB0\u4F4F\uFF1A${r.detail || "\u624B\u6CA1\u54CD\u5E94"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.20.17",
3
+ "version": "0.20.18",
4
4
  "type": "module",
5
5
  "description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
6
6
  "license": "MIT",