@celljs/ta-web 4.45.1 → 4.46.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 (133) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/esm/browser/assistant/assistant-view.js +8 -8
  4. package/esm/browser/assistant/assistant.d.ts +3 -1
  5. package/esm/browser/assistant/assistant.js +10 -4
  6. package/esm/browser/chat/chat-stores.d.ts +1 -3
  7. package/esm/browser/chat/chat-stores.js +3 -18
  8. package/esm/browser/chat/chat-view.js +9 -3
  9. package/esm/browser/chat/web-client-tools.d.ts +15 -0
  10. package/esm/browser/chat/web-client-tools.js +35 -0
  11. package/esm/browser/components/app-shell-hooks.js +2 -1
  12. package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
  13. package/esm/browser/components/composer-addon-util.d.ts +3 -1
  14. package/esm/browser/components/composer-addon-util.js +22 -0
  15. package/esm/browser/components/composer-addons.d.ts +2 -1
  16. package/esm/browser/components/composer-addons.js +1 -1
  17. package/esm/browser/components/hero-cards-util.d.ts +15 -0
  18. package/esm/browser/components/hero-cards-util.js +25 -0
  19. package/esm/browser/components/hero-cards.d.ts +13 -3
  20. package/esm/browser/components/hero-cards.js +41 -11
  21. package/esm/browser/components/host-view.d.ts +1 -1
  22. package/esm/browser/components/profile-view.js +31 -1
  23. package/esm/browser/components/recent-shots-access.d.ts +9 -0
  24. package/esm/browser/components/recent-shots-access.js +29 -0
  25. package/esm/browser/components/settings-more.js +2 -1
  26. package/esm/browser/components/settings-parts.js +5 -2
  27. package/esm/browser/components/workbench-tabs.js +1 -1
  28. package/esm/browser/components/workbench-view.js +3 -5
  29. package/esm/browser/device/hold.d.ts +5 -2
  30. package/esm/browser/device/hold.js +7 -4
  31. package/esm/browser/extension/icons.js +2 -1
  32. package/esm/browser/extension/web-api-composer.d.ts +51 -0
  33. package/esm/browser/extension/web-api-composer.js +2 -0
  34. package/esm/browser/extension/web-api-contributions.d.ts +5 -33
  35. package/esm/browser/extension/web-api-desktop.d.ts +5 -0
  36. package/esm/browser/extension/web-api-spec.js +1 -0
  37. package/esm/browser/extension/web-extension-context.js +6 -0
  38. package/esm/browser/i18n/en/assistant.d.ts +1 -0
  39. package/esm/browser/i18n/en/assistant.js +1 -0
  40. package/esm/browser/i18n/en/chat.d.ts +1 -0
  41. package/esm/browser/i18n/en/chat.js +1 -0
  42. package/esm/browser/i18n/en/settings.d.ts +5 -0
  43. package/esm/browser/i18n/en/settings.js +5 -0
  44. package/esm/browser/i18n/ja/assistant.js +1 -0
  45. package/esm/browser/i18n/ja/chat.js +1 -0
  46. package/esm/browser/i18n/ja/settings.js +5 -0
  47. package/esm/browser/i18n/locales.d.ts +8 -1
  48. package/esm/browser/i18n/messages.d.ts +7 -0
  49. package/esm/browser/i18n/zh/assistant.js +1 -0
  50. package/esm/browser/i18n/zh/chat.js +1 -0
  51. package/esm/browser/i18n/zh/settings.js +5 -0
  52. package/esm/browser/i18n/zh-tw/assistant.js +1 -0
  53. package/esm/browser/i18n/zh-tw/chat.js +1 -0
  54. package/esm/browser/i18n/zh-tw/settings.js +5 -0
  55. package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
  56. package/esm/browser/share/shared-page.js +3 -5
  57. package/esm/browser/style/chat-list.d.ts +1 -1
  58. package/esm/browser/style/chat-list.js +2 -0
  59. package/esm/browser/style/layout.d.ts +1 -1
  60. package/esm/browser/style/layout.js +5 -2
  61. package/esm/browser/style/pages.d.ts +1 -1
  62. package/esm/browser/style/pages.js +2 -0
  63. package/esm/browser/style.d.ts +10 -0
  64. package/esm/browser/style.js +35 -0
  65. package/esm/browser/util/desktop.d.ts +9 -0
  66. package/esm/browser/util/desktop.js +5 -1
  67. package/esm/browser/video-call/call-window.js +2 -4
  68. package/lib/browser/assistant/assistant-view.js +7 -7
  69. package/lib/browser/assistant/assistant.d.ts +3 -1
  70. package/lib/browser/assistant/assistant.js +10 -4
  71. package/lib/browser/chat/chat-stores.d.ts +1 -3
  72. package/lib/browser/chat/chat-stores.js +3 -18
  73. package/lib/browser/chat/chat-view.js +8 -2
  74. package/lib/browser/chat/web-client-tools.d.ts +16 -0
  75. package/lib/browser/chat/web-client-tools.js +38 -0
  76. package/lib/browser/components/app-shell-hooks.js +2 -1
  77. package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
  78. package/lib/browser/components/composer-addon-util.d.ts +3 -1
  79. package/lib/browser/components/composer-addon-util.js +22 -0
  80. package/lib/browser/components/composer-addons.d.ts +2 -1
  81. package/lib/browser/components/composer-addons.js +1 -1
  82. package/lib/browser/components/hero-cards-util.d.ts +16 -0
  83. package/lib/browser/components/hero-cards-util.js +28 -0
  84. package/lib/browser/components/hero-cards.d.ts +13 -3
  85. package/lib/browser/components/hero-cards.js +43 -11
  86. package/lib/browser/components/host-view.d.ts +1 -1
  87. package/lib/browser/components/profile-view.js +30 -0
  88. package/lib/browser/components/recent-shots-access.d.ts +10 -0
  89. package/lib/browser/components/recent-shots-access.js +65 -0
  90. package/lib/browser/components/settings-more.js +2 -1
  91. package/lib/browser/components/settings-parts.js +5 -2
  92. package/lib/browser/components/workbench-tabs.js +1 -1
  93. package/lib/browser/components/workbench-view.js +2 -4
  94. package/lib/browser/device/hold.d.ts +5 -2
  95. package/lib/browser/device/hold.js +7 -4
  96. package/lib/browser/extension/icons.js +1 -0
  97. package/lib/browser/extension/web-api-composer.d.ts +52 -0
  98. package/lib/browser/extension/web-api-composer.js +3 -0
  99. package/lib/browser/extension/web-api-contributions.d.ts +5 -33
  100. package/lib/browser/extension/web-api-desktop.d.ts +5 -0
  101. package/lib/browser/extension/web-api-spec.js +1 -0
  102. package/lib/browser/extension/web-extension-context.js +6 -0
  103. package/lib/browser/i18n/en/assistant.d.ts +1 -0
  104. package/lib/browser/i18n/en/assistant.js +1 -0
  105. package/lib/browser/i18n/en/chat.d.ts +1 -0
  106. package/lib/browser/i18n/en/chat.js +1 -0
  107. package/lib/browser/i18n/en/settings.d.ts +5 -0
  108. package/lib/browser/i18n/en/settings.js +5 -0
  109. package/lib/browser/i18n/ja/assistant.js +1 -0
  110. package/lib/browser/i18n/ja/chat.js +1 -0
  111. package/lib/browser/i18n/ja/settings.js +5 -0
  112. package/lib/browser/i18n/locales.d.ts +8 -1
  113. package/lib/browser/i18n/messages.d.ts +7 -0
  114. package/lib/browser/i18n/zh/assistant.js +1 -0
  115. package/lib/browser/i18n/zh/chat.js +1 -0
  116. package/lib/browser/i18n/zh/settings.js +5 -0
  117. package/lib/browser/i18n/zh-tw/assistant.js +1 -0
  118. package/lib/browser/i18n/zh-tw/chat.js +1 -0
  119. package/lib/browser/i18n/zh-tw/settings.js +5 -0
  120. package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
  121. package/lib/browser/share/shared-page.js +2 -4
  122. package/lib/browser/style/chat-list.d.ts +1 -1
  123. package/lib/browser/style/chat-list.js +2 -0
  124. package/lib/browser/style/layout.d.ts +1 -1
  125. package/lib/browser/style/layout.js +5 -2
  126. package/lib/browser/style/pages.d.ts +1 -1
  127. package/lib/browser/style/pages.js +2 -0
  128. package/lib/browser/style.d.ts +10 -0
  129. package/lib/browser/style.js +36 -1
  130. package/lib/browser/util/desktop.d.ts +9 -0
  131. package/lib/browser/util/desktop.js +5 -1
  132. package/lib/browser/video-call/call-window.js +1 -3
  133. package/package.json +7 -7
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.RecentShotsAccess = RecentShotsAccess;
37
+ const React = __importStar(require("react"));
38
+ const recent_shots_1 = require("../device/recent-shots");
39
+ const use_t_1 = require("../i18n/use-t");
40
+ const busy_1 = require("./busy");
41
+ const settings_controls_1 = require("./settings-controls");
42
+ /**
43
+ * Under the setting of recent screenshots, in Ta Desktop on macOS: the folder they are saved in (the Desktop) is one
44
+ * macOS guards, so Ta reads it only once the user allowed it here, and macOS asks then (docs/design/ta-protected-places.md).
45
+ * Nothing shows once it may be read, nor where nothing is guarded.
46
+ */
47
+ function RecentShotsAccess({ on }) {
48
+ const t = (0, use_t_1.useT)();
49
+ const source = React.useMemo(() => recent_shots_1.RecentShots.source(), []);
50
+ const [state, setState] = React.useState();
51
+ const [busy, run] = (0, busy_1.useBusy)();
52
+ React.useEffect(() => {
53
+ if (on && (source === null || source === void 0 ? void 0 : source.access)) {
54
+ void source.access().then(setState, () => undefined);
55
+ }
56
+ }, [on, source]);
57
+ const allow = source === null || source === void 0 ? void 0 : source.allow;
58
+ if (!on || !allow || !state || state === 'ready') {
59
+ return null;
60
+ }
61
+ const asking = state === 'ask';
62
+ return (React.createElement(settings_controls_1.Row, { inset: true, label: t('ta.settings.recentShotsPlace'), description: t(asking ? 'ta.settings.recentShotsPlaceAsk' : 'ta.settings.recentShotsPlaceDenied') },
63
+ React.createElement("button", { type: "button", className: busy ? 'ta-button ta-busy' : 'ta-button', onClick: () => void run(async () => setState(await allow())) }, t(asking ? 'ta.settings.recentShotsAllow' : 'ta.settings.recentShotsOpenSettings'))));
64
+ }
65
+ //# sourceMappingURL=recent-shots-access.js.map
@@ -162,7 +162,8 @@ function useMoreSections(onDialog) {
162
162
  }),
163
163
  ],
164
164
  },
165
- ...settingsSections.filter(entry => !entry.section.storage).map(extension_settings_1.extensionSection),
165
+ // Those of the profile show there (ProfileDialog).
166
+ ...settingsSections.filter(entry => !entry.section.storage && entry.section.group !== 'profile').map(extension_settings_1.extensionSection),
166
167
  ...(storage ? [storage] : []),
167
168
  // Behind a gateway only: where the Ta of this account runs.
168
169
  ...(gateway.info
@@ -49,6 +49,7 @@ const agent_settings_view_1 = require("./agent-settings-view");
49
49
  const app_nav_1 = require("./app-nav");
50
50
  const loading_1 = require("./loading");
51
51
  const model_picker_1 = require("./model-picker");
52
+ const recent_shots_access_1 = require("./recent-shots-access");
52
53
  const settings_choices_1 = require("./settings-choices");
53
54
  const settings_controls_1 = require("./settings-controls");
54
55
  const settings_more_1 = require("./settings-more");
@@ -140,8 +141,10 @@ function useParts(scope, onScope, onDialog) {
140
141
  value: String(days),
141
142
  label: days === 365 ? t('ta.settings.oneYear') : days ? t('ta.settings.days', { count: days }) : t('ta.settings.never'),
142
143
  })), onChange: value => store.update({ chatArchiveDays: Number(value) }) }))),
143
- (0, settings_controls_1.row)('recent-shots', [t('ta.settings.recentShots'), t('ta.settings.recentShotsHint')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.recentShots'), description: t('ta.settings.recentShotsHint') },
144
- React.createElement(settings_controls_1.Switch, { label: t('ta.settings.recentShots'), checked: settings.recentShots, onChange: recentShots => store.update({ recentShots }) }))),
144
+ (0, settings_controls_1.row)('recent-shots', [t('ta.settings.recentShots'), t('ta.settings.recentShotsHint')], React.createElement(React.Fragment, null,
145
+ React.createElement(settings_controls_1.Row, { label: t('ta.settings.recentShots'), description: t('ta.settings.recentShotsHint') },
146
+ React.createElement(settings_controls_1.Switch, { label: t('ta.settings.recentShots'), checked: settings.recentShots, onChange: recentShots => store.update({ recentShots }) })),
147
+ React.createElement(recent_shots_access_1.RecentShotsAccess, { on: settings.recentShots }))),
145
148
  ],
146
149
  },
147
150
  {
@@ -148,7 +148,7 @@ function TabStrip({ editors, active, views, onShow, onClose, onPin, onOpenView,
148
148
  var _a, _b;
149
149
  (_b = (_a = list.current) === null || _a === void 0 ? void 0 : _a.querySelector('.ta-editor-tab.ta-active')) === null || _b === void 0 ? void 0 : _b.scrollIntoView({ block: 'nearest', inline: 'nearest' });
150
150
  }, [active, editors.length]);
151
- return (React.createElement("header", { className: "ta-editor-tabs" },
151
+ return (React.createElement("header", { className: `ta-editor-tabs ${editors.length === 0 ? 'ta-editor-tabs-bare' : ''}` },
152
152
  React.createElement("div", { className: "ta-editor-tablist", role: "tablist", ref: list },
153
153
  editors.length === 0 && React.createElement("span", { className: "ta-workbench-title" }, t('ta.workbench')),
154
154
  editors.map(editor => {
@@ -57,11 +57,10 @@ function useDocument() {
57
57
  (0, hooks_1.useSettings)();
58
58
  const [, pwa] = (0, hooks_1.usePwa)();
59
59
  React.useEffect(() => pwa.start(), [pwa]);
60
+ // Before the browser draws what this commit made.
61
+ React.useLayoutEffect(() => style_1.PageStyle.attach(), []);
60
62
  React.useEffect(() => {
61
63
  document.title = 'Ta';
62
- const style = document.createElement('style');
63
- style.textContent = style_1.STYLE;
64
- document.head.appendChild(style);
65
64
  // Where the installed app's window is dragged when the page draws its title bar.
66
65
  const titlebar = document.createElement('div');
67
66
  titlebar.className = 'ta-titlebar';
@@ -79,7 +78,6 @@ function useDocument() {
79
78
  // maximum-scale: iOS zooms into a field under 16px on focus and stays zoomed; pinching still zooms.
80
79
  viewport.content = 'width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover, interactive-widget=resizes-content';
81
80
  return () => {
82
- style.remove();
83
81
  titlebar.remove();
84
82
  icon.remove();
85
83
  };
@@ -32,8 +32,11 @@ export interface HeldProps {
32
32
  */
33
33
  export declare function useHeld(): (hold: Hold | undefined) => HeldProps;
34
34
  export declare namespace HeldUtil {
35
- /** A light tap of the haptic engine as a held finger comes onto something (取消, 编辑): the app's, or a phone's. */
36
- function tick(): void;
35
+ /**
36
+ * A tap of the haptic engine, the app's or a phone's: light as a held finger comes onto something (取消, 编辑),
37
+ * medium for what wants to be felt (a pat on the user's face, WebUiAPI.haptic).
38
+ */
39
+ function tick(strength?: 'light' | 'medium'): void;
37
40
  /**
38
41
  * The click that follows a finger let go after a hold: not a tap of what was under it. A browser that sends
39
42
  * none (a long press is no tap to it) leaves the next press its own.
@@ -133,15 +133,18 @@ function useHeld() {
133
133
  }
134
134
  var HeldUtil;
135
135
  (function (HeldUtil) {
136
- /** A light tap of the haptic engine as a held finger comes onto something (取消, 编辑): the app's, or a phone's. */
137
- function tick() {
136
+ /**
137
+ * A tap of the haptic engine, the app's or a phone's: light as a held finger comes onto something (取消, 编辑),
138
+ * medium for what wants to be felt (a pat on the user's face, WebUiAPI.haptic).
139
+ */
140
+ function tick(strength = 'light') {
138
141
  var _a, _b;
139
142
  const haptics = (0, device_1.nativePlugin)('Haptics');
140
143
  if (haptics) {
141
- haptics('impact', { style: 'LIGHT' }).catch(() => undefined);
144
+ haptics('impact', { style: strength === 'medium' ? 'MEDIUM' : 'LIGHT' }).catch(() => undefined);
142
145
  }
143
146
  else {
144
- (_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.vibrate) === null || _b === void 0 ? void 0 : _b.call(_a, 8);
147
+ (_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.vibrate) === null || _b === void 0 ? void 0 : _b.call(_a, strength === 'medium' ? [30, 60, 30] : 8);
145
148
  }
146
149
  }
147
150
  HeldUtil.tick = tick;
@@ -92,6 +92,7 @@ exports.WEB_ICONS = Object.freeze({
92
92
  GitCommitHorizontal: lucide_react_1.GitCommitHorizontal,
93
93
  Globe: lucide_react_1.Globe,
94
94
  Grip: lucide_react_1.Grip,
95
+ Hand: lucide_react_1.Hand,
95
96
  HardDrive: lucide_react_1.HardDrive,
96
97
  Hash: lucide_react_1.Hash,
97
98
  Headphones: lucide_react_1.Headphones,
@@ -0,0 +1,52 @@
1
+ /** Part of the web extension API (web-extension-api.ts, which exports it all): what an extension adds to the message box of a conversation. */
2
+ import type * as React from 'react';
3
+ import type { WebComposerAction } from './web-api-components';
4
+ /** A conversation as its message box knows it. */
5
+ export interface WebConversation {
6
+ sessionId: string;
7
+ /** pi's file of it: what stays when it is closed and opened again; none for one not kept. */
8
+ sessionFile?: string;
9
+ cwd?: string;
10
+ /** `double`: the double's own conversation; `chat`: any other, an agent's too (TaSessionInfo.group). */
11
+ kind: 'double' | 'chat';
12
+ /** The package that opened it for its work (TaOpenSessionOptions.group): `@celljs/ta-channels` for an agent. */
13
+ group?: string;
14
+ /** As the page names it: the name of the session, or of the double. */
15
+ title?: string;
16
+ }
17
+ /** What an extension adds to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
18
+ export interface WebComposerAddon {
19
+ /** Entries of the + menu, a section of their own; read each time the conversation is drawn, and when `subscribe` says. */
20
+ actions?(conversation: WebConversation): WebComposerAction[];
21
+ /** What `actions` gives changed (the data it reads came): the message boxes read them again. */
22
+ subscribe?(listener: () => void): () => void;
23
+ /** Above the box of each conversation: what is connected to it, a dialog its entries opened. Nothing to show: `null`. */
24
+ above?: React.ComponentType<{
25
+ conversation: WebConversation;
26
+ }>;
27
+ /**
28
+ * What a conversation of the extension's own shows before anything is said in it, in place of Ta's (an assistant's
29
+ * face, what it does, what to start with); undefined for the others. Asked as the conversation is drawn: answer at
30
+ * once. Newer than some Ta apps, which show their own.
31
+ */
32
+ empty?(conversation: WebConversation): React.ReactNode | undefined;
33
+ /**
34
+ * What the user may start with in an empty conversation, beside Ta's own: a card each, under its face, for a new
35
+ * user to see what Ta does and have it done in one tap (docs/design/ta-onboarding.md). Answer at once; at most a
36
+ * few, the most telling first. Newer than some Ta apps, which show only theirs.
37
+ */
38
+ starters?(conversation: WebConversation): WebStarter[];
39
+ }
40
+ /** A card of an empty conversation (WebComposerAddon.starters): a picture, a few words, and what picking it does. */
41
+ export interface WebStarter {
42
+ key: string;
43
+ /** A `ui.Picture`. */
44
+ picture: React.ReactNode;
45
+ /** Two to six words: what the user gets. */
46
+ label: string;
47
+ /** Sent as the user's message when picked: one that works with nothing more said, in any directory. */
48
+ prompt?: string;
49
+ /** Done instead of sending a message (opening a page). */
50
+ run?(): void;
51
+ }
52
+ //# sourceMappingURL=web-api-composer.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=web-api-composer.js.map
@@ -1,30 +1,19 @@
1
1
  /** Part of the web extension API (web-extension-api.ts, which exports it all): what an extension registers, and what the page tells it of them. */
2
2
  import type { TaRoomInfo } from '@celljs/ta-protocol';
3
3
  import type * as React from 'react';
4
- import type { WebComposerAction } from './web-api-components';
5
4
  import type { WebIcon } from './web-extension-api';
6
5
  export type * from './web-api-call';
7
6
  export type * from './web-api-chats';
8
- /** A conversation as its message box knows it. */
9
- export interface WebConversation {
10
- sessionId: string;
11
- /** pi's file of it: what stays when it is closed and opened again; none for one not kept. */
12
- sessionFile?: string;
13
- cwd?: string;
14
- /** `double`: the double's own conversation; `chat`: any other, an agent's too (TaSessionInfo.group). */
15
- kind: 'double' | 'chat';
16
- /** The package that opened it for its work (TaOpenSessionOptions.group): `@celljs/ta-channels` for an agent. */
17
- group?: string;
18
- /** As the page names it: the name of the session, or of the double. */
19
- title?: string;
20
- }
7
+ export type * from './web-api-composer';
21
8
  /**
22
9
  * The groups of the settings, by what the user looks for (docs/design/ta-places.md): `general` (how Ta looks), `chats`
23
10
  * (the list, notices, who answers others, what is kept), `ta` (models, the double, coding agents), `initiative` (what
24
11
  * Ta does by itself), `voice` (speech, calls), `devices` (devices, other computers, the network), `privacy` (secrets,
25
- * who may come in), `extensions` (what was added to Ta). Older Ta apps leave out a section of a group they do not know.
12
+ * who may come in), `extensions` (what was added to Ta); `profile` is no part of the settings but the user's profile, its
13
+ * rows under the picture and the name: what others see of them. Older Ta apps list a section of a group they do not know
14
+ * among `extensions`.
26
15
  */
27
- export type WebSettingsGroup = 'general' | 'chats' | 'ta' | 'initiative' | 'voice' | 'devices' | 'privacy' | 'extensions';
16
+ export type WebSettingsGroup = 'general' | 'chats' | 'ta' | 'initiative' | 'voice' | 'devices' | 'privacy' | 'extensions' | 'profile';
28
17
  /** A section an extension adds to the settings (WebExtensionAPI.registerSettings). */
29
18
  export interface WebSettingsSection {
30
19
  title: WebLabel;
@@ -59,23 +48,6 @@ export interface WebSettingRow {
59
48
  render: React.ComponentType;
60
49
  stacked?: boolean;
61
50
  }
62
- /** What an extension adds to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
63
- export interface WebComposerAddon {
64
- /** Entries of the + menu, a section of their own; read each time the conversation is drawn, and when `subscribe` says. */
65
- actions?(conversation: WebConversation): WebComposerAction[];
66
- /** What `actions` gives changed (the data it reads came): the message boxes read them again. */
67
- subscribe?(listener: () => void): () => void;
68
- /** Above the box of each conversation: what is connected to it, a dialog its entries opened. Nothing to show: `null`. */
69
- above?: React.ComponentType<{
70
- conversation: WebConversation;
71
- }>;
72
- /**
73
- * What a conversation of the extension's own shows before anything is said in it, in place of Ta's (an assistant's
74
- * face, what it does, what to start with); undefined for the others. Asked as the conversation is drawn: answer at
75
- * once. Newer than some Ta apps, which show their own.
76
- */
77
- empty?(conversation: WebConversation): React.ReactNode | undefined;
78
- }
79
51
  /**
80
52
  * An app of the rooms of Ta (WebExtensionAPI.registerRoomAddon), which the Rooms page draws as its own: a tile among the
81
53
  * apps of a room (its settings, as a messenger lists the apps of a group), its page pushed there, in the same panel, and
@@ -19,6 +19,11 @@ export interface WebDeviceUI {
19
19
  * pages of its own (SANDBOX_GUARDS); once it stopped, none.
20
20
  */
21
21
  readonly apps?: WebApps;
22
+ /**
23
+ * A tap of the phone's haptic engine (the Ta app's, or a browser's that vibrates; nothing elsewhere): `light` as a
24
+ * finger lands on something, `medium` for what the user should feel, a pat say. Newer than some Ta apps.
25
+ */
26
+ haptic?(strength?: 'light' | 'medium'): void;
22
27
  }
23
28
  /**
24
29
  * A tab the browser view should open or close, as Ta Desktop tells it (`ui.onWebviewTab`): a page of a webview opened a
@@ -102,6 +102,7 @@ exports.WEB_UI_SPEC = {
102
102
  setWidget: fire(A, [null, 'C', { fields: { title: 'L' } }]),
103
103
  notify: fire(A),
104
104
  notifySession: fire(A),
105
+ haptic: fire(B),
105
106
  usePages: peek(A),
106
107
  scanCode: call(A),
107
108
  scan: call(A),
@@ -73,6 +73,7 @@ const back_stack_1 = require("../device/back-stack");
73
73
  const code_scan_1 = require("../device/code-scan");
74
74
  const device_1 = require("../device/device");
75
75
  const file_save_1 = require("../device/file-save");
76
+ const hold_1 = require("../device/hold");
76
77
  const screen_awake_1 = require("../device/screen-awake");
77
78
  const drafts_protocol_1 = require("../drafts/drafts-protocol");
78
79
  const game_view_1 = require("../game/game-view");
@@ -316,6 +317,11 @@ class WebExtensionContext {
316
317
  // Heard while the extension runs, as `hear` of the API.
317
318
  onWebviewTab: webviewTabs && (listener => web_extension_run_1.WebExtensionRunUtil.track(run, () => webviewTabs(event => host.guard(run, () => listener(event))))),
318
319
  addToComposer: draft => !run.stopped && composer_target_1.ComposerTarget.add(draft),
320
+ haptic: strength => {
321
+ if (!run.stopped) {
322
+ hold_1.HeldUtil.tick(strength === 'medium' ? 'medium' : 'light');
323
+ }
324
+ },
319
325
  // An extension opens, closes and marks only tabs of its own.
320
326
  openEditor: (editor, options) => !run.stopped && host.tabs.open({ ...editor, extension: run.loaded.id, preview: (options === null || options === void 0 ? void 0 : options.preview) === true }, (options === null || options === void 0 ? void 0 : options.preserveFocus) === true),
321
327
  closeEditor: id => host.tabs.remove(editor => editor.id === id && editor.extension === run.loaded.id),
@@ -74,6 +74,7 @@ export declare const ASSISTANT_EN: {
74
74
  'ta.suggest.1.label': string;
75
75
  'ta.suggest.2.label': string;
76
76
  'ta.suggest.3.label': string;
77
+ 'ta.suggest.manual': string;
77
78
  'ta.task.running': string;
78
79
  'ta.task.done': string;
79
80
  'ta.task.failed': string;
@@ -77,6 +77,7 @@ exports.ASSISTANT_EN = {
77
77
  'ta.suggest.1.label': 'Sum up the repository',
78
78
  'ta.suggest.2.label': 'Fix failing tests',
79
79
  'ta.suggest.3.label': 'Changes of the day',
80
+ 'ta.suggest.manual': 'What Ta can do',
80
81
  'ta.task.running': 'Running',
81
82
  'ta.task.done': 'Done',
82
83
  'ta.task.failed': 'Failed',
@@ -128,6 +128,7 @@ export declare const CHAT_EN: {
128
128
  'ta.chat.noneHint': string;
129
129
  'ta.chat.title': string;
130
130
  'ta.chat.hint': string;
131
+ 'ta.chat.hintHome': string;
131
132
  'ta.chat.suggest.1': string;
132
133
  'ta.chat.suggest.2': string;
133
134
  'ta.chat.suggest.3': string;
@@ -131,6 +131,7 @@ exports.CHAT_EN = {
131
131
  'ta.chat.noneHint': 'Start one with +',
132
132
  'ta.chat.title': 'What can Ta do for you?',
133
133
  'ta.chat.hint': 'Code and commands in {cwd}, or something new for this page.',
134
+ 'ta.chat.hintHome': 'Write, look up, make a game or a page: say it in a sentence.',
134
135
  'ta.chat.suggest.1': 'Add a pomodoro timer beside the chat',
135
136
  'ta.chat.suggest.2': 'A to-do page that Ta can add to',
136
137
  'ta.chat.suggest.3': "A /standup command that sums up today's commits",
@@ -153,6 +153,11 @@ export declare const SETTINGS_EN: {
153
153
  'ta.settings.chatArchiveHint': string;
154
154
  'ta.settings.recentShots': string;
155
155
  'ta.settings.recentShotsHint': string;
156
+ 'ta.settings.recentShotsPlace': string;
157
+ 'ta.settings.recentShotsPlaceAsk': string;
158
+ 'ta.settings.recentShotsPlaceDenied': string;
159
+ 'ta.settings.recentShotsAllow': string;
160
+ 'ta.settings.recentShotsOpenSettings': string;
156
161
  'ta.settings.clipboardLinks': string;
157
162
  'ta.settings.clipboardLinksHint': string;
158
163
  'ta.settings.navigation': string;
@@ -156,6 +156,11 @@ exports.SETTINGS_EN = {
156
156
  'ta.settings.chatArchiveHint': 'Chats with no new message for this long leave the list and are no longer read with it. Find them under Archived at its end, or by search',
157
157
  'ta.settings.recentShots': 'Suggest recent screenshots',
158
158
  'ta.settings.recentShotsHint': 'When you open a chat just after taking a screenshot, it shows once above the message box; tap it to add it. In Ta Desktop and the Ta app',
159
+ 'ta.settings.recentShotsPlace': 'Read the folder of your screenshots',
160
+ 'ta.settings.recentShotsPlaceAsk': 'Screenshots are saved on the Desktop, which Ta reads only once you allow it. macOS asks once when you tap Allow',
161
+ 'ta.settings.recentShotsPlaceDenied': 'macOS did not let Ta read this folder. Turn Ta on in Files and Folders of System Settings',
162
+ 'ta.settings.recentShotsAllow': 'Allow',
163
+ 'ta.settings.recentShotsOpenSettings': 'Open System Settings',
159
164
  'ta.settings.clipboardLinks': 'Spot links of Ta you copy',
160
165
  'ta.settings.clipboardLinksHint': 'Copied a message with an invite or a share of Ta? Back in Ta, it shows what it is with Open; so does pasting it anywhere in Ta. The clipboard is read only as you come back, and nothing of it is kept. On iPhone, only once you tap Open',
161
166
  'ta.settings.navigation': 'Navigation',
@@ -76,6 +76,7 @@ exports.ASSISTANT_JA = {
76
76
  'ta.suggest.1.label': 'リポジトリをまとめる',
77
77
  'ta.suggest.2.label': '失敗したテストを修正',
78
78
  'ta.suggest.3.label': '最近 1 日の変更',
79
+ 'ta.suggest.manual': 'Ta にできること',
79
80
  'ta.task.running': '進行中',
80
81
  'ta.task.done': '完了',
81
82
  'ta.task.failed': '失敗',
@@ -130,6 +130,7 @@ exports.CHAT_JA = {
130
130
  'ta.chat.noneHint': '+ で会話を始めます',
131
131
  'ta.chat.title': 'Ta には何をしてもらいたいですか?',
132
132
  'ta.chat.hint': '{cwd} でコード・コマンド、またはこのページの新機能。',
133
+ 'ta.chat.hintHome': '文書、調べもの、ゲームやページづくり:ひと言で頼めます。',
133
134
  'ta.chat.suggest.1': '会話の隣にポモドーロタイマーを追加',
134
135
  'ta.chat.suggest.2': 'Ta も追加できるやることリストページ',
135
136
  'ta.chat.suggest.3': '今日のコミットを要約する /standup コマンド',
@@ -155,6 +155,11 @@ exports.SETTINGS_JA = {
155
155
  'ta.settings.chatArchiveHint': 'この期間新しいメッセージがない会話はリストから外され、リストとともに更新されなくなります。リストの末尾の「アーカイブ済み」または検索で見つけることができます',
156
156
  'ta.settings.recentShots': '最近のスクリーンショットを提案',
157
157
  'ta.settings.recentShotsHint': 'スクリーンショット直後に会話を開くと、メッセージボックスの上に一度表示されます。クリックして追加できます。Ta デスクトップ版と手機版 App のみ',
158
+ 'ta.settings.recentShotsPlace': 'スクリーンショットのフォルダを読む',
159
+ 'ta.settings.recentShotsPlaceAsk': 'スクリーンショットはデスクトップに保存され、許可するまで Ta は読みません。「許可」を押すと macOS が一度だけ確認します',
160
+ 'ta.settings.recentShotsPlaceDenied': 'macOS が Ta にこのフォルダの読み取りを許可していません。システム設定の「ファイルとフォルダ」で Ta をオンにしてください',
161
+ 'ta.settings.recentShotsAllow': '許可',
162
+ 'ta.settings.recentShotsOpenSettings': 'システム設定を開く',
158
163
  'ta.settings.clipboardLinks': 'コピーした Ta のリンクを見つける',
159
164
  'ta.settings.clipboardLinksHint': 'Ta の招待や共有のリンクを含む内容をコピーすると、Ta に戻ったときに何かを示し、「開く」で開けます。Ta のどこに貼り付けても同じです。クリップボードは戻った瞬間に一度だけ読み、内容は保存しません。iPhone では「開く」をタップしたときだけ読みます',
160
165
  'ta.settings.navigation': 'ナビゲーション',