Skip to content

Bookmarks

Arif Dogan edited this page Mar 4, 2025 · 1 revision

Bookmarks

The bookmark system in LLMDog allows you to save and reuse commonly used file selection patterns. This is particularly useful if you find yourself frequently sharing the same sets of files with LLMs for different questions or tasks.

Why Use Bookmarks?

  • Save Time: Quickly recall complex file selections without manually re-selecting them
  • Consistency: Ensure you're always including the same relevant files for specific types of questions
  • Project Organization: Create bookmarks for different components or modules of your project

Bookmark Management

Creating a Bookmark

  1. Select the files and directories you want to include in your bookmark using Tab
  2. Press Ctrl+Shift+B to save the current selection as a bookmark
  3. In the dialog that appears, enter a name for your bookmark
  4. (Optional) Add a description to help remember what this bookmark is for

Alternatively, from the bookmarks menu:

  1. Press Ctrl+B to open the bookmarks menu
  2. Press n to create a new bookmark
  3. Enter a name for the bookmark
  4. The current selection will be saved under that name

Using a Bookmark

  1. Press Ctrl+B to open the bookmarks menu
  2. Use the up/down arrow keys to navigate to the desired bookmark
  3. Press Enter to apply the selected bookmark
    • This will automatically select all the files that were saved in the bookmark

Renaming a Bookmark

  1. Press Ctrl+B to open the bookmarks menu
  2. Navigate to the bookmark you want to rename
  3. Press r
  4. Enter the new name for the bookmark

Adding/Editing a Description

  1. Press Ctrl+B to open the bookmarks menu
  2. Navigate to the bookmark you want to edit
  3. Press i (for "information")
  4. Enter or modify the description in the text input dialog

Deleting a Bookmark

  1. Press Ctrl+B to open the bookmarks menu
  2. Navigate to the bookmark you want to delete
  3. Press d
  4. The bookmark will be deleted immediately

Bookmark Storage

Bookmarks are stored in a JSON file at:

  • Linux/macOS: ~/.config/llmdog/bookmarks.json
  • Windows: %USERPROFILE%\.config\llmdog\bookmarks.json

The bookmark file structure looks like this:

{
  "bookmarks": [
    {
      "name": "API Controllers",
      "description": "All API controller files",
      "filePaths": [
        "controllers/userController.js",
        "controllers/authController.js",
        "controllers/productController.js"
      ],
      "rootPath": "/home/user/projects/myapp",
      "created": "2025-01-15T12:30:45Z",
      "modified": "2025-01-16T09:12:30Z"
    },
    {
      "name": "Database Models",
      "description": "Core database entity models",
      "filePaths": [
        "models/user.js",
        "models/product.js",
        "models/order.js",
        "config/database.js"
      ],
      "rootPath": "/home/user/projects/myapp",
      "created": "2025-01-10T16:45:20Z",
      "modified": "2025-01-10T16:45:20Z"
    }
  ]
}

Advanced Bookmark Usage

Path Resolution

Bookmarks store relative paths from the project root where they were created. When you apply a bookmark, LLMDog will:

  1. Attempt to find the files at the saved paths relative to your current directory
  2. Display a warning if any files in the bookmark can't be found
  3. Select any files that do exist at the correct relative paths

This means bookmarks work best when:

  • You're in the same project directory where you created the bookmark
  • Your project structure hasn't changed significantly since creating the bookmark

Bookmark Context

Each bookmark stores:

  • The set of selected files (relative paths)
  • The root directory path where it was created
  • Creation timestamp
  • Last modified timestamp
  • Optional description

Tips for Effective Bookmark Organization

  1. Use clear, descriptive names: Choose names that indicate exactly what files are included.

  2. Add detailed descriptions: The description field can be used to note:

    • What types of questions this file selection is useful for
    • Why these specific files are grouped together
    • Any special considerations when using this bookmark
  3. Create purpose-specific bookmarks: Rather than having one large bookmark, create several smaller ones for different purposes:

    • Backend components
    • Frontend components
    • Configuration files
    • Test files
  4. Regularly update bookmarks: As your project evolves, periodically check and update your bookmarks to ensure they remain relevant.

  5. Delete unused bookmarks: Remove bookmarks you no longer need to keep the list manageable.

Clone this wiki locally