You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] compact latestAnswer: empty last step (plugin same-turn steer) folds the real answer into 用时 and leaves a blank transcript
#8002
Related: #6254 (compact fold picks the last assistant segment). This report is the worse sibling: when that last step has no user-visible text, compact shows no answer at all.
Environment
DSH desktop / Web GUI 0.1.7-rc.2 (@deepseek-ai/dsh-client-ui-chat@0.1.7-rc.2)
ui-chat.transcriptView: compact
macOS, DeepSeek Harness app
Trigger: a plugin same-turn agent.steer() whose user/message uses a non-usersource.kind (reproduced with dsh-memoir autodistill). The prompt asks the model not to emit any user-visible wrap-up text.
What happens
A worked turn produces a long assistant answer (tools + prose). The plugin then steers one extra step in the same turn. That step may call tools and/or produce an empty assistant message.
After the turn closes, compact UI shows:
The original user bubble
A collapsed 「用时 …」 process disclosure
No assistant body
The long answer is still in the session log. Expanding 「用时」 reveals it. From the user’s point of view the agent “replied with nothing”.
If that last step has no visible prose (or only tool-call blocks), this returns null. processSpec then sets answerAnchorSeq / answerStep to null. With foldCompletedTurns, every earlier assistant node becomes a process member and is hidden behind 「用时」.
Session V4 already hides the steer prompt: source.kind !== "user" is classified as context, and isVisibleChatNode drops ordinary context. That hide seam does not apply when choosing the turn’s answer. Plugin identity on the steer (source.kind === 'dsh-memoir' in our case) never reaches latestAnswer.
#6254 is the same function when the last step does have a short closing sentence (that sentence stays visible, earlier prose folds). Empty last step is the null-answer path of the same bug.
This is not memoir-specific. Any plugin that same-turn steer()s a silent follow-up will blank compact.
Expected
The last user-visible assistant prose in the turn should remain the compact answer. A silent plugin follow-up must not fold that prose into process or leave a blank transcript.
Suggested host fix (either is enough)
Walk latestAnswer backwards until a finalized assistant step has hasAssistantReplyContent and no tool-call blocks (empty/tool-only tail steps do not steal the answer).
And/or ignore steps whose opening user/message has a non-user plugin source.kind when computing the turn answer.
Reproduce
Compact transcript view.
Complete a top-level turn that calls tools and then writes a long assistant answer.
Before the turn commits, steer() a user-role message with source.kind other than user, instructing the model to call tools if needed and not to output user-visible text.
After the turn closes: 「用时」 only, long answer gone from the default view.
Happy to add a screenshot in a follow-up comment if the web UI allows attachments.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Related: #6254 (compact fold picks the last assistant segment). This report is the worse sibling: when that last step has no user-visible text, compact shows no answer at all.
Environment
@deepseek-ai/dsh-client-ui-chat@0.1.7-rc.2)ui-chat.transcriptView: compactagent.steer()whoseuser/messageuses a non-usersource.kind(reproduced withdsh-memoirautodistill). The prompt asks the model not to emit any user-visible wrap-up text.What happens
A worked turn produces a long assistant answer (tools + prose). The plugin then steers one extra step in the same turn. That step may call tools and/or produce an empty assistant message.
After the turn closes, compact UI shows:
The long answer is still in the session log. Expanding 「用时」 reveals it. From the user’s point of view the agent “replied with nothing”.
Why (0.1.7-rc.2
ui-chatlib/client.js)latestAnsweronly reads the last step:If that last step has no visible prose (or only tool-call blocks), this returns
null.processSpecthen setsanswerAnchorSeq/answerStepto null. WithfoldCompletedTurns, every earlier assistant node becomes a process member and is hidden behind 「用时」.Session V4 already hides the steer prompt:
source.kind !== "user"is classified ascontext, andisVisibleChatNodedrops ordinary context. That hide seam does not apply when choosing the turn’s answer. Plugin identity on the steer (source.kind === 'dsh-memoir'in our case) never reacheslatestAnswer.#6254 is the same function when the last step does have a short closing sentence (that sentence stays visible, earlier prose folds). Empty last step is the null-answer path of the same bug.
This is not memoir-specific. Any plugin that same-turn
steer()s a silent follow-up will blank compact.Expected
The last user-visible assistant prose in the turn should remain the compact answer. A silent plugin follow-up must not fold that prose into process or leave a blank transcript.
Suggested host fix (either is enough)
latestAnswerbackwards until a finalized assistant step hashasAssistantReplyContentand no tool-call blocks (empty/tool-only tail steps do not steal the answer).user/messagehas a non-userpluginsource.kindwhen computing the turn answer.Reproduce
steer()a user-role message withsource.kindother thanuser, instructing the model to call tools if needed and not to output user-visible text.Happy to add a screenshot in a follow-up comment if the web UI allows attachments.
All reactions