@bikdotai/bik-component-library 0.0.853-beta.0 → 0.0.853
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +1 -1
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js +11 -11
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionEditor.js +1 -7
- package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionField.js +1 -1
- package/dist/cjs/components/agent-builder/components/MentionField.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +26 -53
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js +1 -1
- package/dist/cjs/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +5 -6
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/ToolInstructionsField.js +2 -2
- package/dist/cjs/components/agent-builder/components/ToolInstructionsField.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +4 -4
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js +1 -1
- package/dist/cjs/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.js.map +1 -1
- package/dist/cjs/components/zeroState/ZeroState.js +3 -3
- package/dist/cjs/components/zeroState/ZeroState.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +21 -23
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/BikEditor.types.js.map +1 -1
- package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js +3 -3
- package/dist/cjs/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/add-variableV2/index.d.ts +0 -1
- package/dist/esm/components/agent-builder/AgentBuilder.js +127 -119
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +7 -10
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +2 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +29 -26
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +30 -29
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -1
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.d.ts +0 -8
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js +136 -182
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +9 -3
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +230 -222
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/GoLiveModal.js +11 -13
- package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +0 -12
- package/dist/esm/components/agent-builder/components/MentionEditor.js +103 -144
- package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionField.js +45 -48
- package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +1 -14
- package/dist/esm/components/agent-builder/components/MentionPicker.js +248 -292
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js +8 -8
- package/dist/esm/components/agent-builder/components/RequireVerificationModal.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.d.ts +0 -8
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +172 -185
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +73 -69
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/components/ToolInstructionsField.d.ts +0 -9
- package/dist/esm/components/agent-builder/components/ToolInstructionsField.js +48 -67
- package/dist/esm/components/agent-builder/components/ToolInstructionsField.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/tools.d.ts +21 -1
- package/dist/esm/components/agent-builder/constants/tools.js +33 -23
- package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +0 -7
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +96 -99
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +272 -261
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +4 -14
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +36 -54
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +6 -6
- package/dist/esm/components/agent-builder/utils/sourceIcons.js +21 -19
- package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.js +26 -23
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/components/agent-listing/AiAgentsEmptyState.js +3 -2
- package/dist/esm/components/agent-listing/AiAgentsEmptyState.js.map +1 -1
- package/dist/esm/components/variable-picker-v3/Content.js +15 -16
- package/dist/esm/components/variable-picker-v3/Content.js.map +1 -1
- package/dist/esm/components/zeroState/ZeroState.d.ts +2 -0
- package/dist/esm/components/zeroState/ZeroState.js +18 -17
- package/dist/esm/components/zeroState/ZeroState.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +229 -222
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.js +14 -16
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/BikEditor.types.d.ts +0 -9
- package/dist/esm/editor/BikEditor.types.js.map +1 -1
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js +62 -60
- package/dist/esm/editor/extensions/jsonHighlight/JsonHighlightExtension.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionDropdown.js +28 -28
- package/dist/esm/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionExtension.js +19 -23
- package/dist/esm/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/esm/icons/index.d.ts +25 -25
- package/dist/esm/index.js +541 -543
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/add-variableV2/AddDataPill.js +0 -10
- package/dist/cjs/components/add-variableV2/AddDataPill.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/VariableInlineField.js +0 -65
- package/dist/cjs/components/agent-builder/components/VariableInlineField.js.map +0 -1
- package/dist/cjs/components/agent-builder/components/VariableTriggerArea.js +0 -10
- package/dist/cjs/components/agent-builder/components/VariableTriggerArea.js.map +0 -1
- package/dist/esm/components/add-variableV2/AddDataPill.d.ts +0 -24
- package/dist/esm/components/add-variableV2/AddDataPill.js +0 -33
- package/dist/esm/components/add-variableV2/AddDataPill.js.map +0 -1
- package/dist/esm/components/agent-builder/components/VariableInlineField.d.ts +0 -26
- package/dist/esm/components/agent-builder/components/VariableInlineField.js +0 -149
- package/dist/esm/components/agent-builder/components/VariableInlineField.js.map +0 -1
- package/dist/esm/components/agent-builder/components/VariableTriggerArea.d.ts +0 -46
- package/dist/esm/components/agent-builder/components/VariableTriggerArea.js +0 -118
- package/dist/esm/components/agent-builder/components/VariableTriggerArea.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentBuilder.js","sources":["../../../../src/components/agent-builder/AgentBuilder.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Spinner } from '@src/components/spinner';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tAgentBuilderProps,\n\tAgentValue,\n\tSubAgentDraft,\n} from './AgentBuilder.model';\nimport {\n\tBuilderRoot,\n\tContent,\n\tContentCard,\n\tMain,\n\tRail,\n\tStepScroll,\n} from './AgentBuilder.styled';\nimport { AgentBuilderFooter } from './components/AgentBuilderFooter';\nimport { AgentBuilderTopBar } from './components/AgentBuilderTopBar';\nimport { DiscardModal } from './components/DiscardModal';\nimport { GoLiveModal, GoLiveModalMode } from './components/GoLiveModal';\nimport { StepRail } from './components/StepRail';\nimport { UndoToast } from './components/UndoToast';\nimport {\n\tAgentBuilderProvider,\n\tuseAgentBuilderContext,\n} from './context/AgentBuilderContext';\nimport { Step1About } from './steps/Step1About';\nimport { Step2WhenItStepsIn } from './steps/Step2WhenItStepsIn';\nimport { Step3HowItResponds } from './steps/Step3HowItResponds';\nimport { Step4HandoverRules } from './steps/Step4HandoverRules';\n\nconst StepContent: React.FC = () => {\n\tconst { activeStep } = useAgentBuilderContext();\n\tswitch (activeStep) {\n\t\tcase 'about':\n\t\t\treturn <Step1About />;\n\t\tcase 'trigger':\n\t\t\treturn <Step2WhenItStepsIn />;\n\t\tcase 'response':\n\t\t\treturn <Step3HowItResponds />;\n\t\tcase 'handover':\n\t\t\treturn <Step4HandoverRules />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\n/**\n * 4-step creation/edit wizard body for an AI agent. Presentational and\n * controlled — the consumer owns the `value`, persistence and routing.\n *\n * @example\n * <AgentBuilder\n * value={agent}\n * onChange={(patch) => setAgent({ ...agent, ...patch })}\n * availableTools={tools}\n * availableSubAgents={subAgents}\n * onDiscard={() => router.back()}\n * onSaveDraft={saveDraft}\n * onPublish={publish}\n * />\n */\nexport const AgentBuilder: React.FC<AgentBuilderProps> = (props) => {\n\tconst {\n\t\tconfig,\n\t\tonChange,\n\t\tonStepChange,\n\t\tonDiscard,\n\t\tonSaveDraft,\n\t\tonPublish,\n\t\tonBack,\n\t\tonTestAgent,\n\t\tonGoToDashboard,\n\t\tonCreateSubAgent,\n\t\tonFetchSubAgent,\n\t\tonUpdateSubAgent,\n\t\tonImproveSubAgent,\n\t\tonImproveToolInstructions,\n\t\tonConnectIntegration,\n\t\t...rest\n\t} = props;\n\tconst {\n\t\tvalue,\n\t\tactiveStep,\n\t\tavailableTools,\n\t\tavailableSubAgents,\n\t\tavailableIntents = [],\n\t\tavailableModels = [],\n\t\tconfigToolTemplates,\n\t\tintegrationStatus,\n\t\tvariablesData,\n\t\tvalidation,\n\t\tapplicationType,\n\t\tcharLimits,\n\t\tisSaving,\n\t\tisPublishing,\n\t\tisLoading,\n\t\tfooterHint = 'Changes don’t affect customers until you go live',\n\t\tdisableStepNavigation,\n\t\tdebugLog,\n\t} = config;\n\n\tconst [modalMode, setModalMode] = useState<GoLiveModalMode>(null);\n\tconst [publishingLocal, setPublishingLocal] = useState(false);\n\t// Back was pressed → confirm leaving (save draft / discard) before navigating.\n\tconst [showLeaveConfirm, setShowLeaveConfirm] = useState(false);\n\tconst [savingAndLeaving, setSavingAndLeaving] = useState(false);\n\n\t// Gated debug logging: each handler logs at its start only when `debugLog`.\n\tconst logAction = useCallback(\n\t\t(action: string, ...args: unknown[]) => {\n\t\t\tif (debugLog) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(`[AgentBuilder] ${action}`, ...args);\n\t\t\t}\n\t\t},\n\t\t[debugLog],\n\t);\n\n\tconst handleChange = useCallback(\n\t\t(patch: Partial<AgentValue>) => {\n\t\t\tlogAction('onChange', patch);\n\t\t\tonChange(patch);\n\t\t},\n\t\t[logAction, onChange],\n\t);\n\tconst handleStepChange = useCallback(\n\t\t(step: Parameters<NonNullable<typeof onStepChange>>[0]) => {\n\t\t\tlogAction('onStepChange', step);\n\t\t\tonStepChange?.(step);\n\t\t},\n\t\t[logAction, onStepChange],\n\t);\n\tconst handleSaveDraft = useCallback(() => {\n\t\tlogAction('onSaveDraft');\n\t\treturn onSaveDraft();\n\t}, [logAction, onSaveDraft]);\n\tconst handlePublish = useCallback(() => {\n\t\tlogAction('onPublish');\n\t\treturn onPublish();\n\t}, [logAction, onPublish]);\n\t// Back opens the \"Save as draft?\" confirmation rather than leaving directly.\n\tconst handleBack = useCallback(() => {\n\t\tlogAction('onBack');\n\t\tsetShowLeaveConfirm(true);\n\t}, [logAction]);\n\n\t// Modal \"Discard\" defers to the parent's discard handler (same as the top bar).\n\tconst handleDiscardAndLeave = useCallback(() => {\n\t\tlogAction('onDiscardAndLeave');\n\t\tsetShowLeaveConfirm(false);\n\t\tonDiscard();\n\t}, [logAction, onDiscard]);\n\n\tconst handleSaveDraftAndLeave = useCallback(async () => {\n\t\tlogAction('onSaveDraftAndLeave');\n\t\tconst result = onSaveDraft();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetSavingAndLeaving(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t} finally {\n\t\t\t\tsetSavingAndLeaving(false);\n\t\t\t}\n\t\t}\n\t\tsetShowLeaveConfirm(false);\n\t\tonBack?.();\n\t}, [logAction, onSaveDraft, onBack]);\n\tconst handleTestAgent = useCallback(() => {\n\t\tlogAction('onTestAgent');\n\t\tonTestAgent?.();\n\t}, [logAction, onTestAgent]);\n\tconst handleGoToDashboard = useCallback(() => {\n\t\tlogAction('onGoToDashboard');\n\t\tonGoToDashboard?.();\n\t}, [logAction, onGoToDashboard]);\n\tconst handleCreateSubAgent = useCallback(\n\t\t(draft: SubAgentDraft) => {\n\t\t\tlogAction('onCreateSubAgent', draft);\n\t\t\treturn onCreateSubAgent\n\t\t\t\t? onCreateSubAgent(draft)\n\t\t\t\t: Promise.reject(new Error('onCreateSubAgent not provided'));\n\t\t},\n\t\t[logAction, onCreateSubAgent],\n\t);\n\n\tconst handleConfirmGoLive = async () => {\n\t\tlogAction('onGoLiveConfirm');\n\t\tconst result = handlePublish();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetPublishingLocal(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t\tsetModalMode('success');\n\t\t\t} finally {\n\t\t\t\tsetPublishingLocal(false);\n\t\t\t}\n\t\t} else {\n\t\t\tsetModalMode('success');\n\t\t}\n\t};\n\n\treturn (\n\t\t<AgentBuilderProvider\n\t\t\tvalue={value}\n\t\t\tonChange={handleChange}\n\t\t\tactiveStep={activeStep}\n\t\t\tonStepChange={onStepChange ? handleStepChange : undefined}\n\t\t\tavailableTools={availableTools}\n\t\t\tavailableSubAgents={availableSubAgents}\n\t\t\tavailableIntents={availableIntents}\n\t\t\tavailableModels={availableModels}\n\t\t\tconfigToolTemplates={configToolTemplates}\n\t\t\tintegrationStatus={integrationStatus}\n\t\t\tonConnectIntegration={onConnectIntegration}\n\t\t\tvariablesData={variablesData}\n\t\t\tvalidation={validation}\n\t\t\tapplicationType={applicationType}\n\t\t\tcharLimits={charLimits}\n\t\t\tdisableStepNavigation={disableStepNavigation}\n\t\t\tonCreateSubAgent={onCreateSubAgent ? handleCreateSubAgent : undefined}\n\t\t\tonFetchSubAgent={onFetchSubAgent}\n\t\t\tonUpdateSubAgent={onUpdateSubAgent}\n\t\t\tonImproveSubAgent={onImproveSubAgent}\n\t\t\tonImproveToolInstructions={onImproveToolInstructions}\n\t\t>\n\t\t\t<BuilderRoot data-test={rest['data-test'] ?? 'agent-builder'}>\n\t\t\t\t<AgentBuilderTopBar\n\t\t\t\t\tname={value.name}\n\t\t\t\t\tstatus={value.status}\n\t\t\t\t\tonBack={onBack ? handleBack : undefined}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<Main>\n\t\t\t\t\t<Rail>\n\t\t\t\t\t\t<StepRail />\n\t\t\t\t\t</Rail>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Spinner size=\"large\" color={COLORS.stroke.brand} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ContentCard>\n\t\t\t\t\t\t\t\t<StepScroll>\n\t\t\t\t\t\t\t\t\t<StepContent />\n\t\t\t\t\t\t\t\t</StepScroll>\n\t\t\t\t\t\t\t\t<AgentBuilderFooter\n\t\t\t\t\t\t\t\t\tfooterHint={footerHint}\n\t\t\t\t\t\t\t\t\tonTestAgent={onTestAgent ? handleTestAgent : undefined}\n\t\t\t\t\t\t\t\t\tonGoLive={() => {\n\t\t\t\t\t\t\t\t\t\tlogAction('onGoLive');\n\t\t\t\t\t\t\t\t\t\tsetModalMode('confirm');\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ContentCard>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Content>\n\t\t\t\t</Main>\n\n\t\t\t\t<GoLiveModal\n\t\t\t\t\tmode={modalMode}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tconst wasSuccess = modalMode === 'success';\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\tif (wasSuccess) {\n\t\t\t\t\t\t\thandleGoToDashboard();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonConfirm={handleConfirmGoLive}\n\t\t\t\t\tonSaveDraft={() => {\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\thandleSaveDraft();\n\t\t\t\t\t}}\n\t\t\t\t\tonGoToDashboard={onGoToDashboard ? handleGoToDashboard : undefined}\n\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t/>\n\n\t\t\t\t<DiscardModal\n\t\t\t\t\topen={showLeaveConfirm}\n\t\t\t\t\tonClose={() => setShowLeaveConfirm(false)}\n\t\t\t\t\tonDiscard={handleDiscardAndLeave}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tdisableSaveDraft={!value.name.trim()}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<UndoToast />\n\t\t\t</BuilderRoot>\n\t\t</AgentBuilderProvider>\n\t);\n};\n\nAgentBuilder.displayName = 'AgentBuilder';\n"],"names":["StepContent","activeStep","useAgentBuilderContext","Step1About","Step2WhenItStepsIn","Step3HowItResponds","Step4HandoverRules","AgentBuilder","props","config","onChange","onStepChange","onDiscard","onSaveDraft","onPublish","onBack","onTestAgent","onGoToDashboard","onCreateSubAgent","onFetchSubAgent","onUpdateSubAgent","onImproveSubAgent","onImproveToolInstructions","onConnectIntegration","rest","value","availableTools","availableSubAgents","availableIntents","availableModels","configToolTemplates","integrationStatus","variablesData","validation","applicationType","charLimits","isSaving","isPublishing","isLoading","footerHint","disableStepNavigation","debugLog","modalMode","setModalMode","useState","publishingLocal","setPublishingLocal","showLeaveConfirm","setShowLeaveConfirm","savingAndLeaving","setSavingAndLeaving","logAction","useCallback","action","args","handleChange","patch","handleStepChange","step","handleSaveDraft","handlePublish","handleBack","handleDiscardAndLeave","handleSaveDraftAndLeave","result","handleTestAgent","handleGoToDashboard","handleCreateSubAgent","draft","handleConfirmGoLive","jsx","AgentBuilderProvider","BuilderRoot","AgentBuilderTopBar","Main","Rail","StepRail","Content","Spinner","COLORS","ContentCard","StepScroll","AgentBuilderFooter","GoLiveModal","wasSuccess","DiscardModal","UndoToast"],"mappings":";;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAwB,MAAM;AACnC,QAAM,EAAE,YAAAC,EAAA,IAAeC,GAAA;AACvB,UAAQD,GAAA;AAAA,IACP,KAAK;AACJ,+BAAQE,IAAA,EAAW;AAAA,IACpB,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B,KAAK;AACJ,+BAAQC,IAAA,EAAmB;AAAA,IAC5B;AACC,aAAO;AAAA,EAAA;AAEV,GAiBaC,KAA4C,CAACC,MAAU;AACnE,QAAM;AAAA,IACL,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACAhB,GACE;AAAA,IACL,OAAAiB;AAAA,IACA,YAAAxB;AAAA,IACA,gBAAAyB;AAAA,IACA,oBAAAC;AAAA,IACA,kBAAAC,IAAmB,CAAA;AAAA,IACnB,iBAAAC,IAAkB,CAAA;AAAA,IAClB,qBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,uBAAAC;AAAA,IACA,UAAAC;AAAA,EAAA,IACGhC,GAEE,CAACiC,GAAWC,CAAY,IAAIC,EAA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AAA,UAACa;AAAA,UAAA;AAAA,YACA,MAAMzC;AAAA,YACN,SAAS,MAAM;AACd,oBAAM0C,IAAa1C,MAAc;AACjC,cAAAC,EAAa,IAAI,GACbyC,KACHlB,EAAA;AAAA,YAEF;AAAA,YACA,WAAWG;AAAA,YACX,aAAa,MAAM;AAClB,cAAA1B,EAAa,IAAI,GACjBgB,EAAA;AAAA,YACD;AAAA,YACA,iBAAiB1C,IAAkBiD,IAAsB;AAAA,YACzD,cAAc7B,KAAgBQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAG/B,gBAAAyB;AAAA,UAACe;AAAA,UAAA;AAAA,YACA,MAAMtC;AAAA,YACN,SAAS,MAAMC,EAAoB,EAAK;AAAA,YACxC,WAAWc;AAAA,YACX,aAAaC;AAAA,YACb,kBAAkB,CAACtC,EAAM,KAAK,KAAA;AAAA,YAC9B,UAAUW,KAAYa;AAAA,UAAA;AAAA,QAAA;AAAA,0BAGtBqC,IAAA,CAAA,CAAU;AAAA,MAAA,EAAA,CACZ;AAAA,IAAA;AAAA,EAAA;AAGH;AAEA/E,GAAa,cAAc;"}
|
|
1
|
+
{"version":3,"file":"AgentBuilder.js","sources":["../../../../src/components/agent-builder/AgentBuilder.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Spinner } from '@src/components/spinner';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tAgentBuilderProps,\n\tAgentValue,\n\tSubAgentDraft,\n} from './AgentBuilder.model';\nimport {\n\tBuilderRoot,\n\tContent,\n\tContentCard,\n\tMain,\n\tRail,\n\tStepScroll,\n} from './AgentBuilder.styled';\nimport { AgentBuilderFooter } from './components/AgentBuilderFooter';\nimport { AgentBuilderTopBar } from './components/AgentBuilderTopBar';\nimport { DiscardModal } from './components/DiscardModal';\nimport { GoLiveModal, GoLiveModalMode } from './components/GoLiveModal';\nimport { StepRail } from './components/StepRail';\nimport { UndoToast } from './components/UndoToast';\nimport {\n\tAgentBuilderProvider,\n\tuseAgentBuilderContext,\n} from './context/AgentBuilderContext';\nimport { Step1About } from './steps/Step1About';\nimport { Step2WhenItStepsIn } from './steps/Step2WhenItStepsIn';\nimport { Step3HowItResponds } from './steps/Step3HowItResponds';\nimport { Step4HandoverRules } from './steps/Step4HandoverRules';\n\nconst StepContent: React.FC = () => {\n\tconst { activeStep } = useAgentBuilderContext();\n\tswitch (activeStep) {\n\t\tcase 'about':\n\t\t\treturn <Step1About />;\n\t\tcase 'trigger':\n\t\t\treturn <Step2WhenItStepsIn />;\n\t\tcase 'response':\n\t\t\treturn <Step3HowItResponds />;\n\t\tcase 'handover':\n\t\t\treturn <Step4HandoverRules />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\n/**\n * 4-step creation/edit wizard body for an AI agent. Presentational and\n * controlled — the consumer owns the `value`, persistence and routing.\n *\n * @example\n * <AgentBuilder\n * value={agent}\n * onChange={(patch) => setAgent({ ...agent, ...patch })}\n * availableTools={tools}\n * availableSubAgents={subAgents}\n * onDiscard={() => router.back()}\n * onSaveDraft={saveDraft}\n * onPublish={publish}\n * />\n */\nexport const AgentBuilder: React.FC<AgentBuilderProps> = (props) => {\n\tconst {\n\t\tconfig,\n\t\tonChange,\n\t\tonStepChange,\n\t\tonDiscard,\n\t\tonSaveDraft,\n\t\tonPublish,\n\t\tonBack,\n\t\tonTestAgent,\n\t\tonGoToDashboard,\n\t\tonCreateSubAgent,\n\t\tonFetchSubAgent,\n\t\tonUpdateSubAgent,\n\t\tonImproveSubAgent,\n\t\tonImproveToolInstructions,\n\t\tonConnectIntegration,\n\t\t...rest\n\t} = props;\n\tconst {\n\t\tvalue,\n\t\tactiveStep,\n\t\tavailableTools,\n\t\tavailableSubAgents,\n\t\tavailableIntents = [],\n\t\tavailableModels = [],\n\t\tconfigToolTemplates,\n\t\tintegrationStatus,\n\t\tvalidation,\n\t\tapplicationType,\n\t\tcharLimits,\n\t\tisSaving,\n\t\tisPublishing,\n\t\tisLoading,\n\t\tfooterHint = 'Changes don’t affect customers until you go live',\n\t\tdisableStepNavigation,\n\t\tdebugLog,\n\t} = config;\n\n\tconst [modalMode, setModalMode] = useState<GoLiveModalMode>(null);\n\tconst [publishingLocal, setPublishingLocal] = useState(false);\n\t// True while onTestAgent's async work (e.g. save-as-draft before the test\n\t// modal opens) is in flight — loads + disables the Test agent button.\n\tconst [testingLocal, setTestingLocal] = useState(false);\n\t// Back was pressed → confirm leaving (save draft / discard) before navigating.\n\tconst [showLeaveConfirm, setShowLeaveConfirm] = useState(false);\n\tconst [savingAndLeaving, setSavingAndLeaving] = useState(false);\n\n\t// Gated debug logging: each handler logs at its start only when `debugLog`.\n\tconst logAction = useCallback(\n\t\t(action: string, ...args: unknown[]) => {\n\t\t\tif (debugLog) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.log(`[AgentBuilder] ${action}`, ...args);\n\t\t\t}\n\t\t},\n\t\t[debugLog],\n\t);\n\n\tconst handleChange = useCallback(\n\t\t(patch: Partial<AgentValue>) => {\n\t\t\tlogAction('onChange', patch);\n\t\t\tonChange(patch);\n\t\t},\n\t\t[logAction, onChange],\n\t);\n\tconst handleStepChange = useCallback(\n\t\t(step: Parameters<NonNullable<typeof onStepChange>>[0]) => {\n\t\t\tlogAction('onStepChange', step);\n\t\t\tonStepChange?.(step);\n\t\t},\n\t\t[logAction, onStepChange],\n\t);\n\tconst handleSaveDraft = useCallback(() => {\n\t\tlogAction('onSaveDraft');\n\t\treturn onSaveDraft();\n\t}, [logAction, onSaveDraft]);\n\tconst handlePublish = useCallback(() => {\n\t\tlogAction('onPublish');\n\t\treturn onPublish();\n\t}, [logAction, onPublish]);\n\t// Back opens the \"Save as draft?\" confirmation rather than leaving directly.\n\tconst handleBack = useCallback(() => {\n\t\tlogAction('onBack');\n\t\tsetShowLeaveConfirm(true);\n\t}, [logAction]);\n\n\t// Modal \"Discard\" defers to the parent's discard handler (same as the top bar).\n\tconst handleDiscardAndLeave = useCallback(() => {\n\t\tlogAction('onDiscardAndLeave');\n\t\tsetShowLeaveConfirm(false);\n\t\tonDiscard();\n\t}, [logAction, onDiscard]);\n\n\tconst handleSaveDraftAndLeave = useCallback(async () => {\n\t\tlogAction('onSaveDraftAndLeave');\n\t\tconst result = onSaveDraft();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetSavingAndLeaving(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t} finally {\n\t\t\t\tsetSavingAndLeaving(false);\n\t\t\t}\n\t\t}\n\t\tsetShowLeaveConfirm(false);\n\t\tonBack?.();\n\t}, [logAction, onSaveDraft, onBack]);\n\tconst handleTestAgent = useCallback(async () => {\n\t\tlogAction('onTestAgent');\n\t\tconst result = onTestAgent?.();\n\t\t// A new agent saves as draft before the test modal opens — that's slow, so\n\t\t// disable + load the button until it settles (prevents double-triggering).\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetTestingLocal(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t} finally {\n\t\t\t\tsetTestingLocal(false);\n\t\t\t}\n\t\t}\n\t}, [logAction, onTestAgent]);\n\tconst handleGoToDashboard = useCallback(() => {\n\t\tlogAction('onGoToDashboard');\n\t\tonGoToDashboard?.();\n\t}, [logAction, onGoToDashboard]);\n\tconst handleCreateSubAgent = useCallback(\n\t\t(draft: SubAgentDraft) => {\n\t\t\tlogAction('onCreateSubAgent', draft);\n\t\t\treturn onCreateSubAgent\n\t\t\t\t? onCreateSubAgent(draft)\n\t\t\t\t: Promise.reject(new Error('onCreateSubAgent not provided'));\n\t\t},\n\t\t[logAction, onCreateSubAgent],\n\t);\n\n\tconst handleConfirmGoLive = async () => {\n\t\tlogAction('onGoLiveConfirm');\n\t\tconst result = handlePublish();\n\t\tif (result && typeof (result as Promise<void>).then === 'function') {\n\t\t\tsetPublishingLocal(true);\n\t\t\ttry {\n\t\t\t\tawait result;\n\t\t\t\tsetModalMode('success');\n\t\t\t} finally {\n\t\t\t\tsetPublishingLocal(false);\n\t\t\t}\n\t\t} else {\n\t\t\tsetModalMode('success');\n\t\t}\n\t};\n\n\treturn (\n\t\t<AgentBuilderProvider\n\t\t\tvalue={value}\n\t\t\tonChange={handleChange}\n\t\t\tactiveStep={activeStep}\n\t\t\tonStepChange={onStepChange ? handleStepChange : undefined}\n\t\t\tavailableTools={availableTools}\n\t\t\tavailableSubAgents={availableSubAgents}\n\t\t\tavailableIntents={availableIntents}\n\t\t\tavailableModels={availableModels}\n\t\t\tconfigToolTemplates={configToolTemplates}\n\t\t\tintegrationStatus={integrationStatus}\n\t\t\tonConnectIntegration={onConnectIntegration}\n\t\t\tvalidation={validation}\n\t\t\tapplicationType={applicationType}\n\t\t\tcharLimits={charLimits}\n\t\t\tdisableStepNavigation={disableStepNavigation}\n\t\t\tonCreateSubAgent={onCreateSubAgent ? handleCreateSubAgent : undefined}\n\t\t\tonFetchSubAgent={onFetchSubAgent}\n\t\t\tonUpdateSubAgent={onUpdateSubAgent}\n\t\t\tonImproveSubAgent={onImproveSubAgent}\n\t\t\tonImproveToolInstructions={onImproveToolInstructions}\n\t\t>\n\t\t\t<BuilderRoot data-test={rest['data-test'] ?? 'agent-builder'}>\n\t\t\t\t<AgentBuilderTopBar\n\t\t\t\t\tname={value.name}\n\t\t\t\t\tstatus={value.status}\n\t\t\t\t\tonBack={onBack ? handleBack : undefined}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<Main>\n\t\t\t\t\t<Rail>\n\t\t\t\t\t\t<StepRail />\n\t\t\t\t\t</Rail>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{isLoading ? (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Spinner size=\"large\" color={COLORS.stroke.brand} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ContentCard>\n\t\t\t\t\t\t\t\t<StepScroll>\n\t\t\t\t\t\t\t\t\t<StepContent />\n\t\t\t\t\t\t\t\t</StepScroll>\n\t\t\t\t\t\t\t\t<AgentBuilderFooter\n\t\t\t\t\t\t\t\t\tfooterHint={footerHint}\n\t\t\t\t\t\t\t\t\tonTestAgent={onTestAgent ? handleTestAgent : undefined}\n\t\t\t\t\t\t\t\t\tisTesting={testingLocal}\n\t\t\t\t\t\t\t\t\tonGoLive={() => {\n\t\t\t\t\t\t\t\t\t\tlogAction('onGoLive');\n\t\t\t\t\t\t\t\t\t\tsetModalMode('confirm');\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ContentCard>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Content>\n\t\t\t\t</Main>\n\n\t\t\t\t<GoLiveModal\n\t\t\t\t\tmode={modalMode}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tconst wasSuccess = modalMode === 'success';\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\tif (wasSuccess) {\n\t\t\t\t\t\t\thandleGoToDashboard();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tonConfirm={handleConfirmGoLive}\n\t\t\t\t\tonSaveDraft={() => {\n\t\t\t\t\t\tsetModalMode(null);\n\t\t\t\t\t\thandleSaveDraft();\n\t\t\t\t\t}}\n\t\t\t\t\tonGoToDashboard={onGoToDashboard ? handleGoToDashboard : undefined}\n\t\t\t\t\tisPublishing={isPublishing || publishingLocal}\n\t\t\t\t/>\n\n\t\t\t\t<DiscardModal\n\t\t\t\t\topen={showLeaveConfirm}\n\t\t\t\t\tonClose={() => setShowLeaveConfirm(false)}\n\t\t\t\t\tonDiscard={handleDiscardAndLeave}\n\t\t\t\t\tonSaveDraft={handleSaveDraftAndLeave}\n\t\t\t\t\tdisableSaveDraft={!value.name.trim()}\n\t\t\t\t\tisSaving={isSaving || savingAndLeaving}\n\t\t\t\t/>\n\n\t\t\t\t<UndoToast />\n\t\t\t</BuilderRoot>\n\t\t</AgentBuilderProvider>\n\t);\n};\n\nAgentBuilder.displayName = 'AgentBuilder';\n"],"names":["StepContent","activeStep","useAgentBuilderContext","Step1About","Step2WhenItStepsIn","Step3HowItResponds","Step4HandoverRules","AgentBuilder","props","config","onChange","onStepChange","onDiscard","onSaveDraft","onPublish","onBack","onTestAgent","onGoToDashboard","onCreateSubAgent","onFetchSubAgent","onUpdateSubAgent","onImproveSubAgent","onImproveToolInstructions","onConnectIntegration","rest","value","availableTools","availableSubAgents","availableIntents","availableModels","configToolTemplates","integrationStatus","validation","applicationType","charLimits","isSaving","isPublishing","isLoading","footerHint","disableStepNavigation","debugLog","modalMode","setModalMode","useState","publishingLocal","setPublishingLocal","testingLocal","setTestingLocal","showLeaveConfirm","setShowLeaveConfirm","savingAndLeaving","setSavingAndLeaving","logAction","useCallback","action","args","handleChange","patch","handleStepChange","step","handleSaveDraft","handlePublish","handleBack","handleDiscardAndLeave","handleSaveDraftAndLeave","result","handleTestAgent","handleGoToDashboard","handleCreateSubAgent","draft","handleConfirmGoLive","jsx","AgentBuilderProvider","BuilderRoot","AgentBuilderTopBar","Main","Rail","StepRail","Content","Spinner","COLORS","ContentCard","StepScroll","AgentBuilderFooter","GoLiveModal","wasSuccess","DiscardModal","UndoToast"],"mappings":";;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAwB,MAAM;AACnC,QAAM,EAAE,YAAAC,EAAA,IAAeC,GAAA;AACvB,UAAQD,GAAA;AAAA,IACP,KAAK;AACJ,+BAAQE,IAAA,EAAW;AAAA,IACpB,KAAK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,oBAAM4C,IAAa5C,MAAc;AACjC,cAAAC,EAAa,IAAI,GACb2C,KACHlB,EAAA;AAAA,YAEF;AAAA,YACA,WAAWG;AAAA,YACX,aAAa,MAAM;AAClB,cAAA5B,EAAa,IAAI,GACjBkB,GAAA;AAAA,YACD;AAAA,YACA,iBAAiB3C,IAAkBkD,IAAsB;AAAA,YACzD,cAAc/B,KAAgBQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAG/B,gBAAA2B;AAAA,UAACe;AAAA,UAAA;AAAA,YACA,MAAMtC;AAAA,YACN,SAAS,MAAMC,EAAoB,EAAK;AAAA,YACxC,WAAWc;AAAA,YACX,aAAaC;AAAA,YACb,kBAAkB,CAACvC,EAAM,KAAK,KAAA;AAAA,YAC9B,UAAUU,KAAYe;AAAA,UAAA;AAAA,QAAA;AAAA,0BAGtBqC,IAAA,CAAA,CAAU;AAAA,MAAA,EAAA,CACZ;AAAA,IAAA;AAAA,EAAA;AAGH;AAEAhF,GAAa,cAAc;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AgentConfig, AgentHandoverConfig, AgentToolDoc, IntentOption, ModelOption, StepKey, StepValidation, SubAgentRef, Trigger } from '@bikdotai/bik-models/ai-agents';
|
|
2
2
|
import { ApplicationType } from '@bikdotai/bik-models/growth';
|
|
3
|
-
import { VariableListInterfaceV3 } from '../variable-picker-v3/model';
|
|
4
3
|
import { AgentCharLimits } from './constants/charLimits';
|
|
5
4
|
import { ConfigToolKey, ToolSource } from './constants/tools';
|
|
6
5
|
/**
|
|
@@ -233,13 +232,6 @@ export interface AgentBuilderConfig {
|
|
|
233
232
|
* {@link AgentBuilderProps.onConnectIntegration}.
|
|
234
233
|
*/
|
|
235
234
|
integrationStatus?: Partial<Record<ToolSource, boolean>>;
|
|
236
|
-
/**
|
|
237
|
-
* Variable catalog for the `@` picker's "Variables" view (the shared
|
|
238
|
-
* VariablePicker's `data` shape). Picking a variable inserts its
|
|
239
|
-
* `{{actualValue}}` token into the instructions / guardrails at the cursor.
|
|
240
|
-
* Omit (or pass empty) to hide the Variables category entirely.
|
|
241
|
-
*/
|
|
242
|
-
variablesData?: VariableListInterfaceV3[];
|
|
243
235
|
/** Host application context the merchant runs in (e.g. ApplicationType.MANIFEST). */
|
|
244
236
|
applicationType?: ApplicationType;
|
|
245
237
|
/** Optional consumer-supplied validity; merged over the builder's derived validity. */
|
|
@@ -286,8 +278,13 @@ export interface AgentBuilderProps {
|
|
|
286
278
|
onPublish: () => void | Promise<void>;
|
|
287
279
|
/** Back arrow in the top bar (e.g. return to listing). */
|
|
288
280
|
onBack?: () => void;
|
|
289
|
-
/**
|
|
290
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Trigger a test run of the agent (last-step "Test agent" action). Omit to
|
|
283
|
+
* hide it. If it returns a promise (e.g. a new agent is saved as draft before
|
|
284
|
+
* the test modal opens), the button shows a loader and stays disabled until it
|
|
285
|
+
* settles, so a slow save can't be double-triggered.
|
|
286
|
+
*/
|
|
287
|
+
onTestAgent?: () => void | Promise<void>;
|
|
291
288
|
/** After a successful go-live, navigate to the dashboard. Drives the success modal CTA. */
|
|
292
289
|
onGoToDashboard?: () => void;
|
|
293
290
|
/**
|
|
@@ -2,6 +2,8 @@ import { default as React } from 'react';
|
|
|
2
2
|
interface AgentBuilderFooterProps {
|
|
3
3
|
footerHint: string;
|
|
4
4
|
onTestAgent?: () => void;
|
|
5
|
+
/** Loader + disabled on the Test agent button while its action is in flight. */
|
|
6
|
+
isTesting?: boolean;
|
|
5
7
|
/** Opens the go-live confirmation. */
|
|
6
8
|
onGoLive: () => void;
|
|
7
9
|
isPublishing?: boolean;
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { jsxs as e, jsx as t, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { BodyCaption as
|
|
4
|
-
import { COLORS as
|
|
5
|
-
import { Footer as
|
|
1
|
+
import { jsxs as e, jsx as t, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import y from "../../../assets/icons/info.svg.js";
|
|
3
|
+
import { BodyCaption as h } from "../../TypographyStyle.js";
|
|
4
|
+
import { COLORS as n } from "../../../constants/Theme.js";
|
|
5
|
+
import { Footer as f, FooterHint as v, FooterActions as C } from "../AgentBuilder.styled.js";
|
|
6
6
|
import { useAgentBuilderContext as T } from "../context/AgentBuilderContext.js";
|
|
7
7
|
import { Button as o } from "../../button/Button.js";
|
|
8
8
|
const A = ({
|
|
9
|
-
footerHint:
|
|
9
|
+
footerHint: a,
|
|
10
10
|
onTestAgent: i,
|
|
11
|
+
isTesting: r,
|
|
11
12
|
onGoLive: l,
|
|
12
|
-
isPublishing:
|
|
13
|
+
isPublishing: s
|
|
13
14
|
}) => {
|
|
14
15
|
const {
|
|
15
|
-
isFirstStep:
|
|
16
|
-
isLastStep:
|
|
17
|
-
goPrev:
|
|
18
|
-
goNext:
|
|
19
|
-
isActiveStepValid:
|
|
20
|
-
validation:
|
|
21
|
-
} = T(),
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
23
|
-
/* @__PURE__ */ e(f, { children: [
|
|
24
|
-
/* @__PURE__ */ t(x, { width: 14, height: 14, color: r.content.placeholder }),
|
|
25
|
-
/* @__PURE__ */ t(y, { color: r.content.placeholder, children: n })
|
|
26
|
-
] }),
|
|
16
|
+
isFirstStep: d,
|
|
17
|
+
isLastStep: c,
|
|
18
|
+
goPrev: p,
|
|
19
|
+
goNext: m,
|
|
20
|
+
isActiveStepValid: u,
|
|
21
|
+
validation: b
|
|
22
|
+
} = T(), g = Object.values(b).every(Boolean);
|
|
23
|
+
return /* @__PURE__ */ e(f, { children: [
|
|
27
24
|
/* @__PURE__ */ e(v, { children: [
|
|
28
|
-
|
|
25
|
+
/* @__PURE__ */ t(y, { width: 14, height: 14, color: n.content.placeholder }),
|
|
26
|
+
/* @__PURE__ */ t(h, { color: n.content.placeholder, children: a })
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ e(C, { children: [
|
|
29
|
+
!d && /* @__PURE__ */ t(
|
|
29
30
|
o,
|
|
30
31
|
{
|
|
31
32
|
"data-test": "agent-builder-back-step",
|
|
32
33
|
buttonType: "tertiaryGray",
|
|
33
34
|
size: "small",
|
|
34
35
|
buttonText: "Back",
|
|
35
|
-
onClick:
|
|
36
|
+
onClick: p
|
|
36
37
|
}
|
|
37
38
|
),
|
|
38
|
-
|
|
39
|
+
c ? /* @__PURE__ */ e(x, { children: [
|
|
39
40
|
i && /* @__PURE__ */ t(
|
|
40
41
|
o,
|
|
41
42
|
{
|
|
@@ -43,6 +44,8 @@ const A = ({
|
|
|
43
44
|
buttonType: "secondary",
|
|
44
45
|
size: "small",
|
|
45
46
|
buttonText: "Test agent",
|
|
47
|
+
isLoading: r,
|
|
48
|
+
disabled: r,
|
|
46
49
|
onClick: i
|
|
47
50
|
}
|
|
48
51
|
),
|
|
@@ -53,8 +56,8 @@ const A = ({
|
|
|
53
56
|
buttonType: "primary",
|
|
54
57
|
size: "small",
|
|
55
58
|
buttonText: "Go live",
|
|
56
|
-
disabled: !
|
|
57
|
-
isLoading:
|
|
59
|
+
disabled: !g,
|
|
60
|
+
isLoading: s,
|
|
58
61
|
onClick: l
|
|
59
62
|
}
|
|
60
63
|
)
|
|
@@ -65,8 +68,8 @@ const A = ({
|
|
|
65
68
|
buttonType: "primary",
|
|
66
69
|
size: "small",
|
|
67
70
|
buttonText: "Next",
|
|
68
|
-
disabled: !
|
|
69
|
-
onClick:
|
|
71
|
+
disabled: !u,
|
|
72
|
+
onClick: m
|
|
70
73
|
}
|
|
71
74
|
)
|
|
72
75
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentBuilderFooter.js","sources":["../../../../../src/components/agent-builder/components/AgentBuilderFooter.tsx"],"sourcesContent":["import InfoIcon from '@src/assets/icons/info.svg';\nimport React from 'react';\nimport { Button } from '@src/components/button';\nimport { BodyCaption } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { Footer, FooterActions, FooterHint } from '../AgentBuilder.styled';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\ninterface AgentBuilderFooterProps {\n\tfooterHint: string;\n\tonTestAgent?: () => void;\n\t/** Opens the go-live confirmation. */\n\tonGoLive: () => void;\n\tisPublishing?: boolean;\n}\n\nexport const AgentBuilderFooter: React.FC<AgentBuilderFooterProps> = ({\n\tfooterHint,\n\tonTestAgent,\n\tonGoLive,\n\tisPublishing,\n}) => {\n\tconst {\n\t\tisFirstStep,\n\t\tisLastStep,\n\t\tgoPrev,\n\t\tgoNext,\n\t\tisActiveStepValid,\n\t\tvalidation,\n\t} = useAgentBuilderContext();\n\t// Publishing requires every step complete, not just the active one.\n\tconst allStepsValid = Object.values(validation).every(Boolean);\n\n\treturn (\n\t\t<Footer>\n\t\t\t<FooterHint>\n\t\t\t\t<InfoIcon width={14} height={14} color={COLORS.content.placeholder} />\n\t\t\t\t<BodyCaption color={COLORS.content.placeholder}>\n\t\t\t\t\t{footerHint}\n\t\t\t\t</BodyCaption>\n\t\t\t</FooterHint>\n\n\t\t\t<FooterActions>\n\t\t\t\t{!isFirstStep && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-back-step\"\n\t\t\t\t\t\tbuttonType=\"tertiaryGray\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Back\"\n\t\t\t\t\t\tonClick={goPrev}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{isLastStep ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{onTestAgent && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-test=\"agent-builder-test\"\n\t\t\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tbuttonText=\"Test agent\"\n\t\t\t\t\t\t\t\tonClick={onTestAgent}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdata-test=\"agent-builder-go-live\"\n\t\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tbuttonText=\"Go live\"\n\t\t\t\t\t\t\tdisabled={!allStepsValid}\n\t\t\t\t\t\t\tisLoading={isPublishing}\n\t\t\t\t\t\t\tonClick={onGoLive}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-next\"\n\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Next\"\n\t\t\t\t\t\tdisabled={!isActiveStepValid}\n\t\t\t\t\t\tonClick={goNext}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</FooterActions>\n\t\t</Footer>\n\t);\n};\n"],"names":["AgentBuilderFooter","footerHint","onTestAgent","onGoLive","isPublishing","isFirstStep","isLastStep","goPrev","goNext","isActiveStepValid","validation","useAgentBuilderContext","allStepsValid","Footer","jsxs","FooterHint","jsx","InfoIcon","COLORS","BodyCaption","FooterActions","Button","Fragment"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"AgentBuilderFooter.js","sources":["../../../../../src/components/agent-builder/components/AgentBuilderFooter.tsx"],"sourcesContent":["import InfoIcon from '@src/assets/icons/info.svg';\nimport React from 'react';\nimport { Button } from '@src/components/button';\nimport { BodyCaption } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { Footer, FooterActions, FooterHint } from '../AgentBuilder.styled';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\ninterface AgentBuilderFooterProps {\n\tfooterHint: string;\n\tonTestAgent?: () => void;\n\t/** Loader + disabled on the Test agent button while its action is in flight. */\n\tisTesting?: boolean;\n\t/** Opens the go-live confirmation. */\n\tonGoLive: () => void;\n\tisPublishing?: boolean;\n}\n\nexport const AgentBuilderFooter: React.FC<AgentBuilderFooterProps> = ({\n\tfooterHint,\n\tonTestAgent,\n\tisTesting,\n\tonGoLive,\n\tisPublishing,\n}) => {\n\tconst {\n\t\tisFirstStep,\n\t\tisLastStep,\n\t\tgoPrev,\n\t\tgoNext,\n\t\tisActiveStepValid,\n\t\tvalidation,\n\t} = useAgentBuilderContext();\n\t// Publishing requires every step complete, not just the active one.\n\tconst allStepsValid = Object.values(validation).every(Boolean);\n\n\treturn (\n\t\t<Footer>\n\t\t\t<FooterHint>\n\t\t\t\t<InfoIcon width={14} height={14} color={COLORS.content.placeholder} />\n\t\t\t\t<BodyCaption color={COLORS.content.placeholder}>\n\t\t\t\t\t{footerHint}\n\t\t\t\t</BodyCaption>\n\t\t\t</FooterHint>\n\n\t\t\t<FooterActions>\n\t\t\t\t{!isFirstStep && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-back-step\"\n\t\t\t\t\t\tbuttonType=\"tertiaryGray\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Back\"\n\t\t\t\t\t\tonClick={goPrev}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{isLastStep ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{onTestAgent && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tdata-test=\"agent-builder-test\"\n\t\t\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tbuttonText=\"Test agent\"\n\t\t\t\t\t\t\t\tisLoading={isTesting}\n\t\t\t\t\t\t\t\tdisabled={isTesting}\n\t\t\t\t\t\t\t\tonClick={onTestAgent}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdata-test=\"agent-builder-go-live\"\n\t\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tbuttonText=\"Go live\"\n\t\t\t\t\t\t\tdisabled={!allStepsValid}\n\t\t\t\t\t\t\tisLoading={isPublishing}\n\t\t\t\t\t\t\tonClick={onGoLive}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-next\"\n\t\t\t\t\t\tbuttonType=\"primary\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Next\"\n\t\t\t\t\t\tdisabled={!isActiveStepValid}\n\t\t\t\t\t\tonClick={goNext}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</FooterActions>\n\t\t</Footer>\n\t);\n};\n"],"names":["AgentBuilderFooter","footerHint","onTestAgent","isTesting","onGoLive","isPublishing","isFirstStep","isLastStep","goPrev","goNext","isActiveStepValid","validation","useAgentBuilderContext","allStepsValid","Footer","jsxs","FooterHint","jsx","InfoIcon","COLORS","BodyCaption","FooterActions","Button","Fragment"],"mappings":";;;;;;;AAkBO,MAAMA,IAAwD,CAAC;AAAA,EACrE,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AACD,MAAM;AACL,QAAM;AAAA,IACL,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,IACGC,EAAA,GAEEC,IAAgB,OAAO,OAAOF,CAAU,EAAE,MAAM,OAAO;AAE7D,2BACEG,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EACA,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAS,OAAO,IAAI,QAAQ,IAAI,OAAOC,EAAO,QAAQ,YAAA,CAAa;AAAA,wBACnEC,GAAA,EAAY,OAAOD,EAAO,QAAQ,aACjC,UAAAlB,EAAA,CACF;AAAA,IAAA,GACD;AAAA,sBAECoB,GAAA,EACC,UAAA;AAAA,MAAA,CAACf,KACD,gBAAAW;AAAA,QAACK;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,YAAW;AAAA,UACX,MAAK;AAAA,UACL,YAAW;AAAA,UACX,SAASd;AAAA,QAAA;AAAA,MAAA;AAAA,MAIVD,IACA,gBAAAQ,EAAAQ,GAAA,EACE,UAAA;AAAA,QAAArB,KACA,gBAAAe;AAAA,UAACK;AAAA,UAAA;AAAA,YACA,aAAU;AAAA,YACV,YAAW;AAAA,YACX,MAAK;AAAA,YACL,YAAW;AAAA,YACX,WAAWnB;AAAA,YACX,UAAUA;AAAA,YACV,SAASD;AAAA,UAAA;AAAA,QAAA;AAAA,QAGX,gBAAAe;AAAA,UAACK;AAAA,UAAA;AAAA,YACA,aAAU;AAAA,YACV,YAAW;AAAA,YACX,MAAK;AAAA,YACL,YAAW;AAAA,YACX,UAAU,CAACT;AAAA,YACX,WAAWR;AAAA,YACX,SAASD;AAAA,UAAA;AAAA,QAAA;AAAA,MACV,EAAA,CACD,IAEA,gBAAAa;AAAA,QAACK;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,YAAW;AAAA,UACX,MAAK;AAAA,UACL,YAAW;AAAA,UACX,UAAU,CAACZ;AAAA,UACX,SAASD;AAAA,QAAA;AAAA,MAAA;AAAA,IACV,EAAA,CAEF;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { TitleRegular as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import p from "../../../assets/icons/arrow_left.svg.js";
|
|
3
|
+
import { TitleRegular as u } from "../../TypographyStyle.js";
|
|
4
4
|
import { COLORS as a } from "../../../constants/Theme.js";
|
|
5
|
-
import { TopBar as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
import { TopBar as f, TopBarSide as n, BackButton as g, DraftButtonScope as v } from "../AgentBuilder.styled.js";
|
|
6
|
+
import { useAgentBuilderContext as h } from "../context/AgentBuilderContext.js";
|
|
7
|
+
import { Tag as B } from "../../tag/Tag.js";
|
|
8
|
+
import { Button as b } from "../../button/Button.js";
|
|
9
|
+
const D = ({
|
|
10
|
+
name: l,
|
|
11
|
+
status: d,
|
|
12
|
+
onBack: r,
|
|
13
|
+
onSaveDraft: c,
|
|
14
|
+
isSaving: m
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const { validation: e } = h(), o = d === "live", s = e.about && e.trigger;
|
|
17
|
+
return /* @__PURE__ */ i(f, { children: [
|
|
18
|
+
/* @__PURE__ */ i(n, { children: [
|
|
19
|
+
r && /* @__PURE__ */ t(
|
|
20
|
+
g,
|
|
20
21
|
{
|
|
21
22
|
"data-test": "agent-builder-back",
|
|
22
|
-
onClick:
|
|
23
|
+
onClick: r,
|
|
23
24
|
"aria-label": "Back",
|
|
24
25
|
children: /* @__PURE__ */ t(
|
|
25
|
-
|
|
26
|
+
p,
|
|
26
27
|
{
|
|
27
28
|
width: 24,
|
|
28
29
|
height: 24,
|
|
@@ -31,31 +32,31 @@ const S = ({
|
|
|
31
32
|
)
|
|
32
33
|
}
|
|
33
34
|
),
|
|
34
|
-
/* @__PURE__ */ t(
|
|
35
|
+
/* @__PURE__ */ t(u, { color: a.content.primary, children: l || "Untitled agent" }),
|
|
35
36
|
/* @__PURE__ */ t(
|
|
36
|
-
|
|
37
|
+
B,
|
|
37
38
|
{
|
|
38
|
-
tagText:
|
|
39
|
-
type:
|
|
39
|
+
tagText: o ? "Live" : "Draft",
|
|
40
|
+
type: o ? "positive" : "neutral",
|
|
40
41
|
variant: "regular"
|
|
41
42
|
}
|
|
42
43
|
)
|
|
43
44
|
] }),
|
|
44
|
-
/* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
|
|
45
|
-
|
|
45
|
+
/* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(
|
|
46
|
+
b,
|
|
46
47
|
{
|
|
47
48
|
"data-test": "agent-builder-save-draft",
|
|
48
49
|
buttonType: "secondary",
|
|
49
50
|
size: "small",
|
|
50
51
|
buttonText: "Save as draft",
|
|
51
|
-
disabled: !
|
|
52
|
-
isLoading:
|
|
53
|
-
onClick:
|
|
52
|
+
disabled: !s,
|
|
53
|
+
isLoading: m,
|
|
54
|
+
onClick: c
|
|
54
55
|
}
|
|
55
56
|
) }) })
|
|
56
57
|
] });
|
|
57
58
|
};
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
D as AgentBuilderTopBar
|
|
60
61
|
};
|
|
61
62
|
//# sourceMappingURL=AgentBuilderTopBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentBuilderTopBar.js","sources":["../../../../../src/components/agent-builder/components/AgentBuilderTopBar.tsx"],"sourcesContent":["import ArrowLeftIcon from '@src/assets/icons/arrow_left.svg';\nimport React from 'react';\nimport { Button } from '@src/components/button';\nimport { Tag } from '@src/components/tag';\nimport { TitleRegular } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { AgentStatus } from '../AgentBuilder.model';\nimport {\n\tBackButton,\n\tDraftButtonScope,\n\tTopBar,\n\tTopBarSide,\n} from '../AgentBuilder.styled';\n\ninterface AgentBuilderTopBarProps {\n\tname: string;\n\tstatus: AgentStatus;\n\tonBack?: () => void;\n\tonSaveDraft: () => void;\n\tisSaving?: boolean;\n}\n\nexport const AgentBuilderTopBar: React.FC<AgentBuilderTopBarProps> = ({\n\tname,\n\tstatus,\n\tonBack,\n\tonSaveDraft,\n\tisSaving,\n}) => {\n\tconst isLive = status === 'live';\n\treturn (\n\t\t<TopBar>\n\t\t\t<TopBarSide>\n\t\t\t\t{onBack && (\n\t\t\t\t\t<BackButton\n\t\t\t\t\t\tdata-test=\"agent-builder-back\"\n\t\t\t\t\t\tonClick={onBack}\n\t\t\t\t\t\taria-label=\"Back\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ArrowLeftIcon\n\t\t\t\t\t\t\twidth={24}\n\t\t\t\t\t\t\theight={24}\n\t\t\t\t\t\t\tcolor={COLORS.content.primary}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BackButton>\n\t\t\t\t)}\n\t\t\t\t<TitleRegular color={COLORS.content.primary}>\n\t\t\t\t\t{name || 'Untitled agent'}\n\t\t\t\t</TitleRegular>\n\t\t\t\t<Tag\n\t\t\t\t\ttagText={isLive ? 'Live' : 'Draft'}\n\t\t\t\t\ttype={isLive ? 'positive' : 'neutral'}\n\t\t\t\t\tvariant=\"regular\"\n\t\t\t\t/>\n\t\t\t</TopBarSide>\n\n\t\t\t<TopBarSide>\n\t\t\t\t<DraftButtonScope>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-save-draft\"\n\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Save as draft\"\n\t\t\t\t\t\
|
|
1
|
+
{"version":3,"file":"AgentBuilderTopBar.js","sources":["../../../../../src/components/agent-builder/components/AgentBuilderTopBar.tsx"],"sourcesContent":["import ArrowLeftIcon from '@src/assets/icons/arrow_left.svg';\nimport React from 'react';\nimport { Button } from '@src/components/button';\nimport { Tag } from '@src/components/tag';\nimport { TitleRegular } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { AgentStatus } from '../AgentBuilder.model';\nimport {\n\tBackButton,\n\tDraftButtonScope,\n\tTopBar,\n\tTopBarSide,\n} from '../AgentBuilder.styled';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\ninterface AgentBuilderTopBarProps {\n\tname: string;\n\tstatus: AgentStatus;\n\tonBack?: () => void;\n\tonSaveDraft: () => void;\n\tisSaving?: boolean;\n}\n\nexport const AgentBuilderTopBar: React.FC<AgentBuilderTopBarProps> = ({\n\tname,\n\tstatus,\n\tonBack,\n\tonSaveDraft,\n\tisSaving,\n}) => {\n\tconst { validation } = useAgentBuilderContext();\n\tconst isLive = status === 'live';\n\t// A draft needs both a name and a trigger (topic/phrases) — without either it\n\t// isn't identifiable or runnable from the listing.\n\tconst canSaveDraft = validation.about && validation.trigger;\n\treturn (\n\t\t<TopBar>\n\t\t\t<TopBarSide>\n\t\t\t\t{onBack && (\n\t\t\t\t\t<BackButton\n\t\t\t\t\t\tdata-test=\"agent-builder-back\"\n\t\t\t\t\t\tonClick={onBack}\n\t\t\t\t\t\taria-label=\"Back\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ArrowLeftIcon\n\t\t\t\t\t\t\twidth={24}\n\t\t\t\t\t\t\theight={24}\n\t\t\t\t\t\t\tcolor={COLORS.content.primary}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BackButton>\n\t\t\t\t)}\n\t\t\t\t<TitleRegular color={COLORS.content.primary}>\n\t\t\t\t\t{name || 'Untitled agent'}\n\t\t\t\t</TitleRegular>\n\t\t\t\t<Tag\n\t\t\t\t\ttagText={isLive ? 'Live' : 'Draft'}\n\t\t\t\t\ttype={isLive ? 'positive' : 'neutral'}\n\t\t\t\t\tvariant=\"regular\"\n\t\t\t\t/>\n\t\t\t</TopBarSide>\n\n\t\t\t<TopBarSide>\n\t\t\t\t<DraftButtonScope>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tdata-test=\"agent-builder-save-draft\"\n\t\t\t\t\t\tbuttonType=\"secondary\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tbuttonText=\"Save as draft\"\n\t\t\t\t\t\tdisabled={!canSaveDraft}\n\t\t\t\t\t\tisLoading={isSaving}\n\t\t\t\t\t\tonClick={onSaveDraft}\n\t\t\t\t\t/>\n\t\t\t\t</DraftButtonScope>\n\t\t\t</TopBarSide>\n\t\t</TopBar>\n\t);\n};\n"],"names":["AgentBuilderTopBar","name","status","onBack","onSaveDraft","isSaving","validation","useAgentBuilderContext","isLive","canSaveDraft","TopBar","jsxs","TopBarSide","jsx","BackButton","ArrowLeftIcon","COLORS","TitleRegular","Tag","DraftButtonScope","Button"],"mappings":";;;;;;;;AAuBO,MAAMA,IAAwD,CAAC;AAAA,EACrE,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AACD,MAAM;AACL,QAAM,EAAE,YAAAC,EAAA,IAAeC,EAAA,GACjBC,IAASN,MAAW,QAGpBO,IAAeH,EAAW,SAASA,EAAW;AACpD,2BACEI,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,MAAAT,KACA,gBAAAU;AAAA,QAACC;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,SAASX;AAAA,UACT,cAAW;AAAA,UAEX,UAAA,gBAAAU;AAAA,YAACE;AAAAA,YAAA;AAAA,cACA,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,OAAOC,EAAO,QAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,QACvB;AAAA,MAAA;AAAA,wBAGDC,GAAA,EAAa,OAAOD,EAAO,QAAQ,SAClC,eAAQ,kBACV;AAAA,MACA,gBAAAH;AAAA,QAACK;AAAA,QAAA;AAAA,UACA,SAASV,IAAS,SAAS;AAAA,UAC3B,MAAMA,IAAS,aAAa;AAAA,UAC5B,SAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACT,GACD;AAAA,IAEA,gBAAAK,EAACD,GAAA,EACA,UAAA,gBAAAC,EAACM,GAAA,EACA,UAAA,gBAAAN;AAAA,MAACO;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,YAAW;AAAA,QACX,MAAK;AAAA,QACL,YAAW;AAAA,QACX,UAAU,CAACX;AAAA,QACX,WAAWJ;AAAA,QACX,SAASD;AAAA,MAAA;AAAA,IAAA,GAEX,EAAA,CACD;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { VariableListInterfaceV3 } from '../../variable-picker-v3/model';
|
|
3
2
|
import { ConfigToolConfig, ConfigToolKey, ParamsBlob } from '../AgentBuilder.model';
|
|
4
3
|
import { AgentCharLimits } from '../constants/charLimits';
|
|
5
4
|
interface ConfigToolPanelProps {
|
|
@@ -19,13 +18,6 @@ interface ConfigToolPanelProps {
|
|
|
19
18
|
/** Optional "Improve with AI" for multiline fields. Omit to hide it. */
|
|
20
19
|
onImprove?: (text: string) => Promise<string>;
|
|
21
20
|
charLimits?: AgentCharLimits;
|
|
22
|
-
/**
|
|
23
|
-
* Variable catalog for the `@` trigger. When non-empty, `@` in the email
|
|
24
|
-
* tool's Subject / Send To / Reply To / CC opens the variable picker
|
|
25
|
-
* directly, and Message Instructions upgrades to the variables-only mention
|
|
26
|
-
* editor. Absent → the drawer behaves exactly as before.
|
|
27
|
-
*/
|
|
28
|
-
variablesData?: VariableListInterfaceV3[];
|
|
29
21
|
/** SideModal stacking order — raise it when opened over another drawer. */
|
|
30
22
|
zIndex?: number;
|
|
31
23
|
}
|