You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/scripts/file-modifier.ts
+33-29Lines changed: 33 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -148,19 +148,10 @@ export async function executeProjectFilesAnalysis({
148
148
tokenCount: currentBatchTokens,
149
149
});
150
150
151
-
const{
152
-
object: partialProjectAnalysis,
153
-
usage,
154
-
experimental_providerMetadata,
155
-
}=awaitgenerateObject({
156
-
model: anthropic("claude-3-5-sonnet-latest",{
157
-
cacheControl: true,
158
-
}),
159
-
schema: projectFilesAnalysisSchema,
160
-
messages: [
161
-
{
162
-
role: "system",
163
-
content: dedent`
151
+
constmessages=[
152
+
{
153
+
role: "system"asconst,
154
+
content: dedent`
164
155
You are an experienced software developer specialized in Next.js ecosystem working as assistant that analyzes which source code files need modifications, which ones needs to be created and which needs to be deleted.
165
156
166
157
Base on user request specified in <request> section. You follow strict rules, defined in the <rules> section. There are also <good> and <bad> examples and a way of thinking defined in <thinking> and <examples> sections.
@@ -171,7 +162,7 @@ export async function executeProjectFilesAnalysis({
171
162
rules: {
172
163
rule: [
173
164
"Focus on code and configuration files",
174
-
"Do not mark files not present in the <files> section as modifications, all files that are meant to be created must not be included in the <files> section",
165
+
"Does the file exist in <files>? If YES -> MUST use `files_to_modify`, If NO -> MUST use `files_to_create` in output",
175
166
"Include files that need both direct and indirect modifications",
176
167
"Analyze the coupling between various modules",
177
168
"Include related configuration files",
@@ -265,15 +256,15 @@ export async function executeProjectFilesAnalysis({
0 commit comments