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

Method getSessionPath

cli/session_manager.go:68–73  ·  view source on GitHub ↗

getSessionPath retorna o caminho completo para um arquivo de sessão.

(name string)

Source from the content-addressed store, hash-verified

66
67// getSessionPath retorna o caminho completo para um arquivo de sessão.
68func (sm *SessionManager) getSessionPath(name string) string {
69 // Sanitiza o nome para evitar problemas com o sistema de arquivos
70 safeName := strings.ReplaceAll(name, "/", "_")
71 safeName = strings.ReplaceAll(safeName, "\\", "_")
72 return filepath.Join(sm.sessionsDir, safeName+".json")
73}
74
75// CleanExpiredSessions removes sessions older than the configured TTL (L6).
76// Default TTL: 90 days, configurable via CHATCLI_SESSION_TTL (in days).

Callers 5

SaveSessionV2Method · 0.95
LoadSessionV2Method · 0.95
ForkSessionMethod · 0.95
ForkCurrentToNewMethod · 0.95
DeleteSessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected