@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
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type TaLanguage } from '@celljs/ta-protocol';
|
|
2
|
+
import { JA_MESSAGES } from './messages-ja';
|
|
3
|
+
import { ZH_TW_MESSAGES } from './messages-zh-tw';
|
|
1
4
|
/** The messages of the web client, in ICU format. English is the source and the fallback. */
|
|
2
5
|
export declare const EN_MESSAGES: {
|
|
3
6
|
'ta.dismiss': string;
|
|
@@ -156,6 +159,34 @@ export declare const EN_MESSAGES: {
|
|
|
156
159
|
'ta.access.thisBrowser': string;
|
|
157
160
|
'ta.access.lastUsed': string;
|
|
158
161
|
'ta.access.signOut': string;
|
|
162
|
+
'ta.signInSetup.title': string;
|
|
163
|
+
'ta.signInSetup.hint': string;
|
|
164
|
+
'ta.signInSetup.callback': string;
|
|
165
|
+
'ta.signInSetup.copy': string;
|
|
166
|
+
'ta.signInSetup.copied': string;
|
|
167
|
+
'ta.signInSetup.oidc': string;
|
|
168
|
+
'ta.signInSetup.on': string;
|
|
169
|
+
'ta.signInSetup.off': string;
|
|
170
|
+
'ta.signInSetup.device': string;
|
|
171
|
+
'ta.signInSetup.incomplete': string;
|
|
172
|
+
'ta.signInSetup.fromEnv': string;
|
|
173
|
+
'ta.signInSetup.add': string;
|
|
174
|
+
'ta.signInSetup.edit': string;
|
|
175
|
+
'ta.signInSetup.save': string;
|
|
176
|
+
'ta.signInSetup.saved': string;
|
|
177
|
+
'ta.signInSetup.removed': string;
|
|
178
|
+
'ta.signInSetup.remove': string;
|
|
179
|
+
'ta.signInSetup.removeConfirm': string;
|
|
180
|
+
'ta.signInSetup.removeDetail': string;
|
|
181
|
+
'ta.signInSetup.secretKept': string;
|
|
182
|
+
'ta.signInSetup.optional': string;
|
|
183
|
+
'ta.signInSetup.field.clientId': string;
|
|
184
|
+
'ta.signInSetup.field.clientSecret': string;
|
|
185
|
+
'ta.signInSetup.field.appId': string;
|
|
186
|
+
'ta.signInSetup.field.appSecret': string;
|
|
187
|
+
'ta.signInSetup.field.url': string;
|
|
188
|
+
'ta.signInSetup.field.issuer': string;
|
|
189
|
+
'ta.signInSetup.field.name': string;
|
|
159
190
|
'ta.sidebar.closeTitle': string;
|
|
160
191
|
'ta.chat.open': string;
|
|
161
192
|
'ta.chat.remove': string;
|
|
@@ -618,6 +649,13 @@ export declare const EN_MESSAGES: {
|
|
|
618
649
|
'ta.composer.queue.takeBackTitle': string;
|
|
619
650
|
'ta.composer.queue.editTitle': string;
|
|
620
651
|
'ta.composer.queue.remove': string;
|
|
652
|
+
'ta.presence.viewing': string;
|
|
653
|
+
'ta.presence.typing': string;
|
|
654
|
+
'ta.presence.asked': string;
|
|
655
|
+
'ta.presence.separator': string;
|
|
656
|
+
'ta.presence.more': string;
|
|
657
|
+
'ta.presence.owner': string;
|
|
658
|
+
'ta.chat.replyingFor': string;
|
|
621
659
|
'ta.account': string;
|
|
622
660
|
'ta.account.service': string;
|
|
623
661
|
'ta.manage.packages': string;
|
|
@@ -884,6 +922,48 @@ export declare const EN_MESSAGES: {
|
|
|
884
922
|
'ta.auth.none': string;
|
|
885
923
|
'ta.auth.search': string;
|
|
886
924
|
'ta.auth.accountsTitle': string;
|
|
925
|
+
'ta.auth.custom.add': string;
|
|
926
|
+
'ta.auth.custom.addHint': string;
|
|
927
|
+
'ta.auth.custom.title': string;
|
|
928
|
+
'ta.auth.custom.kind': string;
|
|
929
|
+
'ta.auth.custom.api': string;
|
|
930
|
+
'ta.auth.custom.apiOpenai': string;
|
|
931
|
+
'ta.auth.custom.apiResponses': string;
|
|
932
|
+
'ta.auth.custom.apiAnthropic': string;
|
|
933
|
+
'ta.auth.custom.apiGoogle': string;
|
|
934
|
+
'ta.auth.custom.baseUrl': string;
|
|
935
|
+
'ta.auth.custom.apiKey': string;
|
|
936
|
+
'ta.auth.custom.keyKept': string;
|
|
937
|
+
'ta.auth.custom.keyOptional': string;
|
|
938
|
+
'ta.auth.custom.name': string;
|
|
939
|
+
'ta.auth.custom.optional': string;
|
|
940
|
+
'ta.auth.custom.models': string;
|
|
941
|
+
'ta.auth.custom.modelPlaceholder': string;
|
|
942
|
+
'ta.auth.custom.removeModel': string;
|
|
943
|
+
'ta.auth.custom.fetch': string;
|
|
944
|
+
'ta.auth.custom.fetched': string;
|
|
945
|
+
'ta.auth.custom.fetchedNone': string;
|
|
946
|
+
'ta.auth.custom.fetchFailed': string;
|
|
947
|
+
'ta.auth.custom.filter': string;
|
|
948
|
+
'ta.auth.custom.note': string;
|
|
949
|
+
'ta.auth.custom.needModel': string;
|
|
950
|
+
'ta.auth.custom.save': string;
|
|
951
|
+
'ta.auth.custom.saved': string;
|
|
952
|
+
'ta.auth.custom.remove': string;
|
|
953
|
+
'ta.auth.custom.removeConfirm': string;
|
|
954
|
+
'ta.auth.custom.advanced': string;
|
|
955
|
+
'ta.auth.custom.advancedHint': string;
|
|
956
|
+
'ta.auth.custom.contextWindow': string;
|
|
957
|
+
'ta.auth.custom.maxTokens': string;
|
|
958
|
+
'ta.auth.custom.mixed': string;
|
|
959
|
+
'ta.auth.custom.reasoning': string;
|
|
960
|
+
'ta.auth.custom.images': string;
|
|
961
|
+
'ta.auth.custom.headers': string;
|
|
962
|
+
'ta.auth.custom.headerName': string;
|
|
963
|
+
'ta.auth.custom.headerValue': string;
|
|
964
|
+
'ta.auth.custom.addHeader': string;
|
|
965
|
+
'ta.auth.custom.removeHeader': string;
|
|
966
|
+
'ta.auth.custom.badNumber': string;
|
|
887
967
|
'ta.manage.accounts': string;
|
|
888
968
|
'ta.manage.workingDirectory': string;
|
|
889
969
|
'ta.settings.accounts': string;
|
|
@@ -895,6 +975,11 @@ export declare const EN_MESSAGES: {
|
|
|
895
975
|
};
|
|
896
976
|
export type MessageId = keyof typeof EN_MESSAGES;
|
|
897
977
|
export declare const ZH_MESSAGES: Record<MessageId, string>;
|
|
978
|
+
export { JA_MESSAGES, ZH_TW_MESSAGES };
|
|
979
|
+
/** The messages of each language of Ta, checked by scripts/check-i18n.ts. */
|
|
980
|
+
export declare const MESSAGES: Readonly<Record<TaLanguage, Record<MessageId, string>>>;
|
|
981
|
+
/** The messages of a language of the settings (`zh-CN`, `zh-TW`, `ja-JP`), English for another. */
|
|
982
|
+
export declare function messagesOf(language: string): Record<MessageId, string>;
|
|
898
983
|
/** A message outside React, in a language of the settings. */
|
|
899
984
|
export declare function message(language: string, id: MessageId): string;
|
|
900
985
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ZH_MESSAGES = exports.EN_MESSAGES = void 0;
|
|
3
|
+
exports.MESSAGES = exports.ZH_TW_MESSAGES = exports.JA_MESSAGES = exports.ZH_MESSAGES = exports.EN_MESSAGES = void 0;
|
|
4
|
+
exports.messagesOf = messagesOf;
|
|
4
5
|
exports.message = message;
|
|
6
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
7
|
+
const messages_ja_1 = require("./messages-ja");
|
|
8
|
+
Object.defineProperty(exports, "JA_MESSAGES", { enumerable: true, get: function () { return messages_ja_1.JA_MESSAGES; } });
|
|
9
|
+
const messages_zh_tw_1 = require("./messages-zh-tw");
|
|
10
|
+
Object.defineProperty(exports, "ZH_TW_MESSAGES", { enumerable: true, get: function () { return messages_zh_tw_1.ZH_TW_MESSAGES; } });
|
|
5
11
|
/** The messages of the web client, in ICU format. English is the source and the fallback. */
|
|
6
12
|
exports.EN_MESSAGES = {
|
|
7
13
|
'ta.dismiss': 'Dismiss',
|
|
@@ -164,6 +170,34 @@ exports.EN_MESSAGES = {
|
|
|
164
170
|
'ta.access.thisBrowser': 'This browser',
|
|
165
171
|
'ta.access.lastUsed': 'Last used {time}',
|
|
166
172
|
'ta.access.signOut': 'Sign out',
|
|
173
|
+
'ta.signInSetup.title': 'Ways to sign in',
|
|
174
|
+
'ta.signInSetup.hint': 'Those you invite sign in with these to say who they are, from the Ta app or a browser; the same account is the same member from any device.',
|
|
175
|
+
'ta.signInSetup.callback': 'Register this as the callback (redirect) URL with the provider:',
|
|
176
|
+
'ta.signInSetup.copy': 'Copy',
|
|
177
|
+
'ta.signInSetup.copied': 'Copied',
|
|
178
|
+
'ta.signInSetup.oidc': 'Company SSO (OpenID Connect)',
|
|
179
|
+
'ta.signInSetup.on': 'On · {id}',
|
|
180
|
+
'ta.signInSetup.off': 'Not set up',
|
|
181
|
+
'ta.signInSetup.device': 'Built in: those you invite sign in by typing a code at GitHub. Set up your own app to replace it.',
|
|
182
|
+
'ta.signInSetup.incomplete': 'Not complete: it needs its id and its secret',
|
|
183
|
+
'ta.signInSetup.fromEnv': 'Set by the environment of the service',
|
|
184
|
+
'ta.signInSetup.add': 'Set up',
|
|
185
|
+
'ta.signInSetup.edit': 'Change',
|
|
186
|
+
'ta.signInSetup.save': 'Save',
|
|
187
|
+
'ta.signInSetup.saved': 'Saved: it is offered now',
|
|
188
|
+
'ta.signInSetup.removed': 'Taken out',
|
|
189
|
+
'ta.signInSetup.remove': 'Take out {name}',
|
|
190
|
+
'ta.signInSetup.removeConfirm': 'Take out signing in with {name}?',
|
|
191
|
+
'ta.signInSetup.removeDetail': 'Members who came in with it stay; nobody signs in with it any more.',
|
|
192
|
+
'ta.signInSetup.secretKept': 'Kept; empty keeps it',
|
|
193
|
+
'ta.signInSetup.optional': 'Optional',
|
|
194
|
+
'ta.signInSetup.field.clientId': 'Client ID',
|
|
195
|
+
'ta.signInSetup.field.clientSecret': 'Client secret',
|
|
196
|
+
'ta.signInSetup.field.appId': 'AppID',
|
|
197
|
+
'ta.signInSetup.field.appSecret': 'AppSecret',
|
|
198
|
+
'ta.signInSetup.field.url': 'GitHub Enterprise address',
|
|
199
|
+
'ta.signInSetup.field.issuer': 'Issuer',
|
|
200
|
+
'ta.signInSetup.field.name': 'Name on the button',
|
|
167
201
|
'ta.sidebar.closeTitle': 'Remove from the list; it stays under Removed',
|
|
168
202
|
'ta.chat.open': 'Open',
|
|
169
203
|
'ta.chat.remove': 'Remove from the list',
|
|
@@ -627,6 +661,14 @@ exports.EN_MESSAGES = {
|
|
|
627
661
|
'ta.composer.queue.takeBackTitle': 'Take the waiting messages back into the box',
|
|
628
662
|
'ta.composer.queue.editTitle': 'Take back into the box to edit',
|
|
629
663
|
'ta.composer.queue.remove': 'Remove',
|
|
664
|
+
// Others in the same Ta (TaSessionInfo.people)
|
|
665
|
+
'ta.presence.viewing': 'Also here',
|
|
666
|
+
'ta.presence.typing': '{names} typing',
|
|
667
|
+
'ta.presence.asked': 'Ta is answering {names}',
|
|
668
|
+
'ta.presence.separator': ', ',
|
|
669
|
+
'ta.presence.more': ' +{count}',
|
|
670
|
+
'ta.presence.owner': 'Owner',
|
|
671
|
+
'ta.chat.replyingFor': '{names} · answering',
|
|
630
672
|
'ta.account': 'Account',
|
|
631
673
|
'ta.account.service': 'Ta service',
|
|
632
674
|
// The settings view and the menu of the account
|
|
@@ -895,6 +937,48 @@ exports.EN_MESSAGES = {
|
|
|
895
937
|
'ta.auth.none': 'No matching providers',
|
|
896
938
|
'ta.auth.search': 'Search providers',
|
|
897
939
|
'ta.auth.accountsTitle': 'Model accounts',
|
|
940
|
+
'ta.auth.custom.add': 'Add a custom model service',
|
|
941
|
+
'ta.auth.custom.addHint': 'Your own address and key',
|
|
942
|
+
'ta.auth.custom.title': 'Custom model service',
|
|
943
|
+
'ta.auth.custom.kind': 'Custom',
|
|
944
|
+
'ta.auth.custom.api': 'Compatible with',
|
|
945
|
+
'ta.auth.custom.apiOpenai': 'OpenAI (Chat Completions)',
|
|
946
|
+
'ta.auth.custom.apiResponses': 'OpenAI (Responses)',
|
|
947
|
+
'ta.auth.custom.apiAnthropic': 'Anthropic (Messages)',
|
|
948
|
+
'ta.auth.custom.apiGoogle': 'Google Gemini',
|
|
949
|
+
'ta.auth.custom.baseUrl': 'Base URL',
|
|
950
|
+
'ta.auth.custom.apiKey': 'API key',
|
|
951
|
+
'ta.auth.custom.keyKept': 'Saved; leave blank to keep it',
|
|
952
|
+
'ta.auth.custom.keyOptional': 'not needed for a local server',
|
|
953
|
+
'ta.auth.custom.name': 'Name',
|
|
954
|
+
'ta.auth.custom.optional': 'optional',
|
|
955
|
+
'ta.auth.custom.models': 'Models',
|
|
956
|
+
'ta.auth.custom.modelPlaceholder': 'Type a model ID, then Enter',
|
|
957
|
+
'ta.auth.custom.removeModel': 'Remove {id}',
|
|
958
|
+
'ta.auth.custom.fetch': 'Get the list from the service',
|
|
959
|
+
'ta.auth.custom.fetched': '{count} models; pick the ones to use',
|
|
960
|
+
'ta.auth.custom.fetchedNone': 'The service lists no models: type their IDs',
|
|
961
|
+
'ta.auth.custom.fetchFailed': 'Could not get the models: {message}',
|
|
962
|
+
'ta.auth.custom.filter': 'Filter models',
|
|
963
|
+
'ta.auth.custom.note': 'The address and the key stay on the computer that runs Ta.',
|
|
964
|
+
'ta.auth.custom.needModel': 'Add at least one model',
|
|
965
|
+
'ta.auth.custom.save': 'Save',
|
|
966
|
+
'ta.auth.custom.saved': '{name} saved; pick its models in the + menu',
|
|
967
|
+
'ta.auth.custom.remove': 'Delete',
|
|
968
|
+
'ta.auth.custom.removeConfirm': 'Delete {name}? Its models can no longer be used.',
|
|
969
|
+
'ta.auth.custom.advanced': 'Advanced',
|
|
970
|
+
'ta.auth.custom.advancedHint': 'For every model of this service',
|
|
971
|
+
'ta.auth.custom.contextWindow': 'Context window',
|
|
972
|
+
'ta.auth.custom.maxTokens': 'Max output',
|
|
973
|
+
'ta.auth.custom.mixed': 'differs by model, kept unless changed',
|
|
974
|
+
'ta.auth.custom.reasoning': 'Thinks before answering (a reasoning model)',
|
|
975
|
+
'ta.auth.custom.images': 'Takes pictures',
|
|
976
|
+
'ta.auth.custom.headers': 'Headers',
|
|
977
|
+
'ta.auth.custom.headerName': 'Name',
|
|
978
|
+
'ta.auth.custom.headerValue': 'Value',
|
|
979
|
+
'ta.auth.custom.addHeader': 'Add a header',
|
|
980
|
+
'ta.auth.custom.removeHeader': 'Remove {name}',
|
|
981
|
+
'ta.auth.custom.badNumber': 'Not a number of tokens: {value}',
|
|
898
982
|
'ta.manage.accounts': 'Model accounts…',
|
|
899
983
|
'ta.manage.workingDirectory': 'Default directory…',
|
|
900
984
|
'ta.settings.accounts': 'Model accounts',
|
|
@@ -1061,6 +1145,34 @@ exports.ZH_MESSAGES = {
|
|
|
1061
1145
|
'ta.access.thisBrowser': '当前浏览器',
|
|
1062
1146
|
'ta.access.lastUsed': '最近使用 {time}',
|
|
1063
1147
|
'ta.access.signOut': '退出登录',
|
|
1148
|
+
'ta.signInSetup.title': '登录方式',
|
|
1149
|
+
'ta.signInSetup.hint': '你邀请的人用这些方式登录,说明自己是谁;在 Ta 应用和浏览器里都能用,同一个账号在哪台设备上都是同一个成员。',
|
|
1150
|
+
'ta.signInSetup.callback': '在提供方那里把这个地址登记为回调地址(Callback / Redirect URL):',
|
|
1151
|
+
'ta.signInSetup.copy': '复制',
|
|
1152
|
+
'ta.signInSetup.copied': '已复制',
|
|
1153
|
+
'ta.signInSetup.oidc': '企业 SSO(OpenID Connect)',
|
|
1154
|
+
'ta.signInSetup.on': '已开启 · {id}',
|
|
1155
|
+
'ta.signInSetup.off': '未配置',
|
|
1156
|
+
'ta.signInSetup.device': '已内置:你邀请的人在 GitHub 输入一个码就能登录。配置自己的应用后改用你的。',
|
|
1157
|
+
'ta.signInSetup.incomplete': '还没配完:需要 ID 和密钥',
|
|
1158
|
+
'ta.signInSetup.fromEnv': '由服务的环境变量设置',
|
|
1159
|
+
'ta.signInSetup.add': '配置',
|
|
1160
|
+
'ta.signInSetup.edit': '修改',
|
|
1161
|
+
'ta.signInSetup.save': '保存',
|
|
1162
|
+
'ta.signInSetup.saved': '已保存,现在就能用',
|
|
1163
|
+
'ta.signInSetup.removed': '已移除',
|
|
1164
|
+
'ta.signInSetup.remove': '移除 {name}',
|
|
1165
|
+
'ta.signInSetup.removeConfirm': '不再用 {name} 登录?',
|
|
1166
|
+
'ta.signInSetup.removeDetail': '用它加入的成员会保留,只是以后不能再用它登录。',
|
|
1167
|
+
'ta.signInSetup.secretKept': '已保存,留空不改',
|
|
1168
|
+
'ta.signInSetup.optional': '可不填',
|
|
1169
|
+
'ta.signInSetup.field.clientId': 'Client ID',
|
|
1170
|
+
'ta.signInSetup.field.clientSecret': 'Client secret',
|
|
1171
|
+
'ta.signInSetup.field.appId': 'AppID',
|
|
1172
|
+
'ta.signInSetup.field.appSecret': 'AppSecret',
|
|
1173
|
+
'ta.signInSetup.field.url': 'GitHub Enterprise 地址',
|
|
1174
|
+
'ta.signInSetup.field.issuer': '签发方地址(Issuer)',
|
|
1175
|
+
'ta.signInSetup.field.name': '按钮上显示的名称',
|
|
1064
1176
|
'ta.sidebar.closeTitle': '从列表移除;可在“已移除”里找回',
|
|
1065
1177
|
'ta.chat.open': '打开',
|
|
1066
1178
|
'ta.chat.remove': '从列表移除',
|
|
@@ -1524,6 +1636,13 @@ exports.ZH_MESSAGES = {
|
|
|
1524
1636
|
'ta.composer.queue.takeBackTitle': '把排队的消息取回输入框',
|
|
1525
1637
|
'ta.composer.queue.editTitle': '撤回到输入框编辑',
|
|
1526
1638
|
'ta.composer.queue.remove': '删除',
|
|
1639
|
+
'ta.presence.viewing': '也在看',
|
|
1640
|
+
'ta.presence.typing': '{names}正在输入',
|
|
1641
|
+
'ta.presence.asked': 'Ta 正在回复{names}',
|
|
1642
|
+
'ta.presence.separator': '、',
|
|
1643
|
+
'ta.presence.more': '等 {count} 人',
|
|
1644
|
+
'ta.presence.owner': '所有者',
|
|
1645
|
+
'ta.chat.replyingFor': '{names} · 正在回复',
|
|
1527
1646
|
'ta.account': '账号',
|
|
1528
1647
|
'ta.account.service': 'Ta 服务',
|
|
1529
1648
|
// The settings view and the menu of the gear
|
|
@@ -1791,6 +1910,48 @@ exports.ZH_MESSAGES = {
|
|
|
1791
1910
|
'ta.auth.none': '没有匹配的服务商',
|
|
1792
1911
|
'ta.auth.search': '搜索服务商',
|
|
1793
1912
|
'ta.auth.accountsTitle': '模型账号',
|
|
1913
|
+
'ta.auth.custom.add': '添加自定义模型服务',
|
|
1914
|
+
'ta.auth.custom.addHint': '填服务地址和 Key',
|
|
1915
|
+
'ta.auth.custom.title': '自定义模型服务',
|
|
1916
|
+
'ta.auth.custom.kind': '自定义',
|
|
1917
|
+
'ta.auth.custom.api': '接口格式',
|
|
1918
|
+
'ta.auth.custom.apiOpenai': 'OpenAI 兼容(Chat Completions)',
|
|
1919
|
+
'ta.auth.custom.apiResponses': 'OpenAI 兼容(Responses)',
|
|
1920
|
+
'ta.auth.custom.apiAnthropic': 'Anthropic 兼容(Messages)',
|
|
1921
|
+
'ta.auth.custom.apiGoogle': 'Google Gemini',
|
|
1922
|
+
'ta.auth.custom.baseUrl': '服务地址',
|
|
1923
|
+
'ta.auth.custom.apiKey': 'API Key',
|
|
1924
|
+
'ta.auth.custom.keyKept': '已保存,不改就留空',
|
|
1925
|
+
'ta.auth.custom.keyOptional': '本机服务可不填',
|
|
1926
|
+
'ta.auth.custom.name': '名称',
|
|
1927
|
+
'ta.auth.custom.optional': '可不填',
|
|
1928
|
+
'ta.auth.custom.models': '模型',
|
|
1929
|
+
'ta.auth.custom.modelPlaceholder': '输入模型 ID,回车添加',
|
|
1930
|
+
'ta.auth.custom.removeModel': '移除 {id}',
|
|
1931
|
+
'ta.auth.custom.fetch': '从服务读取模型',
|
|
1932
|
+
'ta.auth.custom.fetched': '共 {count} 个模型,点选要用的',
|
|
1933
|
+
'ta.auth.custom.fetchedNone': '服务没有列出模型,请手动输入',
|
|
1934
|
+
'ta.auth.custom.fetchFailed': '读取不到模型:{message}',
|
|
1935
|
+
'ta.auth.custom.filter': '筛选模型',
|
|
1936
|
+
'ta.auth.custom.note': '地址和 Key 只保存在运行 Ta 的电脑上。',
|
|
1937
|
+
'ta.auth.custom.needModel': '至少添加一个模型',
|
|
1938
|
+
'ta.auth.custom.save': '保存',
|
|
1939
|
+
'ta.auth.custom.saved': '已保存 {name},可在 + 菜单里选它的模型',
|
|
1940
|
+
'ta.auth.custom.remove': '删除',
|
|
1941
|
+
'ta.auth.custom.removeConfirm': '删除 {name}?它的模型将不能再用。',
|
|
1942
|
+
'ta.auth.custom.advanced': '高级设置',
|
|
1943
|
+
'ta.auth.custom.advancedHint': '对这个服务的所有模型生效',
|
|
1944
|
+
'ta.auth.custom.contextWindow': '上下文窗口',
|
|
1945
|
+
'ta.auth.custom.maxTokens': '最大输出',
|
|
1946
|
+
'ta.auth.custom.mixed': '各模型不同,不改就保留',
|
|
1947
|
+
'ta.auth.custom.reasoning': '会先思考(推理模型)',
|
|
1948
|
+
'ta.auth.custom.images': '能看图片',
|
|
1949
|
+
'ta.auth.custom.headers': '请求头',
|
|
1950
|
+
'ta.auth.custom.headerName': '名称',
|
|
1951
|
+
'ta.auth.custom.headerValue': '值',
|
|
1952
|
+
'ta.auth.custom.addHeader': '添加请求头',
|
|
1953
|
+
'ta.auth.custom.removeHeader': '移除 {name}',
|
|
1954
|
+
'ta.auth.custom.badNumber': '不是有效的 token 数:{value}',
|
|
1794
1955
|
'ta.manage.accounts': '模型账号…',
|
|
1795
1956
|
'ta.manage.workingDirectory': '默认目录…',
|
|
1796
1957
|
'ta.settings.accounts': '模型账号',
|
|
@@ -1800,8 +1961,19 @@ exports.ZH_MESSAGES = {
|
|
|
1800
1961
|
'ta.settings.cwdDescription': '新对话、终端和分身派出的任务在这里打开;已有的对话留在各自的目录:{path}',
|
|
1801
1962
|
'ta.workingDirectory.changed': '默认目录已改为 {path}',
|
|
1802
1963
|
};
|
|
1964
|
+
/** The messages of each language of Ta, checked by scripts/check-i18n.ts. */
|
|
1965
|
+
exports.MESSAGES = {
|
|
1966
|
+
'zh-CN': exports.ZH_MESSAGES,
|
|
1967
|
+
'zh-TW': messages_zh_tw_1.ZH_TW_MESSAGES,
|
|
1968
|
+
'en-US': exports.EN_MESSAGES,
|
|
1969
|
+
'ja-JP': messages_ja_1.JA_MESSAGES,
|
|
1970
|
+
};
|
|
1971
|
+
/** The messages of a language of the settings (`zh-CN`, `zh-TW`, `ja-JP`), English for another. */
|
|
1972
|
+
function messagesOf(language) {
|
|
1973
|
+
return ta_protocol_1.TaLanguageUtil.pick(language, exports.MESSAGES);
|
|
1974
|
+
}
|
|
1803
1975
|
/** A message outside React, in a language of the settings. */
|
|
1804
1976
|
function message(language, id) {
|
|
1805
|
-
return (language
|
|
1977
|
+
return messagesOf(language)[id];
|
|
1806
1978
|
}
|
|
1807
1979
|
//# sourceMappingURL=messages.js.map
|
|
@@ -53,7 +53,8 @@ const intls = new Map();
|
|
|
53
53
|
function translator(language) {
|
|
54
54
|
let intl = intls.get(language);
|
|
55
55
|
if (!intl) {
|
|
56
|
-
|
|
56
|
+
const messages = (0, messages_1.messagesOf)(language);
|
|
57
|
+
intl = messages === messages_1.EN_MESSAGES ? english() : (0, react_intl_1.createIntl)({ locale: language, messages });
|
|
57
58
|
intls.set(language, intl);
|
|
58
59
|
}
|
|
59
60
|
const shape = intl;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type TaPresenceReport } from '@celljs/ta-protocol';
|
|
2
|
+
/** How long typing lasts after the last key, while nothing more is typed nor sent. */
|
|
3
|
+
export declare const TYPING_MS = 6000;
|
|
4
|
+
/**
|
|
5
|
+
* What this page tells the others in the same Ta (TaPresenceServer, docs/design/ta-team.md 7): the conversation in front
|
|
6
|
+
* of the user while the page is seen, and whether they type in it. It says so as it changes, at most once a frame, again
|
|
7
|
+
* every heartbeat while it looks at one, and again on each new connection; never while nothing changed and it looks at
|
|
8
|
+
* none. `send` goes on the connection of the time, and fails quietly without one.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PresenceReporter {
|
|
11
|
+
protected readonly send: (state: TaPresenceReport) => void;
|
|
12
|
+
protected readonly heartbeatMs: number;
|
|
13
|
+
protected readonly typingMs: number;
|
|
14
|
+
protected looking?: string;
|
|
15
|
+
protected typingIn?: string;
|
|
16
|
+
protected sent?: string;
|
|
17
|
+
protected flushTimer?: ReturnType<typeof setTimeout>;
|
|
18
|
+
protected typingTimer?: ReturnType<typeof setTimeout>;
|
|
19
|
+
protected heartbeat?: ReturnType<typeof setInterval>;
|
|
20
|
+
constructor(send: (state: TaPresenceReport) => void, heartbeatMs?: number, typingMs?: number);
|
|
21
|
+
/** The conversation in front of the user, the page seen; none otherwise. */
|
|
22
|
+
look(sessionId: string | undefined): void;
|
|
23
|
+
/** What the box of a conversation holds now: typing while it holds something and keys come. */
|
|
24
|
+
type(sessionId: string, typing: boolean): void;
|
|
25
|
+
/** A new connection knows nothing of this page: what it is at goes again. */
|
|
26
|
+
resend(): void;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
/** What it is at now. */
|
|
29
|
+
get state(): TaPresenceReport;
|
|
30
|
+
protected schedule(): void;
|
|
31
|
+
protected flush(): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=presence-reporter.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresenceReporter = exports.TYPING_MS = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
5
|
+
/** How long typing lasts after the last key, while nothing more is typed nor sent. */
|
|
6
|
+
exports.TYPING_MS = 6000;
|
|
7
|
+
/**
|
|
8
|
+
* What this page tells the others in the same Ta (TaPresenceServer, docs/design/ta-team.md 7): the conversation in front
|
|
9
|
+
* of the user while the page is seen, and whether they type in it. It says so as it changes, at most once a frame, again
|
|
10
|
+
* every heartbeat while it looks at one, and again on each new connection; never while nothing changed and it looks at
|
|
11
|
+
* none. `send` goes on the connection of the time, and fails quietly without one.
|
|
12
|
+
*/
|
|
13
|
+
class PresenceReporter {
|
|
14
|
+
constructor(send, heartbeatMs = ta_protocol_1.TA_PRESENCE_HEARTBEAT_MS, typingMs = exports.TYPING_MS) {
|
|
15
|
+
this.send = send;
|
|
16
|
+
this.heartbeatMs = heartbeatMs;
|
|
17
|
+
this.typingMs = typingMs;
|
|
18
|
+
}
|
|
19
|
+
/** The conversation in front of the user, the page seen; none otherwise. */
|
|
20
|
+
look(sessionId) {
|
|
21
|
+
this.looking = sessionId || undefined;
|
|
22
|
+
this.schedule();
|
|
23
|
+
}
|
|
24
|
+
/** What the box of a conversation holds now: typing while it holds something and keys come. */
|
|
25
|
+
type(sessionId, typing) {
|
|
26
|
+
clearTimeout(this.typingTimer);
|
|
27
|
+
this.typingIn = typing ? sessionId : undefined;
|
|
28
|
+
if (typing) {
|
|
29
|
+
this.typingTimer = setTimeout(() => {
|
|
30
|
+
this.typingIn = undefined;
|
|
31
|
+
this.schedule();
|
|
32
|
+
}, this.typingMs);
|
|
33
|
+
}
|
|
34
|
+
this.schedule();
|
|
35
|
+
}
|
|
36
|
+
/** A new connection knows nothing of this page: what it is at goes again. */
|
|
37
|
+
resend() {
|
|
38
|
+
this.sent = undefined;
|
|
39
|
+
this.schedule();
|
|
40
|
+
}
|
|
41
|
+
dispose() {
|
|
42
|
+
clearTimeout(this.flushTimer);
|
|
43
|
+
clearTimeout(this.typingTimer);
|
|
44
|
+
clearInterval(this.heartbeat);
|
|
45
|
+
}
|
|
46
|
+
/** What it is at now. */
|
|
47
|
+
get state() {
|
|
48
|
+
return this.looking ? { sessionId: this.looking, ...(this.typingIn === this.looking ? { typing: true } : {}) } : {};
|
|
49
|
+
}
|
|
50
|
+
schedule() {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = this.flushTimer) !== null && _a !== void 0 ? _a : (this.flushTimer = setTimeout(() => {
|
|
53
|
+
this.flushTimer = undefined;
|
|
54
|
+
this.flush();
|
|
55
|
+
}, 0));
|
|
56
|
+
}
|
|
57
|
+
flush() {
|
|
58
|
+
const state = this.state;
|
|
59
|
+
const json = JSON.stringify(state);
|
|
60
|
+
// Nothing to say of a page that was never at a conversation.
|
|
61
|
+
if (json !== this.sent && (this.sent !== undefined || state.sessionId)) {
|
|
62
|
+
this.sent = json;
|
|
63
|
+
this.send(state);
|
|
64
|
+
}
|
|
65
|
+
if (state.sessionId && !this.heartbeat) {
|
|
66
|
+
this.heartbeat = setInterval(() => this.send(this.state), this.heartbeatMs);
|
|
67
|
+
}
|
|
68
|
+
else if (!state.sessionId && this.heartbeat) {
|
|
69
|
+
clearInterval(this.heartbeat);
|
|
70
|
+
this.heartbeat = undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.PresenceReporter = PresenceReporter;
|
|
75
|
+
//# sourceMappingURL=presence-reporter.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type TaLanguage } from '@celljs/ta-protocol';
|
|
1
2
|
import type { StateSpec } from '../state/state-protocol';
|
|
2
3
|
import { type NavigationSetting } from './navigation';
|
|
3
4
|
export declare const TaSettings: unique symbol;
|
|
4
5
|
export type ThemeSetting = 'system' | 'light' | 'dark';
|
|
5
6
|
export type Theme = 'light' | 'dark';
|
|
6
7
|
export type LanguageSetting = 'system' | Language;
|
|
7
|
-
export type Language =
|
|
8
|
+
export type Language = TaLanguage;
|
|
8
9
|
/** How large the text is, as the font size of WeChat: small, standard, large, extra large. */
|
|
9
10
|
export type FontSize = 'small' | 'standard' | 'large' | 'xlarge';
|
|
10
11
|
/** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
|
|
@@ -89,7 +90,7 @@ export declare namespace SettingsUtil {
|
|
|
89
90
|
function theme(setting: ThemeSetting, prefersDark: boolean): Theme;
|
|
90
91
|
/** What the font sizes of the page are multiplied by on this device: `fontScale`, more on a phone. */
|
|
91
92
|
function deviceFontScale(fontScale: number, handheld: boolean): number;
|
|
92
|
-
/**
|
|
93
|
+
/** That of the browser for system: Traditional Chinese for Taiwan, Hong Kong and Macau, Simplified for other Chinese, Japanese, else English. */
|
|
93
94
|
function language(setting: LanguageSetting, browserLanguage: string): Language;
|
|
94
95
|
}
|
|
95
96
|
/** The settings of the web client: theme, language, font size, voice, motion. They apply as soon as they change. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SettingsUtil = exports.DEFAULT_SETTINGS = exports.MAX_TASKS_CHOICES = exports.CHAT_ARCHIVE_CHOICES = exports.CHAT_FOLD_CHOICES = exports.KEEP_ALIVE_CHOICES = exports.HANDHELD_FONT_SCALE = exports.FONT_SCALES = exports.TaSettings = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
4
5
|
const navigation_1 = require("./navigation");
|
|
5
6
|
exports.TaSettings = Symbol('TaSettings');
|
|
6
7
|
/** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
|
|
@@ -63,7 +64,7 @@ var SettingsUtil;
|
|
|
63
64
|
const kept = value;
|
|
64
65
|
return {
|
|
65
66
|
theme: ['system', 'light', 'dark'].includes(kept.theme) ? kept.theme : exports.DEFAULT_SETTINGS.theme,
|
|
66
|
-
language: ['system',
|
|
67
|
+
language: ['system', ...ta_protocol_1.TaLanguageUtil.ALL].includes(kept.language) ? kept.language : exports.DEFAULT_SETTINGS.language,
|
|
67
68
|
fontSize: fontSize(kept.fontSize),
|
|
68
69
|
chatFontSize: fontSize(kept.chatFontSize),
|
|
69
70
|
speak: kept.speak === true,
|
|
@@ -94,9 +95,9 @@ var SettingsUtil;
|
|
|
94
95
|
return handheld ? fontScale * exports.HANDHELD_FONT_SCALE : fontScale;
|
|
95
96
|
}
|
|
96
97
|
SettingsUtil.deviceFontScale = deviceFontScale;
|
|
97
|
-
/**
|
|
98
|
+
/** That of the browser for system: Traditional Chinese for Taiwan, Hong Kong and Macau, Simplified for other Chinese, Japanese, else English. */
|
|
98
99
|
function language(setting, browserLanguage) {
|
|
99
|
-
return setting === 'system' ?
|
|
100
|
+
return setting === 'system' ? ta_protocol_1.TaLanguageUtil.of(browserLanguage) : setting;
|
|
100
101
|
}
|
|
101
102
|
SettingsUtil.language = language;
|
|
102
103
|
})(SettingsUtil || (exports.SettingsUtil = SettingsUtil = {}));
|