# 🚀 CodeBuddy Code v2.48.0 Release

## ✨ New Features

### Image-to-Image Tool (ImageEdit)

New `ImageEdit` tool for AI-based editing and modification of existing images:
- Supports style transformation, element addition, color modification, and other image editing operations
- Use `/model:image-to-image` command to switch to image-to-image model
- Configure the default model via `CODEBUDDY_IMAGE_TO_IMAGE_MODEL` environment variable or `imageToImageModel` setting

### Prompt Hook

New LLM-based Hook type that supports defining trigger conditions using natural language for more flexible workflow control.

## 🔧 Improvements

- **Image API Refactoring**: Extracted shared `ImageApiClient` module to unify API call logic for text-to-image and image-to-image
- **Model Tag System**: Introduced `text-to-image` and `image-to-image` model tags, allowing the same model to have multiple image generation capabilities
- **Hook Configuration Panel**: Support for displaying and managing Prompt Hooks with optimized blocking message display
- **Token Calculation Accuracy**: `/context` command now only counts actually enabled tools, excluding disabled built-in tools and MCP tools
- **Plan Mode Permission Inheritance**: Plan mode now preserves permission settings from before entering, supporting combinations like "plan + bypass", with subagents also inheriting this permission configuration
- **Hot Reload Optimization**: Automatically detects and optimizes hot reload behavior in container environments with low FD limits, supports `CODEBUDDY_DISABLE_HOT_RELOAD` to completely disable hot reload
- **Windows Path Hints**: Added forward slash usage hints on Windows platform to avoid path parsing errors caused by backslashes
- **WorkBuddy Configuration Separation**: WorkBuddy now uses an independent `.workbuddy/` configuration directory, separated from CLI's `.codebuddy/`

## 🐛 Bug Fixes

- **ACP Cancellation Handling**: Optimized event delivery mechanism for cancel requests, ensuring sessions can correctly respond to cancellation operations
- **MCP Non-Interactive Mode**: Fixed issue where MCP tools were not correctly identified as non-interactive mode in ACP mode
- **Memory Context Injection**: Fixed missing system tags when injecting memory prompts
- **Directory Scanning**: Fixed incorrect relative path calculation for files in symlinked directories
