diff --git a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte
index 3be61accba..b9936eafc0 100644
--- a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte
+++ b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte
@@ -57,6 +57,7 @@
import { useUiIntent } from '$lib/components/copilot/chat/flow/useUiIntent'
import { editor as meditor } from 'monaco-editor'
import { DynamicInput } from '$lib/utils'
+ import { getActiveAdvancedSettings } from './flowModuleSettingsUtils.svelte'
const {
selectedId,
@@ -138,6 +139,9 @@
let assets = $derived((flowModule.value.type === 'rawscript' && flowModule.value.assets) || [])
+ // Advanced settings detection for indicators
+ let activeSettings = $derived(getActiveAdvancedSettings(flowModule))
+
// UI Intent handling for AI tool control
useUiIntent(`flow-${flowModule.id}`, {
openTab: (tab) => {
@@ -613,22 +617,17 @@
/>
{:else if selected === 'advanced'}
- Retries
+ Retries
{#if !$selectedId.includes('failure')}
- Runtime
- Cache
-
+ Runtime
+ Cache
+
Early Stop
- Skip
- Suspend
- Sleep
- Mock
+ Skip
+ Suspend
+ Sleep
+ Mock
Shared Directory
{#if flowModule.value['language'] === 'python3' || flowModule.value['language'] === 'deno'}
S3
@@ -637,10 +636,10 @@
{#if advancedSelected === 'runtime'}
- Concurrency
- Timeout
- Priority
- Lifetime
+ Concurrency
+ Timeout
+ Priority
+ Lifetime
{/if}
diff --git a/frontend/src/lib/components/flows/content/flowModuleSettingsUtils.svelte.ts b/frontend/src/lib/components/flows/content/flowModuleSettingsUtils.svelte.ts
new file mode 100644
index 0000000000..e7e7540750
--- /dev/null
+++ b/frontend/src/lib/components/flows/content/flowModuleSettingsUtils.svelte.ts
@@ -0,0 +1,40 @@
+import type { FlowModule } from '$lib/gen'
+
+/**
+ * Detects which advanced settings are active on a flow module
+ * Used to show badge indicators on settings tabs
+ */
+export function getActiveAdvancedSettings(flowModule: FlowModule) {
+ const hasConcurrencySetting =
+ flowModule.value.type === 'rawscript' &&
+ (flowModule.value.concurrent_limit !== undefined ||
+ flowModule.value.concurrency_time_window_s !== undefined ||
+ flowModule.value.custom_concurrency_key !== undefined)
+
+ const hasTimeoutSetting = Boolean(flowModule.timeout)
+ const hasPrioritySetting = flowModule.priority !== undefined && flowModule.priority > 0
+ const hasDeleteAfterUseSetting = Boolean(flowModule.delete_after_use)
+
+ return {
+ retry: flowModule.retry !== undefined,
+ cache: Boolean(flowModule.cache_ttl),
+ earlyStop: Boolean(flowModule.stop_after_if || flowModule.stop_after_all_iters_if),
+ skip: Boolean(flowModule.skip_if),
+ suspend: Boolean(flowModule.suspend),
+ sleep: Boolean(flowModule.sleep),
+ mock: Boolean(flowModule.mock?.enabled),
+ timeout: hasTimeoutSetting,
+ priority: hasPrioritySetting,
+ deleteAfterUse: hasDeleteAfterUseSetting,
+ concurrency: hasConcurrencySetting,
+ runtime: hasTimeoutSetting || hasPrioritySetting || hasDeleteAfterUseSetting || hasConcurrencySetting
+ }
+}
+
+/**
+ * Detects if any advanced setting is active on a flow module
+ */
+export function hasAnyAdvancedSetting(flowModule: FlowModule): boolean {
+ const settings = getActiveAdvancedSettings(flowModule)
+ return Object.values(settings).some((value) => value === true)
+}