Skip to content

fix: [Agent] Debug Interface: Global parameters for the "Start" node are not displayed, and the "System Prompt" in the AI conversation node appears empty. - #7766

Merged
shaohuzhang1 merged 1 commit into
v3from
pr@v3@fix_ai_node
Nov 9, 2026
Merged

shaohuzhang1 merged 1 commit into
v3from
pr@v3@fix_ai_node

Conversation

@shaohuzhang1

Copy link
Copy Markdown
Contributor

fix: [Agent] Debug Interface: Global parameters for the "Start" node are not displayed, and the "System Prompt" in the AI conversation node appears empty.

…are not displayed, and the "System Prompt" in the AI conversation node appears empty.
"system": self.data.get("system"),
}
)
return details

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here’s a review of the provided diff:

Code

@@ -798,6 +798,7 @@ def get_details(self, index: int = 0, position: dict = None, old_details: dict =
             "answer_tokens": self.data.get("answer_tokens"),
             "history_message": self.get_context("history_message"),
             "messages": messages,
+            "system": self.data.get("system"),
         }
     )
     return details

Observations

  1. Consistency is good — Using self.data.get("system") matches the pattern used for "answer_tokens", so no style issue there.

  2. Redundancy risk — If get_context() already includes the system prompt (or if messages embeds it), adding "system" separately may duplicate data downstream. Verify whether consumers of details expect a separate system key or rely on messages.

  3. Downstream impact — Adding a new key to the returned details dict can break strict schema validators, snapshot tests, or serializers that don't allow unexpected fields. Check callers of get_details().

  4. Key ordering / diff hygiene — Placing "system" after "messages" is fine functionally, but consider grouping related fields together (e.g., put "system" before "messages" for readability), since the system prompt semantically precedes the message list.

  5. Default-argument issue (pre-existing) — position: dict = None uses a mutable-default anti-pattern signal. It's None, so it's safe, but typing could be improved to Optional[dict] = None.

  6. Missing type/Optional annotation — Minor; not introduced by this change.

  7. No test shown — Add/extend a unit test asserting that "system" is present and populated when self.data["system"] is set, and None otherwise.

  8. Performance — Negligible; one extra dict lookup.

Recommendation

The change itself is low-risk syntactically. The main things to confirm:

  • Consumers of details tolerate the new "system" key.
  • No duplication with messages / history_message.
  • A test covers both the present and absent (None) cases.

If those hold, the diff is fine as-is.

@shaohuzhang1
shaohuzhang1 merged commit f6340c1 into v3 Nov 9, 2026
3 of 4 checks passed
@shaohuzhang1
shaohuzhang1 deleted the pr@v3@fix_ai_node branch November 9, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant