feat: add conversation_id and user_id in chatflow/workflow system vars (#3771)
Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
@@ -80,7 +80,15 @@ const formatItem = (item: any, isChatMode: boolean, filterVar: (payload: Var, se
|
||||
variable: 'sys.query',
|
||||
type: VarType.string,
|
||||
})
|
||||
res.vars.push({
|
||||
variable: 'sys.conversation_id',
|
||||
type: VarType.string,
|
||||
})
|
||||
}
|
||||
res.vars.push({
|
||||
variable: 'sys.user_id',
|
||||
type: VarType.string,
|
||||
})
|
||||
res.vars.push({
|
||||
variable: 'sys.files',
|
||||
type: VarType.arrayFile,
|
||||
|
@@ -70,6 +70,7 @@ const Panel: FC<NodePanelProps<StartNodeType>> = ({
|
||||
}
|
||||
/>)
|
||||
}
|
||||
|
||||
<VarItem
|
||||
readonly
|
||||
payload={{
|
||||
@@ -81,6 +82,32 @@ const Panel: FC<NodePanelProps<StartNodeType>> = ({
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
{
|
||||
isChatMode && (
|
||||
<VarItem
|
||||
readonly
|
||||
payload={{
|
||||
variable: 'sys.conversation_id',
|
||||
} as any}
|
||||
rightContent={
|
||||
<div className='text-xs font-normal text-gray-500'>
|
||||
String
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
<VarItem
|
||||
readonly
|
||||
payload={{
|
||||
variable: 'sys.user_id',
|
||||
} as any}
|
||||
rightContent={
|
||||
<div className='text-xs font-normal text-gray-500'>
|
||||
String
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</>
|
||||
|
Reference in New Issue
Block a user