Example #1
0
        static void OnSessionEvent(InteractiveSessionEvent evnt)
        {
            string status;

            switch (evnt.Kind)
            {
            case InteractiveSessionEventKind.Evaluation:
                OnCodeCellEvent((ICodeCellEvent)evnt.Data);
                return;

            case InteractiveSessionEventKind.ConnectingToAgent:
                status = "Connecting to agent…";
                break;

            case InteractiveSessionEventKind.InitializingWorkspace:
                status = "Initializing workspace…";
                break;

            case InteractiveSessionEventKind.Ready:
                status = string.Empty.PadLeft(BufferWidth);
                break;

            default:
                return;
            }

            ForegroundColor = ConsoleColor.Cyan;
            Write($"{status}\r");
        }
Example #2
0
        static void OnSessionEvent(InteractiveSessionEvent evnt)
        {
            switch (evnt.Kind)
            {
            case InteractiveSessionEventKind.Evaluation:
                OnCodeCellEvent((ICodeCellEvent)evnt.Data);
                break;

            default:
                ForegroundColor = ConsoleColor.Cyan;
                WriteLine(evnt.Kind);
                ResetColor();
                break;
            }
        }