Skip to main content

File Tree, Search, and Selection

PastePrompt is built around choosing the right files before sending code to an LLM. The file tree, search, filters, and selected-files panel help you build a focused context bundle instead of copying a repository by hand.

What it does

PastePrompt scans the selected repository and shows a navigable file tree. You can expand folders, search by path or filename, apply filters, select individual files, select folders recursively, and review the final selection before copy or export.

The selected-files panel shows what will be included in the bundle. It is the last place to remove files that are irrelevant, too large, binary, ignored, or sensitive before generating context.

Why it matters

Large repositories contain tests, generated artifacts, dependencies, build output, snapshots, vendored packages, docs, and scripts. Sending all of that to an LLM wastes tokens and can make the model focus on the wrong code.

Good file selection helps you:

  • Keep context within the model budget.
  • Include dependencies that explain behavior.
  • Exclude unrelated files and generated output.
  • Avoid accidentally copying ignored or sensitive files.
  • Rebuild the same review context later.

How to use it

  1. Select a repository.
  2. Expand folders in the tree to inspect the project shape.
  3. Use search to find files by name, path segment, or extension.
  4. Apply filters when you want to narrow the tree to source files, selected files, changed files, or other supported views.
  5. Select individual files for precise context.
  6. Select a folder when you want PastePrompt to include eligible files below that folder recursively.
  7. Open the selected-files panel.
  8. Remove files that are unrelated, too large, ignored, binary, generated, or outside the current review scope.
  9. Check token totals before building the final bundle.

Recursive folder selection

Selecting a folder should include eligible files inside that folder and its subfolders. Ignore rules still apply. For example, selecting src/ should include source files under src/, while generated output or ignored build artifacts should remain excluded unless you explicitly override ignore handling.

Recursive selection is useful when a module is self-contained. It is less useful for broad folders such as repository roots, vendored dependency folders, or generated artifact directories.

Ignored and binary files

PastePrompt should respect .gitignore and .pastepromptignore by default. Ignored files should either be hidden, marked, or excluded from selection depending on the current view.

Binary files are generally not useful in LLM context bundles. They should not be copied as source text. If a binary file appears in the tree, treat it as metadata unless the app provides a specific text extraction workflow.

Example workflow

  1. Search for Vault.
  2. Select src/auth/session.ts, src/auth/session-manager.ts, and src/auth/types.ts.
  3. Select tests/session.test.ts to include relevant behavioral tests.
  4. Filter to changed files and add the files modified by the current branch.
  5. Open the selected-files panel.
  6. Remove generated files, snapshots, and unrelated deployment scripts.
  7. Review token totals and generate the bundle.

Limitations

  • Search results depend on the scanned file tree and current ignore settings.
  • Recursive folder selection can include more files than expected in large modules.
  • Ignored files are excluded by default and may be missing from the tree.
  • Binary files, unreadable files, and very large files may be skipped or shown with warnings.
  • File selection alone does not prove that the bundle is complete. You still need to reason about dependencies and review scope.