(ctx context.Context, blockId string)
| 804 | } |
| 805 | |
| 806 | func (ws *WshServer) BlockInfoCommand(ctx context.Context, blockId string) (*wshrpc.BlockInfoData, error) { |
| 807 | blockData, err := wstore.DBMustGet[*waveobj.Block](ctx, blockId) |
| 808 | if err != nil { |
| 809 | return nil, fmt.Errorf("error getting block: %w", err) |
| 810 | } |
| 811 | tabId, err := wstore.DBFindTabForBlockId(ctx, blockId) |
| 812 | if err != nil { |
| 813 | return nil, fmt.Errorf("error finding tab for block: %w", err) |
| 814 | } |
| 815 | workspaceId, err := wstore.DBFindWorkspaceForTabId(ctx, tabId) |
| 816 | if err != nil { |
| 817 | return nil, fmt.Errorf("error finding window for tab: %w", err) |
| 818 | } |
| 819 | fileList, err := filestore.WFS.ListFiles(ctx, blockId) |
| 820 | if err != nil { |
| 821 | return nil, fmt.Errorf("error listing blockfiles: %w", err) |
| 822 | } |
| 823 | var fileInfoList []*wshrpc.WaveFileInfo |
| 824 | for _, wf := range fileList { |
| 825 | fileInfoList = append(fileInfoList, waveFileToWaveFileInfo(wf)) |
| 826 | } |
| 827 | return &wshrpc.BlockInfoData{ |
| 828 | BlockId: blockId, |
| 829 | TabId: tabId, |
| 830 | WorkspaceId: workspaceId, |
| 831 | Block: blockData, |
| 832 | Files: fileInfoList, |
| 833 | }, nil |
| 834 | } |
| 835 | |
| 836 | func (ws *WshServer) DebugTermCommand(ctx context.Context, data wshrpc.CommandDebugTermData) (*wshrpc.CommandDebugTermRtnData, error) { |
| 837 | if data.BlockId == "" { |
nothing calls this directly
no test coverage detected