refactor(trigger): update TriggerApiEntity description type to TypeWithI18N
Some checks are pending
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions

- Changed the description field type in `TriggerApiEntity` from `TriggerDescription` to `TypeWithI18N` for improved internationalization support.
- Adjusted the usage of the description field in the `convertToTriggerWithProvider` function to align with the new type definition.
This commit is contained in:
Harry 2025-10-13 22:24:12 +08:00
parent 8dfe693529
commit 90fc06a494
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ export type TriggerDescription = {
export type TriggerApiEntity = {
name: string
identity: TriggerIdentity
description: TriggerDescription
description: TypeWithI18N
parameters: TriggerParameter[]
output_schema?: Record<string, any>
}

View File

@ -37,7 +37,7 @@ const convertToTriggerWithProvider = (provider: TriggerProviderApiEntity): Trigg
name: event.name,
author: provider.author,
label: event.identity.label,
description: event.description.llm,
description: event.description,
parameters: event.parameters.map(param => ({
name: param.name,
label: param.label,