Skip to content

Conversation

mocayo
Copy link
Collaborator

@mocayo mocayo commented Aug 15, 2025

PR Description: Add Jinja2 Template Support and Enhance Cozeloop-AI Functionality

This PR introduces several key updates to the cozeloop-ai project, notably adding support for Jinja2 templates, improving test coverage, and incrementing the package version to 0.0.6. The changes are as follows:

Key Features and Updates

  1. Jinja2 Template Support

    • Enhanced the cozeloop-ai prompt hub to support Jinja2 as a new template type. This extends the flexibility of the templating system for various use cases.
      Commit: 15986a7
  2. Example Update: Jinja2 Integration

    • Added a new example with-jinja to demonstrate how to use Jinja2 templates with cozeloop-ai.
      Commit: 285ff30
  3. CommonJS to ESM Fix for Nunjucks

    • Resolved issues with using Nunjucks in an ES Module (esm) environment, ensuring compatibility and smooth functionality.
      Commit: 21f3c9a
  4. Test Suite Enhancements

    • Added test cases for prompt/utils and tracer/adapt, improving test coverage and reliability of the codebase.
      Commit: 425f699
  5. Workflow Permissions

    • Updated CI workflows to include appropriate permissions for better security and functionality.
      Commit: af36e8d
  6. Version Bump

    • Incremented the cozeloop-ai package version to 0.0.6 to reflect the new features and improvements.
      Commit: ba0efbd

Why This PR?

This set of changes is aimed at making the cozeloop-ai library more versatile and reliable. By introducing support for Jinja2 templates, fixing compatibility issues, and adding relevant examples and tests, this update will significantly enhance the usability and robustness of the project.

Testing & Validation

  • Verified Jinja2 template integration using the added example.
  • Passed updated test cases for prompt/utils and tracer/adapt.
  • Confirmed compatibility fixes for Nunjucks in ESM.

Please review the changes and provide feedback.

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cozeloop-ai/src/prompt/utils.ts 90.00% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   88.60%   87.00%   -1.60%     
==========================================
  Files          57       57              
  Lines        3000     3001       +1     
  Branches      632      638       +6     
==========================================
- Hits         2658     2611      -47     
- Misses        338      389      +51     
+ Partials        4        1       -3     
Components Coverage Δ
@cozeloop/ai 89.13% <90.00%> (-2.40%) ⬇️
@cozeloop/langchain 82.76% <ø> (ø)
Files with missing lines Coverage Δ
packages/cozeloop-ai/src/prompt/utils.ts 96.11% <90.00%> (-2.91%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mocayo mocayo enabled auto-merge (squash) August 15, 2025 02:25
@mocayo mocayo merged commit 7b172ca into main Aug 15, 2025
12 checks passed
@mocayo mocayo deleted the feat/jinja2 branch August 15, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants