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

Method RecordSessionStart

cli/workspace/memory/patterns.go:74–81  ·  view source on GitHub ↗

RecordSessionStart increments session count and updates avg duration.

()

Source from the content-addressed store, hash-verified

72
73// RecordSessionStart increments session count and updates avg duration.
74func (pd *PatternDetector) RecordSessionStart() {
75 pd.mu.Lock()
76 defer pd.mu.Unlock()
77
78 pd.stats.SessionCount++
79 pd.stats.LastSession = time.Now()
80 pd.persist()
81}
82
83// RecordSessionEnd updates average session duration.
84func (pd *PatternDetector) RecordSessionEnd(duration time.Duration) {

Callers 1

NewChatCLIFunction · 0.80

Calls 3

persistMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected