termdock 1.4.369 → 1.4.370
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.
|
@@ -64,7 +64,7 @@ export function collaborationMessageAnchorTokens(messages) {
|
|
|
64
64
|
}
|
|
65
65
|
/** A single delivered message: `来自:X · kind · id` over a fenced body. The
|
|
66
66
|
* message id rides the source line — it is the one place a recipient can
|
|
67
|
-
* look up how to reply (`td collab --help`,
|
|
67
|
+
* look up how to reply (`td collab --help`, taught on first delivery) without a
|
|
68
68
|
* per-message command template. A fan-out dispatch (message.fanOutIds
|
|
69
69
|
* present) is flagged `· 群发` and names the sibling recipients on their own
|
|
70
70
|
* line, so a broadcast is never mistaken for a one-to-one assignment — raw
|
|
@@ -78,9 +78,11 @@ function formatCollaborationMessage(message, source, fannedNames, fence, token)
|
|
|
78
78
|
// body, project path, or the recipient's current working directory.
|
|
79
79
|
const address = message.fromSessionId ? directRemoteAddress(message.fromSessionId) : null;
|
|
80
80
|
const remote = message.fromSessionId?.startsWith('remote:');
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const service = remote ? address ? `远端 ${address.origin}` : '远端(地址未确认)' : '本服务';
|
|
82
|
+
// The service and its native session ID together identify the sender. Do
|
|
83
|
+
// not repeat the encoded origin inside a second full remote routing ID.
|
|
84
|
+
const session = message.fromSessionId ? ` · 会话 ${sanitizeCollaborationRole(address?.id ?? message.fromSessionId, 2048)}` : '';
|
|
85
|
+
lines.push(`来源:${service}${session}`);
|
|
84
86
|
if (fannedNames.length)
|
|
85
87
|
lines.push(`同时发给了:${fannedNames.join('、')}`);
|
|
86
88
|
lines.push('', fence, message.content, fence);
|
|
@@ -97,7 +99,7 @@ export function formatCollaborationDelivery(input) {
|
|
|
97
99
|
for (const message of input.messages) {
|
|
98
100
|
const sourceSession = message.fromSessionId ? sessionsById.get(message.fromSessionId) : null;
|
|
99
101
|
const source = message.fromSessionId
|
|
100
|
-
? sanitizeCollaborationName(sourceSession?.name ?? (message.direct ? message.directSourceName : undefined) ?? message.fromSessionId)
|
|
102
|
+
? sanitizeCollaborationName(sourceSession?.name ?? (message.direct ? message.directSourceName : undefined) ?? message.fromSessionId, 24)
|
|
101
103
|
: message.integrationOrigin ? message.integrationOrigin.source === 'session-chat' ? '网页对话用户' : `后台接入 ${sanitizeCollaborationName(message.integrationOrigin.integrationId, 80)}` : '用户';
|
|
102
104
|
const token = tokens.get(message.id) ?? message.id;
|
|
103
105
|
const bytes = Buffer.byteLength(message.content);
|
|
@@ -172,7 +174,7 @@ export function formatCollaborationDelivery(input) {
|
|
|
172
174
|
const session = sessionsById.get(id);
|
|
173
175
|
return `注意:${session ? sanitizeCollaborationName(session.name) : id} 服务不可达,消息无法送达;仅可排队等待重连。`;
|
|
174
176
|
});
|
|
175
|
-
const notes = [...education, ...dynamicNotices, '帮助:td collab --help'];
|
|
177
|
+
const notes = [...education, ...dynamicNotices, ...(educated ? ['帮助:td collab --help'] : [])];
|
|
176
178
|
if (!blocks.length)
|
|
177
179
|
return notes.join('\n');
|
|
178
180
|
// Recipient identity rides the shell under the header so the recipient
|
|
@@ -180,7 +182,7 @@ export function formatCollaborationDelivery(input) {
|
|
|
180
182
|
// separate notification needed) and, in a single-group delivery, its role
|
|
181
183
|
// (定位). The name needs no group claim and survives mixed batches; the
|
|
182
184
|
// role only rides when the batch maps to exactly one group.
|
|
183
|
-
const ownName = sanitizeCollaborationName(sessionsById.get(input.targetSessionId)?.name ?? '');
|
|
185
|
+
const ownName = sanitizeCollaborationName(sessionsById.get(input.targetSessionId)?.name ?? '', 24);
|
|
184
186
|
const ownRole = singleGroup
|
|
185
187
|
? sanitizeCollaborationRole(singleGroup.roles?.[input.targetSessionId] ?? '')
|
|
186
188
|
: '';
|
package/package.json
CHANGED
package/runtime-manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "termdock",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.370",
|
|
5
5
|
"runtimeProtocolVersion": 1,
|
|
6
6
|
"minimumDesktopVersion": "1.4.46",
|
|
7
7
|
"nodeMajor": 22,
|
|
8
8
|
"dependencyHash": "sha256-Y8lMrpp3Lu4r/I8Zx3R59DZsC3RtYVYC7b/kH84ZMeY=",
|
|
9
|
-
"serverBundleHash": "sha256-
|
|
9
|
+
"serverBundleHash": "sha256-yBB1I/3vFzMaEpzWpMGS1zYuYqyP8E099AOdnd6R/Zw=",
|
|
10
10
|
"clientBundleHash": "sha256-ktI+p7m2Yhc3/36XdwDmL/TwSoR/Aoy14/ZPsC6tf9Y=",
|
|
11
11
|
"entrypoint": "dist/server/cli.js",
|
|
12
12
|
"clientEntrypoint": "dist/client/index.html"
|