Skip to content

Commit d72e843

Browse files
authored
feat: implement exit and quit commands to gracefully terminate the conversation (#441)
1 parent 00ff42a commit d72e843

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/agent/conversation.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,9 @@ func (c *Agent) handleMetaQuery(ctx context.Context, query string) (answer strin
624624
c.session.Messages = []*api.Message{}
625625
c.sessionMu.Unlock()
626626
return "Cleared the conversation.", true, nil
627+
case "exit", "quit":
628+
c.setAgentState(api.AgentStateExited)
629+
return "It has been a pleasure assisting you. Have a great day!", true, nil
627630
case "model":
628631
return "Current model is `" + c.Model + "`", true, nil
629632
case "models":

0 commit comments

Comments
 (0)