| 1 | package workbench |
| 2 | |
| 3 | import _ "embed" |
| 4 | |
| 5 | |
| 6 | var mobileCLIIdentity string |
| 7 | |
| 8 | |
| 9 | func mobileIdentityCommand(prefix, args []string) []string { |
| 10 | if len(prefix) == 5 && prefix[0] == "env" && prefix[2] == "/usr/local/bin/cage-claude-account" && prefix[3] == "run" { |
| 11 | command := []string{prefix[0], prefix[1], "python3", "-I", "-c", mobileCLIIdentity, "official", prefix[2], prefix[4]} |
| 12 | return append(command, args...) |
| 13 | } |
| 14 | if len(prefix) == 1 && prefix[0] == "claude" || len(prefix) == 2 && prefix[0] == "ccs" { |
| 15 | command := []string{"python3", "-I", "-c", mobileCLIIdentity, prefix[0]} |
| 16 | if prefix[0] == "ccs" { |
| 17 | command = append(command, prefix[1]) |
| 18 | } |
| 19 | return append(command, args...) |
| 20 | } |
| 21 | return append(append([]string(nil), prefix...), args...) |
| 22 | } |