Giter Club home page Giter Club logo

Comments (13)

MichaelYuhe avatar MichaelYuhe commented on September 17, 2024 2

Tabs or Options Page? That's a question :D

from ai-group-tabs.

MichaelYuhe avatar MichaelYuhe commented on September 17, 2024 1

And I just assigned this issue to you, looking forward to your work!

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024 1

And I just assigned this issue to you, looking forward to your work!我刚刚把这个问题交给了你,期待你的工作!

Thank you very much for your trust. I will provide a version as soon as possible.😆

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024 1

I also think it might be more suitable to put it in a popup😁, because there may be a need for a lot of configuration, which would appear too crowded inside the popup.🤔

I will first try to add it to the options page.👍

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024 1

@MichaelYuhe The existing code has been submitted first. If you have more suggestions, please feel free to point them out.😆

from ai-group-tabs.

MichaelYuhe avatar MichaelYuhe commented on September 17, 2024

Yes I'd love to see this feature! Maybe we can let user set a filter rule in options page.
For example, a textarea input in Options page, user can set filter rules by prefix, like github.com

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024

And I just assigned this issue to you, looking forward to your work!

Do you think it's more suitable to add it on the Setting page or inside a popup?🤔

from ai-group-tabs.

MichaelYuhe avatar MichaelYuhe commented on September 17, 2024

And I just assigned this issue to you, looking forward to your work!

Do you think it's more suitable to add it on the Setting page or inside a popup?🤔

I think it's better in the options page. Or we need to use tabs in popup so that it won't mess up with too much content

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024

How does this look? Imitating the logic of Surge's rule, if a rule is matched, GPT requests will not be made.@MichaelYuhe
CleanShot 2023-12-12 at 15 32 35
CleanShot 2023-12-12 at 15 30 40

from ai-group-tabs.

MichaelYuhe avatar MichaelYuhe commented on September 17, 2024

I think we don't need to use the keyword rule? I think it's much better to be like this one below ⬇️
image
What do u think of it? Discussions are welcome!

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024

I think we don't need to use the keyword rule? I think it's much better to be like this one below ⬇️ image What do u think of it? Discussions are welcome!

😄At first, my idea was to use regular expressions for matching, but the complexity of regular expressions is relatively high.

Although there are many types of rules in Surge, the difficulty of understanding will be lower. Here are some specific examples of these three types.

CleanShot 2023-12-12 at 16 01 40

I think we can also treat regular expressions as a type and add them, so the adaptability will be higher.

In this way, we have four types to judge.😆

from ai-group-tabs.

MichaelYuhe avatar MichaelYuhe commented on September 17, 2024

Yes your solution is much eaiser to use. But I think maybe using 'prefix' is much better than 'suffix'?

from ai-group-tabs.

hqwuzhaoyi avatar hqwuzhaoyi commented on September 17, 2024

Yes your solution is much eaiser to use. But I think maybe using 'prefix' is much better than 'suffix'?

Because now DOMAIN actually uses URL host for filtering, just like this

function matchesRule(host: string, rule: FilterRuleItem) {
  const { type, rule: value } = rule;
  switch (type) {
    case "DOMAIN":
      // Exact match; example.com should match example.com
      return host === value;
    case "DOMAIN-SUFFIX":
      // Suffix matching; example.com should match www.example.com
      return host.endsWith("." + value) || host === value;
    case "DOMAIN-KEYWORD":
      // Keyword matching; example should match www.example.com
      return host.includes(value);
    default:
      // If the rule type is unknown, return false
      return false;
  }
}

But what is matched using the suffix?🤔

from ai-group-tabs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.