MCPcopy Create free account
hub / github.com/Louisym/MiniCC / _first_text

Function _first_text

mini_claude_code/compact.py:162–167  ·  view source on GitHub ↗

取消息第一个非空文本 block。源码: compact.rs:281-288

(msg: Message)

Source from the content-addressed store, hash-verified

160
161
162def _first_text(msg: Message) -> Optional[str]:
163 """取消息第一个非空文本 block。源码: compact.rs:281-288"""
164 for block in msg.content:
165 if isinstance(block, TextContentBlock) and block.text.strip():
166 return block.text
167 return None
168
169
170# ============================================================

Callers 3

_infer_pending_workFunction · 0.70
_infer_current_workFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected