MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeGroup

Function encodeGroup

packages/effect/src/ui/MessageLog.ts:1875–1883  ·  view source on GitHub ↗
(command: Command.Command<any, any>)

Source from the content-addressed store, hash-verified

1873
1874// The scheduling key holds the group fields' real encoding, so the log re-encodes them redacted.
1875const encodeGroup = (command: Command.Command<any, any>): string | null => {
1876 if (command.groupKey === undefined) return null
1877 const source = (command as { readonly "~group"?: Command.GroupSource | undefined })[
1878 "~group"
1879 ]
1880 return source === undefined
1881 ? JSON.stringify({ "~redacted": true })
1882 : canonical(encodeArgs(source.schema, source.picked))
1883}
1884
1885/**
1886 * Encodes a `$.send` as the provider's name and the message. The

Callers 1

encodeCommandFunction · 0.85

Calls 2

canonicalFunction · 0.90
encodeArgsFunction · 0.85

Tested by

no test coverage detected