Skip to content

Commit

Permalink
Merge branch 'langgenius:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuhisa-wada authored Dec 16, 2024
2 parents b40a5dc + 967eb81 commit 1e67d35
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion api/configs/packaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PackagingInfo(BaseSettings):

CURRENT_VERSION: str = Field(
description="Dify version",
default="0.13.2",
default="0.14.0",
)

COMMIT_SHA: str = Field(
Expand Down
6 changes: 3 additions & 3 deletions docker-legacy/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'
services:
# API service
api:
image: langgenius/dify-api:0.13.2
image: langgenius/dify-api:0.14.0
restart: always
environment:
# Startup mode, 'api' starts the API server.
Expand Down Expand Up @@ -227,7 +227,7 @@ services:
# worker service
# The Celery worker for processing the queue.
worker:
image: langgenius/dify-api:0.13.2
image: langgenius/dify-api:0.14.0
restart: always
environment:
CONSOLE_WEB_URL: ''
Expand Down Expand Up @@ -397,7 +397,7 @@ services:

# Frontend web application.
web:
image: langgenius/dify-web:0.13.2
image: langgenius/dify-web:0.14.0
restart: always
environment:
# The base URL of console application api server, refers to the Console base URL of WEB service if console domain is
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ x-shared-env: &shared-api-worker-env
services:
# API service
api:
image: langgenius/dify-api:0.13.2
image: langgenius/dify-api:0.14.0
restart: always
environment:
# Use the shared environment variables.
Expand All @@ -312,7 +312,7 @@ services:
# worker service
# The Celery worker for processing the queue.
worker:
image: langgenius/dify-api:0.13.2
image: langgenius/dify-api:0.14.0
restart: always
environment:
# Use the shared environment variables.
Expand All @@ -331,7 +331,7 @@ services:

# Frontend web application.
web:
image: langgenius/dify-web:0.13.2
image: langgenius/dify-web:0.14.0
restart: always
environment:
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
Expand Down
1 change: 1 addition & 0 deletions web/app/components/workflow/hooks/use-workflow-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export const useWorkflowRun = () => {
const newNodes = produce(nodes, (draft) => {
draft.forEach((node) => {
node.data._waitingRun = true
node.data._runningBranchId = undefined
})
})
setNodes(newNodes)
Expand Down
6 changes: 6 additions & 0 deletions web/app/components/workflow/nodes/iteration/use-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ const useConfig = (id: string, payload: IterationNodeType) => {
[VarType.number]: VarType.arrayNumber,
[VarType.object]: VarType.arrayObject,
[VarType.file]: VarType.arrayFile,
// list operator node can output array
[VarType.array]: VarType.array,
[VarType.arrayFile]: VarType.arrayFile,
[VarType.arrayString]: VarType.arrayString,
[VarType.arrayNumber]: VarType.arrayNumber,
[VarType.arrayObject]: VarType.arrayObject,
} as Record<VarType, VarType>)[outputItemType] || VarType.arrayString
})
setInputs(newInputs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,12 @@ const InputVarList: FC<Props> = ({
const newValue = produce(value, (draft: ToolVarInputs) => {
const target = draft[variable]
if (target) {
if (!isSupportConstantValue || varKindType === VarKindType.variable) {
if (isSupportConstantValue)
target.type = VarKindType.variable

target.value = varValue as ValueSelector
}
else {
target.type = VarKindType.constant
target.value = varValue as string
}
target.type = varKindType
target.value = varValue
}
else {
draft[variable] = {
type: VarKindType.variable,
type: varKindType,
value: varValue,
}
}
Expand Down Expand Up @@ -173,7 +165,7 @@ const InputVarList: FC<Props> = ({
value={varInput?.type === VarKindType.constant ? (varInput?.value || '') : (varInput?.value || [])}
onChange={handleNotMixedTypeChange(variable)}
onOpen={handleOpen(index)}
defaultVarKindType={isNumber ? VarKindType.constant : VarKindType.variable}
defaultVarKindType={varInput?.type || (isNumber ? VarKindType.constant : VarKindType.variable)}
isSupportConstantValue={isSupportConstantValue}
filterVar={isNumber ? filterVar : undefined}
availableVars={isSelect ? availableVars : undefined}
Expand Down
9 changes: 7 additions & 2 deletions web/app/components/workflow/nodes/tool/use-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
draft.tool_parameters = {}
})
setInputs(inputsWithDefaultValue)
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currTool])

// setting when call
Expand Down Expand Up @@ -214,8 +214,13 @@ const useConfig = (id: string, payload: ToolNodeType) => {
.map(k => inputs.tool_parameters[k])

const varInputs = getInputVars(hadVarParams.map((p) => {
if (p.type === VarType.variable)
if (p.type === VarType.variable) {
// handle the old wrong value not crash the page
if (!(p.value as any).join)
return `{{#${p.value}#}}`

return `{{#${(p.value as ValueSelector).join('.')}#}}`
}

return p.value as string
}))
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dify-web",
"version": "0.13.2",
"version": "0.14.0",
"private": true,
"engines": {
"node": ">=18.17.0"
Expand Down

0 comments on commit 1e67d35

Please sign in to comment.