diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index 8ddee45a1f..a21e389dbd 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -345,11 +345,16 @@ websocketInterval && clearInterval(websocketInterval) websocketInterval = setInterval(() => { - console.log('websocketInterval') + console.log( + websocketInterval, + document.visibilityState, + new Date().getTime() - lastWsAttempt.getTime(), + nbWsAttempt + ) if (document.visibilityState == 'visible') { if ( !lastWsAttempt || - (lastWsAttempt.getTime() - new Date().getTime() > 60000 && nbWsAttempt < 2) + (new Date().getTime() - lastWsAttempt.getTime() > 60000 && nbWsAttempt < 2) ) { if (!websocketAlive.black && !websocketAlive.deno && !websocketAlive.pyright) { console.log('reconnecting to language servers') diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index e7a0213c13..07ca4e2643 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -38,8 +38,8 @@ export const DENO_INIT_CODE = `// reload the smart assistant on the top right if export async function main( a: number, b: "my" | "enum", - c: { nested: "object" }, - d: string = "default arg", + d = "inferred type string from default arg", + c = { nested: "object" }, //e: wmill.Base64 ) { // let x = await wmill.getVariable('u/user/foo') diff --git a/frontend/src/routes/scripts/get/[...hash].svelte b/frontend/src/routes/scripts/get/[...hash].svelte index 8db3c4bf0e..49bd065633 100644 --- a/frontend/src/routes/scripts/get/[...hash].svelte +++ b/frontend/src/routes/scripts/get/[...hash].svelte @@ -303,34 +303,40 @@

Webhook to run this script and get job's uuid as response Send a POST http request with a token as bearer token and the args respecting the - corresponding jsonschema as payload. To create a permanent token, go to your user - setting by clicking your username on the top-left.Send a POST http request with a token as bearer token (or pass it as query arg 'token') + and the args respecting the corresponding jsonschema as payload. To create a permanent + token, go to your user setting by clicking your username on the top-left.

By hash: /api/w/{$workspaceStore}/jobs/run/h/{script?.hash}By hash: {$page.url
+								.hostname}/api/w/{$workspaceStore}/api/w/{$workspaceStore}/jobs/run/h/{script?.hash}
By path: /api/w/{$workspaceStore}/jobs/run/p/{script?.path}By path: {$page.url.hostname}/api/w/{$workspaceStore}/jobs/run/p/{script?.path}

Endpoint to run this script and get job's result as response Send a POST http request with a token as bearer token and the args respecting the - corresponding jsonschema as payload. To create a permanent token, go to your user - setting by clicking your username on the top-left.Send a POST http request with a token as bearer token (or pass it as query arg 'token') + and the args respecting the corresponding jsonschema as payload. To create a permanent + token, go to your user setting by clicking your username on the top-left.

/api/w/{$workspaceStore}/jobs/run_wait_result/p/{script?.path}{$page.url.hostname}/api/w/{$workspaceStore}/jobs/run_wait_result/p/{script?.path}