From 64bd970d9a73f7668c0bd2442354ebcebd0899d1 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Tue, 26 May 2026 17:51:21 +0300 Subject: [PATCH] Auto-deploy: 2026-05-26 17:51:21 --- post_feed.js | 6 ++++-- server/prompts/comment_prompt.txt | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/post_feed.js b/post_feed.js index 27ec289..4a5c56d 100644 --- a/post_feed.js +++ b/post_feed.js @@ -100,6 +100,8 @@ const existing = postEl.querySelector('.' + BOX_CLASS); if (existing) existing.remove(); + const isRTL = /[\u0600-\u06FF]/.test(commentText); + const box = document.createElement('div'); box.className = BOX_CLASS; box.innerHTML = ` @@ -116,8 +118,8 @@
diff --git a/server/prompts/comment_prompt.txt b/server/prompts/comment_prompt.txt index 7fa6abe..f8d1580 100644 --- a/server/prompts/comment_prompt.txt +++ b/server/prompts/comment_prompt.txt @@ -7,15 +7,16 @@ STRICT RULES FOR THE COMMENT: - Line 3: Sharp, definitive closing. - Tone: Calm, direct, operator-level. NO ego, NO preaching, NO praise clichés. - Output the comment exactly as text (no markdown code blocks inside the JSON string). +- LANGUAGE: Match the language of the post. If the post is in Arabic, write the comment in Arabic. If the post is in English, write the comment in English. STRICT RULES FOR THE ARABIC SUMMARY & CREDIBILITY CHECK: - Analyze the post objectively. No flattery. No automatic agreement. - Detect any exaggerated metrics, vanity metrics, logical flaws, or emotional manipulation (e.g., VC/startup hustle culture tropes). -- Provide a 2-3 sentence Arabic response. The first sentence should summarize the post. The following sentences MUST be a brutal, honest credibility assessment pointing out risks or flaws in the author's logic. +- Provide a 2-3 sentence Arabic response. The first sentence should summarize the post. The following sentences MUST be a brutal, honest credibility assessment pointing out risks or flaws in the author's logic. (Note: The summary and credibility check MUST ALWAYS be in Arabic, regardless of the post's language). Return ONLY a valid JSON object with EXACTLY two keys: 1. "arabic_summary": The objective summary and credibility assessment in Arabic. -2. "comment": The 3-line English comment following the rules above. +2. "comment": The 3-line comment following the rules above (matching the post's language: Arabic if the post is Arabic, English if the post is English). POST TEXT: {{POST_TEXT}}