auto-sync: 2026-05-17 06:06:12

This commit is contained in:
cfdaily
2026-05-17 06:06:12 +08:00
parent f74fae6d97
commit 485d7a7d36
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -103,6 +103,8 @@ class BootstrapBuilder:
if skill_descriptions:
layers.append(self._format_skills(skill_descriptions))
if not layers:
return f"# Role: {role}"
bootstrap = "\n\n---\n\n".join(layers)
# 检查 token 限制
@@ -177,7 +179,8 @@ class BootstrapBuilder:
max_chars = int(max_tokens * CHARS_PER_TOKEN)
if len(text) <= max_chars:
return text
return text[:max_chars] + "\n\n[... bootstrap truncated]"
trunc_marker = "\n\n[... bootstrap truncated]"
return text[:max_chars - len(trunc_marker)] + trunc_marker
def build_for_task(
self,