Skip to content

Commit 769da7b

Browse files
committed
Fix chatbot prompt structure in intelligent search mode
- the 'intelligent' prompt should not begin with 'task' or 'output formatting', just provide it at the end └── apps └── editor └── src └── features └── search-files ├── index.ts ├── search-files.ts ├── search-modes │ ├── perform-intelligent-search-mode.ts │ ├── perform-keywords-search-mode.ts │ ├── perform-phrase-search-mode.ts │ └── perform-semantic-search-mode.ts └── utils ├── analyze-files.ts ├── check-matches-condition.ts ├── create-search-regex.ts ├── group-quick-pick-items.ts ├── handle-parent-folder-result.ts ├── map-files-to-quick-pick-items.ts ├── prompt-for-config.ts ├── prompt-for-intelligent-search-results.ts ├── prompt-for-keywords-match-mode.ts ├── prompt-for-keywords-target.ts ├── prompt-for-provided-results.ts ├── prompt-for-search-mode.ts ├── prompt-for-search-results.ts ├── prompt-for-search-term.ts ├── prompt-for-shrink-mode.ts ├── search-files-by-intelligent.ts ├── search-files-by-keywords.ts ├── search-files-by-phrase.ts └── search-files-by-semantic.ts
1 parent b7533eb commit 769da7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/editor/src/features/search-files/search-modes/perform-intelligent-search-mode.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export const perform_intelligent_search_mode = async (params: {
235235
config.get<string>('findRelevantFilesInstructions') ||
236236
find_relevant_files_instructions
237237

238-
const chatbot_prompt = `# Task\n\n${base_instructions}\n\n${search_term}\n\n${find_relevant_files_format_for_prompt_view}\n\n# Files\n\n${md_files}${find_relevant_files_format_for_prompt_view}\n\n# Task\n\n${base_instructions}\n\n${search_term}`
238+
const chatbot_prompt = `# Files\n\n${md_files}# Task\n\n${base_instructions}\n\n${search_term}\n\n${find_relevant_files_format_for_prompt_view}`
239239

240240
if (action == 'copy') {
241241
await vscode.env.clipboard.writeText(chatbot_prompt)

0 commit comments

Comments
 (0)