diff --git a/internal/domain/messaging/chat_stream.go b/internal/domain/messaging/chat_stream.go index 94a9fa204..be5535be6 100644 --- a/internal/domain/messaging/chat_stream.go +++ b/internal/domain/messaging/chat_stream.go @@ -15,7 +15,6 @@ type ChatSnapshot struct { // frontends display it rather than stamping their own build, so a // partially upgraded deployment cannot report itself as matched. Version string - RestartAvailable bool CancellationAvailable bool // VoiceAvailable reports that a voice clip is transcribed into the turn. VoiceAvailable bool diff --git a/internal/domain/messaging/commands.go b/internal/domain/messaging/commands.go index 28d34edbe..db652a803 100644 --- a/internal/domain/messaging/commands.go +++ b/internal/domain/messaging/commands.go @@ -10,7 +10,7 @@ var localCommands = []string{ "/new", "/reset", "/topic", "/retry", "/undo", "/title", "/branch", "/fork", "/compress", "/compact", "/whoami", "/profile", "/sessions", "/resume", "/delete", "/agents", - "/personality", "/help", "/version", "/update", "/restart", + "/personality", "/help", "/version", "/update", } // CommandSpec describes a local command for adapter-provided discovery. @@ -49,7 +49,6 @@ var localCommandSpecs = []CommandSpec{ {Command: "/help", Description: "See what Archie can do", Usage: "/help"}, {Command: "/version", Description: "Show installed Archie versions", Usage: "/version"}, {Command: "/update", Description: "Check for Archie updates", Usage: "/update"}, - {Command: "/restart", Description: "Reload the chat adapter", Usage: "/restart"}, } // LocalCommands returns the command names Route answers from local state. diff --git a/internal/gateway/chat_local.go b/internal/gateway/chat_local.go index 2981550be..9077ab23f 100644 --- a/internal/gateway/chat_local.go +++ b/internal/gateway/chat_local.go @@ -44,7 +44,7 @@ func (a *LocalChatAdapter) Snapshot(ctx context.Context) (ChatSnapshot, error) { if err != nil { return ChatSnapshot{}, err } - s := ChatSnapshot{Sessions: sessions, Models: []string{}, Providers: []string{}, Personas: []string{}, ModelsByProvider: map[string][]string{}, ActivePersonas: map[string]string{}, RestartAvailable: a.Router.Restart != nil, CancellationAvailable: a.Turns != nil, PersonasAvailable: a.Personas != nil, VoiceAvailable: a.VoiceAvailable, Version: a.Router.Version} + s := ChatSnapshot{Sessions: sessions, Models: []string{}, Providers: []string{}, Personas: []string{}, ModelsByProvider: map[string][]string{}, ActivePersonas: map[string]string{}, CancellationAvailable: a.Turns != nil, PersonasAvailable: a.Personas != nil, VoiceAvailable: a.VoiceAvailable, Version: a.Router.Version} if a.Models != nil { s.Models = slices.Clone(a.Models.Models()) if manager, ok := a.Models.(OrgModelManager); ok { diff --git a/internal/gateway/gateway.go b/internal/gateway/gateway.go index 92cfbf333..b27cfda66 100644 --- a/internal/gateway/gateway.go +++ b/internal/gateway/gateway.go @@ -158,9 +158,6 @@ type Router struct { Version string // Updates handles the shared /update command. Nil means unavailable. Updates UpdateService - // Restart requests a scoped chat-adapter reload. It deliberately does not - // restart the daemon; Telegram's /restart has this same boundary. - Restart func(context.Context) error // Sessions persists session metadata and conversation history. // When set, session lifecycle commands (/new, /branch, /title, // /undo, /retry, /compress) are available. When nil, those @@ -386,8 +383,6 @@ func (r *Router) dispatchLocalMisc(ctx context.Context, msg messaging.Message, p return r.handleVersion(), true, nil case "/update": return r.handleUpdateCheck(ctx), true, nil - case "/restart": - return r.handleRestartAdapter(ctx), true, nil } return r.dispatchSessionCommand(ctx, msg, platform, cmd, rest) } @@ -412,17 +407,6 @@ func (r *Router) handleUpdateCheck(ctx context.Context) string { return releaseupdate.FormatSnapshot(snapshot) } -// handleRestartAdapter reloads the chat adapter. -func (r *Router) handleRestartAdapter(ctx context.Context) string { - if r.Restart == nil { - return "Chat adapter restart is not configured." - } - if err := r.Restart(ctx); err != nil { - return fmt.Sprintf("Could not restart the chat adapter: %v", err) - } - return "Chat adapter reload requested." -} - // dispatchSessionCommand handles the session-lifecycle command group // (/new, /topic, /retry, /undo, /title, /branch, /compress and their // aliases). Split out from dispatchLocal to keep cyclomatic complexity diff --git a/internal/gateway/slash_access.go b/internal/gateway/slash_access.go index 81304b65a..7d9fdf7ca 100644 --- a/internal/gateway/slash_access.go +++ b/internal/gateway/slash_access.go @@ -49,7 +49,6 @@ var slashAdminOnly = map[string]bool{ "/personality": true, "/settings": true, "/update": true, - "/restart": true, } // SlashAccessPolicy decides which slash commands a sender may run. Deny by diff --git a/internal/infrastructure/gatewayrpc/values.go b/internal/infrastructure/gatewayrpc/values.go index c2562508e..686f271ad 100644 --- a/internal/infrastructure/gatewayrpc/values.go +++ b/internal/infrastructure/gatewayrpc/values.go @@ -257,7 +257,7 @@ func snapshotProto(v messaging.ChatSnapshot) *pb.SnapshotResponse { for k, list := range v.ModelsByProvider { groups[k] = &pb.StringList{Values: list} } - return &pb.SnapshotResponse{Sessions: mapValues(v.Sessions, sessionProto), Models: v.Models, ModelsByProvider: groups, Providers: v.Providers, ActiveModel: v.ActiveModel, ActiveProvider: v.ActiveProvider, Personas: v.Personas, ActivePersonas: v.ActivePersonas, RestartAvailable: v.RestartAvailable, CancellationAvailable: v.CancellationAvailable, PersonasAvailable: v.PersonasAvailable, VoiceAvailable: v.VoiceAvailable, Version: v.Version} + return &pb.SnapshotResponse{Sessions: mapValues(v.Sessions, sessionProto), Models: v.Models, ModelsByProvider: groups, Providers: v.Providers, ActiveModel: v.ActiveModel, ActiveProvider: v.ActiveProvider, Personas: v.Personas, ActivePersonas: v.ActivePersonas, CancellationAvailable: v.CancellationAvailable, PersonasAvailable: v.PersonasAvailable, VoiceAvailable: v.VoiceAvailable, Version: v.Version} } func snapshotValue(v *pb.SnapshotResponse) messaging.ChatSnapshot { @@ -265,5 +265,5 @@ func snapshotValue(v *pb.SnapshotResponse) messaging.ChatSnapshot { for k, list := range v.ModelsByProvider { groups[k] = list.GetValues() } - return messaging.ChatSnapshot{Sessions: mapValues(v.Sessions, sessionValue), Models: v.Models, ModelsByProvider: groups, Providers: v.Providers, ActiveModel: v.ActiveModel, ActiveProvider: v.ActiveProvider, Personas: v.Personas, ActivePersonas: v.ActivePersonas, RestartAvailable: v.RestartAvailable, CancellationAvailable: v.CancellationAvailable, PersonasAvailable: v.PersonasAvailable, VoiceAvailable: v.VoiceAvailable, Version: v.Version} + return messaging.ChatSnapshot{Sessions: mapValues(v.Sessions, sessionValue), Models: v.Models, ModelsByProvider: groups, Providers: v.Providers, ActiveModel: v.ActiveModel, ActiveProvider: v.ActiveProvider, Personas: v.Personas, ActivePersonas: v.ActivePersonas, CancellationAvailable: v.CancellationAvailable, PersonasAvailable: v.PersonasAvailable, VoiceAvailable: v.VoiceAvailable, Version: v.Version} } diff --git a/internal/webui/api_chat.go b/internal/webui/api_chat.go index c043b84e6..eaab5dff8 100644 --- a/internal/webui/api_chat.go +++ b/internal/webui/api_chat.go @@ -181,7 +181,6 @@ func (s *Server) handleChatSessions(w http.ResponseWriter, r *http.Request) { "voice_available": snapshot.VoiceAvailable, "active_personas": active, "commands": chatCommandSpecs(chat), - "restart_available": snapshot.RestartAvailable, }) }