Files
Bingxi Zhao (Frank) 04040a2c06 release: v1.6.5
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.

Release notes: assets/releases/ver1-6-5.md
2026-09-06 13:46:29 +08:00

15 lines
375 B
Python

"""Shared text shaping for the notebook agents."""
from __future__ import annotations
def clip_text(value: str, limit: int) -> str:
"""Trim prose to *limit* characters, saying so when anything was cut."""
text = str(value or "").strip()
if len(text) <= limit:
return text
return text[:limit].rstrip() + "\n...[truncated]"
__all__ = ["clip_text"]