fix:优化工作面板,支持动态字数

This commit is contained in:
Daniel
2026-04-21 13:14:53 +08:00
parent e69666dbb3
commit d76c7fa25a
6 changed files with 159 additions and 26 deletions

View File

@@ -292,7 +292,7 @@ async def rewrite(req: RewriteRequest, request: Request):
src = req.source_text or ""
logger.info(
"api_rewrite_in rid=%s source_chars=%d title_hint_chars=%d tone=%s audience=%s "
"keep_points_chars=%d avoid_words_chars=%d",
"keep_points_chars=%d avoid_words_chars=%d target_body_chars=%d",
rid,
len(src),
len(req.title_hint or ""),
@@ -300,6 +300,7 @@ async def rewrite(req: RewriteRequest, request: Request):
req.audience,
len(req.keep_points or ""),
len(req.avoid_words or ""),
int(req.target_body_chars or 500),
)
result = rewriter.rewrite(req, request_id=rid)
tr = result.trace or {}