using System;
using System.Threading.Tasks;
using AIRuntime.Runtime.Services.Agent;
using UnityEditor;
using UnityEngine;

namespace AIRuntime.Examples
{
    public static class OfflineExample
    {
        [MenuItem("Window/AIRuntime/Examples/Run Offline Tool Loop")]
        public static async void RunMenu()
        {
            try { await RunAsync(); }
            catch (Exception exception) { Debug.LogException(exception); }
        }
        public static Task<AgentRunResult> RunAsync() => Runtime.Examples.OfflineToolLoop.RunAsync();
    }
}
