This commit is contained in:
Vanessa
2026-06-10 14:00:05 +08:00
parent ec06f34262
commit 4266ac9bba
6 changed files with 2 additions and 14 deletions
+1 -1
View File
@@ -1361,7 +1361,7 @@ export class AgentChat extends Model {
if (step.toolCalls.length > 0) {
const newTools = step.toolCalls.filter(tc => !seenTools[tc.name]);
if (newTools.length > 0) {
detail += `<div class="agent-chat__thinking-tools-line"><span class="agent-chat__thinking-summary">Tool calls:</span>`;
detail += "<div class=\"agent-chat__thinking-tools-line\"><span class=\"agent-chat__thinking-summary\">Tool calls:</span>";
for (let j = 0; j < newTools.length; j++) {
const tc = newTools[j];
seenTools[tc.name] = true;
+1 -1
View File
@@ -96,7 +96,7 @@ export const renderRetryCardHTML = (attempt: number, maxRetries: number): string
};
export const renderToolsLineHTML = (newTools: Array<{name: string; result?: string}>): string => {
let detailLines = `<div class="agent-chat__thinking-tools-line"><span class="agent-chat__thinking-summary">Tool calls:</span>`;
let detailLines = "<div class=\"agent-chat__thinking-tools-line\"><span class=\"agent-chat__thinking-summary\">Tool calls:</span>";
for (let i = 0; i < newTools.length; i++) {
detailLines += '<span class="agent-chat__thinking-tool">' + escapeHtml(newTools[i].name) + "</span>";
}
-8
View File
@@ -211,7 +211,6 @@ export const fileAnnotationRefMenu = (protyle: IProtyle, refElement: HTMLElement
return;
}
hideElements(["util", "toolbar", "hint"], protyle);
const id = nodeElement.getAttribute("data-node-id");
let oldHTML = nodeElement.outerHTML;
window.siyuan.menus.menu.remove();
window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_INLINE_FILE_ANNOTATION_REF);
@@ -714,7 +713,6 @@ export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
protyle.toolbar.showContent(protyle, range, nodeElement);
/// #else
const oldHTML = nodeElement.outerHTML;
const id = nodeElement.getAttribute("data-node-id");
const captionElement = hasClosestByTag(range.startContainer, "CAPTION");
if (range.toString() !== "" || (range.cloneContents().childNodes[0] as HTMLElement)?.classList?.contains("emoji")) {
window.siyuan.menus.menu.append(new MenuItem({
@@ -786,7 +784,6 @@ export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
}
}).element);
if (!protyle.disabled) {
const id = nodeElement.getAttribute("data-node-id");
window.siyuan.menus.menu.append(new MenuItem({
id: "cut",
icon: "iconCut",
@@ -1481,7 +1478,6 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
}
hideTooltip();
hideElements(["util", "toolbar", "hint"], protyle);
const id = nodeElement.getAttribute("data-node-id");
let html = nodeElement.outerHTML;
const linkAddress = linkElement.getAttribute("data-href");
let inputElements: NodeListOf<HTMLTextAreaElement>;
@@ -1769,7 +1765,6 @@ export const tagMenu = (protyle: IProtyle, tagElement: HTMLElement) => {
return;
}
hideElements(["util", "toolbar", "hint"], protyle);
const id = nodeElement.getAttribute("data-node-id");
let inputElement: HTMLInputElement;
const oldHTML = nodeElement.outerHTML;
window.siyuan.menus.menu.removeCB = () => {
@@ -1957,7 +1952,6 @@ export const inlineMathMenu = (protyle: IProtyle, element: Element) => {
if (!nodeElement) {
return;
}
const id = nodeElement.getAttribute("data-node-id");
const html = nodeElement.outerHTML;
window.siyuan.menus.menu.append(new MenuItem({
id: "copy",
@@ -2036,7 +2030,6 @@ const genImageHeightMenu = (label: string, imgElement: HTMLElement, protyle: IPr
};
export const iframeMenu = (protyle: IProtyle, nodeElement: Element) => {
const id = nodeElement.getAttribute("data-node-id");
const iframeElement = nodeElement.querySelector("iframe");
let html = nodeElement.outerHTML;
const subMenus: IMenu[] = [{
@@ -2107,7 +2100,6 @@ export const iframeMenu = (protyle: IProtyle, nodeElement: Element) => {
};
export const videoMenu = (protyle: IProtyle, nodeElement: Element, type: string) => {
const id = nodeElement.getAttribute("data-node-id");
const videoElement = nodeElement.querySelector(type === "NodeVideo" ? "video" : "audio");
let html = nodeElement.outerHTML;
const subMenus: IMenu[] = [{
-2
View File
@@ -964,7 +964,6 @@ export class WYSIWYG {
target.parentElement.parentElement.classList.add("img--drag");
}
const id = nodeElement.getAttribute("data-node-id");
const html = nodeElement.outerHTML;
const x = event.clientX;
const dragElement = target.previousElementSibling as HTMLElement;
@@ -1054,7 +1053,6 @@ export class WYSIWYG {
nodeElement.firstElementChild.style.webkitUserModify = "read-only";
nodeElement.style.cursor = "col-resize";
target.removeAttribute("style");
const id = nodeElement.getAttribute("data-node-id");
const x = event.clientX;
const colIndex = parseInt(target.getAttribute("data-col-index"));
const colElement = nodeElement.querySelectorAll("table col")[colIndex] as HTMLElement;
-1
View File
@@ -1498,7 +1498,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
!isInEmbedBlock(nodeElement)) {
const editElement = getContenteditableElement(nodeElement);
if (editElement) {
const id = nodeElement.getAttribute("data-node-id");
const html = nodeElement.outerHTML;
// 需要 EscapeHTMLStr https://github.com/siyuan-note/siyuan/issues/11451
editElement.innerHTML = "```" + window.siyuan.storage[Constants.LOCAL_CODELANG] + "\n" + Lute.EscapeHTMLStr(editElement.textContent) + "<wbr>\n```";
-1
View File
@@ -62,7 +62,6 @@ export async function fetchAgentSSE(
});
if (!response.ok) {
const text = await response.text();
onError(new Error(window.siyuan.languages._kernel[28]));
return;
}