@runtypelabs/persona 4.7.0 → 4.8.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/animations/glyph-cycle.cjs +2 -2
- package/dist/animations/glyph-cycle.d.cts +1 -1
- package/dist/animations/glyph-cycle.d.ts +1 -1
- package/dist/animations/glyph-cycle.js +2 -2
- package/dist/animations/{types-CSmiKRVa.d.cts → types-BsZtXPKK.d.cts} +43 -3
- package/dist/animations/{types-CSmiKRVa.d.ts → types-BsZtXPKK.d.ts} +43 -3
- package/dist/animations/wipe.cjs +2 -2
- package/dist/animations/wipe.d.cts +1 -1
- package/dist/animations/wipe.d.ts +1 -1
- package/dist/chunk-5EIIHQLQ.js +1 -0
- package/dist/codegen.cjs +12 -12
- package/dist/codegen.js +14 -14
- package/dist/index.cjs +91 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +877 -172
- package/dist/index.d.ts +877 -172
- package/dist/index.global.js +81 -57
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +91 -68
- package/dist/index.js.map +1 -1
- package/dist/install.global.js +1 -1
- package/dist/install.global.js.map +1 -1
- package/dist/launcher.global.js +3 -2
- package/dist/launcher.global.js.map +1 -1
- package/dist/markdown-parsers.js +24 -24
- package/dist/plugin-kit.cjs +1 -1
- package/dist/plugin-kit.js +1 -1
- package/dist/runtype-tts-entry-UJAEF7NZ.js +1 -0
- package/dist/runtype-tts.js +1 -1
- package/dist/session-reconnect-JKIJBHS5.js +1 -0
- package/dist/smart-dom-reader.cjs +17 -17
- package/dist/smart-dom-reader.d.cts +753 -15
- package/dist/smart-dom-reader.d.ts +753 -15
- package/dist/smart-dom-reader.js +17 -17
- package/dist/testing.cjs +3 -3
- package/dist/testing.js +3 -3
- package/dist/theme-editor-preview.cjs +81 -58
- package/dist/theme-editor-preview.d.cts +761 -15
- package/dist/theme-editor-preview.d.ts +761 -15
- package/dist/theme-editor-preview.js +81 -58
- package/dist/theme-editor.cjs +6 -6
- package/dist/theme-editor.d.cts +753 -15
- package/dist/theme-editor.d.ts +753 -15
- package/dist/theme-editor.js +10 -10
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +74 -0
- package/dist/theme-reference.d.ts +74 -0
- package/dist/theme-reference.js +1 -1
- package/dist/voice-worklet-player.cjs +2 -2
- package/dist/voice-worklet-player.js +2 -2
- package/dist/webmcp-polyfill.js +2 -2
- package/dist/widget.css +1 -1
- package/package.json +2 -3
- package/src/artifacts-session.test.ts +178 -0
- package/src/client.test.ts +186 -1
- package/src/client.ts +92 -9
- package/src/components/artifact-card.test.ts +333 -0
- package/src/components/artifact-card.ts +75 -28
- package/src/components/artifact-inline.test.ts +1328 -0
- package/src/components/artifact-inline.ts +920 -0
- package/src/components/artifact-pane.test.ts +1042 -0
- package/src/components/artifact-pane.ts +440 -131
- package/src/components/artifact-preview.test.ts +1155 -0
- package/src/components/artifact-preview.ts +994 -0
- package/src/components/pill-composer-builder.test.ts +6 -2
- package/src/components/pill-composer-builder.ts +6 -6
- package/src/components/reasoning-bubble.ts +1 -13
- package/src/components/registry.ts +38 -3
- package/src/components/tool-bubble.ts +1 -13
- package/src/defaults.ts +1 -0
- package/src/generated/runtype-openapi-contract.ts +55 -3
- package/src/index-core.ts +20 -1
- package/src/index.ts +8 -0
- package/src/markdown-parsers-loader.test.ts +158 -0
- package/src/markdown-parsers-loader.ts +74 -9
- package/src/runtime/host-layout.test.ts +163 -0
- package/src/runtime/host-layout.ts +110 -7
- package/src/runtime/init.ts +18 -61
- package/src/session.ts +76 -22
- package/src/styles/widget.css +773 -26
- package/src/theme-editor/preview.ts +2 -0
- package/src/theme-editor/sections.test.ts +26 -1
- package/src/theme-editor/sections.ts +10 -2
- package/src/theme-reference.ts +2 -2
- package/src/tool-call-display-defaults.test.ts +1 -0
- package/src/types/theme.ts +77 -0
- package/src/types.ts +516 -17
- package/src/ui.artifact-pane-gating.test.ts +636 -0
- package/src/ui.component-directive.test.ts +104 -0
- package/src/ui.composer-bar.test.ts +60 -2
- package/src/ui.detached-panel.test.ts +1049 -0
- package/src/ui.tool-display.test.ts +51 -0
- package/src/ui.ts +698 -109
- package/src/utils/artifact-custom-actions.ts +128 -0
- package/src/utils/artifact-display.test.ts +42 -0
- package/src/utils/artifact-display.ts +84 -0
- package/src/utils/artifact-file.test.ts +116 -0
- package/src/utils/artifact-file.ts +117 -0
- package/src/utils/artifact-gate.test.ts +112 -5
- package/src/utils/artifact-gate.ts +39 -14
- package/src/utils/artifact-loading-status.ts +55 -0
- package/src/utils/artifact-status-label.ts +190 -0
- package/src/utils/buttons.ts +7 -1
- package/src/utils/code-highlight.test.ts +186 -0
- package/src/utils/code-highlight.ts +400 -0
- package/src/utils/icons.ts +2 -0
- package/src/utils/roving-tablist.test.ts +152 -0
- package/src/utils/roving-tablist.ts +111 -0
- package/src/utils/spinner.ts +45 -0
- package/src/utils/theme.test.ts +48 -0
- package/src/utils/theme.ts +7 -0
- package/src/utils/tokens.ts +91 -0
- package/src/utils/tool-loading-animation.test.ts +32 -0
- package/src/utils/tool-loading-animation.ts +24 -0
- package/dist/chunk-DFBSCFYN.js +0 -1
- package/dist/runtype-tts-entry-HFUV2UF7.js +0 -1
- package/dist/session-reconnect-U77QFUR7.js +0 -1
|
@@ -201,4 +201,55 @@ describe("createAgentExperience tool call display modes", () => {
|
|
|
201
201
|
|
|
202
202
|
controller.destroy();
|
|
203
203
|
});
|
|
204
|
+
|
|
205
|
+
it("keeps tool calls grouped across reasoning that is hidden", () => {
|
|
206
|
+
const mount = createMount();
|
|
207
|
+
const controller = createAgentExperience(mount, {
|
|
208
|
+
apiUrl: "https://api.example.com/chat",
|
|
209
|
+
launcher: { enabled: false },
|
|
210
|
+
features: {
|
|
211
|
+
showReasoning: false,
|
|
212
|
+
toolCallDisplay: {
|
|
213
|
+
grouped: true,
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
} as any);
|
|
217
|
+
|
|
218
|
+
injectToolMessage(controller, { id: "tool-1", name: "Inspect data" });
|
|
219
|
+
injectReasoningMessage(controller, { id: "reason-1", chunks: ["Choosing a query"] });
|
|
220
|
+
injectToolMessage(controller, { id: "tool-2", name: "Run analysis" });
|
|
221
|
+
|
|
222
|
+
const group = mount.querySelector("[data-persona-tool-group='true']");
|
|
223
|
+
expect(group).not.toBeNull();
|
|
224
|
+
expect(group?.querySelectorAll("[data-persona-tool-group-item]")).toHaveLength(2);
|
|
225
|
+
|
|
226
|
+
controller.destroy();
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it("can render a grouped tool sequence as one summary item", () => {
|
|
230
|
+
const mount = createMount();
|
|
231
|
+
const controller = createAgentExperience(mount, {
|
|
232
|
+
apiUrl: "https://api.example.com/chat",
|
|
233
|
+
launcher: { enabled: false },
|
|
234
|
+
features: {
|
|
235
|
+
toolCallDisplay: {
|
|
236
|
+
grouped: true,
|
|
237
|
+
groupedMode: "summary",
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
toolCall: {
|
|
241
|
+
renderGroupedSummary: () => "Analysis ready",
|
|
242
|
+
},
|
|
243
|
+
} as any);
|
|
244
|
+
|
|
245
|
+
injectToolMessage(controller, { id: "tool-1", name: "Inspect data", status: "complete" });
|
|
246
|
+
injectToolMessage(controller, { id: "tool-2", name: "Run analysis", status: "complete" });
|
|
247
|
+
|
|
248
|
+
const group = mount.querySelector("[data-persona-tool-group='true']");
|
|
249
|
+
expect(group?.textContent).toContain("Analysis ready");
|
|
250
|
+
expect(group?.querySelector("[data-persona-tool-group-item]")).toBeNull();
|
|
251
|
+
expect(mount.querySelector(".persona-tool-bubble")).toBeNull();
|
|
252
|
+
|
|
253
|
+
controller.destroy();
|
|
254
|
+
});
|
|
204
255
|
});
|