https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
"""View to provide autocomplete results."""
    @provide_session
    @expose("/dagmodel/autocomplete")
    def autocomplete(self, session: Session = NEW_SESSION):
        """Autocomplete."""
        query = unquote(request.args.get("query", ""))
        if not query:
            return flask.json.jsonify([])
        
        dag_ids_query = select(
            sqla.literal("dag").label("type"),
            DagModel.dag_id.label("name"),
        ).where(~DagModel.is_subdag, DagModel.is_active, DagModel.dag_id.ilike(f"%{query}%"))
        owners_query = (
            select(
                sqla.literal("owner").label("type"),
                DagModel.owners.label("name"),
            )
            .distinct()
            .where(~DagModel.is_subdag, DagModel.is_active, DagModel.owners.ilike(f"%{query}%"))
        )
        
        status = flask_session.get(FILTER_STATUS_COOKIE)
        if status == "active":