Skip to content

Commit a63af4a

Browse files
committed
refactor(translator): remove frontmatter extraction, translate input as-is
- Remove _extract_markmap_content() method - Translate whatever content is provided without extraction or filtering - Simple translation tool: input what, translate what - Follow translation rules from prompt (preserve code blocks, links, etc.)
1 parent 545aff6 commit a63af4a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tools/ai-markmap-agent/src/agents/translator.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,17 @@ def _load_translation_prompt(self, prompt_file: Path) -> str:
9393

9494
def translate(self, content: str, output_type: str) -> str:
9595
"""
96-
Translate Markmap content from source to target language.
96+
Translate content from source to target language.
97+
98+
This is a simple translation tool: input what, translate what.
99+
No content extraction or filtering is performed.
97100
98101
Args:
99-
content: Markdown content to translate
102+
content: Content to translate (will be translated as-is)
100103
output_type: Type of output ("general" or "specialist")
101104
102105
Returns:
103-
Translated markdown content
106+
Translated content
104107
"""
105108
# Validate input content
106109
if content is None:
@@ -145,6 +148,7 @@ def translate(self, content: str, output_type: str) -> str:
145148
)
146149

147150
# Build full prompt with content
151+
# Translate whatever is provided (input what, translate what)
148152
prompt = f"""{prompt_template_str}
149153
150154
---

0 commit comments

Comments
 (0)