@celljs/ta-web 4.13.1 → 4.14.0

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 (85) hide show
  1. package/README.en.md +2 -2
  2. package/README.md +2 -2
  3. package/esm/browser/assistant/assistant-extension.js +3 -2
  4. package/esm/browser/assistant/assistant-state.js +2 -2
  5. package/esm/browser/components/app-view.js +4 -0
  6. package/esm/browser/components/chat-asks.d.ts +8 -0
  7. package/esm/browser/components/chat-asks.js +10 -0
  8. package/esm/browser/components/chat-list.js +11 -1
  9. package/esm/browser/components/composer-box.d.ts +2 -0
  10. package/esm/browser/components/composer-box.js +2 -1
  11. package/esm/browser/components/composer.d.ts +3 -1
  12. package/esm/browser/components/composer.js +16 -4
  13. package/esm/browser/components/face.d.ts +13 -1
  14. package/esm/browser/components/face.js +16 -1
  15. package/esm/browser/components/host-view.d.ts +1 -1
  16. package/esm/browser/components/message-list.js +20 -1
  17. package/esm/browser/components/people.d.ts +32 -0
  18. package/esm/browser/components/people.js +71 -0
  19. package/esm/browser/components/session-view.d.ts +1 -1
  20. package/esm/browser/components/session-view.js +56 -36
  21. package/esm/browser/components/settings-parts.js +14 -3
  22. package/esm/browser/components/sign-in-setup.d.ts +16 -0
  23. package/esm/browser/components/sign-in-setup.js +116 -0
  24. package/esm/browser/components/use-seen-chats.d.ts +2 -0
  25. package/esm/browser/components/use-seen-chats.js +2 -2
  26. package/esm/browser/extension/web-api-components.d.ts +12 -0
  27. package/esm/browser/extension/web-extension-api.d.ts +2 -2
  28. package/esm/browser/i18n/locales.d.ts +35 -1
  29. package/esm/browser/i18n/messages.d.ts +34 -0
  30. package/esm/browser/i18n/messages.js +69 -0
  31. package/esm/browser/presence/presence-reporter.d.ts +32 -0
  32. package/esm/browser/presence/presence-reporter.js +71 -0
  33. package/esm/browser/style/conversation.d.ts +1 -1
  34. package/esm/browser/style/conversation.js +24 -0
  35. package/esm/browser/style/layout.d.ts +1 -1
  36. package/esm/browser/style/layout.js +8 -0
  37. package/esm/browser/style/pages.d.ts +1 -1
  38. package/esm/browser/style/pages.js +8 -0
  39. package/esm/browser/workbench-protocol.d.ts +9 -0
  40. package/esm/browser/workbench-util.d.ts +2 -0
  41. package/esm/browser/workbench-util.js +18 -0
  42. package/esm/browser/workbench.d.ts +3 -0
  43. package/esm/browser/workbench.js +14 -4
  44. package/lib/browser/assistant/assistant-extension.js +3 -2
  45. package/lib/browser/assistant/assistant-state.js +1 -1
  46. package/lib/browser/components/app-view.js +4 -0
  47. package/lib/browser/components/chat-asks.d.ts +8 -0
  48. package/lib/browser/components/chat-asks.js +10 -0
  49. package/lib/browser/components/chat-list.js +11 -1
  50. package/lib/browser/components/composer-box.d.ts +2 -0
  51. package/lib/browser/components/composer-box.js +2 -1
  52. package/lib/browser/components/composer.d.ts +3 -1
  53. package/lib/browser/components/composer.js +16 -4
  54. package/lib/browser/components/face.d.ts +13 -1
  55. package/lib/browser/components/face.js +16 -1
  56. package/lib/browser/components/host-view.d.ts +1 -1
  57. package/lib/browser/components/message-list.js +19 -0
  58. package/lib/browser/components/people.d.ts +33 -0
  59. package/lib/browser/components/people.js +109 -0
  60. package/lib/browser/components/session-view.d.ts +1 -1
  61. package/lib/browser/components/session-view.js +56 -36
  62. package/lib/browser/components/settings-parts.js +14 -3
  63. package/lib/browser/components/sign-in-setup.d.ts +17 -0
  64. package/lib/browser/components/sign-in-setup.js +153 -0
  65. package/lib/browser/components/use-seen-chats.d.ts +2 -0
  66. package/lib/browser/components/use-seen-chats.js +3 -2
  67. package/lib/browser/extension/web-api-components.d.ts +12 -0
  68. package/lib/browser/extension/web-extension-api.d.ts +2 -2
  69. package/lib/browser/i18n/locales.d.ts +35 -1
  70. package/lib/browser/i18n/messages.d.ts +34 -0
  71. package/lib/browser/i18n/messages.js +69 -0
  72. package/lib/browser/presence/presence-reporter.d.ts +33 -0
  73. package/lib/browser/presence/presence-reporter.js +75 -0
  74. package/lib/browser/style/conversation.d.ts +1 -1
  75. package/lib/browser/style/conversation.js +24 -0
  76. package/lib/browser/style/layout.d.ts +1 -1
  77. package/lib/browser/style/layout.js +8 -0
  78. package/lib/browser/style/pages.d.ts +1 -1
  79. package/lib/browser/style/pages.js +8 -0
  80. package/lib/browser/workbench-protocol.d.ts +9 -0
  81. package/lib/browser/workbench-util.d.ts +2 -0
  82. package/lib/browser/workbench-util.js +18 -0
  83. package/lib/browser/workbench.d.ts +3 -0
  84. package/lib/browser/workbench.js +14 -4
  85. package/package.json +10 -10
@@ -13,6 +13,7 @@ const ta_protocol_1 = require("@celljs/ta-protocol");
13
13
  const ta_relay_1 = require("@celljs/ta-relay");
14
14
  const hosts_1 = require("./hosts");
15
15
  const device_values_1 = require("./offline/device-values");
16
+ const presence_reporter_1 = require("./presence/presence-reporter");
16
17
  const settings_protocol_1 = require("./settings/settings-protocol");
17
18
  const state_protocol_1 = require("./state/state-protocol");
18
19
  const workbench_calls_1 = require("./workbench-calls");
@@ -22,6 +23,12 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
22
23
  constructor() {
23
24
  this.list = workbench_util_1.WorkbenchUtil.readHosts((0, workbench_util_1.storage)());
24
25
  this.current = { status: 'connecting', hosts: this.list.hosts, host: this.list.current, sessions: [], saved: [] };
26
+ /** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
27
+ this.presence = new presence_reporter_1.PresenceReporter(state => {
28
+ if (this.connection && this.current.status === 'online') {
29
+ this.connection.presence.report(state).catch(() => undefined);
30
+ }
31
+ });
25
32
  this.attempts = 0;
26
33
  this.graceMs = workbench_util_1.GRACE_MS;
27
34
  /** What was kept of the computers dropped, being taken off the device. */
@@ -141,13 +148,13 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
141
148
  }
142
149
  async start() {
143
150
  this.watchWake();
144
- const fromUrl = new URLSearchParams(location.hash.slice(1)).get('token');
151
+ const fragment = new URLSearchParams(location.hash.slice(1));
152
+ // A token of `ta serve --web`, or a pairing link: the page of a relay opened for one let in from a browser (docs/design/ta-team.md 8.3).
153
+ const fromUrl = workbench_util_1.WorkbenchUtil.fromFragment(fragment);
145
154
  if (fromUrl) {
146
155
  // Out of the address bar, the history and bookmarks.
147
156
  history.replaceState(null, '', location.pathname + location.search);
148
- }
149
- if (fromUrl) {
150
- this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf({ token: fromUrl }, (0, workbench_util_1.pageHost)()), { token: fromUrl }, Date.now()));
157
+ this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf(fromUrl, (0, workbench_util_1.pageHost)()), fromUrl, Date.now()));
151
158
  }
152
159
  const host = this.list.hosts.find(one => one.id === this.list.current);
153
160
  if (host) {
@@ -351,6 +358,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
351
358
  return;
352
359
  }
353
360
  this.update({ status: 'online', retryAt: undefined });
361
+ this.presence.resend();
354
362
  void this.refresh();
355
363
  void this.watchRemote(connection);
356
364
  this.roomsWatched = undefined;
@@ -365,6 +373,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
365
373
  // Through a relay the computer has let the page in once the socket is open, and no gateway is behind
366
374
  // it: the calls of the page go now, with the one that reads who it is, not a round trip after it.
367
375
  this.update({ status: 'online', error: undefined, retryAt: undefined });
376
+ this.presence.resend();
368
377
  }
369
378
  let server;
370
379
  try {
@@ -383,6 +392,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
383
392
  }
384
393
  this.keepHosts(hosts_1.HostUtil.use(this.list, workbench_util_1.WorkbenchUtil.serverOf(credential, (0, workbench_util_1.pageHost)()), credential, Date.now(), { user: server.user, host: server.host }));
385
394
  this.update({ status: 'online', error: undefined, retryAt: undefined, server });
395
+ this.presence.resend();
386
396
  await this.refresh();
387
397
  }
388
398
  /** A connection to the computer of `credential`, not opened yet, and whether that computer refused it once it failed. */
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@celljs/ta-web",
3
- "version": "4.13.1",
3
+ "version": "4.14.0",
4
4
  "description": "The web client of ta serve: sessions, streaming messages, tool runs with diffs, and dialogs",
5
5
  "keywords": [
6
6
  "cell-component"
7
7
  ],
8
- "homepage": "https://github.com/cellbang/cell",
8
+ "homepage": "https://github.com/cellbang/ta",
9
9
  "bugs": {
10
- "url": "https://github.com/cellbang/cell/issues"
10
+ "url": "https://github.com/cellbang/ta/issues"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
@@ -33,19 +33,19 @@
33
33
  "watch": "tsc -b -w --preserveWatchOutput"
34
34
  },
35
35
  "dependencies": {
36
- "@celljs/core": "4.13.1",
37
- "@celljs/react": "4.13.1",
38
- "@celljs/ta-client": "4.13.1",
39
- "@celljs/ta-protocol": "4.13.1",
40
- "@celljs/ta-relay": "4.13.1",
41
- "@celljs/widget": "4.13.1",
36
+ "@celljs/core": "4.14.0",
37
+ "@celljs/react": "4.14.0",
38
+ "@celljs/ta-client": "4.14.0",
39
+ "@celljs/ta-protocol": "4.14.0",
40
+ "@celljs/ta-relay": "4.14.0",
41
+ "@celljs/widget": "4.14.0",
42
42
  "@types/three": "^0.187.0",
43
43
  "@xterm/addon-fit": "^0.11.0",
44
44
  "@xterm/addon-unicode11": "^0.9.0",
45
45
  "@xterm/addon-webgl": "^0.19.0",
46
46
  "@xterm/xterm": "^6.0.0",
47
47
  "katex": "^0.18.11",
48
- "lucide-react": "^1.72.0",
48
+ "lucide-react": "^1.73.0",
49
49
  "mermaid": "^12.3.0",
50
50
  "monaco-editor": "^0.57.0",
51
51
  "phaser": "^4.2.1",