Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:sparkles: https://github.com/siyuan-note/siyuan/issues/7560

Vanessa219d714f49e8
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index f7e3dd9355..f3af934b88 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -162,8 +162,7 @@ export const initKeyboardToolbar = () => {
protyle.toolbar.setInlineMark(protyle, type, "toolbar");
return ;
}
- // block element
-
+ // TODO block element
if (type === "up") {
moveToUp(protyle, nodeElement, range);
focusByRange(range);
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index fdcc40d9f4..13e5ae29e5 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -37,7 +37,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
value: "{{",
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSQL"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.blockEmbed}</span><span class="b3-list-item__meta">{{</span></div>`,
}, {
- filter: ["AI Chat"],
+ filter: ["ai chat"],
value: Constants.ZWSP + 5,
html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSparkles"></use></svg><span class="b3-list-item__text">AI Chat</span></div>',
},{
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index ae2f950723..80262f0082 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -569,9 +569,11 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
fetchPost("/api/ai/chatGPT", {
msg: inputElement.value,
}, (response) => {
- insertHTML(response.data, protyle, true);
progressLoading({code: 2, cmd:"", data:"", msg:"", sid:""});
dialog.destroy();
+ focusByRange(protyle.toolbar.range);
+ insertHTML(`${inputElement.value}
+* 1`, protyle, true);
});
});
return;