Skip to content

Commit b6ff393

Browse files
committed
fix(meta planner): prevent automatically entering DS mode when attaching files
1 parent b545577 commit b6ff393

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

alias/src/alias/agent/agents/_meta_planner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ async def enter_data_analysis_mode(
698698
):
699699
"""
700700
Directly enter the data science mode.
701-
Use this when the user provides some data files and ask for processing.
701+
Use this for COMPLEX, CODE-BASED data analysis.
702702
703703
Args:
704704
user_query (`str`):

alias/src/alias/agent/agents/data_source/data_source.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,20 @@ async def prepare(self, toolkit: AliasToolkit):
138138

139139
mcp_server_name = list(mcp_server_name)[0]
140140
server_config = server_config[mcp_server_name]
141+
142+
cmd = server_config.get("command")
143+
args = server_config.get("args")
144+
if cmd is None or args is None:
145+
raise ValueError(
146+
"MCP server configuration requires non-empty "
147+
"`command` and `args` fields to start!",
148+
)
149+
141150
client = StdIOStatefulClient(
142151
self.name,
143-
command=server_config["command"],
144-
args=server_config["args"],
145-
env=server_config["env"],
152+
command=cmd,
153+
args=args,
154+
env=server_config.get("env"),
146155
)
147156

148157
text_hook = TextPostHook(

0 commit comments

Comments
 (0)