MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / format_list_line

Function format_list_line

agents/query_issues.py:182–198  ·  view source on GitHub ↗

Compact one-line summary for list view, with date and key metadata.

(issue: dict)

Source from the content-addressed store, hash-verified

180
181
182def format_list_line(issue: dict) -> str:
183 """Compact one-line summary for list view, with date and key metadata."""
184 labels = ", ".join(issue["labels"][:3]) if issue["labels"] else "-"
185 thumbs = issue["reactions"].get("THUMBS_UP", 0)
186 prs = [
187 t
188 for t in issue["timeline"]
189 if t["type"] == "CrossReferencedEvent"
190 and t.get("source_type") == "PullRequest"
191 and t.get("source_state") == "OPEN"
192 ]
193 pr_marker = f" PR#{prs[0]['source_number']}" if prs else ""
194 return (
195 f"#{issue['number']:<5d} {issue['updated_at'][:10]} "
196 f"[{labels}] {issue['comment_count']}c {thumbs}\u2191"
197 f"{pr_marker} {issue['title'][:70]}"
198 )
199
200
201def format_detail(issue: dict, brief: bool = False) -> str:

Callers 1

cmd_listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected