-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
CLI: Add create-story command #33399
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
Changes from all commits
ec8d909
ccdad60
b807e14
d9745c7
5882370
80bd496
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -126,6 +126,18 @@ export const automigrate = async ({ | |||||||||||||||||||||||||||||||||||||||
| fixResults: Record<string, FixStatus>; | ||||||||||||||||||||||||||||||||||||||||
| preCheckFailure?: PreCheckFailure; | ||||||||||||||||||||||||||||||||||||||||
| } | null> => { | ||||||||||||||||||||||||||||||||||||||||
| const files = await prompt.fileSystemTreeSelect({ | ||||||||||||||||||||||||||||||||||||||||
| message: 'Select a file to migrate', | ||||||||||||||||||||||||||||||||||||||||
| root: process.cwd(), | ||||||||||||||||||||||||||||||||||||||||
| includeFiles: true, | ||||||||||||||||||||||||||||||||||||||||
| includeHidden: false, | ||||||||||||||||||||||||||||||||||||||||
| glob: ['**/*.tsx', '**/*.json'], | ||||||||||||||||||||||||||||||||||||||||
| maxDepth: 3, | ||||||||||||||||||||||||||||||||||||||||
| filter: (path) => { | ||||||||||||||||||||||||||||||||||||||||
| return !path.includes('node_modules') && !path.includes('.git'); | ||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||
| console.log({ files }); | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+129
to
+140
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code appears to be debug/incomplete and blocks the Several issues with this code segment:
🔎 Suggested fix: Move or remove the debug codeIf this is intended functionality, move it after the list check and integrate the result: }: AutofixOptions): Promise<{
fixResults: Record<string, FixStatus>;
preCheckFailure?: PreCheckFailure;
} | null> => {
- const files = await prompt.fileSystemTreeSelect({
- message: 'Select a file to migrate',
- root: process.cwd(),
- includeFiles: true,
- includeHidden: false,
- glob: ['**/*.tsx', '**/*.json'],
- maxDepth: 3,
- filter: (path) => {
- return !path.includes('node_modules') && !path.includes('.git');
- },
- });
- console.log({ files });
if (list) {
logAvailableMigrations();
return null;
}
+
+ // If file selection is needed, add it here after the list check
+ // and use `logger.debug` instead of console.log📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| if (list) { | ||||||||||||||||||||||||||||||||||||||||
| logAvailableMigrations(); | ||||||||||||||||||||||||||||||||||||||||
| return null; | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value mismatch between documentation and implementation.
The JSDoc comment on line 55 states
multipledefaults tofalse, but the implementation inprompt-provider-clack.ts(line 158) defaults it totrue:Consider aligning the documentation with the actual default, or vice versa.
🔎 Proposed fix
Either update the documentation:
Or update the implementation in
prompt-provider-clack.ts:🤖 Prompt for AI Agents