feat(tui): add compact image paste placeholders - #418
Draft
onychen wants to merge 4 commits into
Draft
Conversation
tt-a1i
requested changes
Sep 6, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the current head 9c7f9ba. The compact placeholders and atomic deletion address a useful TUI problem, but attachment ownership still breaks across submission paths. Please address the two inline findings before merging.
Validation: the 11 image-paste/editor-layer tests pass locally, and all three required CI jobs are green. Additional minimal reproductions using Pi 0.85.1's actual InteractiveMode.flushCompactionQueue and ExtensionRunner.emitInput methods reproduce both findings. These are programmatic lifecycle reproductions, not visual TUI acceptance or live provider calls.
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.
问题
关联 #413。
在 TUI 中粘贴图片时,输入框会显示冗长的临时文件路径,影响提示词的阅读和编辑,多图场景下尤其明显。
价值
[Image #N]展示粘贴的图片。实现方案
[Image #N],并在当前草稿中维护占位符与图片文件的对应关系。[Image #N],同时释放关联的临时图片。input事件中读取图片并生成ImageContent,与已有图片载荷合并后交给模型。[Image #N],确保用户侧消息与输入时的内容一致。验证
[Image #1],模型能够正常读取图片。影响
改动仅影响 TUI 交互式图片粘贴。
已知限制:Pi 在会话压缩期间排队的消息可能绕过原生

input事件,仅保留文本。该问题需要进一步讨论,因此暂不关闭 #413。