MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _chat_title_from_content

Function _chat_title_from_content

skills/storage-helper/scripts/db_ops.py:269–275  ·  view source on GitHub ↗
(content: str, max_chars: int = 48)

Source from the content-addressed store, hash-verified

267
268
269def _chat_title_from_content(content: str, max_chars: int = 48) -> str:
270 title = " ".join(str(content or "").split())
271 if not title:
272 return "新对话"
273 if len(title) <= max_chars:
274 return title
275 return title[: max(1, max_chars - 3)].rstrip() + "..."
276
277
278def _chat_session_row(row: sqlite3.Row) -> Dict[str, Any]:

Callers 2

create_chat_sessionFunction · 0.85
save_chat_messageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected