diff --git a/src/lib/components/automations/AutomationEditor.svelte b/src/lib/components/automations/AutomationEditor.svelte index b4d377cbb2..7441c7b12d 100644 --- a/src/lib/components/automations/AutomationEditor.svelte +++ b/src/lib/components/automations/AutomationEditor.svelte @@ -45,6 +45,10 @@ let runs: AutomationRunModel[] = []; let linkedRun: AutomationRunModel | null = null; + $: visibleRuns = + linkedRun && !runs.some((run) => run.id === linkedRun?.id) + ? [...runs, linkedRun].sort((a, b) => b.created_at - a.created_at) + : runs; let linkedRunId = ''; let alive = true; onDestroy(() => { @@ -337,29 +341,23 @@
- {#if linkedRun}
-
- {$i18n.t('Automation failed')} ยท {formatTime(linkedRun.created_at)} -
-

{linkedRun.error}

-
{/if}
{$i18n.t('Runs')}
- {#if runsLoading && runs.length === 0} + {#if runsLoading && visibleRuns.length === 0}
- {:else if runs.length === 0} + {:else if visibleRuns.length === 0}
{$i18n.t('No runs yet')}
{:else}
- {#each runs as run} -
+ {#each visibleRuns as run} +
-
- {#each filteredItems as item, i} - {#if i === 0 || item?.type !== filteredItems[i - 1]?.type} -
- {#if item?.type === 'user'} - {$i18n.t('Users')} - {:else if item?.type === 'model'} - {$i18n.t('Models')} - {:else if item?.type === 'app'} - {$i18n.t('Apps')} - {:else if item?.type === 'channel'} - {$i18n.t('Channels')} - {/if} -
- {/if} - - - - - {/each} -
+ {/if} + + + + + {/each} +
+
{/if} diff --git a/src/lib/components/chat/MessageInput/Commands/AtCommands.svelte b/src/lib/components/chat/MessageInput/Commands/AtCommands.svelte index 6e703b934f..752c82a3eb 100644 --- a/src/lib/components/chat/MessageInput/Commands/AtCommands.svelte +++ b/src/lib/components/chat/MessageInput/Commands/AtCommands.svelte @@ -245,7 +245,7 @@ {#each knowledgeResults as item, idx} {@const itemIdx = idx} {#if idx === 0 || item?.type !== knowledgeResults[idx - 1]?.type} -
+
{#if item?.type === 'folder'} {$i18n.t('Folders')} {:else if item?.type === 'collection'} @@ -259,9 +259,9 @@ {/if} {:else if webUploadEnabled && query.startsWith('http')}