cortico-world-hands 0.20.6 → 0.20.8

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 +21 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2979,6 +2979,27 @@ ${text.slice(0, 2200)}`;
2979
2979
  } catch {
2980
2980
  first = raw.slice(0, 120);
2981
2981
  }
2982
+ let pipeline = "";
2983
+ try {
2984
+ await this.hands.wakeScreen();
2985
+ await new Promise((r) => setTimeout(r, 700));
2986
+ await this.hands.unlockScreen();
2987
+ await new Promise((r) => setTimeout(r, 600));
2988
+ const opened = await this.hands.qqOpenReply(text, to || void 0);
2989
+ let r2 = {};
2990
+ try {
2991
+ r2 = JSON.parse(opened);
2992
+ } catch {
2993
+ r2 = { error: opened.slice(0, 80) };
2994
+ }
2995
+ if (r2.ok) {
2996
+ return `\u6211\u5524\u5C4F\u3001\u89E3\u9501\u3001\u5F00 QQ \u56DE\u7684${to ? "\uFF08" + to + "\uFF09" : ""}\uFF1A${text}`;
2997
+ }
2998
+ pipeline = r2.error || "\u6CA1\u56DE\u6210";
2999
+ } catch (err) {
3000
+ pipeline = String(err).slice(0, 80);
3001
+ }
3002
+ return failed(`\u5FEB\u901F\u56DE\u590D\u4E0D\u884C\uFF0C\u81EA\u52A8\u5F00 QQ \u4E5F\u6CA1\u6210\uFF08${pipeline}\uFF09`);
2982
3003
  return failed(
2983
3004
  `\u901A\u77E5\u91CC\u6CA1\u6709\u5FEB\u901F\u56DE\u590D\u5165\u53E3\uFF08${first}\uFF09\u3002\u8FD9\u6761\u522B\u7528\u811A\u672C\u56DE\uFF0C\u7528\u4F60\u81EA\u5DF1\u7684\u624B\uFF1Apet_open_app \u6253\u5F00 QQ \u2192 hand_look \u770B\u4E00\u773C \u2192 hand_tap \u70B9\u5BF9\u8BDD \u2192 hand_type \u6253\u5B57 \u2192 hand_tap \u70B9\u300C\u53D1\u9001\u300D\u2192 \u5207\u56DE\u4E3B\u4EBA\u539F\u6765\u7684\u5E94\u7528\u3002\u4E00\u6B21\u53EA\u56DE\u4E00\u6761\uFF0C\u56DE\u5B8C\u5C31\u9000\u51FA\u6765\u3002`
2984
3005
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-hands",
3
- "version": "0.20.6",
3
+ "version": "0.20.8",
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",