File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,7 @@ export const UserInput: React.FC = () => {
2020 }
2121
2222 if ( value . toLowerCase ( ) === commands . CLEAR ) {
23- console . clear ( )
24- actions . setInput ( "" )
25- reset ( )
23+ actions . reset ( )
2624 return
2725 }
2826
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ export interface StoreModel {
8080 appendCurrentAssistantMessage : Action < StoreModel , string >
8181 clearCurrentAssistantMessage : Action < StoreModel >
8282 clearToolUses : Action < StoreModel >
83+ reset : Action < StoreModel >
8384 sendMessage : Action < StoreModel , string >
8485 setPendingToolPermission : Action <
8586 StoreModel ,
@@ -176,6 +177,14 @@ export const AgentStore = createContextStore<StoreModel>({
176177 state . currentToolUses = [ ]
177178 } ) ,
178179
180+ reset : action ( ( state ) => {
181+ state . chatHistory = [ ]
182+ state . currentAssistantMessage = ""
183+ state . currentToolUses = [ ]
184+ state . input = ""
185+ state . stats = null
186+ } ) ,
187+
179188 setConfig : action ( ( state , payload ) => {
180189 state . config = payload
181190 } ) ,
You can’t perform that action at this time.
0 commit comments