Skip to content

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

fix(polymarket): truncate cleaned q, not raw question, in label fallback

Matt Van Horne5354f702a83
diff --git a/skills/last30days/scripts/lib/polymarket.py b/skills/last30days/scripts/lib/polymarket.py
index eb32f226..87a5d96b 100644
--- a/skills/last30days/scripts/lib/polymarket.py
+++ b/skills/last30days/scripts/lib/polymarket.py
@@ -494,7 +494,7 @@ def _shorten_question(question: str) -> str:
if m and len(m.group(1).split()) <= 4:
return m.group(1).strip()
# Fallback: truncate, dropping a leading article so the name doesn't read "an"/"the"
- text = question[:40] if len(question) > 40 else question
+ text = q[:40] if len(q) > 40 else q
return re.sub(r"^(?:a|an|the)\s+", "", text, flags=re.I)