(ctx context.Context, logBlockId string)
| 581 | } |
| 582 | |
| 583 | func termCtxWithLogBlockId(ctx context.Context, logBlockId string) context.Context { |
| 584 | if logBlockId == "" { |
| 585 | return ctx |
| 586 | } |
| 587 | block, err := wstore.DBMustGet[*waveobj.Block](ctx, logBlockId) |
| 588 | if err != nil { |
| 589 | return ctx |
| 590 | } |
| 591 | connDebug := block.Meta.GetString(waveobj.MetaKey_TermConnDebug, "") |
| 592 | if connDebug == "" { |
| 593 | return ctx |
| 594 | } |
| 595 | return blocklogger.ContextWithLogBlockId(ctx, logBlockId, connDebug == "debug") |
| 596 | } |
| 597 | |
| 598 | func (ws *WshServer) ConnEnsureCommand(ctx context.Context, data wshrpc.ConnExtData) error { |
| 599 | ctx = genconn.ContextWithConnData(ctx, data.LogBlockId) |
no test coverage detected