imported all fixes from main. fixes #55
This commit is contained in:
parent
83f570feaa
commit
e09a25b4ef
6 changed files with 151 additions and 66 deletions
72
CHANGELOG.md
72
CHANGELOG.md
|
|
@ -1,49 +1,81 @@
|
|||
#  ThunderAI Release Notes
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Version 1.1.0 - ??/??/2024</h2>
|
||||
<ul>
|
||||
<li>A prompt can be configured to request additional text from the user.</li>
|
||||
<li>Added custom prompts. See more info <a href="https://micz.it/thunderdbird-addon-thunderai/custom-prompts/">here</a>.</li>
|
||||
<li>Dark mode added.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.10 - 17/05/2024</h2>
|
||||
<ul>
|
||||
<li>Now using the new URL chatgpt.com.</li>
|
||||
<li>More improvements in handling the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.9 - 16/05/2024</h2>
|
||||
<ul>
|
||||
<li>Improved handling of different versions of the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.8 - 15/05/2024</h2>
|
||||
<ul>
|
||||
<li>Fixed changes in the ChatGPT web interface, see <a href="https://github.com/micz/ThunderAI/issues/57">#57</a> and <a href="https://github.com/micz/ThunderAI/issues/62">#62</a>.</li>
|
||||
<li>Correctly handling the model ChatGPT-4o.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.7 - 09/05/2024</h2>
|
||||
<ul>
|
||||
<li>Improved the reply prompt to exclude comments and other text beside the mail text.</li>
|
||||
<li>Correctly keeping the signature in a reply even if it's above the quoted email [<a href="https://github.com/micz/ThunderAI/issues/45">#45</a>].</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.6 - 08/05/2024</h2>
|
||||
<ul>
|
||||
<li>Correctly handling a change in the ChatGPT web interface. See issue <a href="https://github.com/micz/ThunderAI/issues/43">#43</a></li>
|
||||
<li>Added a button to force the completion to display the 'Use last answer' button if ChatGPT has finished its work but the button has not appeared.</li>
|
||||
<li>Correctly handling a change in the ChatGPT web interface [<a href="https://github.com/micz/ThunderAI/issues/43">#43</a>].</li>
|
||||
<li>Added a button to force the completion to display the 'Use last answer' button if ChatGPT has finished its work but the button has not appeared.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.5 - 03/05/2024</h2>
|
||||
<ul>
|
||||
<li>Fixed the handling of ChatGPT-4 in a large window. See issue <a href="https://github.com/micz/ThunderAI/issues/38">#38</a></li>
|
||||
<li>Fixed the handling of ChatGPT-4 in a large window [<a href="https://github.com/micz/ThunderAI/issues/38">#38</a>].</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.4 - 01/05/2024</h2>
|
||||
<ul>
|
||||
<li>Stripping the quotation marks from the response.</li>
|
||||
<li>Now it is possible to undo text modifications implemented by ChatGPT (CTRL+Z on Windows). See issue <a href="https://github.com/micz/ThunderAI/issues/34">#34</a></li>
|
||||
<li>Now closing the compose window after unsaved text modifications implemented by ChatGPT triggers the usual warning message. See issue <a href="https://github.com/micz/ThunderAI/issues/30">#30</a></li>
|
||||
<li>Updated the "Important Information" section on the options page, as it is no longer possible to disable the ChatGPT chat history.</li>
|
||||
<li>Stripping the quotation marks from the response.</li>
|
||||
<li>Now it is possible to undo text modifications implemented by ChatGPT (CTRL+Z on Windows) [<a href="https://github.com/micz/ThunderAI/issues/34">#34</a>].</li>
|
||||
<li>Now closing the compose window after unsaved text modifications implemented by ChatGPT triggers the usual warning message [<a href="https://github.com/micz/ThunderAI/issues/30">#30</a>].</li>
|
||||
<li>Updated the "Important Information" section on the options page, as it is no longer possible to disable the ChatGPT chat history.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.3 - 27/04/2024</h2>
|
||||
<ul>
|
||||
<li>Using the right identity when replying to a message. See issue <a href="https://github.com/micz/ThunderAI/issues/31">#31</a></li>
|
||||
<li>Using the right identity when replying to a message [<a href="https://github.com/micz/ThunderAI/issues/31">#31</a>].</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.2 - 18/04/2024</h2>
|
||||
<ul>
|
||||
<li>New standard menus.</li>
|
||||
<li>Fixed a bug in importing replies text.</li>
|
||||
<li>Fixed the handling of the new change model button in the ChatGPT interface.</li>
|
||||
<li>Added an option to choose between GPT-3.5 and GPT-4 Models. See issue <a href="https://github.com/micz/ThunderAI/issues/27">#27</a></li>
|
||||
<li>Added a link to the <a href="https://micz.it/thunderdbird-addon-thunderai/status/">Status Page</a>, to check if there are known issues in interacting with the ChatGPT web interface.</li>
|
||||
<li>New standard menus.</li>
|
||||
<li>Fixed a bug in importing replies text.</li>
|
||||
<li>Fixed the handling of the new change model button in the ChatGPT interface.</li>
|
||||
<li>Added an option to choose between GPT-3.5 and GPT-4 Models [<a href="https://github.com/micz/ThunderAI/issues/27">#27</a>].</li>
|
||||
<li>Added a link to the <a href="https://micz.it/thunderdbird-addon-thunderai/status/">Status Page</a>, to check if there are known issues in interacting with the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.1 - 13/04/2024</h2>
|
||||
<ul>
|
||||
<li>Italian addon description fixed.</li>
|
||||
<li>Improved the method to open the ChatGPT window. Thanks to <a href="https://github.com/jobisoft">John Bieling</a>.</li>
|
||||
<li>Fixed a bug in replying to a message. Now the quoted text is correctly displayed.</li>
|
||||
<li>Fixed a bug in the compose window. Now is correctly used only the selected text.</li>
|
||||
<li>If the prompt is more than 30.000 characters, do not proceed and give a message to the user.</li>
|
||||
<li>Italian addon description fixed.</li>
|
||||
<li>Improved the method to open the ChatGPT window. Thanks to <a href="https://github.com/jobisoft">John Bieling</a>.</li>
|
||||
<li>Fixed a bug in replying to a message. Now the quoted text is correctly displayed.</li>
|
||||
<li>Fixed a bug in the compose window. Now is correctly used only the selected text.</li>
|
||||
<li>If the prompt is more than 30.000 characters, do not proceed and give a message to the user.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0 - 05/04/2024</h2>
|
||||
<ul>
|
||||
<li>First release.</li>
|
||||
</ul>
|
||||
<li>First release.</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
#  ThunderAI
|
||||
|
||||
> [!IMPORTANT]
|
||||
> ## Custom Prompts are coming!
|
||||
>
|
||||
> Try this new feature in the [new pre-release version](https://github.com/micz/ThunderAI/releases/tag/v1.1.0pre3).
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
ThunderAI is a Thunderbird Addon that uses the capabilities of ChatGPT to enhance email management.
|
||||
|
||||
It enables users to analyze, write, correct, and optimize their emails, facilitating more effective and professional communication.
|
||||
|
|
|
|||
|
|
@ -107,8 +107,7 @@ async function chatgpt_getFromDOM(pos) {
|
|||
);
|
||||
response = responseDivs[nthOfResponse - 1].textContent;
|
||||
}
|
||||
response = response.replace(/^ChatGPTChatGPT/, ''); // strip sender name
|
||||
response = response.replace(/^ChatGPT/, ''); // strip sender name
|
||||
response = response.replace(/^ChatGPT(?:ChatGPT)?/, ''); // strip sender name
|
||||
response = response.trim().replace(/^"|"$/g, ''); // strip quotation marks
|
||||
//console.log('chatgpt_getFromDOM: ' + response);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Some original methods are a modified version derived from https://github.com/ali-raheem/Aify/blob/13ff87583bc520fb80f555ab90a90c5c9df797a7/plugin/content_scripts/compose.js
|
||||
// Some methods are a modified version derived from https://github.com/ali-raheem/Aify/blob/13ff87583bc520fb80f555ab90a90c5c9df797a7/plugin/content_scripts/compose.js
|
||||
|
||||
const makeParagraphs = (text, func) => {
|
||||
const chunks = text.split(/\n{2,}/);
|
||||
|
|
|
|||
|
|
@ -93,15 +93,31 @@ export async function replaceBody(tabId, text){
|
|||
const insertText = function (text, fullBody_string) {
|
||||
const parser = new DOMParser();
|
||||
let fullBody = parser.parseFromString(fullBody_string, "text/html");
|
||||
const prefix = fullBody.getElementsByClassName("moz-cite-prefix");
|
||||
if (prefix.length > 0) {
|
||||
const divider = prefix[0];
|
||||
let sibling = divider.previousSibling;
|
||||
|
||||
// looking for the first quoted mail or the signature, which come first in case of "signature above the quote".
|
||||
const prefix_quote = fullBody.getElementsByClassName("moz-cite-prefix");
|
||||
const prefix_sign = fullBody.getElementsByClassName("moz-signature");
|
||||
|
||||
let firstElement = null;
|
||||
if (prefix_quote.length > 0 && prefix_sign.length > 0) {
|
||||
firstElement = prefix_quote[0].compareDocumentPosition(prefix_sign[0]) & Node.DOCUMENT_POSITION_FOLLOWING ? prefix_quote[0] : prefix_sign[0];
|
||||
//console.log('>>>>>>>>>>>>>>> quote and signature found: ' + JSON.stringify(firstElement.innerHTML))
|
||||
//console.log('>>>>>>>>>>>>>>> DocPosition: ' + prefix_quote[0].compareDocumentPosition(prefix_sign[0]))
|
||||
} else if (prefix_quote.length > 0) {
|
||||
firstElement = prefix_quote[0];
|
||||
//console.log('>>>>>>>>>>>>>>> quote found')
|
||||
} else if (prefix_sign.length > 0) {
|
||||
firstElement = prefix_sign[0];
|
||||
//console.log('>>>>>>>>>>>>>>> signature found')
|
||||
}
|
||||
if (firstElement) {
|
||||
let sibling = firstElement.previousSibling;
|
||||
while (sibling) {
|
||||
fullBody.body.removeChild(sibling);
|
||||
sibling = divider.previousSibling;
|
||||
sibling = firstElement.previousSibling;
|
||||
}
|
||||
}
|
||||
|
||||
let final_p = document.createElement("p");
|
||||
final_p.innerHTML = "<p><br/><br/></p>";
|
||||
fullBody.body.insertBefore(final_p, fullBody.body.firstChild);
|
||||
|
|
|
|||
|
|
@ -15,46 +15,76 @@
|
|||
<li>Added some error messages to handle potential changes in the ChatGPT web interface.</li>
|
||||
<li>German translation added.</li>
|
||||
</ul>
|
||||
<h2>Version 1.0.6 - 08/05/2024</h2>
|
||||
<ul>
|
||||
<li>Correctly handling a change in the ChatGPT web interface. See issue <a href="https://github.com/micz/ThunderAI/issues/43">#43</a></li>
|
||||
<li>Added a button to force the completion to display the 'Use last answer' button if ChatGPT has finished its work but the button has not appeared.</li>
|
||||
</ul>
|
||||
<h2>Version 1.0.5 - 03/05/2024</h2>
|
||||
<ul>
|
||||
<li>Fixed the handling of ChatGPT-4 in a large window. See issue <a href="https://github.com/micz/ThunderAI/issues/38">#38</a></li>
|
||||
</ul>
|
||||
<h2>Version 1.0.4 - 01/05/2024</h2>
|
||||
<ul>
|
||||
|
||||
<h2>Version 1.0.10 - 17/05/2024</h2>
|
||||
<ul>
|
||||
<li>Now using the new URL chatgpt.com.</li>
|
||||
<li>More improvements in handling the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.9 - 16/05/2024</h2>
|
||||
<ul>
|
||||
<li>Improved handling of different versions of the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.8 - 15/05/2024</h2>
|
||||
<ul>
|
||||
<li>Fixed changes in the ChatGPT web interface, see <a href="https://github.com/micz/ThunderAI/issues/57">#57</a> and <a href="https://github.com/micz/ThunderAI/issues/62">#62</a>.</li>
|
||||
<li>Correctly handling the model ChatGPT-4o.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.7 - 09/05/2024</h2>
|
||||
<ul>
|
||||
<li>Improved the reply prompt to exclude comments and other text beside the mail text.</li>
|
||||
<li>Correctly keeping the signature in a reply even if it's above the quoted email [<a href="https://github.com/micz/ThunderAI/issues/45">#45</a>].</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.6 - 08/05/2024</h2>
|
||||
<ul>
|
||||
<li>Correctly handling a change in the ChatGPT web interface [<a href="https://github.com/micz/ThunderAI/issues/43">#43</a>].</li>
|
||||
<li>Added a button to force the completion to display the 'Use last answer' button if ChatGPT has finished its work but the button has not appeared.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.5 - 03/05/2024</h2>
|
||||
<ul>
|
||||
<li>Fixed the handling of ChatGPT-4 in a large window [<a href="https://github.com/micz/ThunderAI/issues/38">#38</a>].</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.4 - 01/05/2024</h2>
|
||||
<ul>
|
||||
<li>Stripping the quotation marks from the response.</li>
|
||||
<li>Now it is possible to undo text modifications implemented by ChatGPT (CTRL+Z on Windows). See issue <a href="https://github.com/micz/ThunderAI/issues/34">#34</a></li>
|
||||
<li>Now closing the compose window after unsaved text modifications implemented by ChatGPT triggers the usual warning message. See issue <a href="https://github.com/micz/ThunderAI/issues/30">#30</a></li>
|
||||
<li>Now it is possible to undo text modifications implemented by ChatGPT (CTRL+Z on Windows) [<a href="https://github.com/micz/ThunderAI/issues/34">#34</a>].</li>
|
||||
<li>Now closing the compose window after unsaved text modifications implemented by ChatGPT triggers the usual warning message [<a href="https://github.com/micz/ThunderAI/issues/30">#30</a>].</li>
|
||||
<li>Updated the "Important Information" section on the options page, as it is no longer possible to disable the ChatGPT chat history.</li>
|
||||
</ul>
|
||||
<h2>Version 1.0.3 - 27/04/2024</h2>
|
||||
<ul>
|
||||
<li>Using the right identity when replying to a message. See issue <a href="https://github.com/micz/ThunderAI/issues/31">#31</a></li>
|
||||
</ul>
|
||||
<h2>Version 1.0.2 - 18/04/2024</h2>
|
||||
<ul>
|
||||
<li>New standard menus.</li>
|
||||
<li>Fixed a bug in importing replies text.</li>
|
||||
<li>Fixed the handling of the new change model button in the ChatGPT interface.</li>
|
||||
<li>Added an option to choose between GPT-3.5 and GPT-4 Models. See issue <a href="https://github.com/micz/ThunderAI/issues/27">#27</a></li>
|
||||
<li>Added a link to the <a href="https://micz.it/thunderdbird-addon-thunderai/status/">Status Page</a>, to check if there are known issues in interacting with the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
<h2>Version 1.0.1 - 13/04/2024</h2>
|
||||
<ul>
|
||||
<li>Italian addon description fixed.</li>
|
||||
<li>Improved the method to open the ChatGPT window. Thanks to <a href="https://github.com/jobisoft">John Bieling</a>.</li>
|
||||
<li>Fixed a bug in replying to a message. Now the quoted text is correctly displayed.</li>
|
||||
<li>Fixed a bug in the compose window. Now is correctly used only the selected text.</li>
|
||||
<li>If the prompt is more than 30.000 characters, do not proceed and give a message to the user.</li>
|
||||
</ul>
|
||||
<h2>Version 1.0 - 05/04/2024</h2>
|
||||
<ul>
|
||||
<li>First release.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.3 - 27/04/2024</h2>
|
||||
<ul>
|
||||
<li>Using the right identity when replying to a message [<a href="https://github.com/micz/ThunderAI/issues/31">#31</a>].</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.2 - 18/04/2024</h2>
|
||||
<ul>
|
||||
<li>New standard menus.</li>
|
||||
<li>Fixed a bug in importing replies text.</li>
|
||||
<li>Fixed the handling of the new change model button in the ChatGPT interface.</li>
|
||||
<li>Added an option to choose between GPT-3.5 and GPT-4 Models [<a href="https://github.com/micz/ThunderAI/issues/27">#27</a>].</li>
|
||||
<li>Added a link to the <a href="https://micz.it/thunderdbird-addon-thunderai/status/">Status Page</a>, to check if there are known issues in interacting with the ChatGPT web interface.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.1 - 13/04/2024</h2>
|
||||
<ul>
|
||||
<li>Italian addon description fixed.</li>
|
||||
<li>Improved the method to open the ChatGPT window. Thanks to <a href="https://github.com/jobisoft">John Bieling</a>.</li>
|
||||
<li>Fixed a bug in replying to a message. Now the quoted text is correctly displayed.</li>
|
||||
<li>Fixed a bug in the compose window. Now is correctly used only the selected text.</li>
|
||||
<li>If the prompt is more than 30.000 characters, do not proceed and give a message to the user.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0 - 05/04/2024</h2>
|
||||
<ul>
|
||||
<li>First release.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script src="mzta-release-notes.js"></script>
|
||||
<script src="../js/mzta-i18n.js"></script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue