@runtypelabs/persona 4.9.0 → 4.10.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/README.md +13 -1
- package/dist/codegen.cjs +1 -1
- package/dist/codegen.js +1 -1
- package/dist/index.cjs +68 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.global.js +46 -46
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/dist/launcher.global.js +2 -2
- package/dist/launcher.global.js.map +1 -1
- package/dist/theme-editor-preview.cjs +61 -61
- package/dist/theme-editor-preview.d.cts +12 -1
- package/dist/theme-editor-preview.d.ts +12 -1
- package/dist/theme-editor-preview.js +47 -47
- package/dist/widget.css +1 -1
- package/package.json +1 -1
- package/src/components/artifact-pane.test.ts +47 -0
- package/src/components/artifact-pane.ts +25 -2
- package/src/index-core.ts +1 -0
- package/src/runtime/init-update-reset.test.ts +81 -0
- package/src/runtime/init.test.ts +62 -0
- package/src/runtime/init.ts +7 -14
- package/src/styles/widget.css +14 -0
- package/src/types.ts +17 -0
- package/src/ui.artifact-pane-gating.test.ts +11 -1
- package/src/ui.attachments-drop.test.ts +90 -0
- package/src/ui.header-update-stability.test.ts +149 -0
- package/src/ui.launcher-update-merge.test.ts +83 -0
- package/src/ui.send-button-stream-update.test.ts +69 -0
- package/src/ui.ts +78 -33
- package/src/utils/config-merge.test.ts +131 -0
- package/src/utils/config-merge.ts +61 -0
- package/src/utils/theme.test.ts +26 -0
- package/src/utils/theme.ts +6 -3
package/README.md
CHANGED
|
@@ -86,7 +86,19 @@ const docked = initAgentWidget({
|
|
|
86
86
|
});
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
###
|
|
89
|
+
### Update merge policy
|
|
90
|
+
|
|
91
|
+
`update()` applies a recursive patch, not a shallow replace. A key merges into the
|
|
92
|
+
live config only when both the previous value and the patch value are plain
|
|
93
|
+
objects, so a partial patch (for example `launcher.title`) preserves defaulted and
|
|
94
|
+
earlier-set sibling values instead of dropping them. Arrays, functions, class
|
|
95
|
+
instances, and scalar values replace wholesale, and so do a small set of
|
|
96
|
+
replace-leaf fields whose plain-object values must not be spliced together:
|
|
97
|
+
`headers`, `agent`, `storageAdapter`, `components`, `targetProviders`,
|
|
98
|
+
`voiceRecognition.provider.custom`, and `features.streamAnimation.plugins`.
|
|
99
|
+
Omitting a key preserves its current value: to reset a field, pass it explicitly
|
|
100
|
+
with `undefined`, which falls back to the field's default, or leaves it unset
|
|
101
|
+
when no default exists.
|
|
90
102
|
|
|
91
103
|
`initAgentWidget` accepts the following options:
|
|
92
104
|
|
package/dist/codegen.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var $=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var T=(e,r)=>{for(var n in r)$(e,n,{get:r[n],enumerable:!0})},M=(e,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of I(r))!_.call(e,a)&&a!==n&&$(e,a,{get:()=>r[a],enumerable:!(s=v(r,a))||s.enumerable});return e};var R=e=>M($({},"__esModule",{value:!0}),e);var U={};T(U,{generateCodeSnippet:()=>k});module.exports=R(U);var x="4.
|
|
1
|
+
"use strict";var $=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var T=(e,r)=>{for(var n in r)$(e,n,{get:r[n],enumerable:!0})},M=(e,r,n,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of I(r))!_.call(e,a)&&a!==n&&$(e,a,{get:()=>r[a],enumerable:!(s=v(r,a))||s.enumerable});return e};var R=e=>M($({},"__esModule",{value:!0}),e);var U={};T(U,{generateCodeSnippet:()=>k});module.exports=R(U);var x="4.10.0";var c=x;function u(e){if(e!==void 0)return typeof e=="string"?e:Array.isArray(e)?`[${e.map(r=>r.toString()).join(", ")}]`:e.toString()}function H(e){if(e)return{getHeaders:u(e.getHeaders),onFeedback:u(e.onFeedback),onCopy:u(e.onCopy),requestMiddleware:u(e.requestMiddleware),actionHandlers:u(e.actionHandlers),actionParsers:u(e.actionParsers),postprocessMessage:u(e.postprocessMessage),contextProviders:u(e.contextProviders),streamParser:u(e.streamParser)}}var S=`({ text, message }: any) => {
|
|
2
2
|
const jsonSource = (message as any).rawContent || text || message.content;
|
|
3
3
|
if (!jsonSource || typeof jsonSource !== 'string') return null;
|
|
4
4
|
let cleanJson = jsonSource
|
package/dist/codegen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var w="4.
|
|
1
|
+
var w="4.10.0";var c=w;function u(e){if(e!==void 0)return typeof e=="string"?e:Array.isArray(e)?`[${e.map(i=>i.toString()).join(", ")}]`:e.toString()}function P(e){if(e)return{getHeaders:u(e.getHeaders),onFeedback:u(e.onFeedback),onCopy:u(e.onCopy),requestMiddleware:u(e.requestMiddleware),actionHandlers:u(e.actionHandlers),actionParsers:u(e.actionParsers),postprocessMessage:u(e.postprocessMessage),contextProviders:u(e.contextProviders),streamParser:u(e.streamParser)}}var x=`({ text, message }: any) => {
|
|
2
2
|
const jsonSource = (message as any).rawContent || text || message.content;
|
|
3
3
|
if (!jsonSource || typeof jsonSource !== 'string') return null;
|
|
4
4
|
let cleanJson = jsonSource
|