mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-13 15:57:01 +08:00
Improve NOFXi agent product handling
This commit is contained in:
@@ -421,6 +421,9 @@ func (a *Agent) handleMessageForStoreUser(ctx context.Context, storeUserID strin
|
||||
if reply, handled := a.handleTradeConfirmation(ctx, userID, text, lang); handled {
|
||||
return reply, nil
|
||||
}
|
||||
if reply, handled := a.handleModelWalletBalanceQuestion(storeUserID, lang, text); handled {
|
||||
return reply, nil
|
||||
}
|
||||
|
||||
// Everything else goes through the planner and tool system.
|
||||
return a.thinkAndAct(ctx, storeUserID, userID, lang, text)
|
||||
@@ -468,6 +471,12 @@ func (a *Agent) handleMessageStreamForStoreUser(ctx context.Context, storeUserID
|
||||
}
|
||||
return reply, nil
|
||||
}
|
||||
if reply, handled := a.handleModelWalletBalanceQuestion(storeUserID, lang, text); handled {
|
||||
if onEvent != nil {
|
||||
emitStreamText(onEvent, reply)
|
||||
}
|
||||
return reply, nil
|
||||
}
|
||||
return a.thinkAndActStream(ctx, storeUserID, userID, lang, text, onEvent)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user