Yep I have planned better ChatGPT actions
For now you could replicate most of it if you know some HTML / JS and use the floating webview. Here is an example. It get's the clipboard content and then calls the following to make it upper case, then it displays the result in the webview.
let res = await chatGPTRequest(clipboardContent, "make everything that follows uppercase");
<html>
<style>
body {
background: white;
}
.lds-dual-ring {
display: inline-block;
width: 80px;
height: 80px;
}
.lds-dual-ring:after {
content: " ";
display: block;
width: 64px;
height: 64px;
margin: 8px;
border-radius: 50%;
border: 6px solid #fff;
border-color: #5e5b9f transparent #504691 transparent;
animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
<script>
async function chatGPTRequest(input, request) {
return await callBTT("callChatGPT", {
identifier: "test",
system: "you are a helpful assistant",
user: request,
input: input,
maxHistory: 0,
});
}
async function BTTInitialize() {
let selectedText = await callBTT("get_clipboard_content");
let res = await chatGPTRequest(selectedText, "make everything that follows uppercase");
document.getElementById("result").innerHTML = res;
document.getElementById("loader").style.display = "none";
}
</script>
<body>
<div
id="loader"
style="
width: 100%;
height: 100%;
display: flex;
align-items: center;
align-content: center;
justify-content: center;
"
>
<div class="lds-dual-ring"></div>
</div>
<div id="result"></div>
</body>
</html>