From 3d8770b5de4d73ce2dbbd0a25cde0244320330af Mon Sep 17 00:00:00 2001
From: Xinfan Chen <2024111082@stu.hit.edu.cn>
Date: Tue, 26 May 2026 09:22:47 +0800
Subject: [PATCH] feat: add global visual style prompt injection

---
 video-claw/video-claw/backend/core/agents/base_agent.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/video-claw/video-claw/backend/core/agents/base_agent.py b/video-claw/video-claw/backend/core/agents/base_agent.py
index 213412e..c00e340 100644
--- a/video-claw/video-claw/backend/core/agents/base_agent.py
+++ b/video-claw/video-claw/backend/core/agents/base_agent.py
@@ -85,6 +85,16 @@
         self._check_cancel()
         return result
 
+    def _get_style_prompt(self, style_name: str) -> str:
+        """从 prompts/style/{style_name}.txt 读取对应的视觉提示词"""
+        import os
+        style_file = os.path.join('prompts', 'style', f"{style_name}.txt")
+        if os.path.exists(style_file):
+            with open(style_file, 'r', encoding='utf-8') as f:
+                return f.read().strip()
+        # Fallback to English style name if file doesn't exist
+        return style_name + " style"
+
     # -------- 抽象方法 --------
 
     @abstractmethod

--
Gitblit v1.8.0