diff --git a/frontend/src/lib/components/IconedResourceType.svelte b/frontend/src/lib/components/IconedResourceType.svelte index 056af6c320..996cfb2a79 100644 --- a/frontend/src/lib/components/IconedResourceType.svelte +++ b/frontend/src/lib/components/IconedResourceType.svelte @@ -1,6 +1,6 @@ @@ -56,7 +50,9 @@ {:else} - + + + {/if} {#if !silent && after} {name} diff --git a/frontend/src/lib/components/ResourcePicker.svelte b/frontend/src/lib/components/ResourcePicker.svelte index 60b15277e0..8342bbecf6 100644 --- a/frontend/src/lib/components/ResourcePicker.svelte +++ b/frontend/src/lib/components/ResourcePicker.svelte @@ -11,6 +11,7 @@ import Select from './select/Select.svelte' import ExploreAssetButton, { assetCanBeExplored } from './ExploreAssetButton.svelte' import DropdownV2 from './DropdownV2.svelte' + import { appIconComponent } from './icons' interface Props { initialValue?: string | undefined @@ -186,6 +187,8 @@ let resourceEditor: ResourceEditorDrawer | undefined = $state() let hovering = $state(false) let isDatatableSelected = $derived(value?.startsWith('datatable://') ?? false) + let typeByPath = $derived(new Map(collection.map((x) => [x.value, x.type]))) + let SelectedIcon = $derived(appIconComponent(typeByPath.get(value!))) +{#snippet selectedIconSnippet()} + {#if SelectedIcon} + + {/if} +{/snippet} +
+ {#snippet startSnippet({ item })} + {@const Icon = appIconComponent(typeByPath.get(item.value))} + {#if Icon} + + + + {/if} + {/snippet} {#snippet endSnippet({ item, close })} {#if !item.value?.startsWith('datatable://')}
{/if} + {#if inputLeadingSnippet} +
+ {@render inputLeadingSnippet()} +
+ {/if} + {#if tooltip}
{tooltip} @@ -204,6 +214,7 @@ 'focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0', open ? '' : 'cursor-pointer', loading || (clearable && !disabled && value) || RightIcon ? 'pr-7' : '', + inputLeadingSnippet ? 'pl-7' : '', 'empty:before:content-[attr(data-placeholder)]', !value ? 'empty:before:text-hint' : 'empty:before:text-primary', disabled && '!bg-surface-disabled !border-transparent !text-disabled pointer-events-none', @@ -244,6 +255,7 @@ // Show value as placeholder when opening the dropdown and the search is empty !value ? 'placeholder-hint' : '!placeholder-primary', loading || (clearable && !disabled && value) || RightIcon ? 'pr-8' : '', + inputLeadingSnippet ? 'pl-7' : '', inputClass ?? '' )} autocomplete="off" diff --git a/frontend/src/lib/components/workspaceSettings/AISettings.svelte b/frontend/src/lib/components/workspaceSettings/AISettings.svelte index f44059e395..48e3fb7f15 100644 --- a/frontend/src/lib/components/workspaceSettings/AISettings.svelte +++ b/frontend/src/lib/components/workspaceSettings/AISettings.svelte @@ -387,7 +387,7 @@ {/if} {#if showWorkspaceOverrideEditor} -
+
{#each Object.entries(AI_PROVIDERS) as [provider, details] (provider)}
diff --git a/frontend/src/lib/components/workspaceSettings/InstanceFallbackSettings.svelte b/frontend/src/lib/components/workspaceSettings/InstanceFallbackSettings.svelte index 2bfe4b8790..c6eee8ff8b 100644 --- a/frontend/src/lib/components/workspaceSettings/InstanceFallbackSettings.svelte +++ b/frontend/src/lib/components/workspaceSettings/InstanceFallbackSettings.svelte @@ -30,7 +30,7 @@ {#if instanceAiSummary} -
+

This workspace is currently using the instance AI defaults shown below.

@@ -91,7 +91,7 @@ {/if} -
+

Create workspace-specific AI settings only if this workspace needs to override the active instance defaults.