From 0f1e9e6008c5a4faf603603fa2aa54846ce9f2e4 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 26 Mar 2024 00:13:57 +0530 Subject: [PATCH] chat: Added password input field for api_key input --- MAVProxy/modules/mavproxy_chat/chat_window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAVProxy/modules/mavproxy_chat/chat_window.py b/MAVProxy/modules/mavproxy_chat/chat_window.py index 23e273bbef..45e0d1b9d7 100644 --- a/MAVProxy/modules/mavproxy_chat/chat_window.py +++ b/MAVProxy/modules/mavproxy_chat/chat_window.py @@ -38,7 +38,8 @@ def __init__(self, mpstate, wait_for_command_ack_fn): # add api key input window self.apikey_frame = wx.Frame(None, title="Input OpenAI API Key", size=(560, 50)) - self.apikey_text_input = wx.TextCtrl(self.apikey_frame, id=-1, pos=(10, 10), size=(450, -1), style=wx.TE_PROCESS_ENTER) + self.apikey_text_input = wx.TextCtrl(self.apikey_frame, id=-1, pos=(10, 10), size=(450, -1), + style=wx.TE_PASSWORD | wx.TE_PROCESS_ENTER) self.apikey_set_button = wx.Button(self.apikey_frame, id=-1, label="Set", pos=(470, 10), size=(75, 25)) self.apikey_frame.Bind(wx.EVT_BUTTON, self.apikey_set_button_click, self.apikey_set_button) self.apikey_frame.Bind(wx.EVT_TEXT_ENTER, self.apikey_set_button_click, self.apikey_text_input)