Repository navigation
feat(chat): continue Markdown lists on new lines in the composer - #884
Merged
Merged
Conversation
Inserting a line break inside a list item starts the next item: ordered numbers advance and keep their delimiter, bullets and task items repeat (checked tasks continue unchecked), and indentation is preserved. A line break on an empty item clears the marker and ends the list. Chinese enumerations such as "1、" continue as well. The composer listens for the textarea's native insertLineBreak input, so desktop Shift+Enter and mobile Enter share one path while sends and IME confirmations are untouched. Lines inside fenced code, thematic breaks and selections keep the native newline, and the edit stays on the undo stack. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Sep 29, 2026
Kano-u
pushed a commit
to Kano-u/pi-web
that referenced
this pull request
Oct 2, 2026
…gr#884) Inserting a line break inside a list item starts the next item: ordered numbers advance and keep their delimiter, bullets and task items repeat (checked tasks continue unchecked), and indentation is preserved. A line break on an empty item clears the marker and ends the list. Chinese enumerations such as "1、" continue as well. The composer listens for the textarea's native insertLineBreak input, so desktop Shift+Enter and mobile Enter share one path while sends and IME confirmations are untouched. Lines inside fenced code, thematic breaks and selections keep the native newline, and the edit stays on the undo stack. Co-authored-by: Claude Opus 5 <[email protected]> (cherry picked from commit fd037e4)
Kano-u
pushed a commit
to Kano-u/pi-web
that referenced
this pull request
Oct 2, 2026
Kano-u
pushed a commit
to Kano-u/pi-web
that referenced
this pull request
Oct 2, 2026
Kano-u
pushed a commit
to Kano-u/pi-web
that referenced
this pull request
Oct 2, 2026
…#907 agegr#941 agegr#946 agegr#961 agegr#968 agegr#969 agegr#1007 agegr#1008 agegr#1009 agegr#1010) 上游已把我们提前摘取的 agegr#884 / agegr#871 / agegr#996 / agegr#961 原样合并(agegr#961 逐字节相同), agegr#967 与 agegr#963 由上游的 agegr#1009 / agegr#1008 接管。 冲突解决: - demo/ 对齐上游 fe288c0,撤销 agegr#963 对 demo 的两处改动(`@/lib/chat-phase-label` 在 demo/lib 下不存在,会打断 Pages 构建)。 - AGENTS.md:保留我们的 default-project 条目,open-folder 换成上游的 open-in-explorer。 - MessageView.tsx / SessionSidebar.tsx / FileExplorer.tsx:以上游为准, DismissButton 采用上游的独立文件,保留我们的思考卡片与文件管理改动。 - SessionSidebar 移除引用已删函数的旧 agegr#951 工作区按钮(agegr#951 的其他入口另行收尾)。
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 6, 2026
…gr#884) Inserting a line break inside a list item starts the next item: ordered numbers advance and keep their delimiter, bullets and task items repeat (checked tasks continue unchecked), and indentation is preserved. A line break on an empty item clears the marker and ends the list. Chinese enumerations such as "1、" continue as well. The composer listens for the textarea's native insertLineBreak input, so desktop Shift+Enter and mobile Enter share one path while sends and IME confirmations are untouched. Lines inside fenced code, thematic breaks and selections keep the native newline, and the edit stays on the undo stack. Co-authored-by: Claude Opus 5 <[email protected]>
windli2018
pushed a commit
to aiti-ai/aiti-ai
that referenced
this pull request
Nov 8, 2026
…gr#884) Inserting a line break inside a list item starts the next item: ordered numbers advance and keep their delimiter, bullets and task items repeat (checked tasks continue unchecked), and indentation is preserved. A line break on an empty item clears the marker and ends the list. Chinese enumerations such as "1、" continue as well. The composer listens for the textarea's native insertLineBreak input, so desktop Shift+Enter and mobile Enter share one path while sends and IME confirmations are untouched. Lines inside fenced code, thematic breaks and selections keep the native newline, and the edit stays on the undo stack. Co-authored-by: Claude Opus 5 <[email protected]>
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.
Summary
1.→2.,1)→2), zero padding kept);-,*and+bullets repeat; task items continue unchecked (- [x]→- [ ]); indentation is preserved for nested items1、continue as well (up to three digits, so lines such as2020、2021年…are left alone)Behavior
The composer listens for the textarea's native
insertLineBreakinput instead of a key combination, so the same path covers desktopShift+Enterand mobileEnter. Sending (Enteron desktop,Ctrl/Cmd+Enteron mobile), slash/@/history menu selection and IME confirmations never produce that input and are unchanged.A plain newline is kept when:
---,* * *,- - -)```or~~~)The edit is applied with
insertText, so it stays on the browser's undo stack (oneCtrl/Cmd+Zremoves the inserted marker) and flows through the existingonChangepath for drafts, the @ picker and resizing.Validation
npm test— 1045 tests passed (newlib/markdown-list-continuation.test.mjscovers ordered, bullet, task, nested, split-at-caret, empty-item exit, Chinese enumerations, non-list lines, caret inside the marker, fenced code and selections)node_modules/.bin/tsc --noEmitnpm run lintgit diff --checkShift+Entercontinuation for ordered, task and1、lists; empty item ends the list; one undo restores the text before the line break; a non-list line still gets a plain newline; at a 390px mobile viewport, plainEntercontinues1)lists and exits on an empty item🤖 Generated with Claude Code