From 62a896be46fc04ad81eed0b6996116ce8e86e747 Mon Sep 17 00:00:00 2001 From: Sean Teramae Date: Mon, 10 Aug 2026 13:55:00 -0700 Subject: [PATCH 1/4] feat(studio): Add prompt presets for DD AI describe Signed-off-by: Sean Teramae --- .../DescribeWithAiPanel.tsx | 48 ++++++++++++++----- .../PromptSuggestionPills.tsx | 33 +++++++++++++ .../CreateFilesetStart/constants.ts | 24 +++++++++- .../components/CreateFilesetStart/types.ts | 13 +++++ 4 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 web/packages/studio/src/components/CreateFilesetStart/PromptSuggestionPills.tsx diff --git a/web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx b/web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx index 01d928e53a..53d1425053 100644 --- a/web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx +++ b/web/packages/studio/src/components/CreateFilesetStart/DescribeWithAiPanel.tsx @@ -2,12 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import { useModelSearch } from '@nemo/common/src/api/models/useModelSearch'; -import { ControlledTextArea } from '@nemo/common/src/components/form/ControlledTextArea'; import { LoadingButton } from '@nemo/common/src/components/LoadingButton'; import { ModelSelectV2 } from '@nemo/common/src/components/ModelSelectV2/ModelSelectV2'; import type { ModelSelection } from '@nemo/common/src/components/ModelSelectV2/types'; -import { Flex, FormField, Stack } from '@nvidia/foundations-react-core'; +import { Block, Flex, FormField, Stack, TextArea } from '@nvidia/foundations-react-core'; +import { PROMPT_SUGGESTIONS } from '@studio/components/CreateFilesetStart/constants'; import { GeneratedConfigResult } from '@studio/components/CreateFilesetStart/GeneratedConfigResult'; +import { PromptSuggestionPills } from '@studio/components/CreateFilesetStart/PromptSuggestionPills'; import type { DescribeWithAiPanelProps } from '@studio/components/CreateFilesetStart/types'; import { useDescribeWithAi } from '@studio/components/CreateFilesetStart/useDescribeWithAi'; import { providerForSelection } from '@studio/routes/DataDesignerJobBuildRoute/models'; @@ -15,7 +16,7 @@ import type { FC } from 'react'; import { useController } from 'react-hook-form'; const PROMPT_PLACEHOLDER = - '100 customer support emails, each labelled as phishing or legitimate, with a short reason for the label and the sender domain. Sampled across categories (billing, returns, tech support) with subcategories per category (billing: overcharge, failed payment; returns: damaged item, wrong size)'; + 'Describe the rows you want: how many, what each column holds, and how the data should vary. Or start from an example below.'; const MODEL_HELP = 'Needs tool-calling support. This model will be used in LLM columns.'; @@ -36,6 +37,13 @@ export const DescribeWithAiPanel: FC = ({ workspace, o }); const modelValue: ModelSelection | null = modelField.value ? { model: modelField.value } : null; + const { field: promptField, fieldState: promptState } = useController({ + control: form.control, + name: 'prompt', + }); + // Suggestions only make sense on an empty field — once there is text they would cover it. + const showSuggestions = promptField.value.trim().length === 0 && !isBusy; + return (
@@ -65,15 +73,33 @@ export const DescribeWithAiPanel: FC = ({ workspace, o /> - + > + +