fix(summoner): preserve user-set agent name after summon completes#570
Open
teexiii wants to merge 3 commits intonextlevelbuilder:mainfrom
Open
fix(summoner): preserve user-set agent name after summon completes#570teexiii wants to merge 3 commits intonextlevelbuilder:mainfrom
teexiii wants to merge 3 commits intonextlevelbuilder:mainfrom
Conversation
Contributor
|
UX concern đã được fix trong commit ecf6463: Trước: Summon/regenerate/resummon ghi đè Sau: Nếu user đã đặt tên custom → giữ nguyên |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When creating a predefined agent with a custom name, the name was
overwritten in two places once summoning completed:
display_namein the DB was replaced by the LLM-extracted name fromIDENTITY.md (e.g. "Tiểu La"), ignoring the user's input.
agent introduced itself with that name regardless of what was stored
in
display_name.Root cause
finishSummonunconditionally appliedextractIdentityName(identityContent)to the
display_nameupdate map with no check for an existing value.Even if the user had set a name at creation time, both the DB field and
the IDENTITY.md persona file ended up with whatever name the LLM chose.
Fix
Only update
display_nameif it is empty (user did not provide one).rewrite the
Name:line in IDENTITY.md viareplaceIdentityName()sothe agent's persona file matches the user's intended name.
ResummonAgent) is left unchanged — when explicitlyrebuilding a persona, updating the name is expected.
Result
An agent created as "La Alilala" will have both
display_name = "La Alilala"and
Name: La Alilalain IDENTITY.md after summoning completes, and willintroduce itself with the correct name in chat.