From 654dd88f2b623bf629eae8d0beba3a2e3121049c Mon Sep 17 00:00:00 2001 From: zihanjian Date: Wed, 2 Jul 2025 16:42:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8page.tsx=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=86=85=E6=B5=8B=E7=89=88=E6=9C=AC=E6=8F=90=E7=A4=BA=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=EF=BC=8C=E6=9B=B4=E6=96=B0=E5=B0=8F=E7=BA=A2=E4=B9=A6?= =?UTF-8?q?=E4=BA=A4=E6=B5=81=E7=BE=A4=E9=93=BE=E6=8E=A5=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E5=8D=87=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- final_review_gate.py | 59 ++++++++++++++++++++++++++++++++++++++++++++ src/app/page.tsx | 25 ++++++++++++++++++- 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 final_review_gate.py diff --git a/final_review_gate.py b/final_review_gate.py new file mode 100644 index 0000000..326f6d9 --- /dev/null +++ b/final_review_gate.py @@ -0,0 +1,59 @@ +# final_review_gate.py +import sys +import os + +if __name__ == "__main__": + # Try to make stdout unbuffered for more responsive interaction. + # This might not work on all platforms or if stdout is not a TTY, + # but it's a good practice for this kind of interactive script. + try: + sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', buffering=1) + except Exception: + pass # Ignore if unbuffering fails, e.g., in certain environments + + try: + sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', buffering=1) + except Exception: + pass # Ignore + + print("--- FINAL REVIEW GATE ACTIVE ---", flush=True) + print("AI has completed its primary actions. Awaiting your review or further sub-prompts.", flush=True) + print("Type your sub-prompt, or one of: 'TASK_COMPLETE', 'Done', 'Quit', 'q' to signal completion.", flush=True) # MODIFIED + + active_session = True + while active_session: + try: + # Signal that the script is ready for input. + # The AI doesn't need to parse this, but it's good for user visibility. + print("REVIEW_GATE_AWAITING_INPUT:", end="", flush=True) + + line = sys.stdin.readline() + + if not line: # EOF + print("--- REVIEW GATE: STDIN CLOSED (EOF), EXITING SCRIPT ---", flush=True) + active_session = False + break + + user_input = line.strip() + + # Check for exit conditions + if user_input.upper() in ['TASK_COMPLETE', 'DONE', 'QUIT', 'Q']: # MODIFIED: Empty string no longer exits + print(f"--- REVIEW GATE: USER SIGNALED COMPLETION WITH '{user_input.upper()}' ---", flush=True) + active_session = False + break + elif user_input: # If there's any other non-empty input (and not a completion command) + # This is the critical line the AI will "listen" for. + print(f"USER_REVIEW_SUB_PROMPT: {user_input}", flush=True) + # If user_input was empty (and not a completion command), + # the loop simply continues, and "REVIEW_GATE_AWAITING_INPUT:" will be printed again. + + except KeyboardInterrupt: + print("--- REVIEW GATE: SESSION INTERRUPTED BY USER (KeyboardInterrupt) ---", flush=True) + active_session = False + break + except Exception as e: + print(f"--- REVIEW GATE SCRIPT ERROR: {e} ---", flush=True) + active_session = False + break + + print("--- FINAL REVIEW GATE SCRIPT EXITED ---", flush=True) \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index d126396..dde56f7 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1944,8 +1944,31 @@ export default function Home() { 让像素创意属于每一个人

+ {/* 新版本链接 - 内测版本提示 */} +
+
+ + + 🧪 内测版本 + + + + + + + + 体验新功能 + +
+
+ {/* 添加小红书交流群链接 */} -
+

发布平台请标注来源或保留图片水印及标识