Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional insertAt options, add support for postprocessors to templated prompts #68

Merged
merged 8 commits into from
Sep 9, 2024

Commits on Sep 8, 2024

  1. Symlink library to testspace

    justyns committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    ab57716 View commit details
    Browse the repository at this point in the history
  2. Add global metadata support to enrichChatMessages

    Enhance the enrichChatMessages function to include optional
    global metadata. This allows for injecting global information
    into the chat message enrichment process.
    
    - Update function signature to accept globalMetadata
    - Merge globalMetadata into the template context
    justyns committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    b5b6006 View commit details
    Browse the repository at this point in the history
  3. Expand insertAt options for templated prompts

    Enhance the functionality of `insertAt` by adding more options to
    facilitate better template responses. This includes support for
    inserting at various points within lines, items, and surrounding
    lines.
    
    - Added insertAt options:
      - "start-of-line"
      - "end-of-line"
      - "start-of-item"
      - "end-of-item"
      - "new-line-above"
      - "new-line-below"
      - "replace-line"
    - Updated global metadata structure to support additional options
    - Implemented logic for new insertAt cases
    justyns committed Sep 8, 2024
    Configuration menu
    Copy the full SHA
    8f784d9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b23999 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6c8c2a8 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Add post-processor functionality to prompts

    - Enhance `.gitignore` to exclude `docs/Library/Core`
    - Export utility functions in `editorUtils.ts` for line
      operations based on text position
    - Modify `Provider.ts` to handle post-processors in
      `AbstractProvider`, processing data after response is complete
    - Update `prompts.ts` to support post-processors in AI prompt
      templates
    - Extend `StreamChatOptions` in `types.ts` to include
      `postProcessors` array
    - Define `PostProcessorData` type to pass context to post-processors
    justyns committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    d038dcf View commit details
    Browse the repository at this point in the history
  2. Add space script functions to demo post processing

    - Introduced `convertToBulletList` for transforming strings into bullet lists
    - Added `convertToTaskList` to ensure each line in a string is a markdown task
    - Implemented `indentOneLevel` to indent lines based on the previous line
    - Created `removeDuplicateStart` to remove the first line if it's a duplicate
    
    These functions enhance the utility of space scripts, making them more versatile.
    justyns committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    1488c4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8179126 View commit details
    Browse the repository at this point in the history