Skip to content
This repository was archived by the owner on Sep 13, 2026. It is now read-only.

Commit 86c9d91

Browse files
committed
refactor: remove unnecessary agentType local variable
Use config.AgentType directly in the OnSnapshot closure instead of creating a redundant local variable.
1 parent f5bd08d commit 86c9d91

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎lib/httpapi/server.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ func NewServer(ctx context.Context, config ServerConfig) (*Server, error) {
245245
}
246246

247247
emitter := NewEventEmitter(1024)
248-
agentType := config.AgentType
249248

250249
// Format initial prompt into message parts if provided
251250
var initialPrompt []st.MessagePart
@@ -267,7 +266,7 @@ func NewServer(ctx context.Context, config ServerConfig) (*Server, error) {
267266
// to keep the screentracker package decoupled from httpapi concerns.
268267
// This preserves clean package boundaries and avoids import cycles.
269268
OnSnapshot: func(status st.ConversationStatus, messages []st.ConversationMessage, screen string) {
270-
emitter.UpdateStatusAndEmitChanges(status, agentType)
269+
emitter.UpdateStatusAndEmitChanges(status, config.AgentType)
271270
emitter.UpdateMessagesAndEmitChanges(messages)
272271
emitter.UpdateScreenAndEmitChanges(screen)
273272
},

0 commit comments

Comments
 (0)