MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / WorkspaceListCommand

Method WorkspaceListCommand

pkg/wshrpc/wshserver/wshserver.go:947–964  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

945}
946
947func (ws *WshServer) WorkspaceListCommand(ctx context.Context) ([]wshrpc.WorkspaceInfoData, error) {
948 workspaceList, err := wcore.ListWorkspaces(ctx)
949 if err != nil {
950 return nil, fmt.Errorf("error listing workspaces: %w", err)
951 }
952 var rtn []wshrpc.WorkspaceInfoData
953 for _, workspaceEntry := range workspaceList {
954 workspaceData, err := wcore.GetWorkspace(ctx, workspaceEntry.WorkspaceId)
955 if err != nil {
956 return nil, fmt.Errorf("error getting workspace: %w", err)
957 }
958 rtn = append(rtn, wshrpc.WorkspaceInfoData{
959 WindowId: workspaceEntry.WindowId,
960 WorkspaceData: workspaceData,
961 })
962 }
963 return rtn, nil
964}
965
966func (ws *WshServer) ListAllAppsCommand(ctx context.Context) ([]wshrpc.AppInfo, error) {
967 return waveappstore.ListAllApps()

Callers

nothing calls this directly

Calls 2

ListWorkspacesFunction · 0.92
GetWorkspaceFunction · 0.92

Tested by

no test coverage detected