chore: Remove AI sign posting (#28861)

## Description
This PR removed the AI signposting and the description in the AI quick
command menu in EE.
The changes in the CE codebase is related to that change. The EE changes
are in [this PR](https://github.com/appsmithorg/appsmith-ee/pull/2876)

Widget property pane signposting
<img width="301" alt="Screenshot 2023-11-15 at 10 20 40 AM"
src="https://github.com/appsmithorg/appsmith/assets/18716465/37c29aa4-9b2a-469e-9774-09ff78a13370">

Widget Property slash command menu
<img width="272" alt="Screenshot 2023-11-15 at 10 38 16 AM"
src="https://github.com/appsmithorg/appsmith/assets/18716465/6fff5ae3-d5cd-4061-bd39-4edf6c47451d">

SQL query slash command menu
<img width="274" alt="Screenshot 2023-11-15 at 10 38 36 AM"
src="https://github.com/appsmithorg/appsmith/assets/18716465/1ebcf670-05cc-4295-952c-9709add67575">

JS Object slash command menu
<img width="290" alt="Screenshot 2023-11-15 at 10 38 26 AM"
src="https://github.com/appsmithorg/appsmith/assets/18716465/63265c2c-8a9a-4c53-9777-e38fe1424999">


#### PR fixes following issue(s)
Fixes # (issue number)
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
This commit is contained in:
Diljit 2023-11-15 16:37:54 +05:30 committed by GitHub
parent 8ed80df3eb
commit ba41d51eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 37 deletions

View File

@ -10,14 +10,12 @@ export function CodeEditorSignPosting(props: {
isOpen?: boolean;
editorTheme?: EditorTheme;
showLightningMenu?: boolean;
isAIEnabled?: boolean;
mode: TEditorModes;
forComp?: string;
}): JSX.Element {
return (
<BindingPrompt
editorTheme={props.editorTheme}
isAIEnabled={props.isAIEnabled}
isOpen={props.isOpen || false}
promptMessage={props.promptMessage}
showLightningMenu={props.showLightningMenu}

View File

@ -1,11 +0,0 @@
import type { TEditorModes } from "components/editorComponents/CodeEditor/EditorConfig";
export interface Props {
isAIEnabled: boolean;
mode: TEditorModes;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function EditorFormSignPosting(props: Props) {
return null;
}

View File

@ -28,7 +28,6 @@ function BindingPrompt(props: {
isOpen: boolean;
editorTheme?: EditorTheme;
showLightningMenu?: boolean;
isAIEnabled?: boolean;
}): JSX.Element {
const promptRef = useRef<HTMLDivElement>(null);
const customMessage = !!props.promptMessage;

View File

@ -100,8 +100,8 @@ export function Command(props: {
}) {
return (
<div className="command-container">
<div className="command">
{props.icon}
<div className="command flex">
<div className="self-center">{props.icon}</div>
<div className="flex flex-col gap-1">
<div className="overflow-hidden overflow-ellipsis whitespace-nowrap flex flex-row items-center gap-2 text-[color:var(--ads-v2\-colors-content-label-default-fg)]">
{props.name}
@ -235,7 +235,6 @@ export const generateQuickCommands = (
displayText: APPSMITH_AI,
shortcut: Shortcuts.ASK_AI,
triggerCompletionsPostPick: true,
description: "Generate code using AI",
isBeta: true,
action: () => {
executeCommand({

View File

@ -1694,7 +1694,6 @@ class CodeEditor extends Component<Props, State> {
<CodeEditorSignPosting
editorTheme={this.props.theme}
forComp="editor"
isAIEnabled={this.AIEnabled}
isOpen={this.isBindingPromptOpen()}
mode={this.props.mode}
promptMessage={this.props.promptMessage}

View File

@ -1 +0,0 @@
export * from "ce/components/editorComponents/EditorFormSignPosting";

View File

@ -124,10 +124,6 @@ import { ENTITY_TYPE as SOURCE_ENTITY_TYPE } from "entities/AppsmithConsole";
import { DocsLink, openDoc } from "../../../constants/DocumentationLinks";
import ActionExecutionInProgressView from "components/editorComponents/ActionExecutionInProgressView";
import { CloseDebugger } from "components/editorComponents/Debugger/DebuggerTabs";
import { isAIEnabled } from "@appsmith/components/editorComponents/GPT/trigger";
import { editorSQLModes } from "components/editorComponents/CodeEditor/sql/config";
import { EditorFormSignPosting } from "@appsmith/components/editorComponents/EditorFormSignPosting";
import { selectFeatureFlags } from "@appsmith/selectors/featureFlagsSelectors";
import {
getHasCreateDatasourcePermission,
getHasExecuteActionPermission,
@ -915,15 +911,6 @@ export function EditorJSONtoForm(props: Props) {
dispatch(setDebuggerSelectedTab(tabKey));
}, []);
const isPostgresPlugin = currentActionPluginName === PluginName.POSTGRES;
const featureFlags = useSelector(selectFeatureFlags);
const editorMode = isPostgresPlugin
? editorSQLModes.POSTGRESQL_WITH_BINDING
: editorSQLModes.MYSQL_WITH_BINDING;
const isAIEnabledForPosting =
isPostgresPlugin && isAIEnabled(featureFlags, editorMode);
// close the debugger
//TODO: move this to a common place
const onClose = () => dispatch(showDebugger(false));
@ -1014,11 +1001,6 @@ export function EditorJSONtoForm(props: Props) {
className="tab-panel"
value={EDITOR_TABS.QUERY}
>
<EditorFormSignPosting
isAIEnabled={isAIEnabledForPosting}
mode={editorMode}
/>
<SettingsWrapper>
{editorConfig && editorConfig.length > 0 ? (
renderConfig(editorConfig)