MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / createWithState

Method createWithState

backend/session.go:90–110  ·  view source on GitHub ↗
(sessionID, cwd string, state *agent.AgentState)

Source from the content-addressed store, hash-verified

88 m.mu.Lock()
89 defer m.mu.Unlock()
90 return len(m.sessions)
91}
92
93func (m *SessionManager) ActiveSessionIDs() map[string]struct{} {
94 m.mu.Lock()
95 defer m.mu.Unlock()
96 out := map[string]struct{}{}
97 for id := range m.sessions {
98 out[id] = struct{}{}
99 }
100 return out
101}
102
103func (m *SessionManager) StorageStatus() (maintenance.Report, error) {
104 return maintenance.Status(m.baseConfig, maintenance.Options{CurrentSessions: m.ActiveSessionIDs()})
105}
106
107func (m *SessionManager) CleanupStorage(enforce bool) (maintenance.Report, error) {
108 return maintenance.Cleanup(m.baseConfig, maintenance.Options{Enforce: enforce, CurrentSessions: m.ActiveSessionIDs()})
109}
110
111func (m *SessionManager) Pin(sessionID string, pinned bool) (*session.Meta, error) {
112 return m.store.Pin(sessionID, pinned)
113}

Callers 2

CreateMethod · 0.95
ResumeMethod · 0.95

Calls 10

MountMethod · 0.95
NewConfigForCWDFunction · 0.92
NewQueryEngineFunction · 0.92
applyPinnedDaemonConfigFunction · 0.85
NewSessionControllerFunction · 0.85
LoadSkillRecoveryMethod · 0.80
ImportSnapshotMethod · 0.45

Tested by

no test coverage detected