{#if firstTime}
diff --git a/frontend/src/lib/components/Path.svelte b/frontend/src/lib/components/Path.svelte
index 3aaa47ac9c..6e1244b05f 100644
--- a/frontend/src/lib/components/Path.svelte
+++ b/frontend/src/lib/components/Path.svelte
@@ -22,6 +22,7 @@
MqttTriggerService,
SqsTriggerService,
GcpTriggerService,
+ AzureTriggerService,
EmailTriggerService
} from '$lib/gen'
import { superadmin, userStore, workspaceStore } from '$lib/stores'
@@ -55,6 +56,7 @@
| 'mqtt_trigger'
| 'sqs_trigger'
| 'gcp_trigger'
+ | 'azure_trigger'
| 'email_trigger'
let meta: Meta | undefined = $state(undefined)
interface Props {
@@ -300,6 +302,11 @@
workspace: $workspaceStore!,
path: path
})
+ } else if (kind === 'azure_trigger') {
+ return await AzureTriggerService.existsAzureTrigger({
+ workspace: $workspaceStore!,
+ path: path
+ })
} else if (kind === 'email_trigger') {
return await EmailTriggerService.existsEmailTrigger({
workspace: $workspaceStore!,
diff --git a/frontend/src/lib/components/ScriptEditor.svelte b/frontend/src/lib/components/ScriptEditor.svelte
index 4fa7a41844..5d63bd8572 100644
--- a/frontend/src/lib/components/ScriptEditor.svelte
+++ b/frontend/src/lib/components/ScriptEditor.svelte
@@ -202,12 +202,18 @@
let testPanelSchema: Schema = $state(emptySchema())
// editorCode is what the editor shows; code always holds the main script content
let editorCode: string = $state(code)
- // Sync editorCode when code changes externally (template reset, copilot, etc.)
+ // Sync editorCode when code changes externally (template reset, copilot,
+ // new-script template init, etc.). We also re-run schema inference in that
+ // case — otherwise if the code prop is set after ScriptEditor's onMount (as
+ // happens on /scripts/add when initContent sets script.content after the
+ // editor has already mounted with an empty string), the schema would stay
+ // empty until the user typed into the editor.
let lastSyncedCode = code
$effect.pre(() => {
if (activeModuleTab === null && code !== lastSyncedCode) {
editorCode = code
lastSyncedCode = code
+ untrack(() => inferSchema(code))
}
})
@@ -1111,8 +1117,14 @@
}
})
- onMount(() => {
- inferSchema(code, { applyInitialArgs: true })
+ onMount(async () => {
+ await inferSchema(code, { applyInitialArgs: true })
+ // Retry once if the initial inference failed silently (e.g. transient WASM
+ // init race). Without this, users had to modify the code to trigger a
+ // second on:change-driven inference.
+ if (!validCode && code && lang) {
+ await inferSchema(code, { applyInitialArgs: true })
+ }
loadPastTests()
aiChatManager.saveAndClear()
aiChatManager.changeMode(AIMode.SCRIPT)
diff --git a/frontend/src/lib/components/ShareModal.svelte b/frontend/src/lib/components/ShareModal.svelte
index 357cd55946..0996e6ca7b 100644
--- a/frontend/src/lib/components/ShareModal.svelte
+++ b/frontend/src/lib/components/ShareModal.svelte
@@ -41,6 +41,7 @@
| 'sqs_trigger'
| 'postgres_trigger'
| 'gcp_trigger'
+ | 'azure_trigger'
| 'email_trigger'
| 'volume'
let kind: Kind
diff --git a/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte b/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte
index 140f20f140..9081283d09 100644
--- a/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte
+++ b/frontend/src/lib/components/copilot/chat/AIChatDisplay.svelte
@@ -3,8 +3,6 @@
import { type Snippet } from 'svelte'
import {
CheckIcon,
- Code2,
- FileCode,
HistoryIcon,
Loader2,
MousePointer2,
@@ -143,7 +141,7 @@
No history
{:else}
- {#each pastChats as chat}
+ {#each pastChats as chat (chat.id)}