Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notate revision/resubmitted number #99

Open
skaviouz opened this issue Apr 1, 2023 · 3 comments
Open

Notate revision/resubmitted number #99

skaviouz opened this issue Apr 1, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@skaviouz
Copy link

skaviouz commented Apr 1, 2023

In ChatGPT, you can edit and resubmit sent messages to re-generate previous outputs.
I suggest adding an indicator which revision a conversation displays if available.

Here is an example snippet from my own script for a concept of what I want added:

let Revision = '';
const revisionElement = message.querySelector(".text-xs .flex-grow");
if (revisionElement && revisionElement.innerHTML) {
    Revision = `Edit Revision: **${revisionElement.innerHTML}**`;
}

So essentially, on ChatGPT the class .text-xs is how I identify the chat segment has some sort of edit (unique to revision/resubmitted chat messages) and the class .flex-grow while not unique is the child element that contains desired information.

Then I would append Revision (and if there are no edits it's an empty string anyways.)

`markdownContent += `**${sender}:** ${Revision}\n${messageText.trim()}\n\n`;`

So what do you think? I discovered this github today, I was previously using a self-created script in Chrome's console, but then I decided to check out if there was any userscripts as I grew tired of copy/pasting into F12. I tried to edit the javascript file myself, but honestly, trying to edit it in Notepad++ is annoying and the arrays and maps and nested functions just confused me, so I submitted a Feature Request on your github instead 😄

@pionxzh
Copy link
Owner

pionxzh commented Apr 1, 2023

This is something doable. But I have a question about where and how to put this annotation.
I have tried these:

#### You:
※ Revision: 2 / 2
If I want to generate a text file for both windows and *nix system, what ...
#### You:
If I want to generate a text file for both windows and *nix system, what ...
※ Revision: 2 / 2
#### You (2 /2):
If I want to generate a text file for both windows and *nix system, what ...

What do you think? I'm ok with adding this feature, but I want to make it nice and look good.

btw, this is the selector we currently use.
And I would suggest you fork and edit the source code rather than working on the compiled script if you want, see CONTRIBUTING.

@pionxzh pionxzh added enhancement New feature or request discussion labels Apr 1, 2023
@skaviouz
Copy link
Author

skaviouz commented Apr 1, 2023

image

I would pick option 3 to match the style of how it's displayed on ChatGPT. I'll be honest, all the options you provided could be argued for or against. I also see an additional added bonus in that option 3 would likely add "sprinkles" to the monotonous and bland outline.

@pionxzh
Copy link
Owner

pionxzh commented Jul 9, 2023

I have tried to implement this, but it will need some structural refactoring to expose the revision information. Give me a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants