hunk.code_window:         actionId: actionId,
         },
       });
       return;
     }
     if (actionObj.pluginType === QUERY_CONSTANT) {
       const params = getQueryParams();
       if (params.editName) {
         params.editName = "false";
       }
       const applicationId = yield select(getCurrentApplicationId);
       const pageId = yield select(getCurrentPageId);
       history.replace(
         QUERIES_EDITOR_ID_URL(applicationId, pageId, actionId, params),
       );
     }
   }
   function* handleNameChangeFailureSaga(
  
hunk.labels: keep keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep
hunk.file_path: app/client/src/sagas/QueryPaneSagas.ts
hunk.type: replace
file: type Tree = {
    children?: Tree[];
    [key: string]: any;
  };
  
  export const traverseTree = (tree: Tree, callback: (tree: Tree) => void) => {
    callback(tree);
    if (tree.children) {
      tree.children.forEach((b) => traverseTree(b, callback));
    }
  };
  
  export const mapTree = (tree: Tree, callback: (tree: Tree) => Tree) => {
    const mapped = callback(tree);
    if (tree.children && tree.children.length) {
      const children: Tree[] = tree.children.map((branch) =>
        mapTree(branch, callback),
      );
      return { ...mapped, children };
    }
    return { ...mapped };
  };
  