v0.2.28

yamadashy/repomixv0.2.28Feb 16, 2025by yamadashy

AI Summary

Introduces code compression with Tree-sitter integration for intelligent code parsing and optimization of LLM prompts.

Key Highlights

  • New code compression feature for optimizing LLM prompts
  • Language-specific Tree-sitter queries for accurate parsing
  • Supports multiple languages including JS/TS, Python, Rust, Go, C/C++, C#, Ruby, Java, PHP, and Swift

New Features

  • Code compression with Tree-sitter integration

Full Release Notes

This release brings advanced code analysis capabilities through Tree-sitter integration, along with contributions from community members.

# What's New 🚀

## Code Compression with Tree-sitter (#336)
- Added intelligent code compression feature for optimizing LLM prompts
  - Implemented language-specific Tree-sitter queries for accurate code parsing
  - Supports multiple languages including JavaScript/TypeScript, Python, Rust, Go, C/C++, C#, Ruby, Java, PHP, and Swift

> [!NOTE]
> This is an experimental feature that we'll be actively improving based on user feedback and real-world usage
> Known issue: https://github.com/yamadashy/repomix/issues/359

### Example
Using compression via CLI:
```bash
repomix --compress
```

Before:
```typescript
const calculateTotal = (items: ShoppingItem[]) => {
  let total = 0;
  for (const item of items) {
    total += item.price * item.quantity;
  }
  return total;
}
interface Item {
  name: string;
  price: number;
  quantity: number;
}
```

After compression:
```typescript
const calculateTotal = (items: ShoppingItem[]) => {
interface Item {
```

Special thanks to @huy-trn for the initial implementation of this feature! His groundwork with Tree-sitter integration laid the foundation for this powerful enhancement to Repomix. 

# How to Update

```bash
npm update -g repomix
```

---

As always, if you encounter any issues or have suggestions, please let us know through our GitHub issues or join our [Discord community](https://discord.gg/wNYzTwZFku) for support.