mirror of
https://github.com/langgenius/dify.git
synced 2026-03-13 19:32:04 +00:00
Compare commits
5 Commits
deploy/mem
...
1.11.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acfd34e876 | ||
|
|
036a7cf839 | ||
|
|
86beacc64f | ||
|
|
2c6bd90d6f | ||
|
|
f5aaa8f97e |
2
.github/workflows/style.yml
vendored
2
.github/workflows/style.yml
vendored
@@ -90,7 +90,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 24
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
cache-dependency-path: ./web/pnpm-lock.yaml
|
cache-dependency-path: ./web/pnpm-lock.yaml
|
||||||
|
|
||||||
|
|||||||
8
.github/workflows/tool-test-sdks.yaml
vendored
8
.github/workflows/tool-test-sdks.yaml
vendored
@@ -16,10 +16,6 @@ jobs:
|
|||||||
name: unit test for Node.js SDK
|
name: unit test for Node.js SDK
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [16, 18, 20, 22]
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: sdks/nodejs-client
|
working-directory: sdks/nodejs-client
|
||||||
@@ -29,10 +25,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: 24
|
||||||
cache: ''
|
cache: ''
|
||||||
cache-dependency-path: 'pnpm-lock.yaml'
|
cache-dependency-path: 'pnpm-lock.yaml'
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/translate-i18n-claude.yml
vendored
2
.github/workflows/translate-i18n-claude.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
|||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 'lts/*'
|
node-version: 24
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
cache-dependency-path: ./web/pnpm-lock.yaml
|
cache-dependency-path: ./web/pnpm-lock.yaml
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/web-tests.yml
vendored
2
.github/workflows/web-tests.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 24
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
cache-dependency-path: ./web/pnpm-lock.yaml
|
cache-dependency-path: ./web/pnpm-lock.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import TypeAlias
|
from typing import TypeAlias
|
||||||
|
from uuid import uuid4
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
||||||
|
|
||||||
@@ -20,8 +21,8 @@ class SimpleFeedback(ResponseModel):
|
|||||||
|
|
||||||
|
|
||||||
class RetrieverResource(ResponseModel):
|
class RetrieverResource(ResponseModel):
|
||||||
id: str
|
id: str = Field(default_factory=lambda: str(uuid4()))
|
||||||
message_id: str
|
message_id: str = Field(default_factory=lambda: str(uuid4()))
|
||||||
position: int
|
position: int
|
||||||
dataset_id: str | None = None
|
dataset_id: str | None = None
|
||||||
dataset_name: str | None = None
|
dataset_name: str | None = None
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "dify-api"
|
name = "dify-api"
|
||||||
version = "1.11.3"
|
version = "1.11.4"
|
||||||
requires-python = ">=3.11,<3.13"
|
requires-python = ">=3.11,<3.13"
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
2
api/uv.lock
generated
2
api/uv.lock
generated
@@ -1368,7 +1368,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dify-api"
|
name = "dify-api"
|
||||||
version = "1.11.3"
|
version = "1.11.4"
|
||||||
source = { virtual = "." }
|
source = { virtual = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "aliyun-log-python-sdk" },
|
{ name = "aliyun-log-python-sdk" },
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ services:
|
|||||||
|
|
||||||
# API service
|
# API service
|
||||||
api:
|
api:
|
||||||
image: langgenius/dify-api:1.11.3
|
image: langgenius/dify-api:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -63,7 +63,7 @@ services:
|
|||||||
# worker service
|
# worker service
|
||||||
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
||||||
worker:
|
worker:
|
||||||
image: langgenius/dify-api:1.11.3
|
image: langgenius/dify-api:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -102,7 +102,7 @@ services:
|
|||||||
# worker_beat service
|
# worker_beat service
|
||||||
# Celery beat for scheduling periodic tasks.
|
# Celery beat for scheduling periodic tasks.
|
||||||
worker_beat:
|
worker_beat:
|
||||||
image: langgenius/dify-api:1.11.3
|
image: langgenius/dify-api:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -132,7 +132,7 @@ services:
|
|||||||
|
|
||||||
# Frontend web application.
|
# Frontend web application.
|
||||||
web:
|
web:
|
||||||
image: langgenius/dify-web:1.11.3
|
image: langgenius/dify-web:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ services:
|
|||||||
|
|
||||||
# API service
|
# API service
|
||||||
api:
|
api:
|
||||||
image: langgenius/dify-api:1.11.3
|
image: langgenius/dify-api:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -746,7 +746,7 @@ services:
|
|||||||
# worker service
|
# worker service
|
||||||
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
# The Celery worker for processing all queues (dataset, workflow, mail, etc.)
|
||||||
worker:
|
worker:
|
||||||
image: langgenius/dify-api:1.11.3
|
image: langgenius/dify-api:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -785,7 +785,7 @@ services:
|
|||||||
# worker_beat service
|
# worker_beat service
|
||||||
# Celery beat for scheduling periodic tasks.
|
# Celery beat for scheduling periodic tasks.
|
||||||
worker_beat:
|
worker_beat:
|
||||||
image: langgenius/dify-api:1.11.3
|
image: langgenius/dify-api:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
# Use the shared environment variables.
|
# Use the shared environment variables.
|
||||||
@@ -815,7 +815,7 @@ services:
|
|||||||
|
|
||||||
# Frontend web application.
|
# Frontend web application.
|
||||||
web:
|
web:
|
||||||
image: langgenius/dify-web:1.11.3
|
image: langgenius/dify-web:1.11.4
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.21.1
|
24
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# base image
|
# base image
|
||||||
FROM node:22.21.1-alpine3.23 AS base
|
FROM node:24-alpine AS base
|
||||||
LABEL maintainer="takatost@gmail.com"
|
LABEL maintainer="takatost@gmail.com"
|
||||||
|
|
||||||
# if you located in China, you can use aliyun mirror to speed up
|
# if you located in China, you can use aliyun mirror to speed up
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
|
|||||||
|
|
||||||
Before starting the web frontend service, please make sure the following environment is ready.
|
Before starting the web frontend service, please make sure the following environment is ready.
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org) >= v22.11.x
|
- [Node.js](https://nodejs.org)
|
||||||
- [pnpm](https://pnpm.io) v10.x
|
- [pnpm](https://pnpm.io)
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
> It is recommended to install and enable Corepack to manage package manager versions automatically:
|
> It is recommended to install and enable Corepack to manage package manager versions automatically:
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ export default function CheckCode() {
|
|||||||
setIsLoading(true)
|
setIsLoading(true)
|
||||||
const ret = await webAppEmailLoginWithCode({ email, code: encryptVerificationCode(code), token })
|
const ret = await webAppEmailLoginWithCode({ email, code: encryptVerificationCode(code), token })
|
||||||
if (ret.result === 'success') {
|
if (ret.result === 'success') {
|
||||||
setWebAppAccessToken(ret.data.access_token)
|
if (ret?.data?.access_token) {
|
||||||
|
setWebAppAccessToken(ret.data.access_token)
|
||||||
|
}
|
||||||
const { access_token } = await fetchAccessToken({
|
const { access_token } = await fetchAccessToken({
|
||||||
appCode: appCode!,
|
appCode: appCode!,
|
||||||
userId: embeddedUserId || undefined,
|
userId: embeddedUserId || undefined,
|
||||||
|
|||||||
@@ -82,7 +82,9 @@ export default function MailAndPasswordAuth({ isEmailSetup }: MailAndPasswordAut
|
|||||||
body: loginData,
|
body: loginData,
|
||||||
})
|
})
|
||||||
if (res.result === 'success') {
|
if (res.result === 'success') {
|
||||||
setWebAppAccessToken(res.data.access_token)
|
if (res?.data?.access_token) {
|
||||||
|
setWebAppAccessToken(res.data.access_token)
|
||||||
|
}
|
||||||
|
|
||||||
const { access_token } = await fetchAccessToken({
|
const { access_token } = await fetchAccessToken({
|
||||||
appCode: appCode!,
|
appCode: appCode!,
|
||||||
|
|||||||
@@ -362,6 +362,18 @@ describe('PreviewDocumentPicker', () => {
|
|||||||
expect(screen.getByText('--')).toBeInTheDocument()
|
expect(screen.getByText('--')).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should render when value prop is omitted (optional)', () => {
|
||||||
|
const files = createMockDocumentList(2)
|
||||||
|
const onChange = vi.fn()
|
||||||
|
// Do not pass `value` at all to verify optional behavior
|
||||||
|
render(<PreviewDocumentPicker files={files} onChange={onChange} />)
|
||||||
|
|
||||||
|
// Renders placeholder for missing name
|
||||||
|
expect(screen.getByText('--')).toBeInTheDocument()
|
||||||
|
// Portal wrapper renders
|
||||||
|
expect(screen.getByTestId('portal-elem')).toBeInTheDocument()
|
||||||
|
})
|
||||||
|
|
||||||
it('should handle empty files array', () => {
|
it('should handle empty files array', () => {
|
||||||
renderComponent({ files: [] })
|
renderComponent({ files: [] })
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import DocumentList from './document-list'
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
className?: string
|
className?: string
|
||||||
value: DocumentItem
|
value?: DocumentItem
|
||||||
files: DocumentItem[]
|
files: DocumentItem[]
|
||||||
onChange: (value: DocumentItem) => void
|
onChange: (value: DocumentItem) => void
|
||||||
}
|
}
|
||||||
@@ -30,7 +30,8 @@ const PreviewDocumentPicker: FC<Props> = ({
|
|||||||
onChange,
|
onChange,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const { name, extension } = value
|
const name = value?.name || ''
|
||||||
|
const extension = value?.extension
|
||||||
|
|
||||||
const [open, {
|
const [open, {
|
||||||
set: setOpen,
|
set: setOpen,
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ export default function MailAndPasswordAuth({ isInvite, isEmailSetup, allowRegis
|
|||||||
body: loginData,
|
body: loginData,
|
||||||
})
|
})
|
||||||
if (res.result === 'success') {
|
if (res.result === 'success') {
|
||||||
// Track login success event
|
if (res?.data?.access_token) {
|
||||||
setWebAppAccessToken(res.data.access_token)
|
// Track login success event
|
||||||
|
setWebAppAccessToken(res.data.access_token)
|
||||||
|
}
|
||||||
trackEvent('user_login_success', {
|
trackEvent('user_login_success', {
|
||||||
method: 'email_password',
|
method: 'email_password',
|
||||||
is_invite: isInvite,
|
is_invite: isInvite,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dify-web",
|
"name": "dify-web",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.11.3",
|
"version": "1.11.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a",
|
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a",
|
||||||
"imports": {
|
"imports": {
|
||||||
@@ -10,9 +10,6 @@
|
|||||||
"default": "./i18n-config/lib.client.ts"
|
"default": "./i18n-config/lib.client.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"engines": {
|
|
||||||
"node": ">=22.12.0"
|
|
||||||
},
|
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 Chrome version",
|
"last 1 Chrome version",
|
||||||
"last 1 Firefox version",
|
"last 1 Firefox version",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import { del, get, patch, post, put } from './base'
|
|||||||
|
|
||||||
type LoginSuccess = {
|
type LoginSuccess = {
|
||||||
result: 'success'
|
result: 'success'
|
||||||
data: { access_token: string }
|
data?: { access_token?: string }
|
||||||
}
|
}
|
||||||
type LoginFail = {
|
type LoginFail = {
|
||||||
result: 'fail'
|
result: 'fail'
|
||||||
|
|||||||
Reference in New Issue
Block a user