mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
docs(session): correct DefaultSessionDir convention comment
- Stale comment showed ~/.kit/sessions/--<cwd-path>--/ which does not match the actual encoding (no leading/trailing dashes) - Update to reflect the real format and point to encodeCwdForDir for full rules
This commit is contained in:
@@ -1350,7 +1350,10 @@ func (tm *TreeManager) buildTreeNodeDepth(id string, depth int, visited map[stri
|
||||
// --- Path conventions ---
|
||||
|
||||
// DefaultSessionDir returns the default session storage directory for a cwd.
|
||||
// Convention: ~/.kit/sessions/--<cwd-path>--/
|
||||
// Convention: ~/.kit/sessions/<encoded-cwd>, where path separators are
|
||||
// encoded as "--" with no leading or trailing dashes — e.g.
|
||||
// /home/user/proj becomes home--user--proj. See encodeCwdForDir for the
|
||||
// full encoding rules (including Windows path handling).
|
||||
func DefaultSessionDir(cwd string) string {
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user