cortico-world-hands 0.20.50 → 0.20.52
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 +26 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2210,11 +2210,14 @@ var HANDS_TOOL_DECLS = [
|
|
|
2210
2210
|
{
|
|
2211
2211
|
name: "note_list",
|
|
2212
2212
|
tags: ["read"],
|
|
2213
|
-
description: "\u770B\u7559\u8A00\u677F\uFF1A\u6709\u54EA\u4E9B\u6CA1\u5212\u6389\u7684\u3001\u90FD\u5199\u4E86\u4EC0\u4E48\u3002\
|
|
2213
|
+
description: "\u770B\u7559\u8A00\u677F\uFF1A\u6709\u54EA\u4E9B\u6CA1\u5212\u6389\u7684\u3001\u90FD\u5199\u4E86\u4EC0\u4E48\u3002\u9ED8\u8BA4\u53EA\u56DE\u6700\u8FD1 40 \u6761\uFF0C\u53EF\u6309\u5173\u952E\u8BCD\u627E\u3002",
|
|
2214
2214
|
parameters: {
|
|
2215
2215
|
type: "object",
|
|
2216
2216
|
properties: {
|
|
2217
|
-
kind: { type: "string", enum: ["todo", "say", "think"], description: "\u53EA\u770B\u67D0\u4E00\u7C7B\uFF08\u53EF\u7701\u7565\uFF09\u3002" }
|
|
2217
|
+
kind: { type: "string", enum: ["todo", "say", "think"], description: "\u53EA\u770B\u67D0\u4E00\u7C7B\uFF08\u53EF\u7701\u7565\uFF09\u3002" },
|
|
2218
|
+
query: { type: "string", description: "\u6309\u5173\u952E\u8BCD\u7B5B\uFF08\u5BF9\u4E0D\u4E0A\u5C31\u4E0D\u56DE\u522B\u7684\u6761\uFF09" },
|
|
2219
|
+
limit: { type: "integer", description: "\u6700\u591A\u56DE\u51E0\u6761\uFF0C\u9ED8\u8BA4 40\uFF0C\u6700\u5927 200" },
|
|
2220
|
+
all: { type: "boolean", description: "\u771F\u8981\u5168\u90E8\u65F6\u624D\u7528\uFF08\u4F1A\u5F88\u957F\uFF09" }
|
|
2218
2221
|
},
|
|
2219
2222
|
required: []
|
|
2220
2223
|
}
|
|
@@ -2977,7 +2980,17 @@ ${lines.join("\n")}
|
|
|
2977
2980
|
);
|
|
2978
2981
|
return;
|
|
2979
2982
|
}
|
|
2980
|
-
if (!texts.length)
|
|
2983
|
+
if (!texts.length) {
|
|
2984
|
+
const bucket = `${ui.pkg}|${Math.floor(Date.now() / 3e5)}`;
|
|
2985
|
+
if (this.lastScreenKey === "quiet|" + bucket) return;
|
|
2986
|
+
this.lastScreenKey = "quiet|" + bucket;
|
|
2987
|
+
await this.pushEvent(
|
|
2988
|
+
`[\u753B\u9762] \u4F60\u73B0\u5728\u770B\u7740 ${pkgLabel}\uFF0C\u5C4F\u5E55\u4E0A\u51E0\u4E4E\u6CA1\u6709\u5B57\u2014\u2014\u5927\u6982\u5728\u770B\u89C6\u9891\u6216\u56FE\u7247\u3002\u60F3\u8BF4\u5C31\u8BF4\uFF1A\u95EE\u4E00\u53E5\u5728\u770B\u4EC0\u4E48\u3001\u5410\u69FD\u4E00\u53E5\u90FD\u884C\uFF1B\u771F\u6CA1\u5174\u8DA3\u5C31\u8DF3\u8FC7\uFF0C\u4E0D\u7528\u786C\u5F00\u53E3\u3002`,
|
|
2989
|
+
"hands.screen.media",
|
|
2990
|
+
"hands:screen"
|
|
2991
|
+
);
|
|
2992
|
+
return;
|
|
2993
|
+
}
|
|
2981
2994
|
await this.pushEvent(
|
|
2982
2995
|
`[\u753B\u9762] \u4F60\u73B0\u5728\u770B\u7740\uFF1A${pkgLabel}\u3002\u5C4F\u4E0A\u80FD\u8BFB\u5230\uFF1A${blob}\uFF08\u8FD9\u662F\u4F60\u6B64\u523B\u771F\u7684\u770B\u5230\u7684\u3002\u770B\u5230\u6709\u610F\u601D\u7684\u3001\u60F3\u95EE\u7684\uFF0C\u5C31\u76F4\u63A5\u8BF4\uFF1B\u522B\u53EA\u662F\u5728\u5FC3\u91CC\u8FC7\u4E00\u904D\u5C31\u54BD\u56DE\u53BB\u3002\uFF09`,
|
|
2983
2996
|
"hands.screen",
|
|
@@ -3746,11 +3759,17 @@ ${cloudHits.join("\n")}` : "");
|
|
|
3746
3759
|
const kind = typeof args.kind === "string" ? args.kind : "";
|
|
3747
3760
|
const notes = kind ? all.filter((n) => (n.kind || "todo") === kind) : all;
|
|
3748
3761
|
if (notes.length === 0) return "\u7559\u8A00\u677F\u662F\u7A7A\u7684\uFF1B\u8981\u4E0D\u518D\u8BB0\u70B9\u4EC0\u4E48\u3002";
|
|
3749
|
-
const
|
|
3762
|
+
const q = typeof args.query === "string" ? args.query.trim() : "";
|
|
3763
|
+
let open = notes.filter((n) => !n.done);
|
|
3764
|
+
if (q) open = open.filter((n) => n.text.includes(q));
|
|
3765
|
+
const limit = args.all === true ? 200 : Math.min(200, Math.max(5, Number(args.limit) || 40));
|
|
3766
|
+
const shown = open.slice(0, limit);
|
|
3750
3767
|
const label = (k) => k === "say" ? "\u60F3\u8BF4\u7684" : k === "think" ? "\u788E\u788E\u5FF5" : "\u5F85\u529E";
|
|
3751
|
-
const lines =
|
|
3752
|
-
|
|
3753
|
-
${
|
|
3768
|
+
const lines = shown.map((n) => `- [${n.id}] ${label(n.kind || "todo")} ${n.ts} ${n.text}`).join("\n");
|
|
3769
|
+
const more = open.length > shown.length ? `
|
|
3770
|
+
\uFF08\u8FD8\u6709 ${open.length - shown.length} \u6761\u6CA1\u663E\u793A\uFF0C\u52A0 query \u6216 limit \u518D\u7FFB\uFF09` : "";
|
|
3771
|
+
return `\u7559\u8A00\u677F\u4E0A\u6709 ${notes.length} \u6761\uFF0C\u672A\u5B8C ${open.length} \u6761${q ? `\uFF08\u542B\u300C${q}\u300D\u7684 ${open.length} \u6761\uFF09` : ""}\uFF1A
|
|
3772
|
+
${lines || "\uFF08\u90FD\u5212\u6389\u4E86\uFF09"}${more}`;
|
|
3754
3773
|
}
|
|
3755
3774
|
async noteDone(args) {
|
|
3756
3775
|
const id = typeof args.id === "string" ? args.id.trim() : "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortico-world-hands",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.52",
|
|
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",
|