@oomol-lab/open-flow 0.1.0-beta.80 → 0.1.0-beta.81

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.
@@ -7186,7 +7186,7 @@ var resources = {
7186
7186
  },
7187
7187
  leina: {
7188
7188
  "notification": "Leina notification",
7189
- "description": "Send a notification through a team robot.",
7189
+ "subscription": "Notification subscription",
7190
7190
  "message": "Notification content",
7191
7191
  "loading": "Loading robots…",
7192
7192
  "robot": "Robot",
@@ -8555,7 +8555,7 @@ var resources = {
8555
8555
  },
8556
8556
  leina: {
8557
8557
  "notification": "Leina 通知",
8558
- "description": "选择团队机器人,发送通知。",
8558
+ "subscription": "通知订阅",
8559
8559
  "message": "通知内容",
8560
8560
  "loading": "正在加载机器人…",
8561
8561
  "robot": "机器人",
@@ -9924,7 +9924,7 @@ var resources = {
9924
9924
  },
9925
9925
  leina: {
9926
9926
  "notification": "Leina 通知",
9927
- "description": "選擇團隊機器人,傳送通知。",
9927
+ "subscription": "通知訂閱",
9928
9928
  "message": "通知內容",
9929
9929
  "loading": "正在載入機器人…",
9930
9930
  "robot": "機器人",
@@ -11293,7 +11293,7 @@ var resources = {
11293
11293
  },
11294
11294
  leina: {
11295
11295
  "notification": "Leina 通知",
11296
- "description": "チームのロボットから通知を送信します。",
11296
+ "subscription": "通知サブスクリプション",
11297
11297
  "message": "通知内容",
11298
11298
  "loading": "ロボットを読み込み中…",
11299
11299
  "robot": "ロボット",
@@ -12662,7 +12662,7 @@ var resources = {
12662
12662
  },
12663
12663
  leina: {
12664
12664
  "notification": "Leina 알림",
12665
- "description": "팀 로봇을 통해 알림을 보냅니다.",
12665
+ "subscription": "알림 구독",
12666
12666
  "message": "알림 내용",
12667
12667
  "loading": "로봇 불러오는 중…",
12668
12668
  "robot": "로봇",
@@ -14031,7 +14031,7 @@ var resources = {
14031
14031
  },
14032
14032
  leina: {
14033
14033
  "notification": "Уведомление Leina",
14034
- "description": "Отправьте уведомление через робота команды.",
14034
+ "subscription": "Подписка на уведомления",
14035
14035
  "message": "Текст уведомления",
14036
14036
  "loading": "Загрузка роботов…",
14037
14037
  "robot": "Робот",
@@ -15400,7 +15400,7 @@ var resources = {
15400
15400
  },
15401
15401
  leina: {
15402
15402
  "notification": "Notification Leina",
15403
- "description": "Envoyez une notification via un robot de l’équipe.",
15403
+ "subscription": "Abonnement aux notifications",
15404
15404
  "message": "Contenu de la notification",
15405
15405
  "loading": "Chargement des robots…",
15406
15406
  "robot": "Robot",
@@ -23627,6 +23627,135 @@ function observeResource(source, signal, update) {
23627
23627
  publish();
23628
23628
  }
23629
23629
  //#endregion
23630
+ //#region src/workbench/browser/runtime/editor/leinaBotSelect.tsx
23631
+ function LeinaBotSelect({ source, flowId, value, disabled, onChange }) {
23632
+ const t = useTranslate();
23633
+ const [attempt, setAttempt] = useState(0);
23634
+ const [state, setState] = useState();
23635
+ useEffect(() => {
23636
+ const controller = new AbortController();
23637
+ setState((previous) => ({
23638
+ flowId,
23639
+ source,
23640
+ loading: true,
23641
+ bots: previous?.flowId == flowId && previous.source == source ? previous.bots : void 0
23642
+ }));
23643
+ source.listLeinaBots(flowId, controller.signal).then((bots) => {
23644
+ if (!controller.signal.aborted) setState({
23645
+ flowId,
23646
+ source,
23647
+ bots,
23648
+ loading: false
23649
+ });
23650
+ }, (error) => {
23651
+ if (!controller.signal.aborted) setState((previous) => ({
23652
+ flowId,
23653
+ source,
23654
+ bots: previous?.flowId == flowId && previous.source == source ? previous.bots : void 0,
23655
+ loading: false,
23656
+ error: error instanceof Error ? error.message : t("contextPanel.loadFailed")
23657
+ }));
23658
+ });
23659
+ return () => controller.abort();
23660
+ }, [
23661
+ source,
23662
+ flowId,
23663
+ attempt,
23664
+ t
23665
+ ]);
23666
+ const current = state?.flowId == flowId && state.source == source ? state : void 0;
23667
+ const bots = current?.bots;
23668
+ const selected = typeof value == "string" && value.trim().length > 0 ? value : void 0;
23669
+ const missing = selected != null && bots != null && !bots.some((bot) => bot.leinaId == selected);
23670
+ const error = selected == null ? t("leina.select") : missing ? t("leina.unavailable", { id: selected }) : void 0;
23671
+ const selectedLabel = bots?.find((bot) => bot.leinaId == selected)?.name ?? (missing ? t("leina.unavailable", { id: selected }) : current?.error != null ? t("leina.loadFailed") : t("leina.loading"));
23672
+ const items = [...(bots ?? []).map((bot) => ({
23673
+ value: bot.leinaId,
23674
+ label: bot.name
23675
+ })), ...selected != null && !bots?.some((bot) => bot.leinaId == selected) ? [{
23676
+ value: selected,
23677
+ label: selectedLabel
23678
+ }] : []];
23679
+ return /* @__PURE__ */ jsx(ValueEditorFeedback, {
23680
+ error,
23681
+ children: (errorId) => /* @__PURE__ */ jsxs(Select, {
23682
+ items,
23683
+ value: selected ?? null,
23684
+ disabled,
23685
+ onOpenChange: (open) => {
23686
+ if (open) setAttempt((previous) => previous + 1);
23687
+ },
23688
+ onValueChange: (next) => {
23689
+ if (typeof next == "string" && bots?.some((bot) => bot.leinaId == next)) onChange(next);
23690
+ },
23691
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
23692
+ size: "field",
23693
+ className: "w-full",
23694
+ "data-field-control": true,
23695
+ "aria-label": t("leina.robot"),
23696
+ "aria-invalid": error != null || void 0,
23697
+ "aria-describedby": errorId,
23698
+ children: /* @__PURE__ */ jsx(SelectValue, {
23699
+ placeholder: t("leina.select"),
23700
+ children: selected == null ? void 0 : selectedLabel
23701
+ })
23702
+ }), /* @__PURE__ */ jsxs(SelectContent, {
23703
+ align: "start",
23704
+ alignItemWithTrigger: false,
23705
+ className: selectionMenuContentClass,
23706
+ children: [
23707
+ (current?.loading ?? true) && /* @__PURE__ */ jsx("span", {
23708
+ role: "status",
23709
+ className: "block px-1.5 py-1 text-xs leading-5 text-muted-foreground",
23710
+ children: t("leina.loading")
23711
+ }),
23712
+ bots?.map((bot) => /* @__PURE__ */ jsx(SelectItem, {
23713
+ value: bot.leinaId,
23714
+ className: selectionMenuItemClass,
23715
+ children: /* @__PURE__ */ jsx("span", {
23716
+ className: "truncate",
23717
+ children: bot.name
23718
+ })
23719
+ }, bot.leinaId)),
23720
+ missing && selected != null && /* @__PURE__ */ jsx(SelectItem, {
23721
+ value: selected,
23722
+ disabled: true,
23723
+ className: `mt-1 first-of-type:mt-0 min-h-7 rounded-[var(--ui-control-radius,var(--ui-radius))] py-1 text-xs leading-5 font-normal text-destructive`,
23724
+ children: t("leina.unavailable", { id: selected })
23725
+ }),
23726
+ current?.error != null && /* @__PURE__ */ jsxs("span", {
23727
+ role: "alert",
23728
+ className: "block px-1.5 py-1 text-xs leading-5 whitespace-normal break-words text-destructive",
23729
+ children: [
23730
+ t("leina.loadFailed"),
23731
+ " ",
23732
+ current.error
23733
+ ]
23734
+ }),
23735
+ bots?.length == 0 && !current?.loading && /* @__PURE__ */ jsx("span", {
23736
+ className: "block px-1.5 py-1 text-xs leading-5 whitespace-normal text-muted-foreground",
23737
+ children: t("leina.empty")
23738
+ })
23739
+ ]
23740
+ })]
23741
+ })
23742
+ });
23743
+ }
23744
+ //#endregion
23745
+ //#region src/workbench/browser/runtime/editor/connectorActionPresentation.tsx
23746
+ function connectorActionPresentation(actionId, t) {
23747
+ if (actionId != "leina.send_notification") return void 0;
23748
+ return {
23749
+ name: t("leina.notification"),
23750
+ fieldLabels: {
23751
+ leinaId: t("leina.robot"),
23752
+ message: t("leina.message"),
23753
+ subscription: t("leina.subscription")
23754
+ },
23755
+ renderInput: ({ handle, ...props }) => handle == "leinaId" ? /* @__PURE__ */ jsx(LeinaBotSelect, { ...props }, props.flowId) : void 0
23756
+ };
23757
+ }
23758
+ //#endregion
23630
23759
  //#region src/workbench/browser/runtime/stores/optionSource.ts
23631
23760
  function mapSource(source, signal, map) {
23632
23761
  if ("then" in source) return source.then((data) => data === void 0 ? void 0 : map(data));
@@ -25371,4 +25500,4 @@ function updateHttpParameters(revision, nodeId, group, edit, bindingId) {
25371
25500
  return cleanVariableBindings(content, [...operations, ...binding]);
25372
25501
  }
25373
25502
  //#endregion
25374
- export { action as $, normalizeTriggerOutputs as $n, FlowSettingsButton as $t, schemaForEditor as A, EmptyHeader as An, eventSourceKind as Ar, connectionCatalog as At, datePickerValue as B, errorNotice as Bn, setNodePositions as Bt, updateValue as C, followWorkbenchLink as Cn, workflowCandidateGroup as Cr, Latest as Ct, defaultValueEditorSchema as D, Empty as Dn, record$2 as Dr, diagnosticNodeId as Dt, supportsFeishuChatFilter as E, InputGroupInput as En, invalidResponse as Er, diagnosticMessage as Et, calendarChange as F, SourceForm as Fn, restoreCanvasPresentation as Ft, indexAddNodeOptions as G, decodeResultList as Gn, setConnectorConnection as Gt, isDateFormat as H, normalizeFlowQuery as Hn, repairNodeNames as Ht, calendarDate as I, SourceSelect as In, setCanvasLayout as It, scopedValue as J, inputSourceCandidates as Jn, updateStartInputDefs as Jt, combineSources as K, decodeTriggerCatalog as Kn, setInputSources as Kt, dateFromTimeZone as L, createI18n as Ln, setComment as Lt, getDefaultValue as M, EmptyTitle as Mn, commentIds as Mt, isUnconstrainedSchema as N, Badge as Nn, flowPresentation as Nt, editorComponent as O, EmptyContent as On, ApiError as Or, schemaMismatchMessage as Ot, typeOfSchema as P, EventSourcesPage as Pn, removeComments as Pt, resourceValue as Q, sourcePort as Qn, IdTooltip as Qt, dateInTimeZone as R, FeishuEventPicker as Rn, setFlowViewport as Rt, updateTriggerConfig as S, useFlowQuery as Sn, workflowCandidate as Sr, flowResourceReferences as St, feishuResourceKind as T, InputGroupAddon as Tn, workflowSelectionTask as Tr, diagnosticItems as Tt, addNodeIntent as U, randomId as Un, resetInputValues as Ut, dateTimeWall as V, WorkbenchClient as Vn, setVerticalNodeWidth as Vt, deriveAddNodeOptions as W, allConnectorConnectionsQuery as Wn, setCodeActions as Wt, observeResource as X, webhookResponseDiagnostics as Xn, dequal as Xt, CacheResource as Y, resolutionOutputPorts as Yn, updateTriggerSchedule as Yt, resourceData as Z, sourceOutputLabel as Zn, WorkflowExportMenuItem as Zt, updateOutputPorts as _, ComboboxInput as _n, selectOperation as _r, providerIcon as _t, nameCreatedNodes as a, ValueControl as an, encodeWorkflowFile as ar, getAppCatalogCache as at, updateTaskAdditionalInputs as b, useComboboxInputValueContext as bn, sameWorkflowInterface as br, hasRunFilter as bt, setInputVariable as c, ComboboxItemIndicator as cn, workflowNameFromFile as cr, createPersistentCache as ct, updateCondition as d, ComboboxPositioner as dn, inputValue as dr, designerGraph as dt, FlowSettingsDialog as en, sampleErrorOutputs as er, provider as et, updateHttpParameters as f, ComboboxPortal as fn, listOperations as fr, nodeIcon as ft, updateNodeSettings as g, ComboboxInputGroup as gn, securityOptions as gr, actionSummary as gt, updateNodeName as h, ComboboxTrigger as hn, openApiTask as hr, triggerNodeIcon as ht, deleteSelection as i, selectionMenuItemClass as in, connectorActionMetadata as ir, getActionsCache as it, valueForEditor as j, EmptyMedia as jn, canvasPresentationChange as jt, editorGroups as k, EmptyDescription as kn, controlErrorCode as kr, actionWithConnections as kt, setTriggerConnection as l, ComboboxItem as ln, triggerConfigValue as lr, createSessionCache as lt, updateNodeIcon as m, GroupCollectionProvider as mn, openApiFieldIssues as mr, semanticNodeIcon as mt, agentTool as n, TagPicker as nn, isJsonObject as nr, validateAction as nt, selectWebhookResponse as o, ValueEditorFeedback as on, parseWorkflowFile as or, getConnectionsCache as ot, updateNodeDescription as p, ComboboxList as pn, object$1 as pr, nodeTitle as pt, mapSource as q, executionReachableNodes as qn, setServiceConnections as qt, applyFlowChanges as r, selectionMenuContentClass as rn, connection as rr, decodeAppCatalogResponse as rt, setInputValue as s, valueEditor_module_default as sn, workflowFileName as sr, getProvidersCache as st, addNode as t, FlowTagChips as tn, triggerOutputDefinitions as tr, proxyResponse as tt, setTriggerEventSource as u, ComboboxPopup as un, triggerConfigValues as ur, loadJson as ut, updateResolution as v, ComboboxRoot as vn, serverAddress as vr, RunStore as vt, updateWebhook as w, InputGroup as wn, workflowCapability as wr, deriveInspectorDiagnostics as wt, updateTaskPorts as x, useComboboxRootContext as xn, workflowAgentTool as xr, revisionView as xt, updateTask as y, selectors as yn, servers as yr, canCancelRun as yt, datePickerChange as z, EventSourceSetup as zn, setNodeContentHidden as zt };
25503
+ export { resourceValue as $, sourcePort as $n, IdTooltip as $t, schemaForEditor as A, EmptyDescription as An, controlErrorCode as Ar, actionWithConnections as At, datePickerValue as B, EventSourceSetup as Bn, setNodeContentHidden as Bt, updateValue as C, useFlowQuery as Cn, workflowCandidate as Cr, flowResourceReferences as Ct, defaultValueEditorSchema as D, InputGroupInput as Dn, invalidResponse as Dr, diagnosticMessage as Dt, supportsFeishuChatFilter as E, InputGroupAddon as En, workflowSelectionTask as Er, diagnosticItems as Et, calendarChange as F, EventSourcesPage as Fn, removeComments as Ft, indexAddNodeOptions as G, allConnectorConnectionsQuery as Gn, setCodeActions as Gt, isDateFormat as H, WorkbenchClient as Hn, setVerticalNodeWidth as Ht, calendarDate as I, SourceForm as In, restoreCanvasPresentation as It, scopedValue as J, executionReachableNodes as Jn, setServiceConnections as Jt, combineSources as K, decodeResultList as Kn, setConnectorConnection as Kt, dateFromTimeZone as L, SourceSelect as Ln, setCanvasLayout as Lt, getDefaultValue as M, EmptyMedia as Mn, canvasPresentationChange as Mt, isUnconstrainedSchema as N, EmptyTitle as Nn, commentIds as Nt, editorComponent as O, Empty as On, record$2 as Or, diagnosticNodeId as Ot, typeOfSchema as P, Badge as Pn, flowPresentation as Pt, resourceData as Q, sourceOutputLabel as Qn, WorkflowExportMenuItem as Qt, dateInTimeZone as R, createI18n as Rn, setComment as Rt, updateTriggerConfig as S, useComboboxRootContext as Sn, workflowAgentTool as Sr, revisionView as St, feishuResourceKind as T, InputGroup as Tn, workflowCapability as Tr, deriveInspectorDiagnostics as Tt, addNodeIntent as U, normalizeFlowQuery as Un, repairNodeNames as Ut, dateTimeWall as V, errorNotice as Vn, setNodePositions as Vt, deriveAddNodeOptions as W, randomId as Wn, resetInputValues as Wt, CacheResource as X, resolutionOutputPorts as Xn, updateTriggerSchedule as Xt, connectorActionPresentation as Y, inputSourceCandidates as Yn, updateStartInputDefs as Yt, observeResource as Z, webhookResponseDiagnostics as Zn, dequal as Zt, updateOutputPorts as _, ComboboxInputGroup as _n, securityOptions as _r, actionSummary as _t, nameCreatedNodes as a, selectionMenuItemClass as an, connectorActionMetadata as ar, getActionsCache as at, updateTaskAdditionalInputs as b, selectors as bn, servers as br, canCancelRun as bt, setInputVariable as c, valueEditor_module_default as cn, workflowFileName as cr, getProvidersCache as ct, updateCondition as d, ComboboxPopup as dn, triggerConfigValues as dr, loadJson as dt, FlowSettingsButton as en, normalizeTriggerOutputs as er, action as et, updateHttpParameters as f, ComboboxPositioner as fn, inputValue as fr, designerGraph as ft, updateNodeSettings as g, ComboboxTrigger as gn, openApiTask as gr, triggerNodeIcon as gt, updateNodeName as h, GroupCollectionProvider as hn, openApiFieldIssues as hr, semanticNodeIcon as ht, deleteSelection as i, selectionMenuContentClass as in, connection as ir, decodeAppCatalogResponse as it, valueForEditor as j, EmptyHeader as jn, eventSourceKind as jr, connectionCatalog as jt, editorGroups as k, EmptyContent as kn, ApiError as kr, schemaMismatchMessage as kt, setTriggerConnection as l, ComboboxItemIndicator as ln, workflowNameFromFile as lr, createPersistentCache as lt, updateNodeIcon as m, ComboboxList as mn, object$1 as mr, nodeTitle as mt, agentTool as n, FlowTagChips as nn, triggerOutputDefinitions as nr, proxyResponse as nt, selectWebhookResponse as o, ValueControl as on, encodeWorkflowFile as or, getAppCatalogCache as ot, updateNodeDescription as p, ComboboxPortal as pn, listOperations as pr, nodeIcon as pt, mapSource as q, decodeTriggerCatalog as qn, setInputSources as qt, applyFlowChanges as r, TagPicker as rn, isJsonObject as rr, validateAction as rt, setInputValue as s, ValueEditorFeedback as sn, parseWorkflowFile as sr, getConnectionsCache as st, addNode as t, FlowSettingsDialog as tn, sampleErrorOutputs as tr, provider as tt, setTriggerEventSource as u, ComboboxItem as un, triggerConfigValue as ur, createSessionCache as ut, updateResolution as v, ComboboxInput as vn, selectOperation as vr, providerIcon as vt, updateWebhook as w, followWorkbenchLink as wn, workflowCandidateGroup as wr, Latest as wt, updateTaskPorts as x, useComboboxInputValueContext as xn, sameWorkflowInterface as xr, hasRunFilter as xt, updateTask as y, ComboboxRoot as yn, serverAddress as yr, RunStore as yt, datePickerChange as z, FeishuEventPicker as zn, setFlowViewport as zt };
@@ -5,7 +5,7 @@ import { c as useLang, l as useTranslate, o as I18nProvider, r as isPlainObject,
5
5
  import { A as string, Bn as transitionStatusMapping, Cr as cn, Dr as EMPTY_ARRAY, En as contains, Er as useRenderElement, Fr as formatErrorMessage, I as useCompositeListItem, In as useTransitionStatus, Ir as mergeProps, Ln as useOpenChangeComplete, Lr as useIsoLayoutEffect, Mn as ownerDocument, Mr as useButton, Nn as useLabelableId, Or as EMPTY_OBJECT, Qt as useStore, Sr as buttonVariants, Tn as activeElement, Tr as clsx, Un as useValueChanged, Wn as createChangeEventDetails, _r as fieldValidityMapping, a as createTooltipHandle, br as useControlled, c as TooltipPositioner, ct as CompositeList, d as TooltipRoot, dr as useFormContext, fr as useRegisterFieldControl, i as TooltipTrigger, jr as useMergedRefs, l as TooltipPortal, lt as inertValue, mr as useBaseUiId, mt as triggerOpenStateMapping, n as TooltipContent, nn as require_builtin_esm_external_require_react, o as TooltipArrow, p as timeZoneOffsetMinutes, pr as useFieldRootContext, qn as clearPress, r as TooltipProvider, rr as none, s as TooltipPopup, t as Tooltip, u as TooltipTrigger$1, ur as useLabelableContext, vr as visuallyHidden, wr as cva, xr as Button$1, yr as visuallyHiddenInput, zn as TransitionStatusDataAttributes, zr as useStableCallback } from "./tooltip-BDcVTNpu.js";
6
6
  import { $ as waitAutoContinueSchema, A as comparisonIssue, At as variableInputCompatible, Bt as SelectChevron, Ct as limitDecisionQuestions, D as nodeSystemOutputPorts, Dt as matchesSchema, E as nodeErrorSchema, F as operatorsForType, Gt as SelectTrigger, Ht as SelectGroup, It as skipDuplicatesConfigSchema, J as webhookResponseAllowsBody, K as webhookHeaderValuePort, Kt as SelectValue, L as unaryOperator, O as supportsNodeErrorHandling, Ot as portsAssignable, P as operandHandle, Q as workflowOutputsPort, R as valueType, Rt as dequal, St as defaultDecisionQuestion, T as workflowToolNameIssue, Tt as webhookSupportsBody, U as decodeRevisionContent, Ut as SelectItem, Vt as SelectContent, Wt as SelectSeparator, X as webhookResponseTimeout, Y as webhookResponseInputs, Z as webhookStatusCodePort, _t as isHttpHost, a as DialogFooter, an as ChevronDown, at as httpHeaderSchema, b as nodeNameIssue, bt as decisionQuestionIssues, c as DialogTrigger, d as Field, et as defaultNodeRetry, f as FieldDescription, h as FieldLabel, i as DialogDescription, in as Input, kt as schemaObject, l as Icon, lt as httpRequestIssues, m as FieldGroup, nt as retryConfigurationSchema, o as DialogHeader, ot as httpQuerySchema, p as FieldError, pt as httpHeaderNameIssue, q as webhookHeadersPort, r as DialogContent, rn as Label, rt as supportsNodeRetry, s as DialogTitle, t as Dialog, tt as nodeRetryLimits, u as Spinner, ut as httpRequestTask, vt as decisionLimits, wt as webhookMethods, xt as decisionTask, zt as Select$1 } from "./dialog-CFlvkliO.js";
7
7
  import { C as toManifestHandleName, E as isSameViewport, S as toViewEdge, T as isMac, _ as timeZoneOffset, a as NodeHistoryContext, b as CanvasTooltip, c as defaultTriggerIcon, d as formatDuration, f as useDebouncedValue, g as timeZoneLongLabel, h as timeZoneLabel, i as setAddItemId, l as JSONViewer, m as selectableTimeZones, n as CompositeRoot, o as Textarea, p as IconStack, r as ACTIVE_COMPOSITE_ITEM, s as CanvasNodeIcon, t as FlowCanvas, u as collapseAllNested, v as cronDescription, w as toManifestNodeId, x as CanvasStore, y as E$1 } from "./FlowCanvas-CrsiDHK8.js";
8
- import { $t as FlowSettingsButton, A as schemaForEditor, An as EmptyHeader, Ar as eventSourceKind, At as connectionCatalog, B as datePickerValue, Bn as errorNotice, Cn as followWorkbenchLink, Cr as workflowCandidateGroup, D as defaultValueEditorSchema, Dn as Empty, Dt as diagnosticNodeId, E as supportsFeishuChatFilter, En as InputGroupInput, Et as diagnosticMessage, F as calendarChange, Fn as SourceForm, G as indexAddNodeOptions, Gn as decodeResultList, H as isDateFormat, I as calendarDate, In as SourceSelect, Jn as inputSourceCandidates, L as dateFromTimeZone, Ln as createI18n, M as getDefaultValue, Mn as EmptyTitle, N as isUnconstrainedSchema, Nn as Badge, O as editorComponent, On as EmptyContent, Or as ApiError, Ot as schemaMismatchMessage, P as typeOfSchema, Q as resourceValue, Qn as sourcePort, Qt as IdTooltip, R as dateInTimeZone, Rn as FeishuEventPicker, T as feishuResourceKind, Tn as InputGroupAddon, Tr as workflowSelectionTask, V as dateTimeWall, X as observeResource, Xn as webhookResponseDiagnostics, Xt as dequal$1, Yn as resolutionOutputPorts, Z as resourceData, Zn as sourceOutputLabel, Zt as WorkflowExportMenuItem, _n as ComboboxInput, _r as selectOperation, _t as providerIcon, an as ValueControl, at as getAppCatalogCache, bn as useComboboxInputValueContext, br as sameWorkflowInterface, bt as hasRunFilter, cn as ComboboxItemIndicator, dn as ComboboxPositioner, dr as inputValue, dt as designerGraph, et as provider, fn as ComboboxPortal, fr as listOperations, ft as nodeIcon, gn as ComboboxInputGroup, gr as securityOptions, gt as actionSummary, hn as ComboboxTrigger, hr as openApiTask, ht as triggerNodeIcon, in as selectionMenuItemClass, j as valueForEditor, jn as EmptyMedia, k as editorGroups, kn as EmptyDescription, kr as controlErrorCode, ln as ComboboxItem, lr as triggerConfigValue, mn as GroupCollectionProvider, mr as openApiFieldIssues, mt as semanticNodeIcon, n as agentTool, nr as isJsonObject, on as ValueEditorFeedback, pn as ComboboxList, pr as object$1, pt as nodeTitle, q as mapSource, qn as executionReachableNodes, rn as selectionMenuContentClass, rt as decodeAppCatalogResponse, sn as valueEditor_module_default, tr as triggerOutputDefinitions, un as ComboboxPopup, ur as triggerConfigValues, ut as loadJson, vn as ComboboxRoot, vr as serverAddress, wn as InputGroup, wr as workflowCapability, xn as useComboboxRootContext, xr as workflowAgentTool, xt as revisionView, yn as selectors, yr as servers, yt as canCancelRun, z as datePickerChange, zn as EventSourceSetup } from "./flowChanges-pFjPHU5k.js";
8
+ import { $ as resourceValue, $n as sourcePort, $t as IdTooltip, A as schemaForEditor, An as EmptyDescription, Ar as controlErrorCode, B as datePickerValue, Bn as EventSourceSetup, D as defaultValueEditorSchema, Dn as InputGroupInput, Dt as diagnosticMessage, E as supportsFeishuChatFilter, En as InputGroupAddon, Er as workflowSelectionTask, F as calendarChange, G as indexAddNodeOptions, H as isDateFormat, I as calendarDate, In as SourceForm, Jn as executionReachableNodes, Kn as decodeResultList, L as dateFromTimeZone, Ln as SourceSelect, M as getDefaultValue, Mn as EmptyMedia, N as isUnconstrainedSchema, Nn as EmptyTitle, O as editorComponent, On as Empty, Ot as diagnosticNodeId, P as typeOfSchema, Pn as Badge, Q as resourceData, Qn as sourceOutputLabel, Qt as WorkflowExportMenuItem, R as dateInTimeZone, Rn as createI18n, Sn as useComboboxRootContext, Sr as workflowAgentTool, St as revisionView, T as feishuResourceKind, Tn as InputGroup, Tr as workflowCapability, V as dateTimeWall, Vn as errorNotice, Xn as resolutionOutputPorts, Y as connectorActionPresentation, Yn as inputSourceCandidates, Z as observeResource, Zn as webhookResponseDiagnostics, Zt as dequal$1, _n as ComboboxInputGroup, _r as securityOptions, _t as actionSummary, an as selectionMenuItemClass, bn as selectors, br as servers, bt as canCancelRun, cn as valueEditor_module_default, dn as ComboboxPopup, dr as triggerConfigValues, dt as loadJson, en as FlowSettingsButton, fn as ComboboxPositioner, fr as inputValue, ft as designerGraph, gn as ComboboxTrigger, gr as openApiTask, gt as triggerNodeIcon, hn as GroupCollectionProvider, hr as openApiFieldIssues, ht as semanticNodeIcon, in as selectionMenuContentClass, it as decodeAppCatalogResponse, j as valueForEditor, jn as EmptyHeader, jr as eventSourceKind, jt as connectionCatalog, k as editorGroups, kn as EmptyContent, kr as ApiError, kt as schemaMismatchMessage, ln as ComboboxItemIndicator, mn as ComboboxList, mr as object$1, mt as nodeTitle, n as agentTool, nr as triggerOutputDefinitions, on as ValueControl, ot as getAppCatalogCache, pn as ComboboxPortal, pr as listOperations, pt as nodeIcon, q as mapSource, rr as isJsonObject, sn as ValueEditorFeedback, tt as provider, un as ComboboxItem, ur as triggerConfigValue, vn as ComboboxInput, vr as selectOperation, vt as providerIcon, wn as followWorkbenchLink, wr as workflowCandidateGroup, xn as useComboboxInputValueContext, xr as sameWorkflowInterface, xt as hasRunFilter, yn as ComboboxRoot, yr as serverAddress, z as datePickerChange, zn as FeishuEventPicker } from "./flowChanges-CFj5pL4Y.js";
9
9
  import { r as resolveUiLanguage } from "./languages-gYzoQqCi.js";
10
10
  import { a as renameObjectField, i as objectValue, n as isJsonValue, o as setObjectField, r as jsonDataTypes, s as valueType$1, t as initialValue } from "./value-BbFQZZ_V.js";
11
11
  import { n as compile, r as validate } from "./flowRunInputEditorStore-ys1-w9GW.js";
@@ -28251,121 +28251,6 @@ function HttpRequestSection({ task, disabled, onSave, parameters, input }) {
28251
28251
  ] });
28252
28252
  }
28253
28253
  //#endregion
28254
- //#region src/workbench/browser/runtime/editor/leinaBotSelect.tsx
28255
- function LeinaBotSelect({ source, flowId, value, disabled, onChange }) {
28256
- const t = useTranslate();
28257
- const [attempt, setAttempt] = useState(0);
28258
- const [state, setState] = useState();
28259
- useEffect(() => {
28260
- const controller = new AbortController();
28261
- setState((previous) => ({
28262
- flowId,
28263
- source,
28264
- loading: true,
28265
- bots: previous?.flowId == flowId && previous.source == source ? previous.bots : void 0
28266
- }));
28267
- source.listLeinaBots(flowId, controller.signal).then((bots) => {
28268
- if (!controller.signal.aborted) setState({
28269
- flowId,
28270
- source,
28271
- bots,
28272
- loading: false
28273
- });
28274
- }, (error) => {
28275
- if (!controller.signal.aborted) setState((previous) => ({
28276
- flowId,
28277
- source,
28278
- bots: previous?.flowId == flowId && previous.source == source ? previous.bots : void 0,
28279
- loading: false,
28280
- error: error instanceof Error ? error.message : t("contextPanel.loadFailed")
28281
- }));
28282
- });
28283
- return () => controller.abort();
28284
- }, [
28285
- source,
28286
- flowId,
28287
- attempt,
28288
- t
28289
- ]);
28290
- const current = state?.flowId == flowId && state.source == source ? state : void 0;
28291
- const bots = current?.bots;
28292
- const selected = typeof value == "string" && value.trim().length > 0 ? value : void 0;
28293
- const missing = selected != null && bots != null && !bots.some((bot) => bot.leinaId == selected);
28294
- const error = selected == null ? t("leina.select") : missing ? t("leina.unavailable", { id: selected }) : void 0;
28295
- const selectedLabel = bots?.find((bot) => bot.leinaId == selected)?.name ?? (missing ? t("leina.unavailable", { id: selected }) : current?.error != null ? t("leina.loadFailed") : t("leina.loading"));
28296
- const items = [...(bots ?? []).map((bot) => ({
28297
- value: bot.leinaId,
28298
- label: bot.name
28299
- })), ...selected != null && !bots?.some((bot) => bot.leinaId == selected) ? [{
28300
- value: selected,
28301
- label: selectedLabel
28302
- }] : []];
28303
- return /* @__PURE__ */ jsx(ValueEditorFeedback, {
28304
- error,
28305
- children: (errorId) => /* @__PURE__ */ jsxs(Select$1, {
28306
- items,
28307
- value: selected ?? null,
28308
- disabled,
28309
- onOpenChange: (open) => {
28310
- if (open) setAttempt((previous) => previous + 1);
28311
- },
28312
- onValueChange: (next) => {
28313
- if (typeof next == "string" && bots?.some((bot) => bot.leinaId == next)) onChange(next);
28314
- },
28315
- children: [/* @__PURE__ */ jsx(SelectTrigger, {
28316
- size: "field",
28317
- className: "w-full",
28318
- "data-field-control": true,
28319
- "aria-label": t("leina.robot"),
28320
- "aria-invalid": error != null || void 0,
28321
- "aria-describedby": errorId,
28322
- children: /* @__PURE__ */ jsx(SelectValue, {
28323
- placeholder: t("leina.select"),
28324
- children: selected == null ? void 0 : selectedLabel
28325
- })
28326
- }), /* @__PURE__ */ jsxs(SelectContent, {
28327
- align: "start",
28328
- alignItemWithTrigger: false,
28329
- className: selectionMenuContentClass,
28330
- children: [
28331
- (current?.loading ?? true) && /* @__PURE__ */ jsx("span", {
28332
- role: "status",
28333
- className: "block px-1.5 py-1 text-xs leading-5 text-muted-foreground",
28334
- children: t("leina.loading")
28335
- }),
28336
- bots?.map((bot) => /* @__PURE__ */ jsx(SelectItem, {
28337
- value: bot.leinaId,
28338
- className: selectionMenuItemClass,
28339
- children: /* @__PURE__ */ jsx("span", {
28340
- className: "truncate",
28341
- children: bot.name
28342
- })
28343
- }, bot.leinaId)),
28344
- missing && selected != null && /* @__PURE__ */ jsx(SelectItem, {
28345
- value: selected,
28346
- disabled: true,
28347
- className: `mt-1 first-of-type:mt-0 min-h-7 rounded-[var(--ui-control-radius,var(--ui-radius))] py-1 text-xs leading-5 font-normal text-destructive`,
28348
- children: t("leina.unavailable", { id: selected })
28349
- }),
28350
- current?.error != null && /* @__PURE__ */ jsxs("span", {
28351
- role: "alert",
28352
- className: "block px-1.5 py-1 text-xs leading-5 whitespace-normal break-words text-destructive",
28353
- children: [
28354
- t("leina.loadFailed"),
28355
- " ",
28356
- current.error
28357
- ]
28358
- }),
28359
- bots?.length == 0 && !current?.loading && /* @__PURE__ */ jsx("span", {
28360
- className: "block px-1.5 py-1 text-xs leading-5 whitespace-normal text-muted-foreground",
28361
- children: t("leina.empty")
28362
- })
28363
- ]
28364
- })]
28365
- })
28366
- });
28367
- }
28368
- //#endregion
28369
28254
  //#region src/workbench/browser/runtime/editor/useTriggerConfigOptions.ts
28370
28255
  function useTriggerConfigOptions(store, nodeId, field, scope, enabled) {
28371
28256
  const [attempt, setAttempt] = useState(0);
@@ -31061,6 +30946,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
31061
30946
  const unconfiguredOpenApi = task != null && "executor" in task && task.executor.kind == "openapi" && !task.executor.path;
31062
30947
  const isLlm = task != null && "executor" in task && task.executor.kind == "llm";
31063
30948
  const connector = task != null && "executor" in task && task.executor.kind == "connector" ? task.executor : void 0;
30949
+ const connectorPresentation = connector == null ? void 0 : connectorActionPresentation(connector.action, t);
31064
30950
  const nodeId = selection?.kind == "task" ? selection.id : void 0;
31065
30951
  const workflowSettings = task != null && "executor" in task && task.executor.kind == "workflow" && selection != null ? {
31066
30952
  task,
@@ -31475,7 +31361,8 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
31475
31361
  return {
31476
31362
  definition,
31477
31363
  sourceOnly: isHttpRequest && definition.handle.startsWith("auth."),
31478
- editor: !readOnly && connectors != null && connector?.action == "leina.send_notification" && definition.handle == "leinaId" && mapping?.kind != "sources" ? /* @__PURE__ */ jsx(LeinaBotSelect, {
31364
+ editor: !readOnly && connectors != null && mapping?.kind != "sources" ? connectorPresentation?.renderInput({
31365
+ handle: definition.handle,
31479
31366
  source: connectors,
31480
31367
  flowId: revision.revision.flowId,
31481
31368
  value: inputValue(mapping, definition.value),
@@ -31483,7 +31370,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
31483
31370
  onChange: (value) => {
31484
31371
  store?.nodes.setInputValue(selection.id, definition.handle, value);
31485
31372
  }
31486
- }, revision.revision.flowId) : void 0,
31373
+ }) : void 0,
31487
31374
  value: inputValue(mapping, definition.value),
31488
31375
  onReset: definition.value !== void 0 && mapping != null ? () => void store?.nodes.resetInputs(selection.id, [definition.handle]) : void 0,
31489
31376
  connected: mapping?.kind === "sources" && binding?.kind !== "variable",
@@ -31496,10 +31383,7 @@ function NodeInspector({ onAddWorkflowOutputs, onAddResponseNode, webhookDeploym
31496
31383
  title: t(selection.kind === "outputs" ? "inspector.ports.outputsTitle" : "inspector.ports.inputsTitle"),
31497
31384
  titleIcon: selection.kind === "outputs" ? "output" : "input",
31498
31385
  entries,
31499
- fieldLabels: connector?.action == "leina.send_notification" ? {
31500
- leinaId: t("leina.robot"),
31501
- message: t("leina.message")
31502
- } : void 0,
31386
+ fieldLabels: connectorPresentation?.fieldLabels,
31503
31387
  onReset: () => {
31504
31388
  return store?.nodes.resetInputs(selection.id, entries.flatMap((entry) => "group" in entry ? [] : [entry.definition.handle]));
31505
31389
  },