Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(office): run Gigi's follow step after the errand branch

rubenluetke10-beep65389bac0c7c
diff --git a/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx b/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx
index 260e61b388..17d75a924c 100644
--- a/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx
+++ b/jarvis/ui/web/frontend/src/components/society/office/OfficeAgents.tsx
@@ -217,6 +217,12 @@ function Walker({ agent, desk, ctx, arrivesByElevator, awake, reduced, selected,
plan.current = null;
agentPositions.set(agent.agentId, { x: m.x, z: m.z });
seatedAtDesk.delete(agent.agentId);
+ if (group.current) group.current.position.set(m.x, 0, m.z);
+ return;
+ }
+ errandKey.current = "";
+ const summon = useOfficeStore.getState().summons[agent.agentId];
+ const calledTo = summon && summon.untilMs > now ? summon.target : null;
if (isGigi && !calledTo) {
// Gigi keeps the person company, as on the coding floor; an errand or a summons still takes it away.
const anchor = followAnchor(player.x, player.z, player.heading, gigiSide.current, airClear);
@@ -248,12 +254,6 @@ function Walker({ agent, desk, ctx, arrivesByElevator, awake, reduced, selected,
}
if (followingRef.current) { followingRef.current = false; setFollowing(false); }
companions.delete(agent.agentId);
- if (group.current) group.current.position.set(m.x, 0, m.z);
- return;
- }
- errandKey.current = "";
- const summon = useOfficeStore.getState().summons[agent.agentId];
- const calledTo = summon && summon.untilMs > now ? summon.target : null;
const sKey = calledTo ? `${calledTo.x.toFixed(2)},${calledTo.z.toFixed(2)}` : "";
const needsPlan = !plan.current || planState.current !== agent.state || summonKey.current !== sKey
|| (phase.current === "dwell" && now >= dwellUntil.current);