An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Support appending a list item to the end of the current list https://github.com/siyuan-note/siyuan/issues/17635
Daniel97a8b8c77662
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.jsonindex 24de03b4e1..ce2bfe8fe6 100644--- a/app/appearance/langs/ar.json+++ b/app/appearance/langs/ar.json@@ -1,4 +1,5 @@{+ "appendListItem": "إضافة عنصر قائمة إلى نهاية القائمة الحالية","secretAllowedHosts": "النطاقات المسموح بها","secretAllowedHostsTip": "أسماء المضيفات التي يمكن إرسال هذا السر إليها، مفصولة بفواصل، مثل api.example.com؛ اتركها فارغة لرفض جميع الطلبات، ولا يتم إدراج الأسرار في عنوان URL للطلب أبدًا","editorMarkdownInlineFullWidthStrikethrough": "بناء الشطب بعرض كامل",diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.jsonindex f9655ff9c5..48954b3e75 100644--- a/app/appearance/langs/de.json+++ b/app/appearance/langs/de.json@@ -1,4 +1,5 @@{+ "appendListItem": "Listenelement am Ende der aktuellen Liste hinzufügen","secretAllowedHosts": "Zulässige Hosts","secretAllowedHostsTip": "Hostnamen, an die dieses Secret gesendet werden darf, durch Kommas getrennt, z. B. api.example.com; leer lassen, um alle Anfragen zu verweigern, und Secrets werden niemals in die Anforderungs-URL interpoliert","editorMarkdownInlineFullWidthStrikethrough": "Vollbreite-Durchstreichsyntax",diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.jsonindex 5e80085830..a0a436a16e 100644--- a/app/appearance/langs/en.json+++ b/app/appearance/langs/en.json@@ -1,4 +1,5 @@{+ "appendListItem": "Add a list item to the end of the current list","secretAllowedHosts": "Allowed hosts","secretAllowedHostsTip": "Hostnames this secret may be sent to, separated by commas, e.g. api.example.com; leave empty to deny all requests, and secrets are never interpolated into the request URL","editorMarkdownInlineFullWidthStrikethrough": "Full-width strikethrough syntax",diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.jsonindex 5cd6f3754d..402af3bf07 100644--- a/app/appearance/langs/es.json+++ b/app/appearance/langs/es.json@@ -1,4 +1,5 @@{+ "appendListItem": "Añadir un elemento al final de la lista actual","secretAllowedHosts": "Hosts permitidos","secretAllowedHostsTip": "Nombres de host a los que se puede enviar este secreto, separados por comas, p. ej. api.example.com; déjelo vacío para denegar todas las solicitudes, y los secretos nunca se interpolan en la URL de la solicitud","editorMarkdownInlineFullWidthStrikethrough": "Sintaxis de tachado de ancho completo",diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.jsonindex 8929cc621b..3a97be8b06 100644--- a/app/appearance/langs/fr.json+++ b/app/appearance/langs/fr.json@@ -1,4 +1,5 @@{+ "appendListItem": "Ajouter un élément à la fin de la liste actuelle","secretAllowedHosts": "Hôtes autorisés","secretAllowedHostsTip": "Noms d'hôte auxquels ce secret peut être envoyé, séparés par des virgules, par ex. api.example.com ; laissez vide pour refuser toutes les requêtes, et les secrets ne sont jamais interpolés dans l'URL de la requête","editorMarkdownInlineFullWidthStrikethrough": "Syntaxe de barré en pleine chasse",diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.jsonindex 6b09e2bf72..d2d398fecc 100644--- a/app/appearance/langs/he.json+++ b/app/appearance/langs/he.json@@ -1,4 +1,5 @@{+ "appendListItem": "הוספת פריט לסוף הרשימה הנוכחית","secretAllowedHosts": "מארחים מורשים","secretAllowedHostsTip": "שמות מארחים שאליהם ניתן לשלוח סוד זה, מופרדים בפסיקים, למשל api.example.com; השאר ריק כדי לדחות את כל הבקשות, וסודות לעולם אינם מוחלפים בכתובת ה-URL של הבקשה","editorMarkdownInlineFullWidthStrikethrough": "תחביר קו חוצה ברוחב מלא",diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.jsonindex db807aae68..01f9c75caa 100644--- a/app/appearance/langs/hi.json+++ b/app/appearance/langs/hi.json@@ -1,4 +1,5 @@{+ "appendListItem": "वर्तमान सूची के अंत में सूची आइटम जोड़ें","secretAllowedHosts": "अनुमत होस्ट","secretAllowedHostsTip": "वे होस्टनाम जिन्हें यह गुप्त मान भेजा जा सकता है, अल्पविराम से अलग किए गए, जैसे api.example.com; सभी अनुरोध अस्वीकार करने के लिए खाली छोड़ें, और गुप्त मान कभी भी अनुरोध URL में प्रतिस्थापित नहीं होते","editorMarkdownInlineFullWidthStrikethrough": "पूर्ण-चौड़ाई स्ट्राइकथ्रू सिंटैक्स",diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.jsonindex 5017a077ca..ab54c65f5f 100644--- a/app/appearance/langs/id.json+++ b/app/appearance/langs/id.json@@ -1,4 +1,5 @@{+ "appendListItem": "Tambahkan item daftar ke akhir daftar saat ini","secretAllowedHosts": "Host yang diizinkan","secretAllowedHostsTip": "Nama host yang boleh menerima rahasia ini, dipisahkan koma, mis. api.example.com; biarkan kosong untuk menolak semua permintaan, dan rahasia tidak pernah disisipkan ke URL permintaan","editorMarkdownInlineFullWidthStrikethrough": "Sintaks coret lebar penuh",diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.jsonindex 2c3b9b31ee..ef765d69e7 100644--- a/app/appearance/langs/it.json+++ b/app/appearance/langs/it.json@@ -1,4 +1,5 @@{+ "appendListItem": "Aggiungi un elemento alla fine dell'elenco corrente","secretAllowedHosts": "Host consentiti","secretAllowedHostsTip": "Nomi host a cui questo segreto può essere inviato, separati da virgole, es. api.example.com; lascia vuoto per negare tutte le richieste, e i segreti non vengono mai interpolati nell'URL della richiesta","editorMarkdownInlineFullWidthStrikethrough": "Sintassi barrata a larghezza intera",diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.jsonindex 295d5f9247..d973c989eb 100644--- a/app/appearance/langs/ja.json+++ b/app/appearance/langs/ja.json@@ -1,4 +1,5 @@{+ "appendListItem": "現在のリストの末尾にリスト項目を追加","secretAllowedHosts": "許可されたホスト","secretAllowedHostsTip": "このシークレットの送信先として許可するホスト名をカンマ区切りで指定します(例:api.example.com)。空のままにするとすべてのリクエストを拒否し、シークレットはリクエスト URL に挿入されることはありません","editorMarkdownInlineFullWidthStrikethrough": "全角取り消し線構文",diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.jsonindex e7aefcd233..369838105d 100644--- a/app/appearance/langs/ko.json+++ b/app/appearance/langs/ko.json@@ -1,4 +1,5 @@{+ "appendListItem": "현재 목록 끝에 목록 항목 추가","secretAllowedHosts": "허용된 호스트","secretAllowedHostsTip": "이 시크릿을 보낼 수 있는 호스트 이름을 쉼표로 구분해 입력합니다(예: api.example.com). 비워두면 모든 요청을 거부하며, 시크릿은 요청 URL에 삽입되지 않습니다","editorMarkdownInlineFullWidthStrikethrough": "전각 취소선 구문",diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.jsonindex 2017812d75..5c333efd77 100644--- a/app/appearance/langs/nl.json+++ b/app/appearance/langs/nl.json@@ -1,4 +1,5 @@{+ "appendListItem": "Lijstitem toevoegen aan het einde van de huidige lijst","secretAllowedHosts": "Toegestane hosts","secretAllowedHostsTip": "Hostnamen waarnaar dit geheim mag worden verzonden, gescheiden door komma's, bijv. api.example.com; leeg laten om alle verzoeken te weigeren, en geheimen worden nooit in de aanvraag-URL geïnterpoleerd","editorMarkdownInlineFullWidthStrikethrough": "Doorhaalopmaak met volledige breedte",diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.jsonindex 4266cab078..ae115b70c3 100644--- a/app/appearance/langs/pl.json+++ b/app/appearance/langs/pl.json@@ -1,4 +1,5 @@{+ "appendListItem": "Dodaj element na końcu bieżącej listy","secretAllowedHosts": "Dozwolone hosty","secretAllowedHostsTip": "Nazwy hostów, do których można wysłać ten sekret, oddzielone przecinkami, np. api.example.com; pozostaw puste, aby odrzucać wszystkie żądania, a sekrety nigdy nie są interpolowane do adresu URL żądania","editorMarkdownInlineFullWidthStrikethrough": "Pełnoszeroka składnia przekreślenia",diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.jsonindex a82ab24390..88c89d58fe 100644--- a/app/appearance/langs/pt-BR.json+++ b/app/appearance/langs/pt-BR.json@@ -1,4 +1,5 @@{+ "appendListItem": "Adicionar item ao final da lista atual","secretAllowedHosts": "Hosts permitidos","secretAllowedHostsTip": "Nomes de host para os quais este segredo pode ser enviado, separados por vírgulas, ex.: api.example.com; deixe vazio para negar todas as solicitações, e segredos nunca são interpolados na URL da solicitação","editorMarkdownInlineFullWidthStrikethrough": "Sintaxe de tachado de largura completa",diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.jsonindex 29d862fd41..3e8c8db013 100644--- a/app/appearance/langs/ru.json+++ b/app/appearance/langs/ru.json@@ -1,4 +1,5 @@{+ "appendListItem": "Добавить элемент в конец текущего списка","secretAllowedHosts": "Разрешённые хосты","secretAllowedHostsTip": "Имена хостов, на которые можно отправлять этот секрет, через запятую, например api.example.com; оставьте пустым, чтобы запретить все запросы, и секреты никогда не подставляются в URL запроса","editorMarkdownInlineFullWidthStrikethrough": "Полноширинный синтаксис зачёркивания",diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.jsonindex 9d555c5c6a..4921fa763f 100644--- a/app/appearance/langs/sk.json+++ b/app/appearance/langs/sk.json@@ -1,4 +1,5 @@{+ "appendListItem": "Pridať položku na koniec aktuálneho zoznamu","secretAllowedHosts": "Povolené hostitele","secretAllowedHostsTip": "Názvy hostiteľov, na ktoré možno tento tajný kľúč odoslať, oddelené čiarkami, napr. api.example.com; nechajte prázdne, aby sa zamietli všetky požiadavky, a tajné kľúče sa nikdy nedosadzujú do URL požiadavky","editorMarkdownInlineFullWidthStrikethrough": "Plnošírková syntax prečiarknutia",diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.jsonindex 88f79b8251..4584aca071 100644--- a/app/appearance/langs/th.json+++ b/app/appearance/langs/th.json@@ -1,4 +1,5 @@{+ "appendListItem": "เพิ่มรายการที่ท้ายรายการปัจจุบัน","secretAllowedHosts": "โฮสต์ที่อนุญาต","secretAllowedHostsTip": "ชื่อโฮสต์ที่อนุญาตให้ส่งความลับนี้ไปได้ คั่นด้วยเครื่องหมายจุลภาค เช่น api.example.com; เว้นว่างไว้เพื่อปฏิเสธคำขอทั้งหมด และความลับจะไม่ถูกแทรกลงใน URL ของคำขอ","editorMarkdownInlineFullWidthStrikethrough": "ไวยากรณ์ขีดฆ่าแบบเต็มความกว้าง",diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.jsonindex 917e88ab79..ea9f4feadb 100644--- a/app/appearance/langs/tr.json+++ b/app/appearance/langs/tr.json@@ -1,4 +1,5 @@{+ "appendListItem": "Geçerli listenin sonuna liste öğesi ekle","secretAllowedHosts": "İzin verilen sunucular","secretAllowedHostsTip": "Bu sırrın gönderilebileceği, virgülle ayrılmış sunucu adları, ör. api.example.com; tüm istekleri reddetmek için boş bırakın ve sırlar istek URL'sine asla eklenmez","editorMarkdownInlineFullWidthStrikethrough": "Tam genişlikli üstü çizili sözdizimi",diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.jsonindex 3e0cf14b51..569013e858 100644--- a/app/appearance/langs/uk.json+++ b/app/appearance/langs/uk.json@@ -1,4 +1,5 @@{+ "appendListItem": "Додати елемент у кінець поточного списку","secretAllowedHosts": "Дозволені хости","secretAllowedHostsTip": "Імена хостів, на які можна надсилати цей секрет, через кому, напр. api.example.com; залиште порожнім, щоб заборонити всі запити, і секрети ніколи не підставляються в URL запиту","editorMarkdownInlineFullWidthStrikethrough": "Повноширинний синтаксис закреслення",diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.jsonindex f90d571932..d910920656 100644--- a/app/appearance/langs/zh-CN.json+++ b/app/appearance/langs/zh-CN.json@@ -1,4 +1,5 @@{+ "appendListItem": "在当前列表末尾添加列表项","secretAllowedHosts": "允许的主机","secretAllowedHostsTip": "允许发送该密钥的主机名,用逗号分隔,例如 api.example.com;留空则拒绝所有请求,且密钥永远不会被插入到请求 URL 中","editorMarkdownInlineFullWidthStrikethrough": "全角删除线语法",diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.jsonindex 06ef211079..8f9e410b09 100644--- a/app/appearance/langs/zh-TW.json+++ b/app/appearance/langs/zh-TW.json@@ -1,4 +1,5 @@{+ "appendListItem": "在目前列表末尾新增列表項","secretAllowedHosts": "允許的主機","secretAllowedHostsTip": "允許傳送此金鑰的主機名稱,以逗號分隔,例如 api.example.com;留空則拒絕所有要求,且金鑰永遠不會被插入到要求 URL 中","editorMarkdownInlineFullWidthStrikethrough": "全形刪除線語法",diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.syindex ec8fb37517..f0d6f598bb 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy@@ -7,7 +7,7 @@"id": "20200924100950-9op5xi1","title": "Shortcuts","type": "doc",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -3754,7 +3754,7 @@"HeadingLevel": 2,"Properties": {"id": "20210106154056-koo4wdj",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -11327,7 +11327,7 @@"HeadingLevel": 3,"Properties": {"id": "20210106154319-ans1gna",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11351,7 +11351,7 @@"Properties": {"colgroup": "||","id": "20210106154319-4oe7doq",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11613,6 +11613,54 @@}]},+ {+ "Type": "NodeTableRow",+ "Data": "tr",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Add a list item to the end of the current list"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": ""+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Ctrl+Shift+Enter"+ },+ {+ "Type": "NodeText",+ "Data": "/ "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "⇧⌘Enter"+ },+ {+ "Type": "NodeText",+ "Data": ""+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td"+ }+ ]+ },{"Type": "NodeTableRow","Data": "tr",diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.syindex d3010fea41..0a8e9f09a3 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy@@ -7,7 +7,7 @@"id": "20200813004551-gm0pbn1","title": "快捷键","type": "doc",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -3752,7 +3752,7 @@"HeadingLevel": 2,"Properties": {"id": "20201227133317-rkh4bji",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -11327,7 +11327,7 @@"HeadingLevel": 3,"Properties": {"id": "20201227133317-x02vhoh",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11347,7 +11347,7 @@"Properties": {"colgroup": "||","id": "20201227133317-yv5msrs",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11605,6 +11605,54 @@}]},+ {+ "Type": "NodeTableRow",+ "Data": "tr",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "在当前列表末尾添加列表项"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": ""+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Ctrl+Shift+Enter"+ },+ {+ "Type": "NodeText",+ "Data": "/ "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "⇧⌘回车"+ },+ {+ "Type": "NodeText",+ "Data": ""+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td"+ }+ ]+ },{"Type": "NodeTableRow","Data": "tr",diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.syindex 5a67f27190..a1d34d7611 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy@@ -7,7 +7,7 @@"id": "20211226122549-jktxego","title": "快捷鍵","type": "doc",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -3746,7 +3746,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226122652-htptsmh",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -11339,7 +11339,7 @@"HeadingLevel": 3,"Properties": {"id": "20211226122652-td76oes",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11359,7 +11359,7 @@"Properties": {"colgroup": "||","id": "20211226122652-qj1o02k",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11617,6 +11617,54 @@}]},+ {+ "Type": "NodeTableRow",+ "Data": "tr",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "在目前列表末尾新增列表項"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": ""+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Ctrl+Shift+Enter"+ },+ {+ "Type": "NodeText",+ "Data": "/ "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "⇧⌘回車"+ },+ {+ "Type": "NodeText",+ "Data": ""+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td"+ }+ ]+ },{"Type": "NodeTableRow","Data": "tr",diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.syindex e6a9efbf90..4ed3720e14 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy@@ -9,7 +9,7 @@"id": "20240530101000-xsbxokr","title": "ショートカット","type": "doc",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -3702,7 +3702,7 @@"Properties": {"ID": "20240530101000-twmuxke","id": "20240530101000-675gu9g",- "updated": "20260804230000"+ "updated": "20260808193828"},"Children": [{@@ -11252,7 +11252,7 @@"Properties": {"ID": "20240530101000-uaq4ub6","id": "20240530101000-yl0e0sq",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11282,7 +11282,7 @@"Properties": {"colgroup": "||","id": "20240530101000-wqr5cs1",- "updated": "20260803171606"+ "updated": "20260808193828"},"Children": [{@@ -11544,6 +11544,54 @@}]},+ {+ "Type": "NodeTableRow",+ "Data": "tr",+ "Children": [+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": "現在のリストの末尾にリスト項目を追加"+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td",+ "Children": [+ {+ "Type": "NodeText",+ "Data": ""+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Ctrl+Shift+Enter"+ },+ {+ "Type": "NodeText",+ "Data": "/ "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "⇧⌘Enter"+ },+ {+ "Type": "NodeText",+ "Data": ""+ }+ ]+ },+ {+ "Type": "NodeTableCell",+ "Data": "td"+ }+ ]+ },{"Type": "NodeTableRow","Data": "tr",diff --git a/app/src/config/entryVisibility/catalog.test.ts b/app/src/config/entryVisibility/catalog.test.tsindex 3078ee0d74..5e8f28b5c5 100644--- a/app/src/config/entryVisibility/catalog.test.ts+++ b/app/src/config/entryVisibility/catalog.test.ts@@ -73,6 +73,17 @@ test("sortable entry catalog groups contain valid separator positions", () => {});});+test("append list item follows the insert entries in the block menu", () => {+ const children = getEntryCatalogChildren("gutter.single");+ const insertAfterIndex = children.findIndex((item) => item.key === "insertAfter");+ const appendListItem = children[insertAfterIndex + 1];++ assert.ok(0 <= insertAfterIndex);+ assert.equal(appendListItem?.key, "appendListItem");+ assert.equal(appendListItem?.type, "entry");+ assert.equal(appendListItem?.simple, true);+});+test("simple profile follows the reviewed defaults", () => {const shown = ["document.title.copy.copyBlockEmbed",diff --git a/app/src/config/entryVisibility/catalog.ts b/app/src/config/entryVisibility/catalog.tsindex 6e626b74f8..53391fb91e 100644--- a/app/src/config/entryVisibility/catalog.ts+++ b/app/src/config/entryVisibility/catalog.ts@@ -361,6 +361,7 @@ const gutterSingle = () => [node("enterBack", lang("enterBack"), false),node("insertBefore", lang("insertBefore")),node("insertAfter", lang("insertAfter")),+ node("appendListItem", lang("appendListItem")),node("jumpTo", lang("jumpTo"), false, [node("jumpToParentPrev", lang("jumpToParentPrev"), false),node("jumpToParentNext", lang("jumpToParentNext"), false),diff --git a/app/src/constants.ts b/app/src/constants.tsindex 640d79ec80..c997ce18eb 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -626,6 +626,7 @@ export abstract class Constants {indent: {default: "⇥", custom: "⇥"},outdent: {default: "⇧⇥", custom: "⇧⇥"},checkToggle: {default: "⌘↩", custom: "⌘↩"},+ appendListItem: {default: "⇧⌘↩", custom: "⇧⌘↩"},},table: {insertRowAbove: {default: "", custom: ""},diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex 60aa809f9b..63160bebbb 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -91,6 +91,7 @@ import {showMessage} from "../../dialog/message";import {checkFold} from "../../util/noRelyPCFunction";import {clearSelect} from "../util/clear";import {chartRender} from "../render/chartRender";+import {appendListItem} from "../wysiwyg/list";// 块类型 data-type 到本地化名称键的映射,用于块标提示中的 ${x}const BLOCK_TYPE_LANG_KEYS: { [key: string]: string } = {@@ -2520,6 +2521,19 @@ export class Gutter {insertEmptyBlock(protyle, "afterend", nodeElement);}}).element);+ if (type === "NodeList" || type === "NodeListItem") {+ window.siyuan.menus.menu.append(new MenuItem({+ id: "appendListItem",+ icon: "iconListItem",+ label: window.siyuan.languages.appendListItem,+ accelerator: window.siyuan.config.keymap.editor.list.appendListItem.custom,+ click() {+ hideElements(["select"], protyle);+ countBlockWord([], protyle.block.rootID);+ void appendListItem(protyle, nodeElement as HTMLElement, range);+ }+ }).element);+ }}if (!protyle.disabled) {const countElement = nodeElement.lastElementChild?.querySelector(".protyle-attr--refcount");diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 1a3488aaf8..5161b7dec4 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -65,6 +65,7 @@ import {fontEvent} from "../toolbar/Font";import {applyTableCellStyleHotkey} from "../toolbar/tableCell";import {addSubList,+ appendListItem,insertEmptyChildList,insertEmptyListItem,listIndent,@@ -72,6 +73,7 @@ import {toggleTaskListItem} from "./list";import {+ getAppendListContext,getListContext,getListConversionType,getListShortcutAction,@@ -2100,6 +2102,14 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {return;}+ if (matchHotKey(window.siyuan.config.keymap.editor.list.appendListItem.custom, event) &&+ !isInEmbedBlock(nodeElement) && getAppendListContext(nodeElement, protyle.wysiwyg.element)) {+ void appendListItem(protyle, nodeElement, range);+ event.preventDefault();+ event.stopPropagation();+ return true;+ }+if (matchHotKey(window.siyuan.config.keymap.editor.list.checkToggle.custom, event)) {const taskItemElement = hasClosestByAttribute(range.startContainer, "data-subtype", "t");if (!taskItemElement) {diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.tsindex 0e412c3f57..46cef752db 100644--- a/app/src/protyle/wysiwyg/list.ts+++ b/app/src/protyle/wysiwyg/list.ts@@ -1,4 +1,4 @@-import {focusByWbr, getUndoFocusContext} from "../util/selection";+import {focusByWbr, getEditorRange, getUndoFocusContext} from "../util/selection";import {transaction, turnsIntoOneTransaction, updateTransaction} from "./transaction";import {genEmptyBlock} from "../../block/util";import * as dayjs from "dayjs";@@ -9,7 +9,9 @@ import {getEmbedChildOperationContext, getParentBlock, getPreviousBlockSibling}import {setFold} from "../util/blockFold";import {scrollCenter} from "../../util/highlightById";import {+ getAppendListContext,getFollowingOrderedListMarkerUpdates,+ getLastListItemElement,getOrderedListMarkerUpdates,type TListSubtype} from "./listContext";@@ -155,6 +157,87 @@ const getFocusedOrderedListUpdates = async (protyle: IProtyle, listItemElement:const insertingFocusedListItems = new WeakSet<IProtyle>();+const appendingListItems = new WeakSet<IProtyle>();++const getFocusedListTailItem = async (protyle: IProtyle, listID: string, currentListItem?: HTMLElement) => {+ const tailResponse = await fetchSyncPost("/api/block/getTailChildBlocks", {+ id: listID,+ n: 1,+ notebook: protyle.notebookId,+ });+ const tailBlock = tailResponse.data?.[0] as {id?: string, type?: string} | undefined;+ if (!tailBlock?.id || tailBlock.type !== "i") {+ return;+ }+ if (currentListItem?.getAttribute("data-node-id") === tailBlock.id) {+ return currentListItem;+ }++ const domResponse = await fetchSyncPost("/api/block/getBlockDOM", {+ id: tailBlock.id,+ notebook: protyle.notebookId,+ });+ const template = document.createElement("template");+ template.innerHTML = domResponse.data?.dom || "";+ const tailItemElement = template.content.firstElementChild as HTMLElement;+ if (tailItemElement?.getAttribute("data-type") !== "NodeListItem") {+ return;+ }+ return tailItemElement;+};++export const appendListItem = async (protyle: IProtyle, nodeElement: HTMLElement, range?: Range) => {+ if (appendingListItems.has(protyle)) {+ return;+ }+ const context = getAppendListContext(nodeElement, protyle.wysiwyg.element);+ if (!context) {+ return;+ }++ appendingListItems.add(protyle);+ try {+ let tailItemElement: HTMLElement | undefined;+ if (context.listElement) {+ tailItemElement = getLastListItemElement(context.listElement);+ } else if (protyle.block.parentID) {+ tailItemElement = await getFocusedListTailItem(protyle, protyle.block.parentID,+ context.listItemElement);+ }+ if (!tailItemElement) {+ return;+ }++ const tailID = tailItemElement.getAttribute("data-node-id");+ if (!tailID) {+ return;+ }+ const newListItemElement = genListItemElement(tailItemElement, 0, true);+ const id = newListItemElement.getAttribute("data-node-id");+ const editorRange = range || getEditorRange(protyle.wysiwyg.element);+ const undoFocusContext = getUndoFocusContext(protyle.wysiwyg.element, editorRange, true);+ const localPreviousElement = context.listElement ? tailItemElement : context.listItemElement;+ if (!localPreviousElement?.isConnected) {+ return;+ }+ localPreviousElement.insertAdjacentElement("afterend", newListItemElement);+ transaction(protyle, [{+ action: "insert",+ id,+ data: newListItemElement.outerHTML,+ previousID: tailID,+ }], [{+ action: "delete",+ id,+ context: undoFocusContext,+ }]);+ focusByWbr(newListItemElement, editorRange);+ scrollCenter(protyle, newListItemElement);+ } finally {+ appendingListItems.delete(protyle);+ }+};+export const insertEmptyListItem = async (protyle: IProtyle, listItemElement: HTMLElement, range: Range) => {const listElement = listItemElement.parentElement;if (!listElement) {diff --git a/app/src/protyle/wysiwyg/listContext.test.ts b/app/src/protyle/wysiwyg/listContext.test.tsindex c7d1b2cbaa..1aa4d10610 100644--- a/app/src/protyle/wysiwyg/listContext.test.ts+++ b/app/src/protyle/wysiwyg/listContext.test.ts@@ -1,7 +1,9 @@import {describe, it} from "node:test";import * as assert from "node:assert/strict";import {+ getAppendListContext,getFollowingOrderedListMarkerUpdates,+ getLastListItemElement,getListContext,getListConversionType,getOrderedListMarkerUpdates,@@ -118,6 +120,60 @@ describe("getListContext", () => {});});+describe("getAppendListContext", () => {+ it("uses the nearest list in a nested list", () => {+ const paragraph = new TestElement("NodeParagraph", "paragraph");+ const innerListItem = new TestElement("NodeListItem", "inner-item", "u").append(paragraph);+ const innerList = new TestElement("NodeList", "inner-list", "u").append(innerListItem);+ const outerListItem = new TestElement("NodeListItem", "outer-item", "u").append(innerList);+ const outerList = new TestElement("NodeList", "outer-list", "u").append(outerListItem);+ const editor = new TestElement().append(outerList);++ const context = getAppendListContext(asHTMLElement(paragraph), asHTMLElement(editor));++ assert.equal(context?.listElement, asHTMLElement(innerList));+ assert.equal(context?.listItemElement, asHTMLElement(innerListItem));+ });++ it("uses a selected list as the current list", () => {+ const {list, editor} = createList("o");++ const context = getAppendListContext(asHTMLElement(list), asHTMLElement(editor));++ assert.equal(context?.listElement, asHTMLElement(list));+ assert.equal(context?.listItemElement, undefined);+ });++ it("supports a focused list item without its list wrapper", () => {+ const paragraph = new TestElement("NodeParagraph", "paragraph");+ const listItem = new TestElement("NodeListItem", "list-item", "t").append(paragraph);+ const editor = new TestElement().append(listItem);++ const context = getAppendListContext(asHTMLElement(paragraph), asHTMLElement(editor));++ assert.equal(context?.listElement, undefined);+ assert.equal(context?.listItemElement, asHTMLElement(listItem));+ });++ it("does not cross the current editor boundary", () => {+ const paragraph = new TestElement("NodeParagraph", "paragraph");+ const editor = new TestElement().append(paragraph);+ new TestElement("NodeListItem", "list-item", "u").append(editor);++ assert.equal(getAppendListContext(asHTMLElement(paragraph), asHTMLElement(editor)), undefined);+ });+});++describe("getLastListItemElement", () => {+ it("ignores non-list-item children at the end", () => {+ const first = new TestElement("NodeListItem", "first", "u");+ const last = new TestElement("NodeListItem", "last", "u");+ const list = new TestElement("NodeList", "list", "u").append(first, last, new TestElement());++ assert.equal(getLastListItemElement(asHTMLElement(list)), asHTMLElement(last));+ });+});+describe("getListShortcutAction", () => {it("cancels or converts a single empty list", () => {const {paragraph, editor} = createList("u");diff --git a/app/src/protyle/wysiwyg/listContext.ts b/app/src/protyle/wysiwyg/listContext.tsindex 245824c25d..e0ced55016 100644--- a/app/src/protyle/wysiwyg/listContext.ts+++ b/app/src/protyle/wysiwyg/listContext.ts@@ -12,12 +12,41 @@ export type TListContext = {subtype: TListSubtype,};+export type TAppendListContext = {+ listElement?: HTMLElement,+ listItemElement?: HTMLElement,+};+const LIST_CONVERSION_TYPES: Record<TListSubtype, Partial<Record<TListSubtype, string>>> = {u: {o: "UL2OL", t: "UL2TL"},o: {u: "OL2UL", t: "OL2TL"},t: {u: "TL2UL", o: "TL2OL"},};+export const getAppendListContext = (nodeElement: HTMLElement,+ editorElement: HTMLElement): TAppendListContext | undefined => {+ let currentElement: HTMLElement | null = nodeElement;+ while (currentElement && currentElement !== editorElement) {+ const type = currentElement.getAttribute("data-type");+ if (type === "NodeList") {+ return {listElement: currentElement};+ }+ if (type === "NodeListItem") {+ const parentElement = currentElement.parentElement;+ return {+ listElement: parentElement?.getAttribute("data-type") === "NodeList" ? parentElement : undefined,+ listItemElement: currentElement,+ };+ }+ currentElement = currentElement.parentElement;+ }+};++export const getLastListItemElement = (listElement: HTMLElement) => {+ return Array.from(listElement.children).reverse().find((item) =>+ item.getAttribute("data-type") === "NodeListItem") as HTMLElement | undefined;+};+export const getListContext = (nodeElement: HTMLElement, editorElement: HTMLElement): TListContext | undefined => {let listItemElement: HTMLElement | null = nodeElement;while (listItemElement && listItemElement !== editorElement &&diff --git a/app/src/types/config.d.ts b/app/src/types/config.d.tsindex 4f28c61dd2..c57ff8008d 100644--- a/app/src/types/config.d.ts+++ b/app/src/types/config.d.ts@@ -1260,6 +1260,7 @@ declare namespace Config {* SiYuan editor list shortcut keys*/export interface IKeymapEditorList extends IKeys {+ appendListItem: IKey;checkToggle: IKey;indent: IKey;outdent: IKey;