fix(agent): compare owned JSON values with dereferenced optional identity values

This commit is contained in:
cflmy committed 2026-11-18 09:39:53 +08:00
1 parent cf73fcf1ef
commit 633436e40f
1 file changed
+2 -2
+2 -2
View File
@@ -95,8 +95,8 @@ pub fn input_open(args: &Value) -> Result<Value, String> {
let same = meta["question"] == query
&& meta["options"] == labels
&& meta["source_revision"] == version
&& meta["session_id"] == args.get("session_id").unwrap_or(&Value::Null)
&& meta["principal_ref"] == args.get("principal_ref").unwrap_or(&Value::Null);
&& meta["session_id"] == *args.get("session_id").unwrap_or(&Value::Null)
&& meta["principal_ref"] == *args.get("principal_ref").unwrap_or(&Value::Null);
if same && existing["ok"] == true {
let status = existing["status"].as_str().unwrap_or("unknown");
return Ok(json!({