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

Method attachedIDs

cli/context_adapter.go:435–449  ·  view source on GitHub ↗

attachedIDs returns the set of context IDs attached to the session.

()

Source from the content-addressed store, hash-verified

433
434// attachedIDs returns the set of context IDs attached to the session.
435func (a *contextPluginAdapter) attachedIDs() map[string]bool {
436 out := map[string]bool{}
437 mgr := a.manager()
438 if mgr == nil {
439 return out
440 }
441 attached, err := mgr.GetAttachedContexts(a.sessionID())
442 if err != nil {
443 return out
444 }
445 for _, fc := range attached {
446 out[fc.ID] = true
447 }
448 return out
449}
450
451// humanMB renders a byte count as MB with two decimals.
452func humanMB(bytes int64) string {

Callers 3

ListMethod · 0.95
ShowMethod · 0.95
InspectMethod · 0.95

Calls 3

managerMethod · 0.95
sessionIDMethod · 0.95
GetAttachedContextsMethod · 0.80

Tested by

no test coverage detected