fix: truncate auto-populated description to prevent 400-char limit error (#28681)

This commit is contained in:
Shua Chen 2025-12-12 11:19:53 +08:00 committed by GitHub
parent 87c4b4c576
commit 61ee1b9094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -111,7 +111,11 @@ class App(Base):
else:
app_model_config = self.app_model_config
if app_model_config:
return app_model_config.pre_prompt
pre_prompt = app_model_config.pre_prompt or ""
# Truncate to 200 characters with ellipsis if using prompt as description
if len(pre_prompt) > 200:
return pre_prompt[:200] + "..."
return pre_prompt
else:
return ""