Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

All notable changes to this project will be documented in this file.

## [v0.2.0] - 2025-03-31

### Added

- Dark Mode support
- Live token count updates during file selection
- Separated include/exclude configuration boxes for better organization
- Auto detect and exclude binary files
- Use .gitignore to exclude files/folders

### Improved

- Enhanced UX/UI with better spacing and visual hierarchy
- Faster UI rendering and response times
- Simplified text entry for file patterns (vs. YAML format)

### Fixed

- Multiple bug fixes in file selection and processing
- Added robust testing for file selection edge cases

## [v0.1.0] - 2025-03-11

Initial release of the AI Code Fusion application with the following features:
Expand Down
48 changes: 22 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A desktop application for preparing and optimizing code repositories for AI proc

### Download

Download the latest version for your platform from the [Releases page](https://github.com/user/repo/releases).
Download the latest version for your platform from the [Releases page](https://github.com/codingworkflow/ai-code-fusion/releases).

### Windows

Expand All @@ -36,45 +36,41 @@ Download the latest version for your platform from the [Releases page](https://g

## Usage Guide

### 1. Configuration
### 1. Start and Filters

Configure file filtering to include or exclude specific file types and patterns.
The application now features both Dark and Light modes for improved user experience.
![Start Panel Dark Mode](assets/ai_code_fusion_1.jpg)

![Config Panel](assets/ai_code_fusion_1.jpg)
![Start Panel Light Mode](assets/ai_code_fusion_2.jpg)

- Set file extensions to include (e.g., `.js`, `.py`, `.cpp`)
- Define patterns to exclude (e.g., `node_modules`, `.git`, `build`)
- Choose your token counting model based on your target AI system
Extended file filtering options:

- Exclude specific file types and patterns (using glob patterns) to remove build folders, venv, node_modules, .git from tree view and file selection
- Automatically exclude files based on .gitignore files in your repository
- Reduce selection to only the file extensions you specify
- Display token count in real-time during selection (can be disabled for very large repositories)
- Include file tree in output (recommended for better context in AI models)

### 2. File Selection

Select files and directories to analyze and process.
Select specific files and directories to analyze and process.

![Source Panel](assets/ai_code_fusion_2.jpg)
![Analysis Panel](assets/ai_code_fusion_3.jpg)

- Browse and select your root project directory
- Use the tree view to select specific files or folders
- See file counts and sizes in real-time

### 3. Token Analysis

Get accurate token estimations before processing.

![Analysis Panel](assets/ai_code_fusion_3.jpg)

- View token counts per file and total
- See character and line counts
- Get estimations for different AI models
- See file counts and token sizes in real-time (when token display is enabled)

### 4. Final Processing
### 3. Final Processing

Generate the processed output ready for use with AI systems.

![Processing Panel](assets/ai_code_fusion_4.jpg)

- Get the final processed content
- Copy directly to clipboard
- Export to file if needed
- View the final processed content ready for AI systems
- Copy content directly to clipboard for immediate use
- Export to file for later reference
- Review files by token count to help identify large files you may want to exclude

## Building from Source

Expand All @@ -88,8 +84,8 @@ Generate the processed output ready for use with AI systems.

```bash
# Clone the repository
git clone https://github.com/user/repo.git
cd repo
git clone https://github.com/codingworkflow/ai-code-fusion
cd ai-code-fusion

# Install dependencies
make setup
Expand Down
Binary file modified assets/ai_code_fusion_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ai_code_fusion_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ai_code_fusion_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ai_code_fusion_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
235 changes: 122 additions & 113 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,92 @@
# Configuration Guide

The AI Code Fusion uses a YAML configuration for file filtering. This document explains the available configuration options and best practices.
AI Code Fusion uses YAML configuration for file filtering. This document explains the available configuration options and best practices.

## Configuration Format

The application uses YAML format for its configuration:

```yaml
# File extensions to include (with dot)
include_extensions:
- .py
- .ts
- .js
- .md
- .ini
- .yaml
- .yml
- .kt
- .go
- .scm
- .php
The application uses YAML format for its configuration. Below is an example showing common configuration patterns:

### File extensions to include (with dot)

```
.py
.ts
.js
.md
.ini
.yaml
.yml
.kt
.go
.scm
.php

# Patterns to exclude (using fnmatch syntax)
exclude_patterns:
# Version Control
- '**/.git/**'
- '**/.svn/**'
- '**/.hg/**'
- '**/vocab.txt'
- '**.onnx'
- '**/test*.py'

# Dependencies
- '**/node_modules/**'
- '**/venv/**'
- '**/env/**'
- '**/.venv/**'
- '**/.github/**'
- '**/vendor/**'
- '**/website/**'

# Build outputs
- '**/test/**'
- '**/dist/**'
- '**/build/**'
- '**/__pycache__/**'
- '**/*.pyc'

# Config files
- '**/.DS_Store'
- '**/.env'
- '**/package-lock.json'
- '**/yarn.lock'
- '**/.prettierrc'
- '**/.prettierignore'
- '**/.gitignore'
- '**/.gitattributes'
- '**/.npmrc'

# Documentation
- '**/LICENSE*'
- '**/LICENSE.*'
- '**/COPYING'
- '**/CODE_OF**'
- '**/CONTRIBUTING**'

# Test files
- '**/tests/**'
- '**/test/**'
- '**/__tests__/**'
# Version Control
'**/.git/**'
'**/.svn/**'
'**/.hg/**'
'**/vocab.txt'
'**.onnx'
'**/test*.py'

# Dependencies
'**/node_modules/**'
'**/venv/**'
'**/env/**'
'**/.venv/**'
'**/.github/**'
'**/vendor/**'
'**/website/**'

# Build outputs
'**/test/**'
'**/dist/**'
'**/build/**'
'**/__pycache__/**'
'**/*.pyc'

# Config files
'**/.DS_Store'
'**/.env'
'**/package-lock.json'
'**/yarn.lock'
'**/.prettierrc'
'**/.prettierignore'
'**/.gitignore'
'**/.gitattributes'
'**/.npmrc'

# Documentation
'**/LICENSE*'
'**/LICENSE.*'
'**/COPYING'
'**/CODE_OF**'
'**/CONTRIBUTING**'

# Test files
'**/tests/**'
'**/test/**'
'**/__tests__/**'
```

## Configuration Options

### Include Extensions

The `include_extensions` section specifies file extensions that should be processed. Only files with these extensions will be considered for processing.
The `include_extensions` section specifies which file extensions should be processed. Only files with these extensions will be considered for processing.

Example:

```yaml
include_extensions:
- .py # Include Python files
- .js # Include JavaScript files
- .md # Include Markdown files
```
.py # Include Python files
.js # Include JavaScript files
.md # Include Markdown files
```

### Exclude Patterns

The `exclude_patterns` section specifies patterns for files and directories that should be excluded from processing, even if they have an included extension.
The `exclude_patterns` section defines patterns for files and directories that should be excluded from processing, even if they have a matching extension from the include list.

Patterns use the fnmatch syntax:

Expand All @@ -98,11 +96,10 @@ Patterns use the fnmatch syntax:

Example:

```yaml
exclude_patterns:
- '**/node_modules/**' # Exclude all node_modules directories
- '**/.git/**' # Exclude Git directories
- '**/test*.py' # Exclude Python files that start with 'test'
```
'**/node_modules/**' # Exclude all node_modules directories
'**/.git/**' # Exclude Git directories
'**/test*.py' # Exclude Python files that start with 'test'
```

## Best Practices
Expand All @@ -111,53 +108,65 @@ exclude_patterns:
2. **Group related patterns** with comments for better organization
3. **Be specific with extensions** to avoid processing unnecessary files
4. **Use the file preview** to verify your configuration is working as expected
5. **Check token counts** to ensure you stay within your model's context limit
5. **Check token counts** to ensure you stay within your model's context limits

## Common Configurations

Here are some typical configurations for different project types:

### For JavaScript/TypeScript Projects

```yaml
include_extensions:
- .js
- .jsx
- .ts
- .tsx
- .md
- .json

exclude_patterns:
- '**/node_modules/**'
- '**/dist/**'
- '**/build/**'
- '**/.cache/**'
- '**/coverage/**'
- '**/*.test.*'
- '**/*.spec.*'
#### include_extensions:

```
.js
.jsx
.ts
.tsx
.md
.json
```

#### #### exclude_patterns:

```
'**/node_modules/**'
'**/dist/**'
'**/build/**'
'**/.cache/**'
'**/coverage/**'
'**/*.test.*'
'**/*.spec.*'
```

### For Python Projects

```yaml
include_extensions:
- .py
- .md
- .yml
- .yaml
- .ini

exclude_patterns:
- '**/venv/**'
- '**/.venv/**'
- '**/__pycache__/**'
- '**/*.pyc'
- '**/tests/**'
- '**/.pytest_cache/**'
#### include_extensions:

```
.py
.md
.yml
.yaml
.ini
```

#### #### exclude_patterns:

```
'**/venv/**'
'**/.venv/**'
'**/__pycache__/**'
'**/*.pyc'
'**/tests/**'
'**/.pytest_cache/**'
```

## Troubleshooting

- **No files are processed**: Check that the file extensions match your project files
- **Too many files are processed**: Add more specific exclude patterns
- **Important files are excluded**: Check for conflicting exclude patterns
- **Token count is too high**: Add more exclude patterns to reduce the number of files
If you encounter issues with your configuration:

- **No files are processed**: Verify that your include extensions match your project's file types
- **Too many files are processed**: Add more specific exclude patterns to filter unwanted files
- **Important files are excluded**: Check for conflicting exclude patterns that might be too broad
- **Token count is too high**: Add more exclude patterns to reduce the number of processed files
Loading