Skip to content

Commit cb5ff46

Browse files
committed
Fix small bug in AI commands
1 parent f019699 commit cb5ff46

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/api/gpt.jsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,6 @@ export default (
154154
// The 'values' parameter is tricky. When calling getResponse directly (not from form submission),
155155
// there are no form values. We pass an empty object. processPrompt should handle missing values.
156156
query = await processPrompt({ context: context, query: query, selected: selectedState, values: {} }); // Pass selectedState and empty values
157-
} else if (context || (requireQuery && selectedState)) {
158-
// Default handling if no processPrompt: prepend context and/or append selected text if required.
159-
let finalQuery = context ? `${context}\n\n${query}` : query;
160-
if (requireQuery && selectedState) {
161-
// If query is required AND selected text exists, append selected text.
162-
finalQuery += `\n\n${selectedState}`;
163-
}
164-
query = finalQuery;
165157
}
166158

167159
// handle files: we combine files (files that the user uploads)

0 commit comments

Comments
 (0)