First Release of Claw3D (#11)

Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
This commit is contained in:
Luke The Dev
2026-03-19 23:14:04 -05:00
committed by GitHub
parent 5ea96b2650
commit 4fa4f13558
431 changed files with 105438 additions and 14 deletions
@@ -0,0 +1,28 @@
import type { AgentState } from "@/features/agents/state/store";
const normalizedRunId = (value: unknown): string => {
return typeof value === "string" ? value.trim() : "";
};
export const mergePendingLivePatch = (
existing: Partial<AgentState> | undefined,
incoming: Partial<AgentState>
): Partial<AgentState> => {
if (!existing) return incoming;
const existingRunId = normalizedRunId(existing.runId);
const incomingRunId = normalizedRunId(incoming.runId);
if (incomingRunId && existingRunId && incomingRunId !== existingRunId) {
return incoming;
}
if (incomingRunId && !existingRunId) {
const rest = { ...existing };
delete rest.streamText;
delete rest.thinkingTrace;
return { ...rest, ...incoming };
}
return { ...existing, ...incoming };
};