feat: add draft email workflow action (#17793)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
+8
-1
@@ -28,6 +28,9 @@ export const CommandMenuWorkflowSelectAction = ({
|
||||
onActionSelected: (selection: WorkflowActionSelection) => void;
|
||||
}) => {
|
||||
const isAiEnabled = useIsFeatureEnabled(FeatureFlagKey.IS_AI_ENABLED);
|
||||
const isDraftEmailEnabled = useIsFeatureEnabled(
|
||||
FeatureFlagKey.IS_DRAFT_EMAIL_ENABLED,
|
||||
);
|
||||
const theme = useTheme();
|
||||
|
||||
const { t } = useLingui();
|
||||
@@ -36,6 +39,10 @@ export const CommandMenuWorkflowSelectAction = ({
|
||||
|
||||
const toolFunctions = logicFunctions.filter((fn) => fn.isTool === true);
|
||||
|
||||
const coreActions = isDraftEmailEnabled
|
||||
? CORE_ACTIONS
|
||||
: CORE_ACTIONS.filter((action) => action.type !== 'DRAFT_EMAIL');
|
||||
|
||||
const handleActionClick = (actionType: WorkflowActionType) => {
|
||||
onActionSelected({ type: actionType });
|
||||
};
|
||||
@@ -83,7 +90,7 @@ export const CommandMenuWorkflowSelectAction = ({
|
||||
{t`Core`}
|
||||
</RightDrawerWorkflowSelectStepTitle>
|
||||
<WorkflowActionMenuItems
|
||||
actions={CORE_ACTIONS}
|
||||
actions={coreActions}
|
||||
onClick={handleActionClick}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user