@@ -31,13 +31,15 @@ export const makeConfigTemplate = (
31
31
'*autodoc*' ,
32
32
] ,
33
33
filePrompt :
34
+ config ?. filePrompt ??
34
35
'Write a detailed technical explanation of what this code does. \n\
35
36
Focus on the high-level purpose of the code and how it may be used in the larger project.\n\
36
37
Include code examples where appropriate. Keep you response between 100 and 300 words. \n\
37
38
DO NOT RETURN MORE THAN 300 WORDS.\n\
38
39
Output should be in markdown format.\n\
39
40
Do not just list the methods and classes in this file.' ,
40
41
folderPrompt :
42
+ config ?. folderPrompt ??
41
43
'Write a technical explanation of what the code in this folder does\n\
42
44
and how it might fit into the larger project or work with other parts of the project.\n\
43
45
Give examples of how this code might be used. Include code examples where appropriate.\n\
@@ -108,15 +110,34 @@ export const init = async (
108
110
} ,
109
111
] ,
110
112
} ,
113
+ {
114
+ type : 'input' ,
115
+ name : 'filePrompt' ,
116
+ message : chalk . yellow (
117
+ `Enter the prompt you want to use for generating file-level documentation:` ,
118
+ ) ,
119
+ default : config . filePrompt ,
120
+ } ,
121
+ {
122
+ type : 'input' ,
123
+ name : 'folderPrompt' ,
124
+ message : chalk . yellow (
125
+ `Enter the prompt you want to use for generating folder-level documentation:` ,
126
+ ) ,
127
+ default : config . folderPrompt ,
128
+ } ,
111
129
] ;
112
130
113
- const { name, repositoryUrl, llms } = await inquirer . prompt ( questions ) ;
131
+ const { name, repositoryUrl, llms, filePrompt, folderPrompt } =
132
+ await inquirer . prompt ( questions ) ;
114
133
115
134
const newConfig = makeConfigTemplate ( {
116
135
...config ,
117
136
name,
118
137
repositoryUrl,
119
138
llms,
139
+ filePrompt,
140
+ folderPrompt,
120
141
} ) ;
121
142
122
143
fs . writeFileSync (
0 commit comments