for automatic review

This commit is contained in:
vorotamoroz
2026-06-17 06:10:30 +01:00
parent 7895336189
commit 4a5283543d
11 changed files with 406 additions and 11 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ class LiveSyncWebApp {
console.log("[Settings] Loaded from .livesync/settings.json");
return { ...DEFAULT_SETTINGS, ...data } as ObsidianLiveSyncSettings;
}
} catch (error) {
} catch {
console.log("[Settings] Failed to load, using defaults");
}
return DEFAULT_SETTINGS as ObsidianLiveSyncSettings;
@@ -170,7 +170,7 @@ class LiveSyncWebApp {
const file = await fileHandle.getFile();
const text = await file.text();
return JSON.parse(text);
} catch (error) {
} catch {
// File doesn't exist yet
return null;
}
@@ -182,7 +182,7 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter {
if (changedHandle && changedHandle.kind === "file") {
const file = await changedHandle.getFile();
const fileInfo = {
path: relativePath as any,
path: relativePath,
stat: {
size: file.size,
mtime: file.lastModified,
@@ -200,7 +200,7 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter {
}
} else if (type === "disappeared") {
const fileInfo = {
path: relativePath as any,
path: relativePath,
stat: {
size: 0,
mtime: Date.now(),
@@ -217,7 +217,7 @@ class FSAPIWatchAdapter implements IStorageEventWatchAdapter {
if (changedHandle && changedHandle.kind === "file") {
const file = await changedHandle.getFile();
const fileInfo = {
path: relativePath as any,
path: relativePath,
stat: {
size: file.size,
mtime: file.lastModified,
+1 -1
View File
@@ -91,7 +91,7 @@ export class VaultHistoryStore {
async getVaultHistory(): Promise<VaultHistoryItem[]> {
return this.withStore("readonly", async (store) => {
const keys = (await this.requestAsPromise(store.getAllKeys())) as IDBValidKey[];
const keys = (await this.requestAsPromise(store.getAllKeys()));
const values = (await this.requestAsPromise(store.getAll())) as unknown[];
const items: VaultHistoryItem[] = [];
for (let i = 0; i < keys.length; i++) {