feat(executor): Integrate VFS helper for in-memory artifact tracking
This commit is contained in:
@@ -8,6 +8,7 @@ from matplotlib.figure import Figure
|
||||
|
||||
from ea_chatbot.graph.state import AgentState
|
||||
from ea_chatbot.utils.db_client import DBClient
|
||||
from ea_chatbot.utils.vfs import VFSHelper
|
||||
from ea_chatbot.utils.logging import get_logger
|
||||
from ea_chatbot.config import Settings
|
||||
|
||||
@@ -37,12 +38,17 @@ def executor_node(state: AgentState) -> dict:
|
||||
|
||||
db_client = DBClient(settings=db_settings)
|
||||
|
||||
# Initialize the Virtual File System (VFS) helper
|
||||
vfs_state = dict(state.get("vfs", {}))
|
||||
vfs_helper = VFSHelper(vfs_state)
|
||||
|
||||
# Initialize local variables for execution
|
||||
# 'db' is the DBClient instance, 'plots' is for matplotlib figures
|
||||
local_vars = {
|
||||
'db': db_client,
|
||||
'plots': [],
|
||||
'pd': pd
|
||||
'pd': pd,
|
||||
'vfs': vfs_helper
|
||||
}
|
||||
|
||||
stdout_buffer = io.StringIO()
|
||||
@@ -98,5 +104,6 @@ def executor_node(state: AgentState) -> dict:
|
||||
"code_output": code_output,
|
||||
"error": error,
|
||||
"plots": plots,
|
||||
"dfs": dfs
|
||||
"dfs": dfs,
|
||||
"vfs": vfs_state
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user