vanilla-agent 1.8.0 → 1.9.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 +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +30 -30
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/panel.ts +5 -1
- package/src/ui.ts +11 -1
package/package.json
CHANGED
package/src/components/panel.ts
CHANGED
|
@@ -67,6 +67,8 @@ export interface PanelElements {
|
|
|
67
67
|
clearChatButton: HTMLButtonElement | null;
|
|
68
68
|
clearChatButtonWrapper: HTMLElement | null;
|
|
69
69
|
iconHolder: HTMLElement;
|
|
70
|
+
headerTitle: HTMLElement;
|
|
71
|
+
headerSubtitle: HTMLElement;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
export const buildPanel = (config?: AgentWidgetConfig, showClose = true): PanelElements => {
|
|
@@ -789,7 +791,9 @@ export const buildPanel = (config?: AgentWidgetConfig, showClose = true): PanelE
|
|
|
789
791
|
closeButtonWrapper,
|
|
790
792
|
clearChatButton,
|
|
791
793
|
clearChatButtonWrapper,
|
|
792
|
-
iconHolder
|
|
794
|
+
iconHolder,
|
|
795
|
+
headerTitle: title,
|
|
796
|
+
headerSubtitle: subtitle
|
|
793
797
|
};
|
|
794
798
|
};
|
|
795
799
|
|
package/src/ui.ts
CHANGED
|
@@ -224,7 +224,9 @@ export const createAgentExperience = (
|
|
|
224
224
|
introTitle,
|
|
225
225
|
introSubtitle,
|
|
226
226
|
closeButton,
|
|
227
|
-
iconHolder
|
|
227
|
+
iconHolder,
|
|
228
|
+
headerTitle,
|
|
229
|
+
headerSubtitle
|
|
228
230
|
} = panelElements;
|
|
229
231
|
|
|
230
232
|
// Use mutable references for mic button so we can update them dynamically
|
|
@@ -1295,6 +1297,14 @@ export const createAgentExperience = (
|
|
|
1295
1297
|
launcherButtonInstance.update(config);
|
|
1296
1298
|
}
|
|
1297
1299
|
|
|
1300
|
+
// Update panel header title and subtitle
|
|
1301
|
+
if (headerTitle && config.launcher?.title !== undefined) {
|
|
1302
|
+
headerTitle.textContent = config.launcher.title;
|
|
1303
|
+
}
|
|
1304
|
+
if (headerSubtitle && config.launcher?.subtitle !== undefined) {
|
|
1305
|
+
headerSubtitle.textContent = config.launcher.subtitle;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1298
1308
|
// Only update open state if launcher enabled state changed or autoExpand value changed
|
|
1299
1309
|
const launcherEnabledChanged = launcherEnabled !== prevLauncherEnabled;
|
|
1300
1310
|
const autoExpandChanged = autoExpand !== prevAutoExpand;
|