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

Install npm packages after plan ran. External link option #410

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

nichochar
Copy link
Contributor

@nichochar nichochar commented Oct 22, 2024

Ability to open the vite app in a new tab (i want this to show something off in the video).

Also when creating an app, if there were packages they wouldn't be installed and it would crash. I fix that by installing only the right packages post AI plan.

CleanShot 2024-10-22 at 13 28 12

(action): action is NpmInstallCommand =>
action.type === 'command' && action.command === 'npm install',
)
.map((action) => action.packages)
Copy link
Contributor

Choose a reason for hiding this comment

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

.map().flat() can be expressed in one iteration using flatMap().

<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
Copy link
Contributor

@benjreinhart benjreinhart Oct 22, 2024

Choose a reason for hiding this comment

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

This should be a link rather than a button with window.open

size="icon"
onClick={() => window.open(url as string, '_blank')}
className="active:translate-y-0"
disabled={previewStatus === 'booting' || previewStatus === 'connecting'}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit but probs better to do previewStatus !== 'running', especially since at some point stop may keep the preview stopped (rather than client automatically booting it back up again, which is currently awkward behavior given that we have a stop button that doesn't really stop it).

props.onChangeTab('code');
}}
className="active:translate-y-0"
disabled={previewStatus === 'booting' || previewStatus === 'connecting'}
Copy link
Contributor

Choose a reason for hiding this comment

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

same re: previewStatus !== running

@nichochar nichochar merged commit 7f94377 into main Oct 23, 2024
2 checks passed
@nichochar nichochar deleted the small-demo-upgrades branch October 23, 2024 01:17
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