Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions app/web_ui/src/lib/ui/intro.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<script lang="ts">
import MarkdownBlock from "./markdown_block.svelte"

export let title: string
export let description_paragraphs: string[]
export let description_paragraphs: string[] | null = null
export let description_markdown: string | null = null
export let align_title_left: boolean = false

type ActionButton = {
Expand All @@ -23,11 +26,15 @@
>
{title}
</div>
{#each description_paragraphs as paragraph}
<div>
{paragraph}
</div>
{/each}
{#if description_markdown}
<MarkdownBlock markdown_text={description_markdown} />
{:else if description_paragraphs}
{#each description_paragraphs as paragraph}
<div>
{paragraph}
</div>
{/each}
{/if}
<slot name="description" />
<div class="flex flex-col gap-4 mt-2">
{#each action_buttons as button}
Expand Down
10 changes: 7 additions & 3 deletions app/web_ui/src/lib/ui/kiln_copilot/copilot_required_card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
<div class="flex flex-col items-center justify-center min-h-[60vh]">
<Intro
title="Kiln Copilot Required"
description_paragraphs={[
"Prompt Optimization requires Kiln Copilot to automatically optimize your prompts using state-of-the-art techniques.",
]}
description_markdown="Automatically optimize your prompts with state-of-the-art techniques.\n**Prompt optimization requires a Kiln Copilot paid plan.**"
action_buttons={[
{
label: "Connect Kiln Copilot",
href: "/prompt_optimization/copilot_auth",
is_primary: true,
},
{
label: "Learn More",
href: "https://docs.kiln.tech/docs/prompts/automatic-prompt-optimizer",
is_primary: false,
new_tab: true,
},
]}
>
<div slot="icon">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<div class="flex flex-col items-center justify-center min-h-[60vh]">
<Intro
title="{feature_name} Requires Upgrade"
title="{feature_name} Requires Account Upgrade"
description_paragraphs={[
`${feature_name} is available with an enterprise plan. Contact our sales team to learn more about upgrading your account.`,
`${feature_name} is available with an enterprise plan. Contact our sales team to learn more about upgrading your Kiln Copilot account.`,
]}
action_buttons={[
{
Expand All @@ -17,6 +17,12 @@
is_primary: true,
new_tab: true,
},
{
label: "Learn More",
href: "https://docs.kiln.tech/docs/prompts/automatic-prompt-optimizer",
Comment thread
sfierro marked this conversation as resolved.
is_primary: false,
new_tab: true,
},
]}
>
<div slot="icon">
Expand Down
Loading