Skip to content

Commit 363a553

Browse files
doble196claude
andcommitted
fix(prompts): make "Skip for now" the default for key setup
- Remove "Sign in with browser" option (was friction with manual key paste) - Default to skip — auth works on localhost without a key - Keep "I have a key" option for users who have one ready Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 30713a4 commit 363a553

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

src/prompts/githat.ts

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ function openBrowser(url: string): void {
2828
export async function promptGitHat(existingKey?: string): Promise<GitHatAnswers> {
2929
let publishableKey = existingKey || '';
3030

31-
// If no key provided via --key flag, offer guided browser flow
31+
// If no key provided via --key flag, offer options
3232
if (!publishableKey) {
3333
const connectChoice = await p.select({
3434
message: 'Connect to GitHat',
3535
options: [
36-
{ value: 'browser', label: 'Sign in with browser', hint: 'opens githat.io — recommended' },
36+
{ value: 'skip', label: 'Skip for now', hint: 'auth works on localhost — add key later' },
3737
{ value: 'paste', label: 'I have a key', hint: 'paste your pk_live_... key' },
38-
{ value: 'skip', label: 'Skip for now', hint: 'add key to .env later' },
3938
],
4039
});
4140

@@ -44,24 +43,7 @@ export async function promptGitHat(existingKey?: string): Promise<GitHatAnswers>
4443
process.exit(0);
4544
}
4645

47-
if (connectChoice === 'browser') {
48-
p.log.step('Opening githat.io in your browser...');
49-
openBrowser('https://githat.io/sign-up');
50-
p.log.info('Sign up (or sign in), then go to Dashboard → Apps to copy your key.');
51-
52-
const pastedKey = await p.text({
53-
message: 'Paste your publishable key',
54-
placeholder: 'pk_live_...',
55-
validate: validatePublishableKey,
56-
});
57-
58-
if (p.isCancel(pastedKey)) {
59-
p.cancel('Setup cancelled.');
60-
process.exit(0);
61-
}
62-
63-
publishableKey = (pastedKey as string) || '';
64-
} else if (connectChoice === 'paste') {
46+
if (connectChoice === 'paste') {
6547
const pastedKey = await p.text({
6648
message: 'Publishable key',
6749
placeholder: `pk_live_... (get one at ${DASHBOARD_URL})`,
@@ -74,10 +56,8 @@ export async function promptGitHat(existingKey?: string): Promise<GitHatAnswers>
7456
}
7557

7658
publishableKey = (pastedKey as string) || '';
77-
} else if (connectChoice === 'skip') {
78-
p.log.info('Auth works on localhost without a key (CORS bypass for development).');
79-
p.log.info('Sign up at githat.io — a publishable key is auto-created for you.');
8059
}
60+
// Skip is default — no extra logging needed, shown in final summary
8161
}
8262

8363
const authFeatures = await p.multiselect({

0 commit comments

Comments
 (0)