From 49e88bbd9f420595e2d2cf6a96e11d027adad867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 11 Sep 2026 21:55:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=88=86=E7=A6=BB=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=A4=87=E6=B3=A8=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 复用模型层的重做备注字符上限 导出提示文本清理函数供投影复用 --- .../src/ui_editor/commands/separation/model/note.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/note.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/note.rs index cb1df4fd7..1c3065627 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/note.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/commands/separation/model/note.rs @@ -1,9 +1,7 @@ use serde::{Deserialize, Serialize}; use ts_rs::TS; -const MAX_PROMPT_NOTE_CHARS: usize = 512; - -fn sanitize_prompt_text(value: &str) -> String { +pub(crate) fn sanitize_prompt_text(value: &str) -> String { value .chars() .filter_map(|character| { @@ -15,7 +13,7 @@ fn sanitize_prompt_text(value: &str) -> String { Some(character) } }) - .take(MAX_PROMPT_NOTE_CHARS) + .take(super::MAX_REWORK_NOTE_CHARS) .collect() }