MCPcopy Create free account
hub / github.com/anomalyco/opencode / audienceFlags

Function audienceFlags

packages/opencode/src/acp/content.ts:247–251  ·  view source on GitHub ↗
(audience: readonly Role[] | null | undefined)

Source from the content-addressed store, hash-verified

245}
246
247function audienceFlags(audience: readonly Role[] | null | undefined) {
248 if (audience?.length === 1 && audience[0] === "assistant") return { synthetic: true }
249 if (audience?.length === 1 && audience[0] === "user") return { ignored: true }
250 return {}
251}
252
253function partAudience(part: Extract<ReplayPart, { type: "text" }>) {
254 const audience: Role[] | undefined = part.synthetic ? ["assistant"] : part.ignored ? ["user"] : undefined

Callers 1

contentBlockToPartsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected