Skip to content

Commit 1c224e9

Browse files
committed
refactor: remove redundant save logic
1 parent ca3cdff commit 1c224e9

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

lib/httpapi/server.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -617,18 +617,6 @@ func (s *Server) Start() error {
617617

618618
// Stop gracefully stops the HTTP server
619619
func (s *Server) Stop(ctx context.Context) error {
620-
// Save conversation state if configured
621-
if s.statePersistenceCfg.SaveState && s.statePersistenceCfg.StateFile != "" {
622-
if err := s.conversation.SaveState(s.conversation.Messages(), s.statePersistenceCfg.StateFile); err != nil {
623-
s.logger.Error("Failed to save conversation state", "error", err)
624-
} else {
625-
s.logger.Info("Saved conversation state", "stateFile", s.statePersistenceCfg.StateFile)
626-
}
627-
}
628-
629-
// Clean up PID file
630-
s.cleanupPIDFile()
631-
632620
// Clean up temporary directory
633621
s.cleanupTempDir()
634622

lib/screentracker/pty_conversation.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ func (c *PTYConversation) Send(messageParts ...MessagePart) error {
257257
Role: ConversationRoleUser,
258258
Time: now,
259259
})
260-
c.dirty = true
261260
c.userSentMessageAfterLoadState = true
262261

263262
return nil

0 commit comments

Comments
 (0)