From 39abd4878c9fdd4683e2ee7a61327d5813cca1ca Mon Sep 17 00:00:00 2001 From: dw1161 Date: Sat, 21 Mar 2026 16:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AC=20CLI=20=E6=96=B0=E5=A2=9E=20Step?= =?UTF-8?q?=208=EF=BC=9A=E7=94=A8=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=88=86=E6=9E=90=E8=A7=86=E8=A7=92=E6=B3=A8=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/main.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cli/main.py b/cli/main.py index adda48fc..3617041b 100644 --- a/cli/main.py +++ b/cli/main.py @@ -575,6 +575,15 @@ def get_user_selections(): ) reasoning_effort = ask_openai_reasoning_effort() + # Step 8: User context (optional) + console.print( + create_question_box( + "Step 8: 自定义分析视角(可选)", + "输入你认为当前影响市场的核心因素,Agent 会优先考虑此视角\n 例:中东地缘冲突升级是当前美股主要风险,请重点分析\n 直接回车跳过", + ) + ) + user_context = typer.prompt("", default="").strip() + return { "ticker": selected_ticker, "analysis_date": analysis_date, @@ -586,6 +595,7 @@ def get_user_selections(): "deep_thinker": selected_deep_thinker, "google_thinking_level": thinking_level, "openai_reasoning_effort": reasoning_effort, + "user_context": user_context, } @@ -1011,7 +1021,7 @@ 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"], selections.get("user_context", "") ) # Pass callbacks to graph config for tool execution tracking # (LLM tracking is handled separately via LLM constructor)