{#if genLoading}
{/if} {#if $generatedCode.length > 0 && !genLoading} {#if inlineScript}
{:else}
{/if} {/if} {#if ($generatedCode.length === 0 || genLoading) && SUPPORTED_LANGUAGES.has(lang ?? '')} {#snippet trigger()} {#if inlineScript} {/if} {/snippet} {#snippet content({ close })}
{#if genLoading}
{#if $generatedCode.length > 0}
{:else} {/if}
{:else if $copilotInfo.enabled}
{#snippet children({ item })} {/snippet}
{#if promptHistory.length > 0}
{#each promptHistory as p} {/each}
{/if} {#if ['postgresql', 'mysql', 'snowflake', 'bigquery', 'mssql', 'graphql, oracledb'].includes(lang ?? '') && dbSchema?.lang === lang}

Context: {lang === 'graphql' ? 'GraphQL' : 'DB'} schema

We pass the selected schema to GPT-4 Turbo for better script generation. {#if dbSchema && dbSchema.stringified.length > MAX_SCHEMA_LENGTH} {#snippet text()} The schema is about {addThousandsSeparator( (dbSchema?.stringified.length ?? 0) / 3.5 )} tokens. To avoid exceeding the model's context length, it will be truncated to {addThousandsSeparator(MAX_SCHEMA_LENGTH / 3.5)} tokens. {/snippet} {/if}
{#if dbSchema && dbSchema.lang !== 'graphql' && (dbSchema.schema?.public || dbSchema.schema?.PUBLIC || dbSchema.schema?.dbo)} {#snippet children({ item })} {/snippet} {/if}
{/if}
{:else}

Enable Windmill AI in the workspace settings

{/if}
{/snippet}
{/if}