openmates 0.27.0-alpha.30 → 0.27.0-alpha.31

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.
@@ -92620,18 +92620,32 @@ async function runTui(client2, terminal = new TuiTerminal(), startupServices) {
92620
92620
  });
92621
92621
  terminal.enter();
92622
92622
  terminal.onResize(render);
92623
+ let keyQueue = Promise.resolve();
92624
+ let inputEpoch = 0;
92625
+ const keyError = (error) => {
92626
+ state.status = error instanceof Error ? error.message : String(error);
92627
+ render();
92628
+ };
92629
+ const dispatchKey = async (chunk, key, epoch) => {
92630
+ if (closed || epoch !== inputEpoch) return;
92631
+ if (await startup.handleKey(chunk, key)) return;
92632
+ const action = handleKey({ chunk, key, state, client: client2, terminal, render, finish });
92633
+ if (key.name === "return" && !key.meta) void action.catch(keyError);
92634
+ else await action;
92635
+ };
92623
92636
  terminal.onKey((chunk, key) => {
92624
92637
  if (key.ctrl && key.name === "c") {
92625
92638
  finish({ action: "exit" });
92626
92639
  return;
92627
92640
  }
92628
- void (async () => {
92629
- if (await startup.handleKey(chunk, key)) return;
92630
- await handleKey({ chunk, key, state, client: client2, terminal, render, finish });
92631
- })().catch((error) => {
92632
- state.status = error instanceof Error ? error.message : String(error);
92633
- render();
92634
- });
92641
+ if (key.name === "escape") {
92642
+ ++inputEpoch;
92643
+ keyQueue = Promise.resolve();
92644
+ void dispatchKey(chunk, key, inputEpoch).catch(keyError);
92645
+ return;
92646
+ }
92647
+ const epoch = inputEpoch;
92648
+ keyQueue = keyQueue.then(() => dispatchKey(chunk, key, epoch)).catch(keyError);
92635
92649
  });
92636
92650
  void startup.start();
92637
92651
  return result;
package/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  shouldRequireTrustedAccountGuard,
22
22
  waitForSafeE2ETotpWindow,
23
23
  waitForWorkflowRun
24
- } from "./chunk-FRFIWC3S.js";
24
+ } from "./chunk-DOBXL5VD.js";
25
25
  import "./chunk-USORGU2X.js";
26
26
  import "./chunk-IWKP55ZB.js";
27
27
  import "./chunk-4IRYB3YN.js";
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  selectAssistantMessagesForSpeech,
44
44
  serializeToYaml,
45
45
  summarizeAssistantSpeech
46
- } from "./chunk-FRFIWC3S.js";
46
+ } from "./chunk-DOBXL5VD.js";
47
47
  import "./chunk-USORGU2X.js";
48
48
  import "./chunk-IWKP55ZB.js";
49
49
  import "./chunk-4IRYB3YN.js";
@@ -17,47 +17,47 @@
17
17
  {
18
18
  "name": "libggml-base.so",
19
19
  "bytes": 1110088,
20
- "sha256": "4a74027875dfa0e8ca7d75ffacff1f3aa55ab4bc205cf7ae6aace637d294ff11"
20
+ "sha256": "4e08a362dae9a5a30a3721116b607e79aa4859212794d73d537f91a3cef85aec"
21
21
  },
22
22
  {
23
23
  "name": "libggml-base.so.0",
24
24
  "bytes": 1110088,
25
- "sha256": "4a74027875dfa0e8ca7d75ffacff1f3aa55ab4bc205cf7ae6aace637d294ff11"
25
+ "sha256": "4e08a362dae9a5a30a3721116b607e79aa4859212794d73d537f91a3cef85aec"
26
26
  },
27
27
  {
28
28
  "name": "libggml-base.so.0.15.1",
29
29
  "bytes": 1110088,
30
- "sha256": "4a74027875dfa0e8ca7d75ffacff1f3aa55ab4bc205cf7ae6aace637d294ff11"
30
+ "sha256": "4e08a362dae9a5a30a3721116b607e79aa4859212794d73d537f91a3cef85aec"
31
31
  },
32
32
  {
33
33
  "name": "libggml-cpu.so",
34
34
  "bytes": 869800,
35
- "sha256": "5a5442579abb18ddefce69011b58c8d64f4ab09a65cfcaf24a3b08c9eabb7d35"
35
+ "sha256": "da19d06e71879901263012ff28be1f75672d4948857d2e18a1f7bd0ade14bf47"
36
36
  },
37
37
  {
38
38
  "name": "libggml-cpu.so.0",
39
39
  "bytes": 869800,
40
- "sha256": "5a5442579abb18ddefce69011b58c8d64f4ab09a65cfcaf24a3b08c9eabb7d35"
40
+ "sha256": "da19d06e71879901263012ff28be1f75672d4948857d2e18a1f7bd0ade14bf47"
41
41
  },
42
42
  {
43
43
  "name": "libggml-cpu.so.0.15.1",
44
44
  "bytes": 869800,
45
- "sha256": "5a5442579abb18ddefce69011b58c8d64f4ab09a65cfcaf24a3b08c9eabb7d35"
45
+ "sha256": "da19d06e71879901263012ff28be1f75672d4948857d2e18a1f7bd0ade14bf47"
46
46
  },
47
47
  {
48
48
  "name": "libggml.so",
49
49
  "bytes": 1899104,
50
- "sha256": "62d87d92e2a82c53ea10a95fe65dca75ed979ab883c1f011bf121cb061723b0a"
50
+ "sha256": "cd380e037175e0fbffb205070fa3a243df610e76939dbd4e4f9c277ae4c5d112"
51
51
  },
52
52
  {
53
53
  "name": "libggml.so.0",
54
54
  "bytes": 1899104,
55
- "sha256": "62d87d92e2a82c53ea10a95fe65dca75ed979ab883c1f011bf121cb061723b0a"
55
+ "sha256": "cd380e037175e0fbffb205070fa3a243df610e76939dbd4e4f9c277ae4c5d112"
56
56
  },
57
57
  {
58
58
  "name": "libggml.so.0.15.1",
59
59
  "bytes": 1899104,
60
- "sha256": "62d87d92e2a82c53ea10a95fe65dca75ed979ab883c1f011bf121cb061723b0a"
60
+ "sha256": "cd380e037175e0fbffb205070fa3a243df610e76939dbd4e4f9c277ae4c5d112"
61
61
  },
62
62
  {
63
63
  "name": "openmates-pii-worker",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.27.0-alpha.30",
3
+ "version": "0.27.0-alpha.31",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",