@afncdelacru/brady-chat 0.3.5 → 0.3.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@afncdelacru/brady-chat",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Brady AI chat sidebar component and context for AFN recruiting experiences.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"afn"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@afncdelacru/brady-chat": "^0.3.
|
|
35
|
+
"@afncdelacru/brady-chat": "^0.3.6"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -29,6 +29,7 @@ export interface EnhancedBradyChatProps {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export function EnhancedBradyChat({ modeVariant = 'loan-officer', avatarSrc }: EnhancedBradyChatProps) {
|
|
32
|
+
|
|
32
33
|
const [bradyHealthy, setBradyHealthy] = useState(true);
|
|
33
34
|
const {
|
|
34
35
|
workflowType,
|
|
@@ -61,6 +62,7 @@ export function EnhancedBradyChat({ modeVariant = 'loan-officer', avatarSrc }: E
|
|
|
61
62
|
|
|
62
63
|
const handleFocusToggle = () => {
|
|
63
64
|
// Always set isModeActive to true before calling resetMode
|
|
65
|
+
console.log('EnhancedBradyChat: pageMode =', pageMode, 'isModeActive =', isModeActive);
|
|
64
66
|
if (isModeActive) {
|
|
65
67
|
// Defensive: ensure isModeActive is true (should be by logic)
|
|
66
68
|
resetMode();
|
|
@@ -114,6 +116,8 @@ export function EnhancedBradyChat({ modeVariant = 'loan-officer', avatarSrc }: E
|
|
|
114
116
|
}, [workflowType]);
|
|
115
117
|
|
|
116
118
|
useEffect(() => {
|
|
119
|
+
|
|
120
|
+
console.log('EnhancedBradyChat: pageMode =', pageMode, 'isModeActive =', isModeActive);
|
|
117
121
|
// Only react to activeMode changes (not modeStep or unstable addMessage) so volume prompts run once per activation.
|
|
118
122
|
if (activeMode === 'none' || modeStep !== 'volume') {
|
|
119
123
|
return;
|
|
@@ -155,7 +159,7 @@ export function EnhancedBradyChat({ modeVariant = 'loan-officer', avatarSrc }: E
|
|
|
155
159
|
}, 500);
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
|
-
|
|
162
|
+
|
|
159
163
|
return () => {
|
|
160
164
|
if (timeoutId !== undefined) clearTimeout(timeoutId);
|
|
161
165
|
};
|
|
@@ -425,6 +429,7 @@ export function EnhancedBradyChat({ modeVariant = 'loan-officer', avatarSrc }: E
|
|
|
425
429
|
<div className="relative inline-flex items-center h-[34px] w-[150px] dark:bg-zinc-800/50 bg-zinc-200 rounded-full p-1">
|
|
426
430
|
<button
|
|
427
431
|
onClick={() => {
|
|
432
|
+
activeMode = 'none';
|
|
428
433
|
resetMode();
|
|
429
434
|
// Optionally, if resetMode is async or state is not immediately updated, force a rerender or callback
|
|
430
435
|
}}
|