Use Spark for repo Face heartbeats

This commit is contained in:
Meta Vens 2026-05-21 00:14:07 +01:00
commit 8507d7337f
4 changed files with 37 additions and 2 deletions

View file

@ -185,8 +185,8 @@ export class OwnerCodexProvider implements ProviderAdapter {
result = await runCodexExec({
executable: this.options.executable,
executableArgs: this.options.executableArgs,
model: this.options.model,
reasoningEffort: this.options.reasoningEffort,
model: getStringOption(request.options?.model) ?? this.options.model,
reasoningEffort: getReasoningEffortOption(request.options?.reasoningEffort) ?? this.options.reasoningEffort,
timeoutMs: this.options.timeoutMs,
workingDirectory: this.options.workingDirectory,
prompt: codexPrompt,
@ -387,3 +387,14 @@ export class OwnerCodexProvider implements ProviderAdapter {
};
}
}
function getStringOption(value: unknown): string | undefined {
return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
}
function getReasoningEffortOption(value: unknown): "low" | "medium" | "high" | "xhigh" | undefined {
if (value === "low" || value === "medium" || value === "high" || value === "xhigh") {
return value;
}
return undefined;
}