diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 0b8b4e50..e6b057cf 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -574,5 +574,13 @@ "prefs_OptionText_chatgpt_win_dims_info": { "message": "Set to 0 if you don't want to specify the window size.", "description": "" + }, + "prefs_OpenAIComp_API_Key": { + "message": "OpenAI Comp API Key", + "description": "" + }, + "Optional": { + "message": "Optional", + "description": "" } } \ No newline at end of file diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index 818bbb37..1f055670 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -28,6 +28,7 @@ export const prefs_default = { ollama_model: '', openai_comp_host: '', // For OpenAI Compatible API as LM-Studio openai_comp_model: '', + openai_comp_api_key: '', openai_comp_chat_name: 'OpenAI Comp', dynamic_menu_force_enter: false, dynamic_menu_order_alphabet: true, diff --git a/options/mzta-options.css b/options/mzta-options.css index 6f6b3553..d3bc9368 100644 --- a/options/mzta-options.css +++ b/options/mzta-options.css @@ -109,12 +109,12 @@ tr.conntype_openai_comp_api, tr.conntype_openai_comp_api2{ font-style: italic; } -.chatgpt_api_key-container { +.api_key-container { position: relative; width: 100%; } -.chatgpt_api_key-container input { +.api_key-container input { width: -moz-available; margin-right: 25px; } @@ -128,7 +128,7 @@ input.option-input[type="text"]{ width: -moz-available; } -.chatgpt_api_key-container .toggle-icon { +.api_key-container .toggle-icon { position: absolute; right: 0px; top: 50%; @@ -173,4 +173,8 @@ input.option-input[type="text"]{ background-color: rgb(89, 20, 129); } + .api_key-container .toggle-icon img { + filter: invert(1); + } + } \ No newline at end of file diff --git a/options/mzta-options.html b/options/mzta-options.html index 15cfba74..c6db2fff 100644 --- a/options/mzta-options.html +++ b/options/mzta-options.html @@ -104,11 +104,11 @@ __MSG_prefs_ChatGPT_API_Key__ -
+
- +
@@ -162,6 +162,20 @@ + + + +
+ + +
+ +