bar: show ping icon when ai or booru finished responding

This commit is contained in:
end-4
2025-08-19 21:02:17 +07:00
parent 8d3a036b3b
commit 7cbc707308
6 changed files with 94 additions and 59 deletions
+3
View File
@@ -27,6 +27,8 @@ Singleton {
readonly property string interfaceRole: "interface"
readonly property string apiKeyEnvVarName: "API_KEY"
signal responseFinished()
property string systemPrompt: {
let prompt = Config.options?.ai?.systemPrompt ?? "";
for (let key in root.promptSubstitutions) {
@@ -628,6 +630,7 @@ Singleton {
root.postResponseHook = null; // Reset hook after use
}
root.saveChat("lastSession")
root.responseFinished()
}
function makeRequest() {
+2
View File
@@ -14,6 +14,7 @@ Singleton {
property Component booruResponseDataComponent: BooruResponseData {}
signal tagSuggestion(string query, var suggestions)
signal responseFinished()
property string failMessage: Translation.tr("That didn't work. Tips:\n- Check your tags and NSFW settings\n- If you don't have a tag in mind, type a page number")
property var responses: []
@@ -399,6 +400,7 @@ Singleton {
else if (xhr.readyState === XMLHttpRequest.DONE) {
console.log("[Booru] Request failed with status: " + xhr.status)
}
root.responseFinished()
}
try {