cortico-world-hands 0.20.34 → 0.20.35

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 +18 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29,6 +29,9 @@ var HANDS_DEFAULTS = {
29
29
  selfTalkMinutes: 25,
30
30
  /** 多久主动看一眼屏幕;0 = 不看。 */
31
31
  screenWatchSeconds: 40,
32
+ /** 静音时段:这段时间不主动开口(回复主人不受影响)。 */
33
+ quietStartHour: 2,
34
+ quietEndHour: 7,
32
35
  qqSelf: "\u665A\u6C50",
33
36
  ritualMorning: "08:00",
34
37
  ritualNight: "23:00",
@@ -148,6 +151,18 @@ var HANDS_CONFIG_GROUP = {
148
151
  description: "\u7559\u7A7A/0 \u8868\u793A\u6BCF 6 \u5C0F\u65F6\u68C0\u67E5\u4E00\u6B21\uFF0C\u8D85\u671F\u5C31\u6E05\u3002",
149
152
  "x-hot": true
150
153
  },
154
+ [`${K}.quietStartHour`]: {
155
+ type: "number",
156
+ title: "\u9759\u97F3\u4ECE\u51E0\u70B9\u5F00\u59CB",
157
+ description: "\u8FD9\u6BB5\u65F6\u95F4\u5979\u4E0D\u4F1A\u81EA\u5DF1\u5F00\u53E3\uFF0C\u4F46\u4F60\u53EB\u5979\u3001\u6253\u5B57\u8DDF\u5979\u8BF4\u8BDD\u5979\u7167\u5E38\u56DE\u3002\u9ED8\u8BA4 2 \u70B9\u3002",
158
+ "x-hot": true
159
+ },
160
+ [`${K}.quietEndHour`]: {
161
+ type: "number",
162
+ title: "\u9759\u97F3\u5230\u51E0\u70B9\u7ED3\u675F",
163
+ description: "\u9ED8\u8BA4 7 \u70B9\u3002",
164
+ "x-hot": true
165
+ },
151
166
  [`${K}.screenWatchSeconds`]: {
152
167
  type: "number",
153
168
  title: "\u6BCF\u9694\u51E0\u79D2\u770B\u4E00\u773C\u5C4F\u5E55",
@@ -2745,6 +2760,9 @@ ${lines.join("\n")}
2745
2760
  const now = Date.now();
2746
2761
  if (now - this.lastSelfTalkAt < minutes * 6e4) return;
2747
2762
  const hour = new Date(now).getHours();
2763
+ const q0 = Number(this.opts.cfg.quietStartHour ?? 2);
2764
+ const q1 = Number(this.opts.cfg.quietEndHour ?? 7);
2765
+ if (hour >= q0 && hour < q1) return;
2748
2766
  this.lastSelfTalkAt = now;
2749
2767
  await this.pushEvent(
2750
2768
  "[\u81EA\u5DF1\u5F00\u53E3] \u5B89\u9759\u4E00\u9635\u4E86\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\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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.20.34",
3
+ "version": "0.20.35",
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",