We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 927dbc7 commit c660406Copy full SHA for c660406
config/config.go
@@ -5,7 +5,9 @@ import (
5
"encoding/json"
6
"fmt"
7
"os"
8
+ "os/user"
9
"path/filepath"
10
+ "strings"
11
)
12
13
const ConfigFileName = "config.json"
@@ -37,7 +39,14 @@ func DefaultConfig() *Config {
37
39
DefaultProgram: "claude",
38
40
AutoYes: false,
41
DaemonPollInterval: 1000,
- BranchPrefix: "session/",
42
+ BranchPrefix: func() string {
43
+ user, err := user.Current()
44
+ if err != nil || user == nil || user.Username == "" {
45
+ log.ErrorLog.Printf("failed to get current user: %v", err)
46
+ return "session/"
47
+ }
48
+ return fmt.Sprintf("%s/", strings.ToLower(user.Username))
49
+ }(),
50
}
51
52
0 commit comments