feat: add chat replay verification
This commit is contained in:
@@ -63,7 +63,10 @@ def scan_tool_output(text: str, label: str):
|
||||
|
||||
|
||||
def run_mode(args, binding, loop_run=None, scan_output_label=""):
|
||||
r = subprocess.run(args, cwd=ROOT, capture_output=True, text=True)
|
||||
env = os.environ.copy()
|
||||
if loop_run is not None:
|
||||
env["CASAN_CHAT_LOOP_RUN_JSON"] = json.dumps(loop_run, ensure_ascii=False, sort_keys=True)
|
||||
r = subprocess.run(args, cwd=ROOT, capture_output=True, text=True, env=env)
|
||||
if scan_output_label:
|
||||
scan_rc, scan_msg = scan_tool_output(r.stdout + "\n" + r.stderr, scan_output_label)
|
||||
if scan_rc != 0:
|
||||
|
||||
Reference in New Issue
Block a user