mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
update ui changes
This commit is contained in:
@@ -102,15 +102,19 @@ export class DynamicStructuredTool<
|
||||
sandbox[`$${item}`] = arg[item]
|
||||
}
|
||||
}
|
||||
//inject variables
|
||||
let env = {}
|
||||
|
||||
// inject variables
|
||||
let vars = {}
|
||||
if (this.variables) {
|
||||
for (const item of this.variables) {
|
||||
let value = item.value
|
||||
|
||||
// read from .env file
|
||||
if (item.type === 'runtime') {
|
||||
value = process.env[item.name]
|
||||
}
|
||||
Object.defineProperty(env, item.name, {
|
||||
|
||||
Object.defineProperty(vars, item.name, {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
@@ -118,10 +122,13 @@ export class DynamicStructuredTool<
|
||||
})
|
||||
}
|
||||
}
|
||||
sandbox['$env'] = env
|
||||
sandbox['$vars'] = vars
|
||||
|
||||
// inject flow properties
|
||||
if (this.flowObj) {
|
||||
sandbox['$flow'] = { ...this.flowObj, sessionId: overrideSessionId }
|
||||
}
|
||||
|
||||
const defaultAllowBuiltInDep = [
|
||||
'assert',
|
||||
'buffer',
|
||||
|
||||
Reference in New Issue
Block a user