@celljs/ta-web 4.13.1 → 4.15.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/README.en.md +3 -3
- package/README.md +3 -3
- package/esm/browser/assistant/assistant-extension.js +3 -2
- package/esm/browser/assistant/assistant-initiative.js +1 -1
- package/esm/browser/assistant/assistant-state.js +2 -2
- package/esm/browser/components/access-view.js +3 -2
- package/esm/browser/components/account-menu.js +2 -2
- package/esm/browser/components/app-view.js +4 -0
- package/esm/browser/components/auth-view.d.ts +1 -1
- package/esm/browser/components/auth-view.js +38 -10
- package/esm/browser/components/chat-asks.d.ts +8 -0
- package/esm/browser/components/chat-asks.js +10 -0
- package/esm/browser/components/chat-list.js +11 -1
- package/esm/browser/components/composer-box.d.ts +2 -0
- package/esm/browser/components/composer-box.js +2 -1
- package/esm/browser/components/composer.d.ts +3 -1
- package/esm/browser/components/composer.js +16 -4
- package/esm/browser/components/custom-provider-advanced.d.ts +14 -0
- package/esm/browser/components/custom-provider-advanced.js +50 -0
- package/esm/browser/components/custom-provider-util.d.ts +38 -0
- package/esm/browser/components/custom-provider-util.js +103 -0
- package/esm/browser/components/custom-provider-view.d.ts +11 -0
- package/esm/browser/components/custom-provider-view.js +181 -0
- package/esm/browser/components/face.d.ts +13 -1
- package/esm/browser/components/face.js +16 -1
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/message-list.js +20 -1
- package/esm/browser/components/people.d.ts +32 -0
- package/esm/browser/components/people.js +71 -0
- package/esm/browser/components/session-view.d.ts +1 -1
- package/esm/browser/components/session-view.js +56 -36
- package/esm/browser/components/settings-choices.js +2 -3
- package/esm/browser/components/settings-controls.d.ts +7 -1
- package/esm/browser/components/settings-controls.js +8 -0
- package/esm/browser/components/settings-parts.js +25 -8
- package/esm/browser/components/sign-in-setup.d.ts +16 -0
- package/esm/browser/components/sign-in-setup.js +118 -0
- package/esm/browser/components/use-seen-chats.d.ts +2 -0
- package/esm/browser/components/use-seen-chats.js +2 -2
- package/esm/browser/editor/monaco-loader.js +7 -1
- package/esm/browser/extension/web-api-components.d.ts +12 -0
- package/esm/browser/extension/web-api-contributions.d.ts +3 -0
- package/esm/browser/extension/web-extension-api.d.ts +9 -2
- package/esm/browser/extension/web-extension-context.d.ts +2 -0
- package/esm/browser/extension/web-extension-context.js +19 -0
- package/esm/browser/game/game-loader.js +22 -2
- package/esm/browser/game/game3d-protocol.d.ts +13 -4
- package/esm/browser/i18n/locales.d.ts +90 -1
- package/esm/browser/i18n/locales.js +25 -1
- package/esm/browser/i18n/messages-ja.d.ts +2 -0
- package/esm/browser/i18n/messages-ja.js +972 -0
- package/esm/browser/i18n/messages-zh-tw.d.ts +3 -0
- package/esm/browser/i18n/messages-zh-tw.js +973 -0
- package/esm/browser/i18n/messages.d.ts +85 -0
- package/esm/browser/i18n/messages.js +171 -1
- package/esm/browser/i18n/use-t.js +3 -2
- package/esm/browser/presence/presence-reporter.d.ts +32 -0
- package/esm/browser/presence/presence-reporter.js +71 -0
- package/esm/browser/settings/settings-protocol.d.ts +3 -2
- package/esm/browser/settings/settings-protocol.js +4 -3
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +8 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +53 -1
- package/esm/browser/util/desktop.d.ts +12 -1
- package/esm/browser/util/desktop.js +14 -0
- package/esm/browser/util/voice.d.ts +20 -1
- package/esm/browser/util/voice.js +27 -11
- package/esm/browser/workbench-protocol.d.ts +9 -0
- package/esm/browser/workbench-util.d.ts +4 -0
- package/esm/browser/workbench-util.js +24 -1
- package/esm/browser/workbench.d.ts +3 -0
- package/esm/browser/workbench.js +14 -4
- package/lib/browser/assistant/assistant-extension.js +3 -2
- package/lib/browser/assistant/assistant-initiative.js +1 -1
- package/lib/browser/assistant/assistant-state.js +1 -1
- package/lib/browser/components/access-view.js +3 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/app-view.js +4 -0
- package/lib/browser/components/auth-view.d.ts +1 -1
- package/lib/browser/components/auth-view.js +37 -9
- package/lib/browser/components/chat-asks.d.ts +8 -0
- package/lib/browser/components/chat-asks.js +10 -0
- package/lib/browser/components/chat-list.js +11 -1
- package/lib/browser/components/composer-box.d.ts +2 -0
- package/lib/browser/components/composer-box.js +2 -1
- package/lib/browser/components/composer.d.ts +3 -1
- package/lib/browser/components/composer.js +16 -4
- package/lib/browser/components/custom-provider-advanced.d.ts +15 -0
- package/lib/browser/components/custom-provider-advanced.js +86 -0
- package/lib/browser/components/custom-provider-util.d.ts +39 -0
- package/lib/browser/components/custom-provider-util.js +106 -0
- package/lib/browser/components/custom-provider-view.d.ts +12 -0
- package/lib/browser/components/custom-provider-view.js +217 -0
- package/lib/browser/components/face.d.ts +13 -1
- package/lib/browser/components/face.js +16 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/message-list.js +19 -0
- package/lib/browser/components/people.d.ts +33 -0
- package/lib/browser/components/people.js +109 -0
- package/lib/browser/components/session-view.d.ts +1 -1
- package/lib/browser/components/session-view.js +56 -36
- package/lib/browser/components/settings-choices.js +1 -2
- package/lib/browser/components/settings-controls.d.ts +7 -1
- package/lib/browser/components/settings-controls.js +9 -0
- package/lib/browser/components/settings-parts.js +24 -7
- package/lib/browser/components/sign-in-setup.d.ts +17 -0
- package/lib/browser/components/sign-in-setup.js +155 -0
- package/lib/browser/components/use-seen-chats.d.ts +2 -0
- package/lib/browser/components/use-seen-chats.js +3 -2
- package/lib/browser/editor/monaco-loader.js +7 -1
- package/lib/browser/extension/web-api-components.d.ts +12 -0
- package/lib/browser/extension/web-api-contributions.d.ts +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +9 -2
- package/lib/browser/extension/web-extension-context.d.ts +2 -0
- package/lib/browser/extension/web-extension-context.js +19 -0
- package/lib/browser/game/game-loader.js +22 -2
- package/lib/browser/game/game3d-protocol.d.ts +13 -4
- package/lib/browser/i18n/locales.d.ts +90 -1
- package/lib/browser/i18n/locales.js +25 -1
- package/lib/browser/i18n/messages-ja.d.ts +3 -0
- package/lib/browser/i18n/messages-ja.js +975 -0
- package/lib/browser/i18n/messages-zh-tw.d.ts +4 -0
- package/lib/browser/i18n/messages-zh-tw.js +976 -0
- package/lib/browser/i18n/messages.d.ts +85 -0
- package/lib/browser/i18n/messages.js +174 -2
- package/lib/browser/i18n/use-t.js +2 -1
- package/lib/browser/presence/presence-reporter.d.ts +33 -0
- package/lib/browser/presence/presence-reporter.js +75 -0
- package/lib/browser/settings/settings-protocol.d.ts +3 -2
- package/lib/browser/settings/settings-protocol.js +4 -3
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +8 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +53 -1
- package/lib/browser/util/desktop.d.ts +12 -1
- package/lib/browser/util/desktop.js +14 -0
- package/lib/browser/util/voice.d.ts +20 -1
- package/lib/browser/util/voice.js +27 -11
- package/lib/browser/workbench-protocol.d.ts +9 -0
- package/lib/browser/workbench-util.d.ts +4 -0
- package/lib/browser/workbench-util.js +24 -1
- package/lib/browser/workbench.d.ts +3 -0
- package/lib/browser/workbench.js +14 -4
- package/package.json +10 -10
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type TaCustomProvider } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* A provider of models the user adds by its address and key, or changes: the API it speaks, where it is, its key and
|
|
5
|
+
* its models, which the service can list. ta serve keeps it in pi's models.json; the key never comes back here.
|
|
6
|
+
*/
|
|
7
|
+
export declare function CustomProviderForm({ provider, onSaved, onBack }: {
|
|
8
|
+
provider?: TaCustomProvider;
|
|
9
|
+
onSaved(saved: TaCustomProvider): void;
|
|
10
|
+
onBack(): void;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=custom-provider-view.d.ts.map
|
|
@@ -0,0 +1,217 @@
|
|
|
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.CustomProviderForm = CustomProviderForm;
|
|
37
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
38
|
+
const lucide_react_1 = require("lucide-react");
|
|
39
|
+
const React = __importStar(require("react"));
|
|
40
|
+
const hooks_1 = require("../hooks");
|
|
41
|
+
const use_t_1 = require("../i18n/use-t");
|
|
42
|
+
const busy_1 = require("./busy");
|
|
43
|
+
const callout_1 = require("./callout");
|
|
44
|
+
const custom_provider_advanced_1 = require("./custom-provider-advanced");
|
|
45
|
+
const custom_provider_util_1 = require("./custom-provider-util");
|
|
46
|
+
const icon_1 = require("./icon");
|
|
47
|
+
const API_WORDS = {
|
|
48
|
+
'openai-completions': 'ta.auth.custom.apiOpenai',
|
|
49
|
+
'openai-responses': 'ta.auth.custom.apiResponses',
|
|
50
|
+
'anthropic-messages': 'ta.auth.custom.apiAnthropic',
|
|
51
|
+
'google-generative-ai': 'ta.auth.custom.apiGoogle',
|
|
52
|
+
};
|
|
53
|
+
/** What an address of each API looks like. */
|
|
54
|
+
const ADDRESSES = {
|
|
55
|
+
'openai-completions': 'https://api.example.com/v1',
|
|
56
|
+
'openai-responses': 'https://api.example.com/v1',
|
|
57
|
+
'anthropic-messages': 'https://api.example.com',
|
|
58
|
+
'google-generative-ai': 'https://generativelanguage.googleapis.com/v1beta',
|
|
59
|
+
};
|
|
60
|
+
/** A list a service gave longer than this has a box to narrow it. */
|
|
61
|
+
const FILTER_FROM = 8;
|
|
62
|
+
/**
|
|
63
|
+
* A provider of models the user adds by its address and key, or changes: the API it speaks, where it is, its key and
|
|
64
|
+
* its models, which the service can list. ta serve keeps it in pi's models.json; the key never comes back here.
|
|
65
|
+
*/
|
|
66
|
+
function CustomProviderForm({ provider, onSaved, onBack }) {
|
|
67
|
+
var _a, _b, _c, _d, _e;
|
|
68
|
+
const t = (0, use_t_1.useT)();
|
|
69
|
+
const [, bench] = (0, hooks_1.useWorkbench)();
|
|
70
|
+
const [, notices] = (0, hooks_1.useNotices)();
|
|
71
|
+
const [api, setApi] = React.useState((_a = provider === null || provider === void 0 ? void 0 : provider.api) !== null && _a !== void 0 ? _a : 'openai-completions');
|
|
72
|
+
const [baseUrl, setBaseUrl] = React.useState((_b = provider === null || provider === void 0 ? void 0 : provider.baseUrl) !== null && _b !== void 0 ? _b : '');
|
|
73
|
+
const [apiKey, setApiKey] = React.useState('');
|
|
74
|
+
const [name, setName] = React.useState((_c = provider === null || provider === void 0 ? void 0 : provider.name) !== null && _c !== void 0 ? _c : '');
|
|
75
|
+
const [models, setModels] = React.useState((_d = provider === null || provider === void 0 ? void 0 : provider.models) !== null && _d !== void 0 ? _d : []);
|
|
76
|
+
const [draft, setDraft] = React.useState('');
|
|
77
|
+
const [fetched, setFetched] = React.useState();
|
|
78
|
+
const [fetchError, setFetchError] = React.useState();
|
|
79
|
+
const [words, setWords] = React.useState('');
|
|
80
|
+
const [advanced, setAdvanced] = React.useState(() => custom_provider_util_1.CustomProviderFormUtil.advanced(provider));
|
|
81
|
+
const [saving, runSave] = (0, busy_1.useBusy)();
|
|
82
|
+
const [fetching, runFetch] = (0, busy_1.useBusy)();
|
|
83
|
+
const [removing, runRemove] = (0, busy_1.useBusy)();
|
|
84
|
+
const key = apiKey.trim() || undefined;
|
|
85
|
+
const typed = () => custom_provider_util_1.CustomProviderFormUtil.add(models, custom_provider_util_1.CustomProviderFormUtil.split(draft));
|
|
86
|
+
const addDraft = () => {
|
|
87
|
+
setModels(typed());
|
|
88
|
+
setDraft('');
|
|
89
|
+
};
|
|
90
|
+
const fetchModels = () => runFetch(async () => {
|
|
91
|
+
setFetchError(undefined);
|
|
92
|
+
try {
|
|
93
|
+
const ids = await bench.auth.fetchCustomModels({
|
|
94
|
+
id: provider === null || provider === void 0 ? void 0 : provider.id,
|
|
95
|
+
api,
|
|
96
|
+
baseUrl,
|
|
97
|
+
apiKey: key,
|
|
98
|
+
headers: custom_provider_util_1.CustomProviderFormUtil.headersOf(advanced),
|
|
99
|
+
});
|
|
100
|
+
setFetched(ids);
|
|
101
|
+
setWords('');
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
setFetched(undefined);
|
|
105
|
+
setFetchError(error instanceof Error ? error.message : String(error));
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
const save = () => runSave(async () => {
|
|
109
|
+
var _a;
|
|
110
|
+
const chosen = typed();
|
|
111
|
+
setModels(chosen);
|
|
112
|
+
setDraft('');
|
|
113
|
+
if (chosen.length === 0) {
|
|
114
|
+
notices.notify(t('ta.auth.custom.needModel'), { level: 'warning' });
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
let options;
|
|
118
|
+
try {
|
|
119
|
+
options = custom_provider_util_1.CustomProviderFormUtil.optionsOf(advanced, (_a = provider === null || provider === void 0 ? void 0 : provider.mixed) !== null && _a !== void 0 ? _a : []);
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
notices.notify(t('ta.auth.custom.badNumber', { value: error instanceof Error ? error.message : String(error) }), { level: 'warning' });
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
const headers = custom_provider_util_1.CustomProviderFormUtil.headersOf(advanced);
|
|
127
|
+
onSaved(await bench.auth.saveCustomProvider({ id: provider === null || provider === void 0 ? void 0 : provider.id, name, api, baseUrl, apiKey: key, models: chosen, options, headers }));
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
notices.error(error);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
const remove = () => runRemove(async () => {
|
|
134
|
+
if (!provider) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const confirmed = await notices.confirm({
|
|
138
|
+
title: t('ta.auth.custom.removeConfirm', { name: provider.name }),
|
|
139
|
+
confirmLabel: t('ta.auth.custom.remove'),
|
|
140
|
+
danger: true,
|
|
141
|
+
});
|
|
142
|
+
if (confirmed) {
|
|
143
|
+
await bench.auth.removeCustomProvider(provider.id).then(onBack, error => notices.error(error));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const shown = fetched ? custom_provider_util_1.CustomProviderFormUtil.shown(fetched, words) : [];
|
|
147
|
+
return (React.createElement("div", { className: "ta-auth-flow ta-custom-flow" },
|
|
148
|
+
React.createElement("div", { className: "ta-auth-flow-head" },
|
|
149
|
+
React.createElement(icon_1.IconButton, { icon: lucide_react_1.ArrowLeft, label: t('ta.auth.back'), onClick: onBack }),
|
|
150
|
+
React.createElement("span", { className: "ta-auth-flow-title" }, (_e = provider === null || provider === void 0 ? void 0 : provider.name) !== null && _e !== void 0 ? _e : t('ta.auth.custom.title')),
|
|
151
|
+
React.createElement("span", { className: "ta-auth-kind" }, t('ta.auth.custom.kind'))),
|
|
152
|
+
React.createElement("form", { className: "ta-custom-form", onSubmit: event => {
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
void save();
|
|
155
|
+
} },
|
|
156
|
+
React.createElement("label", { className: "ta-store-field" },
|
|
157
|
+
React.createElement("span", { className: "ta-store-field-label" }, t('ta.auth.custom.api')),
|
|
158
|
+
React.createElement("select", { className: "ta-input ta-select", value: api, onChange: event => setApi(event.target.value) }, ta_protocol_1.TA_CUSTOM_APIS.map(each => (React.createElement("option", { key: each, value: each }, t(API_WORDS[each])))))),
|
|
159
|
+
React.createElement("label", { className: "ta-store-field" },
|
|
160
|
+
React.createElement("span", { className: "ta-store-field-label" }, t('ta.auth.custom.baseUrl')),
|
|
161
|
+
React.createElement("input", { className: "ta-input", type: "url", inputMode: "url", autoComplete: "off", spellCheck: false, required: true, placeholder: ADDRESSES[api], value: baseUrl, onChange: event => setBaseUrl(event.target.value) })),
|
|
162
|
+
React.createElement("label", { className: "ta-store-field" },
|
|
163
|
+
React.createElement("span", { className: "ta-store-field-label" },
|
|
164
|
+
t('ta.auth.custom.apiKey'),
|
|
165
|
+
React.createElement("span", { className: "ta-store-field-optional" }, t('ta.auth.custom.keyOptional'))),
|
|
166
|
+
React.createElement("input", { className: "ta-input", type: "password", autoComplete: "new-password", spellCheck: false, placeholder: (provider === null || provider === void 0 ? void 0 : provider.hasKey) ? t('ta.auth.custom.keyKept') : 'sk-…', value: apiKey, onChange: event => setApiKey(event.target.value) })),
|
|
167
|
+
React.createElement("label", { className: "ta-store-field" },
|
|
168
|
+
React.createElement("span", { className: "ta-store-field-label" },
|
|
169
|
+
t('ta.auth.custom.name'),
|
|
170
|
+
React.createElement("span", { className: "ta-store-field-optional" }, t('ta.auth.custom.optional'))),
|
|
171
|
+
React.createElement("input", { className: "ta-input", autoComplete: "off", spellCheck: false, placeholder: custom_provider_util_1.CustomProviderFormUtil.host(baseUrl), value: name, onChange: event => setName(event.target.value) })),
|
|
172
|
+
React.createElement("div", { className: "ta-store-field" },
|
|
173
|
+
React.createElement("span", { className: "ta-store-field-label" }, t('ta.auth.custom.models')),
|
|
174
|
+
React.createElement("div", { className: "ta-custom-models" },
|
|
175
|
+
models.map(id => (React.createElement("span", { key: id, className: "ta-custom-chip" },
|
|
176
|
+
React.createElement("span", { className: "ta-custom-chip-text" }, id),
|
|
177
|
+
React.createElement("button", { type: "button", "aria-label": t('ta.auth.custom.removeModel', { id }), onClick: () => setModels(before => before.filter(model => model !== id)) },
|
|
178
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.X, size: 12 }))))),
|
|
179
|
+
React.createElement("input", { className: "ta-custom-model-input", autoComplete: "off", spellCheck: false, "aria-label": t('ta.auth.custom.models'), placeholder: models.length ? '' : t('ta.auth.custom.modelPlaceholder'), value: draft, onChange: event => setDraft(event.target.value), onBlur: addDraft, onKeyDown: event => {
|
|
180
|
+
if ((event.key === 'Enter' || event.key === ',') && !event.nativeEvent.isComposing) {
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
addDraft();
|
|
183
|
+
}
|
|
184
|
+
else if (event.key === 'Backspace' && !draft && models.length) {
|
|
185
|
+
setModels(models.slice(0, -1));
|
|
186
|
+
}
|
|
187
|
+
} })),
|
|
188
|
+
React.createElement("button", { type: "button", className: `ta-button ta-custom-fetch${fetching ? ' ta-busy' : ''}`, disabled: !baseUrl.trim() || fetching, onClick: () => void fetchModels() },
|
|
189
|
+
React.createElement(busy_1.BusyMark, { busy: fetching }),
|
|
190
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Download, size: 14 }),
|
|
191
|
+
" ",
|
|
192
|
+
t('ta.auth.custom.fetch')),
|
|
193
|
+
fetchError && React.createElement(callout_1.Callout, { level: "error" }, t('ta.auth.custom.fetchFailed', { message: fetchError })),
|
|
194
|
+
fetched && (React.createElement("div", { className: "ta-custom-fetched" },
|
|
195
|
+
React.createElement("span", { className: "ta-auth-note" }, fetched.length ? t('ta.auth.custom.fetched', { count: fetched.length }) : t('ta.auth.custom.fetchedNone')),
|
|
196
|
+
fetched.length > FILTER_FROM && (React.createElement("input", { className: "ta-input", placeholder: t('ta.auth.custom.filter'), value: words, onChange: event => setWords(event.target.value) })),
|
|
197
|
+
React.createElement("div", { className: "ta-custom-fetched-list" }, shown.map(id => {
|
|
198
|
+
const picked = models.includes(id);
|
|
199
|
+
return (React.createElement("button", { key: id, type: "button", className: "ta-auth-item", "aria-pressed": picked, onClick: () => setModels(before => custom_provider_util_1.CustomProviderFormUtil.toggle(before, id)) },
|
|
200
|
+
React.createElement("span", { className: "ta-auth-name" }, id),
|
|
201
|
+
picked && React.createElement(icon_1.Icon, { icon: lucide_react_1.Check, size: 15, className: "ta-custom-picked" })));
|
|
202
|
+
}))))),
|
|
203
|
+
React.createElement(custom_provider_advanced_1.CustomProviderAdvanced, { provider: provider, state: advanced, onChange: setAdvanced }),
|
|
204
|
+
React.createElement("p", { className: "ta-store-form-note" },
|
|
205
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ShieldCheck, size: 13 }),
|
|
206
|
+
React.createElement("span", null, t('ta.auth.custom.note'))),
|
|
207
|
+
React.createElement("div", { className: "ta-custom-actions" },
|
|
208
|
+
provider && (React.createElement("button", { type: "button", className: `ta-button ta-danger${removing ? ' ta-busy' : ''}`, disabled: removing || saving, onClick: () => void remove() },
|
|
209
|
+
React.createElement(busy_1.BusyMark, { busy: removing }),
|
|
210
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Trash2, size: 14 }),
|
|
211
|
+
" ",
|
|
212
|
+
t('ta.auth.custom.remove'))),
|
|
213
|
+
React.createElement("button", { type: "submit", className: `ta-button ta-primary${saving ? ' ta-busy' : ''}`, disabled: !baseUrl.trim() || saving || removing },
|
|
214
|
+
React.createElement(busy_1.BusyMark, { busy: saving }),
|
|
215
|
+
React.createElement("span", null, t('ta.auth.custom.save')))))));
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=custom-provider-view.js.map
|
|
@@ -8,14 +8,26 @@ export interface FaceProps {
|
|
|
8
8
|
working?: boolean;
|
|
9
9
|
/** A dot at its corner: green online, grey not; none without. */
|
|
10
10
|
online?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The owner of this Ta: the close-up of its double, the dinosaur the user picked (as the account and the navigation
|
|
13
|
+
* show it), which changes with it; `face` and `seed` stand for it where the page cannot draw it.
|
|
14
|
+
*/
|
|
15
|
+
double?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Another Ta, as its double looks (TaRoomMember.look, TaFriend.look): the close-up of that dinosaur. One this page
|
|
18
|
+
* does not know is drawn by `face` and `seed`.
|
|
19
|
+
*/
|
|
20
|
+
look?: string;
|
|
11
21
|
}
|
|
12
22
|
/** One face; the eyes, cheeks and mouth are the same on every shape. */
|
|
13
|
-
export declare function Face(
|
|
23
|
+
export declare function Face(props: FaceProps): React.JSX.Element;
|
|
14
24
|
export interface GroupFaceProps {
|
|
15
25
|
/** Those of the group, the one in front first: their faces, or their ids (`seed` of {@link Face}). */
|
|
16
26
|
members: readonly {
|
|
17
27
|
face?: number;
|
|
18
28
|
seed?: string;
|
|
29
|
+
look?: string;
|
|
30
|
+
double?: boolean;
|
|
19
31
|
working?: boolean;
|
|
20
32
|
}[];
|
|
21
33
|
size: number;
|
|
@@ -37,6 +37,8 @@ exports.Face = Face;
|
|
|
37
37
|
exports.GroupFace = GroupFace;
|
|
38
38
|
const relay_faces_1 = require("@celljs/ta-relay/lib/common/relay-faces");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
|
+
const dino_species_1 = require("../avatar/dino-species");
|
|
41
|
+
const ta_avatar_1 = require("./ta-avatar");
|
|
40
42
|
/*
|
|
41
43
|
* The faces of those who are not Ta (agents, the people of rooms), drawn from FaceUtil.art (ta-relay, which the page of
|
|
42
44
|
* web guests draws too), so that they are told apart at a glance; Ta itself keeps the dinosaur of the logo. The styles
|
|
@@ -53,7 +55,20 @@ function draw(node, key) {
|
|
|
53
55
|
return React.createElement(node.tag, { ...props, key }, ...((_a = node.children) !== null && _a !== void 0 ? _a : []).map((child, index) => draw(child, index)));
|
|
54
56
|
}
|
|
55
57
|
/** One face; the eyes, cheeks and mouth are the same on every shape. */
|
|
56
|
-
function Face(
|
|
58
|
+
function Face(props) {
|
|
59
|
+
if (props.double) {
|
|
60
|
+
return React.createElement(DoubleFace, { size: props.size, online: props.online });
|
|
61
|
+
}
|
|
62
|
+
const species = dino_species_1.DinoSpecies.IDS.find(id => id === props.look);
|
|
63
|
+
return species ? React.createElement(DoubleFace, { species: species, size: props.size, online: props.online }) : React.createElement(ShapeFace, { ...props });
|
|
64
|
+
}
|
|
65
|
+
/** A Ta as its double: the close-up of the dinosaur, as the account shows it; this Ta's own without `species`. */
|
|
66
|
+
function DoubleFace({ species, size, online }) {
|
|
67
|
+
return (React.createElement("span", { className: "ta-face", style: { width: size, height: size }, "aria-hidden": "true" },
|
|
68
|
+
React.createElement(ta_avatar_1.DinoFace, { species: species, size: size }),
|
|
69
|
+
online !== undefined && React.createElement("i", { className: `ta-face-dot${online ? ' ta-face-on' : ''}` })));
|
|
70
|
+
}
|
|
71
|
+
function ShapeFace({ face: given, seed = '', size, working, online }) {
|
|
57
72
|
const face = relay_faces_1.FaceUtil.pick(given, seed);
|
|
58
73
|
const art = React.useMemo(() => draw(relay_faces_1.FaceUtil.art(face)), [face]);
|
|
59
74
|
return (React.createElement("span", { className: `ta-face${working ? ' ta-face-working' : ''}`, style: { width: size, height: size }, "data-face": face, "aria-hidden": "true" },
|
|
@@ -4,7 +4,7 @@ import type { SavedHost } from '../workbench-protocol';
|
|
|
4
4
|
/** Adding a computer by its code or link: what the sign-in and the sheet of the computers share. */
|
|
5
5
|
export declare function useAddHost(): {
|
|
6
6
|
busy: boolean;
|
|
7
|
-
error: "ta.access.add" | "ta.access.addHint" | "ta.access.added" | "ta.access.allow" | "ta.access.bind" | "ta.access.bindHint" | "ta.access.browser" | "ta.access.dismiss" | "ta.access.fromEnv" | "ta.access.lastUsed" | "ta.access.none" | "ta.access.noneHint" | "ta.access.remove" | "ta.access.removeAccount" | "ta.access.removeConfirm" | "ta.access.removeDetail" | "ta.access.requested" | "ta.access.signOut" | "ta.access.thisBrowser" | "ta.access.title" | "ta.account" | "ta.account.menu" | "ta.account.service" | "ta.ask.no" | "ta.ask.start" | "ta.ask.title" | "ta.ask.waiting" | "ta.assistant.attention" | "ta.assistant.busy" | "ta.assistant.confirmOn" | "ta.assistant.confirmShort" | "ta.assistant.copied" | "ta.assistant.copyCwd" | "ta.assistant.cwdTitle" | "ta.assistant.endedTasks" | "ta.assistant.export" | "ta.assistant.forbidden" | "ta.assistant.hello" | "ta.assistant.look" | "ta.assistant.me" | "ta.assistant.noTasks" | "ta.assistant.noTasksHint" | "ta.assistant.nothingToExport" | "ta.assistant.offline" | "ta.assistant.placeholder" | "ta.assistant.poke" | "ta.assistant.prompt" | "ta.assistant.promptTitle" | "ta.assistant.rename" | "ta.assistant.restart" | "ta.assistant.restartHint" | "ta.assistant.restartTitle" | "ta.assistant.runningTasks" | "ta.assistant.showTasks" | "ta.assistant.speakOn" | "ta.assistant.speakStop" | "ta.assistant.speakStopShort" | "ta.assistant.speakTalkShort" | "ta.assistant.step.run" | "ta.assistant.step.say" | "ta.assistant.step.tell" | "ta.assistant.stop" | "ta.assistant.taskEnded" | "ta.assistant.tasks" | "ta.assistant.tasksTool" | "ta.assistant.waking" | "ta.assistant.working" | "ta.assistant.you" | "ta.auth.account" | "ta.auth.accounts" | "ta.auth.accountsExample" | "ta.auth.accountsTitle" | "ta.auth.apiKey" | "ta.auth.back" | "ta.auth.continue" | "ta.auth.copyAndOpen" | "ta.auth.copyCode" | "ta.auth.copyLink" | "ta.auth.deviceHint" | "ta.auth.done" | "ta.auth.enterKey" | "ta.auth.failed" | "ta.auth.hint" | "ta.auth.hintRemote" | "ta.auth.keys" | "ta.auth.keysExample" | "ta.auth.later" | "ta.auth.manualCode" | "ta.auth.manualCodeRemote" | "ta.auth.none" | "ta.auth.openHint" | "ta.auth.openPage" | "ta.auth.search" | "ta.auth.signOut" | "ta.auth.signOutConfirm" | "ta.auth.signedIn" | "ta.auth.subscription" | "ta.auth.title" | "ta.auth.waiting" | "ta.back" | "ta.board" | "ta.board.add" | "ta.board.done" | "ta.board.edit" | "ta.board.empty" | "ta.board.emptyHint" | "ta.board.moreTasks" | "ta.board.move" | "ta.board.noTasks" | "ta.board.none" | "ta.board.noneHint" | "ta.board.put" | "ta.board.remove" | "ta.board.tasks" | "ta.builtin.assistant" | "ta.builtin.assistantHint" | "ta.cancel" | "ta.chat" | "ta.chat.archived" | "ta.chat.archivedCount" | "ta.chat.archivedHint" | "ta.chat.asking" | "ta.chat.asks" | "ta.chat.asksCount" | "ta.chat.byDirectory" | "ta.chat.cwdTitle" | "ta.chat.doubleTag" | "ta.chat.doubleTagTitle" | "ta.chat.handToDouble" | "ta.chat.hint" | "ta.chat.letGo" | "ta.chat.new" | "ta.chat.newIn" | "ta.chat.noMatch" | "ta.chat.none" | "ta.chat.noneHint" | "ta.chat.olderCount" | "ta.chat.open" | "ta.chat.opening" | "ta.chat.openingOffline" | "ta.chat.pin" | "ta.chat.pinned" | "ta.chat.remove" | "ta.chat.removeShort" | "ta.chat.removed" | "ta.chat.restore" | "ta.chat.restoreShort" | "ta.chat.search" | "ta.chat.suggest.1" | "ta.chat.suggest.1.label" | "ta.chat.suggest.2" | "ta.chat.suggest.2.label" | "ta.chat.suggest.3" | "ta.chat.suggest.3.label" | "ta.chat.title" | "ta.chat.toAsk" | "ta.chat.unpin" | "ta.chat.unseen" | "ta.close" | "ta.command.bug" | "ta.command.mcp" | "ta.composer.addImage" | "ta.composer.album" | "ta.composer.camera" | "ta.composer.commands" | "ta.composer.filesUnavailable" | "ta.composer.filter" | "ta.composer.image.count" | "ta.composer.image.size" | "ta.composer.image.type" | "ta.composer.imageLoading" | "ta.composer.keyboard" | "ta.composer.label" | "ta.composer.listening" | "ta.composer.mentionFile" | "ta.composer.more" | "ta.composer.noFiles" | "ta.composer.noMatch" | "ta.composer.page" | "ta.composer.placeholder" | "ta.composer.placeholderTouch" | "ta.composer.queue.count" | "ta.composer.queue.editTitle" | "ta.composer.queue.followUp" | "ta.composer.queue.remove" | "ta.composer.queue.steering" | "ta.composer.queue.takeBackAll" | "ta.composer.queue.takeBackTitle" | "ta.composer.recentShot" | "ta.composer.recentShotAdd" | "ta.composer.removeImage" | "ta.composer.steerPlaceholder" | "ta.composer.steerPlaceholderTouch" | "ta.composer.steerTitle" | "ta.composer.stopTitle" | "ta.composer.stopping" | "ta.composer.voice" | "ta.composer.voiceDenied" | "ta.composer.voiceFailed" | "ta.composer.voiceStop" | "ta.connection.away" | "ta.connection.awayBrief" | "ta.connection.back" | "ta.connection.lost" | "ta.connection.notDone" | "ta.connection.outdated" | "ta.connection.reload" | "ta.connection.retry" | "ta.connection.retryIn" | "ta.connection.retryNow" | "ta.connection.retrying" | "ta.connection.unreachableBrief" | "ta.copied" | "ta.copy" | "ta.discover" | "ta.discover.empty" | "ta.discover.emptyHint" | "ta.discover.hint" | "ta.dismiss" | "ta.editor" | "ta.editor.close" | "ta.editor.discardClose" | "ta.editor.failed" | "ta.editor.loading" | "ta.editor.unsavedManyTitle" | "ta.editor.unsavedMessage" | "ta.editor.unsavedTitle" | "ta.environment.connect" | "ta.environment.connections" | "ta.environment.failed" | "ta.environment.failedTitle" | "ta.environment.none" | "ta.environment.own" | "ta.environment.ownDetail" | "ta.environment.ownHint" | "ta.environment.restart" | "ta.environment.restartConfirm" | "ta.environment.restartDetail" | "ta.environment.retry" | "ta.environment.running" | "ta.environment.sandbox" | "ta.environment.starting" | "ta.environment.stop" | "ta.environment.stopConfirm" | "ta.environment.stopDetail" | "ta.environment.stopped" | "ta.environment.switch" | "ta.environment.switchConfirm" | "ta.environment.switchDetail" | "ta.environment.title" | "ta.environment.token" | "ta.environment.url" | "ta.environment.where" | "ta.environment.whereHint" | "ta.error.alreadyCompacted" | "ta.error.forbidden" | "ta.error.forbiddenAsk" | "ta.error.forbiddenHint" | "ta.error.forbiddenNever" | "ta.error.limit" | "ta.error.messageConflict" | "ta.error.modelNotFound" | "ta.error.nothingToCompact" | "ta.error.sessionBusy" | "ta.error.sessionLocked" | "ta.error.sessionNotFound" | "ta.error.tooManySessions" | "ta.folder.empty" | "ta.folder.failed" | "ta.folder.open" | "ta.folder.path" | "ta.folder.title" | "ta.folder.up" | "ta.gait.bounce" | "ta.gait.sneak" | "ta.gait.strut" | "ta.gait.waddle" | "ta.gait.walk" | "ta.game.failed" | "ta.game.label" | "ta.game.loading" | "ta.home" | "ta.host.title" | "ta.hosts.cameraDenied" | "ta.hosts.connecting" | "ta.hosts.notPairing" | "ta.hosts.paste" | "ta.hosts.refused" | "ta.hosts.remove" | "ta.hosts.removeConfirm" | "ta.hosts.rename" | "ta.hosts.saved" | "ta.hosts.scan" | "ta.hosts.scanFailed" | "ta.hosts.scanHint" | "ta.hosts.scanInstructions" | "ta.hosts.scanShort" | "ta.hosts.switching" | "ta.hosts.thisServer" | "ta.hosts.title" | "ta.hosts.unreachable" | "ta.launch.failed" | "ta.launch.open" | "ta.launch.ready" | "ta.launcher" | "ta.launcher.back" | "ta.launcher.clear" | "ta.launcher.noResults" | "ta.launcher.place.discover" | "ta.launcher.place.launcher" | "ta.launcher.place.list" | "ta.launcher.place.navigation" | "ta.launcher.search" | "ta.launcher.searchHint" | "ta.launcher.searchPlaceholder" | "ta.layout.editor" | "ta.layout.panel" | "ta.layout.resize" | "ta.layout.sidebar" | "ta.link.ask" | "ta.link.copied" | "ta.link.external" | "ta.link.externalMac" | "ta.link.noOpener" | "ta.link.notFound" | "ta.link.open" | "ta.link.openFile" | "ta.link.openFolder" | "ta.link.trust" | "ta.link.trustHint" | "ta.look.gait" | "ta.look.premium" | "ta.look.species" | "ta.look.title" | "ta.manage.about" | "ta.manage.accounts" | "ta.manage.packages" | "ta.manage.relay" | "ta.manage.shortcuts" | "ta.manage.workingDirectory" | "ta.markdown.diagram" | "ta.markdown.download" | "ta.markdown.enlarge" | "ta.markdown.exitFullscreen" | "ta.markdown.fullscreen" | "ta.markdown.missing" | "ta.markdown.source" | "ta.me" | "ta.menu" | "ta.message.branch" | "ta.message.compacted" | "ta.message.compactedFrom" | "ta.message.debug" | "ta.message.debugCopied" | "ta.message.discard" | "ta.message.failedUnknown" | "ta.message.forkAt" | "ta.message.forkBefore" | "ta.message.forked" | "ta.message.images" | "ta.message.interrupted" | "ta.message.modelSwitched" | "ta.message.notSaved" | "ta.message.queued" | "ta.message.queuedTitle" | "ta.message.quote" | "ta.message.resend" | "ta.message.resume" | "ta.message.resumeText" | "ta.message.resumed" | "ta.message.rewind" | "ta.message.rewindConfirm" | "ta.message.rewindDetail" | "ta.message.selectText" | "ta.message.sendFailed" | "ta.message.showLess" | "ta.message.showMore" | "ta.message.silent" | "ta.message.skill" | "ta.message.steered" | "ta.message.steeredTitle" | "ta.message.stopped" | "ta.message.thinking" | "ta.message.usageTitle" | "ta.message.used" | "ta.model.default" | "ta.model.defaultNone" | "ta.model.search" | "ta.mood.attention" | "ta.mood.done" | "ta.mood.idle" | "ta.mood.listening" | "ta.mood.sleeping" | "ta.mood.speaking" | "ta.mood.thinking" | "ta.mood.working" | "ta.more" | "ta.nav.fold" | "ta.nav.open" | "ta.nav.pin" | "ta.nav.settings" | "ta.no" | "ta.notice.picture" | "ta.notices" | "ta.off" | "ta.ok" | "ta.on" | "ta.online" | "ta.open.failed" | "ta.open.notALink" | "ta.open.open" | "ta.open.published" | "ta.open.relayed" | "ta.open.title" | "ta.packages" | "ta.packages.builtin" | "ta.packages.builtinTitle" | "ta.packages.failed" | "ta.packages.hint" | "ta.packages.installed" | "ta.packages.none" | "ta.packages.noneHint" | "ta.packages.reload" | "ta.packages.reloaded" | "ta.packages.remove" | "ta.packages.removeConfirm" | "ta.packages.removeDetail" | "ta.packages.removed" | "ta.packages.scope.project" | "ta.packages.scope.user" | "ta.panel.hide" | "ta.panel.show" | "ta.process.done" | "ta.process.earlier" | "ta.process.failed" | "ta.process.requestFailed" | "ta.process.running" | "ta.process.showAll" | "ta.process.thinking" | "ta.process.thought" | "ta.progress.calling" | "ta.progress.compacting" | "ta.progress.input" | "ta.progress.output" | "ta.progress.retry.error" | "ta.progress.retry.network" | "ta.progress.retry.overloaded" | "ta.progress.retry.rateLimit" | "ta.progress.retrying" | "ta.progress.retryingNow" | "ta.progress.waiting" | "ta.pwa.install" | "ta.reconnecting" | "ta.relay.devices" | "ta.relay.done" | "ta.relay.hint" | "ta.relay.keepAwake" | "ta.relay.keepAwakeHint" | "ta.relay.offline" | "ta.relay.online" | "ta.relay.pair" | "ta.relay.phone" | "ta.relay.scan" | "ta.relay.title" | "ta.relay.unpair" | "ta.relay.unpairConfirm" | "ta.relays.add" | "ta.relays.addButton" | "ta.relays.addHint" | "ta.relays.addPlaceholder" | "ta.relays.broken" | "ta.relays.drive" | "ta.relays.driveHint" | "ta.relays.driveUse" | "ta.relays.feature.devices" | "ta.relays.feature.devicesHint" | "ta.relays.feature.rooms" | "ta.relays.feature.roomsHint" | "ta.relays.feature.share" | "ta.relays.feature.shareHint" | "ta.relays.feature.sync" | "ta.relays.feature.syncHint" | "ta.relays.file" | "ta.relays.folderOnly" | "ta.relays.limits" | "ta.relays.memory" | "ta.relays.official" | "ta.relays.offline" | "ta.relays.online" | "ta.relays.onlineNoTime" | "ta.relays.optional" | "ta.relays.remove" | "ta.relays.storeAdd" | "ta.relays.storeName" | "ta.relays.storeNote" | "ta.relays.storeOnly" | "ta.relays.storeOpen" | "ta.relays.storeType" | "ta.relays.title" | "ta.relays.unavailable" | "ta.remote.add" | "ta.remote.addHint" | "ta.remote.added" | "ta.remote.closePort" | "ta.remote.connect" | "ta.remote.connected" | "ta.remote.connectedTo" | "ta.remote.connecting" | "ta.remote.description" | "ta.remote.disconnect" | "ta.remote.disconnected" | "ta.remote.failed" | "ta.remote.forwarded" | "ta.remote.fromConfig" | "ta.remote.invalid" | "ta.remote.local" | "ta.remote.lost" | "ta.remote.none" | "ta.remote.noneHint" | "ta.remote.options" | "ta.remote.port" | "ta.remote.prompt.continue" | "ta.remote.prompt.title" | "ta.remote.prompt.trust" | "ta.remote.remove" | "ta.remote.step.checking" | "ta.remote.step.connecting" | "ta.remote.step.copying-server" | "ta.remote.step.installing-node" | "ta.remote.step.starting" | "ta.remote.title" | "ta.scan" | "ta.scan.album" | "ta.scan.ask" | "ta.scan.askHint" | "ta.scan.askPlaceholder" | "ta.scan.askTitle" | "ta.scan.cameraFailed" | "ta.scan.copyFailed" | "ta.scan.error" | "ta.scan.errorPrompt" | "ta.scan.failed" | "ta.scan.flip" | "ta.scan.identify" | "ta.scan.identifyPrompt" | "ta.scan.instructions" | "ta.scan.myCode" | "ta.scan.noCode" | "ta.scan.note" | "ta.scan.notePrompt" | "ta.scan.pairMessage" | "ta.scan.pairTitle" | "ta.scan.result" | "ta.scan.retake" | "ta.scan.sameHost" | "ta.scan.translate" | "ta.scan.translatePrompt" | "ta.search.all" | "ta.search.failed" | "ta.search.loading" | "ta.search.more" | "ta.search.pages" | "ta.select.all" | "ta.select.count" | "ta.select.done" | "ta.send" | "ta.session.compact" | "ta.session.compactTitle" | "ta.session.earlier" | "ta.session.empty" | "ta.session.model" | "ta.session.noModel" | "ta.session.phase.thinking" | "ta.session.phase.working" | "ta.session.phase.writing" | "ta.session.thinking" | "ta.session.title" | "ta.session.toBottom" | "ta.session.waitingClientTool" | "ta.session.working" | "ta.setting.codemode.mode" | "ta.setting.codemode.mode.hint" | "ta.setting.codemode.mode.on" | "ta.setting.codemode.mode.only" | "ta.setting.compaction.enabled" | "ta.setting.compaction.enabled.hint" | "ta.setting.compaction.keepRecentTokens" | "ta.setting.compaction.keepRecentTokens.hint" | "ta.setting.compaction.reserveTokens" | "ta.setting.compaction.reserveTokens.hint" | "ta.setting.defaultThinkingLevel" | "ta.setting.defaultThinkingLevel.high" | "ta.setting.defaultThinkingLevel.hint" | "ta.setting.defaultThinkingLevel.low" | "ta.setting.defaultThinkingLevel.max" | "ta.setting.defaultThinkingLevel.medium" | "ta.setting.defaultThinkingLevel.minimal" | "ta.setting.defaultThinkingLevel.off" | "ta.setting.defaultThinkingLevel.xhigh" | "ta.setting.enableSkillCommands" | "ta.setting.enableSkillCommands.hint" | "ta.setting.followUpMode" | "ta.setting.followUpMode.all" | "ta.setting.followUpMode.hint" | "ta.setting.followUpMode.one-at-a-time" | "ta.setting.images.autoResize" | "ta.setting.images.autoResize.hint" | "ta.setting.images.blockImages" | "ta.setting.images.blockImages.hint" | "ta.setting.model" | "ta.setting.model.hint" | "ta.setting.retry.enabled" | "ta.setting.retry.enabled.hint" | "ta.setting.retry.maxRetries" | "ta.setting.shellCommandPrefix" | "ta.setting.shellCommandPrefix.hint" | "ta.setting.shellPath" | "ta.setting.shellPath.hint" | "ta.setting.steeringMode" | "ta.setting.steeringMode.all" | "ta.setting.steeringMode.hint" | "ta.setting.steeringMode.one-at-a-time" | "ta.setting.transport" | "ta.setting.transport.auto" | "ta.setting.transport.hint" | "ta.settings" | "ta.settings.about" | "ta.settings.accounts" | "ta.settings.accountsDescription" | "ta.settings.agent" | "ta.settings.appearance" | "ta.settings.assistant" | "ta.settings.assistantModel" | "ta.settings.assistantModelHint" | "ta.settings.chatArchive" | "ta.settings.chatArchiveHint" | "ta.settings.chatFold" | "ta.settings.chatFoldHint" | "ta.settings.chatFontSize" | "ta.settings.chatFontSizeHint" | "ta.settings.chats" | "ta.settings.confirmTasks" | "ta.settings.confirmTasksHint" | "ta.settings.cwd" | "ta.settings.cwdChange" | "ta.settings.cwdDescription" | "ta.settings.days" | "ta.settings.decides" | "ta.settings.default" | "ta.settings.displayLanguage" | "ta.settings.failed" | "ta.settings.fontSize" | "ta.settings.fontSize.large" | "ta.settings.fontSize.small" | "ta.settings.fontSize.standard" | "ta.settings.fontSize.xlarge" | "ta.settings.fontSizeHint" | "ta.settings.fromUser" | "ta.settings.group.context" | "ta.settings.group.conversation" | "ta.settings.group.model" | "ta.settings.group.tools" | "ta.settings.keepAlive" | "ta.settings.keepAliveDescription" | "ta.settings.language" | "ta.settings.language.system" | "ta.settings.links" | "ta.settings.loading" | "ta.settings.manageAccounts" | "ta.settings.maxTasks" | "ta.settings.maxTasksAny" | "ta.settings.maxTasksHint" | "ta.settings.minutes" | "ta.settings.modified" | "ta.settings.more" | "ta.settings.motion" | "ta.settings.motionHint" | "ta.settings.navigation" | "ta.settings.navigation.folded" | "ta.settings.navigation.inNav" | "ta.settings.navigation.none" | "ta.settings.navigation.overflow" | "ta.settings.navigation.pinned" | "ta.settings.navigation.reset" | "ta.settings.navigation.resetButton" | "ta.settings.navigation.resetHint" | "ta.settings.navigation.show" | "ta.settings.navigation.slots" | "ta.settings.navigation.slotsHint" | "ta.settings.never" | "ta.settings.noMatch" | "ta.settings.off" | "ta.settings.offline" | "ta.settings.on" | "ta.settings.oneYear" | "ta.settings.recentShots" | "ta.settings.recentShotsHint" | "ta.settings.relay" | "ta.settings.relayDescription" | "ta.settings.reset" | "ta.settings.retention" | "ta.settings.retentionDescription" | "ta.settings.scope.project" | "ta.settings.scope.user" | "ta.settings.scopeHint.project" | "ta.settings.scopeHint.user" | "ta.settings.search" | "ta.settings.server" | "ta.settings.shortcuts" | "ta.settings.signOut" | "ta.settings.speak" | "ta.settings.speakHint" | "ta.settings.speakTalk" | "ta.settings.speakTalkHint" | "ta.settings.taskModel" | "ta.settings.taskModelHint" | "ta.settings.theme" | "ta.settings.theme.dark" | "ta.settings.theme.light" | "ta.settings.theme.system" | "ta.settings.trustedDomains" | "ta.settings.trustedDomainsAdd" | "ta.settings.trustedDomainsEmpty" | "ta.settings.trustedDomainsEmptyHint" | "ta.settings.trustedDomainsHint" | "ta.settings.trustedDomainsRemove" | "ta.settings.untrusted" | "ta.settings.version" | "ta.settings.voice" | "ta.settings.voiceAuto" | "ta.settings.voiceAutoNone" | "ta.settings.voiceName" | "ta.settings.voiceNameHint" | "ta.settings.voicePreview" | "ta.settings.voiceSample" | "ta.settings.web" | "ta.settings.webHint" | "ta.share.cannot" | "ta.share.copied" | "ta.share.copy" | "ta.share.making" | "ta.share.published" | "ta.share.qr" | "ta.share.relayed" | "ta.share.send" | "ta.share.stop" | "ta.share.stopHint" | "ta.share.stopTitle" | "ta.share.title" | "ta.shortcut.commands" | "ta.shortcut.files" | "ta.shortcut.followUp" | "ta.shortcut.newline" | "ta.shortcut.save" | "ta.shortcut.send" | "ta.shortcut.settings" | "ta.shortcut.sidebar" | "ta.shortcut.stop" | "ta.sidebar" | "ta.sidebar.closeTitle" | "ta.signin.accountsHint" | "ta.signin.connect" | "ta.signin.denied" | "ta.signin.failed" | "ta.signin.hint" | "ta.signin.hintRemote" | "ta.signin.orToken" | "ta.signin.pairHint" | "ta.signin.pairRefused" | "ta.signin.pairing" | "ta.signin.refused" | "ta.signin.title" | "ta.signin.token" | "ta.signin.wechat" | "ta.signin.with" | "ta.species.ankylosaurus" | "ta.species.brachiosaurus" | "ta.species.dragon" | "ta.species.parasaurolophus" | "ta.species.pteranodon" | "ta.species.stegosaurus" | "ta.species.trex" | "ta.species.triceratops" | "ta.species.velociraptor" | "ta.stop" | "ta.suggest.1" | "ta.suggest.1.label" | "ta.suggest.2" | "ta.suggest.2.label" | "ta.suggest.3" | "ta.suggest.3.label" | "ta.tab.close" | "ta.tab.closeAll" | "ta.tab.closeLeft" | "ta.tab.closeOthers" | "ta.tab.closeRight" | "ta.tab.closeSaved" | "ta.tab.keepOpen" | "ta.talk.edit" | "ta.talk.hold" | "ta.talk.listening" | "ta.talk.releaseCancel" | "ta.talk.releaseEdit" | "ta.talk.releaseSend" | "ta.talk.tooShort" | "ta.task.allTasks" | "ta.task.done" | "ta.task.ended" | "ta.task.failed" | "ta.task.remove" | "ta.task.removeHint" | "ta.task.removeTitle" | "ta.task.running" | "ta.task.stopped" | "ta.task.takeOver" | "ta.task.takeOverHint" | "ta.task.takenOver" | "ta.task.waiting" | "ta.tasks.all" | "ta.tasks.ended" | "ta.tasks.fewer" | "ta.tasks.removeTitle" | "ta.tasks.running" | "ta.tasks.runningCount" | "ta.tasks.select" | "ta.tasks.waiting" | "ta.tasks.waitingCount" | "ta.terminal.openLink" | "ta.terminal.openLinkMac" | "ta.terminal.openUrl" | "ta.terminal.openUrlMac" | "ta.time.dayBefore" | "ta.time.earlier" | "ta.time.today" | "ta.time.week" | "ta.time.yesterday" | "ta.tool.earlier" | "ta.tool.exitCode" | "ta.tool.failedCalls" | "ta.tool.hideScript" | "ta.tool.moreEntries" | "ta.tool.noOutput" | "ta.tool.printed" | "ta.tool.showScript" | "ta.tool.verb.bash" | "ta.tool.verb.codemode" | "ta.tool.verb.deleteScheduled" | "ta.tool.verb.deleteTeam" | "ta.tool.verb.edit" | "ta.tool.verb.editImage" | "ta.tool.verb.fetch" | "ta.tool.verb.find" | "ta.tool.verb.getTask" | "ta.tool.verb.grep" | "ta.tool.verb.listScheduled" | "ta.tool.verb.listTasks" | "ta.tool.verb.ls" | "ta.tool.verb.messageTask" | "ta.tool.verb.publish" | "ta.tool.verb.read" | "ta.tool.verb.scheduleTask" | "ta.tool.verb.sendMessage" | "ta.tool.verb.skill" | "ta.tool.verb.startTask" | "ta.tool.verb.stopTask" | "ta.tool.verb.todo" | "ta.tool.verb.viewImage" | "ta.tool.verb.webSearch" | "ta.tool.verb.write" | "ta.unreachable" | "ta.widget.failed" | "ta.workbench" | "ta.workbench.cards" | "ta.workbench.cwd" | "ta.workbench.empty" | "ta.workbench.emptyHint" | "ta.workbench.maximize" | "ta.workbench.noCards" | "ta.workbench.noCardsHint" | "ta.workbench.open" | "ta.workbench.restore" | "ta.workbench.tabs" | "ta.workingDirectory.changed" | "ta.yes" | "ta.zoom.actual" | "ta.zoom.failed" | "ta.zoom.fit" | "ta.zoom.in" | "ta.zoom.loading" | "ta.zoom.next" | "ta.zoom.out" | "ta.zoom.previous" | undefined;
|
|
7
|
+
error: "ta.access.add" | "ta.access.addHint" | "ta.access.added" | "ta.access.allow" | "ta.access.bind" | "ta.access.bindHint" | "ta.access.browser" | "ta.access.dismiss" | "ta.access.fromEnv" | "ta.access.lastUsed" | "ta.access.none" | "ta.access.noneHint" | "ta.access.remove" | "ta.access.removeAccount" | "ta.access.removeConfirm" | "ta.access.removeDetail" | "ta.access.requested" | "ta.access.signOut" | "ta.access.thisBrowser" | "ta.access.title" | "ta.account" | "ta.account.menu" | "ta.account.service" | "ta.ask.no" | "ta.ask.start" | "ta.ask.title" | "ta.ask.waiting" | "ta.assistant.attention" | "ta.assistant.busy" | "ta.assistant.confirmOn" | "ta.assistant.confirmShort" | "ta.assistant.copied" | "ta.assistant.copyCwd" | "ta.assistant.cwdTitle" | "ta.assistant.endedTasks" | "ta.assistant.export" | "ta.assistant.forbidden" | "ta.assistant.hello" | "ta.assistant.look" | "ta.assistant.me" | "ta.assistant.noTasks" | "ta.assistant.noTasksHint" | "ta.assistant.nothingToExport" | "ta.assistant.offline" | "ta.assistant.placeholder" | "ta.assistant.poke" | "ta.assistant.prompt" | "ta.assistant.promptTitle" | "ta.assistant.rename" | "ta.assistant.restart" | "ta.assistant.restartHint" | "ta.assistant.restartTitle" | "ta.assistant.runningTasks" | "ta.assistant.showTasks" | "ta.assistant.speakOn" | "ta.assistant.speakStop" | "ta.assistant.speakStopShort" | "ta.assistant.speakTalkShort" | "ta.assistant.step.run" | "ta.assistant.step.say" | "ta.assistant.step.tell" | "ta.assistant.stop" | "ta.assistant.taskEnded" | "ta.assistant.tasks" | "ta.assistant.tasksTool" | "ta.assistant.waking" | "ta.assistant.working" | "ta.assistant.you" | "ta.auth.account" | "ta.auth.accounts" | "ta.auth.accountsExample" | "ta.auth.accountsTitle" | "ta.auth.apiKey" | "ta.auth.back" | "ta.auth.continue" | "ta.auth.copyAndOpen" | "ta.auth.copyCode" | "ta.auth.copyLink" | "ta.auth.custom.add" | "ta.auth.custom.addHeader" | "ta.auth.custom.addHint" | "ta.auth.custom.advanced" | "ta.auth.custom.advancedHint" | "ta.auth.custom.api" | "ta.auth.custom.apiAnthropic" | "ta.auth.custom.apiGoogle" | "ta.auth.custom.apiKey" | "ta.auth.custom.apiOpenai" | "ta.auth.custom.apiResponses" | "ta.auth.custom.badNumber" | "ta.auth.custom.baseUrl" | "ta.auth.custom.contextWindow" | "ta.auth.custom.fetch" | "ta.auth.custom.fetchFailed" | "ta.auth.custom.fetched" | "ta.auth.custom.fetchedNone" | "ta.auth.custom.filter" | "ta.auth.custom.headerName" | "ta.auth.custom.headerValue" | "ta.auth.custom.headers" | "ta.auth.custom.images" | "ta.auth.custom.keyKept" | "ta.auth.custom.keyOptional" | "ta.auth.custom.kind" | "ta.auth.custom.maxTokens" | "ta.auth.custom.mixed" | "ta.auth.custom.modelPlaceholder" | "ta.auth.custom.models" | "ta.auth.custom.name" | "ta.auth.custom.needModel" | "ta.auth.custom.note" | "ta.auth.custom.optional" | "ta.auth.custom.reasoning" | "ta.auth.custom.remove" | "ta.auth.custom.removeConfirm" | "ta.auth.custom.removeHeader" | "ta.auth.custom.removeModel" | "ta.auth.custom.save" | "ta.auth.custom.saved" | "ta.auth.custom.title" | "ta.auth.deviceHint" | "ta.auth.done" | "ta.auth.enterKey" | "ta.auth.failed" | "ta.auth.hint" | "ta.auth.hintRemote" | "ta.auth.keys" | "ta.auth.keysExample" | "ta.auth.later" | "ta.auth.manualCode" | "ta.auth.manualCodeRemote" | "ta.auth.none" | "ta.auth.openHint" | "ta.auth.openPage" | "ta.auth.search" | "ta.auth.signOut" | "ta.auth.signOutConfirm" | "ta.auth.signedIn" | "ta.auth.subscription" | "ta.auth.title" | "ta.auth.waiting" | "ta.back" | "ta.board" | "ta.board.add" | "ta.board.done" | "ta.board.edit" | "ta.board.empty" | "ta.board.emptyHint" | "ta.board.moreTasks" | "ta.board.move" | "ta.board.noTasks" | "ta.board.none" | "ta.board.noneHint" | "ta.board.put" | "ta.board.remove" | "ta.board.tasks" | "ta.builtin.assistant" | "ta.builtin.assistantHint" | "ta.cancel" | "ta.chat" | "ta.chat.archived" | "ta.chat.archivedCount" | "ta.chat.archivedHint" | "ta.chat.asking" | "ta.chat.asks" | "ta.chat.asksCount" | "ta.chat.byDirectory" | "ta.chat.cwdTitle" | "ta.chat.doubleTag" | "ta.chat.doubleTagTitle" | "ta.chat.handToDouble" | "ta.chat.hint" | "ta.chat.letGo" | "ta.chat.new" | "ta.chat.newIn" | "ta.chat.noMatch" | "ta.chat.none" | "ta.chat.noneHint" | "ta.chat.olderCount" | "ta.chat.open" | "ta.chat.opening" | "ta.chat.openingOffline" | "ta.chat.pin" | "ta.chat.pinned" | "ta.chat.remove" | "ta.chat.removeShort" | "ta.chat.removed" | "ta.chat.replyingFor" | "ta.chat.restore" | "ta.chat.restoreShort" | "ta.chat.search" | "ta.chat.suggest.1" | "ta.chat.suggest.1.label" | "ta.chat.suggest.2" | "ta.chat.suggest.2.label" | "ta.chat.suggest.3" | "ta.chat.suggest.3.label" | "ta.chat.title" | "ta.chat.toAsk" | "ta.chat.unpin" | "ta.chat.unseen" | "ta.close" | "ta.command.bug" | "ta.command.mcp" | "ta.composer.addImage" | "ta.composer.album" | "ta.composer.camera" | "ta.composer.commands" | "ta.composer.filesUnavailable" | "ta.composer.filter" | "ta.composer.image.count" | "ta.composer.image.size" | "ta.composer.image.type" | "ta.composer.imageLoading" | "ta.composer.keyboard" | "ta.composer.label" | "ta.composer.listening" | "ta.composer.mentionFile" | "ta.composer.more" | "ta.composer.noFiles" | "ta.composer.noMatch" | "ta.composer.page" | "ta.composer.placeholder" | "ta.composer.placeholderTouch" | "ta.composer.queue.count" | "ta.composer.queue.editTitle" | "ta.composer.queue.followUp" | "ta.composer.queue.remove" | "ta.composer.queue.steering" | "ta.composer.queue.takeBackAll" | "ta.composer.queue.takeBackTitle" | "ta.composer.recentShot" | "ta.composer.recentShotAdd" | "ta.composer.removeImage" | "ta.composer.steerPlaceholder" | "ta.composer.steerPlaceholderTouch" | "ta.composer.steerTitle" | "ta.composer.stopTitle" | "ta.composer.stopping" | "ta.composer.voice" | "ta.composer.voiceDenied" | "ta.composer.voiceFailed" | "ta.composer.voiceStop" | "ta.connection.away" | "ta.connection.awayBrief" | "ta.connection.back" | "ta.connection.lost" | "ta.connection.notDone" | "ta.connection.outdated" | "ta.connection.reload" | "ta.connection.retry" | "ta.connection.retryIn" | "ta.connection.retryNow" | "ta.connection.retrying" | "ta.connection.unreachableBrief" | "ta.copied" | "ta.copy" | "ta.discover" | "ta.discover.empty" | "ta.discover.emptyHint" | "ta.discover.hint" | "ta.dismiss" | "ta.editor" | "ta.editor.close" | "ta.editor.discardClose" | "ta.editor.failed" | "ta.editor.loading" | "ta.editor.unsavedManyTitle" | "ta.editor.unsavedMessage" | "ta.editor.unsavedTitle" | "ta.environment.connect" | "ta.environment.connections" | "ta.environment.failed" | "ta.environment.failedTitle" | "ta.environment.none" | "ta.environment.own" | "ta.environment.ownDetail" | "ta.environment.ownHint" | "ta.environment.restart" | "ta.environment.restartConfirm" | "ta.environment.restartDetail" | "ta.environment.retry" | "ta.environment.running" | "ta.environment.sandbox" | "ta.environment.starting" | "ta.environment.stop" | "ta.environment.stopConfirm" | "ta.environment.stopDetail" | "ta.environment.stopped" | "ta.environment.switch" | "ta.environment.switchConfirm" | "ta.environment.switchDetail" | "ta.environment.title" | "ta.environment.token" | "ta.environment.url" | "ta.environment.where" | "ta.environment.whereHint" | "ta.error.alreadyCompacted" | "ta.error.forbidden" | "ta.error.forbiddenAsk" | "ta.error.forbiddenHint" | "ta.error.forbiddenNever" | "ta.error.limit" | "ta.error.messageConflict" | "ta.error.modelNotFound" | "ta.error.nothingToCompact" | "ta.error.sessionBusy" | "ta.error.sessionLocked" | "ta.error.sessionNotFound" | "ta.error.tooManySessions" | "ta.folder.empty" | "ta.folder.failed" | "ta.folder.open" | "ta.folder.path" | "ta.folder.title" | "ta.folder.up" | "ta.gait.bounce" | "ta.gait.sneak" | "ta.gait.strut" | "ta.gait.waddle" | "ta.gait.walk" | "ta.game.failed" | "ta.game.label" | "ta.game.loading" | "ta.home" | "ta.host.title" | "ta.hosts.cameraDenied" | "ta.hosts.connecting" | "ta.hosts.notPairing" | "ta.hosts.paste" | "ta.hosts.refused" | "ta.hosts.remove" | "ta.hosts.removeConfirm" | "ta.hosts.rename" | "ta.hosts.saved" | "ta.hosts.scan" | "ta.hosts.scanFailed" | "ta.hosts.scanHint" | "ta.hosts.scanInstructions" | "ta.hosts.scanShort" | "ta.hosts.switching" | "ta.hosts.thisServer" | "ta.hosts.title" | "ta.hosts.unreachable" | "ta.launch.failed" | "ta.launch.open" | "ta.launch.ready" | "ta.launcher" | "ta.launcher.back" | "ta.launcher.clear" | "ta.launcher.noResults" | "ta.launcher.place.discover" | "ta.launcher.place.launcher" | "ta.launcher.place.list" | "ta.launcher.place.navigation" | "ta.launcher.search" | "ta.launcher.searchHint" | "ta.launcher.searchPlaceholder" | "ta.layout.editor" | "ta.layout.panel" | "ta.layout.resize" | "ta.layout.sidebar" | "ta.link.ask" | "ta.link.copied" | "ta.link.external" | "ta.link.externalMac" | "ta.link.noOpener" | "ta.link.notFound" | "ta.link.open" | "ta.link.openFile" | "ta.link.openFolder" | "ta.link.trust" | "ta.link.trustHint" | "ta.look.gait" | "ta.look.premium" | "ta.look.species" | "ta.look.title" | "ta.manage.about" | "ta.manage.accounts" | "ta.manage.packages" | "ta.manage.relay" | "ta.manage.shortcuts" | "ta.manage.workingDirectory" | "ta.markdown.diagram" | "ta.markdown.download" | "ta.markdown.enlarge" | "ta.markdown.exitFullscreen" | "ta.markdown.fullscreen" | "ta.markdown.missing" | "ta.markdown.source" | "ta.me" | "ta.menu" | "ta.message.branch" | "ta.message.compacted" | "ta.message.compactedFrom" | "ta.message.debug" | "ta.message.debugCopied" | "ta.message.discard" | "ta.message.failedUnknown" | "ta.message.forkAt" | "ta.message.forkBefore" | "ta.message.forked" | "ta.message.images" | "ta.message.interrupted" | "ta.message.modelSwitched" | "ta.message.notSaved" | "ta.message.queued" | "ta.message.queuedTitle" | "ta.message.quote" | "ta.message.resend" | "ta.message.resume" | "ta.message.resumeText" | "ta.message.resumed" | "ta.message.rewind" | "ta.message.rewindConfirm" | "ta.message.rewindDetail" | "ta.message.selectText" | "ta.message.sendFailed" | "ta.message.showLess" | "ta.message.showMore" | "ta.message.silent" | "ta.message.skill" | "ta.message.steered" | "ta.message.steeredTitle" | "ta.message.stopped" | "ta.message.thinking" | "ta.message.usageTitle" | "ta.message.used" | "ta.model.default" | "ta.model.defaultNone" | "ta.model.search" | "ta.mood.attention" | "ta.mood.done" | "ta.mood.idle" | "ta.mood.listening" | "ta.mood.sleeping" | "ta.mood.speaking" | "ta.mood.thinking" | "ta.mood.working" | "ta.more" | "ta.nav.fold" | "ta.nav.open" | "ta.nav.pin" | "ta.nav.settings" | "ta.no" | "ta.notice.picture" | "ta.notices" | "ta.off" | "ta.ok" | "ta.on" | "ta.online" | "ta.open.failed" | "ta.open.notALink" | "ta.open.open" | "ta.open.published" | "ta.open.relayed" | "ta.open.title" | "ta.packages" | "ta.packages.builtin" | "ta.packages.builtinTitle" | "ta.packages.failed" | "ta.packages.hint" | "ta.packages.installed" | "ta.packages.none" | "ta.packages.noneHint" | "ta.packages.reload" | "ta.packages.reloaded" | "ta.packages.remove" | "ta.packages.removeConfirm" | "ta.packages.removeDetail" | "ta.packages.removed" | "ta.packages.scope.project" | "ta.packages.scope.user" | "ta.panel.hide" | "ta.panel.show" | "ta.presence.asked" | "ta.presence.more" | "ta.presence.owner" | "ta.presence.separator" | "ta.presence.typing" | "ta.presence.viewing" | "ta.process.done" | "ta.process.earlier" | "ta.process.failed" | "ta.process.requestFailed" | "ta.process.running" | "ta.process.showAll" | "ta.process.thinking" | "ta.process.thought" | "ta.progress.calling" | "ta.progress.compacting" | "ta.progress.input" | "ta.progress.output" | "ta.progress.retry.error" | "ta.progress.retry.network" | "ta.progress.retry.overloaded" | "ta.progress.retry.rateLimit" | "ta.progress.retrying" | "ta.progress.retryingNow" | "ta.progress.waiting" | "ta.pwa.install" | "ta.reconnecting" | "ta.relay.devices" | "ta.relay.done" | "ta.relay.hint" | "ta.relay.keepAwake" | "ta.relay.keepAwakeHint" | "ta.relay.offline" | "ta.relay.online" | "ta.relay.pair" | "ta.relay.phone" | "ta.relay.scan" | "ta.relay.title" | "ta.relay.unpair" | "ta.relay.unpairConfirm" | "ta.relays.add" | "ta.relays.addButton" | "ta.relays.addHint" | "ta.relays.addPlaceholder" | "ta.relays.broken" | "ta.relays.drive" | "ta.relays.driveHint" | "ta.relays.driveUse" | "ta.relays.feature.devices" | "ta.relays.feature.devicesHint" | "ta.relays.feature.rooms" | "ta.relays.feature.roomsHint" | "ta.relays.feature.share" | "ta.relays.feature.shareHint" | "ta.relays.feature.sync" | "ta.relays.feature.syncHint" | "ta.relays.file" | "ta.relays.folderOnly" | "ta.relays.limits" | "ta.relays.memory" | "ta.relays.official" | "ta.relays.offline" | "ta.relays.online" | "ta.relays.onlineNoTime" | "ta.relays.optional" | "ta.relays.remove" | "ta.relays.storeAdd" | "ta.relays.storeName" | "ta.relays.storeNote" | "ta.relays.storeOnly" | "ta.relays.storeOpen" | "ta.relays.storeType" | "ta.relays.title" | "ta.relays.unavailable" | "ta.remote.add" | "ta.remote.addHint" | "ta.remote.added" | "ta.remote.closePort" | "ta.remote.connect" | "ta.remote.connected" | "ta.remote.connectedTo" | "ta.remote.connecting" | "ta.remote.description" | "ta.remote.disconnect" | "ta.remote.disconnected" | "ta.remote.failed" | "ta.remote.forwarded" | "ta.remote.fromConfig" | "ta.remote.invalid" | "ta.remote.local" | "ta.remote.lost" | "ta.remote.none" | "ta.remote.noneHint" | "ta.remote.options" | "ta.remote.port" | "ta.remote.prompt.continue" | "ta.remote.prompt.title" | "ta.remote.prompt.trust" | "ta.remote.remove" | "ta.remote.step.checking" | "ta.remote.step.connecting" | "ta.remote.step.copying-server" | "ta.remote.step.installing-node" | "ta.remote.step.starting" | "ta.remote.title" | "ta.scan" | "ta.scan.album" | "ta.scan.ask" | "ta.scan.askHint" | "ta.scan.askPlaceholder" | "ta.scan.askTitle" | "ta.scan.cameraFailed" | "ta.scan.copyFailed" | "ta.scan.error" | "ta.scan.errorPrompt" | "ta.scan.failed" | "ta.scan.flip" | "ta.scan.identify" | "ta.scan.identifyPrompt" | "ta.scan.instructions" | "ta.scan.myCode" | "ta.scan.noCode" | "ta.scan.note" | "ta.scan.notePrompt" | "ta.scan.pairMessage" | "ta.scan.pairTitle" | "ta.scan.result" | "ta.scan.retake" | "ta.scan.sameHost" | "ta.scan.translate" | "ta.scan.translatePrompt" | "ta.search.all" | "ta.search.failed" | "ta.search.loading" | "ta.search.more" | "ta.search.pages" | "ta.select.all" | "ta.select.count" | "ta.select.done" | "ta.send" | "ta.session.compact" | "ta.session.compactTitle" | "ta.session.earlier" | "ta.session.empty" | "ta.session.model" | "ta.session.noModel" | "ta.session.phase.thinking" | "ta.session.phase.working" | "ta.session.phase.writing" | "ta.session.thinking" | "ta.session.title" | "ta.session.toBottom" | "ta.session.waitingClientTool" | "ta.session.working" | "ta.setting.codemode.mode" | "ta.setting.codemode.mode.hint" | "ta.setting.codemode.mode.on" | "ta.setting.codemode.mode.only" | "ta.setting.compaction.enabled" | "ta.setting.compaction.enabled.hint" | "ta.setting.compaction.keepRecentTokens" | "ta.setting.compaction.keepRecentTokens.hint" | "ta.setting.compaction.reserveTokens" | "ta.setting.compaction.reserveTokens.hint" | "ta.setting.defaultThinkingLevel" | "ta.setting.defaultThinkingLevel.high" | "ta.setting.defaultThinkingLevel.hint" | "ta.setting.defaultThinkingLevel.low" | "ta.setting.defaultThinkingLevel.max" | "ta.setting.defaultThinkingLevel.medium" | "ta.setting.defaultThinkingLevel.minimal" | "ta.setting.defaultThinkingLevel.off" | "ta.setting.defaultThinkingLevel.xhigh" | "ta.setting.enableSkillCommands" | "ta.setting.enableSkillCommands.hint" | "ta.setting.followUpMode" | "ta.setting.followUpMode.all" | "ta.setting.followUpMode.hint" | "ta.setting.followUpMode.one-at-a-time" | "ta.setting.images.autoResize" | "ta.setting.images.autoResize.hint" | "ta.setting.images.blockImages" | "ta.setting.images.blockImages.hint" | "ta.setting.model" | "ta.setting.model.hint" | "ta.setting.retry.enabled" | "ta.setting.retry.enabled.hint" | "ta.setting.retry.maxRetries" | "ta.setting.shellCommandPrefix" | "ta.setting.shellCommandPrefix.hint" | "ta.setting.shellPath" | "ta.setting.shellPath.hint" | "ta.setting.steeringMode" | "ta.setting.steeringMode.all" | "ta.setting.steeringMode.hint" | "ta.setting.steeringMode.one-at-a-time" | "ta.setting.transport" | "ta.setting.transport.auto" | "ta.setting.transport.hint" | "ta.settings" | "ta.settings.about" | "ta.settings.accounts" | "ta.settings.accountsDescription" | "ta.settings.agent" | "ta.settings.appearance" | "ta.settings.assistant" | "ta.settings.assistantModel" | "ta.settings.assistantModelHint" | "ta.settings.chatArchive" | "ta.settings.chatArchiveHint" | "ta.settings.chatFold" | "ta.settings.chatFoldHint" | "ta.settings.chatFontSize" | "ta.settings.chatFontSizeHint" | "ta.settings.chats" | "ta.settings.confirmTasks" | "ta.settings.confirmTasksHint" | "ta.settings.cwd" | "ta.settings.cwdChange" | "ta.settings.cwdDescription" | "ta.settings.days" | "ta.settings.decides" | "ta.settings.default" | "ta.settings.displayLanguage" | "ta.settings.failed" | "ta.settings.fontSize" | "ta.settings.fontSize.large" | "ta.settings.fontSize.small" | "ta.settings.fontSize.standard" | "ta.settings.fontSize.xlarge" | "ta.settings.fontSizeHint" | "ta.settings.fromUser" | "ta.settings.group.context" | "ta.settings.group.conversation" | "ta.settings.group.model" | "ta.settings.group.tools" | "ta.settings.keepAlive" | "ta.settings.keepAliveDescription" | "ta.settings.language" | "ta.settings.language.system" | "ta.settings.links" | "ta.settings.loading" | "ta.settings.manageAccounts" | "ta.settings.maxTasks" | "ta.settings.maxTasksAny" | "ta.settings.maxTasksHint" | "ta.settings.minutes" | "ta.settings.modified" | "ta.settings.more" | "ta.settings.motion" | "ta.settings.motionHint" | "ta.settings.navigation" | "ta.settings.navigation.folded" | "ta.settings.navigation.inNav" | "ta.settings.navigation.none" | "ta.settings.navigation.overflow" | "ta.settings.navigation.pinned" | "ta.settings.navigation.reset" | "ta.settings.navigation.resetButton" | "ta.settings.navigation.resetHint" | "ta.settings.navigation.show" | "ta.settings.navigation.slots" | "ta.settings.navigation.slotsHint" | "ta.settings.never" | "ta.settings.noMatch" | "ta.settings.off" | "ta.settings.offline" | "ta.settings.on" | "ta.settings.oneYear" | "ta.settings.recentShots" | "ta.settings.recentShotsHint" | "ta.settings.relay" | "ta.settings.relayDescription" | "ta.settings.reset" | "ta.settings.retention" | "ta.settings.retentionDescription" | "ta.settings.scope.project" | "ta.settings.scope.user" | "ta.settings.scopeHint.project" | "ta.settings.scopeHint.user" | "ta.settings.search" | "ta.settings.server" | "ta.settings.shortcuts" | "ta.settings.signOut" | "ta.settings.speak" | "ta.settings.speakHint" | "ta.settings.speakTalk" | "ta.settings.speakTalkHint" | "ta.settings.taskModel" | "ta.settings.taskModelHint" | "ta.settings.theme" | "ta.settings.theme.dark" | "ta.settings.theme.light" | "ta.settings.theme.system" | "ta.settings.trustedDomains" | "ta.settings.trustedDomainsAdd" | "ta.settings.trustedDomainsEmpty" | "ta.settings.trustedDomainsEmptyHint" | "ta.settings.trustedDomainsHint" | "ta.settings.trustedDomainsRemove" | "ta.settings.untrusted" | "ta.settings.version" | "ta.settings.voice" | "ta.settings.voiceAuto" | "ta.settings.voiceAutoNone" | "ta.settings.voiceName" | "ta.settings.voiceNameHint" | "ta.settings.voicePreview" | "ta.settings.voiceSample" | "ta.settings.web" | "ta.settings.webHint" | "ta.share.cannot" | "ta.share.copied" | "ta.share.copy" | "ta.share.making" | "ta.share.published" | "ta.share.qr" | "ta.share.relayed" | "ta.share.send" | "ta.share.stop" | "ta.share.stopHint" | "ta.share.stopTitle" | "ta.share.title" | "ta.shortcut.commands" | "ta.shortcut.files" | "ta.shortcut.followUp" | "ta.shortcut.newline" | "ta.shortcut.save" | "ta.shortcut.send" | "ta.shortcut.settings" | "ta.shortcut.sidebar" | "ta.shortcut.stop" | "ta.sidebar" | "ta.sidebar.closeTitle" | "ta.signInSetup.add" | "ta.signInSetup.callback" | "ta.signInSetup.copied" | "ta.signInSetup.copy" | "ta.signInSetup.device" | "ta.signInSetup.edit" | "ta.signInSetup.field.appId" | "ta.signInSetup.field.appSecret" | "ta.signInSetup.field.clientId" | "ta.signInSetup.field.clientSecret" | "ta.signInSetup.field.issuer" | "ta.signInSetup.field.name" | "ta.signInSetup.field.url" | "ta.signInSetup.fromEnv" | "ta.signInSetup.hint" | "ta.signInSetup.incomplete" | "ta.signInSetup.off" | "ta.signInSetup.oidc" | "ta.signInSetup.on" | "ta.signInSetup.optional" | "ta.signInSetup.remove" | "ta.signInSetup.removeConfirm" | "ta.signInSetup.removeDetail" | "ta.signInSetup.removed" | "ta.signInSetup.save" | "ta.signInSetup.saved" | "ta.signInSetup.secretKept" | "ta.signInSetup.title" | "ta.signin.accountsHint" | "ta.signin.connect" | "ta.signin.denied" | "ta.signin.failed" | "ta.signin.hint" | "ta.signin.hintRemote" | "ta.signin.orToken" | "ta.signin.pairHint" | "ta.signin.pairRefused" | "ta.signin.pairing" | "ta.signin.refused" | "ta.signin.title" | "ta.signin.token" | "ta.signin.wechat" | "ta.signin.with" | "ta.species.ankylosaurus" | "ta.species.brachiosaurus" | "ta.species.dragon" | "ta.species.parasaurolophus" | "ta.species.pteranodon" | "ta.species.stegosaurus" | "ta.species.trex" | "ta.species.triceratops" | "ta.species.velociraptor" | "ta.stop" | "ta.suggest.1" | "ta.suggest.1.label" | "ta.suggest.2" | "ta.suggest.2.label" | "ta.suggest.3" | "ta.suggest.3.label" | "ta.tab.close" | "ta.tab.closeAll" | "ta.tab.closeLeft" | "ta.tab.closeOthers" | "ta.tab.closeRight" | "ta.tab.closeSaved" | "ta.tab.keepOpen" | "ta.talk.edit" | "ta.talk.hold" | "ta.talk.listening" | "ta.talk.releaseCancel" | "ta.talk.releaseEdit" | "ta.talk.releaseSend" | "ta.talk.tooShort" | "ta.task.allTasks" | "ta.task.done" | "ta.task.ended" | "ta.task.failed" | "ta.task.remove" | "ta.task.removeHint" | "ta.task.removeTitle" | "ta.task.running" | "ta.task.stopped" | "ta.task.takeOver" | "ta.task.takeOverHint" | "ta.task.takenOver" | "ta.task.waiting" | "ta.tasks.all" | "ta.tasks.ended" | "ta.tasks.fewer" | "ta.tasks.removeTitle" | "ta.tasks.running" | "ta.tasks.runningCount" | "ta.tasks.select" | "ta.tasks.waiting" | "ta.tasks.waitingCount" | "ta.terminal.openLink" | "ta.terminal.openLinkMac" | "ta.terminal.openUrl" | "ta.terminal.openUrlMac" | "ta.time.dayBefore" | "ta.time.earlier" | "ta.time.today" | "ta.time.week" | "ta.time.yesterday" | "ta.tool.earlier" | "ta.tool.exitCode" | "ta.tool.failedCalls" | "ta.tool.hideScript" | "ta.tool.moreEntries" | "ta.tool.noOutput" | "ta.tool.printed" | "ta.tool.showScript" | "ta.tool.verb.bash" | "ta.tool.verb.codemode" | "ta.tool.verb.deleteScheduled" | "ta.tool.verb.deleteTeam" | "ta.tool.verb.edit" | "ta.tool.verb.editImage" | "ta.tool.verb.fetch" | "ta.tool.verb.find" | "ta.tool.verb.getTask" | "ta.tool.verb.grep" | "ta.tool.verb.listScheduled" | "ta.tool.verb.listTasks" | "ta.tool.verb.ls" | "ta.tool.verb.messageTask" | "ta.tool.verb.publish" | "ta.tool.verb.read" | "ta.tool.verb.scheduleTask" | "ta.tool.verb.sendMessage" | "ta.tool.verb.skill" | "ta.tool.verb.startTask" | "ta.tool.verb.stopTask" | "ta.tool.verb.todo" | "ta.tool.verb.viewImage" | "ta.tool.verb.webSearch" | "ta.tool.verb.write" | "ta.unreachable" | "ta.widget.failed" | "ta.workbench" | "ta.workbench.cards" | "ta.workbench.cwd" | "ta.workbench.empty" | "ta.workbench.emptyHint" | "ta.workbench.maximize" | "ta.workbench.noCards" | "ta.workbench.noCardsHint" | "ta.workbench.open" | "ta.workbench.restore" | "ta.workbench.tabs" | "ta.workingDirectory.changed" | "ta.yes" | "ta.zoom.actual" | "ta.zoom.failed" | "ta.zoom.fit" | "ta.zoom.in" | "ta.zoom.loading" | "ta.zoom.next" | "ta.zoom.out" | "ta.zoom.previous" | undefined;
|
|
8
8
|
add: (text: string, scanned?: boolean) => Promise<void>;
|
|
9
9
|
scan: () => Promise<void>;
|
|
10
10
|
canScan: boolean;
|
|
@@ -59,11 +59,13 @@ const progress_1 = require("../util/progress");
|
|
|
59
59
|
const tool_1 = require("../util/tool");
|
|
60
60
|
const callout_1 = require("./callout");
|
|
61
61
|
const conversation_scroll_1 = require("./conversation-scroll");
|
|
62
|
+
const face_1 = require("./face");
|
|
62
63
|
const icon_1 = require("./icon");
|
|
63
64
|
const lightbox_1 = require("./lightbox");
|
|
64
65
|
const markdown_1 = require("./markdown");
|
|
65
66
|
const message_footer_1 = require("./message-footer");
|
|
66
67
|
const message_menu_1 = require("./message-menu");
|
|
68
|
+
const people_1 = require("./people");
|
|
67
69
|
const run_status_1 = require("./run-status");
|
|
68
70
|
const said_text_1 = require("./said-text");
|
|
69
71
|
const ta_avatar_1 = require("./ta-avatar");
|
|
@@ -307,10 +309,27 @@ function UserMarks({ blocks, queued }) {
|
|
|
307
309
|
queued && React.createElement(QueuedMark, null)));
|
|
308
310
|
}
|
|
309
311
|
function UserBubble({ message, blocks, text, copied, skill, queued, }) {
|
|
312
|
+
var _a, _b;
|
|
310
313
|
const [menu, onContextMenu] = (0, message_menu_1.useMessageMenu)({ kind: 'user', message, text: copied });
|
|
311
314
|
const marks = React.createElement(UserMarks, { blocks: blocks, queued: queued });
|
|
312
315
|
const outbox = React.useContext(Outbox);
|
|
316
|
+
const people = React.useContext(people_1.MessagePeople);
|
|
313
317
|
const sent = outbox.of.get(message);
|
|
318
|
+
// Someone else's in the same Ta (TaMessageAuthor): on the left with their face and name, as in a group chat.
|
|
319
|
+
const author = sent ? undefined : ta_protocol_1.TaMessageAuthor.of(message_1.MessageUtil.text(blocks));
|
|
320
|
+
const by = (_a = author === null || author === void 0 ? void 0 : author.id) !== null && _a !== void 0 ? _a : ta_protocol_1.TA_OWNER;
|
|
321
|
+
if (!sent && by !== people.me) {
|
|
322
|
+
return (React.createElement("div", { className: "ta-message ta-user ta-user-other", onContextMenu: onContextMenu },
|
|
323
|
+
React.createElement("div", { className: "ta-user-by" },
|
|
324
|
+
React.createElement(face_1.Face, { seed: by, size: 30, double: by === ta_protocol_1.TA_OWNER }),
|
|
325
|
+
React.createElement("div", { className: "ta-user-by-body" },
|
|
326
|
+
React.createElement("span", { className: "ta-user-by-name" }, (_b = author === null || author === void 0 ? void 0 : author.name) !== null && _b !== void 0 ? _b : people.ownerName),
|
|
327
|
+
marks,
|
|
328
|
+
skill && React.createElement(SkillUse, { skill: skill }),
|
|
329
|
+
React.createElement(UserSaid, { blocks: blocks, text: text, timestamp: message.timestamp }))),
|
|
330
|
+
React.createElement(message_footer_1.UserFooter, { message: message, text: copied }),
|
|
331
|
+
menu));
|
|
332
|
+
}
|
|
314
333
|
if (sent) {
|
|
315
334
|
// Not in the session yet: nothing to branch from or rewind to.
|
|
316
335
|
return (React.createElement("div", { className: `ta-message ta-user ${sent.failed ? 'ta-user-failed' : 'ta-user-sending'}` },
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type TaSessionPerson } from '@celljs/ta-protocol';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/** Who the page is, and what the user of the Ta is called: a message of someone else is drawn as theirs (TaMessageAuthor). */
|
|
4
|
+
export interface MessagePeopleValue {
|
|
5
|
+
/** The principal of this page: TA_OWNER, or one let in (TaServerInfo.member). */
|
|
6
|
+
me: string;
|
|
7
|
+
/** The name of the user of the Ta, for their messages in the page of one let in. */
|
|
8
|
+
ownerName: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MessagePeople: React.Context<MessagePeopleValue>;
|
|
11
|
+
/** What the others at a conversation do (TaSessionInfo.people), as the page says it. */
|
|
12
|
+
export declare namespace PresenceUtil {
|
|
13
|
+
function viewing(people: readonly TaSessionPerson[] | undefined): TaSessionPerson[];
|
|
14
|
+
function typing(people: readonly TaSessionPerson[] | undefined): TaSessionPerson[];
|
|
15
|
+
function asked(people: readonly TaSessionPerson[] | undefined): TaSessionPerson[];
|
|
16
|
+
/** Their names, two at most, then how many more (`more` says it with what comes before it). */
|
|
17
|
+
function names(people: readonly TaSessionPerson[], separator: string, more: (count: number) => string): string;
|
|
18
|
+
/** The same people the same: a row is not drawn again for a list that says the same. */
|
|
19
|
+
function same(a: readonly TaSessionPerson[] | undefined, b: readonly TaSessionPerson[] | undefined): boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Faces of people, one over the next, `max` at most and how many more. */
|
|
22
|
+
export declare function PeopleFaces({ people, size, max, label }: {
|
|
23
|
+
people: readonly TaSessionPerson[];
|
|
24
|
+
size: number;
|
|
25
|
+
max?: number;
|
|
26
|
+
label?: string;
|
|
27
|
+
}): React.JSX.Element | null;
|
|
28
|
+
/** Over the message box: who else types in it, or whose message Ta answers now. Nothing when neither. */
|
|
29
|
+
export declare function PresenceLine({ people, working }: {
|
|
30
|
+
people: readonly TaSessionPerson[] | undefined;
|
|
31
|
+
working: boolean;
|
|
32
|
+
}): React.JSX.Element | null;
|
|
33
|
+
//# sourceMappingURL=people.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
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.PresenceUtil = exports.MessagePeople = void 0;
|
|
37
|
+
exports.PeopleFaces = PeopleFaces;
|
|
38
|
+
exports.PresenceLine = PresenceLine;
|
|
39
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const use_t_1 = require("../i18n/use-t");
|
|
42
|
+
const face_1 = require("./face");
|
|
43
|
+
exports.MessagePeople = React.createContext({ me: ta_protocol_1.TA_OWNER, ownerName: '' });
|
|
44
|
+
/** What the others at a conversation do (TaSessionInfo.people), as the page says it. */
|
|
45
|
+
var PresenceUtil;
|
|
46
|
+
(function (PresenceUtil) {
|
|
47
|
+
function viewing(people) {
|
|
48
|
+
var _a;
|
|
49
|
+
return (_a = people === null || people === void 0 ? void 0 : people.filter(person => person.viewing)) !== null && _a !== void 0 ? _a : [];
|
|
50
|
+
}
|
|
51
|
+
PresenceUtil.viewing = viewing;
|
|
52
|
+
function typing(people) {
|
|
53
|
+
var _a;
|
|
54
|
+
return (_a = people === null || people === void 0 ? void 0 : people.filter(person => person.typing)) !== null && _a !== void 0 ? _a : [];
|
|
55
|
+
}
|
|
56
|
+
PresenceUtil.typing = typing;
|
|
57
|
+
function asked(people) {
|
|
58
|
+
var _a;
|
|
59
|
+
return (_a = people === null || people === void 0 ? void 0 : people.filter(person => person.asked)) !== null && _a !== void 0 ? _a : [];
|
|
60
|
+
}
|
|
61
|
+
PresenceUtil.asked = asked;
|
|
62
|
+
/** Their names, two at most, then how many more (`more` says it with what comes before it). */
|
|
63
|
+
function names(people, separator, more) {
|
|
64
|
+
const named = people
|
|
65
|
+
.slice(0, 2)
|
|
66
|
+
.map(person => person.name)
|
|
67
|
+
.join(separator);
|
|
68
|
+
return people.length > 2 ? `${named}${more(people.length - 2)}` : named;
|
|
69
|
+
}
|
|
70
|
+
PresenceUtil.names = names;
|
|
71
|
+
/** The same people the same: a row is not drawn again for a list that says the same. */
|
|
72
|
+
function same(a, b) {
|
|
73
|
+
return a === b || JSON.stringify(a !== null && a !== void 0 ? a : []) === JSON.stringify(b !== null && b !== void 0 ? b : []);
|
|
74
|
+
}
|
|
75
|
+
PresenceUtil.same = same;
|
|
76
|
+
})(PresenceUtil || (exports.PresenceUtil = PresenceUtil = {}));
|
|
77
|
+
/** Faces of people, one over the next, `max` at most and how many more. */
|
|
78
|
+
function PeopleFaces({ people, size, max = 4, label }) {
|
|
79
|
+
if (!people.length) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const shown = people.slice(0, max);
|
|
83
|
+
const names = people.map(person => person.name).join(', ');
|
|
84
|
+
return (React.createElement("span", { className: "ta-people", role: "img", "aria-label": label ? `${label}: ${names}` : names, title: names },
|
|
85
|
+
shown.map(person => (React.createElement("span", { key: person.id, className: `ta-people-face${person.typing ? ' ta-typing' : ''}` },
|
|
86
|
+
React.createElement(face_1.Face, { seed: person.id, size: size, double: person.id === ta_protocol_1.TA_OWNER })))),
|
|
87
|
+
people.length > max && React.createElement("span", { className: "ta-people-more" },
|
|
88
|
+
"+",
|
|
89
|
+
people.length - max)));
|
|
90
|
+
}
|
|
91
|
+
/** Over the message box: who else types in it, or whose message Ta answers now. Nothing when neither. */
|
|
92
|
+
function PresenceLine({ people, working }) {
|
|
93
|
+
const t = (0, use_t_1.useT)();
|
|
94
|
+
const typing = PresenceUtil.typing(people);
|
|
95
|
+
const asked = working ? PresenceUtil.asked(people) : [];
|
|
96
|
+
const shown = typing.length ? typing : asked;
|
|
97
|
+
if (!shown.length) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
const names = PresenceUtil.names(shown, t('ta.presence.separator'), count => t('ta.presence.more', { count }));
|
|
101
|
+
return (React.createElement("div", { className: "ta-presence-line", "aria-live": "polite" },
|
|
102
|
+
React.createElement(PeopleFaces, { people: shown, size: 16, max: 3 }),
|
|
103
|
+
React.createElement("span", { className: "ta-ellipsis" }, t(typing.length ? 'ta.presence.typing' : 'ta.presence.asked', { names })),
|
|
104
|
+
typing.length > 0 && (React.createElement("span", { className: "ta-typing-dots", "aria-hidden": "true" },
|
|
105
|
+
React.createElement("i", null),
|
|
106
|
+
React.createElement("i", null),
|
|
107
|
+
React.createElement("i", null)))));
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=people.js.map
|