@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.
@@ -6660,6 +6660,17 @@ type AgentWidgetConfig = {
6660
6660
  */
6661
6661
  loadingIndicator?: AgentWidgetLoadingIndicatorConfig;
6662
6662
  };
6663
+ /**
6664
+ * Patch-aware deep-partial of {@link AgentWidgetConfig} accepted by `update()`.
6665
+ * Function types and arrays are preserved whole (not mapped over); plain-object
6666
+ * leaves recurse so a partial patch merges into the live config. See the merge
6667
+ * policy in utils/config-merge.ts (some plain-object fields still replace
6668
+ * wholesale at runtime; that is not encoded at the type level).
6669
+ */
6670
+ type AgentWidgetConfigPatch = ConfigPatch<AgentWidgetConfig>;
6671
+ type ConfigPatch<T> = T extends (...args: never[]) => unknown ? T : T extends readonly unknown[] ? T : T extends object ? {
6672
+ [K in keyof T]?: ConfigPatch<T[K]>;
6673
+ } : T;
6663
6674
  type AgentWidgetMessageRole = "user" | "assistant" | "system";
6664
6675
  type AgentWidgetReasoning = {
6665
6676
  id: string;
@@ -7135,7 +7146,7 @@ type NPSFeedbackOptions = {
7135
7146
  };
7136
7147
 
7137
7148
  type Controller = {
7138
- update: (config: AgentWidgetConfig) => void;
7149
+ update: (config: AgentWidgetConfigPatch) => void;
7139
7150
  destroy: () => void;
7140
7151
  open: () => void;
7141
7152
  close: () => void;
@@ -6660,6 +6660,17 @@ type AgentWidgetConfig = {
6660
6660
  */
6661
6661
  loadingIndicator?: AgentWidgetLoadingIndicatorConfig;
6662
6662
  };
6663
+ /**
6664
+ * Patch-aware deep-partial of {@link AgentWidgetConfig} accepted by `update()`.
6665
+ * Function types and arrays are preserved whole (not mapped over); plain-object
6666
+ * leaves recurse so a partial patch merges into the live config. See the merge
6667
+ * policy in utils/config-merge.ts (some plain-object fields still replace
6668
+ * wholesale at runtime; that is not encoded at the type level).
6669
+ */
6670
+ type AgentWidgetConfigPatch = ConfigPatch<AgentWidgetConfig>;
6671
+ type ConfigPatch<T> = T extends (...args: never[]) => unknown ? T : T extends readonly unknown[] ? T : T extends object ? {
6672
+ [K in keyof T]?: ConfigPatch<T[K]>;
6673
+ } : T;
6663
6674
  type AgentWidgetMessageRole = "user" | "assistant" | "system";
6664
6675
  type AgentWidgetReasoning = {
6665
6676
  id: string;
@@ -7135,7 +7146,7 @@ type NPSFeedbackOptions = {
7135
7146
  };
7136
7147
 
7137
7148
  type Controller = {
7138
- update: (config: AgentWidgetConfig) => void;
7149
+ update: (config: AgentWidgetConfigPatch) => void;
7139
7150
  destroy: () => void;
7140
7151
  open: () => void;
7141
7152
  close: () => void;