@celljs/ta-web 4.38.0 → 4.40.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.
- package/esm/browser/assistant/assistant-thread.d.ts +1 -1
- package/esm/browser/assistant/chat-task-source.js +2 -1
- package/esm/browser/chat/chat-shown.js +2 -2
- package/esm/browser/components/app-contexts.js +11 -10
- package/esm/browser/components/busy.d.ts +5 -0
- package/esm/browser/components/busy.js +17 -0
- package/esm/browser/components/chat-asks.d.ts +4 -1
- package/esm/browser/components/chat-asks.js +10 -0
- package/esm/browser/components/chat-list-row.js +5 -3
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-box-protocol.d.ts +5 -0
- package/esm/browser/components/composer-box.js +11 -14
- package/esm/browser/components/composer-media.d.ts +26 -0
- package/esm/browser/components/composer-media.js +37 -0
- package/esm/browser/components/composer-target.d.ts +2 -2
- package/esm/browser/components/composer-target.js +3 -3
- package/esm/browser/components/composer.js +1 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/link.d.ts +7 -1
- package/esm/browser/components/link.js +24 -5
- package/esm/browser/components/markdown.d.ts +1 -1
- package/esm/browser/components/markdown.js +70 -4
- package/esm/browser/components/remote-hosts.d.ts +3 -1
- package/esm/browser/components/remote-hosts.js +10 -5
- package/esm/browser/components/session-view.js +10 -6
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +12 -3
- package/esm/browser/device/photo-picker.d.ts +11 -3
- package/esm/browser/device/photo-picker.js +26 -9
- package/esm/browser/device/video-picks.d.ts +24 -0
- package/esm/browser/device/video-picks.js +104 -0
- package/esm/browser/extension/icons.js +17 -1
- package/esm/browser/extension/web-access.js +4 -1
- package/esm/browser/extension/web-api-code.d.ts +36 -0
- package/esm/browser/extension/web-api-code.js +3 -0
- package/esm/browser/extension/web-api-components.d.ts +22 -0
- package/esm/browser/extension/web-api-contributions.d.ts +0 -31
- package/esm/browser/extension/web-api-hosts.d.ts +22 -0
- package/esm/browser/extension/web-api-hosts.js +2 -0
- package/esm/browser/extension/web-api-menus.d.ts +17 -5
- package/esm/browser/extension/web-api-play.d.ts +29 -0
- package/esm/browser/extension/web-api-play.js +2 -0
- package/esm/browser/extension/web-api-spec.js +5 -0
- package/esm/browser/extension/web-api-terminal.d.ts +20 -0
- package/esm/browser/extension/web-extension-api.d.ts +19 -17
- package/esm/browser/extension/web-extension-context.d.ts +1 -1
- package/esm/browser/extension/web-extension-context.js +8 -6
- package/esm/browser/extension/web-extension-protocol.d.ts +2 -0
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extension-run.d.ts +4 -3
- package/esm/browser/extension/web-extension-run.js +15 -8
- package/esm/browser/extension/web-extensions-running.js +38 -7
- package/esm/browser/extension/web-file-drag.d.ts +3 -0
- package/esm/browser/extension/web-file-drag.js +4 -0
- package/esm/browser/extension/web-hosts.d.ts +7 -0
- package/esm/browser/extension/web-hosts.js +29 -0
- package/esm/browser/extension/web-on-demand.d.ts +5 -0
- package/esm/browser/extension/web-on-demand.js +11 -0
- package/esm/browser/hosts.d.ts +2 -0
- package/esm/browser/hosts.js +9 -0
- package/esm/browser/i18n/en/assistant.d.ts +3 -0
- package/esm/browser/i18n/en/assistant.js +3 -0
- package/esm/browser/i18n/en/chat.d.ts +1 -0
- package/esm/browser/i18n/en/chat.js +1 -0
- package/esm/browser/i18n/en/common.d.ts +1 -0
- package/esm/browser/i18n/en/common.js +1 -0
- package/esm/browser/i18n/en/discover.d.ts +2 -0
- package/esm/browser/i18n/en/discover.js +2 -0
- package/esm/browser/i18n/en/service.js +6 -6
- package/esm/browser/i18n/ja/assistant.js +3 -0
- package/esm/browser/i18n/ja/chat.js +1 -0
- package/esm/browser/i18n/ja/common.js +1 -0
- package/esm/browser/i18n/ja/discover.js +2 -0
- package/esm/browser/i18n/ja/service.js +6 -6
- package/esm/browser/i18n/locales.d.ts +8 -1
- package/esm/browser/i18n/messages.d.ts +7 -0
- package/esm/browser/i18n/zh/assistant.js +3 -0
- package/esm/browser/i18n/zh/chat.js +1 -0
- package/esm/browser/i18n/zh/common.js +1 -0
- package/esm/browser/i18n/zh/discover.js +2 -0
- package/esm/browser/i18n/zh/service.js +6 -6
- package/esm/browser/i18n/zh-tw/assistant.js +3 -0
- package/esm/browser/i18n/zh-tw/chat.js +1 -0
- package/esm/browser/i18n/zh-tw/common.js +1 -0
- package/esm/browser/i18n/zh-tw/discover.js +2 -0
- package/esm/browser/i18n/zh-tw/service.js +6 -6
- package/esm/browser/markdown/code-renderers.d.ts +3 -1
- package/esm/browser/markdown/code-renderers.js +2 -0
- package/esm/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/esm/browser/sandbox/work/work-api.d.ts +113 -0
- package/esm/browser/sandbox/work/work-api.js +95 -0
- package/esm/browser/sandbox/work/work-docs.d.ts +18 -0
- package/esm/browser/sandbox/work/work-docs.js +66 -0
- package/esm/browser/sandbox/work/work-frame.d.ts +27 -0
- package/esm/browser/sandbox/work/work-frame.js +124 -0
- package/esm/browser/share/shared-extensions.d.ts +2 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +10 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +1 -0
- package/esm/browser/terminal/terminal-osc.d.ts +15 -0
- package/esm/browser/terminal/terminal-osc.js +91 -0
- package/esm/browser/terminal/web-terminal.d.ts +4 -7
- package/esm/browser/terminal/web-terminal.js +22 -26
- package/esm/browser/util/link.d.ts +6 -1
- package/esm/browser/util/link.js +11 -0
- package/esm/browser/workbench-hosts.d.ts +1 -0
- package/esm/browser/workbench-hosts.js +9 -0
- package/esm/browser/workbench-protocol.d.ts +5 -0
- package/lib/browser/assistant/assistant-thread.d.ts +1 -1
- package/lib/browser/assistant/chat-task-source.js +2 -1
- package/lib/browser/chat/chat-shown.js +2 -2
- package/lib/browser/components/app-contexts.js +10 -9
- package/lib/browser/components/busy.d.ts +5 -0
- package/lib/browser/components/busy.js +17 -0
- package/lib/browser/components/chat-asks.d.ts +4 -1
- package/lib/browser/components/chat-asks.js +10 -0
- package/lib/browser/components/chat-list-row.js +5 -3
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-box-protocol.d.ts +5 -0
- package/lib/browser/components/composer-box.js +9 -12
- package/lib/browser/components/composer-media.d.ts +27 -0
- package/lib/browser/components/composer-media.js +74 -0
- package/lib/browser/components/composer-target.d.ts +2 -2
- package/lib/browser/components/composer-target.js +3 -3
- package/lib/browser/components/composer.js +1 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/link.d.ts +7 -1
- package/lib/browser/components/link.js +25 -6
- package/lib/browser/components/markdown.d.ts +1 -1
- package/lib/browser/components/markdown.js +68 -2
- package/lib/browser/components/remote-hosts.d.ts +3 -1
- package/lib/browser/components/remote-hosts.js +10 -5
- package/lib/browser/components/session-view.js +8 -4
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +12 -3
- package/lib/browser/device/photo-picker.d.ts +11 -3
- package/lib/browser/device/photo-picker.js +26 -9
- package/lib/browser/device/video-picks.d.ts +25 -0
- package/lib/browser/device/video-picks.js +107 -0
- package/lib/browser/extension/icons.js +16 -0
- package/lib/browser/extension/web-access.js +4 -1
- package/lib/browser/extension/web-api-code.d.ts +37 -0
- package/lib/browser/extension/web-api-code.js +4 -0
- package/lib/browser/extension/web-api-components.d.ts +22 -0
- package/lib/browser/extension/web-api-contributions.d.ts +0 -31
- package/lib/browser/extension/web-api-hosts.d.ts +23 -0
- package/lib/browser/extension/web-api-hosts.js +3 -0
- package/lib/browser/extension/web-api-menus.d.ts +17 -5
- package/lib/browser/extension/web-api-play.d.ts +30 -0
- package/lib/browser/extension/web-api-play.js +3 -0
- package/lib/browser/extension/web-api-spec.js +5 -0
- package/lib/browser/extension/web-api-terminal.d.ts +20 -0
- package/lib/browser/extension/web-extension-api.d.ts +19 -17
- package/lib/browser/extension/web-extension-context.d.ts +1 -1
- package/lib/browser/extension/web-extension-context.js +8 -6
- package/lib/browser/extension/web-extension-protocol.d.ts +2 -0
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extension-run.d.ts +4 -3
- package/lib/browser/extension/web-extension-run.js +15 -8
- package/lib/browser/extension/web-extensions-running.js +38 -7
- package/lib/browser/extension/web-file-drag.d.ts +4 -0
- package/lib/browser/extension/web-file-drag.js +7 -0
- package/lib/browser/extension/web-hosts.d.ts +8 -0
- package/lib/browser/extension/web-hosts.js +32 -0
- package/lib/browser/extension/web-on-demand.d.ts +5 -0
- package/lib/browser/extension/web-on-demand.js +11 -0
- package/lib/browser/hosts.d.ts +2 -0
- package/lib/browser/hosts.js +9 -0
- package/lib/browser/i18n/en/assistant.d.ts +3 -0
- package/lib/browser/i18n/en/assistant.js +3 -0
- package/lib/browser/i18n/en/chat.d.ts +1 -0
- package/lib/browser/i18n/en/chat.js +1 -0
- package/lib/browser/i18n/en/common.d.ts +1 -0
- package/lib/browser/i18n/en/common.js +1 -0
- package/lib/browser/i18n/en/discover.d.ts +2 -0
- package/lib/browser/i18n/en/discover.js +2 -0
- package/lib/browser/i18n/en/service.js +6 -6
- package/lib/browser/i18n/ja/assistant.js +3 -0
- package/lib/browser/i18n/ja/chat.js +1 -0
- package/lib/browser/i18n/ja/common.js +1 -0
- package/lib/browser/i18n/ja/discover.js +2 -0
- package/lib/browser/i18n/ja/service.js +6 -6
- package/lib/browser/i18n/locales.d.ts +8 -1
- package/lib/browser/i18n/messages.d.ts +7 -0
- package/lib/browser/i18n/zh/assistant.js +3 -0
- package/lib/browser/i18n/zh/chat.js +1 -0
- package/lib/browser/i18n/zh/common.js +1 -0
- package/lib/browser/i18n/zh/discover.js +2 -0
- package/lib/browser/i18n/zh/service.js +6 -6
- package/lib/browser/i18n/zh-tw/assistant.js +3 -0
- package/lib/browser/i18n/zh-tw/chat.js +1 -0
- package/lib/browser/i18n/zh-tw/common.js +1 -0
- package/lib/browser/i18n/zh-tw/discover.js +2 -0
- package/lib/browser/i18n/zh-tw/service.js +6 -6
- package/lib/browser/markdown/code-renderers.d.ts +3 -1
- package/lib/browser/markdown/code-renderers.js +3 -1
- package/lib/browser/sandbox/sandbox-runtime-code.js +1 -1
- package/lib/browser/sandbox/work/work-api.d.ts +114 -0
- package/lib/browser/sandbox/work/work-api.js +99 -0
- package/lib/browser/sandbox/work/work-docs.d.ts +19 -0
- package/lib/browser/sandbox/work/work-docs.js +69 -0
- package/lib/browser/sandbox/work/work-frame.d.ts +28 -0
- package/lib/browser/sandbox/work/work-frame.js +160 -0
- package/lib/browser/share/shared-extensions.d.ts +2 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +10 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +1 -0
- package/lib/browser/terminal/terminal-osc.d.ts +16 -0
- package/lib/browser/terminal/terminal-osc.js +94 -0
- package/lib/browser/terminal/web-terminal.d.ts +4 -7
- package/lib/browser/terminal/web-terminal.js +25 -29
- package/lib/browser/util/link.d.ts +6 -1
- package/lib/browser/util/link.js +11 -0
- package/lib/browser/workbench-hosts.d.ts +1 -0
- package/lib/browser/workbench-hosts.js +9 -0
- package/lib/browser/workbench-protocol.d.ts +5 -0
- package/package.json +7 -7
|
@@ -2,16 +2,17 @@ import type { TaEvent, TaRoomEvent, TaSavedSessionInfo, TaSessionInfo } from '@c
|
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { Mood } from '../avatar/dino-avatar';
|
|
4
4
|
import type { DeviceState } from '../device/device-protocol';
|
|
5
|
-
import type { GameProps } from '../game/game-protocol';
|
|
6
|
-
import type { Game3DProps } from '../game/game3d-protocol';
|
|
7
5
|
import type { ScreenPartSpec, TaScreen } from '../screen/screen-protocol';
|
|
8
6
|
import type { Language, Theme } from '../settings/settings-protocol';
|
|
7
|
+
import type { WebCodeRendererOptions, WebCodeRendererProps } from './web-api-code';
|
|
9
8
|
import type { CodeEditorProps, DiffEditorProps, WebAvatarProps, WebChatImagesProps, WebComposerProps, WebConversationViewProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebLoadingProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebShareSheetProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebTaskIconProps, WebVoice } from './web-api-components';
|
|
10
|
-
import type { WebAsk, WebCallsAPI, WebChatIconSource, WebChatTagsAPI,
|
|
9
|
+
import type { WebAsk, WebCallsAPI, WebChatIconSource, WebChatTagsAPI, WebComposerAddon, WebCustomMessage, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebOpenerOptions, WebRoomAddon, WebRoomAddonEntry, WebSearchSource, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions';
|
|
11
10
|
import type { WebDesktop, WebDeviceUI, WebFileDrag } from './web-api-desktop';
|
|
12
11
|
import type { WebEditorsUI } from './web-api-editors';
|
|
13
12
|
import type { WebHomeUI, WebPartnersAPI, WebPartnersUI } from './web-api-home';
|
|
13
|
+
import type { WebHosts } from './web-api-hosts';
|
|
14
14
|
import type { WebFileRef, WebMenus } from './web-api-menus';
|
|
15
|
+
import type { WebPlayUI } from './web-api-play';
|
|
15
16
|
import type { WebServices } from './web-api-services';
|
|
16
17
|
import type { WebPackageStorage } from './web-api-storage';
|
|
17
18
|
import type { WebTargetsAPI } from './web-api-targets';
|
|
@@ -23,12 +24,15 @@ export type { TaFileBytes, TaFiles } from '../files/files-protocol';
|
|
|
23
24
|
export type { GameColors, GameConfig, GameEngine, GameInstance, GamePage, GamePoint, GameProps, GameState } from '../game/game-protocol';
|
|
24
25
|
export type { Game3DContext, Game3DEngine, Game3DLoop, Game3DProps } from '../game/game3d-protocol';
|
|
25
26
|
export type { Language, Theme } from '../settings/settings-protocol';
|
|
27
|
+
export type * from './web-api-code';
|
|
26
28
|
export type * from './web-api-components';
|
|
27
29
|
export type * from './web-api-contributions';
|
|
28
30
|
export type * from './web-api-desktop';
|
|
29
31
|
export type * from './web-api-editors';
|
|
30
32
|
export type * from './web-api-home';
|
|
33
|
+
export type * from './web-api-hosts';
|
|
31
34
|
export type * from './web-api-menus';
|
|
35
|
+
export type * from './web-api-play';
|
|
32
36
|
export type * from './web-api-services';
|
|
33
37
|
export type * from './web-api-storage';
|
|
34
38
|
export type * from './web-api-targets';
|
|
@@ -153,6 +157,11 @@ export interface WebExtensionAPI extends WebServices, WebPartnersAPI, WebMenus,
|
|
|
153
157
|
* whole of this API. `from` says where it came from.
|
|
154
158
|
*/
|
|
155
159
|
openTemporary(source: string, from: 'market' | 'link' | 'agent'): Promise<string>;
|
|
160
|
+
/**
|
|
161
|
+
* The computers this device reaches (docs/design/ta-cloud-handoff.md 15.3): the one the page shows, keeping another
|
|
162
|
+
* one's way in, and moving to it. Newer than some Ta apps: `pi.hosts?.…`.
|
|
163
|
+
*/
|
|
164
|
+
readonly hosts?: WebHosts;
|
|
156
165
|
/** Small JSON values the package keeps on the server, so they stay across browsers. */
|
|
157
166
|
readonly storage: WebPackageStorage;
|
|
158
167
|
/**
|
|
@@ -201,7 +210,7 @@ export interface WebNotifyOptions {
|
|
|
201
210
|
export type { ScreenAction, ScreenItem, ScreenPartSpec, ScreenPartView, ScreenPlace, ScreenScrollable, ScreenScrollTo } from '../screen/screen-protocol';
|
|
202
211
|
/** What web extensions see of TaScreen. */
|
|
203
212
|
export type WebScreen = Pick<TaScreen, 'agent' | 'parts' | 'act' | 'element' | 'where' | 'places' | 'go' | 'pageScroll' | 'scroll'>;
|
|
204
|
-
export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI, WebDeviceUI {
|
|
213
|
+
export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI, WebDeviceUI, WebPlayUI {
|
|
205
214
|
/** A widget around the message box, as pi's, or a card in the workbench on the right; `undefined` removes it. */
|
|
206
215
|
setWidget(key: string, widget: React.ComponentType | undefined, options?: WidgetOptions): void;
|
|
207
216
|
/**
|
|
@@ -254,6 +263,8 @@ export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI,
|
|
|
254
263
|
* icon of the page as events and methods of the element (Electron's). Elsewhere, an iframe.
|
|
255
264
|
*/
|
|
256
265
|
readonly supportsWebview: boolean;
|
|
266
|
+
/** The message box (`Composer`) takes `videos`, picked with the pictures. Newer than some Ta apps. */
|
|
267
|
+
readonly composerVideos?: boolean;
|
|
257
268
|
/**
|
|
258
269
|
* Ta Desktop's way to the file manager of the system (Finder, File Explorer, that of Linux), for paths of
|
|
259
270
|
* this machine; undefined in a browser and the mobile app. A directory of `ssh://` is not of this machine.
|
|
@@ -273,7 +284,10 @@ export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI,
|
|
|
273
284
|
* element's `loadURL`); the app refuses the rest.
|
|
274
285
|
*/
|
|
275
286
|
readonly debugWebview?: (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
276
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* Into the message box in front (a conversation's, or `ui.Composer` of a page): `quote` before what it holds, `images`
|
|
289
|
+
* (base64) as if pasted; false when none shows.
|
|
290
|
+
*/
|
|
277
291
|
addToComposer(draft: {
|
|
278
292
|
quote?: string;
|
|
279
293
|
images?: {
|
|
@@ -447,18 +461,6 @@ export interface WebExtensionUI extends WebHomeUI, WebPartnersUI, WebEditorsUI,
|
|
|
447
461
|
* time one is made; what it shows stays while no view shows it (`attach` it to the next one).
|
|
448
462
|
*/
|
|
449
463
|
createTerminal(options?: WebTerminalOptions): WebTerminal;
|
|
450
|
-
/**
|
|
451
|
-
* A game, drawn by Phaser, the game engine of the page (docs/design/ta-games.md): it fills its parent (a
|
|
452
|
-
* column of flex, or an element with a size), sleeps while out of sight and ends when it unmounts. Phaser
|
|
453
|
-
* loads the first time a game starts; an extension never brings an engine of its own.
|
|
454
|
-
*/
|
|
455
|
-
readonly Game: React.ComponentType<GameProps>;
|
|
456
|
-
/**
|
|
457
|
-
* A 3D game, drawn by Three.js, the 3D engine of the page, with its OrbitControls: `setup` puts things in
|
|
458
|
-
* the scene it is given and returns what to do each frame. As `Game`, it fills its parent, sleeps while out
|
|
459
|
-
* of sight and ends when it unmounts, all of its scene disposed; Three.js loads the first time one starts.
|
|
460
|
-
*/
|
|
461
|
-
readonly Game3D: React.ComponentType<Game3DProps>;
|
|
462
464
|
/**
|
|
463
465
|
* What covers all of the page while it is mounted: the shell, its head and side columns, under the notch and
|
|
464
466
|
* the home bar (mind `env(safe-area-inset-*)`), below the title bar of the desktop app and above the keyboard.
|
|
@@ -9,7 +9,7 @@ import type { TaSettings } from '../settings/settings-protocol';
|
|
|
9
9
|
import type { TaState } from '../state/state-protocol';
|
|
10
10
|
import { type TaTargets } from '../targets/targets-protocol';
|
|
11
11
|
import type { TaWorkbench } from '../workbench-protocol';
|
|
12
|
-
import type { WebCodeRendererProps } from './web-api-
|
|
12
|
+
import type { WebCodeRendererProps } from './web-api-code';
|
|
13
13
|
import type { WebEditorTabs } from './web-editor-tabs';
|
|
14
14
|
import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebExtensionAPI, WebExtensionUI, WebFolderPickerProps, WebHoldToTalkProps, WebModelPickerProps, WebShareSheetProps, WebStorage, WebViewInfo, WebVoice } from './web-extension-api';
|
|
15
15
|
import { type TaWebExtensions, type WebExtensionConversation, type WebSessionSwitcher } from './web-extension-protocol';
|
|
@@ -79,19 +79,20 @@ const drafts_protocol_1 = require("../drafts/drafts-protocol");
|
|
|
79
79
|
const game_view_1 = require("../game/game-view");
|
|
80
80
|
const messages_1 = require("../i18n/messages");
|
|
81
81
|
const use_t_1 = require("../i18n/use-t");
|
|
82
|
+
const work_frame_1 = require("../sandbox/work/work-frame");
|
|
82
83
|
const screen_protocol_1 = require("../screen/screen-protocol");
|
|
83
84
|
const targets_protocol_1 = require("../targets/targets-protocol");
|
|
84
85
|
const web_terminal_1 = require("../terminal/web-terminal");
|
|
85
86
|
const desktop_1 = require("../util/desktop");
|
|
86
|
-
const file_drag_1 = require("../util/file-drag");
|
|
87
87
|
const icons_1 = require("./icons");
|
|
88
88
|
const web_access_1 = require("./web-access");
|
|
89
89
|
const web_extension_protocol_1 = require("./web-extension-protocol");
|
|
90
90
|
const web_extension_run_1 = require("./web-extension-run");
|
|
91
|
+
const web_file_drag_1 = require("./web-file-drag");
|
|
91
92
|
const web_home_1 = require("./web-home");
|
|
93
|
+
const web_hosts_1 = require("./web-hosts");
|
|
92
94
|
const web_pages_1 = require("./web-pages");
|
|
93
95
|
const web_tasks_1 = require("./web-tasks");
|
|
94
|
-
const FILE_DRAG = Object.freeze({ set: file_drag_1.FileDragUtil.set, has: file_drag_1.FileDragUtil.has, get: file_drag_1.FileDragUtil.get, paths: file_drag_1.FileDragUtil.paths });
|
|
95
96
|
/**
|
|
96
97
|
* The API each web extension gets: what it registers is its own and goes when it stops, and once it stopped (turned off, removed,
|
|
97
98
|
* a timer of it left behind) it neither shows nor does anything more: its dialogs answer no, and what would act for the user fails.
|
|
@@ -230,9 +231,7 @@ class WebExtensionContext {
|
|
|
230
231
|
registerCodeRenderer: (language, renderer, options) => register(() => {
|
|
231
232
|
const key = language.trim().toLowerCase();
|
|
232
233
|
run.codeRenderers.set(key, WebExtensionContext.replying(renderer, mark));
|
|
233
|
-
|
|
234
|
-
run.codeSpeech.set(key, options.spoken);
|
|
235
|
-
}
|
|
234
|
+
run.codeOptions.set(key, options !== null && options !== void 0 ? options : {});
|
|
236
235
|
}),
|
|
237
236
|
registerCallPartner: partner => register(() => run.callPartners.push(partner)),
|
|
238
237
|
registerCallMouth: mouth => register(() => run.callMouths.push(mouth)),
|
|
@@ -286,6 +285,7 @@ class WebExtensionContext {
|
|
|
286
285
|
openChat: sessionFile => live(() => host.links.openConversation(sessionFile)),
|
|
287
286
|
openLink: (url, options) => live(() => host.links.open({ type: 'url', url }, { onlyTa: options === null || options === void 0 ? void 0 : options.onlyTa })),
|
|
288
287
|
openTemporary: (source, from) => live(() => host.extensions.openTemporary(source, from)),
|
|
288
|
+
hosts: web_hosts_1.WebHostsUtil.of(() => host.workbench),
|
|
289
289
|
callHost: (method, ...params) => live(() => workbench.packages.callPackageHost(run.loaded.name, method, params)),
|
|
290
290
|
reloadExtensions: () => live(() => host.extensions.reloadPackages()),
|
|
291
291
|
};
|
|
@@ -332,8 +332,9 @@ class WebExtensionContext {
|
|
|
332
332
|
return settings.state.language;
|
|
333
333
|
},
|
|
334
334
|
supportsWebview: desktop_1.DesktopUtil.has('webview'),
|
|
335
|
+
composerVideos: true,
|
|
335
336
|
desktop: desktop_1.DesktopUtil.fileManager(),
|
|
336
|
-
fileDrag:
|
|
337
|
+
fileDrag: web_file_drag_1.WEB_FILE_DRAG,
|
|
337
338
|
debugWebview: desktop_1.DesktopUtil.debugWebview(),
|
|
338
339
|
addToComposer: draft => !run.stopped && composer_target_1.ComposerTarget.add(draft),
|
|
339
340
|
// An extension opens, closes and marks only tabs of its own.
|
|
@@ -480,6 +481,7 @@ class WebExtensionContext {
|
|
|
480
481
|
ImageViewer: image_viewer_1.ImageViewer,
|
|
481
482
|
ChatImages: message_images_1.ChatImages,
|
|
482
483
|
QrCode: qr_view_1.QrView,
|
|
484
|
+
WorkFrame: work_frame_1.WorkFrame,
|
|
483
485
|
ShareSheet: this.shareSheet,
|
|
484
486
|
Dialog: web_dialog_1.WebDialog,
|
|
485
487
|
FolderPicker: this.folderPicker,
|
|
@@ -126,6 +126,8 @@ export interface WebExtensionsState {
|
|
|
126
126
|
codeRenderers: Record<string, React.ComponentType<WebCodeRendererProps>>;
|
|
127
127
|
/** By language, in lower case, how its blocks are said aloud (WebCodeRendererOptions.spoken): SpokenReply. */
|
|
128
128
|
codeSpeech: BlockSpeech;
|
|
129
|
+
/** The languages whose renderers tell the parts of a block apart (WebCodeRendererOptions.pointable). */
|
|
130
|
+
codePointable: Readonly<Record<string, true>>;
|
|
129
131
|
/** Who answers in calls in place of the conversation (WebExtensionAPI.registerCallPartner): the first registered. */
|
|
130
132
|
callPartner?: WebCallPartner;
|
|
131
133
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TaEvent } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
import type { WebCallMouth, WebCallMoves, WebCallPartner, WebChatIconSource, WebChatTagSource, WebCodeMenu, WebComposerAddon, WebFileMenu, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebPartnerSource, WebRoomAddon, WebSearchSource, WebSessionMenu, WebSettingsSection, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebVoice, WidgetOptions } from './web-extension-api';
|
|
3
|
+
import type { WebCallMouth, WebCallMoves, WebCallPartner, WebChatIconSource, WebChatTagSource, WebCodeMenu, WebCodeRendererOptions, WebComposerAddon, WebFileMenu, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebPartnerSource, WebRoomAddon, WebSearchSource, WebSessionMenu, WebSettingsSection, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebVoice, WidgetOptions } from './web-extension-api';
|
|
4
4
|
import type { LoadedWebExtension, WebExtensionsState } from './web-extension-protocol';
|
|
5
5
|
/** What an extension registered through its API: all of it goes when it stops. */
|
|
6
6
|
export interface WebRegistrations {
|
|
@@ -11,7 +11,8 @@ export interface WebRegistrations {
|
|
|
11
11
|
}>;
|
|
12
12
|
renderers: Map<string, WebExtensionsState['renderers'][string]>;
|
|
13
13
|
codeRenderers: Map<string, WebExtensionsState['codeRenderers'][string]>;
|
|
14
|
-
|
|
14
|
+
/** By language, in lower case (WebCodeRendererOptions): how its blocks are said aloud, whether they can be pointed at. */
|
|
15
|
+
codeOptions: Map<string, WebCodeRendererOptions>;
|
|
15
16
|
callPartners: WebCallPartner[];
|
|
16
17
|
callMouths: WebCallMouth[];
|
|
17
18
|
callMoves: WebCallMoves[];
|
|
@@ -69,6 +70,6 @@ export declare namespace WebExtensionRunUtil {
|
|
|
69
70
|
*/
|
|
70
71
|
function voice(run: WebExtensionRun, voice: WebVoice): WebVoice;
|
|
71
72
|
/** What the extensions that run registered, as the page shows it: the first of a message type or a tool name wins. */
|
|
72
|
-
function collect(runs: readonly WebExtensionRun[], onOpen: (id: string) => boolean): Pick<WebExtensionsState, 'openers' | 'specificOpeners' | 'sessionMenus' | 'fileMenus' | 'codeMenus' | 'extensions' | 'views' | 'widgets' | 'composerAddons' | 'roomAddons' | 'settingsSections' | 'renderers' | 'codeRenderers' | 'codeSpeech' | 'callPartner' | 'callGroup' | 'callMouth' | 'callMoves' | 'avatars' | 'chatIcons' | 'chatTags' | 'initiatives' | 'tools' | 'toolRenderers' | 'searches'>;
|
|
73
|
+
function collect(runs: readonly WebExtensionRun[], onOpen: (id: string) => boolean): Pick<WebExtensionsState, 'openers' | 'specificOpeners' | 'sessionMenus' | 'fileMenus' | 'codeMenus' | 'extensions' | 'views' | 'widgets' | 'composerAddons' | 'roomAddons' | 'settingsSections' | 'renderers' | 'codeRenderers' | 'codeSpeech' | 'codePointable' | 'callPartner' | 'callGroup' | 'callMouth' | 'callMoves' | 'avatars' | 'chatIcons' | 'chatTags' | 'initiatives' | 'tools' | 'toolRenderers' | 'searches'>;
|
|
73
74
|
}
|
|
74
75
|
//# sourceMappingURL=web-extension-run.d.ts.map
|
|
@@ -24,7 +24,7 @@ var WebExtensionRunUtil;
|
|
|
24
24
|
widgets: new Map(),
|
|
25
25
|
renderers: new Map(),
|
|
26
26
|
codeRenderers: new Map(),
|
|
27
|
-
|
|
27
|
+
codeOptions: new Map(),
|
|
28
28
|
callPartners: [],
|
|
29
29
|
callMouths: [],
|
|
30
30
|
callMoves: [],
|
|
@@ -115,11 +115,12 @@ var WebExtensionRunUtil;
|
|
|
115
115
|
WebExtensionRunUtil.voice = voice;
|
|
116
116
|
/** What the extensions that run registered, as the page shows it: the first of a message type or a tool name wins. */
|
|
117
117
|
function collect(runs, onOpen) {
|
|
118
|
-
var _a;
|
|
119
|
-
var
|
|
118
|
+
var _a, _b;
|
|
119
|
+
var _c, _d, _e;
|
|
120
120
|
const renderers = {};
|
|
121
121
|
const codeRenderers = {};
|
|
122
122
|
const codeSpeech = {};
|
|
123
|
+
const codePointable = {};
|
|
123
124
|
const avatars = {};
|
|
124
125
|
const tools = [];
|
|
125
126
|
for (const run of runs) {
|
|
@@ -127,13 +128,18 @@ var WebExtensionRunUtil;
|
|
|
127
128
|
avatars[run.loaded.name] = run.avatar;
|
|
128
129
|
}
|
|
129
130
|
for (const [type, renderer] of run.renderers) {
|
|
130
|
-
(
|
|
131
|
+
(_c = renderers[type]) !== null && _c !== void 0 ? _c : (renderers[type] = renderer);
|
|
131
132
|
}
|
|
132
133
|
for (const [language, renderer] of run.codeRenderers) {
|
|
133
|
-
(
|
|
134
|
+
if (!codeRenderers[language] && ((_a = run.codeOptions.get(language)) === null || _a === void 0 ? void 0 : _a.pointable)) {
|
|
135
|
+
codePointable[language] = true;
|
|
136
|
+
}
|
|
137
|
+
(_d = codeRenderers[language]) !== null && _d !== void 0 ? _d : (codeRenderers[language] = renderer);
|
|
134
138
|
}
|
|
135
|
-
for (const [language,
|
|
136
|
-
|
|
139
|
+
for (const [language, options] of run.codeOptions) {
|
|
140
|
+
if (options.spoken) {
|
|
141
|
+
(_e = codeSpeech[language]) !== null && _e !== void 0 ? _e : (codeSpeech[language] = options.spoken);
|
|
142
|
+
}
|
|
137
143
|
}
|
|
138
144
|
for (const tool of run.tools) {
|
|
139
145
|
if (!tools.some(other => other.name === tool.name)) {
|
|
@@ -182,8 +188,9 @@ var WebExtensionRunUtil;
|
|
|
182
188
|
renderers,
|
|
183
189
|
codeRenderers,
|
|
184
190
|
codeSpeech,
|
|
191
|
+
codePointable,
|
|
185
192
|
callPartner: runs.flatMap(run => run.callPartners)[0],
|
|
186
|
-
callGroup: (
|
|
193
|
+
callGroup: (_b = runs.find(run => run.callPartners.length)) === null || _b === void 0 ? void 0 : _b.loaded.name,
|
|
187
194
|
callMouth: runs.flatMap(run => run.callMouths)[0],
|
|
188
195
|
callMoves: runs.flatMap(run => run.callMoves),
|
|
189
196
|
avatars,
|
|
@@ -175,6 +175,15 @@ class WebExtensionsRunning {
|
|
|
175
175
|
void this.allow(info).then(allowed => allowed && this.refresh());
|
|
176
176
|
}
|
|
177
177
|
const loads = await Promise.all(starting.map(info => this.loadPackage(info)));
|
|
178
|
+
// The tabs of the views of one that starts again (a new version of a work) open again once it has: its page
|
|
179
|
+
// drawn anew beside the conversation, not closed under the user. One started on open starts again for them.
|
|
180
|
+
const prefix = web_view_util_1.WebViewUtil.editorId('');
|
|
181
|
+
const renewed = (id) => {
|
|
182
|
+
const info = fresh.get(id);
|
|
183
|
+
return !!info && this.running.has(id) && !this.same(this.running.get(id), info) && (info.activation === 'open' || starting.includes(info));
|
|
184
|
+
};
|
|
185
|
+
const reopen = this.current.editors.filter(editor => editor.id.startsWith(prefix) && renewed(editor.extension));
|
|
186
|
+
const active = reopen.some(editor => editor.id === this.current.activeEditor) ? this.current.activeEditor : undefined;
|
|
178
187
|
// Stopped only now, just before the new code starts: the views of the old one stay drawn until the next
|
|
179
188
|
// publish, and stopped while the new code is read (after an update, over the relay) they would show
|
|
180
189
|
// without the styles it took away.
|
|
@@ -197,6 +206,26 @@ class WebExtensionsRunning {
|
|
|
197
206
|
this.placeholders = undefined;
|
|
198
207
|
// The list of those started on open may have changed too.
|
|
199
208
|
this.publish();
|
|
209
|
+
if (reopen.length > 0) {
|
|
210
|
+
// One in a sandbox registers its views as it starts: they are there to open once it did.
|
|
211
|
+
const ready = [...new Set(reopen.map(editor => editor.extension))].map(id => {
|
|
212
|
+
var _a;
|
|
213
|
+
const index = starting.findIndex(info => info.id === id);
|
|
214
|
+
const load = loads[index];
|
|
215
|
+
if (!load) {
|
|
216
|
+
return this.onDemand.ensure(fresh.get(id)).catch(() => undefined);
|
|
217
|
+
}
|
|
218
|
+
return 'factory' in load ? (_a = load.factory.ready) === null || _a === void 0 ? void 0 : _a.catch(() => undefined) : undefined;
|
|
219
|
+
});
|
|
220
|
+
void Promise.all(ready).then(() => {
|
|
221
|
+
for (const editor of reopen) {
|
|
222
|
+
this.openView(editor.id.slice(prefix.length), true);
|
|
223
|
+
}
|
|
224
|
+
if (active) {
|
|
225
|
+
this.tabs.show(active);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
200
229
|
changed = changed || stopped || starting.length > 0;
|
|
201
230
|
await this.tabs.restore();
|
|
202
231
|
return changed;
|
|
@@ -212,9 +241,10 @@ class WebExtensionsRunning {
|
|
|
212
241
|
return false;
|
|
213
242
|
}
|
|
214
243
|
this.keptStarted = true;
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
244
|
+
const kept = this.code.list(host).filter(info => info.enabled !== false);
|
|
245
|
+
// Those started on open, in Quick open and on their links before the computer answers, or while it cannot.
|
|
246
|
+
const seeded = this.onDemand.seed(kept.filter(info => info.activation === 'open'));
|
|
247
|
+
const infos = kept.filter(info => info.activation !== 'open' && !this.running.has(info.id) && web_access_1.WebAccessUtil.granted(info) !== undefined);
|
|
218
248
|
const loads = await Promise.all(infos.map(async (info) => {
|
|
219
249
|
const code = await this.code.get(info.hash);
|
|
220
250
|
return code === undefined ? undefined : this.factoryOf(info, code).catch(() => undefined);
|
|
@@ -227,10 +257,10 @@ class WebExtensionsRunning {
|
|
|
227
257
|
started = true;
|
|
228
258
|
}
|
|
229
259
|
}
|
|
230
|
-
if (started) {
|
|
260
|
+
if (started || seeded) {
|
|
231
261
|
this.publish();
|
|
232
262
|
}
|
|
233
|
-
return started;
|
|
263
|
+
return started || seeded;
|
|
234
264
|
}
|
|
235
265
|
/** Whether what runs is that of the list: the same code, allowed as much. */
|
|
236
266
|
same(run, info) {
|
|
@@ -256,13 +286,14 @@ class WebExtensionsRunning {
|
|
|
256
286
|
}
|
|
257
287
|
async askAccess(info) {
|
|
258
288
|
var _a;
|
|
289
|
+
var _b;
|
|
259
290
|
const language = this.settings.state.language;
|
|
260
291
|
const say = (id) => (0, messages_1.message)(language, id);
|
|
261
|
-
const access = (
|
|
292
|
+
const access = (_b = info.access) !== null && _b !== void 0 ? _b : 'full';
|
|
262
293
|
const yes = await this.notices.confirm({
|
|
263
294
|
title: say('ta.access.ask').replace('{name}', web_pages_1.WebPagesUtil.title(info, language)),
|
|
264
295
|
message: [
|
|
265
|
-
say(info.regrant ? 'ta.access.updated' : 'ta.access.new'),
|
|
296
|
+
say(info.regrant ? 'ta.access.updated' : ((_a = info.temporary) === null || _a === void 0 ? void 0 : _a.from) === 'agent' ? 'ta.access.agent' : 'ta.access.new'),
|
|
266
297
|
say(`ta.access.${access}`),
|
|
267
298
|
say('ta.access.from').replace('{source}', web_access_1.WebAccessUtil.source(info, say)),
|
|
268
299
|
].join('\n'),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WEB_FILE_DRAG = void 0;
|
|
4
|
+
const file_drag_1 = require("../util/file-drag");
|
|
5
|
+
/** The files dragged in the page, as extensions read and set them (WebExtensionUI.fileDrag): one for all of them. */
|
|
6
|
+
exports.WEB_FILE_DRAG = Object.freeze({ set: file_drag_1.FileDragUtil.set, has: file_drag_1.FileDragUtil.has, get: file_drag_1.FileDragUtil.get, paths: file_drag_1.FileDragUtil.paths });
|
|
7
|
+
//# sourceMappingURL=web-file-drag.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SavedHost, TaWorkbench } from '../workbench-protocol';
|
|
2
|
+
import type { WebHost, WebHosts } from './web-api-hosts';
|
|
3
|
+
/** The computers of the device as extensions see them (WebExtensionAPI.hosts): never their ways in. */
|
|
4
|
+
export declare namespace WebHostsUtil {
|
|
5
|
+
function of(workbench: () => TaWorkbench): WebHosts;
|
|
6
|
+
function hostOf(saved: SavedHost): WebHost;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=web-hosts.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebHostsUtil = void 0;
|
|
4
|
+
const hosts_1 = require("../hosts");
|
|
5
|
+
/** The computers of the device as extensions see them (WebExtensionAPI.hosts): never their ways in. */
|
|
6
|
+
var WebHostsUtil;
|
|
7
|
+
(function (WebHostsUtil) {
|
|
8
|
+
function of(workbench) {
|
|
9
|
+
return {
|
|
10
|
+
current: () => {
|
|
11
|
+
const { hosts, host } = workbench().state;
|
|
12
|
+
const saved = hosts.find(one => one.id === host);
|
|
13
|
+
return saved && hostOf(saved);
|
|
14
|
+
},
|
|
15
|
+
list: () => workbench().state.hosts.map(hostOf),
|
|
16
|
+
keep: (link, name) => workbench().keepHost(link, name),
|
|
17
|
+
switchTo: id => workbench().switchTo(id),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
WebHostsUtil.of = of;
|
|
21
|
+
function hostOf(saved) {
|
|
22
|
+
var _a;
|
|
23
|
+
return {
|
|
24
|
+
id: saved.id,
|
|
25
|
+
name: hosts_1.HostUtil.label(saved),
|
|
26
|
+
...(((_a = saved.server) === null || _a === void 0 ? void 0 : _a.host) ? { machine: saved.server.host } : {}),
|
|
27
|
+
relay: 'pairing' in saved.credential,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
WebHostsUtil.hostOf = hostOf;
|
|
31
|
+
})(WebHostsUtil || (exports.WebHostsUtil = WebHostsUtil = {}));
|
|
32
|
+
//# sourceMappingURL=web-hosts.js.map
|
|
@@ -42,6 +42,11 @@ export declare class WebOnDemand {
|
|
|
42
42
|
get(id: string): TaWebExtensionInfo | undefined;
|
|
43
43
|
/** Those of the server's list now; one an agent just made for the user is told of, with a way to open it. */
|
|
44
44
|
set(infos: readonly TaWebExtensionInfo[]): void;
|
|
45
|
+
/**
|
|
46
|
+
* Those of the list of the last time, before the computer answers (or while it cannot): their pages open from the
|
|
47
|
+
* code the device keeps, as those started with the page do. The list of the computer replaces them.
|
|
48
|
+
*/
|
|
49
|
+
seed(infos: readonly TaWebExtensionInfo[]): boolean;
|
|
45
50
|
/** The extension started on open that a view id is of: its name, or `<its name>/<view>`. */
|
|
46
51
|
find(viewId: string): TaWebExtensionInfo | undefined;
|
|
47
52
|
/** Starts it unless it runs, once however often asked meanwhile. */
|
|
@@ -61,6 +61,17 @@ class WebOnDemand {
|
|
|
61
61
|
}
|
|
62
62
|
this.listed = true;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Those of the list of the last time, before the computer answers (or while it cannot): their pages open from the
|
|
66
|
+
* code the device keeps, as those started with the page do. The list of the computer replaces them.
|
|
67
|
+
*/
|
|
68
|
+
seed(infos) {
|
|
69
|
+
if (this.listed || this.infos.size > 0 || infos.length === 0) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
this.infos = new Map(infos.map(info => [info.id, info]));
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
64
75
|
/** The extension started on open that a view id is of: its name, or `<its name>/<view>`. */
|
|
65
76
|
find(viewId) {
|
|
66
77
|
for (const info of this.infos.values()) {
|
package/lib/browser/hosts.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare namespace HostUtil {
|
|
|
21
21
|
* keeps its place, name and use.
|
|
22
22
|
*/
|
|
23
23
|
function keep(list: HostList, id: string, credential: Credential, account: string, now: number): HostList;
|
|
24
|
+
/** A computer kept, not used yet: its way in the one given, its name kept when it has one. */
|
|
25
|
+
function add(list: HostList, id: string, credential: Credential, name: string | undefined, now: number): HostList;
|
|
24
26
|
function select(list: HostList, id: string, now: number): HostList;
|
|
25
27
|
/** None in use, all kept: the sign-in shows them to pick from. */
|
|
26
28
|
function leave(list: HostList): HostList;
|
package/lib/browser/hosts.js
CHANGED
|
@@ -94,6 +94,15 @@ var HostUtil;
|
|
|
94
94
|
return { ...list, hosts: known ? list.hosts.map(one => (one === known ? next : one)) : [...list.hosts, next] };
|
|
95
95
|
}
|
|
96
96
|
HostUtil.keep = keep;
|
|
97
|
+
/** A computer kept, not used yet: its way in the one given, its name kept when it has one. */
|
|
98
|
+
function add(list, id, credential, name, now) {
|
|
99
|
+
const known = list.hosts.find(one => one.id === id);
|
|
100
|
+
const next = known
|
|
101
|
+
? { ...known, credential, ...(known.name || !name ? {} : { name }) }
|
|
102
|
+
: { id, credential, ...(name ? { name } : {}), addedAt: now, usedAt: 0 };
|
|
103
|
+
return { ...list, hosts: known ? list.hosts.map(one => (one === known ? next : one)) : [...list.hosts, next] };
|
|
104
|
+
}
|
|
105
|
+
HostUtil.add = add;
|
|
97
106
|
function select(list, id, now) {
|
|
98
107
|
return list.hosts.some(one => one.id === id) ? { current: id, hosts: list.hosts.map(one => (one.id === id ? { ...one, usedAt: now } : one)) } : list;
|
|
99
108
|
}
|
|
@@ -79,6 +79,9 @@ export declare const ASSISTANT_EN: {
|
|
|
79
79
|
'ta.task.branch': string;
|
|
80
80
|
'ta.task.stopped': string;
|
|
81
81
|
'ta.task.waiting': string;
|
|
82
|
+
'ta.task.waitingPermission': string;
|
|
83
|
+
'ta.task.waitingQuestion': string;
|
|
84
|
+
'ta.task.waitingAuth': string;
|
|
82
85
|
'ta.task.takenOver': string;
|
|
83
86
|
'ta.task.takeOver': string;
|
|
84
87
|
'ta.task.takeOverHint': string;
|
|
@@ -82,6 +82,9 @@ exports.ASSISTANT_EN = {
|
|
|
82
82
|
'ta.task.branch': 'Branch {branch}',
|
|
83
83
|
'ta.task.stopped': 'Stopped',
|
|
84
84
|
'ta.task.waiting': 'Waiting for you',
|
|
85
|
+
'ta.task.waitingPermission': 'Waiting for you to allow',
|
|
86
|
+
'ta.task.waitingQuestion': 'Waiting for your answer',
|
|
87
|
+
'ta.task.waitingAuth': 'Waiting for you to sign in',
|
|
85
88
|
'ta.task.takenOver': 'You took it over',
|
|
86
89
|
'ta.task.takeOver': 'Take over',
|
|
87
90
|
'ta.task.takeOverHint': 'Go on with it yourself in the main area; the double stops following it',
|
|
@@ -180,6 +180,7 @@ export declare const CHAT_EN: {
|
|
|
180
180
|
'ta.composer.keyboard': string;
|
|
181
181
|
'ta.composer.steerTitle': string;
|
|
182
182
|
'ta.composer.addImage': string;
|
|
183
|
+
'ta.composer.addMedia': string;
|
|
183
184
|
'ta.composer.album': string;
|
|
184
185
|
'ta.composer.camera': string;
|
|
185
186
|
'ta.composer.more': string;
|
|
@@ -183,6 +183,7 @@ exports.CHAT_EN = {
|
|
|
183
183
|
'ta.composer.keyboard': 'Type instead',
|
|
184
184
|
'ta.composer.steerTitle': 'Steer Ta (Enter); Alt+Enter queues a follow-up',
|
|
185
185
|
'ta.composer.addImage': 'Add images',
|
|
186
|
+
'ta.composer.addMedia': 'Add images or videos',
|
|
186
187
|
'ta.composer.album': 'Album',
|
|
187
188
|
'ta.composer.camera': 'Camera',
|
|
188
189
|
'ta.composer.more': 'Add and settings',
|
|
@@ -60,6 +60,7 @@ export declare const DISCOVER_EN: {
|
|
|
60
60
|
'ta.open.failed': string;
|
|
61
61
|
'ta.access.ask': string;
|
|
62
62
|
'ta.access.new': string;
|
|
63
|
+
'ta.access.agent': string;
|
|
63
64
|
'ta.access.updated': string;
|
|
64
65
|
'ta.access.full': string;
|
|
65
66
|
'ta.access.app': string;
|
|
@@ -67,6 +68,7 @@ export declare const DISCOVER_EN: {
|
|
|
67
68
|
'ta.access.from': string;
|
|
68
69
|
'ta.access.fromLink': string;
|
|
69
70
|
'ta.access.fromMarket': string;
|
|
71
|
+
'ta.access.fromAgent': string;
|
|
70
72
|
'ta.access.allow': string;
|
|
71
73
|
'ta.access.failed': string;
|
|
72
74
|
'ta.search.pages': string;
|
|
@@ -64,6 +64,7 @@ exports.DISCOVER_EN = {
|
|
|
64
64
|
'ta.open.failed': 'Could not open it',
|
|
65
65
|
'ta.access.ask': 'Allow {name} to run?',
|
|
66
66
|
'ta.access.new': 'It is not one you made: it runs once you allow it.',
|
|
67
|
+
'ta.access.agent': 'Ta made it for you; it asks for more than a web page has, so it runs once you allow it.',
|
|
67
68
|
'ta.access.updated': 'It changed since you allowed it: this version runs once you allow it again.',
|
|
68
69
|
'ta.access.full': 'It asks for all Ta can do: read and write the files of this computer, run commands, read your conversations. Allow only what you trust.',
|
|
69
70
|
'ta.access.app': 'It asks for its own pages and the notices, widgets and voice of Ta, not for your files or conversations.',
|
|
@@ -71,6 +72,7 @@ exports.DISCOVER_EN = {
|
|
|
71
72
|
'ta.access.from': 'From: {source}.',
|
|
72
73
|
'ta.access.fromLink': 'a link someone shared',
|
|
73
74
|
'ta.access.fromMarket': 'the market',
|
|
75
|
+
'ta.access.fromAgent': 'made by Ta for you',
|
|
74
76
|
'ta.access.allow': 'Allow',
|
|
75
77
|
'ta.access.failed': 'Could not allow it',
|
|
76
78
|
'ta.search.pages': 'Pages',
|
|
@@ -70,7 +70,7 @@ exports.SERVICE_EN = {
|
|
|
70
70
|
'ta.environment.stopDetail': 'It starts again when they connect; what runs in it stops now.',
|
|
71
71
|
'ta.remote.addCloud': 'Enter the gateway',
|
|
72
72
|
'ta.remote.cloudTitle': "Your company's Ta gateway",
|
|
73
|
-
'ta.remote.cloudDescription': 'Only when your company runs a Ta gateway
|
|
73
|
+
'ta.remote.cloudDescription': 'Only when your company runs a Ta gateway; otherwise, skip it.',
|
|
74
74
|
'ta.remote.cloudUrl': 'Gateway address',
|
|
75
75
|
'ta.remote.cloudToken': 'Access token',
|
|
76
76
|
'ta.remote.cloudHint': 'The address is that of the web page of the gateway; make the token there in Settings, Environment, Use it from another Ta.',
|
|
@@ -78,15 +78,15 @@ exports.SERVICE_EN = {
|
|
|
78
78
|
'ta.remote.cloudAdded': '{name} added: pick it in the folder picker',
|
|
79
79
|
'ta.remote.openCloud': 'Open its Ta',
|
|
80
80
|
'ta.remote.openCloudHint': 'The whole Ta there, its agent in the cloud too',
|
|
81
|
-
'ta.remote.madeCloud': '
|
|
81
|
+
'ta.remote.madeCloud': 'On: while this computer is away, conversations go on on {host}',
|
|
82
82
|
'ta.remote.network': 'Network',
|
|
83
83
|
'ta.remote.portLocal': 'Forwarded to localhost:{port} here',
|
|
84
84
|
'ta.remote.relay': 'Go on here while this computer is away',
|
|
85
85
|
'ta.remote.relay.off': 'Keeps Ta running here: when this computer closes its lid or runs low, conversations go on here.',
|
|
86
86
|
'ta.remote.relay.on': 'When the lid closes, the computer sleeps or its battery runs low, running conversations go on here, and come back when it returns.',
|
|
87
|
-
'ta.remote.relay.stopTitle': 'Stop
|
|
87
|
+
'ta.remote.relay.stopTitle': 'Stop moving conversations to {host}?',
|
|
88
88
|
'ta.remote.relay.stopHint': 'Ta stays installed there. Take back the conversations that went there first.',
|
|
89
|
-
'ta.remote.relay.stop': 'Turn off
|
|
89
|
+
'ta.remote.relay.stop': 'Turn off',
|
|
90
90
|
'ta.remote.network.off': 'Off (recommended)',
|
|
91
91
|
'ta.remote.network.common': 'Package sources only',
|
|
92
92
|
'ta.remote.network.open': 'Anywhere',
|
|
@@ -117,7 +117,7 @@ exports.SERVICE_EN = {
|
|
|
117
117
|
'ta.remote.local': 'This computer',
|
|
118
118
|
'ta.remote.add': 'Add a host',
|
|
119
119
|
'ta.remote.addConfirm': 'Add',
|
|
120
|
-
'ta.remote.addHint': '
|
|
120
|
+
'ta.remote.addHint': 'Host name, user@host, or ssh command',
|
|
121
121
|
'ta.remote.connected': 'Connected',
|
|
122
122
|
'ta.remote.failed': 'Cannot connect to {host}',
|
|
123
123
|
'ta.relays.title': 'Relays',
|
|
@@ -211,7 +211,7 @@ exports.SERVICE_EN = {
|
|
|
211
211
|
'ta.relays.storeNote': 'Ta tries it first, writing and removing a small file. What sync puts there is sealed on this computer; the password stays in relays.json here.',
|
|
212
212
|
'ta.relays.storeAdd': 'Add and sync there',
|
|
213
213
|
'ta.remote.title': 'Remote hosts',
|
|
214
|
-
'ta.remote.description': 'Conversations can work in directories of these machines
|
|
214
|
+
'ta.remote.description': 'Conversations can work in directories of these machines, and move there to go on when this computer closes its lid or runs out of power.',
|
|
215
215
|
'ta.remote.none': 'No hosts yet',
|
|
216
216
|
'ta.remote.noneHint': 'Add one above: conversations then work in its directories over ssh',
|
|
217
217
|
'ta.remote.invalid': '{host} names no host: write a Host of ~/.ssh/config, user@host:port, or ssh user@host -p port.',
|