Files
hcie-rust-v3.05/hcie-egui-app/crates/hcie-gui-egui/src/app/ai_config.rs
T
phantom 07a9b35208 feat: Add theme and font management for egui GUI
- Introduced `theme.rs` to handle visual themes, font discovery, and application of theme colors.
- Implemented system font registration for Linux, macOS, and Windows.
- Added `apply_theme` function to configure egui visuals based on selected theme presets.

feat: Implement interactive tool state management

- Created `tool_state.rs` to manage runtime tool, selection, and transform states.
- Defined `ToolState` struct to encapsulate active tool, color settings, drawing states, and AI panel states.
- Included functionality for managing brush presets, text editing, and selection transformations.

feat: Add utility functions for image and file handling

- Developed `utils.rs` with stateless helper functions for color formatting, drawing icons, and cropping images.
- Implemented save dialog builders and error handling for file operations.
- Added flood fill functionality for composite RGBA pixels.

test: Add unit test for bitmap brush stamp functionality

- Created `bitmap_brush_stamp.rs` to verify the behavior of bitmap brush stamping in the engine.
- Ensured that the painted area matches expected dimensions and characteristics.
2026-07-10 01:23:47 +03:00

61 lines
1.7 KiB
Rust

//! AI chat and ComfyUI/vision configuration types.
//!
//! These small data-only structs describe the state used by the AI Assistant
//! panel and the optional ComfyUI/vision backend. They are grouped here so the
//! larger `ToolState` does not need to define them inline.
/// A single chat message in the AI Assistant panel.
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)]
pub struct AiChatMessage {
pub role: String,
pub content: String,
}
/// URL/model pair used by the built-in AI chat client.
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)]
pub struct AiChatConfig {
pub url: String,
pub model: String,
}
/// Last known ComfyUI server status.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum ComfyStatus {
#[default]
Unknown,
Running,
Error,
}
/// ComfyUI server endpoint configuration.
#[derive(Clone, Debug, Default, serde::Serialize, serde::Deserialize)]
pub struct ComfyConfig {
pub url: String,
}
/// Which ComfyUI workflow variant is active.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum ComfyMode {
#[default]
Normal,
ObjectRemoval,
}
/// High-level vision/AI task selected in the UI.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum VisionTask {
#[default]
Segmentation,
BackgroundRemoval,
Inpainting,
SuperResolution,
}
/// Preferred execution backend for vision pipelines.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub enum VisionBackend {
#[default]
Cpu,
Gpu,
}