add reboot command

This commit is contained in:
legop3
2026-02-18 15:09:36 -05:00
parent eb52c8c6ac
commit 40e21d4ac5
11 changed files with 211 additions and 129 deletions
+3
View File
@@ -20,6 +20,7 @@ const SessionContext = createContext({
triggerReplay: async () => {},
setCommunityGoal: async () => {},
setAdminReason: async () => {},
rebootRover: async () => {},
});
function useAckEmitter(socket) {
@@ -117,6 +118,8 @@ export function SessionProvider({ children }) {
triggerReplay: (sources = []) => emitWithAck('replay:trigger', { sources }),
setCommunityGoal: (text) => emitWithAck('communityGoal:set', { text }),
setAdminReason: (text) => emitWithAck('adminReason:set', { text }),
rebootRover: (roverId) =>
emitWithAck('command', { roverId, type: 'reboot', data: { reboot: {} } }),
pushAlert: (alert) =>
setAlerts((prev) => [
...prev.slice(-49),