@@ -98,7 +106,7 @@ const Blocks = ({
type={BlockEnum.Tool}
toolIcon={toolWithProvider.icon}
/>
-
diff --git a/web/app/signin/utils/post-login-redirect.ts b/web/app/signin/utils/post-login-redirect.ts
index 37ab122dfa..45e2c55941 100644
--- a/web/app/signin/utils/post-login-redirect.ts
+++ b/web/app/signin/utils/post-login-redirect.ts
@@ -1,4 +1,4 @@
-import { OAUTH_AUTHORIZE_PENDING_KEY, REDIRECT_URL_KEY } from '@/app/account/oauth/authorize/page'
+import { OAUTH_AUTHORIZE_PENDING_KEY, REDIRECT_URL_KEY } from '@/app/account/oauth/authorize/constants'
import dayjs from 'dayjs'
import type { ReadonlyURLSearchParams } from 'next/navigation'
diff --git a/web/config/index.ts b/web/config/index.ts
index 0e876b800e..158d9976fc 100644
--- a/web/config/index.ts
+++ b/web/config/index.ts
@@ -375,6 +375,11 @@ export const ENABLE_WEBSITE_WATERCRAWL = getBooleanConfig(
DatasetAttr.DATA_PUBLIC_ENABLE_WEBSITE_WATERCRAWL,
false,
)
+export const ENABLE_SINGLE_DOLLAR_LATEX = getBooleanConfig(
+ process.env.NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX,
+ DatasetAttr.DATA_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX,
+ false,
+)
export const VALUE_SELECTOR_DELIMITER = '@@@'
diff --git a/web/context/debug-configuration.ts b/web/context/debug-configuration.ts
index 3ec82ee8ef..e4299fffa8 100644
--- a/web/context/debug-configuration.ts
+++ b/web/context/debug-configuration.ts
@@ -212,6 +212,8 @@ const DebugConfigurationContext = createContext({
prompt_template: '',
prompt_variables: [],
},
+ chat_prompt_config: DEFAULT_CHAT_PROMPT_CONFIG,
+ completion_prompt_config: DEFAULT_COMPLETION_PROMPT_CONFIG,
more_like_this: null,
opening_statement: '',
suggested_questions: [],
@@ -222,6 +224,14 @@ const DebugConfigurationContext = createContext({
suggested_questions_after_answer: null,
retriever_resource: null,
annotation_reply: null,
+ external_data_tools: [],
+ system_parameters: {
+ audio_file_size_limit: 0,
+ file_size_limit: 0,
+ image_file_size_limit: 0,
+ video_file_size_limit: 0,
+ workflow_file_upload_limit: 0,
+ },
dataSets: [],
agentConfig: DEFAULT_AGENT_SETTING,
},
diff --git a/web/docker/entrypoint.sh b/web/docker/entrypoint.sh
index 5d73a6ed50..041c7a1af3 100755
--- a/web/docker/entrypoint.sh
+++ b/web/docker/entrypoint.sh
@@ -35,6 +35,7 @@ export NEXT_PUBLIC_MAX_TOOLS_NUM=${MAX_TOOLS_NUM}
export NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER=${ENABLE_WEBSITE_JINAREADER:-true}
export NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL=${ENABLE_WEBSITE_FIRECRAWL:-true}
export NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL=${ENABLE_WEBSITE_WATERCRAWL:-true}
+export NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX=${NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX:-false}
export NEXT_PUBLIC_LOOP_NODE_MAX_COUNT=${LOOP_NODE_MAX_COUNT}
export NEXT_PUBLIC_MAX_PARALLEL_LIMIT=${MAX_PARALLEL_LIMIT}
export NEXT_PUBLIC_MAX_ITERATIONS_NUM=${MAX_ITERATIONS_NUM}
diff --git a/web/i18n/de-DE/login.ts b/web/i18n/de-DE/login.ts
index a4c9165e23..4705a73087 100644
--- a/web/i18n/de-DE/login.ts
+++ b/web/i18n/de-DE/login.ts
@@ -120,6 +120,7 @@ const translation = {
noAccount: 'Haben Sie kein Konto?',
verifyMail: 'Fahren Sie mit dem Bestätigungscode fort',
},
+ pageTitleForE: 'Hey, lass uns anfangen!',
}
export default translation
diff --git a/web/i18n/en-US/login.ts b/web/i18n/en-US/login.ts
index 6015098022..dd923db217 100644
--- a/web/i18n/en-US/login.ts
+++ b/web/i18n/en-US/login.ts
@@ -1,5 +1,6 @@
const translation = {
pageTitle: 'Log in to Dify',
+ pageTitleForE: 'Hey, let\'s get started!',
welcome: '👋 Welcome! Please log in to get started.',
email: 'Email address',
emailPlaceholder: 'Your email',
diff --git a/web/i18n/es-ES/login.ts b/web/i18n/es-ES/login.ts
index ba8ad292cc..cbc223e7da 100644
--- a/web/i18n/es-ES/login.ts
+++ b/web/i18n/es-ES/login.ts
@@ -120,6 +120,7 @@ const translation = {
welcome: '👋 ¡Bienvenido! Por favor, completa los detalles para comenzar.',
verifyMail: 'Continuar con el código de verificación',
},
+ pageTitleForE: '¡Hola, vamos a empezar!',
}
export default translation
diff --git a/web/i18n/fa-IR/login.ts b/web/i18n/fa-IR/login.ts
index b57687cf5d..83382f3c9d 100644
--- a/web/i18n/fa-IR/login.ts
+++ b/web/i18n/fa-IR/login.ts
@@ -120,6 +120,7 @@ const translation = {
noAccount: 'حساب کاربری ندارید؟',
verifyMail: 'ادامه با کد تأیید',
},
+ pageTitleForE: 'هی، بیا شروع کنیم!',
}
export default translation
diff --git a/web/i18n/fr-FR/login.ts b/web/i18n/fr-FR/login.ts
index deae8e3ff4..3abb6fba2a 100644
--- a/web/i18n/fr-FR/login.ts
+++ b/web/i18n/fr-FR/login.ts
@@ -120,6 +120,7 @@ const translation = {
verifyMail: 'Continuez avec le code de vérification',
createAccount: 'Créez votre compte',
},
+ pageTitleForE: 'Hé, commençons !',
}
export default translation
diff --git a/web/i18n/hi-IN/login.ts b/web/i18n/hi-IN/login.ts
index fee51208c7..27b7df9849 100644
--- a/web/i18n/hi-IN/login.ts
+++ b/web/i18n/hi-IN/login.ts
@@ -125,6 +125,7 @@ const translation = {
welcome: '👋 स्वागत है! कृपया शुरू करने के लिए विवरण भरें।',
haveAccount: 'क्या आपका पहले से एक खाता है?',
},
+ pageTitleForE: 'अरे, चलो शुरू करें!',
}
export default translation
diff --git a/web/i18n/id-ID/login.ts b/web/i18n/id-ID/login.ts
index 41c7e04ec4..1590aa81a2 100644
--- a/web/i18n/id-ID/login.ts
+++ b/web/i18n/id-ID/login.ts
@@ -120,6 +120,7 @@ const translation = {
noAccount: 'Tidak punya akun?',
welcome: '👋 Selamat datang! Silakan isi detail untuk memulai.',
},
+ pageTitleForE: 'Hei, ayo kita mulai!',
}
export default translation
diff --git a/web/i18n/it-IT/login.ts b/web/i18n/it-IT/login.ts
index 5d6b040daf..e19baca6a3 100644
--- a/web/i18n/it-IT/login.ts
+++ b/web/i18n/it-IT/login.ts
@@ -130,6 +130,7 @@ const translation = {
signUp: 'Iscriviti',
welcome: '👋 Benvenuto! Per favore compila i dettagli per iniziare.',
},
+ pageTitleForE: 'Ehi, cominciamo!',
}
export default translation
diff --git a/web/i18n/ja-JP/login.ts b/web/i18n/ja-JP/login.ts
index d1e9a9e0e2..7069315c9d 100644
--- a/web/i18n/ja-JP/login.ts
+++ b/web/i18n/ja-JP/login.ts
@@ -1,5 +1,6 @@
const translation = {
pageTitle: 'Dify にログイン',
+ pageTitleForE: 'はじめましょう!',
welcome: '👋 ようこそ!まずはログインしてご利用ください。',
email: 'メールアドレス',
emailPlaceholder: 'メールアドレスを入力してください',
diff --git a/web/i18n/ko-KR/login.ts b/web/i18n/ko-KR/login.ts
index 8cde21472c..6d3d47a602 100644
--- a/web/i18n/ko-KR/login.ts
+++ b/web/i18n/ko-KR/login.ts
@@ -120,6 +120,7 @@ const translation = {
noAccount: '계정이 없으신가요?',
welcome: '👋 환영합니다! 시작하려면 세부 정보를 입력해 주세요.',
},
+ pageTitleForE: '이봐, 시작하자!',
}
export default translation
diff --git a/web/i18n/pl-PL/login.ts b/web/i18n/pl-PL/login.ts
index 394fe6c402..34519cd2b3 100644
--- a/web/i18n/pl-PL/login.ts
+++ b/web/i18n/pl-PL/login.ts
@@ -125,6 +125,7 @@ const translation = {
haveAccount: 'Masz już konto?',
welcome: '👋 Witaj! Proszę wypełnić szczegóły, aby rozpocząć.',
},
+ pageTitleForE: 'Hej, zaczynajmy!',
}
export default translation
diff --git a/web/i18n/pt-BR/login.ts b/web/i18n/pt-BR/login.ts
index 200e7bf30c..4fa9f36146 100644
--- a/web/i18n/pt-BR/login.ts
+++ b/web/i18n/pt-BR/login.ts
@@ -120,6 +120,7 @@ const translation = {
signUp: 'Inscreva-se',
welcome: '👋 Bem-vindo! Por favor, preencha os detalhes para começar.',
},
+ pageTitleForE: 'Ei, vamos começar!',
}
export default translation
diff --git a/web/i18n/ro-RO/login.ts b/web/i18n/ro-RO/login.ts
index 34cd4a5ffd..f676b812cb 100644
--- a/web/i18n/ro-RO/login.ts
+++ b/web/i18n/ro-RO/login.ts
@@ -120,6 +120,7 @@ const translation = {
createAccount: 'Creează-ți contul',
welcome: '👋 Buna! Te rugăm să completezi detaliile pentru a începe.',
},
+ pageTitleForE: 'Hei, hai să începem!',
}
export default translation
diff --git a/web/i18n/ru-RU/login.ts b/web/i18n/ru-RU/login.ts
index bfb2860b57..f864bdb845 100644
--- a/web/i18n/ru-RU/login.ts
+++ b/web/i18n/ru-RU/login.ts
@@ -120,6 +120,7 @@ const translation = {
verifyMail: 'Продолжите с кодом проверки',
welcome: '👋 Добро пожаловать! Пожалуйста, заполните данные, чтобы начать.',
},
+ pageTitleForE: 'Привет, давай начнем!',
}
export default translation
diff --git a/web/i18n/sl-SI/login.ts b/web/i18n/sl-SI/login.ts
index 4e5b12689d..81f280666b 100644
--- a/web/i18n/sl-SI/login.ts
+++ b/web/i18n/sl-SI/login.ts
@@ -120,6 +120,7 @@ const translation = {
noAccount: 'Nimate računa?',
welcome: '👋 Dobrodošli! Prosimo, izpolnite podatke, da začnete.',
},
+ pageTitleForE: 'Hej, začnimo!',
}
export default translation
diff --git a/web/i18n/th-TH/login.ts b/web/i18n/th-TH/login.ts
index 732af8a875..517eee95a2 100644
--- a/web/i18n/th-TH/login.ts
+++ b/web/i18n/th-TH/login.ts
@@ -120,6 +120,7 @@ const translation = {
verifyMail: 'โปรดดำเนินการต่อด้วยรหัสการตรวจสอบ',
haveAccount: 'มีบัญชีอยู่แล้วใช่ไหม?',
},
+ pageTitleForE: 'เฮ้ เรามาเริ่มกันเถอะ!',
}
export default translation
diff --git a/web/i18n/tr-TR/login.ts b/web/i18n/tr-TR/login.ts
index b8bd6d74af..d6ada5f950 100644
--- a/web/i18n/tr-TR/login.ts
+++ b/web/i18n/tr-TR/login.ts
@@ -120,6 +120,7 @@ const translation = {
haveAccount: 'Zaten bir hesabınız var mı?',
welcome: '👋 Hoş geldiniz! Başlamak için lütfen detayları doldurun.',
},
+ pageTitleForE: 'Hey, haydi başlayalım!',
}
export default translation
diff --git a/web/i18n/uk-UA/login.ts b/web/i18n/uk-UA/login.ts
index 1fa4d414f7..1a1a6d7068 100644
--- a/web/i18n/uk-UA/login.ts
+++ b/web/i18n/uk-UA/login.ts
@@ -120,6 +120,7 @@ const translation = {
noAccount: 'Не маєте облікового запису?',
welcome: '👋 Ласкаво просимо! Будь ласка, заповніть деталі, щоб почати.',
},
+ pageTitleForE: 'Гей, давай почнемо!',
}
export default translation
diff --git a/web/i18n/vi-VN/login.ts b/web/i18n/vi-VN/login.ts
index 6d877fffef..dec7eddee2 100644
--- a/web/i18n/vi-VN/login.ts
+++ b/web/i18n/vi-VN/login.ts
@@ -120,6 +120,7 @@ const translation = {
verifyMail: 'Tiếp tục với mã xác minh',
welcome: '👋 Chào mừng! Vui lòng điền vào các chi tiết để bắt đầu.',
},
+ pageTitleForE: 'Này, hãy bắt đầu nào!',
}
export default translation
diff --git a/web/i18n/zh-Hans/login.ts b/web/i18n/zh-Hans/login.ts
index 82c6b355f9..13a75eaaaa 100644
--- a/web/i18n/zh-Hans/login.ts
+++ b/web/i18n/zh-Hans/login.ts
@@ -1,5 +1,6 @@
const translation = {
pageTitle: '登录 Dify',
+ pageTitleForE: '嗨,近来可好',
welcome: '👋 欢迎!请登录以开始使用。',
email: '邮箱',
emailPlaceholder: '输入邮箱地址',
diff --git a/web/i18n/zh-Hant/login.ts b/web/i18n/zh-Hant/login.ts
index 0e7608140f..56150a0ed3 100644
--- a/web/i18n/zh-Hant/login.ts
+++ b/web/i18n/zh-Hant/login.ts
@@ -1,5 +1,6 @@
const translation = {
pageTitle: '嗨,近來可好',
+ pageTitleForE: '嗨,近來可好',
welcome: '👋 歡迎來到 Dify, 登入以繼續',
email: '郵箱',
emailPlaceholder: '輸入郵箱地址',
diff --git a/web/models/datasets.ts b/web/models/datasets.ts
index aeeb5c161a..39313d68a3 100644
--- a/web/models/datasets.ts
+++ b/web/models/datasets.ts
@@ -344,6 +344,8 @@ export type WebsiteCrawlInfo = {
description: string
source_url: string
title: string
+ provider?: string
+ job_id?: string
}
export type OnlineDocumentInfo = {
diff --git a/web/models/debug.ts b/web/models/debug.ts
index 90995e72dc..a6813011da 100644
--- a/web/models/debug.ts
+++ b/web/models/debug.ts
@@ -9,6 +9,7 @@ import type {
MetadataFilteringModeEnum,
} from '@/app/components/workflow/nodes/knowledge-retrieval/types'
import type { ModelConfig as NodeModelConfig } from '@/app/components/workflow/types'
+import type { ExternalDataTool } from '@/models/common'
export type Inputs = Record
export enum PromptMode {
@@ -136,6 +137,8 @@ export type ModelConfig = {
chat_prompt_config?: ChatPromptConfig | null
completion_prompt_config?: CompletionPromptConfig | null
configs: PromptConfig
+ chat_prompt_config?: ChatPromptConfig | null
+ completion_prompt_config?: CompletionPromptConfig | null
opening_statement: string | null
more_like_this: MoreLikeThisConfig | null
suggested_questions: string[] | null
@@ -146,6 +149,14 @@ export type ModelConfig = {
retriever_resource: RetrieverResourceConfig | null
sensitive_word_avoidance: ModerationConfig | null
annotation_reply: AnnotationReplyConfig | null
+ external_data_tools?: ExternalDataTool[] | null
+ system_parameters: {
+ audio_file_size_limit: number
+ file_size_limit: number
+ image_file_size_limit: number
+ video_file_size_limit: number
+ workflow_file_upload_limit: number
+ }
dataSets: any[]
agentConfig: AgentConfig
}
diff --git a/web/package.json b/web/package.json
index f646da4fed..006fb02912 100644
--- a/web/package.json
+++ b/web/package.json
@@ -22,7 +22,7 @@
"dev": "cross-env NODE_OPTIONS='--inspect' next dev --turbopack",
"build": "next build",
"build:docker": "next build && node scripts/optimize-standalone.js",
- "start": "cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js",
+ "start": "node ./scripts/copy-and-start.mjs",
"lint": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
"lint:fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
"lint:quiet": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
@@ -148,7 +148,7 @@
"@babel/core": "^7.28.4",
"@chromatic-com/storybook": "^4.1.1",
"@eslint-react/eslint-plugin": "^1.53.1",
- "@happy-dom/jest-environment": "^20.0.7",
+ "@happy-dom/jest-environment": "^20.0.8",
"@mdx-js/loader": "^3.1.1",
"@mdx-js/react": "^3.1.1",
"@next/bundle-analyzer": "15.5.4",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 28c5a1ad85..593cd316a3 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -368,7 +368,7 @@ importers:
specifier: ^1.53.1
version: 1.53.1(eslint@9.38.0(jiti@2.6.1))(ts-api-utils@2.1.0(typescript@5.9.3))(typescript@5.9.3)
'@happy-dom/jest-environment':
- specifier: ^20.0.7
+ specifier: ^20.0.8
version: 20.0.8(@jest/environment@29.7.0)(@jest/fake-timers@29.7.0)(@jest/types@29.6.3)(jest-mock@29.7.0)(jest-util@29.7.0)
'@mdx-js/loader':
specifier: ^3.1.1
@@ -706,6 +706,10 @@ packages:
resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==}
engines: {node: '>=6.9.0'}
+ '@babel/helper-validator-identifier@7.28.5':
+ resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==}
+ engines: {node: '>=6.9.0'}
+
'@babel/helper-validator-option@7.27.1':
resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==}
engines: {node: '>=6.9.0'}
@@ -723,6 +727,11 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
+ '@babel/parser@7.28.5':
+ resolution: {integrity: sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
+
'@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1':
resolution: {integrity: sha512-QPG3C9cCVRQLxAVwmefEmwdTanECuUBMQZ/ym5kiw3XKCGA7qkuQLcjWWHcrD/GKbn/WmJwaezfuuAOcyKlRPA==}
engines: {node: '>=6.9.0'}
@@ -1256,6 +1265,10 @@ packages:
resolution: {integrity: sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==}
engines: {node: '>=6.9.0'}
+ '@babel/types@7.28.5':
+ resolution: {integrity: sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==}
+ engines: {node: '>=6.9.0'}
+
'@bcoe/v8-coverage@0.2.3':
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
@@ -3409,8 +3422,8 @@ packages:
'@types/node@18.15.0':
resolution: {integrity: sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w==}
- '@types/node@20.19.20':
- resolution: {integrity: sha512-2Q7WS25j4pS1cS8yw3d6buNCVJukOTeQ39bAnwR6sOJbaxvyCGebzTMypDFN82CxBLnl+lSWVdCCWbRY6y9yZQ==}
+ '@types/node@20.19.23':
+ resolution: {integrity: sha512-yIdlVVVHXpmqRhtyovZAcSy0MiPcYWGkoO4CGe/+jpP0hmNuihm4XhHbADpK++MsiLHP5MVlv+bcgdF99kSiFQ==}
'@types/papaparse@5.3.16':
resolution: {integrity: sha512-T3VuKMC2H0lgsjI9buTB3uuKj3EMD2eap1MOuEQuBQ44EnDx/IkGhU6EwiTf9zG3za4SKlmwKAImdDKdNnCsXg==}
@@ -6294,6 +6307,9 @@ packages:
magic-string@0.30.19:
resolution: {integrity: sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==}
+ magic-string@0.30.21:
+ resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
+
magicast@0.3.5:
resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==}
@@ -8905,6 +8921,8 @@ snapshots:
'@babel/helper-validator-identifier@7.27.1': {}
+ '@babel/helper-validator-identifier@7.28.5': {}
+
'@babel/helper-validator-option@7.27.1': {}
'@babel/helper-wrap-function@7.27.1':
@@ -8924,6 +8942,10 @@ snapshots:
dependencies:
'@babel/types': 7.28.4
+ '@babel/parser@7.28.5':
+ dependencies:
+ '@babel/types': 7.28.5
+
'@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.27.1(@babel/core@7.28.4)':
dependencies:
'@babel/core': 7.28.4
@@ -9594,6 +9616,11 @@ snapshots:
'@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.27.1
+ '@babel/types@7.28.5':
+ dependencies:
+ '@babel/helper-string-parser': 7.27.1
+ '@babel/helper-validator-identifier': 7.28.5
+
'@bcoe/v8-coverage@0.2.3': {}
'@braintree/sanitize-url@7.1.1': {}
@@ -12011,7 +12038,7 @@ snapshots:
'@types/node@18.15.0': {}
- '@types/node@20.19.20':
+ '@types/node@20.19.23':
dependencies:
undici-types: 6.21.0
@@ -12264,7 +12291,7 @@ snapshots:
'@vue/compiler-core@3.5.17':
dependencies:
- '@babel/parser': 7.28.4
+ '@babel/parser': 7.28.5
'@vue/shared': 3.5.17
entities: 4.5.0
estree-walker: 2.0.2
@@ -12277,13 +12304,13 @@ snapshots:
'@vue/compiler-sfc@3.5.17':
dependencies:
- '@babel/parser': 7.28.4
+ '@babel/parser': 7.28.5
'@vue/compiler-core': 3.5.17
'@vue/compiler-dom': 3.5.17
'@vue/compiler-ssr': 3.5.17
'@vue/shared': 3.5.17
estree-walker: 2.0.2
- magic-string: 0.30.19
+ magic-string: 0.30.21
postcss: 8.5.6
source-map-js: 1.2.1
@@ -14467,7 +14494,7 @@ snapshots:
happy-dom@20.0.8:
dependencies:
- '@types/node': 20.19.20
+ '@types/node': 20.19.23
'@types/whatwg-mimetype': 3.0.2
whatwg-mimetype: 3.0.0
@@ -15478,6 +15505,10 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.5
+ magic-string@0.30.21:
+ dependencies:
+ '@jridgewell/sourcemap-codec': 1.5.5
+
magicast@0.3.5:
dependencies:
'@babel/parser': 7.28.4
diff --git a/web/scripts/copy-and-start.mjs b/web/scripts/copy-and-start.mjs
new file mode 100644
index 0000000000..b23ce636a4
--- /dev/null
+++ b/web/scripts/copy-and-start.mjs
@@ -0,0 +1,115 @@
+#!/usr/bin/env node
+/**
+ * This script copies static files to the target directory and starts the server.
+ * It is intended to be used as a replacement for `next start`.
+ */
+
+import { cp, mkdir, stat } from 'node:fs/promises'
+import { spawn } from 'node:child_process'
+import path from 'node:path'
+
+// Configuration for directories to copy
+const DIRS_TO_COPY = [
+ {
+ src: path.join('.next', 'static'),
+ dest: path.join('.next', 'standalone', '.next', 'static'),
+ },
+ {
+ src: 'public',
+ dest: path.join('.next', 'standalone', 'public'),
+ },
+]
+
+// Path to the server script
+const SERVER_SCRIPT_PATH = path.join('.next', 'standalone', 'server.js')
+
+// Function to check if a path exists
+const pathExists = async (path) => {
+ try {
+ console.debug(`Checking if path exists: ${path}`)
+ await stat(path)
+ console.debug(`Path exists: ${path}`)
+ return true
+ }
+ catch (err) {
+ if (err.code === 'ENOENT') {
+ console.warn(`Path does not exist: ${path}`)
+ return false
+ }
+ throw err
+ }
+}
+
+// Function to recursively copy directories
+const copyDir = async (src, dest) => {
+ console.debug(`Copying directory from ${src} to ${dest}`)
+ await cp(src, dest, { recursive: true })
+ console.info(`Successfully copied ${src} to ${dest}`)
+}
+
+// Process each directory copy operation
+const copyAllDirs = async () => {
+ console.debug('Starting directory copy operations')
+ for (const { src, dest } of DIRS_TO_COPY) {
+ try {
+ // Instead of pre-creating destination directory, we ensure parent directory exists
+ const destParent = path.dirname(dest)
+ console.debug(`Ensuring destination parent directory exists: ${destParent}`)
+ await mkdir(destParent, { recursive: true })
+ if (await pathExists(src)) {
+ await copyDir(src, dest)
+ }
+ else {
+ console.error(`Error: ${src} directory does not exist. This is a required build artifact.`)
+ process.exit(1)
+ }
+ }
+ catch (err) {
+ console.error(`Error processing ${src}:`, err.message)
+ process.exit(1)
+ }
+ }
+ console.debug('Finished directory copy operations')
+}
+
+// Run copy operations and start server
+const main = async () => {
+ console.debug('Starting copy-and-start script')
+ await copyAllDirs()
+
+ // Start server
+ const port = process.env.npm_config_port || process.env.PORT || '3000'
+ const host = process.env.npm_config_host || process.env.HOSTNAME || '0.0.0.0'
+
+ console.info(`Starting server on ${host}:${port}`)
+ console.debug(`Server script path: ${SERVER_SCRIPT_PATH}`)
+ console.debug(`Environment variables - PORT: ${port}, HOSTNAME: ${host}`)
+
+ const server = spawn(
+ process.execPath,
+ [SERVER_SCRIPT_PATH],
+ {
+ env: {
+ ...process.env,
+ PORT: port,
+ HOSTNAME: host,
+ },
+ stdio: 'inherit',
+ },
+ )
+
+ server.on('error', (err) => {
+ console.error('Failed to start server:', err)
+ process.exit(1)
+ })
+
+ server.on('exit', (code) => {
+ console.debug(`Server exited with code: ${code}`)
+ process.exit(code || 0)
+ })
+}
+
+main().catch((err) => {
+ console.error('Unexpected error:', err)
+ process.exit(1)
+})
diff --git a/web/types/app.ts b/web/types/app.ts
index 0a12e28729..591bbf5e31 100644
--- a/web/types/app.ts
+++ b/web/types/app.ts
@@ -8,6 +8,7 @@ import type {
} from '@/models/datasets'
import type { UploadFileSetting } from '@/app/components/workflow/types'
import type { AccessMode } from '@/models/access-control'
+import type { ExternalDataTool } from '@/models/common'
export enum Theme {
light = 'light',
@@ -206,12 +207,12 @@ export type ModelConfig = {
suggested_questions?: string[]
pre_prompt: string
prompt_type: PromptMode
- chat_prompt_config: ChatPromptConfig | {}
- completion_prompt_config: CompletionPromptConfig | {}
+ chat_prompt_config?: ChatPromptConfig | null
+ completion_prompt_config?: CompletionPromptConfig | null
user_input_form: UserInputFormItem[]
dataset_query_variable?: string
more_like_this: {
- enabled?: boolean
+ enabled: boolean
}
suggested_questions_after_answer: {
enabled: boolean
@@ -237,13 +238,20 @@ export type ModelConfig = {
strategy?: AgentStrategy
tools: ToolItem[]
}
+ external_data_tools?: ExternalDataTool[]
model: Model
dataset_configs: DatasetConfigs
file_upload?: {
image: VisionSettings
} & UploadFileSetting
files?: VisionFile[]
- external_data_tools: any[]
+ system_parameters: {
+ audio_file_size_limit: number
+ file_size_limit: number
+ image_file_size_limit: number
+ video_file_size_limit: number
+ workflow_file_upload_limit: number
+ }
created_at?: number
updated_at?: number
}
@@ -361,6 +369,7 @@ export type App = {
updated_at: number
updated_by?: string
}
+ deleted_tools?: Array<{ id: string; tool_name: string }>
/** access control */
access_mode: AccessMode
max_active_requests?: number | null
diff --git a/web/types/feature.ts b/web/types/feature.ts
index ce5cda6a61..e996cce68f 100644
--- a/web/types/feature.ts
+++ b/web/types/feature.ts
@@ -128,6 +128,7 @@ export enum DatasetAttr {
DATA_PUBLIC_ENABLE_WEBSITE_JINAREADER = 'data-public-enable-website-jinareader',
DATA_PUBLIC_ENABLE_WEBSITE_FIRECRAWL = 'data-public-enable-website-firecrawl',
DATA_PUBLIC_ENABLE_WEBSITE_WATERCRAWL = 'data-public-enable-website-watercrawl',
+ DATA_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX = 'data-public-enable-single-dollar-latex',
NEXT_PUBLIC_ZENDESK_WIDGET_KEY = 'next-public-zendesk-widget-key',
NEXT_PUBLIC_ZENDESK_FIELD_ID_ENVIRONMENT = 'next-public-zendesk-field-id-environment',
NEXT_PUBLIC_ZENDESK_FIELD_ID_VERSION = 'next-public-zendesk-field-id-version',