@xmanrui/dsh-im 5.10.0 → 5.11.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 +39 -5
- package/README.md +42 -5
- package/bin/dsh-im.mjs +65 -0
- package/docs/client-integration.md +4 -0
- package/lib/client.js +1202 -95
- package/lib/index.js +365 -339
- package/package.json +7 -6
- package/plugin-src/client/access-policy-settings.js +210 -12
- package/plugin-src/client/bot-general-settings.js +44 -3
- package/plugin-src/client/i18n-ru.js +85 -0
- package/plugin-src/client/i18n.js +83 -0
- package/plugin-src/client/im-channels.js +419 -0
- package/plugin-src/client/index.js +33 -1
- package/plugin-src/client/styles.js +7 -7
- package/plugin-src/client/update-panel.js +2 -1
- package/plugin-src/host/channel-list-rpc.mjs +280 -0
- package/plugin-src/host/channels/dingtalk/production.mjs +28 -10
- package/plugin-src/host/channels/dingtalk/rpc.mjs +10 -1
- package/plugin-src/host/channels/feishu/production.mjs +39 -10
- package/plugin-src/host/channels/feishu/rpc.mjs +10 -1
- package/plugin-src/host/channels/matrix/production.mjs +28 -10
- package/plugin-src/host/channels/matrix/rpc.mjs +10 -0
- package/plugin-src/host/channels/qq/production.mjs +30 -11
- package/plugin-src/host/channels/qq/rpc.mjs +10 -1
- package/plugin-src/host/channels/shared/access-policy-production.mjs +9 -0
- package/plugin-src/host/channels/shared/binding-events.mjs +109 -0
- package/plugin-src/host/channels/shared/production.mjs +14 -1
- package/plugin-src/host/channels/shared/reply-content-rpc.mjs +17 -0
- package/plugin-src/host/channels/shared/rpc.mjs +9 -0
- package/plugin-src/host/channels/slack/production.mjs +28 -10
- package/plugin-src/host/channels/slack/rpc.mjs +10 -0
- package/plugin-src/host/channels/telegram/production.mjs +5 -0
- package/plugin-src/host/channels/wecom/production.mjs +28 -10
- package/plugin-src/host/channels/wecom/rpc.mjs +10 -1
- package/plugin-src/host/channels/wecom-app/production.mjs +28 -10
- package/plugin-src/host/channels/wecom-app/rpc.mjs +9 -0
- package/plugin-src/host/channels/weixin/production.mjs +28 -10
- package/plugin-src/host/channels/weixin/rpc.mjs +10 -1
- package/plugin-src/host/channels/whatsapp/production.mjs +28 -10
- package/plugin-src/host/channels/whatsapp/rpc.mjs +10 -1
- package/plugin-src/host/delivery-service.mjs +3 -4
- package/plugin-src/host/delivery-suggestions.mjs +3 -1
- package/plugin-src/host/harness-connection.mjs +2 -1
- package/plugin-src/host/harness-peer.mjs +3 -1
- package/plugin-src/host/index.mjs +8 -1
- package/plugin-src/host/modern-harness-api.mjs +5 -1
- package/plugin-src/host/root-scope.mjs +32 -0
- package/plugin-src/host/session-sync-coordinator.mjs +2 -1
- package/plugin-src/management-rpc.mjs +18 -2
- package/scripts/verify-package.mjs +36 -7
- package/src/channels/dingtalk/dingtalk-bridge.mjs +50 -6
- package/src/channels/dingtalk/state-store.mjs +56 -0
- package/src/channels/discord/discord-api.mjs +2 -1
- package/src/channels/feishu/bridge.mjs +154 -58
- package/src/channels/feishu/feishu-cards.mjs +10 -4
- package/src/channels/feishu/feishu-runtime.mjs +11 -3
- package/src/channels/feishu/message-utils.mjs +106 -30
- package/src/channels/feishu/slash-command-panel.mjs +26 -0
- package/src/channels/feishu/state-store.mjs +14 -0
- package/src/channels/matrix/matrix-api.mjs +2 -1
- package/src/channels/qq/qq-bridge.mjs +105 -14
- package/src/channels/qq/state-store.mjs +13 -1
- package/src/channels/shared/access-policy.mjs +60 -7
- package/src/channels/shared/bot-workspace-store.mjs +155 -3
- package/src/channels/shared/busy-message-dispatcher.mjs +2 -2
- package/src/channels/shared/channel-capabilities.mjs +44 -0
- package/src/channels/shared/command-catalog.mjs +68 -3
- package/src/channels/shared/command-permission.mjs +6 -2
- package/src/channels/shared/conversation-state-store.mjs +16 -0
- package/src/channels/shared/deferred-delivery-coordinator.mjs +6 -1
- package/src/channels/shared/deferred-delivery.mjs +4 -0
- package/src/channels/shared/diagnostic-details.mjs +6 -1
- package/src/channels/shared/failure-log-file.mjs +79 -0
- package/src/channels/shared/harness-client.mjs +111 -6
- package/src/channels/shared/i18n-en/feishu.mjs +2 -2
- package/src/channels/shared/i18n-en/shared-a.mjs +13 -2
- package/src/channels/shared/i18n-en/shared-b.mjs +67 -4
- package/src/channels/shared/i18n-en/shared-d.mjs +144 -0
- package/src/channels/shared/i18n-en/weixin.mjs +4 -0
- package/src/channels/shared/i18n-en.mjs +2 -0
- package/src/channels/shared/i18n-ru/feishu.mjs +2 -2
- package/src/channels/shared/i18n-ru/shared-a.mjs +13 -2
- package/src/channels/shared/i18n-ru/shared-b.mjs +67 -4
- package/src/channels/shared/i18n-ru/shared-d.mjs +144 -0
- package/src/channels/shared/i18n-ru/weixin.mjs +4 -0
- package/src/channels/shared/i18n-ru.mjs +2 -0
- package/src/channels/shared/inbound-access.mjs +10 -0
- package/src/channels/shared/markdown-chunks.mjs +5 -0
- package/src/channels/shared/message-failure.mjs +22 -1
- package/src/channels/shared/new-command.mjs +158 -4
- package/src/channels/shared/plan-goal-command.mjs +132 -0
- package/src/channels/shared/qrcode.mjs +5 -0
- package/src/channels/shared/reply-content.mjs +102 -0
- package/src/channels/shared/reset-command.mjs +46 -0
- package/src/channels/shared/semantic/artifact.mjs +133 -29
- package/src/channels/shared/semantic/reply-reference.mjs +18 -3
- package/src/channels/shared/session-nav-command.mjs +999 -0
- package/src/channels/shared/session-ring-support.mjs +184 -0
- package/src/channels/shared/session-ring.mjs +202 -0
- package/src/channels/shared/session-title.mjs +11 -0
- package/src/channels/shared/status-command.mjs +2 -1
- package/src/channels/shared/text-harness-bridge.mjs +166 -7
- package/src/channels/shared/workspace-command.mjs +567 -31
- package/src/channels/shared/workspace-session.mjs +39 -3
- package/src/channels/slack/slack-api.mjs +2 -1
- package/src/channels/telegram/config-store.mjs +10 -2
- package/src/channels/telegram/telegram-rich-message.mjs +17 -5
- package/src/channels/telegram/telegram-runtime.mjs +14 -1
- package/src/channels/wecom/state-store.mjs +13 -1
- package/src/channels/wecom/wecom-bridge.mjs +183 -26
- package/src/channels/wecom-app/state-store.mjs +13 -1
- package/src/channels/wecom-app/wecom-app-bridge.mjs +44 -4
- package/src/channels/weixin/state-store.mjs +13 -1
- package/src/channels/weixin/weixin-bridge.mjs +71 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmanrui/dsh-im",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"icon": "./assets/logo-plugin-message-link-gradient.webp",
|
|
5
5
|
"description": "把微信、飞书、企微、钉钉、QQ、Telegram、WhatsApp、Slack、Discord、Matrix接入DSH。 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",
|
|
6
6
|
"keywords": [
|
|
@@ -81,18 +81,19 @@
|
|
|
81
81
|
"client": {
|
|
82
82
|
"inject": [
|
|
83
83
|
"@deepseek-ai/dsh-client-connection",
|
|
84
|
-
"@deepseek-ai/dsh-client-
|
|
84
|
+
"@deepseek-ai/dsh-client-locale",
|
|
85
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
85
86
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
86
|
-
"@deepseek-ai/dsh-client-ui-
|
|
87
|
-
"@deepseek-ai/dsh-client-locale"
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-workspace"
|
|
88
88
|
],
|
|
89
89
|
"platform": "web"
|
|
90
90
|
},
|
|
91
91
|
"compatibility": {
|
|
92
|
-
"dsh": "0.2.
|
|
92
|
+
"dsh": "0.2.2-rc.5",
|
|
93
93
|
"dshReleases": {
|
|
94
94
|
"0.2.0-rc.2": "compatible",
|
|
95
|
-
"0.2.1-rc.2": "compatible"
|
|
95
|
+
"0.2.1-rc.2": "compatible",
|
|
96
|
+
"0.2.2-rc.5": "compatible"
|
|
96
97
|
},
|
|
97
98
|
"profiles": [
|
|
98
99
|
"web"
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
normalizeAccessPolicy,
|
|
6
6
|
validateAccessPolicy,
|
|
7
7
|
} from '../../src/channels/shared/access-policy.mjs';
|
|
8
|
-
import { h, localizeText } from './i18n.js';
|
|
8
|
+
import { h, localizeText, localizeTemplate } from './i18n.js';
|
|
9
9
|
|
|
10
10
|
export const ACCESS_POLICY_ENDPOINT = 'bot.access-policy.set';
|
|
11
11
|
const CONFIRMED_OWNER_CHANNELS = new Set(['weixin', 'feishu', 'qq', 'whatsapp', 'discord']);
|
|
@@ -77,6 +77,37 @@ export const ACCESS_CHANNEL_DEFINITIONS = Object.freeze({
|
|
|
77
77
|
}),
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
+
const DEFAULT_COMMAND_ALLOWLIST = Object.freeze(['new', 'stop', 'help', 'status', 'compact', 'clear']);
|
|
81
|
+
|
|
82
|
+
const COMMAND_CHOICES = Object.freeze([
|
|
83
|
+
['new', '/new 新会话'],
|
|
84
|
+
['stop', '/stop 停止任务'],
|
|
85
|
+
['help', '/help 帮助'],
|
|
86
|
+
['status', '/status 连接状态'],
|
|
87
|
+
['compact', '/compact 压缩上下文'],
|
|
88
|
+
['clear', '/clear 清空上下文'],
|
|
89
|
+
['menu', '/m 或 /menu 菜单'],
|
|
90
|
+
['version', '/version 版本'],
|
|
91
|
+
['models', '/models 模型列表'],
|
|
92
|
+
['model', '/model 模型切换'],
|
|
93
|
+
['reasoninglist', '/reasonings 推理等级'],
|
|
94
|
+
['reasoning', '/reasoning 推理等级切换'],
|
|
95
|
+
['presetlist', '/presets 预设列表'],
|
|
96
|
+
['preset', '/preset 预设切换'],
|
|
97
|
+
['permissionlist', '/permissionlist 权限列表'],
|
|
98
|
+
['permission', '/permission 权限切换'],
|
|
99
|
+
['history', '/history 历史消息'],
|
|
100
|
+
['workspace', '/workspace 工作区'],
|
|
101
|
+
['workspacelist', '/workspaces 工作区列表'],
|
|
102
|
+
['sessionlist', '/sessionlist 会话列表'],
|
|
103
|
+
['session', '/session 绑定会话'],
|
|
104
|
+
['batch', '/batch 批量输入'],
|
|
105
|
+
['send', '/send 发送批量'],
|
|
106
|
+
['cancel', '/cancel 取消批量'],
|
|
107
|
+
['steer', '/steer 补充指令'],
|
|
108
|
+
['repair', '/repair 修复'],
|
|
109
|
+
]);
|
|
110
|
+
|
|
80
111
|
function clonePolicy(policy) {
|
|
81
112
|
const cloneScope = (scope) => ({
|
|
82
113
|
mode: scope.mode,
|
|
@@ -84,7 +115,9 @@ function clonePolicy(policy) {
|
|
|
84
115
|
defaultCanExecuteCommands: scope.open.defaultCanExecuteCommands,
|
|
85
116
|
commandPermissionOverrides: scope.open.commandPermissionOverrides.map((user) => ({
|
|
86
117
|
...user,
|
|
118
|
+
...(user.commandAllowlist === undefined ? {} : { commandAllowlist: [...user.commandAllowlist] }),
|
|
87
119
|
})),
|
|
120
|
+
...(scope.open.commandAllowlist === undefined ? {} : { commandAllowlist: [...scope.open.commandAllowlist] }),
|
|
88
121
|
},
|
|
89
122
|
allowlist: {
|
|
90
123
|
users: scope.allowlist.users.map((user) => ({ ...user })),
|
|
@@ -147,6 +180,41 @@ function ScenePolicyEditor({
|
|
|
147
180
|
const updateUser = (index, patch) => updateUsers(users.map((user, userIndex) => (
|
|
148
181
|
userIndex === index ? { ...user, ...patch } : user
|
|
149
182
|
)));
|
|
183
|
+
const [commandPickerOpen, setCommandPickerOpen] = React.useState(false);
|
|
184
|
+
const [commandQuery, setCommandQuery] = React.useState('');
|
|
185
|
+
const commandMode = policy.open.defaultCanExecuteCommands
|
|
186
|
+
? 'allow'
|
|
187
|
+
: (policy.open.commandAllowlist?.length ? 'custom' : 'deny');
|
|
188
|
+
const allowedCommands = new Set(policy.open.commandAllowlist ?? []);
|
|
189
|
+
const updateOpen = (patch) => onChange({
|
|
190
|
+
...policy,
|
|
191
|
+
open: { ...policy.open, ...patch },
|
|
192
|
+
});
|
|
193
|
+
const changeCommandMode = (nextMode) => {
|
|
194
|
+
if (nextMode === 'allow') {
|
|
195
|
+
updateOpen({ defaultCanExecuteCommands: true, commandAllowlist: undefined });
|
|
196
|
+
setCommandPickerOpen(false);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (nextMode === 'custom') {
|
|
200
|
+
updateOpen({
|
|
201
|
+
defaultCanExecuteCommands: false,
|
|
202
|
+
commandAllowlist: policy.open.commandAllowlist?.length
|
|
203
|
+
? [...policy.open.commandAllowlist]
|
|
204
|
+
: [...DEFAULT_COMMAND_ALLOWLIST],
|
|
205
|
+
});
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
updateOpen({ defaultCanExecuteCommands: false, commandAllowlist: undefined });
|
|
209
|
+
setCommandPickerOpen(false);
|
|
210
|
+
};
|
|
211
|
+
const toggleCommand = (name, checked) => {
|
|
212
|
+
const next = new Set(allowedCommands);
|
|
213
|
+
if (checked) next.add(name);
|
|
214
|
+
else if (next.size > 1) next.delete(name);
|
|
215
|
+
else return;
|
|
216
|
+
updateOpen({ commandAllowlist: [...next] });
|
|
217
|
+
};
|
|
150
218
|
|
|
151
219
|
return h('fieldset', {
|
|
152
220
|
className: 'dim-accessScene',
|
|
@@ -184,21 +252,151 @@ function ScenePolicyEditor({
|
|
|
184
252
|
},
|
|
185
253
|
h('option', { value: 'open' }, '允许所有用户'),
|
|
186
254
|
h('option', { value: 'allowlist' }, '仅白名单用户'))),
|
|
187
|
-
allowlist ? null : h(
|
|
188
|
-
|
|
255
|
+
allowlist ? null : h(React.Fragment, null,
|
|
256
|
+
h('label', { className: 'dim-accessField' },
|
|
257
|
+
h('span', null, '命令权限'),
|
|
189
258
|
h('select', {
|
|
190
|
-
value:
|
|
259
|
+
value: commandMode,
|
|
191
260
|
'aria-label': [localizeText(title), localizeText('默认命令权限')].join(' '),
|
|
192
|
-
onChange: (event) =>
|
|
193
|
-
...policy,
|
|
194
|
-
open: {
|
|
195
|
-
...policy.open,
|
|
196
|
-
defaultCanExecuteCommands: commandValue(event.target.value),
|
|
197
|
-
},
|
|
198
|
-
}),
|
|
261
|
+
onChange: (event) => changeCommandMode(event.target.value),
|
|
199
262
|
},
|
|
263
|
+
h('option', { value: 'deny' }, '不能执行命令'),
|
|
200
264
|
h('option', { value: 'allow' }, '可以执行命令'),
|
|
201
|
-
h('option', { value: '
|
|
265
|
+
h('option', { value: 'custom' }, '可以执行指定的命令'))),
|
|
266
|
+
commandMode !== 'custom' ? null : h('div', {
|
|
267
|
+
className: 'dim-accessField dim-accessCommandPicker',
|
|
268
|
+
style: { position: 'relative' },
|
|
269
|
+
},
|
|
270
|
+
h('button', {
|
|
271
|
+
type: 'button',
|
|
272
|
+
className: 'dim-deliveryButton',
|
|
273
|
+
'aria-expanded': commandPickerOpen,
|
|
274
|
+
onClick: () => setCommandPickerOpen((value) => !value),
|
|
275
|
+
}, localizeTemplate('选择命令({count})', { count: allowedCommands.size })),
|
|
276
|
+
commandPickerOpen ? h('div', {
|
|
277
|
+
role: 'presentation',
|
|
278
|
+
style: {
|
|
279
|
+
position: 'fixed', inset: 0, zIndex: 1000,
|
|
280
|
+
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
281
|
+
padding: 24, background: 'rgba(0, 0, 0, 0.42)',
|
|
282
|
+
},
|
|
283
|
+
onClick: () => setCommandPickerOpen(false),
|
|
284
|
+
},
|
|
285
|
+
h('div', {
|
|
286
|
+
role: 'dialog',
|
|
287
|
+
'aria-modal': 'true',
|
|
288
|
+
'aria-label': '选择允许的命令',
|
|
289
|
+
onClick: (event) => event.stopPropagation(),
|
|
290
|
+
style: {
|
|
291
|
+
width: 'min(560px, 100%)',
|
|
292
|
+
maxHeight: 'min(680px, calc(100vh - 48px))',
|
|
293
|
+
display: 'flex', flexDirection: 'column', gap: 12,
|
|
294
|
+
padding: 20, borderRadius: 14,
|
|
295
|
+
border: '1px solid var(--dsw-alias-border-l1)',
|
|
296
|
+
background: 'var(--dsw-alias-bg-overlay)',
|
|
297
|
+
color: 'var(--dsw-alias-label-primary)',
|
|
298
|
+
boxShadow: '0 24px 64px rgba(0, 0, 0, 0.38)',
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
h('div', { style: { display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 12 } },
|
|
302
|
+
h('div', null,
|
|
303
|
+
h('strong', { style: { fontSize: 15 } }, '选择允许的命令'),
|
|
304
|
+
h('p', { style: { margin: '4px 0 0', fontSize: 12, lineHeight: 1.5, color: 'var(--dsw-alias-label-secondary)' } },
|
|
305
|
+
'默认勾选 new、stop、help、status、compact、clear。')),
|
|
306
|
+
h('button', {
|
|
307
|
+
type: 'button',
|
|
308
|
+
'aria-label': '关闭',
|
|
309
|
+
onClick: () => setCommandPickerOpen(false),
|
|
310
|
+
style: {
|
|
311
|
+
flex: '0 0 auto', width: 28, height: 28, padding: 0,
|
|
312
|
+
border: '1px solid var(--dsw-alias-border-l1)', borderRadius: 7,
|
|
313
|
+
background: 'transparent', color: 'var(--dsw-alias-label-secondary)',
|
|
314
|
+
cursor: 'pointer', fontSize: 16, lineHeight: '24px',
|
|
315
|
+
},
|
|
316
|
+
}, '×')),
|
|
317
|
+
h('input', {
|
|
318
|
+
type: 'search',
|
|
319
|
+
value: commandQuery,
|
|
320
|
+
placeholder: '搜索命令…',
|
|
321
|
+
'aria-label': '搜索命令',
|
|
322
|
+
onChange: (event) => setCommandQuery(event.target.value),
|
|
323
|
+
style: {
|
|
324
|
+
width: '100%', boxSizing: 'border-box', padding: '8px 10px',
|
|
325
|
+
border: '1px solid var(--dsw-alias-border-l1)', borderRadius: 8,
|
|
326
|
+
background: 'var(--dsw-alias-bg-base)', color: 'var(--dsw-alias-label-primary)',
|
|
327
|
+
fontSize: 12,
|
|
328
|
+
},
|
|
329
|
+
}),
|
|
330
|
+
h('div', {
|
|
331
|
+
style: {
|
|
332
|
+
display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
|
|
333
|
+
gap: 4, overflow: 'auto', paddingRight: 4,
|
|
334
|
+
flex: '1 1 auto', minHeight: 0,
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
COMMAND_CHOICES
|
|
338
|
+
.filter(([name, label]) => {
|
|
339
|
+
const query = commandQuery.trim().toLowerCase();
|
|
340
|
+
return !query || name.includes(query) || label.toLowerCase().includes(query);
|
|
341
|
+
})
|
|
342
|
+
.map(([name, label]) => {
|
|
343
|
+
const checked = allowedCommands.has(name);
|
|
344
|
+
return h('button', {
|
|
345
|
+
key: name,
|
|
346
|
+
type: 'button',
|
|
347
|
+
role: 'checkbox',
|
|
348
|
+
'aria-checked': checked,
|
|
349
|
+
onClick: () => toggleCommand(name, !checked),
|
|
350
|
+
style: {
|
|
351
|
+
display: 'flex', alignItems: 'center', gap: 8,
|
|
352
|
+
minWidth: 0, padding: '6px 8px', borderRadius: 6,
|
|
353
|
+
cursor: 'pointer', fontSize: 12, textAlign: 'left',
|
|
354
|
+
color: 'inherit',
|
|
355
|
+
border: checked ? '1px solid var(--dsw-alias-brand-primary)' : '1px solid transparent',
|
|
356
|
+
background: checked ? 'var(--dsw-alias-bg-layer-2)' : 'transparent',
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
h('span', {
|
|
360
|
+
style: {
|
|
361
|
+
flex: '0 0 16px', width: 16, height: 16, lineHeight: '16px',
|
|
362
|
+
textAlign: 'center', borderRadius: 4, fontSize: 11,
|
|
363
|
+
color: checked ? '#fff' : 'transparent',
|
|
364
|
+
background: checked ? 'var(--dsw-alias-brand-primary)' : 'transparent',
|
|
365
|
+
border: checked ? 'none' : '1px solid var(--dsw-alias-border-l2)',
|
|
366
|
+
},
|
|
367
|
+
}, '✓'),
|
|
368
|
+
h('span', {
|
|
369
|
+
style: { overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' },
|
|
370
|
+
}, label));
|
|
371
|
+
})),
|
|
372
|
+
|
|
373
|
+
h('div', {
|
|
374
|
+
style: {
|
|
375
|
+
display: 'flex', alignItems: 'center', justifyContent: 'space-between',
|
|
376
|
+
gap: 8, paddingTop: 4,
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
h('span', { style: { fontSize: 12, color: 'var(--dsw-alias-label-secondary)' } },
|
|
380
|
+
localizeTemplate('已选 {count} 项', { count: allowedCommands.size })),
|
|
381
|
+
h('div', { style: { display: 'flex', gap: 8 } },
|
|
382
|
+
h('button', {
|
|
383
|
+
type: 'button',
|
|
384
|
+
className: 'dim-deliveryButton',
|
|
385
|
+
onClick: () => updateOpen({ commandAllowlist: [...DEFAULT_COMMAND_ALLOWLIST] }),
|
|
386
|
+
}, '恢复默认'),
|
|
387
|
+
h('button', {
|
|
388
|
+
type: 'button',
|
|
389
|
+
className: 'dim-deliveryButton',
|
|
390
|
+
onClick: () => updateOpen({ commandAllowlist: COMMAND_CHOICES.map(([name]) => name) }),
|
|
391
|
+
}, '全部命令'),
|
|
392
|
+
h('button', {
|
|
393
|
+
type: 'button',
|
|
394
|
+
className: 'dim-deliveryButton',
|
|
395
|
+
'data-kind': 'primary',
|
|
396
|
+
onClick: () => setCommandPickerOpen(false),
|
|
397
|
+
}, '完成'))))) : null)
|
|
398
|
+
|
|
399
|
+
)),
|
|
202
400
|
h('div', { className: 'dim-accessUsers' },
|
|
203
401
|
h('div', { className: 'dim-accessUsersHeading' },
|
|
204
402
|
h('div', { className: 'dim-accessUsersTitle' },
|
|
@@ -2,8 +2,19 @@ import * as React from 'react';
|
|
|
2
2
|
import { h } from './i18n.js';
|
|
3
3
|
import { SET_MESSAGE_MODE_ENDPOINT, normalizeBusyMessageMode } from '../../src/channels/shared/message-mode.mjs';
|
|
4
4
|
import { normalizeFeishuStepCardPanels } from '../../src/channels/feishu/step-push-mode.mjs';
|
|
5
|
+
import {
|
|
6
|
+
normalizeReplyContent,
|
|
7
|
+
SET_REPLY_CONTENT_ENDPOINT,
|
|
8
|
+
} from '../../src/channels/shared/reply-content.mjs';
|
|
5
9
|
import { FEISHU_ENDPOINTS } from './channels/feishu/api.js';
|
|
6
10
|
|
|
11
|
+
/** The three switches every channel shares, in the order they are shown. */
|
|
12
|
+
const REPLY_CONTENT_ROWS = Object.freeze([
|
|
13
|
+
['narration', '过程正文', '正在执行时助手的说明文字'],
|
|
14
|
+
['tools', '工具步骤', '工具调用、结果与失败提示'],
|
|
15
|
+
['thinking', '思考过程', '模型的推理过程(渠道支持时)'],
|
|
16
|
+
]);
|
|
17
|
+
|
|
7
18
|
function settingsFromResult(result, botId) {
|
|
8
19
|
if (result?.ok !== true) throw new Error(result?.error?.message || '无法读取通用设置,请稍后重试。');
|
|
9
20
|
const bot = result.value?.bots?.find((entry) => entry.botId === botId);
|
|
@@ -11,13 +22,22 @@ function settingsFromResult(result, botId) {
|
|
|
11
22
|
return {
|
|
12
23
|
busyMessageMode: normalizeBusyMessageMode(bot.busyMessageMode),
|
|
13
24
|
stepCardPanels: normalizeFeishuStepCardPanels(bot.stepCardPanels),
|
|
25
|
+
replyContent: normalizeReplyContent(bot.replyContent),
|
|
14
26
|
};
|
|
15
27
|
}
|
|
16
28
|
|
|
29
|
+
const SAVE_ENDPOINTS = Object.freeze({
|
|
30
|
+
busyMessageMode: SET_MESSAGE_MODE_ENDPOINT,
|
|
31
|
+
stepCardPanels: FEISHU_ENDPOINTS.setStepCardPanels,
|
|
32
|
+
replyContent: SET_REPLY_CONTENT_ENDPOINT,
|
|
33
|
+
});
|
|
34
|
+
|
|
17
35
|
export function BotGeneralSettingsPage({ channel, account, rpcCall }) {
|
|
18
36
|
const modeId = React.useId();
|
|
19
37
|
const [settings, setSettings] = React.useState(() => ({
|
|
20
|
-
busyMessageMode: 'queue',
|
|
38
|
+
busyMessageMode: 'queue',
|
|
39
|
+
stepCardPanels: normalizeFeishuStepCardPanels(),
|
|
40
|
+
replyContent: normalizeReplyContent(),
|
|
21
41
|
}));
|
|
22
42
|
const [savedSettings, setSavedSettings] = React.useState(null);
|
|
23
43
|
const [busy, setBusy] = React.useState(false);
|
|
@@ -57,8 +77,7 @@ export function BotGeneralSettingsPage({ channel, account, rpcCall }) {
|
|
|
57
77
|
setBusy(true);
|
|
58
78
|
setFeedback(null);
|
|
59
79
|
try {
|
|
60
|
-
const
|
|
61
|
-
const saved = settingsFromResult(await rpcCall(endpoint, {
|
|
80
|
+
const saved = settingsFromResult(await rpcCall(SAVE_ENDPOINTS[field], {
|
|
62
81
|
botId: account.botId, [field]: value,
|
|
63
82
|
}), account.botId);
|
|
64
83
|
if (!mounted.current) return;
|
|
@@ -94,6 +113,28 @@ export function BotGeneralSettingsPage({ channel, account, rpcCall }) {
|
|
|
94
113
|
h('option', { value: 'steer' }, '插话')),
|
|
95
114
|
h('svg', { width: 14, height: 14, viewBox: '0 0 16 16', fill: 'none', 'aria-hidden': true },
|
|
96
115
|
h('path', { d: 'm4 6 4 4 4-4', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round', strokeLinejoin: 'round' })))),
|
|
116
|
+
h('div', { className: 'dim-botGeneralRow dim-botGeneralPanelRow' },
|
|
117
|
+
h('div', { className: 'dim-botGeneralText' },
|
|
118
|
+
h('label', { className: 'dim-botGeneralTitle', htmlFor: `${modeId}-reply-content` }, '投递内容'),
|
|
119
|
+
h('p', {
|
|
120
|
+
className: 'dim-botGeneralHelp',
|
|
121
|
+
id: `${modeId}-reply-content-description`,
|
|
122
|
+
}, '最终回答始终发送;关闭的项不再推送。'))),
|
|
123
|
+
...REPLY_CONTENT_ROWS.map(([field, label, help]) => h('div', {
|
|
124
|
+
key: field, className: 'dim-botGeneralRow dim-botGeneralPanelRow',
|
|
125
|
+
},
|
|
126
|
+
h('div', { className: 'dim-botGeneralText' },
|
|
127
|
+
h('label', { className: 'dim-botGeneralTitle', htmlFor: `${modeId}-${field}` }, label),
|
|
128
|
+
h('p', { className: 'dim-botGeneralHelp' }, help)),
|
|
129
|
+
h('div', { className: 'dim-botGeneralControl' },
|
|
130
|
+
h('input', {
|
|
131
|
+
id: `${modeId}-${field}`, type: 'checkbox', role: 'switch', className: 'dim-contextSwitch',
|
|
132
|
+
checked: settings.replyContent[field], disabled: busy || savedSettings === null,
|
|
133
|
+
'aria-label': label, 'aria-describedby': `${modeId}-reply-content-description`,
|
|
134
|
+
onChange: (event) => void save('replyContent', {
|
|
135
|
+
...settings.replyContent, [field]: event.target.checked,
|
|
136
|
+
}),
|
|
137
|
+
})))),
|
|
97
138
|
channel === 'feishu' ? [
|
|
98
139
|
['thinkingExpanded', '展开思考过程'],
|
|
99
140
|
['toolsExpanded', '展开工具摘要'],
|
|
@@ -89,10 +89,47 @@ const COMPOSED = Object.freeze({
|
|
|
89
89
|
'状态刷新失败:{error}': 'Не удалось обновить состояние: {error}',
|
|
90
90
|
'状态自动刷新失败:{error}': 'Не удалось обновить состояние автоматически: {error}',
|
|
91
91
|
'请输入 -1、0 或 1~{max} 之间的整数。': 'Введите -1, 0 или целое число от 1 до {max}.',
|
|
92
|
+
'查看会话 {sessionId}': 'Открыть сеанс {sessionId}',
|
|
93
|
+
'复制会话 ID {sessionId}': 'Скопировать ID сеанса {sessionId}',
|
|
94
|
+
'{count} 个会话': 'Сеансов: {count}',
|
|
95
|
+
'事件 {seq}': 'Событие {seq}',
|
|
96
|
+
'读取失败:{error}': 'Не удалось прочитать сеанс: {error}',
|
|
97
|
+
'已显示 {shown} / {total} 条正文': 'Показано сообщений: {shown} / {total}',
|
|
98
|
+
'加载失败:{error}': 'Не удалось загрузить сеансы каналов: {error}',
|
|
92
99
|
});
|
|
93
100
|
|
|
94
101
|
const CLIENT = Object.freeze({
|
|
95
102
|
...COMPOSED,
|
|
103
|
+
// Read-only channel session directory and transcript viewer.
|
|
104
|
+
'微信客服': 'Служба поддержки WeChat',
|
|
105
|
+
'浏览器未允许访问剪贴板': 'Браузер не разрешил доступ к буферу обмена',
|
|
106
|
+
'宿主响应缺少 value.channels,请检查 dsh-im host 是否已重载': 'В ответе Host нет value.channels. Проверьте, перезагружен ли dsh-im host',
|
|
107
|
+
'宿主响应缺少 value.messages,请检查 dsh-im host 是否已重载': 'В ответе Host нет value.messages. Проверьте, перезагружен ли dsh-im host',
|
|
108
|
+
'宿主响应缺少 value.messages': 'В ответе Host нет value.messages',
|
|
109
|
+
'查看该会话的用户与助手正文': 'Показать сообщения пользователя и ассистента в этом сеансе',
|
|
110
|
+
'复制失败': 'Не удалось скопировать',
|
|
111
|
+
'复制 ID': 'Скопировать ID',
|
|
112
|
+
'通道 / 会话键': 'Канал / ключ беседы',
|
|
113
|
+
'DSH 会话 ID': 'ID сеанса DSH',
|
|
114
|
+
'操作': 'Действия',
|
|
115
|
+
'助手': 'Ассистент',
|
|
116
|
+
'本条消息过长,已截断。': 'Сообщение слишком длинное и было обрезано.',
|
|
117
|
+
'会话内容': 'Содержимое сеанса',
|
|
118
|
+
'只读显示用户与助手正文;系统提示、工具调用和内部推理不显示。': 'Показываются только сообщения пользователя и ассистента. Системные подсказки, вызовы инструментов и внутренние рассуждения скрыты.',
|
|
119
|
+
'返回列表': 'Вернуться к списку',
|
|
120
|
+
'加载更早消息': 'Загрузить более ранние сообщения',
|
|
121
|
+
'加载中…': 'Загрузка…',
|
|
122
|
+
'没有可显示的用户或助手正文。': 'Нет сообщений пользователя или ассистента для отображения.',
|
|
123
|
+
'会话记录': 'История сеансов',
|
|
124
|
+
'返回 IM机器人': 'Назад к IM-ботам',
|
|
125
|
+
'只读列出各 IM 通道当前绑定的 DSH 会话;点击会话 ID 查看正文,不会修改绑定。': 'Список сеансов DSH, привязанных к каналам IM, доступен только для чтения. Нажмите ID сеанса, чтобы просмотреть сообщения; привязка не изменится.',
|
|
126
|
+
'正在读取通道会话…': 'Загружаем сеансы каналов…',
|
|
127
|
+
'尚未发现已绑定 DSH 会话的通道。': 'Каналы с привязанными сеансами DSH не найдены.',
|
|
128
|
+
'limit 或 offset 参数无效': 'Некорректные параметры limit или offset',
|
|
129
|
+
'该会话不属于指定通道绑定,可能已解绑': 'Сеанс не принадлежит указанной привязке канала; возможно, он был отвязан',
|
|
130
|
+
'宿主 sessionQuery 服务尚未就绪': 'Служба sessionQuery на Host ещё не готова',
|
|
131
|
+
'该会话暂时无法读取,请稍后重试。': 'Сеанс временно недоступен для чтения. Попробуйте позже.',
|
|
132
|
+
|
|
96
133
|
// Settings shell: sidebar entry, group history, group policy, bot aliases.
|
|
97
134
|
'侧边栏入口': 'Пункт в боковой панели',
|
|
98
135
|
'自动模式:未配置渠道时显示,配置至少一个渠道后隐藏。隐藏后仍可从插件详情或设置进入,不影响机器人后台运行。':
|
|
@@ -177,6 +214,44 @@ const CLIENT = Object.freeze({
|
|
|
177
214
|
'机器人设置页签': 'Вкладки настроек бота',
|
|
178
215
|
'投递设置': 'Доставка',
|
|
179
216
|
'访问设置': 'Доступ',
|
|
217
|
+
'不能执行命令': 'Нельзя выполнять команды',
|
|
218
|
+
'可以执行指定的命令': 'Можно выполнять указанные команды',
|
|
219
|
+
'选择命令({count})': 'Выбрать команды ({count})',
|
|
220
|
+
'选择允许的命令': 'Выберите разрешённые команды',
|
|
221
|
+
'默认勾选 new、stop、help、status、compact、clear。': 'По умолчанию выбраны new, stop, help, status, compact, clear.',
|
|
222
|
+
'搜索命令…': 'Поиск команд…',
|
|
223
|
+
'搜索命令': 'Поиск команд',
|
|
224
|
+
'已选 {count} 项': 'Выбрано: {count}',
|
|
225
|
+
'恢复默认': 'Восстановить по умолчанию',
|
|
226
|
+
'全部命令': 'Все команды',
|
|
227
|
+
'完成': 'Готово',
|
|
228
|
+
'/new 新会话': '/new Новый сеанс',
|
|
229
|
+
'/stop 停止任务': '/stop Остановить задачу',
|
|
230
|
+
'/help 帮助': '/help Справка',
|
|
231
|
+
'/status 连接状态': '/status Состояние подключения',
|
|
232
|
+
'/compact 压缩上下文': '/compact Сжать контекст',
|
|
233
|
+
'/clear 清空上下文': '/clear Очистить контекст',
|
|
234
|
+
'/m 或 /menu 菜单': '/m или /menu Меню',
|
|
235
|
+
'/version 版本': '/version Версия',
|
|
236
|
+
'/models 模型列表': '/models Список моделей',
|
|
237
|
+
'/model 模型切换': '/model Сменить модель',
|
|
238
|
+
'/reasonings 推理等级': '/reasonings Уровни рассуждения',
|
|
239
|
+
'/reasoning 推理等级切换': '/reasoning Сменить уровень рассуждения',
|
|
240
|
+
'/presets 预设列表': '/presets Список пресетов',
|
|
241
|
+
'/preset 预设切换': '/preset Сменить пресет',
|
|
242
|
+
'/permissionlist 权限列表': '/permissionlist Список прав',
|
|
243
|
+
'/permission 权限切换': '/permission Сменить права',
|
|
244
|
+
'/history 历史消息': '/history История сообщений',
|
|
245
|
+
'/workspace 工作区': '/workspace Рабочая область',
|
|
246
|
+
'/workspaces 工作区列表': '/workspaces Список рабочих областей',
|
|
247
|
+
'/sessionlist 会话列表': '/sessionlist Список сеансов',
|
|
248
|
+
'/session 绑定会话': '/session Привязать сеанс',
|
|
249
|
+
'/batch 批量输入': '/batch Пакетный ввод',
|
|
250
|
+
'/send 发送批量': '/send Отправить пакет',
|
|
251
|
+
'/cancel 取消批量': '/cancel Отменить пакет',
|
|
252
|
+
'/steer 补充指令': '/steer Добавить инструкцию',
|
|
253
|
+
'/repair 修复': '/repair Исправить',
|
|
254
|
+
|
|
180
255
|
'查看访问权限说明': 'Показать описание прав доступа',
|
|
181
256
|
'允许所有用户': 'Все пользователи',
|
|
182
257
|
'仅白名单用户': 'Только пользователи из списка',
|
|
@@ -1312,6 +1387,15 @@ const CLIENT = Object.freeze({
|
|
|
1312
1387
|
'将新消息补充到当前任务': 'Добавлять новые сообщения в текущую задачу',
|
|
1313
1388
|
'无法读取消息处理设置,请稍后重试。': 'Не удалось прочитать настройку обработки сообщений. Попробуйте позже.',
|
|
1314
1389
|
'请提交有效的消息处理方式。': 'Выберите корректный способ обработки сообщений.',
|
|
1390
|
+
'投递内容': 'Содержимое ответа',
|
|
1391
|
+
'过程正文': 'Текст процесса',
|
|
1392
|
+
'工具步骤': 'Шаги инструментов',
|
|
1393
|
+
'思考过程': 'Рассуждения',
|
|
1394
|
+
'最终回答始终发送;关闭的项不再推送。': 'Итоговый ответ отправляется всегда; выключенные части не отправляются.',
|
|
1395
|
+
'正在执行时助手的说明文字': 'Пояснения ассистента во время работы',
|
|
1396
|
+
'工具调用、结果与失败提示': 'Вызовы инструментов, результаты и ошибки',
|
|
1397
|
+
'模型的推理过程(渠道支持时)': 'Рассуждения модели, если канал их показывает',
|
|
1398
|
+
'请选择要投递的回复内容。': 'Выберите, какие части ответа доставлять.',
|
|
1315
1399
|
'通用设置': 'Общие настройки',
|
|
1316
1400
|
'通用设置分类': 'Разделы общих настроек',
|
|
1317
1401
|
'附件': 'Вложения',
|
|
@@ -1484,6 +1568,7 @@ const CLIENT = Object.freeze({
|
|
|
1484
1568
|
'dsh-im 4.25.0 支持到 DSH v0.1.6-alpha.2。': 'dsh-im 4.25.0 поддерживает DSH до v0.1.6-alpha.2.',
|
|
1485
1569
|
'dsh-im 4.39.0 仅支持 DSH 0.2.0-rc.2。': 'dsh-im 4.39.0 поддерживает только DSH 0.2.0-rc.2.',
|
|
1486
1570
|
'dsh-im 5.0.0 仅支持 DSH 0.2.1-rc.2。': 'dsh-im 5.0.0 поддерживает только DSH 0.2.1-rc.2.',
|
|
1571
|
+
'dsh-im 5.10.0 起支持 DSH 0.2.2-rc.5。': 'dsh-im 5.10.0 и новее поддерживают DSH 0.2.2-rc.5.',
|
|
1487
1572
|
'重新检查': 'Проверить снова',
|
|
1488
1573
|
'刷新状态': 'Обновить состояние',
|
|
1489
1574
|
'手工更新': 'Ручное обновление',
|
|
@@ -58,6 +58,13 @@ const COMPOSED = Object.freeze({
|
|
|
58
58
|
'状态刷新失败:{error}': 'Status refresh failed: {error}',
|
|
59
59
|
'状态自动刷新失败:{error}': 'Automatic status refresh failed: {error}',
|
|
60
60
|
'请输入 -1、0 或 1~{max} 之间的整数。': 'Enter -1, 0, or an integer from 1 to {max}.',
|
|
61
|
+
'查看会话 {sessionId}': 'View session {sessionId}',
|
|
62
|
+
'复制会话 ID {sessionId}': 'Copy session ID {sessionId}',
|
|
63
|
+
'{count} 个会话': '{count} sessions',
|
|
64
|
+
'事件 {seq}': 'Event {seq}',
|
|
65
|
+
'读取失败:{error}': 'Could not read the session: {error}',
|
|
66
|
+
'已显示 {shown} / {total} 条正文': 'Showing {shown} / {total} messages',
|
|
67
|
+
'加载失败:{error}': 'Could not load channel sessions: {error}',
|
|
61
68
|
});
|
|
62
69
|
|
|
63
70
|
const EN = Object.freeze({
|
|
@@ -210,6 +217,44 @@ const EN = Object.freeze({
|
|
|
210
217
|
'无法解析该群聊,请重试或填写数字群 ID。': 'Could not resolve this group. Try again or enter the numeric group ID.',
|
|
211
218
|
'该群已在列表中,请编辑上方的卡片。': 'This group is already in the list. Edit its card above instead.',
|
|
212
219
|
'访问设置': 'Access settings',
|
|
220
|
+
'不能执行命令': 'Cannot run commands',
|
|
221
|
+
'可以执行指定的命令': 'Can run specified commands',
|
|
222
|
+
'选择命令({count})': 'Choose commands ({count})',
|
|
223
|
+
'选择允许的命令': 'Choose allowed commands',
|
|
224
|
+
'默认勾选 new、stop、help、status、compact、clear。': 'By default, new, stop, help, status, compact, and clear are selected.',
|
|
225
|
+
'搜索命令…': 'Search commands…',
|
|
226
|
+
'搜索命令': 'Search commands',
|
|
227
|
+
'已选 {count} 项': '{count} selected',
|
|
228
|
+
'恢复默认': 'Restore defaults',
|
|
229
|
+
'全部命令': 'All commands',
|
|
230
|
+
'完成': 'Done',
|
|
231
|
+
'/new 新会话': '/new New session',
|
|
232
|
+
'/stop 停止任务': '/stop Stop task',
|
|
233
|
+
'/help 帮助': '/help Help',
|
|
234
|
+
'/status 连接状态': '/status Connection status',
|
|
235
|
+
'/compact 压缩上下文': '/compact Compact context',
|
|
236
|
+
'/clear 清空上下文': '/clear Clear context',
|
|
237
|
+
'/m 或 /menu 菜单': '/m or /menu Menu',
|
|
238
|
+
'/version 版本': '/version Version',
|
|
239
|
+
'/models 模型列表': '/models Model list',
|
|
240
|
+
'/model 模型切换': '/model Switch model',
|
|
241
|
+
'/reasonings 推理等级': '/reasonings Reasoning levels',
|
|
242
|
+
'/reasoning 推理等级切换': '/reasoning Switch reasoning level',
|
|
243
|
+
'/presets 预设列表': '/presets Preset list',
|
|
244
|
+
'/preset 预设切换': '/preset Switch preset',
|
|
245
|
+
'/permissionlist 权限列表': '/permissionlist Permission list',
|
|
246
|
+
'/permission 权限切换': '/permission Switch permission',
|
|
247
|
+
'/history 历史消息': '/history Message history',
|
|
248
|
+
'/workspace 工作区': '/workspace Workspace',
|
|
249
|
+
'/workspaces 工作区列表': '/workspaces Workspace list',
|
|
250
|
+
'/sessionlist 会话列表': '/sessionlist Session list',
|
|
251
|
+
'/session 绑定会话': '/session Bind session',
|
|
252
|
+
'/batch 批量输入': '/batch Batch input',
|
|
253
|
+
'/send 发送批量': '/send Send batch',
|
|
254
|
+
'/cancel 取消批量': '/cancel Cancel batch',
|
|
255
|
+
'/steer 补充指令': '/steer Add instruction',
|
|
256
|
+
'/repair 修复': '/repair Repair',
|
|
257
|
+
|
|
213
258
|
'查看访问权限说明': 'View access permission details',
|
|
214
259
|
'允许所有用户': 'Allow all users',
|
|
215
260
|
'仅白名单用户': 'Allowlisted users only',
|
|
@@ -276,6 +321,7 @@ const EN = Object.freeze({
|
|
|
276
321
|
'dsh-im 4.25.0 支持到 DSH v0.1.6-alpha.2。': 'dsh-im 4.25.0 supports DSH up to v0.1.6-alpha.2.',
|
|
277
322
|
'dsh-im 4.39.0 仅支持 DSH 0.2.0-rc.2。': 'dsh-im 4.39.0 only supports DSH 0.2.0-rc.2.',
|
|
278
323
|
'dsh-im 5.0.0 仅支持 DSH 0.2.1-rc.2。': 'dsh-im 5.0.0 only supports DSH 0.2.1-rc.2.',
|
|
324
|
+
'dsh-im 5.10.0 起支持 DSH 0.2.2-rc.5。': 'dsh-im 5.10.0 and later support DSH 0.2.2-rc.5.',
|
|
279
325
|
'重新检查': 'Check again',
|
|
280
326
|
'刷新状态': 'Refresh status',
|
|
281
327
|
'手工更新': 'Manual update',
|
|
@@ -1186,6 +1232,15 @@ const EN = Object.freeze({
|
|
|
1186
1232
|
"将新消息补充到当前任务": "Add new messages to the current task",
|
|
1187
1233
|
"无法读取消息处理设置,请稍后重试。": "Could not read message handling settings. Try again later.",
|
|
1188
1234
|
"请提交有效的消息处理方式。": "Choose a valid message handling mode.",
|
|
1235
|
+
"投递内容": "Reply content",
|
|
1236
|
+
"过程正文": "Process prose",
|
|
1237
|
+
"工具步骤": "Tool steps",
|
|
1238
|
+
"思考过程": "Reasoning",
|
|
1239
|
+
"最终回答始终发送;关闭的项不再推送。": "The final answer is always sent; switched-off parts are not pushed.",
|
|
1240
|
+
"正在执行时助手的说明文字": "What the assistant writes while working",
|
|
1241
|
+
"工具调用、结果与失败提示": "Tool calls, results and failures",
|
|
1242
|
+
"模型的推理过程(渠道支持时)": "The model's reasoning, where the channel shows it",
|
|
1243
|
+
"请选择要投递的回复内容。": "Choose which parts of the reply to deliver.",
|
|
1189
1244
|
'通用设置': 'General settings',
|
|
1190
1245
|
'通用设置分类': 'General settings categories',
|
|
1191
1246
|
'附件': 'Attachments',
|
|
@@ -1342,6 +1397,34 @@ const EN = Object.freeze({
|
|
|
1342
1397
|
'语言设置暂不可用。': 'The language setting is unavailable.',
|
|
1343
1398
|
'在 Web GUI 中发送的消息会作为一条带前缀的消息转发到本聊天的会话同步目标。': 'A message sent in the Web GUI is forwarded to the Session sync target of this chat, prefixed with the icon.',
|
|
1344
1399
|
'其他回合(Web 输入、定时提醒、子代理通知等)的模型回答会发送到会话同步目标。': 'Model answers of other turns (Web input, schedule reminders, subagent notices and so on) are sent to the Session sync target.',
|
|
1400
|
+
'微信客服': 'WeCom Customer Service',
|
|
1401
|
+
'浏览器未允许访问剪贴板': 'The browser did not allow clipboard access',
|
|
1402
|
+
'宿主响应缺少 value.channels,请检查 dsh-im host 是否已重载': 'The Host response is missing value.channels. Reload the dsh-im Host and try again.',
|
|
1403
|
+
'宿主响应缺少 value.messages,请检查 dsh-im host 是否已重载': 'The Host response is missing value.messages. Reload the dsh-im Host and try again.',
|
|
1404
|
+
'宿主响应缺少 value.messages': 'The Host response is missing value.messages',
|
|
1405
|
+
'查看该会话的用户与助手正文': 'View the user and assistant messages in this session',
|
|
1406
|
+
'复制失败': 'Copy failed',
|
|
1407
|
+
'复制 ID': 'Copy ID',
|
|
1408
|
+
'通道 / 会话键': 'Channel / conversation key',
|
|
1409
|
+
'DSH 会话 ID': 'DSH session ID',
|
|
1410
|
+
'操作': 'Actions',
|
|
1411
|
+
'助手': 'Assistant',
|
|
1412
|
+
'本条消息过长,已截断。': 'This message was too long and has been truncated.',
|
|
1413
|
+
'会话内容': 'Session content',
|
|
1414
|
+
'只读显示用户与助手正文;系统提示、工具调用和内部推理不显示。': 'Read-only user and assistant messages. System prompts, tool calls, and internal reasoning are hidden.',
|
|
1415
|
+
'返回列表': 'Back to list',
|
|
1416
|
+
'加载更早消息': 'Load earlier messages',
|
|
1417
|
+
'加载中…': 'Loading…',
|
|
1418
|
+
'没有可显示的用户或助手正文。': 'No user or assistant messages to display.',
|
|
1419
|
+
'会话记录': 'Session history',
|
|
1420
|
+
'返回 IM机器人': 'Back to IM bots',
|
|
1421
|
+
'只读列出各 IM 通道当前绑定的 DSH 会话;点击会话 ID 查看正文,不会修改绑定。': 'Read-only list of DSH sessions bound to each IM channel. Select a session ID to view its messages; bindings are not changed.',
|
|
1422
|
+
'正在读取通道会话…': 'Loading channel sessions…',
|
|
1423
|
+
'尚未发现已绑定 DSH 会话的通道。': 'No channels with bound DSH sessions were found.',
|
|
1424
|
+
'limit 或 offset 参数无效': 'The limit or offset parameter is invalid',
|
|
1425
|
+
'该会话不属于指定通道绑定,可能已解绑': 'The session is not bound to the specified channel, or the binding was removed',
|
|
1426
|
+
'宿主 sessionQuery 服务尚未就绪': 'The Host sessionQuery service is not ready',
|
|
1427
|
+
'该会话暂时无法读取,请稍后重试。': 'The session cannot be read right now. Try again later.',
|
|
1345
1428
|
'请求失败': 'The request failed',
|
|
1346
1429
|
});
|
|
1347
1430
|
|