logancyang_obsidian-copilot/docs/plans/archive
Zero Liu bd60f10f56
fix(agent-mode): copy/insert the full agent response, not just trailing prose (#166) (#2616)
* docs(plan): fix copying all text parts of an agent response (#166)

Otacon-approved plan for issue logancyang/obsidian-copilot-preview#166:
agentResponseText collects every text part, not just the trailing run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-mode): copy/insert the full agent response, not just trailing prose (#166)

Copy and Insert/Replace acted on finalAnswerText, which reused
splitTrailingText and kept only the last contiguous run of text parts —
so a 'text -> thought -> text' turn dropped the earlier prose. Rename the
helper to agentResponseText and have it collect every non-empty text part
in stream order (joined with blank lines, then cleanMessageForCopy).
splitTrailingText is untouched, so the 'Worked for X' folding is unchanged.

Fixes logancyang/obsidian-copilot-preview#166

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(plan): archive completed plan for #166

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* update docs

* test(agent-mode): clarify interleaved-prose fixture wording (#166)

The flipped test reused fixture strings that said the early prose 'should
NOT be copied', which now contradicts the assertion (it is copied). Reword
the strings to describe the new behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 19:44:04 -07:00
..
2026-06-16-fix-copy-all-text-parts-agent-response.md fix(agent-mode): copy/insert the full agent response, not just trailing prose (#166) (#2616) 2026-06-29 19:44:04 -07:00