mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
5c0a1ae31a
commit
219d714f49
3 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>',
|
||||
},{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue