From 0ac87dbfe2410b34b175caf6fefea6eec43c2608 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Mon, 31 Mar 2025 12:03:43 +0530 Subject: [PATCH] feat: Dummy Generate Prompt Button (#39964) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description https://github.com/appsmithorg/appsmith-ee/pull/6813 ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 8fc65a57e1a3daa89cd44e43a5e399fbb26c9b6c > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Fri, 28 Mar 2025 11:09:57 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **New Features** - Introduced a prompt generation button in the form interface, allowing users to view the current prompt and update it interactively. - Added a new component, `GeneratePromptButton`, to facilitate prompt generation based on existing instructions. --- .../src/ce/components/GeneratePromptButton.tsx | 12 ++++++++++++ .../formControls/FormTemplateControl.tsx | 14 ++++++++++++++ .../src/ee/components/GeneratePromptButton.tsx | 1 + 3 files changed, 27 insertions(+) create mode 100644 app/client/src/ce/components/GeneratePromptButton.tsx create mode 100644 app/client/src/ee/components/GeneratePromptButton.tsx diff --git a/app/client/src/ce/components/GeneratePromptButton.tsx b/app/client/src/ce/components/GeneratePromptButton.tsx new file mode 100644 index 0000000000..b1ba47ec5b --- /dev/null +++ b/app/client/src/ce/components/GeneratePromptButton.tsx @@ -0,0 +1,12 @@ +import React from "react"; + +export interface GeneratePromptButtonProps { + existingPrompt: string; + onSubmit: (prompt: string) => void; +} + +// Implementation is in ee +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export const GeneratePromptButton = (props: GeneratePromptButtonProps) => { + return
; +}; diff --git a/app/client/src/components/formControls/FormTemplateControl.tsx b/app/client/src/components/formControls/FormTemplateControl.tsx index 8a81456741..c50f094ab7 100644 --- a/app/client/src/components/formControls/FormTemplateControl.tsx +++ b/app/client/src/components/formControls/FormTemplateControl.tsx @@ -10,6 +10,7 @@ import { connect } from "react-redux"; import { get, omit } from "lodash"; import type { AppState } from "ee/reducers"; import type { Action } from "entities/Action"; +import { GeneratePromptButton } from "ee/components/GeneratePromptButton"; const StyledButton = styled((props: ButtonProps & { isActive: boolean }) => (