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

Preciser Status on each Website (Inactive/active) #49

Open
li-xin-yi opened this issue Feb 1, 2024 · 7 comments
Open

Preciser Status on each Website (Inactive/active) #49

li-xin-yi opened this issue Feb 1, 2024 · 7 comments

Comments

@li-xin-yi
Copy link
Contributor

Currently, the popup page and extension icon seem too primitive (another related complaint: #48). I feel a little painful when

  1. I want to temporarily turn on/off the completion on the current web page manually by one-click, instead of going to the option page to edit the whitelist.
  2. I desire to add the regex of current page to the whitelist by one-click
  3. The icon on the extension bar show if this extension is active in current page

My desired feature looks like wakatime, which also tracks the activities of the user and includes white/black list feature.

I'd like to work on this enhancement by this weekend, make the popup page more fancy as well (such as showing how many completions are accepted today, or the graph). Please let me know if the idea is acceptable or conflict with others.

@fortenforge
Copy link
Contributor

I think items 1. 2. and 3. would be appreciated! I think stuff like adding the number of completions accepted we might want our own design team to first make a spec.

@li-xin-yi
Copy link
Contributor Author

li-xin-yi commented Feb 13, 2024

Thanks @fortenforge @pqn
I finished 3 on my side. Considering how to implement 2, if the popup page is immutable, I can add the option on the contextMenu like this:
image

But I'm blocked by how to disable the functionality of Codeium completion after injection (as the page is already loaded). Two approaches:

  1. Write clean-up functions for every possible editor to unregister the completion provider. It's a little complicated and time-consuming, I may need help from you.
  2. Ignore the message (completion request) from specific tabs, it sounds like a hack, I don't like it and neither do I know how to do that...

What do you think about it? Do you need me to create a draft PR with current progress and have a discussion?

By the way, I found Colab supports their built-in completion now. It might not be a good way to overwrite the Monaco completion for it.

@pqn
Copy link
Contributor

pqn commented Feb 14, 2024

Can we write the same code twice, once in each implementations (CodeMirror and Monaco), to be able to read some state change caused by the context menu? Then if Codeium is disabled behave as a noop.

By the way, I found Colab supports their built-in completion now. It might not be a good way to overwrite the Monaco completion for it.

If this is true for everyone then we can disable it.

@li-xin-yi
Copy link
Contributor Author

If this is true for everyone then we can disable it.

Not for every user, but only some eligible ones: https://blog.google/technology/developers/google-colab-ai-coding-features/

I'm just wondering how to handle this.

@pqn
Copy link
Contributor

pqn commented Feb 15, 2024

For Colab let's leave it on for now in that case. Not sure how Monaco will choose between them but as long as the user gets some completions it's probably okay either way.

@li-xin-yi
Copy link
Contributor Author

li-xin-yi commented Feb 17, 2024

Hi @pqn @fortenforge, Thanks for your help.

I tried to implement 1 and 3 in this draft #51 I'm not certain whether I understand your idea correctly so I created that PR early for tests and discussion. The code is dirty now, I will clean it up further if needed. Please let me know if I misunderstand anything.

And also, should I also push the implementation of 3 in the same PR, or is it more comfortable to review and handle the code so far? Either is fine to me.

@pqn
Copy link
Contributor

pqn commented Feb 28, 2024

Thanks! I think it's fine to keep 3 in the same PR, it's not unmanageably sized right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants