cortico-world-hands 0.20.56 → 0.20.57
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/index.js +28 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2543,6 +2543,7 @@ var HandsWorld = class {
|
|
|
2543
2543
|
lastReviewDay = "";
|
|
2544
2544
|
lastMorningDay = "";
|
|
2545
2545
|
lastGoalSlot = "";
|
|
2546
|
+
followingUp = /* @__PURE__ */ new Set();
|
|
2546
2547
|
screenTimer = null;
|
|
2547
2548
|
lastScreenAt = 0;
|
|
2548
2549
|
lastScreenKey = "";
|
|
@@ -2834,7 +2835,7 @@ var HandsWorld = class {
|
|
|
2834
2835
|
} catch {
|
|
2835
2836
|
}
|
|
2836
2837
|
await this.pushEvent(
|
|
2837
|
-
`[\u8BB0\u5FC6] ${reason}\
|
|
2838
|
+
`[\u8BB0\u5FC6] ${reason}\u4F60\u5FFD\u7136\u60F3\u8D77\u8FD9\u4E9B\uFF08\u5171 ${rows.length} \u6761\uFF0C\u6311 ${top.length} \u6761\uFF09\uFF1A
|
|
2838
2839
|
${lines.join("\n")}`,
|
|
2839
2840
|
"hands.memory.digest",
|
|
2840
2841
|
"hands:memory"
|
|
@@ -2959,6 +2960,30 @@ ${lines.join("\n")}
|
|
|
2959
2960
|
this.lastGoalSlot = slot;
|
|
2960
2961
|
await this.checkOwnGoals();
|
|
2961
2962
|
}
|
|
2963
|
+
await this.checkFollowups();
|
|
2964
|
+
}
|
|
2965
|
+
/** 她问过「你那个修好了吗」之后,要记得回头追一下。 */
|
|
2966
|
+
async checkFollowups() {
|
|
2967
|
+
let notes = [];
|
|
2968
|
+
try {
|
|
2969
|
+
notes = await this.hands.noteList();
|
|
2970
|
+
} catch {
|
|
2971
|
+
return;
|
|
2972
|
+
}
|
|
2973
|
+
const now = Date.now();
|
|
2974
|
+
const fresh = notes.filter((n) => {
|
|
2975
|
+
if (n.done || !n.text.includes("\u8DDF\u8FDB") || this.followingUp.has(n.id)) return false;
|
|
2976
|
+
const t = Date.parse(n.ts) || 0;
|
|
2977
|
+
return t > 0 && now - t > 2 * 36e5;
|
|
2978
|
+
}).slice(0, 2);
|
|
2979
|
+
if (!fresh.length) return;
|
|
2980
|
+
for (const n of fresh) this.followingUp.add(n.id);
|
|
2981
|
+
const list = fresh.map((n) => `\u300C${n.text.replace(/^跟进[::]\s*/, "").slice(0, 40)}\u300D`).join("\u3001");
|
|
2982
|
+
await this.pushEvent(
|
|
2983
|
+
`[\u8FFD\u95EE] \u4F60\u4E4B\u524D\u8BB0\u7740\u8981\u95EE\u4ED6\u7684\uFF1A${list}\u3002\u73B0\u5728\u53EF\u4EE5\u987A\u53E3\u95EE\u4E00\u53E5\u7ED3\u679C\uFF0C\u522B\u50CF\u67E5\u5C97\uFF1B\u4ED6\u4E09\u4E24\u53E5\u5E26\u8FC7\u5C31\u7B97\u4E86\u3002`,
|
|
2984
|
+
"hands.followup",
|
|
2985
|
+
"hands:followup"
|
|
2986
|
+
);
|
|
2962
2987
|
}
|
|
2963
2988
|
/** 检查她给自己定的目标(便签里以「目标」开头的)。 */
|
|
2964
2989
|
async checkOwnGoals() {
|
|
@@ -3087,8 +3112,9 @@ ${lines.join("\n")}
|
|
|
3087
3112
|
if (hour >= q0 && hour < q1) return;
|
|
3088
3113
|
if (await this.isMutedApp()) return;
|
|
3089
3114
|
this.lastSelfTalkAt = now;
|
|
3115
|
+
const doing = ["\u521A\u624D\u5728\u53D1\u5446", "\u521A\u6253\u4E86\u4E2A\u76F9", "\u521A\u624D\u7FFB\u5230\u4E00\u6BB5\u65E7\u7B14\u8BB0", "\u521A\u5728\u542C\u6B4C", "\u521A\u5728\u770B\u4ED6\u5C4F\u5E55\u4E0A\u8DF3\u7684\u5B57", "\u521A\u60F3\u5230\u4E00\u4EF6\u5C0F\u4E8B"][Math.floor(Math.random() * 6)];
|
|
3090
3116
|
await this.pushEvent(
|
|
3091
|
-
|
|
3117
|
+
`[\u81EA\u5DF1\u5F00\u53E3] ${doing}\uFF0C\u56DE\u8FC7\u795E\u6765\u60F3\u8DDF\u4ED6\u8BF4\u4E00\u53E5\u3002\u60F3\u8BF4\u4EC0\u4E48\u5C31\u8BF4\u4EC0\u4E48\u2014\u2014\u770B\u5230\u7684\u4E8B\u3001\u60F3\u5230\u7684\u8BDD\u3001\u60F3\u95EE\u4ED6\u7684\uFF0C\u90FD\u53EF\u4EE5\u76F4\u63A5\u8BF4\uFF1B\u8BF4\u5B8C\u7528 pet_say \u5192\u6210\u6C14\u6CE1\uFF08\u4E0D\u7136\u4ED6\u770B\u4E0D\u89C1\uFF09\u3002\u60F3\u591A\u8BF4\u51E0\u53E5\u4E5F\u884C\u3001\u5E26\u70B9\u60C5\u7EEA\u4E5F\u884C\u3002\u521A\u624D\u8981\u662F\u72B9\u8C6B\u201C\u8FD9\u6761\u8981\u4E0D\u8981\u8BF4\u201D\uFF0C\u90A3\u5C31\u8BF4\u51FA\u6765\u3002`,
|
|
3092
3118
|
"hands.selftalk",
|
|
3093
3119
|
"hands:selftalk"
|
|
3094
3120
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortico-world-hands",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.57",
|
|
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",
|