@springbrand/message-panel 0.2.0-alpha.54 → 0.2.0-alpha.56
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.
|
@@ -35,7 +35,7 @@ export interface CloudOsMessageMetadata extends UnknownRecord {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export interface CloudOsRequestedCapability {
|
|
38
|
-
kind: "skill" | "tool" | "plan";
|
|
38
|
+
kind: "skill" | "tool" | "plan" | "plugin";
|
|
39
39
|
name: string;
|
|
40
40
|
label: string;
|
|
41
41
|
}
|
|
@@ -194,12 +194,17 @@ export function requestedCapabilitiesOf(
|
|
|
194
194
|
typeof capability.label !== "string" ||
|
|
195
195
|
!capability.label.trim()
|
|
196
196
|
) return [];
|
|
197
|
-
const
|
|
197
|
+
const resourceId = typeof capability.resourceId === "string"
|
|
198
|
+
? capability.resourceId.trim()
|
|
199
|
+
: "";
|
|
200
|
+
const kind = resourceId ? "plugin" : capability.kind;
|
|
201
|
+
const name = resourceId || capability.name;
|
|
202
|
+
const key = `${kind}:${name}`;
|
|
198
203
|
if (seen.has(key)) return [];
|
|
199
204
|
seen.add(key);
|
|
200
205
|
return [{
|
|
201
|
-
kind
|
|
202
|
-
name
|
|
206
|
+
kind,
|
|
207
|
+
name,
|
|
203
208
|
label: capability.label,
|
|
204
209
|
}];
|
|
205
210
|
});
|
|
@@ -426,13 +431,18 @@ function assistantBlocks(
|
|
|
426
431
|
if (type === "text") {
|
|
427
432
|
const text = String(record.text ?? "").trim();
|
|
428
433
|
if (!text) return;
|
|
434
|
+
// Clarification prose belongs with its ask_user, not the later delivery.
|
|
435
|
+
const nextBoundary = message.parts.slice(partIndex + 1).find((next) =>
|
|
436
|
+
next.type === "step-start" || toolNameOf(next) === "ask_user"
|
|
437
|
+
);
|
|
429
438
|
flush();
|
|
430
439
|
blocks.push({
|
|
431
440
|
kind: "text",
|
|
432
441
|
key,
|
|
433
442
|
text,
|
|
434
443
|
final: false,
|
|
435
|
-
substantive: Array.from(text).length > 400
|
|
444
|
+
substantive: Array.from(text).length > 400 &&
|
|
445
|
+
toolNameOf(nextBoundary) !== "ask_user",
|
|
436
446
|
});
|
|
437
447
|
return;
|
|
438
448
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":"4.1.10","results":[[":bot/cycles.test.ts",{"duration":55.58770800000002,"failed":false}],[":bot/skins.test.ts",{"duration":3032.4465840000003,"failed":false}],[":bot/engine.test.ts",{"duration":100.501834,"failed":false}],[":bot/shape.test.ts",{"duration":16.04204200000001,"failed":false}],[":bot/expressions.test.ts",{"duration":8.212458999999996,"failed":false}],[":bot/face.test.ts",{"duration":3.6211250000000064,"failed":false}],[":drag.test.ts",{"duration":1.7712499999999807,"failed":false}],[":animation.test.ts",{"duration":2.3806249999999807,"failed":false}]]}
|