Skip to content

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

:rotating_light:

Vanessa25bb76f586bc
diff --git a/app/src/history/diff.ts b/app/src/history/diff.ts
index 2c225b4f76..3c582b0402 100644
--- a/app/src/history/diff.ts
+++ b/app/src/history/diff.ts
@@ -101,14 +101,14 @@ export const showDiff = (data: { id: string, time: string }[]) => {
if (data.length !== 2) {
return;
}
- let left
- let right
+ let left;
+ let right;
if (data[0].time > data[1].time) {
- left = data[1].id
- right = data[0].id
+ left = data[1].id;
+ right = data[0].id;
} else {
- left = data[0].id
- right = data[1].id
+ left = data[0].id;
+ right = data[1].id;
}
fetchPost("/api/repo/diffRepoSnapshots", {left, right}, (response) => {
const dialog = new Dialog({
diff --git a/app/src/history/history.ts b/app/src/history/history.ts
index d415774468..2658b07a43 100644
--- a/app/src/history/history.ts
+++ b/app/src/history/history.ts
@@ -460,7 +460,7 @@ export const openHistory = () => {
if (id === item.id) {
idJSON.splice(index, 1);
}
- })
+ });
} else {
target.classList.add("b3-list-item--focus");
while (idJSON.length > 1) {
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 83b0c5ab85..ba1d8accfd 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -557,10 +557,10 @@ export class WYSIWYG {
mouseElement = newMouseElement;
}
hideElements(["select"], protyle);
- let firstElement
+ let firstElement;
if (moveEvent.clientY > y) {
firstElement = startFirstElement || document.elementFromPoint(newLeft - 1, newTop);
- endLastElement = undefined
+ endLastElement = undefined;
} else {
firstElement = document.elementFromPoint(newLeft - 1, newTop);
startFirstElement = undefined;
@@ -585,7 +585,7 @@ export class WYSIWYG {
let selectElements: Element[] = [];
let currentElement: Element | boolean = firstBlockElement;
let hasJump = false;
- const selectBottom = endLastElement ? endLastElement.getBoundingClientRect().bottom : (newTop + newHeight)
+ const selectBottom = endLastElement ? endLastElement.getBoundingClientRect().bottom : (newTop + newHeight);
while (currentElement) {
if (currentElement && !currentElement.classList.contains("protyle-attr")) {
const currentRect = currentElement.getBoundingClientRect();
@@ -628,7 +628,7 @@ export class WYSIWYG {
}
}
if (moveEvent.clientY <= y && !endLastElement) {
- endLastElement = selectElements[selectElements.length - 1]
+ endLastElement = selectElements[selectElements.length - 1];
}
if (selectElements.length === 1 && !selectElements[0].classList.contains("list") && !selectElements[0].classList.contains("bq") && !selectElements[0].classList.contains("sb")) {
// 只有一个 p 时不选中
diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.ts
index 87b12e4de3..a776349f4a 100644
--- a/app/src/util/newFile.ts
+++ b/app/src/util/newFile.ts
@@ -82,7 +82,7 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
});
}
} else {
- let title = data.data.path || "Untitled"
+ let title = data.data.path || "Untitled";
title = title.substring(title.lastIndexOf("/") + 1);
if (!validateName(title)) {
return;