mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-07 13:00:59 +08:00
feat: add multi-turn conversation memory to Agent
- Add chatHistory store (in-memory, per user, last 20 messages) - Agent now passes full conversation context to LLM via CallWithRequest - Records both user messages and assistant responses - Add /clear command to reset conversation history - Add 'Clear' quick action button in frontend - Supports natural multi-turn conversations (follow-up questions, context)
This commit is contained in:
@@ -238,6 +238,7 @@ export function AgentChatPage() {
|
||||
{ label: '💼 持仓', cmd: '/positions' },
|
||||
{ label: '💰 余额', cmd: '/balance' },
|
||||
{ label: '📋 Traders', cmd: '/traders' },
|
||||
{ label: '🧹 清除记忆', cmd: '/clear' },
|
||||
{ label: '❓ 帮助', cmd: '/help' },
|
||||
]
|
||||
: [
|
||||
@@ -246,6 +247,7 @@ export function AgentChatPage() {
|
||||
{ label: '💼 Positions', cmd: '/positions' },
|
||||
{ label: '💰 Balance', cmd: '/balance' },
|
||||
{ label: '📋 Traders', cmd: '/traders' },
|
||||
{ label: '🧹 Clear', cmd: '/clear' },
|
||||
{ label: '❓ Help', cmd: '/help' },
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user