@@ -20,27 +20,27 @@ func TestGetProjectName(t *testing.T) {
2020 }{
2121 {"simple name" , "my-project" , "my_project" },
2222 {"encoded path with code" ,
23- "-Users-wesm -code-my-app" , "my_app" },
23+ "-Users-alice -code-my-app" , "my_app" },
2424 {"encoded path with projects" ,
25- "-Users-wesm -projects-api-server" , "api_server" },
25+ "-Users-alice -projects-api-server" , "api_server" },
2626 {"encoded path with repos" ,
2727 "-home-user-repos-frontend" , "frontend" },
2828 {"encoded path without marker" ,
29- "-Users-wesm " , "wesm " },
29+ "-Users-alice " , "alice " },
3030 {"empty" , "" , "" },
3131 {"no prefix" , "plain_name" , "plain_name" },
3232 {"with src marker" ,
33- "-Users-wesm -src-my-lib" , "my_lib" },
33+ "-Users-alice -src-my-lib" , "my_lib" },
3434 {"multi-word after marker" ,
35- "-Users-wesm -code-my-cool-project" , "my_cool_project" },
35+ "-Users-alice -code-my-cool-project" , "my_cool_project" },
3636 {"deeply nested" ,
37- "-Users-wesm -code-org-team-repo" , "org_team_repo" },
37+ "-Users-alice -code-org-team-repo" , "org_team_repo" },
3838 {"unicode components" ,
39- "-Users-wesm -code-café-app" , "café_app" },
39+ "-Users-alice -code-café-app" , "café_app" },
4040 {"trailing dash" ,
41- "-Users-wesm -code-myapp-" , "myapp_" },
41+ "-Users-alice -code-myapp-" , "myapp_" },
4242 {"double dashes" ,
43- "-Users-wesm -code--my-app" , "_my_app" },
43+ "-Users-alice -code--my-app" , "_my_app" },
4444 }
4545
4646 for _ , tt := range tests {
@@ -59,7 +59,7 @@ func TestExtractProjectFromCwd(t *testing.T) {
5959 cwd string
6060 want string
6161 }{
62- {"/Users/wesm /code/my-app" , "my_app" },
62+ {"/Users/alice /code/my-app" , "my_app" },
6363 {"/home/user/projects/api-server" , "api_server" },
6464 {"" , "" },
6565 {"/" , "" },
@@ -99,7 +99,7 @@ func TestNeedsProjectReparse(t *testing.T) {
9999 want bool
100100 }{
101101 {"my_project" , false },
102- {"_Users_wesm_code_app " , true },
102+ {"_Users_alice_code_app " , true },
103103 {"_home_user_project" , true },
104104 {"_private_var_folders" , true },
105105 {"good_project_var_folders_ok" , true },
@@ -580,7 +580,7 @@ func TestIsClaudeSystemMessage(t *testing.T) {
580580
581581func TestParseClaudeSession (t * testing.T ) {
582582 validContent := testjsonl .JoinJSONL (
583- testjsonl .ClaudeUserJSON ("Fix the login bug" , tsEarly , "/Users/wesm /code/my-app" ),
583+ testjsonl .ClaudeUserJSON ("Fix the login bug" , tsEarly , "/Users/alice /code/my-app" ),
584584 testjsonl .ClaudeAssistantJSON ([]map [string ]any {
585585 {"type" : "text" , "text" : "Looking at the auth module..." },
586586 {"type" : "tool_use" , "name" : "Read" , "input" : map [string ]string {"file_path" : "src/auth.ts" }},
@@ -842,7 +842,7 @@ func TestParseCodexSession(t *testing.T) {
842842 {
843843 name : "standard session" ,
844844 content : testjsonl .JoinJSONL (
845- testjsonl .CodexSessionMetaJSON ("abc-123" , "/Users/wesm /code/my-api" , "user" , tsEarly ),
845+ testjsonl .CodexSessionMetaJSON ("abc-123" , "/Users/alice /code/my-api" , "user" , tsEarly ),
846846 testjsonl .CodexMsgJSON ("user" , "Add rate limiting" , tsEarlyS1 ),
847847 testjsonl .CodexMsgJSON ("assistant" , "I'll add rate limiting to the API." , tsEarlyS5 ),
848848 ),
@@ -904,7 +904,7 @@ func TestParseCodexSession(t *testing.T) {
904904 {
905905 name : "function calls" ,
906906 content : testjsonl .JoinJSONL (
907- testjsonl .CodexSessionMetaJSON ("fc-1" , "/Users/wesm /code/app" , "user" , tsEarly ),
907+ testjsonl .CodexSessionMetaJSON ("fc-1" , "/Users/alice /code/app" , "user" , tsEarly ),
908908 testjsonl .CodexMsgJSON ("user" , "Run the tests" , tsEarlyS1 ),
909909 testjsonl .CodexFunctionCallJSON ("shell_command" , "Running tests" , tsEarlyS5 ),
910910 testjsonl .CodexFunctionCallJSON ("apply_patch" , "Fixing typo" , tsLate ),
@@ -1025,7 +1025,7 @@ func TestParseCodexSession(t *testing.T) {
10251025 {
10261026 name : "second session_meta with unparsable cwd resets project" ,
10271027 content : testjsonl .JoinJSONL (
1028- testjsonl .CodexSessionMetaJSON ("multi" , "/Users/wesm /code/my-api" , "user" , tsEarly ),
1028+ testjsonl .CodexSessionMetaJSON ("multi" , "/Users/alice /code/my-api" , "user" , tsEarly ),
10291029 testjsonl .CodexMsgJSON ("user" , "hello" , tsEarlyS1 ),
10301030 testjsonl .CodexSessionMetaJSON ("multi" , "/" , "user" , "2024-01-01T10:00:02Z" ),
10311031 ),
@@ -1186,8 +1186,8 @@ func TestExtractCwdFromSession(t *testing.T) {
11861186 }{
11871187 {
11881188 "has cwd field" ,
1189- `{"type":"user","timestamp":"2024-01-01T00:00:00Z","message":{"content":"hi"},"cwd":"/Users/wesm /code/my-app"}` + "\n " ,
1190- "/Users/wesm /code/my-app" ,
1189+ `{"type":"user","timestamp":"2024-01-01T00:00:00Z","message":{"content":"hi"},"cwd":"/Users/alice /code/my-app"}` + "\n " ,
1190+ "/Users/alice /code/my-app" ,
11911191 },
11921192 {
11931193 "no cwd field" ,
0 commit comments