MCPcopy
hub / github.com/wavetermdev/waveterm / DeleteSubBlockCommand

Method DeleteSubBlockCommand

pkg/wshrpc/wshserver/wshserver.go:463–472  ·  view source on GitHub ↗
(ctx context.Context, data wshrpc.CommandDeleteBlockData)

Source from the content-addressed store, hash-verified

461}
462
463func (ws *WshServer) DeleteSubBlockCommand(ctx context.Context, data wshrpc.CommandDeleteBlockData) error {
464 if data.BlockId == "" {
465 return fmt.Errorf("blockid is required")
466 }
467 err := wcore.DeleteBlock(ctx, data.BlockId, false)
468 if err != nil {
469 return fmt.Errorf("error deleting block: %w", err)
470 }
471 return nil
472}
473
474func (ws *WshServer) DeleteBlockCommand(ctx context.Context, data wshrpc.CommandDeleteBlockData) error {
475 if data.BlockId == "" {

Callers

nothing calls this directly

Calls 1

DeleteBlockFunction · 0.92

Tested by

no test coverage detected