style: oxfmt core files
This commit is contained in:
@@ -72,8 +72,7 @@ function collectToolFailures(messages: AgentMessage[]): ToolFailure[] {
|
||||
isError?: unknown;
|
||||
};
|
||||
if (toolResult.isError !== true) continue;
|
||||
const toolCallId =
|
||||
typeof toolResult.toolCallId === "string" ? toolResult.toolCallId : "";
|
||||
const toolCallId = typeof toolResult.toolCallId === "string" ? toolResult.toolCallId : "";
|
||||
if (!toolCallId || seen.has(toolCallId)) continue;
|
||||
seen.add(toolCallId);
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@ function isPrimitive(value: unknown): value is string | number | boolean | bigin
|
||||
function normalizeForHash(value: unknown): unknown {
|
||||
if (value === undefined) return undefined;
|
||||
if (Array.isArray(value)) {
|
||||
const normalized = value.map(normalizeForHash).filter((item): item is unknown => item !== undefined);
|
||||
const normalized = value
|
||||
.map(normalizeForHash)
|
||||
.filter((item): item is unknown => item !== undefined);
|
||||
const primitives = normalized.filter(isPrimitive);
|
||||
if (primitives.length === normalized.length) {
|
||||
return [...primitives].sort((a, b) => String(a).localeCompare(String(b)));
|
||||
|
||||
@@ -256,8 +256,7 @@ export async function ensureSandboxContainer(params: {
|
||||
registryEntry = registry.entries.find((entry) => entry.containerName === containerName);
|
||||
currentHash = await readContainerConfigHash(containerName);
|
||||
if (!currentHash) {
|
||||
currentHash =
|
||||
registryEntry?.configHash ?? null;
|
||||
currentHash = registryEntry?.configHash ?? null;
|
||||
}
|
||||
hashMismatch = !currentHash || currentHash !== expectedHash;
|
||||
if (hashMismatch) {
|
||||
@@ -296,7 +295,7 @@ export async function ensureSandboxContainer(params: {
|
||||
createdAtMs: now,
|
||||
lastUsedAtMs: now,
|
||||
image: params.cfg.docker.image,
|
||||
configHash: hashMismatch && running ? currentHash ?? undefined : expectedHash,
|
||||
configHash: hashMismatch && running ? (currentHash ?? undefined) : expectedHash,
|
||||
});
|
||||
return containerName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user