mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
9 lines
371 B
TypeScript
9 lines
371 B
TypeScript
import { Context, Effect, Tracer } from "effect"
|
|
|
|
// ParentSpan is optional, so removing it never takes away a requirement of the effect.
|
|
export const withoutParentSpan = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
|
effect.pipe(
|
|
Effect.updateContext(
|
|
(context: Context.Context<R>) => Context.omit(Tracer.ParentSpan)(context) as Context.Context<R>,
|
|
),
|
|
)
|