fix(tui): reset agent state on /reset command in fullscreen mode
Use agent.reset() instead of session.clear() when agent is available, ensuring tool fingerprint, usage counters, and agent history are all cleared properly alongside the session.
This commit is contained in:
@@ -149,7 +149,11 @@ export function App({
|
||||
return;
|
||||
|
||||
case 'reset':
|
||||
session.clear();
|
||||
if (agent) {
|
||||
agent.reset();
|
||||
} else {
|
||||
session.clear();
|
||||
}
|
||||
setMessages([]);
|
||||
setTokenUsage({ inputTokens: 0, outputTokens: 0 });
|
||||
setScrollOffset(0);
|
||||
|
||||
Reference in New Issue
Block a user