support to build modules with prompt

This commit is contained in:
Swathi Hameed 2026-04-21 02:08:31 -07:00
parent 35f2c474fd
commit 8866b23a4d
7 changed files with 27 additions and 10 deletions

@ -1 +1 @@
Subproject commit 8b0a7bfa73f281d8fbe100324ef3fd1578fd0b36
Subproject commit 4becfb8ea76e119bfb5c5668362d5fff43755981

View file

@ -173,7 +173,17 @@ export const BaseLeftSidebar = ({
const renderLeftSidebarItems = () => {
if (isModuleEditor) {
return renderCommonItems();
return (
<>
{renderAISideBarTrigger({
darkMode,
setSideBarBtnRefs,
selectedSidebarItem,
handleSelectedSidebarItem,
})}
{renderCommonItems()}
</>
);
}
return (
<>

View file

@ -395,16 +395,11 @@ const useAppData = (
moduleId
);
if (
!moduleMode &&
state?.prompt &&
!promptSentRef.current &&
(conversation?.aiConversationMessages || []).length === 0
) {
if (state?.prompt && !promptSentRef.current && (conversation?.aiConversationMessages || []).length === 0) {
promptSentRef.current = true;
setSelectedSidebarItem('tooljetai');
toggleLeftSidebar(true);
sendMessage(state.prompt);
sendMessage(state.prompt, {}, {}, moduleId);
setIsQueryPaneExpanded(false);
// Clear prompt from navigation state so it doesn't re-trigger on page refresh
const { prompt: _prompt, ...restUsrState } = window.history.state?.usr || {};

View file

@ -48,6 +48,7 @@ import {
AppTypeTab,
} from '@/modules/dashboard/components';
import CreateAppWithPrompt from '@/modules/AiBuilder/components/CreateAppWithPrompt';
import CreateModuleWithPrompt from '@/modules/AiBuilder/components/CreateModuleWithPrompt';
import SolidIcon from '@/_ui/Icon/SolidIcons';
import { isWorkflowsFeatureEnabled } from '@/modules/common/helpers/utils';
import EmptyModuleSvg from '../../assets/images/icons/empty-modules.svg';
@ -1862,6 +1863,8 @@ class HomePageComponent extends React.Component {
<CreateAppWithPrompt createApp={this.createApp} />
)}
{this.props.appType === 'module' && this.canCreateApp() && <CreateModuleWithPrompt />}
{(meta?.total_count > 0 || appSearchKey) && (
<>
{!(isLoading && !appSearchKey) && (

View file

@ -0,0 +1,8 @@
import React from 'react';
import { withEditionSpecificComponent } from '@/modules/common/helpers/withEditionSpecificComponent';
const CreateModuleWithPrompt = () => {
return <></>;
};
export default withEditionSpecificComponent(CreateModuleWithPrompt, 'AiBuilder');

View file

@ -0,0 +1 @@
export { default } from './CreateModuleWithPrompt';

@ -1 +1 @@
Subproject commit e3a079650c47564f82e9cc7ee26473f29ff06f20
Subproject commit 909d05c7459f8c239c30d2b7522b2226cf1788cf