feat: frontend part of support try apps (#31287)

Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
Joel
2026-01-22 18:16:37 +08:00
committed by GitHub
parent c575c34ca6
commit b9f718005c
130 changed files with 3233 additions and 685 deletions

View File

@ -132,3 +132,17 @@ export type WebhookTriggerResponse = {
node_id: string
created_at: string
}
export type Banner = {
id: string
content: {
'category': string
'title': string
'description': string
'img-src': string
}
link: string
sort: number
status: string
created_at: string
}

View File

@ -134,6 +134,7 @@ export type ModelConfig = {
provider: string // LLM Provider: for example "OPENAI"
model_id: string
mode: ModelModeType
prompt_type?: PromptMode
configs: PromptConfig
chat_prompt_config?: ChatPromptConfig | null
completion_prompt_config?: CompletionPromptConfig | null

View File

@ -28,6 +28,7 @@ export type App = {
installed: boolean
editable: boolean
is_agent: boolean
can_trial: boolean
}
export type InstalledApp = {

View File

@ -32,10 +32,11 @@ export type AppMeta = {
tool_icons: Record<string, string>
}
export type CustomConfigValueType = string | number | boolean | null | undefined
export type AppData = {
app_id: string
can_replace_logo?: boolean
custom_config: Record<string, any> | null
custom_config: Record<string, CustomConfigValueType> | null
enable_site?: boolean
end_user_id?: string
site: SiteInfo

21
web/models/try-app.ts Normal file
View File

@ -0,0 +1,21 @@
import type { Viewport } from 'reactflow'
import type { Edge, Node } from '@/app/components/workflow/types'
import type { SiteInfo } from '@/models/share'
import type { AppModeEnum, ModelConfig } from '@/types/app'
export type TryAppInfo = {
name: string
description: string
mode: AppModeEnum
site: SiteInfo
model_config: ModelConfig
deleted_tools: { id: string, tool_name: string }[]
}
export type TryAppFlowPreview = {
graph: {
nodes: Node[]
edges: Edge[]
viewport: Viewport
}
}