From 2195d03f98127eb27470575c4defb56729af77a5 Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 24 Apr 2025 01:32:00 +0200 Subject: [PATCH 01/42] Add ChatGPT Web project and custom GPT options with validation. see #277 and #168. --- _locales/en/messages.json | 24 +++++++++ options/mzta-options-default.js | 2 + options/mzta-options.css | 4 ++ options/mzta-options.html | 86 +++++++++++++++++++++------------ options/mzta-options.js | 8 +++ 5 files changed, 94 insertions(+), 30 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index defbf4da..b05a47cf 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1386,5 +1386,29 @@ "AccountSelector_Spamfilter": { "message": "Choose the accounts where the spam filter is enabled", "description": "" + }, + "prefs_OptionText_chatgpt_web_project": { + "message": "ChatGPT Web project", + "description": "" + }, + "prefs_OptionText_chatgpt_web_project_info": { + "message": "This is the project that will be enforced for the ChatGPT Web Interface.", + "description": "" + }, + "prefs_OptionText_chatgpt_web_custom_gpt": { + "message": "ChatGPT Web custom GPT", + "description": "" + }, + "prefs_OptionText_chatgpt_web_custom_gpt_info": { + "message": "This is the custom GPT that will be enforced for the ChatGPT Web Interface.", + "description": "" + }, + "prefs_OptionText_chatgpt_web_custom_data_info": { + "message": "This must be in the following form:", + "description": "" + }, + "prefs_OptionText_chatgpt_web_custom_data_info2": { + "message": "You can find the correct value in the browser URL field when you open the related ChatGPT page.", + "description": "" } } \ No newline at end of file diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index 501b0254..3f9fe33b 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -25,6 +25,8 @@ export const prefs_default = { connection_type: 'chatgpt_web', //Other values: 'chatgpt_api', 'ollama_api', 'openai_comp_api', 'google_gemini_api' chatgpt_web_model: '', chatgpt_web_tempchat: false, + chatgpt_web_project: '', + chatgpt_web_custom_gpt: '', chatgpt_api_key: '', chatgpt_model: '', chatgpt_developer_messages: '', diff --git a/options/mzta-options.css b/options/mzta-options.css index e556eee2..f30c0f42 100644 --- a/options/mzta-options.css +++ b/options/mzta-options.css @@ -74,6 +74,10 @@ span.dims_label{ display: inline-block; } +span.opt_title{ + font-weight: bold; +} + #btn_custom_prompts{ text-align: center; width: 100%; diff --git a/options/mzta-options.html b/options/mzta-options.html index 08d987b1..763b4efb 100644 --- a/options/mzta-options.html +++ b/options/mzta-options.html @@ -18,7 +18,7 @@ __MSG_hyprland_warning__ - __MSG_prefs_OptionText_chatgpt_win_text__ + __MSG_prefs_OptionText_chatgpt_win_text__