| 16 | const defaultLLMStreamIdleTimeout = 3 * time.Minute |
| 17 | |
| 18 | type streamIdleTimeoutContextKey struct{} |
| 19 | |
| 20 | func ContextWithStreamIdleTimeout(ctx context.Context, timeout time.Duration) context.Context { |
| 21 | if timeout <= 0 { |
| 22 | return ctx |
| 23 | } |
| 24 | return context.WithValue(ctx, streamIdleTimeoutContextKey{}, timeout) |
nothing calls this directly
no outgoing calls
no test coverage detected