Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Add a "Hide all Chats" button

Open apollo-jhn opened this issue 2 years ago • 5 comments

I created this lame code to delete all of my conversations using Javascript, which I then put on my browser's developer console to run.

// Version 2.0
var xpath = "/html/body/div[1]/div/div/div[2]/div[1]/div/div[2]/div[1]/div[2]/div/div/div";
var elements = document.evaluate(xpath + '//a', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
var aTag_count = elements.snapshotLength;
console.log(aTag_count);

for (let i = 0; i < aTag_count; i++) {
    var DeleteConversation_button = document.evaluate(xpath + '//a[' + (i + 1) + ']/span/div/div/div/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

    if (DeleteConversation_button) {
        DeleteConversation_button.click();
    } else {
        console.log("Delete Conversation button not found.");
    }
}

setTimeout(function() {
    for (let i = 0; i < aTag_count; i++) {
        var Dialog_button = document.evaluate(xpath + '//a[' + (i + 1) + ']/span/div/div[2]/div/div[2]/div/section/footer/button[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
        if (Dialog_button) {
            Dialog_button.click();
        } else {
            console.log("Dialog button not found.");
        }
    }
}, 200); // 200 milisecond delay

But I'm suggesting having something like a "Hide all Conversations" button or checkboxes to select a particular conversation to be deleted, hidden, or opted out of. I know that opting out and deleting is a bad idea for the sake of training the model.

apollo-jhn avatar Jun 03 '23 04:06 apollo-jhn

I think a "Hide All Conversations" button could be nice, although low-priority as there are many web tasks on the board. I'm going to refine this issue a bit to reflect.

olliestanley avatar Jun 05 '23 16:06 olliestanley

I would love to work on this. If you are okay with that, please assign me

CertifiedJoon avatar Jun 06 '23 03:06 CertifiedJoon

@CertifiedJoon Sounds great, thanks!

olliestanley avatar Jun 06 '23 08:06 olliestanley

I would love to work on this. If you are okay with that, please assign me

Hi CertifiedJoon, I wanted to check in and see if you've been able to make any progress.

camsdixon1 avatar Jun 18 '23 12:06 camsdixon1

Hi CertifiedJoon, I wanted to check in and see if you've been able to make any progress.

Yup, i will be done after incorporating appropriate inference endpoint made by @olliestanley .

CertifiedJoon avatar Jun 18 '23 12:06 CertifiedJoon