Merge branch 'feat/support-agent-sandbox' of https://github.com/langgenius/dify into feat/support-agent-sandbox

This commit is contained in:
Joel
2026-01-20 14:01:43 +08:00
7 changed files with 102 additions and 6 deletions

View File

@ -343,7 +343,8 @@ export const useChat = (
tool_elapsed_time,
}: any) => {
if (!isAgentMode) {
responseItem.content = responseItem.content + message
if (chunk_type === 'text')
responseItem.content = responseItem.content + message
}
else {
const lastThought = responseItem.agent_thoughts?.[responseItem.agent_thoughts?.length - 1]

View File

@ -0,0 +1,26 @@
{
"icon": {
"type": "element",
"isRootNode": true,
"name": "svg",
"attributes": {
"width": "12",
"height": "12",
"viewBox": "0 0 12 12",
"fill": "none",
"xmlns": "http://www.w3.org/2000/svg"
},
"children": [
{
"type": "element",
"name": "path",
"attributes": {
"d": "M5.14286 5.14286V3.42857L8 5.71429L5.14286 8V6.28571H0V5.14286H5.14286ZM0.83303 7.42857H2.04658C2.72474 9.10389 4.36721 10.28571 6.28571 10.28571C8.81049 10.28571 10.85717 8.23903 10.85717 5.71429C10.85717 3.18956 8.81049 1.14285 6.28571 1.14285C4.36721 1.14285 2.72474 2.32467 2.04658 4H0.83303C1.56118 1.68165 3.72706 0 6.28571 0C9.4416 0 12 2.55837 12 5.71429C12 8.87014 9.4416 11.42854 6.28571 11.42854C3.72706 11.42854 1.56118 9.74691 0.83303 7.42857Z",
"fill": "currentColor"
},
"children": []
}
]
},
"name": "AssembleVariablesAlt"
}

View File

@ -0,0 +1,20 @@
// GENERATE BY script
// DON NOT EDIT IT MANUALLY
import type { IconData } from '@/app/components/base/icons/IconBase'
import * as React from 'react'
import IconBase from '@/app/components/base/icons/IconBase'
import data from './AssembleVariablesAlt.json'
const Icon = (
{
ref,
...props
}: React.SVGProps<SVGSVGElement> & {
ref?: React.RefObject<React.RefObject<HTMLOrSVGElement>>
},
) => <IconBase {...props} ref={ref} data={data as IconData} />
Icon.displayName = 'AssembleVariablesAlt'
export default Icon

View File

@ -1,4 +1,5 @@
export { default as AssembleVariables } from './AssembleVariables'
export { default as AssembleVariablesAlt } from './AssembleVariablesAlt'
export { default as AtSign } from './AtSign'
export { default as Bookmark } from './Bookmark'
export { default as Check } from './Check'

View File

@ -67,6 +67,7 @@ type VariableReferenceFieldsProps = {
currentTool?: Tool | Event
currentProvider?: ToolWithProvider | TriggerWithProvider
isFilterFileVar?: boolean
toolNodeId?: string
}
const VariableReferenceFields: FC<VariableReferenceFieldsProps> = ({

View File

@ -286,7 +286,8 @@ export const useChat = (
tool_error,
tool_elapsed_time,
}: any) => {
responseItem.content = responseItem.content + message
if (chunk_type === 'text')
responseItem.content = responseItem.content + message
if (chunk_type === 'tool_call') {
if (!responseItem.toolCalls)