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

docs: Recipes needed #3

Open
1 of 2 tasks
bdougie opened this issue Jul 24, 2023 · 4 comments
Open
1 of 2 tasks

docs: Recipes needed #3

bdougie opened this issue Jul 24, 2023 · 4 comments

Comments

@bdougie
Copy link
Member

bdougie commented Jul 24, 2023

Type of feature

🍕 Feature

Current behavior

@Anush008 I was able to successfully run this locally. Would an example of queries users can run

Suggested solution

What 3 queries can some ask to any repo?

cc @diivi

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@bdougie
Copy link
Member Author

bdougie commented Jul 25, 2023

The README now has examples, but we will collect some more examples since not examples will work with every repo.

Giving it a query on the insights repo of:

// JSON for the GET

{
    "query": "How is the highlights button getting its color?",
    "repository": {
        "owner": "open-sauced",
        "name": "insights",
        "branch": "beta"
    }
}

It gives a result back with:

data: "The highlights button is getting its color from the CSS classes applied to it in the highlights-filter-card.tsx file. Specifically, the button has the class bg-light-slate-1, which sets the background color, and text-light-slate-12, which sets the text color. These classes are defined in the CSS file associated with the component."

The above is an example @jpmcb shared.

note: The idea is to not have a bunch of recipes to copy and paste but queries folks can use and make their own. Showcase what this can do.

@jpmcb
Copy link
Member

jpmcb commented Jul 25, 2023

This could be something that we prototype pretty quickly in the pizza CLI if we wanted?

$ pizza repo-query https://github.com/open-sauced/insights --branch beta

Indexing ...

Complete!

Want to ask a question?
> How is the highlights button getting its color?

The highlights button is getting its color from the CSS classes applied to it in
the highlights-filter-card.tsx file. Specifically, the button has the class bg-light-slate-1,
which sets the background color, and text-light-slate-12, which sets the text color.
These classes are defined in the CSS file associated with the component.

Want to ask another question?
>

@bdougie
Copy link
Member Author

bdougie commented Jul 25, 2023

This could be something that we prototype pretty quickly in the pizza CLI if we wanted?

I would love that, one suggestion is query, less key strokes.

$ pizza query https://github.com/open-sauced/insights --branch beta

@Anush008 let us know if you were able to get a test deployment up on azure. If we could get this on a public endpoint, we could work towards that.

@bdougie
Copy link
Member Author

bdougie commented Aug 8, 2023

Trying to recreate this prompt that worked flawlessly this morning but no longer.

open-sauced/insights --branch beta
> Tell me the hex of the follow button

...

update:

It worked int he CLI

pizza repo-query https://github.com/open-sauced/insights
Checking if open-sauced/insights is indexed by us...⏳
Repo found ✅

Want to ask a question about open-sauced/insights?
> tell me the hex code of the orange follow button?
Searching the codebase for your query...🔍
Searching components/molecules/HighlightPrompt/highlight-prompt.tsx for your query...🔍
Generating a response...🧠

The hex code of the orange follow button in the repository's codebase is `#FF8C00`. This hex code is used in the following file:

- File: `components/molecules/HighlightPrompt/highlight-prompt.tsx`
- Relevant code snippet:
```jsx
<Button className="border text-light-orange-10 border-light-orange-7" variant="text"> See answers </Button>

Please note that this is the hex code used for the button style in the codebase. If you are looking for the specific hex code used for the background color or any other specific style, please provide more details or specify the file you are interested in

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

2 participants