mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 00:50:56 +08:00
This commit is contained in:
parent
994ac1e1e1
commit
43ca52f3b8
@ -50,7 +50,6 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||||||
width: isMobile() ? "92vw" : "520px",
|
width: isMobile() ? "92vw" : "520px",
|
||||||
});
|
});
|
||||||
const nameElement = dialog.element.querySelector("input")
|
const nameElement = dialog.element.querySelector("input")
|
||||||
nameElement.focus();
|
|
||||||
const customElement = dialog.element.querySelector("textarea");
|
const customElement = dialog.element.querySelector("textarea");
|
||||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||||
dialog.bindInput(customElement, () => {
|
dialog.bindInput(customElement, () => {
|
||||||
@ -84,6 +83,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||||||
setStorageVal(Constants.LOCAL_AI, window.siyuan.storage[Constants.LOCAL_AI]);
|
setStorageVal(Constants.LOCAL_AI, window.siyuan.storage[Constants.LOCAL_AI]);
|
||||||
dialog.destroy();
|
dialog.destroy();
|
||||||
});
|
});
|
||||||
|
nameElement.focus();
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
if (window.siyuan.storage[Constants.LOCAL_AI].length > 0) {
|
if (window.siyuan.storage[Constants.LOCAL_AI].length > 0) {
|
||||||
@ -113,7 +113,6 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||||||
});
|
});
|
||||||
const nameElement = dialog.element.querySelector("input");
|
const nameElement = dialog.element.querySelector("input");
|
||||||
nameElement.value = item.name;
|
nameElement.value = item.name;
|
||||||
nameElement.focus()
|
|
||||||
const customElement = dialog.element.querySelector("textarea");
|
const customElement = dialog.element.querySelector("textarea");
|
||||||
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
const btnsElement = dialog.element.querySelectorAll(".b3-button");
|
||||||
dialog.bindInput(customElement, () => {
|
dialog.bindInput(customElement, () => {
|
||||||
@ -150,6 +149,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => {
|
|||||||
});
|
});
|
||||||
dialog.destroy();
|
dialog.destroy();
|
||||||
});
|
});
|
||||||
|
nameElement.focus()
|
||||||
} else {
|
} else {
|
||||||
fetchPost("/api/ai/chatGPTWithAction", {
|
fetchPost("/api/ai/chatGPTWithAction", {
|
||||||
ids,
|
ids,
|
||||||
|
Loading…
Reference in New Issue
Block a user