vanilla-agent 1.16.0 → 1.17.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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +2 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ui.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Themeable, plugable streaming agent widget for websites, in plain JS with support for voice input and reasoning / tool output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
package/src/ui.ts
CHANGED
|
@@ -139,7 +139,8 @@ export const createAgentExperience = (
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
let config = mergeWithDefaults(initialConfig) as AgentWidgetConfig;
|
|
142
|
-
applyThemeVariables(
|
|
142
|
+
// Note: applyThemeVariables is called after applyFullHeightStyles() below
|
|
143
|
+
// because applyFullHeightStyles resets mount.style.cssText
|
|
143
144
|
|
|
144
145
|
// Get plugins for this instance
|
|
145
146
|
const plugins = pluginRegistry.getForInstance(config.plugins);
|
|
@@ -578,6 +579,8 @@ export const createAgentExperience = (
|
|
|
578
579
|
wrapper.style.cssText += maxHeightStyles + paddingStyles;
|
|
579
580
|
};
|
|
580
581
|
applyFullHeightStyles();
|
|
582
|
+
// Apply theme variables after applyFullHeightStyles since it resets mount.style.cssText
|
|
583
|
+
applyThemeVariables(mount, config);
|
|
581
584
|
|
|
582
585
|
const destroyCallbacks: Array<() => void> = [];
|
|
583
586
|
const suggestionsManager = createSuggestions(suggestions);
|
|
@@ -1736,8 +1739,9 @@ export const createAgentExperience = (
|
|
|
1736
1739
|
update(nextConfig: AgentWidgetConfig) {
|
|
1737
1740
|
const previousToolCallConfig = config.toolCall;
|
|
1738
1741
|
config = { ...config, ...nextConfig };
|
|
1739
|
-
|
|
1742
|
+
// applyFullHeightStyles resets mount.style.cssText, so call it before applyThemeVariables
|
|
1740
1743
|
applyFullHeightStyles();
|
|
1744
|
+
applyThemeVariables(mount, config);
|
|
1741
1745
|
|
|
1742
1746
|
// Update plugins
|
|
1743
1747
|
const newPlugins = pluginRegistry.getForInstance(config.plugins);
|