feat: add analysis-only crypto asset mode

This commit is contained in:
CadeYu
2026-04-18 20:42:11 +08:00
parent f362a160c3
commit e7ec980021
13 changed files with 141 additions and 19 deletions

View File

@@ -505,6 +505,10 @@ def get_user_selections():
)
)
selected_ticker = get_ticker()
asset_type = detect_asset_type(selected_ticker)
console.print(
f"[green]Detected asset type:[/green] {asset_type.value}"
)
# Step 2: Analysis date
default_date = datetime.datetime.now().strftime("%Y-%m-%d")
@@ -523,7 +527,7 @@ def get_user_selections():
"Step 3: Analysts Team", "Select your LLM analyst agents for the analysis"
)
)
selected_analysts = select_analysts()
selected_analysts = select_analysts(asset_type)
console.print(
f"[green]Selected analysts:[/green] {', '.join(analyst.value for analyst in selected_analysts)}"
)
@@ -577,6 +581,7 @@ def get_user_selections():
return {
"ticker": selected_ticker,
"asset_type": asset_type.value,
"analysis_date": analysis_date,
"analysts": selected_analysts,
"research_depth": selected_research_depth,
@@ -989,6 +994,7 @@ def run_analysis():
# Add initial messages
message_buffer.add_message("System", f"Selected ticker: {selections['ticker']}")
message_buffer.add_message("System", f"Detected asset type: {selections['asset_type']}")
message_buffer.add_message(
"System", f"Analysis date: {selections['analysis_date']}"
)
@@ -1011,7 +1017,9 @@ def run_analysis():
# Initialize state and get graph args with callbacks
init_agent_state = graph.propagator.create_initial_state(
selections["ticker"], selections["analysis_date"]
selections["ticker"],
selections["analysis_date"],
asset_type=selections["asset_type"],
)
# Pass callbacks to graph config for tool execution tracking
# (LLM tracking is handled separately via LLM constructor)