@runtypelabs/persona 4.10.1 → 4.11.1
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.d.cts +1 -1
- package/dist/animations/glyph-cycle.d.ts +1 -1
- package/dist/animations/{types-Bx_rvjff.d.cts → types-DveIaNx6.d.cts} +2 -0
- package/dist/animations/{types-Bx_rvjff.d.ts → types-DveIaNx6.d.ts} +2 -0
- package/dist/animations/wipe.d.cts +1 -1
- package/dist/animations/wipe.d.ts +1 -1
- package/dist/chunk-MMUPR2JW.js +1 -0
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/{context-mentions-7S5KVUTG.js → context-mentions-ONG7A7M6.js} +1 -1
- package/dist/context-mentions.d.cts +28 -0
- package/dist/context-mentions.d.ts +28 -0
- package/dist/index.cjs +67 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.global.js +56 -56
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +78 -78
- package/dist/index.js.map +1 -1
- package/dist/smart-dom-reader.d.cts +28 -0
- package/dist/smart-dom-reader.d.ts +28 -0
- package/dist/theme-editor-preview.cjs +66 -66
- package/dist/theme-editor-preview.d.cts +28 -0
- package/dist/theme-editor-preview.d.ts +28 -0
- package/dist/theme-editor-preview.js +55 -55
- package/dist/theme-editor.cjs +5 -5
- package/dist/theme-editor.d.cts +28 -0
- package/dist/theme-editor.d.ts +28 -0
- package/dist/theme-editor.js +9 -9
- package/dist/widget.css +1 -1
- package/package.json +1 -1
- package/src/components/approval-bubble.ts +0 -1
- package/src/components/composer-parts.ts +19 -19
- package/src/components/context-mention-button.test.ts +5 -1
- package/src/components/context-mention-button.ts +6 -4
- package/src/components/header-builder.test.ts +3 -3
- package/src/components/header-parts.ts +14 -108
- package/src/components/message-bubble.test.ts +49 -0
- package/src/components/message-bubble.ts +8 -7
- package/src/components/reasoning-bubble.ts +0 -2
- package/src/components/tool-bubble.ts +0 -2
- package/src/generated/runtype-openapi-contract.ts +2 -0
- package/src/index-core.ts +1 -0
- package/src/styles/widget.css +118 -58
- package/src/theme-editor/sections.test.ts +33 -0
- package/src/theme-editor/sections.ts +10 -1
- package/src/types.ts +27 -0
- package/src/ui.attachments-drop.test.ts +2 -1
- package/src/ui.message-width.test.ts +407 -0
- package/src/ui.tool-display.test.ts +177 -8
- package/src/ui.ts +159 -244
- package/src/utils/table-scroll-fade.test.ts +123 -0
- package/src/utils/table-scroll-fade.ts +75 -0
- package/src/utils/tooltip.test.ts +226 -0
- package/src/utils/tooltip.ts +245 -0
- package/dist/chunk-IPVK3KOM.js +0 -1
|
@@ -864,6 +864,7 @@ type RuntypeExecutionStreamEvent = ({
|
|
|
864
864
|
input: number;
|
|
865
865
|
output: number;
|
|
866
866
|
};
|
|
867
|
+
totalTokensUsed?: number;
|
|
867
868
|
type: "execution_complete";
|
|
868
869
|
}) | ({
|
|
869
870
|
blockReason?: string;
|
|
@@ -1123,6 +1124,7 @@ type RuntypeExecutionStreamEvent = ({
|
|
|
1123
1124
|
stepId?: string;
|
|
1124
1125
|
success: boolean;
|
|
1125
1126
|
toolCallId: string;
|
|
1127
|
+
toolCost?: number;
|
|
1126
1128
|
toolName?: string;
|
|
1127
1129
|
type: "tool_complete";
|
|
1128
1130
|
} | {
|
|
@@ -4544,6 +4546,8 @@ type AgentWidgetToolCallConfig = {
|
|
|
4544
4546
|
}) => HTMLElement | string | null;
|
|
4545
4547
|
/**
|
|
4546
4548
|
* Override the summary content for grouped consecutive tool-call containers.
|
|
4549
|
+
* In `groupedMode: "summary"`, the summary owns the visible row starting
|
|
4550
|
+
* with the first tool so its DOM stays stable as more calls arrive.
|
|
4547
4551
|
* Return `null` to fall back to the built-in `Called [x] tools` summary.
|
|
4548
4552
|
*/
|
|
4549
4553
|
renderGroupedSummary?: (context: {
|
|
@@ -4924,6 +4928,26 @@ type AgentWidgetTimestampConfig = {
|
|
|
4924
4928
|
/** Custom formatter for timestamp display */
|
|
4925
4929
|
format?: (date: Date) => string;
|
|
4926
4930
|
};
|
|
4931
|
+
/**
|
|
4932
|
+
* Width configuration for one message role.
|
|
4933
|
+
*
|
|
4934
|
+
* `content` shrink-wraps the rendered message up to `maxWidth`; `full` fills
|
|
4935
|
+
* the available transcript track up to `maxWidth`. The track already accounts
|
|
4936
|
+
* for transcript padding and, when present, the avatar and its gap.
|
|
4937
|
+
*/
|
|
4938
|
+
type AgentWidgetMessageRoleLayout = {
|
|
4939
|
+
/**
|
|
4940
|
+
* Message width behavior.
|
|
4941
|
+
* - content: size to the rendered content (the backward-compatible default)
|
|
4942
|
+
* - full: fill the available transcript track
|
|
4943
|
+
*/
|
|
4944
|
+
width?: "content" | "full";
|
|
4945
|
+
/**
|
|
4946
|
+
* Optional CSS max-width (for example "80%", "42rem", or "72ch").
|
|
4947
|
+
* Defaults to "85%" for content width and "100%" for full width.
|
|
4948
|
+
*/
|
|
4949
|
+
maxWidth?: string;
|
|
4950
|
+
};
|
|
4927
4951
|
/**
|
|
4928
4952
|
* Message layout configuration
|
|
4929
4953
|
* Allows customization of how chat messages are displayed
|
|
@@ -4942,6 +4966,10 @@ type AgentWidgetMessageLayoutConfig = {
|
|
|
4942
4966
|
timestamp?: AgentWidgetTimestampConfig;
|
|
4943
4967
|
/** Group consecutive messages from the same role */
|
|
4944
4968
|
groupConsecutive?: boolean;
|
|
4969
|
+
/** Width behavior for user-authored message rows */
|
|
4970
|
+
user?: AgentWidgetMessageRoleLayout;
|
|
4971
|
+
/** Width behavior for assistant-authored message rows and assistant UI variants */
|
|
4972
|
+
assistant?: AgentWidgetMessageRoleLayout;
|
|
4945
4973
|
/**
|
|
4946
4974
|
* Custom renderer for user messages
|
|
4947
4975
|
* When provided, replaces the default user message rendering
|
|
@@ -864,6 +864,7 @@ type RuntypeExecutionStreamEvent = ({
|
|
|
864
864
|
input: number;
|
|
865
865
|
output: number;
|
|
866
866
|
};
|
|
867
|
+
totalTokensUsed?: number;
|
|
867
868
|
type: "execution_complete";
|
|
868
869
|
}) | ({
|
|
869
870
|
blockReason?: string;
|
|
@@ -1123,6 +1124,7 @@ type RuntypeExecutionStreamEvent = ({
|
|
|
1123
1124
|
stepId?: string;
|
|
1124
1125
|
success: boolean;
|
|
1125
1126
|
toolCallId: string;
|
|
1127
|
+
toolCost?: number;
|
|
1126
1128
|
toolName?: string;
|
|
1127
1129
|
type: "tool_complete";
|
|
1128
1130
|
} | {
|
|
@@ -4544,6 +4546,8 @@ type AgentWidgetToolCallConfig = {
|
|
|
4544
4546
|
}) => HTMLElement | string | null;
|
|
4545
4547
|
/**
|
|
4546
4548
|
* Override the summary content for grouped consecutive tool-call containers.
|
|
4549
|
+
* In `groupedMode: "summary"`, the summary owns the visible row starting
|
|
4550
|
+
* with the first tool so its DOM stays stable as more calls arrive.
|
|
4547
4551
|
* Return `null` to fall back to the built-in `Called [x] tools` summary.
|
|
4548
4552
|
*/
|
|
4549
4553
|
renderGroupedSummary?: (context: {
|
|
@@ -4924,6 +4928,26 @@ type AgentWidgetTimestampConfig = {
|
|
|
4924
4928
|
/** Custom formatter for timestamp display */
|
|
4925
4929
|
format?: (date: Date) => string;
|
|
4926
4930
|
};
|
|
4931
|
+
/**
|
|
4932
|
+
* Width configuration for one message role.
|
|
4933
|
+
*
|
|
4934
|
+
* `content` shrink-wraps the rendered message up to `maxWidth`; `full` fills
|
|
4935
|
+
* the available transcript track up to `maxWidth`. The track already accounts
|
|
4936
|
+
* for transcript padding and, when present, the avatar and its gap.
|
|
4937
|
+
*/
|
|
4938
|
+
type AgentWidgetMessageRoleLayout = {
|
|
4939
|
+
/**
|
|
4940
|
+
* Message width behavior.
|
|
4941
|
+
* - content: size to the rendered content (the backward-compatible default)
|
|
4942
|
+
* - full: fill the available transcript track
|
|
4943
|
+
*/
|
|
4944
|
+
width?: "content" | "full";
|
|
4945
|
+
/**
|
|
4946
|
+
* Optional CSS max-width (for example "80%", "42rem", or "72ch").
|
|
4947
|
+
* Defaults to "85%" for content width and "100%" for full width.
|
|
4948
|
+
*/
|
|
4949
|
+
maxWidth?: string;
|
|
4950
|
+
};
|
|
4927
4951
|
/**
|
|
4928
4952
|
* Message layout configuration
|
|
4929
4953
|
* Allows customization of how chat messages are displayed
|
|
@@ -4942,6 +4966,10 @@ type AgentWidgetMessageLayoutConfig = {
|
|
|
4942
4966
|
timestamp?: AgentWidgetTimestampConfig;
|
|
4943
4967
|
/** Group consecutive messages from the same role */
|
|
4944
4968
|
groupConsecutive?: boolean;
|
|
4969
|
+
/** Width behavior for user-authored message rows */
|
|
4970
|
+
user?: AgentWidgetMessageRoleLayout;
|
|
4971
|
+
/** Width behavior for assistant-authored message rows and assistant UI variants */
|
|
4972
|
+
assistant?: AgentWidgetMessageRoleLayout;
|
|
4945
4973
|
/**
|
|
4946
4974
|
* Custom renderer for user messages
|
|
4947
4975
|
* When provided, replaces the default user message rendering
|