Fix archived agent reload failures
Unarchive provider storage before clearing Paseo's archived flag so failed native restores keep the snapshot archived. Keep initial history sync errors visible instead of falling back to the loading state.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import type { AgentScreenMissingState } from "@/hooks/use-agent-screen-state-machine";
|
||||
|
||||
export function reconcileMissingAgentStateWithPresentAgent(
|
||||
state: AgentScreenMissingState,
|
||||
): AgentScreenMissingState {
|
||||
if (state.kind === "resolving" || state.kind === "not_found") {
|
||||
return { kind: "idle" };
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
export function clearHistorySyncErrorAfterSuccessfulSync(
|
||||
state: AgentScreenMissingState,
|
||||
): AgentScreenMissingState {
|
||||
if (state.kind === "error") {
|
||||
return { kind: "idle" };
|
||||
}
|
||||
return state;
|
||||
}
|
||||
Reference in New Issue
Block a user