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
@@ -81,16 +92,26 @@ export async function fastRewrite(
81
92
}
82
93
83
94
// Gemini flash can only output 8k tokens, openai models can do at least 16k tokens.
84
-
exportasyncfunctionrewriteWithOpenAI(
85
-
oldContent: string,
86
-
editSnippet: string,
87
-
filePath: string,
88
-
clientSessionId: string,
89
-
fingerprintId: string,
90
-
userInputId: string,
91
-
userId: string|undefined,
92
-
userMessage: string|undefined,
93
-
): Promise<string>{
95
+
exportasyncfunctionrewriteWithOpenAI(params: {
96
+
oldContent: string
97
+
editSnippet: string
98
+
filePath: string
99
+
clientSessionId: string
100
+
fingerprintId: string
101
+
userInputId: string
102
+
userId: string|undefined
103
+
userMessage: string|undefined
104
+
}): Promise<string>{
105
+
const{
106
+
oldContent,
107
+
editSnippet,
108
+
filePath,
109
+
clientSessionId,
110
+
fingerprintId,
111
+
userInputId,
112
+
userId,
113
+
userMessage,
114
+
}=params
94
115
constprompt=`You are an expert programmer tasked with implementing changes to a file. Please rewrite the file to implement the changes shown in the edit snippet, while preserving the original formatting and behavior of unchanged parts.
95
116
96
117
Old file content:
@@ -132,17 +153,28 @@ Please output just the complete updated file content with the edit applied and n
132
153
* sketches an update to a single function, but forgets to add ... existing code ...
0 commit comments