fix(trigger): check subscription removed

This commit is contained in:
yessenia
2025-10-21 20:01:05 +08:00
parent c90df5c12c
commit 9a3ca0ce3b
2 changed files with 14 additions and 7 deletions

View File

@ -1,11 +1,12 @@
import { BlockEnum, VarType } from '../../types'
import type { NodeDefault, Var } from '../../types'
import { genNodeMetaData } from '../../utils'
import type { PluginTriggerNodeType } from './types'
import { getMatchedSchemaType } from '../_base/components/variable/use-match-schema-type'
import { INVALID_SUBSCRIPTION_ID } from '@/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry'
import type { SchemaTypeDefinition } from '@/service/use-common'
import { type Field, type StructuredOutput, Type } from '../llm/types'
import type { NodeDefault, Var } from '../../types'
import { BlockEnum, VarType } from '../../types'
import { genNodeMetaData } from '../../utils'
import { getMatchedSchemaType } from '../_base/components/variable/use-match-schema-type'
import { VarKindType } from '../_base/types'
import { type Field, type StructuredOutput, Type } from '../llm/types'
import type { PluginTriggerNodeType } from './types'
const normalizeJsonSchemaType = (schema: any): string | undefined => {
if (!schema) return undefined
@ -233,7 +234,7 @@ const nodeDefault: NodeDefault<PluginTriggerNodeType> = {
} = {}) {
let errorMessage = ''
if (!payload.subscription_id)
if (!payload.subscription_id || payload.subscription_id === INVALID_SUBSCRIPTION_ID)
errorMessage = t('workflow.nodes.triggerPlugin.subscriptionRequired')
const {