Repository navigation
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
Conversation
…are not displayed, and the "System Prompt" in the AI conversation node appears empty.
| "system": self.data.get("system"), | ||
| } | ||
| ) | ||
| return details |
There was a problem hiding this comment.
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 detailsObservations
-
Consistency is good — Using
self.data.get("system")matches the pattern used for"answer_tokens", so no style issue there. -
Redundancy risk — If
get_context()already includes the system prompt (or ifmessagesembeds it), adding"system"separately may duplicate data downstream. Verify whether consumers ofdetailsexpect a separatesystemkey or rely onmessages. -
Downstream impact — Adding a new key to the returned
detailsdict can break strict schema validators, snapshot tests, or serializers that don't allow unexpected fields. Check callers ofget_details(). -
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. -
Default-argument issue (pre-existing) —
position: dict = Noneuses a mutable-default anti-pattern signal. It'sNone, so it's safe, but typing could be improved toOptional[dict] = None. -
Missing type/
Optionalannotation — Minor; not introduced by this change. -
No test shown — Add/extend a unit test asserting that
"system"is present and populated whenself.data["system"]is set, andNoneotherwise. -
Performance — Negligible; one extra dict lookup.
Recommendation
The change itself is low-risk syntactically. The main things to confirm:
- Consumers of
detailstolerate 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.
fix: [Agent] Debug Interface: Global parameters for the "Start" node are not displayed, and the "System Prompt" in the AI conversation node appears empty.