mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
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:
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -28,6 +28,7 @@ export type App = {
|
||||
installed: boolean
|
||||
editable: boolean
|
||||
is_agent: boolean
|
||||
can_trial: boolean
|
||||
}
|
||||
|
||||
export type InstalledApp = {
|
||||
|
||||
@ -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
21
web/models/try-app.ts
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user