Skip to content

Commit 7e389d2

Browse files
committed
feat: remove comments
1 parent 3959002 commit 7e389d2

3 files changed

Lines changed: 11 additions & 17 deletions

File tree

cmd/server/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ func runServer(ctx context.Context, logger *slog.Logger, argsToPass []string) er
125125
saveState = viper.GetBool(SaveState)
126126
}
127127
} else {
128-
// No state file provided - ensure load/save flags are not explicitly set to true
129128
if viper.IsSet(LoadState) && viper.GetBool(LoadState) {
130129
return xerrors.Errorf("--load-state requires --state-file to be set")
131130
}

lib/httpapi/server.go

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,15 @@ func NewServer(ctx context.Context, config ServerConfig) (*Server, error) {
255255
}
256256

257257
conversation := st.NewPTY(ctx, st.PTYConversationConfig{
258-
AgentType: config.AgentType,
259-
AgentIO: config.Process,
260-
Clock: config.Clock,
261-
SnapshotInterval: snapshotInterval,
262-
ScreenStabilityLength: 2 * time.Second,
263-
FormatMessage: formatMessage,
264-
ReadyForInitialPrompt: isAgentReadyForInitialPrompt,
265-
FormatToolCall: formatToolCall,
266-
InitialPrompt: initialPrompt,
258+
AgentType: config.AgentType,
259+
AgentIO: config.Process,
260+
Clock: config.Clock,
261+
SnapshotInterval: snapshotInterval,
262+
ScreenStabilityLength: 2 * time.Second,
263+
FormatMessage: formatMessage,
264+
ReadyForInitialPrompt: isAgentReadyForInitialPrompt,
265+
FormatToolCall: formatToolCall,
266+
InitialPrompt: initialPrompt,
267267
Logger: logger,
268268
StatePersistenceConfig: config.StatePersistenceConfig,
269269
}, emitter)
@@ -591,8 +591,7 @@ func (s *Server) Start() error {
591591
return s.srv.ListenAndServe()
592592
}
593593

594-
// Stop gracefully stops the HTTP server. It is safe to call multiple times;
595-
// only the first call will perform the shutdown, subsequent calls are no-ops.
594+
// Stop gracefully stops the HTTP server. It is safe to call multiple times.
596595
func (s *Server) Stop(ctx context.Context) error {
597596
var err error
598597
s.stopOnce.Do(func() {
@@ -615,8 +614,6 @@ func (s *Server) cleanupTempDir() {
615614
}
616615
}
617616

618-
// SaveState saves the conversation state if configured. This can be called from signal handlers.
619-
// The source parameter indicates what triggered the save (e.g., "SIGTERM", "SIGUSR1").
620617
func (s *Server) SaveState(source string) error {
621618
if err := s.conversation.SaveState(); err != nil {
622619
s.logger.Error("Failed to save conversation state", "source", source, "error", err)

lib/screentracker/pty_conversation.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ type PTYConversationConfig struct {
7676
// FormatToolCall removes the coder report_task tool call from the agent message and also returns the array of removed tool calls
7777
FormatToolCall func(message string) (string, []string)
7878
// InitialPrompt is the initial prompt to send to the agent once ready
79-
InitialPrompt []MessagePart
80-
// OnSnapshot is called after each snapshot with current status, messages, and screen content
81-
OnSnapshot func(status ConversationStatus, messages []ConversationMessage, screen string)
79+
InitialPrompt []MessagePart
8280
Logger *slog.Logger
8381
StatePersistenceConfig StatePersistenceConfig
8482
}

0 commit comments

Comments
 (0)