Feature/avatar customization (#25)

* Avatar Customization + Update Agent Brain

* Bugfixes

---------

Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
This commit is contained in:
Luke The Dev
2026-03-20 23:17:30 -05:00
committed by GitHub
parent 65c2b9cf85
commit 6b5895dcfe
3 changed files with 42 additions and 12 deletions
+22 -8
View File
@@ -1799,11 +1799,18 @@ export function OfficeScreen({
spokenPhoneCallKeysRef.current = new Set(
[...spokenPhoneCallKeysRef.current].filter((key) => activeKeys.has(key)),
);
setPreparedPhoneCallsByAgentId((previous) =>
Object.fromEntries(
setPreparedPhoneCallsByAgentId((previous) => {
const next = Object.fromEntries(
Object.entries(previous).filter(([, entry]) => activeKeys.has(entry.requestKey)),
),
);
);
if (
Object.keys(previous).length === Object.keys(next).length &&
Object.keys(previous).every((agentId) => previous[agentId] === next[agentId])
) {
return previous;
}
return next;
});
}, [phoneCallByAgentId]);
useEffect(() => {
@@ -1955,11 +1962,18 @@ export function OfficeScreen({
preparedTextMessageKeysRef.current = new Set(
[...preparedTextMessageKeysRef.current].filter((key) => activeKeys.has(key)),
);
setPreparedTextMessagesByAgentId((previous) =>
Object.fromEntries(
setPreparedTextMessagesByAgentId((previous) => {
const next = Object.fromEntries(
Object.entries(previous).filter(([, entry]) => activeKeys.has(entry.requestKey)),
),
);
);
if (
Object.keys(previous).length === Object.keys(next).length &&
Object.keys(previous).every((agentId) => previous[agentId] === next[agentId])
) {
return previous;
}
return next;
});
}, [textMessageByAgentId]);
useEffect(() => {