forked from Shinonome/dots-hyprland
bar: show ping icon when ai or booru finished responding
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user