MCPcopy Create free account
hub / github.com/arctic-cli/interface / suggestConnectionName

Function suggestConnectionName

packages/arctic/src/auth/index.ts:122–138  ·  view source on GitHub ↗
(info: Info)

Source from the content-addressed store, hash-verified

120 }
121
122 export function suggestConnectionName(info: Info): string | undefined {
123 if (info.type === "codex" && info.email) {
124 const domain = info.email.split("@")[1]
125 if (domain) {
126 const name = domain.split(".")[0]
127 return name
128 }
129 }
130 if (info.type === "oauth" && "email" in info && typeof info.email === "string") {
131 const domain = info.email.split("@")[1]
132 if (domain) {
133 const name = domain.split(".")[0]
134 return name
135 }
136 }
137 return undefined
138 }
139
140 async function readLocalAuth(): Promise<Record<string, Info>> {
141 const file = Bun.file(filepath)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected