dsh-device-fleet 0.1.0-dev.23 → 0.1.0-dev.24
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/client.js +39 -18
- package/docs/notes/dev-release.md +6 -1
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -1310,6 +1310,11 @@ window.__ModuleLoader__.load({
|
|
|
1310
1310
|
const participants = detail.members.filter((member) => member.role !== 'host')
|
|
1311
1311
|
const defaultRecipients = participants.length > 0 ? participants.map((member) => member.memberId) : detail.members.map((member) => member.memberId)
|
|
1312
1312
|
const recipients = sendTo.length > 0 ? sendTo : defaultRecipients
|
|
1313
|
+
const mentionMatch = /(?:^|\s)@([^\s@]*)$/.exec(sendText)
|
|
1314
|
+
const mentionInfo = mentionMatch ? { query: mentionMatch[1], start: sendText.length - mentionMatch[1].length - 1 } : null
|
|
1315
|
+
const mentionCandidates = mentionInfo
|
|
1316
|
+
? detail.members.filter((member) => String(member.name ?? '').toLowerCase().includes(mentionInfo.query.toLowerCase()))
|
|
1317
|
+
: []
|
|
1313
1318
|
const send = () =>
|
|
1314
1319
|
act('发送', async () => {
|
|
1315
1320
|
if (sendText.trim() === '') throw new Error('消息不能为空')
|
|
@@ -1381,23 +1386,19 @@ window.__ModuleLoader__.load({
|
|
|
1381
1386
|
)
|
|
1382
1387
|
: null,
|
|
1383
1388
|
h('div', { style: { ...cardStyle, marginTop: 8 } },
|
|
1384
|
-
h('div', { style: { display: 'flex', flexWrap: 'wrap', gap:
|
|
1385
|
-
h('span', { style: { fontSize: 11, opacity: 0.6
|
|
1386
|
-
|
|
1387
|
-
h('
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
setSendTo((current) =>
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
}),
|
|
1398
|
-
member.name,
|
|
1399
|
-
),
|
|
1400
|
-
),
|
|
1389
|
+
h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 6, alignItems: 'center', marginBottom: 6 } },
|
|
1390
|
+
h('span', { style: { fontSize: 11, opacity: 0.6 } }, '发给'),
|
|
1391
|
+
sendTo.length === 0
|
|
1392
|
+
? h('span', { style: { fontSize: 11, opacity: 0.8 } }, '所有人')
|
|
1393
|
+
: sendTo.map((memberId) =>
|
|
1394
|
+
h('span', {
|
|
1395
|
+
key: memberId,
|
|
1396
|
+
style: { fontSize: 11, padding: '1px 7px', borderRadius: 999, border: '1px solid var(--dsw-alias-accent, #2f6fed)', color: 'var(--dsw-alias-accent, #2f6fed)', cursor: 'pointer' },
|
|
1397
|
+
onClick: () => setSendTo((current) => current.filter((id) => id !== memberId)),
|
|
1398
|
+
}, '@' + nameOf(memberId) + ' ×'),
|
|
1399
|
+
),
|
|
1400
|
+
h('span', { style: { flex: 1 } }),
|
|
1401
|
+
h('span', { style: { fontSize: 10, opacity: 0.45 } }, '输入 @ 点名'),
|
|
1401
1402
|
),
|
|
1402
1403
|
h('textarea', {
|
|
1403
1404
|
value: sendText,
|
|
@@ -1409,9 +1410,29 @@ window.__ModuleLoader__.load({
|
|
|
1409
1410
|
}
|
|
1410
1411
|
},
|
|
1411
1412
|
rows: 2,
|
|
1412
|
-
placeholder: '
|
|
1413
|
+
placeholder: '发消息给房间成员;输入 @ 可点名(Enter 发送,Shift+Enter 换行)',
|
|
1413
1414
|
style: { width: '100%', boxSizing: 'border-box', padding: '7px 9px', borderRadius: 8, border: '1px solid var(--dsw-alias-border-l1, #333)', background: 'var(--dsw-alias-bg-layer-2, #262626)', color: 'inherit', fontSize: 13, resize: 'vertical', fontFamily: 'inherit' },
|
|
1414
1415
|
}),
|
|
1416
|
+
mentionInfo && mentionCandidates.length > 0
|
|
1417
|
+
? h('div', { style: { marginTop: 6, border: '1px solid var(--dsw-alias-border-l1, #333)', borderRadius: 8, background: 'var(--dsw-alias-bg-layer-2, #262626)', overflow: 'hidden' } },
|
|
1418
|
+
...mentionCandidates.map((member) =>
|
|
1419
|
+
h('button', {
|
|
1420
|
+
key: member.memberId,
|
|
1421
|
+
type: 'button',
|
|
1422
|
+
onClick: () => {
|
|
1423
|
+
setSendTo((current) => [...new Set([...current, member.memberId])])
|
|
1424
|
+
setSendText((text) => {
|
|
1425
|
+
const match = /(?:^|\s)@([^\s@]*)$/.exec(text)
|
|
1426
|
+
if (!match) return text
|
|
1427
|
+
const start = text.length - match[1].length - 1
|
|
1428
|
+
return text.slice(0, start).replace(/\s+$/, '')
|
|
1429
|
+
})
|
|
1430
|
+
},
|
|
1431
|
+
style: { display: 'flex', alignItems: 'center', gap: 6, width: '100%', padding: '6px 9px', background: 'transparent', border: 'none', color: 'inherit', cursor: 'pointer', fontSize: 12, textAlign: 'left' },
|
|
1432
|
+
}, roomAvatar(member.name ?? member.memberId, member.role === 'host' ? 'user' : 'agent'), member.name + (member.role === 'host' ? '(host)' : '')),
|
|
1433
|
+
),
|
|
1434
|
+
)
|
|
1435
|
+
: null,
|
|
1415
1436
|
h('div', { style: { display: 'flex', justifyContent: 'flex-end', marginTop: 6 } }, smallButton('发送', () => void send(), 'allow')),
|
|
1416
1437
|
),
|
|
1417
1438
|
)
|
|
@@ -123,4 +123,9 @@ dsh plugin --profile desktop add dsh-device-fleet@dev
|
|
|
123
123
|
- Session 内新增「房间」Conversation View(`conversation.view`,label 房间):展示成员、时间线(含发言者/收件人)、看板与房间操作,输入默认发给非 host 参与者;
|
|
124
124
|
- 移除 Chat 输入的隐式 Room 广播:普通 Chat 只属于 host agent,Room 交流在「房间」页进行,避免用户在 Chat 里说话被自动转发、或 host agent 转述 worker 回复;
|
|
125
125
|
- host 不再接收参与者回复的 Chat 注入(参与者回复只进入房间时间线);
|
|
126
|
-
- 输入框下方成员条提示「房间消息在『房间』页交流」。
|
|
126
|
+
- 输入框下方成员条提示「房间消息在『房间』页交流」。
|
|
127
|
+
## 0.1.0-dev.23(Room 聊天气泡视图)
|
|
128
|
+
|
|
129
|
+
- 「房间」Conversation View 重做为聊天式:agent 消息在左(头像 + 名字 + 收件人),用户消息在右;时间戳、Enter 发送、收件人勾选;
|
|
130
|
+
- 参与者消息原文直接作为左侧气泡展示,不再进入 host 的普通 Chat;
|
|
131
|
+
- 看板可展开/收起,支持任务状态更新与添加。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-device-fleet",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.24",
|
|
4
4
|
"description": "DeepSeek Harness device fleet: enroll devices, direct-call remote tools, shared Rooms with lazy-woken agents, and delegated subagents across devices.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/plugin/index.js",
|