mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-10 14:27:00 +08:00
fix: Agent answers questions first, setup only when asked
Core behavior change: - Agent NO LONGER auto-prompts setup on first message - Setup only triggers on explicit: '开始配置' / 'setup' / '绑定交易所' - Normal questions answered normally, even without trader configured - AI analysis works without AI model (shows raw data + guidance) - Stock analysis shows 'coming soon' instead of error Intent routing improved: - '你能分析拓维信息吗' → correctly routes to analyze - Chinese suffixes cleaned (吗/呢/这只股票) - More natural language patterns matched Philosophy: Agent should be helpful from minute one. Configuration is optional, not a gate.
This commit is contained in:
@@ -42,10 +42,13 @@ func NewRouter() *Router {
|
||||
regexp.MustCompile(`(?i)(多少钱|赚了|亏了|收益|回报)`),
|
||||
},
|
||||
analyzePatterns: []*regexp.Regexp{
|
||||
regexp.MustCompile(`(?i)(analyze|analysis|分析|看看|研究)\s+(.+)`),
|
||||
regexp.MustCompile(`(?i)(what.*think|怎么看|你觉得|走势|趋势|行情)\s*(.+)?`),
|
||||
regexp.MustCompile(`(?i)(analyze|analysis|分析|看看|研究)\s*(.+)`),
|
||||
regexp.MustCompile(`(?i)(what.*think|怎么看|你觉得)\s*(.+)?`),
|
||||
regexp.MustCompile(`(?i)(走势|趋势|行情|前景|预测)\s*(.+)?`),
|
||||
regexp.MustCompile(`(?i)(.+)(走势|趋势|行情|前景|怎么样|如何)`),
|
||||
regexp.MustCompile(`(?i)(该不该|适合|能不能|要不要).*(买|卖|做多|做空|入场|开仓).*`),
|
||||
regexp.MustCompile(`(?i)(should\s+i|is\s+it\s+good).*(buy|sell|long|short).*`),
|
||||
regexp.MustCompile(`(?i)你.*(?:分析|看看|研究|了解)\s*(.+?)(?:吗|呢|嘛|啊|这只|这个)?$`),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user