This commit is contained in:
legop3
2026-02-24 23:59:12 -05:00
parent 315ce61ef7
commit 9647a71d49
6 changed files with 303 additions and 151 deletions
+2
View File
@@ -23,6 +23,7 @@ const SessionContext = createContext({
setAdminReason: async () => {},
rebootRover: async () => {},
rebootServer: async () => {},
llmControl: async () => {},
});
function useAckEmitter(socket) {
@@ -129,6 +130,7 @@ export function SessionProvider({ children }) {
rebootRover: (roverId) =>
emitWithAck('command', { roverId, type: 'reboot', data: { reboot: {} } }),
rebootServer: () => emitWithAck('server:reboot'),
llmControl: (action, payload = {}) => emitWithAck('llm:control', { action, ...payload }),
pushAlert: (alert) =>
setAlerts((prev) => [
...prev.slice(-49),