community goal system

This commit is contained in:
legop3
2026-01-16 16:02:56 -05:00
parent 64a9dd3583
commit 90fd0262c7
15 changed files with 517 additions and 137 deletions
+2
View File
@@ -16,6 +16,7 @@ const SessionContext = createContext({
homeAssistantSetState: async () => {},
setNickname: async () => {},
triggerReplay: async () => {},
setCommunityGoal: async () => {},
});
function useAckEmitter(socket) {
@@ -98,6 +99,7 @@ export function SessionProvider({ children }) {
emitWithAck('homeAssistant:setState', { entityId, state }),
setNickname: (nickname) => emitWithAck('nickname:set', { nickname }),
triggerReplay: (sources = []) => emitWithAck('replay:trigger', { sources }),
setCommunityGoal: (text) => emitWithAck('communityGoal:set', { text }),
pushAlert: (alert) =>
setAlerts((prev) => [
...prev.slice(-49),