mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:00:43 +00:00
test: require parallels agent responses
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { providerIdFromModelId, resolveParallelsModelTimeoutSeconds } from "./provider-auth.ts";
|
||||
|
||||
export function psSingleQuote(value: string): string {
|
||||
return `'${value.replaceAll("'", "''")}'`;
|
||||
}
|
||||
@@ -12,6 +14,17 @@ export function encodePowerShell(script: string): string {
|
||||
);
|
||||
}
|
||||
|
||||
export function windowsModelProviderTimeoutScript(modelId: string): string {
|
||||
const providerId = providerIdFromModelId(modelId);
|
||||
if (!providerId) {
|
||||
return "";
|
||||
}
|
||||
return `Invoke-OpenClaw config set ${psSingleQuote(
|
||||
`models.providers.${providerId}.timeoutSeconds`,
|
||||
)} ${resolveParallelsModelTimeoutSeconds("windows")} --strict-json
|
||||
if ($LASTEXITCODE -ne 0) { throw "model provider timeout config set failed" }`;
|
||||
}
|
||||
|
||||
export const windowsOpenClawResolver = String.raw`function Resolve-OpenClawCommand {
|
||||
if ($script:OpenClawResolvedCommand) { return $script:OpenClawResolvedCommand }
|
||||
$shimCandidates = @()
|
||||
|
||||
Reference in New Issue
Block a user