From 043e731005278649dbdf1d5866c6e3c7719f1202 Mon Sep 17 00:00:00 2001 From: gptlang Date: Fri, 9 Feb 2024 20:05:50 +0000 Subject: [PATCH] feat: Environment variables for proxy (HTTPS_PROXY and ALL_PROXY) --- rplugin/python3/handlers/chat_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rplugin/python3/handlers/chat_handler.py b/rplugin/python3/handlers/chat_handler.py index d585bddd..e81cb2d8 100644 --- a/rplugin/python3/handlers/chat_handler.py +++ b/rplugin/python3/handlers/chat_handler.py @@ -1,6 +1,7 @@ import time from datetime import datetime from typing import Optional, cast +import os import prompts as system_prompts from copilot import Copilot @@ -24,7 +25,7 @@ def __init__(self, nvim: MyNvim, buffer: MyBuffer): self.nvim: MyNvim = nvim self.copilot: Copilot = None self.buffer: MyBuffer = buffer - self.proxy: str = None + self.proxy: str = os.getenv("HTTPS_PROXY") or os.getenv("ALL_PROXY") or "" # public