hunk.code_window: package com.appsmith.server.services;
   import com.appsmith.server.repositories.ConfigRepository;
  
hunk.labels: keep add keep
hunk.after_edit: import com.appsmith.server.repositories.ApplicationRepository;
  
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConfigServiceImpl.java
hunk.type: add
file: import { entityDefinitions } from "@appsmith/utils/autocomplete/EntityDefinitions";
  import type { DataTree } from "entities/DataTree/dataTreeFactory";
  import type { ActionEntity } from "entities/DataTree/types";
  
  export const getActionChildrenPeekData = (
    actionName: string,
    dataTree: DataTree,
  ) => {
    const dataTreeAction = dataTree[actionName] as ActionEntity;
    if (dataTreeAction) {
      const definitions = entityDefinitions.ACTION(dataTreeAction, {});
      const peekData: Record<string, unknown> = {};
      Object.keys(definitions).forEach((key) => {
        if (key.indexOf("!") === -1) {
          if (key === "data" || key === "isLoading" || key === "responseMeta") {
            peekData[key] = dataTreeAction[key];
          } else if (key === "run" || key === "clear") {
            // eslint-disable-next-line @typescript-eslint/no-empty-function
            peekData[key] = function () {}; // tern inference required here
          }
        }
      });
  
      return { peekData };
    }
  };
  