Skip to content

Commit 6c382bd

Browse files
committed
Refactor quick pick item generation into shared utilities and add multi-root workspace support to the clipboard path selection command
- regarding `apps/editor/src/commands/select-clipboard-paths-command.ts`; in a multi root-folder workspaces ask the user for what workspace paths are. It is because they are not workspace-prefixed by default. - `apps/editor/src/commands/select-clipboard-paths-command.ts` should skip listing workspaces with 0 found paths. - `apps/editor/src/commands/select-clipboard-paths-command.ts` should show number of found paths on workspaces in description e.g. "20 · /sdf/sadf/sdf" - sometimes clipboard paths have proper workspace-name prefix - in `apps/editor/src/commands/select-clipboard-paths-command.ts` allow going back to the list of workspaces, when appropriate. - in `apps/editor/src/commands/select-clipboard-paths-command.ts`; in case when showing workspace selector, restore it once user accepts file selection, so they can continue with selections from other root folders - restore showing separators with root folder names (don't restore any other behaviors) [Changes] - we have some unwanted code repetitions, e.g. [Fragment] └── apps └── editor └── src ├── commands │ ├── generate-commit-message-commands │ │ ├── actions │ │ │ ├── get-prompt-data.ts │ │ │ └── run-generate-action.ts │ │ ├── generate-commit-message-commands.ts │ │ ├── index.ts │ │ └── utils │ │ ├── build-commit-message-prompt.ts │ │ ├── generate-commit-message-with-api.ts │ │ ├── get-commit-message-config.ts │ │ └── strip-wrapping-quotes.ts │ └── select-clipboard-paths-command.ts ├── context │ └── providers │ └── workspace │ └── workspace-provider.ts ├── extension.ts ├── 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 ├── utils │ └── extract-paths-from-text │ └── extract-paths-from-text.ts └── views └── prompt └── backend └── message-handlers └── handle-get-tasks.ts
1 parent 269547a commit 6c382bd

8 files changed

Lines changed: 512 additions & 490 deletions

File tree

‎apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/relevant-files-parser/relevant-files-parser.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ export const parse_relevant_files = (params: {
99
response: string
1010
workspace_files: string[]
1111
}): RelevantFilesItem | null => {
12-
if (
13-
(params.response.includes('```') &&
14-
!params.response.includes('**Relevant files:**')) ||
15-
params.response.includes('### Deleted file:') ||
16-
params.response.includes('### Renamed file:')
17-
) {
12+
if (!params.response.startsWith('**Relevant files:**')) {
1813
return null
1914
}
2015

0 commit comments

Comments
 (0)