From f2b76c55773e54cdebc0a2c06063a08c2323358b Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Thu, 19 Jun 2025 18:44:22 +0530 Subject: [PATCH] chore: add workflows setting for agents CE (#40988) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /ok-to-test tags="@tag.Sanity" ## Summary by CodeRabbit - **New Features** - Added a "Trigger Settings" sidebar button and editor pane for AI Agent apps. - Introduced a "Run History" tab in the debugger and a corresponding trigger in the bottom bar for AI Agent apps. - New SVG icon ("lightning-line") added for sidebar and UI elements. - Support for importing agent templates and associating workflows with applications. - **Enhancements** - Sidebar and bottom bar now adapt to AI Agent app context. - Layout and header updated to accommodate the new "Trigger Settings" editor state. - **Bug Fixes** - No bug fixes included in this release. > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: d0e477ce71479ac091957566c5bba05e0f215e60 > Cypress dashboard. > Tags: `@tag.Sanity` > Spec: >
Thu, 19 Jun 2025 09:22:45 UTC --- .../ads/src/Icon/Icon.provider.tsx | 5 +++++ .../design-system/ads/src/Input/Input.tsx | 1 + .../__assets__/icons/ads/lightning-line.svg | 3 +++ .../src/IDE/constants/SidebarButtons.ts | 9 ++++++++ app/client/src/IDE/enums.ts | 1 + app/client/src/api/TemplatesApi.ts | 12 ++++++++++ app/client/src/ce/api/ApplicationApi.tsx | 1 + .../src/ce/constants/WorkflowConstants.ts | 1 + .../src/ce/constants/routes/appRoutes.ts | 1 + .../pages/AppIDE/constants/SidebarButtons.ts | 22 ++++++++++++++----- .../layout/routers/MainPane/constants.ts | 2 ++ app/client/src/components/BottomBar/index.tsx | 4 ++++ .../Debugger/DebuggerTabs.tsx | 13 ++++++++++- .../editorComponents/Debugger/constants.ts | 1 + .../TriggerSettingsPane.tsx | 3 +++ .../components/TriggerSettingsPane/index.ts | 1 + .../WorkflowRunHistory/RunHistoryTab.tsx | 3 +++ .../WorkflowRunHistory/RunHistoryTrigger.tsx | 3 +++ .../BottomBar/WorkflowRunHistory/index.ts | 1 + .../layouts/components/BottomBar/index.ts | 1 + app/client/src/entities/Application/types.ts | 1 + app/client/src/navigation/FocusEntity.ts | 10 +++++++++ .../layouts/components/Header/index.tsx | 2 ++ .../layouts/hooks/useGridLayoutTemplate.ts | 1 + .../pages/AppIDE/layouts/routers/LeftPane.tsx | 7 ++++++ .../pages/AppIDE/layouts/routers/Sidebar.tsx | 6 +++-- app/client/src/sagas/TemplatesSagas.ts | 4 +++- 27 files changed, 110 insertions(+), 9 deletions(-) create mode 100644 app/client/packages/design-system/ads/src/__assets__/icons/ads/lightning-line.svg create mode 100644 app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/TriggerSettingsPane.tsx create mode 100644 app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/index.ts create mode 100644 app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTab.tsx create mode 100644 app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTrigger.tsx create mode 100644 app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/index.ts create mode 100644 app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/index.ts diff --git a/app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx b/app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx index e9c1d2c389..233c02f2e2 100644 --- a/app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx +++ b/app/client/packages/design-system/ads/src/Icon/Icon.provider.tsx @@ -1213,6 +1213,10 @@ const AIChatIcon = importSvg( async () => import("../__assets__/icons/ads/ai-chat.svg"), ); +const LightningLineIcon = importSvg( + async () => import("../__assets__/icons/ads/lightning-line.svg"), +); + import PlayIconPNG from "../__assets__/icons/control/play-icon.png"; function PlayIconPNGWrapper() { @@ -1636,6 +1640,7 @@ const ICON_LOOKUP = { intercom: IntercomIcon, onedrive: OnedriveIcon, sharepoint: SharepointIcon, + "lightning-line": LightningLineIcon, }; export const IconCollection = Object.keys(ICON_LOOKUP); diff --git a/app/client/packages/design-system/ads/src/Input/Input.tsx b/app/client/packages/design-system/ads/src/Input/Input.tsx index 98e746c50a..d6dff91dcc 100644 --- a/app/client/packages/design-system/ads/src/Input/Input.tsx +++ b/app/client/packages/design-system/ads/src/Input/Input.tsx @@ -135,6 +135,7 @@ const Input = forwardRef( readOnly={isReadOnly} ref={inputRef} renderer={renderAs} + size="1" value={value} {...rest} /> diff --git a/app/client/packages/design-system/ads/src/__assets__/icons/ads/lightning-line.svg b/app/client/packages/design-system/ads/src/__assets__/icons/ads/lightning-line.svg new file mode 100644 index 0000000000..410f07dc96 --- /dev/null +++ b/app/client/packages/design-system/ads/src/__assets__/icons/ads/lightning-line.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/client/src/IDE/constants/SidebarButtons.ts b/app/client/src/IDE/constants/SidebarButtons.ts index 2a57b14b35..6dd6f5d67d 100644 --- a/app/client/src/IDE/constants/SidebarButtons.ts +++ b/app/client/src/IDE/constants/SidebarButtons.ts @@ -6,6 +6,7 @@ const SidebarButtonTitles = { DATA: "Datasources", SETTINGS: "Settings", LIBRARIES: "Libraries", + TRIGGER_SETTINGS: "Trigger Settings", }; export const EditorButton = (urlSuffix: string): IDESidebarButton => ({ @@ -39,3 +40,11 @@ export const SettingsButton = (urlSuffix: string): IDESidebarButton => ({ testId: SidebarButtonTitles.SETTINGS, urlSuffix, }); + +export const TriggerSettingsButton = (urlSuffix: string): IDESidebarButton => ({ + state: EditorState.TRIGGER_SETTINGS, + icon: "lightning-line", + tooltip: SidebarButtonTitles.TRIGGER_SETTINGS, + testId: SidebarButtonTitles.TRIGGER_SETTINGS, + urlSuffix, +}); diff --git a/app/client/src/IDE/enums.ts b/app/client/src/IDE/enums.ts index b1fdd7489d..73061ab4b6 100644 --- a/app/client/src/IDE/enums.ts +++ b/app/client/src/IDE/enums.ts @@ -9,4 +9,5 @@ export enum EditorState { EDITOR = "EDITOR", SETTINGS = "SETTINGS", LIBRARIES = "LIBRARIES", + TRIGGER_SETTINGS = "TRIGGER_SETTINGS", } diff --git a/app/client/src/api/TemplatesApi.ts b/app/client/src/api/TemplatesApi.ts index 415fd47882..73da171b61 100644 --- a/app/client/src/api/TemplatesApi.ts +++ b/app/client/src/api/TemplatesApi.ts @@ -116,6 +116,18 @@ class TemplatesAPI extends Api { body, ); } + + // This endpoint imports the application from a template and creates a workflow, + // and attaches the workflow to the application. + static async importAgentTemplate( + templateId: string, + workspaceId: string, + ): Promise> { + return Api.post(TemplatesAPI.baseUrl + `/applications/agents`, { + templateId, + workspaceId, + }); + } } export default TemplatesAPI; diff --git a/app/client/src/ce/api/ApplicationApi.tsx b/app/client/src/ce/api/ApplicationApi.tsx index 8db71cbe0e..22555b8dd4 100644 --- a/app/client/src/ce/api/ApplicationApi.tsx +++ b/app/client/src/ce/api/ApplicationApi.tsx @@ -64,6 +64,7 @@ export interface ApplicationResponsePayload { slug: string; applicationVersion: ApplicationVersion; isPublic?: boolean; + connectedWorkflowId?: string; } export interface FetchApplicationPayload { diff --git a/app/client/src/ce/constants/WorkflowConstants.ts b/app/client/src/ce/constants/WorkflowConstants.ts index 753854d23a..79c1411a5f 100644 --- a/app/client/src/ce/constants/WorkflowConstants.ts +++ b/app/client/src/ce/constants/WorkflowConstants.ts @@ -20,6 +20,7 @@ export interface Workflow { // PR for reference: https://github.com/appsmithorg/appsmith/pull/8796 evaluationVersion: EvaluationVersion; token?: string; + connectedApplicationId?: string; } export type WorkflowMetadata = Workflow; diff --git a/app/client/src/ce/constants/routes/appRoutes.ts b/app/client/src/ce/constants/routes/appRoutes.ts index 21252c0291..341fdb96a1 100644 --- a/app/client/src/ce/constants/routes/appRoutes.ts +++ b/app/client/src/ce/constants/routes/appRoutes.ts @@ -69,6 +69,7 @@ export const DATA_SOURCES_EDITOR_ID_PATH = `/datasource/:datasourceId`; export const APP_LIBRARIES_EDITOR_PATH = `/libraries`; export const APP_PACKAGES_EDITOR_PATH = `/packages`; export const APP_SETTINGS_EDITOR_PATH = `/settings`; +export const APP_TRIGGER_SETTINGS_EDITOR_PATH = `/trigger-settings`; export const SAAS_GSHEET_EDITOR_ID_PATH = `/saas/google-sheets-plugin/datasources/:datasourceId`; export const BUILDER_CHECKLIST_PATH = `/checklist`; export const ADMIN_SETTINGS_PATH = "/settings"; diff --git a/app/client/src/ce/pages/AppIDE/constants/SidebarButtons.ts b/app/client/src/ce/pages/AppIDE/constants/SidebarButtons.ts index 37ec4ebcce..9e03b93d9e 100644 --- a/app/client/src/ce/pages/AppIDE/constants/SidebarButtons.ts +++ b/app/client/src/ce/pages/AppIDE/constants/SidebarButtons.ts @@ -3,6 +3,7 @@ import { EditorButton, LibrariesButton, SettingsButton, + TriggerSettingsButton, } from "IDE/constants/SidebarButtons"; import { Condition, type IDESidebarButton } from "@appsmith/ads"; import { @@ -18,9 +19,20 @@ const DataButtonWithWarning: IDESidebarButton = { const DataButtonWithoutWarning = DataButton("datasource"); -export const BottomButtons = (datasourcesExist: boolean) => [ - datasourcesExist ? DataButtonWithoutWarning : DataButtonWithWarning, - LibrariesButton("libraries"), - SettingsButton("settings"), -]; +export const BottomButtons = ( + datasourcesExist: boolean, + isAgentApp: boolean, +) => { + const buttons = [ + datasourcesExist ? DataButtonWithoutWarning : DataButtonWithWarning, + LibrariesButton("libraries"), + SettingsButton("settings"), + ]; + + if (isAgentApp) { + buttons.splice(1, 0, TriggerSettingsButton("trigger-settings")); + } + + return buttons; +}; export const TopButtons = [EditorButton("")]; diff --git a/app/client/src/ce/pages/AppIDE/layout/routers/MainPane/constants.ts b/app/client/src/ce/pages/AppIDE/layout/routers/MainPane/constants.ts index d8aa14d1ba..7be3b3ccde 100644 --- a/app/client/src/ce/pages/AppIDE/layout/routers/MainPane/constants.ts +++ b/app/client/src/ce/pages/AppIDE/layout/routers/MainPane/constants.ts @@ -6,6 +6,7 @@ import { APP_LIBRARIES_EDITOR_PATH, APP_PACKAGES_EDITOR_PATH, APP_SETTINGS_EDITOR_PATH, + APP_TRIGGER_SETTINGS_EDITOR_PATH, BUILDER_CHECKLIST_PATH, BUILDER_CUSTOM_PATH, BUILDER_PATH, @@ -71,6 +72,7 @@ export const MainPaneRoutes = ( `${path}${APP_LIBRARIES_EDITOR_PATH}`, `${path}${APP_PACKAGES_EDITOR_PATH}`, `${path}${APP_SETTINGS_EDITOR_PATH}`, + `${path}${APP_TRIGGER_SETTINGS_EDITOR_PATH}`, ], }, { diff --git a/app/client/src/components/BottomBar/index.tsx b/app/client/src/components/BottomBar/index.tsx index c689223324..648a0fc888 100644 --- a/app/client/src/components/BottomBar/index.tsx +++ b/app/client/src/components/BottomBar/index.tsx @@ -19,6 +19,8 @@ import OldGitQuickActions from "pages/Editor/gitSync/QuickGitActions"; import { GitQuickActions } from "git"; import { useGitModEnabled } from "pages/Editor/gitSync/hooks/modHooks"; import { AIAgentSupportTrigger } from "ee/components/BottomBar/AIAgentSupportTrigger"; +import { RunHistoryTrigger } from "ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTrigger"; +import { getIsAiAgentApp } from "ee/selectors/aiAgentSelectors"; function GitActions() { const isGitModEnabled = useGitModEnabled(); @@ -34,6 +36,7 @@ export default function BottomBar() { const isAnvilEnabled = useSelector(getIsAnvilEnabledInCurrentApplication); const isPreviewMode = useSelector(previewModeSelector); const isGitEnabled = !isAnvilEnabled && !isPreviewMode; + const isAiAgentApp = useSelector(getIsAiAgentApp); const dispatch = useDispatch(); @@ -67,6 +70,7 @@ export default function BottomBar() { /> + {isAiAgentApp && } diff --git a/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx b/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx index e172214f4e..6a74c38d8c 100644 --- a/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx +++ b/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx @@ -27,6 +27,8 @@ import { StateInspector } from "./StateInspector"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import { useLocation } from "react-router"; import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; +import { RunHistoryTab } from "ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTab"; +import { getIsAiAgentApp } from "ee/selectors/aiAgentSelectors"; function DebuggerTabs() { const dispatch = useDispatch(); @@ -42,6 +44,7 @@ function DebuggerTabs() { }, [dispatch], ); + const isAiAgentApp = useSelector(getIsAiAgentApp); const setSelectedTab = useCallback( (tabKey: string) => { @@ -87,8 +90,16 @@ function DebuggerTabs() { }); } + if (isAiAgentApp) { + tabs.push({ + key: DEBUGGER_TAB_KEYS.RUN_HISTORY_TAB, + title: "Run History", + panelComponent: , + }); + } + return tabs; - }, [errorCount, ideType]); + }, [errorCount, ideType, isAiAgentApp]); // Do not render if response, header or schema tab is selected in the bottom bar. const shouldRender = !( diff --git a/app/client/src/components/editorComponents/Debugger/constants.ts b/app/client/src/components/editorComponents/Debugger/constants.ts index 567c2c5b2b..60656ffe29 100644 --- a/app/client/src/components/editorComponents/Debugger/constants.ts +++ b/app/client/src/components/editorComponents/Debugger/constants.ts @@ -7,4 +7,5 @@ export enum DEBUGGER_TAB_KEYS { LOGS_TAB = "LOGS_TAB", STATE_TAB = "STATE_TAB", VISUALIZATION_TAB = "VISUALIZATION_TAB", + RUN_HISTORY_TAB = "RUN_HISTORY_TAB", } diff --git a/app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/TriggerSettingsPane.tsx b/app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/TriggerSettingsPane.tsx new file mode 100644 index 0000000000..62610bebc1 --- /dev/null +++ b/app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/TriggerSettingsPane.tsx @@ -0,0 +1,3 @@ +export const TriggerSettingsPane = () => { + return null; +}; diff --git a/app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/index.ts b/app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/index.ts new file mode 100644 index 0000000000..639a497176 --- /dev/null +++ b/app/client/src/ee/pages/AppIDE/components/TriggerSettingsPane/index.ts @@ -0,0 +1 @@ +export { TriggerSettingsPane } from "./TriggerSettingsPane"; diff --git a/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTab.tsx b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTab.tsx new file mode 100644 index 0000000000..e47b2042d4 --- /dev/null +++ b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTab.tsx @@ -0,0 +1,3 @@ +export const RunHistoryTab = () => { + return null; +}; diff --git a/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTrigger.tsx b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTrigger.tsx new file mode 100644 index 0000000000..d6a4491b87 --- /dev/null +++ b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/RunHistoryTrigger.tsx @@ -0,0 +1,3 @@ +export const RunHistoryTrigger = () => { + return null; +}; diff --git a/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/index.ts b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/index.ts new file mode 100644 index 0000000000..a98087e5eb --- /dev/null +++ b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/WorkflowRunHistory/index.ts @@ -0,0 +1 @@ +export { RunHistoryTab } from "./RunHistoryTab"; diff --git a/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/index.ts b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/index.ts new file mode 100644 index 0000000000..15c5c2e396 --- /dev/null +++ b/app/client/src/ee/pages/WorkflowIDE/layouts/components/BottomBar/index.ts @@ -0,0 +1 @@ +export * from "./WorkflowRunHistory"; diff --git a/app/client/src/entities/Application/types.ts b/app/client/src/entities/Application/types.ts index b2d657ba22..b8e4e65423 100644 --- a/app/client/src/entities/Application/types.ts +++ b/app/client/src/entities/Application/types.ts @@ -45,4 +45,5 @@ export interface ApplicationPayload { isCommunityTemplate?: boolean; publishedAppToCommunityTemplate?: boolean; forkedFromTemplateTitle?: string; + connectedWorkflowId?: string; } diff --git a/app/client/src/navigation/FocusEntity.ts b/app/client/src/navigation/FocusEntity.ts index 351ba0599a..e5e9f66313 100644 --- a/app/client/src/navigation/FocusEntity.ts +++ b/app/client/src/navigation/FocusEntity.ts @@ -32,6 +32,7 @@ export enum FocusEntity { JS_MODULE_INSTANCE = "JS_MODULE_INSTANCE", JS_OBJECT_ADD = "JS_OBJECT_ADD", PAGE = "PAGE", + TRIGGER_SETTINGS = "TRIGGER_SETTINGS", } export const FocusStoreHierarchy: Partial> = { @@ -300,6 +301,15 @@ export function identifyEntityFromPath(path: string): FocusEntityInfo { params: match.params, }; } + + if (match.params.entity === "trigger-settings") { + return { + entity: FocusEntity.TRIGGER_SETTINGS, + id: "", + appState: EditorState.TRIGGER_SETTINGS, + params: match.params, + }; + } } return { diff --git a/app/client/src/pages/AppIDE/layouts/components/Header/index.tsx b/app/client/src/pages/AppIDE/layouts/components/Header/index.tsx index 5147a4ee87..965cb006dd 100644 --- a/app/client/src/pages/AppIDE/layouts/components/Header/index.tsx +++ b/app/client/src/pages/AppIDE/layouts/components/Header/index.tsx @@ -100,6 +100,8 @@ const HeaderTitleComponent = ({ appState }: HeaderTitleProps) => { ); case EditorState.LIBRARIES: return ; + case EditorState.TRIGGER_SETTINGS: + return ; default: return ; } diff --git a/app/client/src/pages/AppIDE/layouts/hooks/useGridLayoutTemplate.ts b/app/client/src/pages/AppIDE/layouts/hooks/useGridLayoutTemplate.ts index e489a21b3c..21b80fa430 100644 --- a/app/client/src/pages/AppIDE/layouts/hooks/useGridLayoutTemplate.ts +++ b/app/client/src/pages/AppIDE/layouts/hooks/useGridLayoutTemplate.ts @@ -59,6 +59,7 @@ function useGridLayoutTemplate(): ReturnValue { break; case EditorState.SETTINGS: + case EditorState.TRIGGER_SETTINGS: if (isPreviewMode || isProtectedMode) { setColumns(["0px", "0px", `${windowWidth}px`, "0px"]); } else { diff --git a/app/client/src/pages/AppIDE/layouts/routers/LeftPane.tsx b/app/client/src/pages/AppIDE/layouts/routers/LeftPane.tsx index 51ee61ef97..48b4488acf 100644 --- a/app/client/src/pages/AppIDE/layouts/routers/LeftPane.tsx +++ b/app/client/src/pages/AppIDE/layouts/routers/LeftPane.tsx @@ -5,6 +5,7 @@ import { APP_LIBRARIES_EDITOR_PATH, APP_PACKAGES_EDITOR_PATH, APP_SETTINGS_EDITOR_PATH, + APP_TRIGGER_SETTINGS_EDITOR_PATH, DATA_SOURCES_EDITOR_ID_PATH, DATA_SOURCES_EDITOR_LIST_PATH, INTEGRATION_EDITOR_PATH, @@ -13,6 +14,7 @@ import { import AppSettingsPane from "../../components/AppSettings"; import { DataSidePane } from "pages/Editor/DataSidePane"; import EditorPane from "../components/EditorPane"; +import { TriggerSettingsPane } from "ee/pages/AppIDE/components/TriggerSettingsPane"; import LibrarySidePane from "ee/pages/AppIDE/components/LibrariesList/LibrarySidePane"; import { getDatasourceUsageCountForApp } from "ee/selectors/entitiesSelector"; import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; @@ -65,6 +67,11 @@ const LeftPane = () => { exact path={librarySidePanePaths} /> + 0; + const isAgentApp = useSelector(getIsAiAgentApp); // Updates the bottom button config based on datasource existence const bottomButtons = React.useMemo(() => { - return BottomButtons(datasourcesExist); - }, [datasourcesExist]); + return BottomButtons(datasourcesExist, isAgentApp); + }, [datasourcesExist, isAgentApp]); useEffect(() => { dispatch(fetchWorkspace(currentWorkspaceId)); diff --git a/app/client/src/sagas/TemplatesSagas.ts b/app/client/src/sagas/TemplatesSagas.ts index 7652921c4b..3a5fe509ca 100644 --- a/app/client/src/sagas/TemplatesSagas.ts +++ b/app/client/src/sagas/TemplatesSagas.ts @@ -89,7 +89,9 @@ function* importTemplateToWorkspaceSaga( try { const response: ImportTemplateResponse = yield call( - TemplatesAPI.importTemplate, + isAgentTemplate + ? TemplatesAPI.importAgentTemplate + : TemplatesAPI.importTemplate, action.payload.templateId, action.payload.workspaceId, );