MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / profileConnectionInput

Function profileConnectionInput

apps/cli/src/main.ts:2249–2264  ·  view source on GitHub ↗
(input: {
  readonly origin: string;
  readonly displayName: Option.Option<string>;
  readonly kind: Option.Option<"http" | "desktop-sidecar">;
  readonly headerEnv: Option.Option<Record<string, string>>;
})

Source from the content-addressed store, hash-verified

2247};
2248
2249const profileConnectionInput = (input: {
2250 readonly origin: string;
2251 readonly displayName: Option.Option<string>;
2252 readonly kind: Option.Option<"http" | "desktop-sidecar">;
2253 readonly headerEnv: Option.Option<Record<string, string>>;
2254}): ExecutorServerConnectionInput => {
2255 const selectedKind = Option.getOrUndefined(input.kind);
2256 const displayName = Option.getOrUndefined(input.displayName);
2257 const headers = parseHeaderEnvOption(input.headerEnv);
2258 return {
2259 kind: selectedKind ?? "http",
2260 origin: input.origin,
2261 ...(displayName ? { displayName } : {}),
2262 ...(headers ? { headers } : {}),
2263 };
2264};
2265
2266const printServerProfiles = () =>
2267 Effect.gen(function* () {

Callers 1

main.tsFile · 0.85

Calls 1

parseHeaderEnvOptionFunction · 0.85

Tested by

no test coverage detected