diff --git a/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte b/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte index 0076ba4f9d..a35966ac5c 100644 --- a/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte +++ b/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte @@ -169,7 +169,7 @@ ({ - value: script.path, - label: `${script.path}${script.summary ? ` | ${truncate(script.summary, 20)}` : ''}` - }) - ) + if (kinds.length === 1) { + items = (await ScriptService.listScripts({ workspace: $workspaceStore!, kind: kinds[0]})).map( + (script) => ({ + value: script.path, + label: `${script.path}${script.summary ? ` | ${truncate(script.summary, 20)}` : ''}` + }) + ) + } else { + items = (await ScriptService.listScripts({ workspace: $workspaceStore! })).filter( + (script) => kinds.includes(script.kind) + ).map( + (script) => ({ + value: script.path, + label: `${script.path}${script.summary ? ` | ${truncate(script.summary, 20)}` : ''}` + }) + ) + } } else { items = $hubScripts?.map((x) => ({ diff --git a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte index 71156629f9..dee2cb9644 100644 --- a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte @@ -326,7 +326,7 @@
{/if}