MCPcopy Create free account
hub / github.com/diillson/chatcli / cmdStatus

Method cmdStatus

server/handler_session.go:326–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324}
325
326func (h *Handler) cmdStatus() string {
327 vi := version.GetCurrentVersion()
328 var b strings.Builder
329 b.WriteString(i18n.T("server.session.cmd_status_header"))
330 b.WriteString(i18n.T("server.session.cmd_status_version", vi.Version))
331 b.WriteString(i18n.T("server.session.cmd_status_provider", h.defaultProvider))
332 b.WriteString(i18n.T("server.session.cmd_status_model", h.defaultModel))
333
334 if h.watcherContextFunc != nil {
335 b.WriteString(i18n.T("server.session.cmd_status_watcher_active"))
336 if h.watcherDeployment != "" {
337 b.WriteString(i18n.T("server.session.cmd_status_watcher_target", h.watcherNamespace, h.watcherDeployment))
338 }
339 b.WriteString("\n")
340 } else {
341 b.WriteString(i18n.T("server.session.cmd_status_watcher_inactive"))
342 }
343
344 if h.pluginManager != nil {
345 b.WriteString(i18n.T("server.session.cmd_status_plugins", len(h.pluginManager.GetPlugins())))
346 }
347 if h.personaLoader != nil {
348 if agents, err := h.personaLoader.ListAgents(); err == nil {
349 b.WriteString(i18n.T("server.session.cmd_status_agents", len(agents)))
350 }
351 if skills, err := h.personaLoader.ListSkills(); err == nil {
352 b.WriteString(i18n.T("server.session.cmd_status_skills", len(skills)))
353 }
354 }
355 if h.fallbackChain != nil {
356 b.WriteString(i18n.T("server.session.cmd_status_fallback"))
357 }
358 if h.mcpManager != nil {
359 b.WriteString(i18n.T("server.session.cmd_status_mcp"))
360 }
361
362 return b.String()
363}
364
365func (h *Handler) cmdWatcherStatus() string {
366 if h.watcherContextFunc == nil {

Callers 1

executeRemoteCommandMethod · 0.95

Calls 6

GetCurrentVersionFunction · 0.92
TFunction · 0.92
GetPluginsMethod · 0.45
ListAgentsMethod · 0.45
ListSkillsMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected