🎨 加入针对内容块的人工智能辅助支持 https://github.com/siyuan-note/siyuan/issues/7566

This commit is contained in:
Liang Ding 2023-03-08 23:58:20 +08:00
parent 4c19f3a3d3
commit 20589471aa
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 3 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import {isMobile} from "../util/functions";
export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) => {
setLastNodeRange(elements[elements.length - 1], protyle.toolbar.range);
protyle.toolbar.range.collapse(true);
insertHTML(data, protyle, true, true);
}

View file

@ -435,7 +435,6 @@ export class Gutter {
return true;
}
});
AIActions(selectsElement, protyle);
if (!isList && !protyle.disabled) {
const turnIntoSubmenu: IMenu[] = [];
if (isContinue) {
@ -571,6 +570,7 @@ export class Gutter {
}).element);
}
}
AIActions(selectsElement, protyle);
const copyMenu: IMenu[] = [{
label: window.siyuan.languages.copy,
accelerator: "⌘C",
@ -738,7 +738,6 @@ export class Gutter {
hideElements(["select"], protyle);
nodeElement.classList.add("protyle-wysiwyg--select");
countBlockWord([id], protyle.block.rootID);
AIActions([nodeElement], protyle);
// "heading1-6", "list", "ordered-list", "check", "quote", "code", "table", "line", "math", "paragraph"
if (type === "NodeParagraph" && !protyle.disabled) {
turnIntoSubmenu.push(this.turnsIntoOne({
@ -978,6 +977,7 @@ export class Gutter {
submenu: turnIntoSubmenu
}).element);
}
AIActions([nodeElement], protyle);
const copyMenu = (copySubMenu(id, true, nodeElement) as IMenu[]).concat([{
label: window.siyuan.languages.copy,
accelerator: "⌘C",