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

feat: add custom prompt buttons to post content #4039

Merged
merged 14 commits into from
Jan 6, 2025

Conversation

omBratteng
Copy link
Member

@omBratteng omBratteng commented Jan 3, 2025

Changes

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

AS-905

Preview domain

https://as-905-post.preview.app.daily.dev

@omBratteng omBratteng requested a review from a team as a code owner January 3, 2025 13:13
@omBratteng omBratteng requested review from rebelchris, ilasw, capJavert, sshanzel, nensidosari and AmarTrebinjac and removed request for a team January 3, 2025 13:13
Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Jan 3, 2025 3:38pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Jan 3, 2025 3:38pm

Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, some minor comments

icon={
<PromptIcon
size={IconSize.XSmall}
className={!active && `text-accent-${flags.color}-default`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break tailwind, we should probably actually do a manual map function that fully qualifies or store full classnames?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0b3fe5a

threshold={50}
/>
</Tab>
<Tab label={PromptDisplay.SimplifyIt}>simplify</Tab>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can load these from the query now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactored it a bit. Either it didn't work react wise, or TypeScript weren't happy.
So now there's less available Tabs, as we can actually just re-use them when for streaming the content.

@@ -14,6 +15,20 @@ export type Prompt = {
flags?: PromptFlags;
};

export enum PromptDisplay {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can't really be a enum right considering they are dynamic and will change over time.

@omBratteng omBratteng merged commit 42d0758 into feat-custom-prompts Jan 6, 2025
10 checks passed
@omBratteng omBratteng deleted the AS-905-post branch January 6, 2025 13:00
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

Successfully merging this pull request may close these issues.

2 participants