mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 15:02:39 +00:00
Default connect to waiting for health
This commit is contained in:
parent
b860767d3f
commit
ebf450bd99
9 changed files with 10 additions and 10 deletions
|
|
@ -510,6 +510,7 @@ export class SandboxAgent {
|
|||
token: handle.token,
|
||||
fetch: options.fetch,
|
||||
headers: options.headers,
|
||||
waitForHealth: false,
|
||||
persist: options.persist,
|
||||
replayMaxEvents: options.replayMaxEvents,
|
||||
replayMaxChars: options.replayMaxChars,
|
||||
|
|
@ -1297,11 +1298,11 @@ function normalizePositiveInt(value: number | undefined, fallback: number): numb
|
|||
function normalizeHealthWaitOptions(
|
||||
value: boolean | SandboxAgentHealthWaitOptions | undefined,
|
||||
): NormalizedHealthWaitOptions {
|
||||
if (!value) {
|
||||
if (value === false) {
|
||||
return { enabled: false };
|
||||
}
|
||||
|
||||
if (value === true) {
|
||||
if (value === true || value === undefined) {
|
||||
return { enabled: true };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,6 @@ describe("Integration: TypeScript SDK flat session API", () => {
|
|||
const sdk = await SandboxAgent.connect({
|
||||
token,
|
||||
fetch: customFetch,
|
||||
waitForHealth: true,
|
||||
});
|
||||
|
||||
const agents = await sdk.listAgents();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue