@ray-js/t-agent-ui-ray 0.2.0-beta-17 → 0.2.0-beta.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/dist/MessageInput/MessageInputAIStream/index.js +28 -1
- package/dist/contexts.js +1 -0
- package/dist/hooks/useLongPress.js +4 -4
- package/dist/i18n/strings.d.ts +201 -2
- package/dist/i18n/strings.js +209 -10
- package/dist/renderOption.js +8 -0
- package/dist/tiles/BubbleTile/index.js +15 -14
- package/dist/types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -16,6 +16,7 @@ import cameraSvg from '../icons/camera.svg';
|
|
|
16
16
|
import { useAttachmentInput, useChatAgent, useEmitEvent, useIsUnmounted, useOnEvent, useTranslate } from '../../hooks';
|
|
17
17
|
import AsrInput from './AsrInput';
|
|
18
18
|
import logger from '../../logger';
|
|
19
|
+
import { systemInfo } from '../../utils';
|
|
19
20
|
const AMPLITUDE_COUNT = 60;
|
|
20
21
|
var InputState = /*#__PURE__*/function (InputState) {
|
|
21
22
|
InputState["PENDING"] = "pending";
|
|
@@ -74,6 +75,7 @@ export default function MessageInputAIStream(props) {
|
|
|
74
75
|
payload: {}
|
|
75
76
|
});
|
|
76
77
|
const dispatchRef = useRef(null);
|
|
78
|
+
const initAudioRef = useRef(false);
|
|
77
79
|
dispatchRef.current = (event, payload) => {
|
|
78
80
|
var _transitions$state$cu;
|
|
79
81
|
const next = (_transitions$state$cu = transitions[state.current]) === null || _transitions$state$cu === void 0 ? void 0 : _transitions$state$cu[event];
|
|
@@ -235,6 +237,31 @@ export default function MessageInputAIStream(props) {
|
|
|
235
237
|
});
|
|
236
238
|
return;
|
|
237
239
|
}
|
|
240
|
+
if (!initAudioRef.current) {
|
|
241
|
+
initAudioRef.current = true;
|
|
242
|
+
await new Promise(resolve => {
|
|
243
|
+
if (!ty.aistream.initAudioRecorder || systemInfo.brand === 'devtools') {
|
|
244
|
+
resolve();
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
logger.debug('MessageInputAIStream', 'initAudioRecorder');
|
|
249
|
+
ty.aistream.initAudioRecorder({
|
|
250
|
+
success: () => {
|
|
251
|
+
logger.debug('MessageInputAIStream', 'initAudioRecorder success');
|
|
252
|
+
resolve();
|
|
253
|
+
},
|
|
254
|
+
fail: error => {
|
|
255
|
+
logger.error('MessageInputAIStream', 'initAudioRecorder error', error);
|
|
256
|
+
resolve();
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
} catch (error) {
|
|
260
|
+
logger.error('MessageInputAIStream', 'initAudioRecorder error', error);
|
|
261
|
+
resolve();
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
238
265
|
setText('');
|
|
239
266
|
setMode('voice');
|
|
240
267
|
setMoreOpen(false);
|
|
@@ -298,7 +325,7 @@ export default function MessageInputAIStream(props) {
|
|
|
298
325
|
}
|
|
299
326
|
if (dispatch(InputAction.ASR_ERROR, {})) {
|
|
300
327
|
var _error$detail;
|
|
301
|
-
if (((_error$detail = error.detail) === null || _error$detail === void 0 ? void 0 : _error$detail.
|
|
328
|
+
if (((_error$detail = error.detail) === null || _error$detail === void 0 ? void 0 : _error$detail.code) === 'asr_empty') {
|
|
302
329
|
ty.showToast({
|
|
303
330
|
icon: 'error',
|
|
304
331
|
title: t('t-agent.input.asr.error.empty')
|
package/dist/contexts.js
CHANGED
|
@@ -4,6 +4,7 @@ export const MessageContext = /*#__PURE__*/createContext({
|
|
|
4
4
|
keyboardHeight: 0
|
|
5
5
|
});
|
|
6
6
|
export const RenderContext = /*#__PURE__*/createContext({
|
|
7
|
+
formatErrorMessageAs: message => message,
|
|
7
8
|
renderTileAs: () => null,
|
|
8
9
|
renderCustomBlockAs: () => null,
|
|
9
10
|
renderCardAs: () => null,
|
|
@@ -132,13 +132,13 @@ export function useLongPress() {
|
|
|
132
132
|
});
|
|
133
133
|
} else {
|
|
134
134
|
ty.showToast({
|
|
135
|
-
title: t('t-agent.unknown-error'),
|
|
135
|
+
title: t('t-agent.error.unknown-error'),
|
|
136
136
|
icon: 'none'
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
} catch (error) {
|
|
140
140
|
ty.showToast({
|
|
141
|
-
title: (error === null || error === void 0 ? void 0 : error.message) || t('t-agent.unknown-error'),
|
|
141
|
+
title: (error === null || error === void 0 ? void 0 : error.message) || t('t-agent.error.unknown-error'),
|
|
142
142
|
icon: 'none'
|
|
143
143
|
});
|
|
144
144
|
}
|
|
@@ -162,13 +162,13 @@ export function useLongPress() {
|
|
|
162
162
|
});
|
|
163
163
|
} else {
|
|
164
164
|
ty.showToast({
|
|
165
|
-
title: t('t-agent.unknown-error'),
|
|
165
|
+
title: t('t-agent.error.unknown-error'),
|
|
166
166
|
icon: 'none'
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
} catch (error) {
|
|
170
170
|
ty.showToast({
|
|
171
|
-
title: (error === null || error === void 0 ? void 0 : error.message) || t('t-agent.unknown-error'),
|
|
171
|
+
title: (error === null || error === void 0 ? void 0 : error.message) || t('t-agent.error.unknown-error'),
|
|
172
172
|
icon: 'none'
|
|
173
173
|
});
|
|
174
174
|
}
|
package/dist/i18n/strings.d.ts
CHANGED
|
@@ -70,7 +70,6 @@ declare const _default: {
|
|
|
70
70
|
't-agent.expand.scene.one-click': string;
|
|
71
71
|
't-agent.expand.scene.auto': string;
|
|
72
72
|
't-agent.expand.no.details': string;
|
|
73
|
-
't-agent.unknown-error': string;
|
|
74
73
|
't-agent.input.upload.source-type.camera': string;
|
|
75
74
|
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
76
75
|
't-agent.input.upload.source-type.album': string;
|
|
@@ -78,6 +77,20 @@ declare const _default: {
|
|
|
78
77
|
't-agent.input.upload.image.max-reached': string;
|
|
79
78
|
't-agent.input.upload.video.max-reached': string;
|
|
80
79
|
't-agent.file-tile.unknown-filename': string;
|
|
80
|
+
't-agent.error.unknown-error': string;
|
|
81
|
+
't-agent.error.network-offline': string;
|
|
82
|
+
't-agent.error.invalid-params': string;
|
|
83
|
+
't-agent.error.session-create-failed': string;
|
|
84
|
+
't-agent.error.connection-closed': string;
|
|
85
|
+
't-agent.error.event-exists': string;
|
|
86
|
+
't-agent.error.event-disposed': string;
|
|
87
|
+
't-agent.error.event-closed': string;
|
|
88
|
+
't-agent.error.event-aborted': string;
|
|
89
|
+
't-agent.error.event-write-failed': string;
|
|
90
|
+
't-agent.error.event-no-data-code': string;
|
|
91
|
+
't-agent.error.stream-exists': string;
|
|
92
|
+
't-agent.error.timeout': string;
|
|
93
|
+
't-agent.error.asr-empty': string;
|
|
81
94
|
};
|
|
82
95
|
'zh-Hant': {
|
|
83
96
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -142,6 +155,35 @@ declare const _default: {
|
|
|
142
155
|
't-agent.expand.scene.one-click': string;
|
|
143
156
|
't-agent.expand.scene.auto': string;
|
|
144
157
|
't-agent.expand.no.details': string;
|
|
158
|
+
't-agent.input.asr.oninput.text.top': string;
|
|
159
|
+
't-agent.input.asr.oninput.text.center': string;
|
|
160
|
+
't-agent.input.asr.ptt': string;
|
|
161
|
+
't-agent.input.asr.error.too-short': string;
|
|
162
|
+
't-agent.input.asr.error.empty': string;
|
|
163
|
+
't-agent.input.asr.error.unknown': string;
|
|
164
|
+
't-agent.input.asr.error.timeout': string;
|
|
165
|
+
't-agent.message.action.multiSelect': string;
|
|
166
|
+
't-agent.input.upload.source-type.camera': string;
|
|
167
|
+
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
168
|
+
't-agent.input.upload.source-type.album': string;
|
|
169
|
+
't-agent.input.upload.source-type.album.require-permission': string;
|
|
170
|
+
't-agent.input.upload.image.max-reached': string;
|
|
171
|
+
't-agent.input.upload.video.max-reached': string;
|
|
172
|
+
't-agent.file-tile.unknown-filename': string;
|
|
173
|
+
't-agent.error.unknown-error': string;
|
|
174
|
+
't-agent.error.network-offline': string;
|
|
175
|
+
't-agent.error.invalid-params': string;
|
|
176
|
+
't-agent.error.session-create-failed': string;
|
|
177
|
+
't-agent.error.connection-closed': string;
|
|
178
|
+
't-agent.error.event-exists': string;
|
|
179
|
+
't-agent.error.event-disposed': string;
|
|
180
|
+
't-agent.error.event-closed': string;
|
|
181
|
+
't-agent.error.event-aborted': string;
|
|
182
|
+
't-agent.error.event-write-failed': string;
|
|
183
|
+
't-agent.error.event-no-data-code': string;
|
|
184
|
+
't-agent.error.stream-exists': string;
|
|
185
|
+
't-agent.error.timeout': string;
|
|
186
|
+
't-agent.error.asr-empty': string;
|
|
145
187
|
};
|
|
146
188
|
en: {
|
|
147
189
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -214,7 +256,6 @@ declare const _default: {
|
|
|
214
256
|
't-agent.expand.scene.one-click': string;
|
|
215
257
|
't-agent.expand.scene.auto': string;
|
|
216
258
|
't-agent.expand.no.details': string;
|
|
217
|
-
't-agent.unknown-error': string;
|
|
218
259
|
't-agent.input.upload.source-type.camera': string;
|
|
219
260
|
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
220
261
|
't-agent.input.upload.source-type.album': string;
|
|
@@ -222,6 +263,19 @@ declare const _default: {
|
|
|
222
263
|
't-agent.input.upload.image.max-reached': string;
|
|
223
264
|
't-agent.input.upload.video.max-reached': string;
|
|
224
265
|
't-agent.file-tile.unknown-filename': string;
|
|
266
|
+
't-agent.error.network-offline': string;
|
|
267
|
+
't-agent.error.invalid-params': string;
|
|
268
|
+
't-agent.error.session-create-failed': string;
|
|
269
|
+
't-agent.error.connection-closed': string;
|
|
270
|
+
't-agent.error.event-exists': string;
|
|
271
|
+
't-agent.error.event-disposed': string;
|
|
272
|
+
't-agent.error.event-closed': string;
|
|
273
|
+
't-agent.error.event-aborted': string;
|
|
274
|
+
't-agent.error.event-write-failed': string;
|
|
275
|
+
't-agent.error.event-no-data-code': string;
|
|
276
|
+
't-agent.error.stream-exists': string;
|
|
277
|
+
't-agent.error.timeout': string;
|
|
278
|
+
't-agent.error.asr-empty': string;
|
|
225
279
|
};
|
|
226
280
|
ja: {
|
|
227
281
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -286,6 +340,35 @@ declare const _default: {
|
|
|
286
340
|
't-agent.expand.scene.one-click': string;
|
|
287
341
|
't-agent.expand.scene.auto': string;
|
|
288
342
|
't-agent.expand.no.details': string;
|
|
343
|
+
't-agent.input.asr.oninput.text.top': string;
|
|
344
|
+
't-agent.input.asr.oninput.text.center': string;
|
|
345
|
+
't-agent.input.asr.ptt': string;
|
|
346
|
+
't-agent.input.asr.error.too-short': string;
|
|
347
|
+
't-agent.input.asr.error.empty': string;
|
|
348
|
+
't-agent.input.asr.error.unknown': string;
|
|
349
|
+
't-agent.input.asr.error.timeout': string;
|
|
350
|
+
't-agent.message.action.multiSelect': string;
|
|
351
|
+
't-agent.input.upload.source-type.camera': string;
|
|
352
|
+
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
353
|
+
't-agent.input.upload.source-type.album': string;
|
|
354
|
+
't-agent.input.upload.source-type.album.require-permission': string;
|
|
355
|
+
't-agent.input.upload.image.max-reached': string;
|
|
356
|
+
't-agent.input.upload.video.max-reached': string;
|
|
357
|
+
't-agent.file-tile.unknown-filename': string;
|
|
358
|
+
't-agent.error.unknown-error': string;
|
|
359
|
+
't-agent.error.network-offline': string;
|
|
360
|
+
't-agent.error.invalid-params': string;
|
|
361
|
+
't-agent.error.session-create-failed': string;
|
|
362
|
+
't-agent.error.connection-closed': string;
|
|
363
|
+
't-agent.error.event-exists': string;
|
|
364
|
+
't-agent.error.event-disposed': string;
|
|
365
|
+
't-agent.error.event-closed': string;
|
|
366
|
+
't-agent.error.event-aborted': string;
|
|
367
|
+
't-agent.error.event-write-failed': string;
|
|
368
|
+
't-agent.error.event-no-data-code': string;
|
|
369
|
+
't-agent.error.stream-exists': string;
|
|
370
|
+
't-agent.error.timeout': string;
|
|
371
|
+
't-agent.error.asr-empty': string;
|
|
289
372
|
};
|
|
290
373
|
de: {
|
|
291
374
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -350,6 +433,35 @@ declare const _default: {
|
|
|
350
433
|
't-agent.expand.scene.one-click': string;
|
|
351
434
|
't-agent.expand.scene.auto': string;
|
|
352
435
|
't-agent.expand.no.details': string;
|
|
436
|
+
't-agent.input.asr.oninput.text.top': string;
|
|
437
|
+
't-agent.input.asr.oninput.text.center': string;
|
|
438
|
+
't-agent.input.asr.ptt': string;
|
|
439
|
+
't-agent.input.asr.error.too-short': string;
|
|
440
|
+
't-agent.input.asr.error.empty': string;
|
|
441
|
+
't-agent.input.asr.error.unknown': string;
|
|
442
|
+
't-agent.input.asr.error.timeout': string;
|
|
443
|
+
't-agent.message.action.multiSelect': string;
|
|
444
|
+
't-agent.input.upload.source-type.camera': string;
|
|
445
|
+
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
446
|
+
't-agent.input.upload.source-type.album': string;
|
|
447
|
+
't-agent.input.upload.source-type.album.require-permission': string;
|
|
448
|
+
't-agent.input.upload.image.max-reached': string;
|
|
449
|
+
't-agent.input.upload.video.max-reached': string;
|
|
450
|
+
't-agent.file-tile.unknown-filename': string;
|
|
451
|
+
't-agent.error.unknown-error': string;
|
|
452
|
+
't-agent.error.network-offline': string;
|
|
453
|
+
't-agent.error.invalid-params': string;
|
|
454
|
+
't-agent.error.session-create-failed': string;
|
|
455
|
+
't-agent.error.connection-closed': string;
|
|
456
|
+
't-agent.error.event-exists': string;
|
|
457
|
+
't-agent.error.event-disposed': string;
|
|
458
|
+
't-agent.error.event-closed': string;
|
|
459
|
+
't-agent.error.event-aborted': string;
|
|
460
|
+
't-agent.error.event-write-failed': string;
|
|
461
|
+
't-agent.error.event-no-data-code': string;
|
|
462
|
+
't-agent.error.stream-exists': string;
|
|
463
|
+
't-agent.error.timeout': string;
|
|
464
|
+
't-agent.error.asr-empty': string;
|
|
353
465
|
};
|
|
354
466
|
fr: {
|
|
355
467
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -414,6 +526,35 @@ declare const _default: {
|
|
|
414
526
|
't-agent.expand.scene.one-click': string;
|
|
415
527
|
't-agent.expand.scene.auto': string;
|
|
416
528
|
't-agent.expand.no.details': string;
|
|
529
|
+
't-agent.input.asr.oninput.text.top': string;
|
|
530
|
+
't-agent.input.asr.oninput.text.center': string;
|
|
531
|
+
't-agent.input.asr.ptt': string;
|
|
532
|
+
't-agent.input.asr.error.too-short': string;
|
|
533
|
+
't-agent.input.asr.error.empty': string;
|
|
534
|
+
't-agent.input.asr.error.unknown': string;
|
|
535
|
+
't-agent.input.asr.error.timeout': string;
|
|
536
|
+
't-agent.message.action.multiSelect': string;
|
|
537
|
+
't-agent.input.upload.source-type.camera': string;
|
|
538
|
+
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
539
|
+
't-agent.input.upload.source-type.album': string;
|
|
540
|
+
't-agent.input.upload.source-type.album.require-permission': string;
|
|
541
|
+
't-agent.input.upload.image.max-reached': string;
|
|
542
|
+
't-agent.input.upload.video.max-reached': string;
|
|
543
|
+
't-agent.file-tile.unknown-filename': string;
|
|
544
|
+
't-agent.error.unknown-error': string;
|
|
545
|
+
't-agent.error.network-offline': string;
|
|
546
|
+
't-agent.error.invalid-params': string;
|
|
547
|
+
't-agent.error.session-create-failed': string;
|
|
548
|
+
't-agent.error.connection-closed': string;
|
|
549
|
+
't-agent.error.event-exists': string;
|
|
550
|
+
't-agent.error.event-disposed': string;
|
|
551
|
+
't-agent.error.event-closed': string;
|
|
552
|
+
't-agent.error.event-aborted': string;
|
|
553
|
+
't-agent.error.event-write-failed': string;
|
|
554
|
+
't-agent.error.event-no-data-code': string;
|
|
555
|
+
't-agent.error.stream-exists': string;
|
|
556
|
+
't-agent.error.timeout': string;
|
|
557
|
+
't-agent.error.asr-empty': string;
|
|
417
558
|
};
|
|
418
559
|
es: {
|
|
419
560
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -478,6 +619,35 @@ declare const _default: {
|
|
|
478
619
|
't-agent.expand.scene.one-click': string;
|
|
479
620
|
't-agent.expand.scene.auto': string;
|
|
480
621
|
't-agent.expand.no.details': string;
|
|
622
|
+
't-agent.input.asr.oninput.text.top': string;
|
|
623
|
+
't-agent.input.asr.oninput.text.center': string;
|
|
624
|
+
't-agent.input.asr.ptt': string;
|
|
625
|
+
't-agent.input.asr.error.too-short': string;
|
|
626
|
+
't-agent.input.asr.error.empty': string;
|
|
627
|
+
't-agent.input.asr.error.unknown': string;
|
|
628
|
+
't-agent.input.asr.error.timeout': string;
|
|
629
|
+
't-agent.message.action.multiSelect': string;
|
|
630
|
+
't-agent.input.upload.source-type.camera': string;
|
|
631
|
+
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
632
|
+
't-agent.input.upload.source-type.album': string;
|
|
633
|
+
't-agent.input.upload.source-type.album.require-permission': string;
|
|
634
|
+
't-agent.input.upload.image.max-reached': string;
|
|
635
|
+
't-agent.input.upload.video.max-reached': string;
|
|
636
|
+
't-agent.file-tile.unknown-filename': string;
|
|
637
|
+
't-agent.error.unknown-error': string;
|
|
638
|
+
't-agent.error.network-offline': string;
|
|
639
|
+
't-agent.error.invalid-params': string;
|
|
640
|
+
't-agent.error.session-create-failed': string;
|
|
641
|
+
't-agent.error.connection-closed': string;
|
|
642
|
+
't-agent.error.event-exists': string;
|
|
643
|
+
't-agent.error.event-disposed': string;
|
|
644
|
+
't-agent.error.event-closed': string;
|
|
645
|
+
't-agent.error.event-aborted': string;
|
|
646
|
+
't-agent.error.event-write-failed': string;
|
|
647
|
+
't-agent.error.event-no-data-code': string;
|
|
648
|
+
't-agent.error.stream-exists': string;
|
|
649
|
+
't-agent.error.timeout': string;
|
|
650
|
+
't-agent.error.asr-empty': string;
|
|
481
651
|
};
|
|
482
652
|
it: {
|
|
483
653
|
't-agent.build-in.button.create_scene_manually': string;
|
|
@@ -542,6 +712,35 @@ declare const _default: {
|
|
|
542
712
|
't-agent.expand.scene.one-click': string;
|
|
543
713
|
't-agent.expand.scene.auto': string;
|
|
544
714
|
't-agent.expand.no.details': string;
|
|
715
|
+
't-agent.input.asr.oninput.text.top': string;
|
|
716
|
+
't-agent.input.asr.oninput.text.center': string;
|
|
717
|
+
't-agent.input.asr.ptt': string;
|
|
718
|
+
't-agent.input.asr.error.too-short': string;
|
|
719
|
+
't-agent.input.asr.error.empty': string;
|
|
720
|
+
't-agent.input.asr.error.unknown': string;
|
|
721
|
+
't-agent.input.asr.error.timeout': string;
|
|
722
|
+
't-agent.message.action.multiSelect': string;
|
|
723
|
+
't-agent.input.upload.source-type.camera': string;
|
|
724
|
+
't-agent.input.upload.source-type.camera.require-permission': string;
|
|
725
|
+
't-agent.input.upload.source-type.album': string;
|
|
726
|
+
't-agent.input.upload.source-type.album.require-permission': string;
|
|
727
|
+
't-agent.input.upload.image.max-reached': string;
|
|
728
|
+
't-agent.input.upload.video.max-reached': string;
|
|
729
|
+
't-agent.file-tile.unknown-filename': string;
|
|
730
|
+
't-agent.error.unknown-error': string;
|
|
731
|
+
't-agent.error.network-offline': string;
|
|
732
|
+
't-agent.error.invalid-params': string;
|
|
733
|
+
't-agent.error.session-create-failed': string;
|
|
734
|
+
't-agent.error.connection-closed': string;
|
|
735
|
+
't-agent.error.event-exists': string;
|
|
736
|
+
't-agent.error.event-disposed': string;
|
|
737
|
+
't-agent.error.event-closed': string;
|
|
738
|
+
't-agent.error.event-aborted': string;
|
|
739
|
+
't-agent.error.event-write-failed': string;
|
|
740
|
+
't-agent.error.event-no-data-code': string;
|
|
741
|
+
't-agent.error.stream-exists': string;
|
|
742
|
+
't-agent.error.timeout': string;
|
|
743
|
+
't-agent.error.asr-empty': string;
|
|
545
744
|
};
|
|
546
745
|
};
|
|
547
746
|
export default _default;
|
package/dist/i18n/strings.js
CHANGED
|
@@ -70,14 +70,27 @@ export default {
|
|
|
70
70
|
't-agent.expand.scene.one-click': '一键执行',
|
|
71
71
|
't-agent.expand.scene.auto': '自动执行',
|
|
72
72
|
't-agent.expand.no.details': '没有可显示的详情内容',
|
|
73
|
-
't-agent.unknown-error': '未知错误',
|
|
74
73
|
't-agent.input.upload.source-type.camera': '拍照',
|
|
75
74
|
't-agent.input.upload.source-type.camera.require-permission': '拍照需要摄像头权限,请在设置中开启',
|
|
76
75
|
't-agent.input.upload.source-type.album': '从相册中选择',
|
|
77
76
|
't-agent.input.upload.source-type.album.require-permission': '从相册中选择需要相册权限,请在设置中开启',
|
|
78
77
|
't-agent.input.upload.image.max-reached': '已达到图片上传上限',
|
|
79
78
|
't-agent.input.upload.video.max-reached': '已达到视频上传上限',
|
|
80
|
-
't-agent.file-tile.unknown-filename': '文件'
|
|
79
|
+
't-agent.file-tile.unknown-filename': '文件',
|
|
80
|
+
't-agent.error.unknown-error': '未知错误',
|
|
81
|
+
't-agent.error.network-offline': '网络已断开,请检查网络连接',
|
|
82
|
+
't-agent.error.invalid-params': '无效参数,请重试',
|
|
83
|
+
't-agent.error.session-create-failed': '连接失败,请重试',
|
|
84
|
+
't-agent.error.connection-closed': '连接已关闭,请重试',
|
|
85
|
+
't-agent.error.event-exists': '消息发送异常,请稍后再试',
|
|
86
|
+
't-agent.error.event-disposed': '消息发送异常,请稍后再试',
|
|
87
|
+
't-agent.error.event-closed': '消息发送异常,请稍后再试',
|
|
88
|
+
't-agent.error.event-aborted': '消息已中断',
|
|
89
|
+
't-agent.error.event-write-failed': '消息发送异常,请稍后再试',
|
|
90
|
+
't-agent.error.event-no-data-code': '消息发送异常,请稍后再试',
|
|
91
|
+
't-agent.error.stream-exists': '消息发送异常,请稍后再试',
|
|
92
|
+
't-agent.error.timeout': '发送超时',
|
|
93
|
+
't-agent.error.asr-empty': '语音识别结果为空'
|
|
81
94
|
},
|
|
82
95
|
'zh-Hant': {
|
|
83
96
|
't-agent.build-in.button.create_scene_manually': '手動創建場景',
|
|
@@ -141,7 +154,36 @@ export default {
|
|
|
141
154
|
't-agent.expand.scene.rename': '{oldName}改名成{newName}',
|
|
142
155
|
't-agent.expand.scene.one-click': '一鍵執行',
|
|
143
156
|
't-agent.expand.scene.auto': '自動執行',
|
|
144
|
-
't-agent.expand.no.details': '沒有可顯示的詳情內容'
|
|
157
|
+
't-agent.expand.no.details': '沒有可顯示的詳情內容',
|
|
158
|
+
't-agent.input.asr.oninput.text.top': '我在聽,請說話',
|
|
159
|
+
't-agent.input.asr.oninput.text.center': '鬆開發送 · 上滑取消',
|
|
160
|
+
't-agent.input.asr.ptt': '按住說話',
|
|
161
|
+
't-agent.input.asr.error.too-short': '說話時間太短',
|
|
162
|
+
't-agent.input.asr.error.empty': '未能從語音中識別到文字',
|
|
163
|
+
't-agent.input.asr.error.unknown': '語音識別失敗',
|
|
164
|
+
't-agent.input.asr.error.timeout': '語音識別已達時長限制,將直接發送',
|
|
165
|
+
't-agent.message.action.multiSelect': '多選',
|
|
166
|
+
't-agent.input.upload.source-type.camera': '拍照',
|
|
167
|
+
't-agent.input.upload.source-type.camera.require-permission': '拍照需要相機權限,請在設置中開啟',
|
|
168
|
+
't-agent.input.upload.source-type.album': '從相冊中選擇',
|
|
169
|
+
't-agent.input.upload.source-type.album.require-permission': '從相冊中選擇需要相冊權限,請在設置中開啟',
|
|
170
|
+
't-agent.input.upload.image.max-reached': '已達到圖片上傳上限',
|
|
171
|
+
't-agent.input.upload.video.max-reached': '已達到視頻上傳上限',
|
|
172
|
+
't-agent.file-tile.unknown-filename': '文件',
|
|
173
|
+
't-agent.error.unknown-error': '未知錯誤',
|
|
174
|
+
't-agent.error.network-offline': '網絡已斷開,請檢查網絡連接',
|
|
175
|
+
't-agent.error.invalid-params': '無效參數,請重試',
|
|
176
|
+
't-agent.error.session-create-failed': '連接失敗,請重試',
|
|
177
|
+
't-agent.error.connection-closed': '連接已關閉,請重試',
|
|
178
|
+
't-agent.error.event-exists': '消息發送異常,請稍後再試',
|
|
179
|
+
't-agent.error.event-disposed': '消息發送異常,請稍後再試',
|
|
180
|
+
't-agent.error.event-closed': '消息發送異常,請稍後再試',
|
|
181
|
+
't-agent.error.event-aborted': '消息已中斷',
|
|
182
|
+
't-agent.error.event-write-failed': '消息發送異常,請稍後再試',
|
|
183
|
+
't-agent.error.event-no-data-code': '消息發送異常,請稍後再試',
|
|
184
|
+
't-agent.error.stream-exists': '消息發送異常,請稍後再試',
|
|
185
|
+
't-agent.error.timeout': '發送超時',
|
|
186
|
+
't-agent.error.asr-empty': '語音識別結果為空'
|
|
145
187
|
},
|
|
146
188
|
en: {
|
|
147
189
|
't-agent.build-in.button.create_scene_manually': 'Create Scene Manually',
|
|
@@ -214,14 +256,26 @@ export default {
|
|
|
214
256
|
't-agent.expand.scene.one-click': 'One-click Execution',
|
|
215
257
|
't-agent.expand.scene.auto': 'Automatic Execution',
|
|
216
258
|
't-agent.expand.no.details': 'No details available',
|
|
217
|
-
't-agent.unknown-error': 'Unknown Error',
|
|
218
259
|
't-agent.input.upload.source-type.camera': 'Take a photo',
|
|
219
260
|
't-agent.input.upload.source-type.camera.require-permission': 'Taking a photo requires camera permission, please enable it in settings',
|
|
220
261
|
't-agent.input.upload.source-type.album': 'Pick from album',
|
|
221
262
|
't-agent.input.upload.source-type.album.require-permission': 'Selecting from album requires album permission, please enable it in settings',
|
|
222
263
|
't-agent.input.upload.image.max-reached': 'Image upload limit reached',
|
|
223
264
|
't-agent.input.upload.video.max-reached': 'Video upload limit reached',
|
|
224
|
-
't-agent.file-tile.unknown-filename': 'File'
|
|
265
|
+
't-agent.file-tile.unknown-filename': 'File',
|
|
266
|
+
't-agent.error.network-offline': 'Network disconnected, please check your connection',
|
|
267
|
+
't-agent.error.invalid-params': 'Invalid parameters, please try again',
|
|
268
|
+
't-agent.error.session-create-failed': 'Connection failed, please try again',
|
|
269
|
+
't-agent.error.connection-closed': 'Connection closed, please try again',
|
|
270
|
+
't-agent.error.event-exists': 'Message sending exception, please try again later',
|
|
271
|
+
't-agent.error.event-disposed': 'Message sending exception, please try again later',
|
|
272
|
+
't-agent.error.event-closed': 'Message sending exception, please try again later',
|
|
273
|
+
't-agent.error.event-aborted': 'Message aborted',
|
|
274
|
+
't-agent.error.event-write-failed': 'Message sending exception, please try again later',
|
|
275
|
+
't-agent.error.event-no-data-code': 'Message sending exception, please try again later',
|
|
276
|
+
't-agent.error.stream-exists': 'Message sending exception, please try again later',
|
|
277
|
+
't-agent.error.timeout': 'Sending timeout',
|
|
278
|
+
't-agent.error.asr-empty': 'Voice recognition result is empty'
|
|
225
279
|
},
|
|
226
280
|
ja: {
|
|
227
281
|
't-agent.build-in.button.create_scene_manually': 'シーンを手動で作成',
|
|
@@ -285,7 +339,36 @@ export default {
|
|
|
285
339
|
't-agent.expand.scene.rename': '{oldName}を{newName}に変更',
|
|
286
340
|
't-agent.expand.scene.one-click': '一瞬で実行',
|
|
287
341
|
't-agent.expand.scene.auto': '自動実行',
|
|
288
|
-
't-agent.expand.no.details': '詳細がありません'
|
|
342
|
+
't-agent.expand.no.details': '詳細がありません',
|
|
343
|
+
't-agent.input.asr.oninput.text.top': '聞いています、話してください',
|
|
344
|
+
't-agent.input.asr.oninput.text.center': '離して送信・上にスワイプでキャンセル',
|
|
345
|
+
't-agent.input.asr.ptt': '長押しで話す',
|
|
346
|
+
't-agent.input.asr.error.too-short': '話す時間が短すぎます',
|
|
347
|
+
't-agent.input.asr.error.empty': '音声からテキストを認識できませんでした',
|
|
348
|
+
't-agent.input.asr.error.unknown': '音声認識に失敗しました',
|
|
349
|
+
't-agent.input.asr.error.timeout': '音声認識が制限時間に達しました、直接送信します',
|
|
350
|
+
't-agent.message.action.multiSelect': '複数選択',
|
|
351
|
+
't-agent.input.upload.source-type.camera': '写真を撮る',
|
|
352
|
+
't-agent.input.upload.source-type.camera.require-permission': '写真撮影にはカメラ権限が必要です、設定で有効にしてください',
|
|
353
|
+
't-agent.input.upload.source-type.album': 'アルバムから選択',
|
|
354
|
+
't-agent.input.upload.source-type.album.require-permission': 'アルバムからの選択にはアルバム権限が必要です、設定で有効にしてください',
|
|
355
|
+
't-agent.input.upload.image.max-reached': '画像アップロードの上限に達しました',
|
|
356
|
+
't-agent.input.upload.video.max-reached': '動画アップロードの上限に達しました',
|
|
357
|
+
't-agent.file-tile.unknown-filename': 'ファイル',
|
|
358
|
+
't-agent.error.unknown-error': '不明なエラー',
|
|
359
|
+
't-agent.error.network-offline': 'ネットワークが切断されました、接続を確認してください',
|
|
360
|
+
't-agent.error.invalid-params': '無効なパラメータ、もう一度お試しください',
|
|
361
|
+
't-agent.error.session-create-failed': '接続に失敗しました、もう一度お試しください',
|
|
362
|
+
't-agent.error.connection-closed': '接続が閉じられました、もう一度お試しください',
|
|
363
|
+
't-agent.error.event-exists': 'メッセージ送信例外、後でもう一度お試しください',
|
|
364
|
+
't-agent.error.event-disposed': 'メッセージ送信例外、後でもう一度お試しください',
|
|
365
|
+
't-agent.error.event-closed': 'メッセージ送信例外、後でもう一度お試しください',
|
|
366
|
+
't-agent.error.event-aborted': 'メッセージは中断されました',
|
|
367
|
+
't-agent.error.event-write-failed': 'メッセージ送信例外、後でもう一度お試しください',
|
|
368
|
+
't-agent.error.event-no-data-code': 'メッセージ送信例外、後でもう一度お試しください',
|
|
369
|
+
't-agent.error.stream-exists': 'メッセージ送信例外、後でもう一度お試しください',
|
|
370
|
+
't-agent.error.timeout': '送信タイムアウト',
|
|
371
|
+
't-agent.error.asr-empty': '音声認識結果が空です'
|
|
289
372
|
},
|
|
290
373
|
de: {
|
|
291
374
|
't-agent.build-in.button.create_scene_manually': 'Szene manuell erstellen',
|
|
@@ -349,7 +432,36 @@ export default {
|
|
|
349
432
|
't-agent.expand.scene.rename': '{oldName} umbenennen zu {newName}',
|
|
350
433
|
't-agent.expand.scene.one-click': 'Einmal ausführen',
|
|
351
434
|
't-agent.expand.scene.auto': 'Automatisch ausführen',
|
|
352
|
-
't-agent.expand.no.details': 'Keine Details verfügbar'
|
|
435
|
+
't-agent.expand.no.details': 'Keine Details verfügbar',
|
|
436
|
+
't-agent.input.asr.oninput.text.top': 'Ich höre zu, bitte sprechen Sie',
|
|
437
|
+
't-agent.input.asr.oninput.text.center': 'Zum Senden loslassen · Nach oben wischen zum Abbrechen',
|
|
438
|
+
't-agent.input.asr.ptt': 'Zum Sprechen gedrückt halten',
|
|
439
|
+
't-agent.input.asr.error.too-short': 'Sprechzeit zu kurz',
|
|
440
|
+
't-agent.input.asr.error.empty': 'Kein Text aus der Sprache erkannt',
|
|
441
|
+
't-agent.input.asr.error.unknown': 'Spracherkennung fehlgeschlagen',
|
|
442
|
+
't-agent.input.asr.error.timeout': 'Spracherkennung hat das Zeitlimit erreicht, wird direkt gesendet',
|
|
443
|
+
't-agent.message.action.multiSelect': 'Mehrfachauswahl',
|
|
444
|
+
't-agent.input.upload.source-type.camera': 'Foto aufnehmen',
|
|
445
|
+
't-agent.input.upload.source-type.camera.require-permission': 'Für Fotos wird eine Kameraberechtigung benötigt, bitte in den Einstellungen aktivieren',
|
|
446
|
+
't-agent.input.upload.source-type.album': 'Aus Album auswählen',
|
|
447
|
+
't-agent.input.upload.source-type.album.require-permission': 'Für die Auswahl aus dem Album wird eine Albumberechtigung benötigt, bitte in den Einstellungen aktivieren',
|
|
448
|
+
't-agent.input.upload.image.max-reached': 'Bildupload-Limit erreicht',
|
|
449
|
+
't-agent.input.upload.video.max-reached': 'Videoupload-Limit erreicht',
|
|
450
|
+
't-agent.file-tile.unknown-filename': 'Datei',
|
|
451
|
+
't-agent.error.unknown-error': 'Unbekannter Fehler',
|
|
452
|
+
't-agent.error.network-offline': 'Netzwerk getrennt, bitte Verbindung prüfen',
|
|
453
|
+
't-agent.error.invalid-params': 'Ungültige Parameter, bitte erneut versuchen',
|
|
454
|
+
't-agent.error.session-create-failed': 'Verbindung fehlgeschlagen, bitte erneut versuchen',
|
|
455
|
+
't-agent.error.connection-closed': 'Verbindung geschlossen, bitte erneut versuchen',
|
|
456
|
+
't-agent.error.event-exists': 'Nachrichtensendeausnahme, bitte später erneut versuchen',
|
|
457
|
+
't-agent.error.event-disposed': 'Nachrichtensendeausnahme, bitte später erneut versuchen',
|
|
458
|
+
't-agent.error.event-closed': 'Nachrichtensendeausnahme, bitte später erneut versuchen',
|
|
459
|
+
't-agent.error.event-aborted': 'Nachricht abgebrochen',
|
|
460
|
+
't-agent.error.event-write-failed': 'Nachrichtensendeausnahme, bitte später erneut versuchen',
|
|
461
|
+
't-agent.error.event-no-data-code': 'Nachrichtensendeausnahme, bitte später erneut versuchen',
|
|
462
|
+
't-agent.error.stream-exists': 'Nachrichtensendeausnahme, bitte später erneut versuchen',
|
|
463
|
+
't-agent.error.timeout': 'Sendetimeout',
|
|
464
|
+
't-agent.error.asr-empty': 'Spracherkennungsergebnis ist leer'
|
|
353
465
|
},
|
|
354
466
|
fr: {
|
|
355
467
|
't-agent.build-in.button.create_scene_manually': 'Créer une scène manuellement',
|
|
@@ -413,7 +525,36 @@ export default {
|
|
|
413
525
|
't-agent.expand.scene.rename': '{oldName} renommé en {newName}',
|
|
414
526
|
't-agent.expand.scene.one-click': 'Exécuter en un clic',
|
|
415
527
|
't-agent.expand.scene.auto': 'Exécuter automatiquement',
|
|
416
|
-
't-agent.expand.no.details': 'Aucun détail disponible'
|
|
528
|
+
't-agent.expand.no.details': 'Aucun détail disponible',
|
|
529
|
+
't-agent.input.asr.oninput.text.top': "J'écoute, veuillez parler",
|
|
530
|
+
't-agent.input.asr.oninput.text.center': 'Relâcher pour envoyer · Glisser vers le haut pour annuler',
|
|
531
|
+
't-agent.input.asr.ptt': 'Appuyer pour parler',
|
|
532
|
+
't-agent.input.asr.error.too-short': 'Temps de parole trop court',
|
|
533
|
+
't-agent.input.asr.error.empty': 'Aucun texte reconnu à partir de la voix',
|
|
534
|
+
't-agent.input.asr.error.unknown': 'Échec de la reconnaissance vocale',
|
|
535
|
+
't-agent.input.asr.error.timeout': 'La reconnaissance vocale a atteint la limite de temps, envoi direct',
|
|
536
|
+
't-agent.message.action.multiSelect': 'Sélection multiple',
|
|
537
|
+
't-agent.input.upload.source-type.camera': 'Prendre une photo',
|
|
538
|
+
't-agent.input.upload.source-type.camera.require-permission': "La prise de photo nécessite une autorisation de caméra, veuillez l'activer dans les paramètres",
|
|
539
|
+
't-agent.input.upload.source-type.album': "Choisir depuis l'album",
|
|
540
|
+
't-agent.input.upload.source-type.album.require-permission': "La sélection depuis l'album nécessite une autorisation d'album, veuillez l'activer dans les paramètres",
|
|
541
|
+
't-agent.input.upload.image.max-reached': "Limite de téléchargement d'images atteinte",
|
|
542
|
+
't-agent.input.upload.video.max-reached': 'Limite de téléchargement de vidéos atteinte',
|
|
543
|
+
't-agent.file-tile.unknown-filename': 'Fichier',
|
|
544
|
+
't-agent.error.unknown-error': 'Erreur inconnue',
|
|
545
|
+
't-agent.error.network-offline': 'Réseau déconnecté, veuillez vérifier votre connexion',
|
|
546
|
+
't-agent.error.invalid-params': 'Paramètres invalides, veuillez réessayer',
|
|
547
|
+
't-agent.error.session-create-failed': 'Échec de connexion, veuillez réessayer',
|
|
548
|
+
't-agent.error.connection-closed': 'Connexion fermée, veuillez réessayer',
|
|
549
|
+
't-agent.error.event-exists': "Exception d'envoi de message, veuillez réessayer plus tard",
|
|
550
|
+
't-agent.error.event-disposed': "Exception d'envoi de message, veuillez réessayer plus tard",
|
|
551
|
+
't-agent.error.event-closed': "Exception d'envoi de message, veuillez réessayer plus tard",
|
|
552
|
+
't-agent.error.event-aborted': 'Message interrompu',
|
|
553
|
+
't-agent.error.event-write-failed': "Exception d'envoi de message, veuillez réessayer plus tard",
|
|
554
|
+
't-agent.error.event-no-data-code': "Exception d'envoi de message, veuillez réessayer plus tard",
|
|
555
|
+
't-agent.error.stream-exists': "Exception d'envoi de message, veuillez réessayer plus tard",
|
|
556
|
+
't-agent.error.timeout': "Délai d'envoi dépassé",
|
|
557
|
+
't-agent.error.asr-empty': 'Le résultat de la reconnaissance vocale est vide'
|
|
417
558
|
},
|
|
418
559
|
es: {
|
|
419
560
|
't-agent.build-in.button.create_scene_manually': 'Crear escena manualmente',
|
|
@@ -477,7 +618,36 @@ export default {
|
|
|
477
618
|
't-agent.expand.scene.rename': '{oldName} renombrado a {newName}',
|
|
478
619
|
't-agent.expand.scene.one-click': 'Ejecutar en un clic',
|
|
479
620
|
't-agent.expand.scene.auto': 'Ejecutar automáticamente',
|
|
480
|
-
't-agent.expand.no.details': 'No hay detalles disponibles'
|
|
621
|
+
't-agent.expand.no.details': 'No hay detalles disponibles',
|
|
622
|
+
't-agent.input.asr.oninput.text.top': 'Estoy escuchando, por favor habla',
|
|
623
|
+
't-agent.input.asr.oninput.text.center': 'Suelta para enviar · Desliza hacia arriba para cancelar',
|
|
624
|
+
't-agent.input.asr.ptt': 'Mantén pulsado para hablar',
|
|
625
|
+
't-agent.input.asr.error.too-short': 'Tiempo de habla demasiado corto',
|
|
626
|
+
't-agent.input.asr.error.empty': 'No se reconoció texto del habla',
|
|
627
|
+
't-agent.input.asr.error.unknown': 'Error en el reconocimiento de voz',
|
|
628
|
+
't-agent.input.asr.error.timeout': 'El reconocimiento de voz ha alcanzado el límite de tiempo, se enviará directamente',
|
|
629
|
+
't-agent.message.action.multiSelect': 'Selección múltiple',
|
|
630
|
+
't-agent.input.upload.source-type.camera': 'Tomar una foto',
|
|
631
|
+
't-agent.input.upload.source-type.camera.require-permission': 'La toma de fotos requiere permiso de cámara, por favor actívalo en configuración',
|
|
632
|
+
't-agent.input.upload.source-type.album': 'Elegir del álbum',
|
|
633
|
+
't-agent.input.upload.source-type.album.require-permission': 'La selección del álbum requiere permiso de álbum, por favor actívalo en configuración',
|
|
634
|
+
't-agent.input.upload.image.max-reached': 'Se alcanzó el límite de carga de imágenes',
|
|
635
|
+
't-agent.input.upload.video.max-reached': 'Se alcanzó el límite de carga de videos',
|
|
636
|
+
't-agent.file-tile.unknown-filename': 'Archivo',
|
|
637
|
+
't-agent.error.unknown-error': 'Error desconocido',
|
|
638
|
+
't-agent.error.network-offline': 'Red desconectada, por favor verifica tu conexión',
|
|
639
|
+
't-agent.error.invalid-params': 'Parámetros inválidos, por favor intenta de nuevo',
|
|
640
|
+
't-agent.error.session-create-failed': 'Conexión fallida, por favor intenta de nuevo',
|
|
641
|
+
't-agent.error.connection-closed': 'Conexión cerrada, por favor intenta de nuevo',
|
|
642
|
+
't-agent.error.event-exists': 'Excepción al enviar mensaje, por favor intenta más tarde',
|
|
643
|
+
't-agent.error.event-disposed': 'Excepción al enviar mensaje, por favor intenta más tarde',
|
|
644
|
+
't-agent.error.event-closed': 'Excepción al enviar mensaje, por favor intenta más tarde',
|
|
645
|
+
't-agent.error.event-aborted': 'Mensaje abortado',
|
|
646
|
+
't-agent.error.event-write-failed': 'Excepción al enviar mensaje, por favor intenta más tarde',
|
|
647
|
+
't-agent.error.event-no-data-code': 'Excepción al enviar mensaje, por favor intenta más tarde',
|
|
648
|
+
't-agent.error.stream-exists': 'Excepción al enviar mensaje, por favor intenta más tarde',
|
|
649
|
+
't-agent.error.timeout': 'Tiempo de envío agotado',
|
|
650
|
+
't-agent.error.asr-empty': 'El resultado del reconocimiento de voz está vacío'
|
|
481
651
|
},
|
|
482
652
|
it: {
|
|
483
653
|
't-agent.build-in.button.create_scene_manually': 'Crea scena manualmente',
|
|
@@ -541,6 +711,35 @@ export default {
|
|
|
541
711
|
't-agent.expand.scene.rename': '{oldName} rinominato in {newName}',
|
|
542
712
|
't-agent.expand.scene.one-click': 'Esegui in un clic',
|
|
543
713
|
't-agent.expand.scene.auto': 'Esegui automaticamente',
|
|
544
|
-
't-agent.expand.no.details': 'Nessun dettaglio disponibile'
|
|
714
|
+
't-agent.expand.no.details': 'Nessun dettaglio disponibile',
|
|
715
|
+
't-agent.input.asr.oninput.text.top': 'Sto ascoltando, per favore parla',
|
|
716
|
+
't-agent.input.asr.oninput.text.center': "Rilascia per inviare · Scorri verso l'alto per annullare",
|
|
717
|
+
't-agent.input.asr.ptt': 'Tieni premuto per parlare',
|
|
718
|
+
't-agent.input.asr.error.too-short': 'Tempo di parlato troppo breve',
|
|
719
|
+
't-agent.input.asr.error.empty': 'Nessun testo riconosciuto dalla voce',
|
|
720
|
+
't-agent.input.asr.error.unknown': 'Riconoscimento vocale fallito',
|
|
721
|
+
't-agent.input.asr.error.timeout': 'Il riconoscimento vocale ha raggiunto il limite di tempo, invio diretto',
|
|
722
|
+
't-agent.message.action.multiSelect': 'Selezione multipla',
|
|
723
|
+
't-agent.input.upload.source-type.camera': 'Scatta una foto',
|
|
724
|
+
't-agent.input.upload.source-type.camera.require-permission': "Scattare foto richiede l'autorizzazione della fotocamera, abilitala nelle impostazioni",
|
|
725
|
+
't-agent.input.upload.source-type.album': "Scegli dall'album",
|
|
726
|
+
't-agent.input.upload.source-type.album.require-permission': "La selezione dall'album richiede l'autorizzazione dell'album, abilitala nelle impostazioni",
|
|
727
|
+
't-agent.input.upload.image.max-reached': 'Limite di caricamento immagini raggiunto',
|
|
728
|
+
't-agent.input.upload.video.max-reached': 'Limite di caricamento video raggiunto',
|
|
729
|
+
't-agent.file-tile.unknown-filename': 'File',
|
|
730
|
+
't-agent.error.unknown-error': 'Errore sconosciuto',
|
|
731
|
+
't-agent.error.network-offline': 'Rete disconnessa, controlla la tua connessione',
|
|
732
|
+
't-agent.error.invalid-params': 'Parametri non validi, riprova',
|
|
733
|
+
't-agent.error.session-create-failed': 'Connessione fallita, riprova',
|
|
734
|
+
't-agent.error.connection-closed': 'Connessione chiusa, riprova',
|
|
735
|
+
't-agent.error.event-exists': "Eccezione nell'invio del messaggio, riprova più tardi",
|
|
736
|
+
't-agent.error.event-disposed': "Eccezione nell'invio del messaggio, riprova più tardi",
|
|
737
|
+
't-agent.error.event-closed': "Eccezione nell'invio del messaggio, riprova più tardi",
|
|
738
|
+
't-agent.error.event-aborted': 'Messaggio interrotto',
|
|
739
|
+
't-agent.error.event-write-failed': "Eccezione nell'invio del messaggio, riprova più tardi",
|
|
740
|
+
't-agent.error.event-no-data-code': "Eccezione nell'invio del messaggio, riprova più tardi",
|
|
741
|
+
't-agent.error.stream-exists': "Eccezione nell'invio del messaggio, riprova più tardi",
|
|
742
|
+
't-agent.error.timeout': 'Timeout di invio',
|
|
743
|
+
't-agent.error.asr-empty': 'Il risultato del riconoscimento vocale è vuoto'
|
|
545
744
|
}
|
|
546
745
|
};
|
package/dist/renderOption.js
CHANGED
|
@@ -12,6 +12,7 @@ import LowCodeCardRender from './LowCodeCardRender';
|
|
|
12
12
|
import { cardMap } from './cards/map';
|
|
13
13
|
import CustomCardRender from './CustomCardRender';
|
|
14
14
|
import LongPressActionMenu from './LongPressActionMenu';
|
|
15
|
+
import { translateWith } from './hooks';
|
|
15
16
|
const defaultChatTileAs = props => {
|
|
16
17
|
const {
|
|
17
18
|
tile
|
|
@@ -70,7 +71,14 @@ const defaultRenderCardAs = card => {
|
|
|
70
71
|
const defaultRenderLongPressAs = res => {
|
|
71
72
|
return /*#__PURE__*/React.createElement(LongPressActionMenu, res.menuProps);
|
|
72
73
|
};
|
|
74
|
+
const i18nTranslate = key => I18n.t(key);
|
|
73
75
|
export const defaultRenderOptions = {
|
|
76
|
+
formatErrorMessageAs: (message, code) => {
|
|
77
|
+
if (code) {
|
|
78
|
+
return translateWith("t-agent.error.".concat(code), i18nTranslate);
|
|
79
|
+
}
|
|
80
|
+
return message;
|
|
81
|
+
},
|
|
74
82
|
renderTileAs: defaultChatTileAs,
|
|
75
83
|
renderCustomBlockAs: defaultRenderCustomBlockAs,
|
|
76
84
|
customBlockTypes: defaultCustomBlockTypes,
|
|
@@ -14,7 +14,8 @@ import RollBack from '../WorkflowTile/RollBack';
|
|
|
14
14
|
const BubbleTile = props => {
|
|
15
15
|
var _workflowTile$data;
|
|
16
16
|
const {
|
|
17
|
-
renderLongPressAs
|
|
17
|
+
renderLongPressAs,
|
|
18
|
+
formatErrorMessageAs
|
|
18
19
|
} = useRenderOptions();
|
|
19
20
|
const {
|
|
20
21
|
message,
|
|
@@ -33,14 +34,6 @@ const BubbleTile = props => {
|
|
|
33
34
|
const bubbleStatus = data.status || BubbleTileStatus.NORMAL;
|
|
34
35
|
const t = useTranslate();
|
|
35
36
|
const loading = status === ChatMessageStatus.START || status === ChatMessageStatus.UPDATING;
|
|
36
|
-
const showInfo = () => {
|
|
37
|
-
if (data.info) {
|
|
38
|
-
ty.showToast({
|
|
39
|
-
title: data.info,
|
|
40
|
-
icon: 'none'
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
37
|
|
|
45
38
|
// 获取消息内容的函数
|
|
46
39
|
const getMessageContent = useCallback(() => {
|
|
@@ -66,10 +59,6 @@ const BubbleTile = props => {
|
|
|
66
59
|
disabled: loading
|
|
67
60
|
});
|
|
68
61
|
const longPressBlock = renderLongPressAs(longPressRes);
|
|
69
|
-
const showAbortedMessage = bubbleStatus === BubbleTileStatus.ABORTED;
|
|
70
|
-
const showRollBack = side === 'start' && children.some(child => child.type === 'workflow');
|
|
71
|
-
const workflowTile = children.find(child => child.type === 'workflow');
|
|
72
|
-
const workflowNode = workflowTile === null || workflowTile === void 0 || (_workflowTile$data = workflowTile.data) === null || _workflowTile$data === void 0 ? void 0 : _workflowTile$data.nodeId;
|
|
73
62
|
const isErrorBubble = useMemo(() => {
|
|
74
63
|
let empty = true;
|
|
75
64
|
for (const child of children) {
|
|
@@ -96,8 +85,20 @@ const BubbleTile = props => {
|
|
|
96
85
|
"data-testid": "t-agent-bubble-tile-error"
|
|
97
86
|
}), /*#__PURE__*/React.createElement(View, {
|
|
98
87
|
className: "t-agent-bubble-tile-error-alert-text"
|
|
99
|
-
}, data.info || t('t-agent.unknown-error')), longPressBlock);
|
|
88
|
+
}, formatErrorMessageAs(data.info, data.code) || t('t-agent.error.unknown-error')), longPressBlock);
|
|
100
89
|
}
|
|
90
|
+
const showInfo = () => {
|
|
91
|
+
if (data.info) {
|
|
92
|
+
ty.showToast({
|
|
93
|
+
title: formatErrorMessageAs(data.info, data.code),
|
|
94
|
+
icon: 'none'
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const showAbortedMessage = bubbleStatus === BubbleTileStatus.ABORTED;
|
|
99
|
+
const showRollBack = side === 'start' && children.some(child => child.type === 'workflow');
|
|
100
|
+
const workflowTile = children.find(child => child.type === 'workflow');
|
|
101
|
+
const workflowNode = workflowTile === null || workflowTile === void 0 || (_workflowTile$data = workflowTile.data) === null || _workflowTile$data === void 0 ? void 0 : _workflowTile$data.nodeId;
|
|
101
102
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
102
103
|
className: "t-agent-bubble-tile t-agent-bubble-tile-".concat(side),
|
|
103
104
|
"data-testid": "t-agent-bubble-tile"
|
package/dist/types.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface ChatCardComponentSetCardStateOptions {
|
|
|
68
68
|
}
|
|
69
69
|
export type ChatCardComponentSetCardState<S = any> = (state: S | ((prev: S | undefined) => S), options?: ChatCardComponentSetCardStateOptions) => void;
|
|
70
70
|
export interface RenderOptions {
|
|
71
|
+
formatErrorMessageAs: (message: string, code: string | undefined) => string;
|
|
71
72
|
renderTileAs: (props: TileProps) => React.ReactNode;
|
|
72
73
|
renderCustomBlockAs: (block: MarkdownBlock) => React.ReactNode;
|
|
73
74
|
renderCardAs: (card: ChatCardObject) => React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/t-agent-ui-ray",
|
|
3
|
-
"version": "0.2.0-beta
|
|
3
|
+
"version": "0.2.0-beta.0",
|
|
4
4
|
"author": "Tuya.inc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@types/echarts": "^4.9.22",
|
|
41
41
|
"@types/markdown-it": "^14.1.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0b5d552289721444563828b03a51a6e8695779db"
|
|
44
44
|
}
|