resolve warning

This commit is contained in:
2026-07-16 11:12:53 +08:00
parent 701b2338c7
commit bee9e6ee8a
2 changed files with 22 additions and 17 deletions
@@ -1,8 +1,11 @@
use crate::editor_generation_config::{
EditorGenerationPricingConfig, load_editor_generation_pricing_from_paths,
EditorGenerationPricingConfig,
};
#[cfg(test)]
use crate::editor_generation_config::load_editor_generation_pricing_from_paths;
#[cfg(test)]
use platform_editor_agent::agent::asset::ImageId;
#[cfg(test)]
use platform_editor_agent::agent::tools::context::EditorToolContext;
use platform_editor_agent::agent::tools::edit_image::{EditImageTool, EditImageToolArgs};
use platform_editor_agent::agent::tools::generate_background_music::{
@@ -24,6 +27,7 @@ use platform_editor_agent::agent::tools::generate_video::{
};
use platform_editor_agent::framework::tool::Tool;
use platform_image::GPT_IMAGE_2_MODEL;
#[cfg(test)]
use std::collections::HashMap;
#[cfg(test)]
@@ -236,7 +240,7 @@ impl EditorAgentPricedTool for GenerateSoundEffectTool {
fn pricing(
&self,
pricing: &EditorGenerationPricingConfig,
args: &GenerateSoundEffectToolArgs,
_args: &GenerateSoundEffectToolArgs,
) -> u32 {
pricing.sound_effect_model_mud_points(None)
}
@@ -89,21 +89,22 @@ impl IntoImageId for EditorAssetRecord {
}
}
pub trait IntoResourceId {
fn into_resource_id(self) -> String;
}
impl IntoResourceId for EditorProjectResourceRecord {
fn into_resource_id(self) -> String {
self.resource_id
}
}
impl IntoResourceId for EditorAssetRecord {
fn into_resource_id(self) -> String {
self.asset_id
}
}
// TODO resource id is not traced by now
// pub trait IntoResourceId {
// fn into_resource_id(self) -> String;
// }
//
// impl IntoResourceId for EditorProjectResourceRecord {
// fn into_resource_id(self) -> String {
// self.resource_id
// }
// }
//
// impl IntoResourceId for EditorAssetRecord {
// fn into_resource_id(self) -> String {
// self.asset_id
// }
// }
#[cfg(test)]
mod image_id_tests {