chore: prepare 1.0.2 release

This commit is contained in:
svemagie
2026-03-08 20:41:47 +01:00
parent e530984f71
commit b2d2f6e212
10 changed files with 39 additions and 46 deletions
-17
View File
@@ -1,17 +0,0 @@
{
"permissions": {
"allow": [
"Bash(gh repo create memex-chat --public --source=. --remote=origin --push)",
"Bash(/opt/homebrew/bin/gh repo create memex-chat --public --source=. --remote=origin --push)",
"Bash(npm run build)",
"Bash(npm install)",
"WebFetch(domain:docs.obsidian.md)",
"Bash(grep -n \"data\\\\.json\\\\|apiKey\\\\|saveData\\\\|loadData\" src/*.ts)",
"WebFetch(domain:github.com)",
"WebFetch(domain:smartconnections.app)",
"Bash(npx tsc --noEmit)",
"Bash(node -e \"const t = require\\(''@xenova/transformers''\\); console.log\\(''keys:'', Object.keys\\(t\\).slice\\(0,20\\)\\); console.log\\(''env:'', typeof t.env\\); console.log\\(''env.backends:'', t.env?.backends ? ''ok'' : ''missing''\\);\")",
"Bash(python3 -:*)"
]
}
}
+2
View File
@@ -1,2 +1,4 @@
node_modules/ node_modules/
*.js.map *.js.map
.claude/
.DS_Store
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Sven
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-13
View File
@@ -32362,11 +32362,8 @@ var EmbedSearch = class {
}); });
} }
async embed(text) { async embed(text) {
console.log("[Memex] embed: loadPipeline\u2026");
await this.loadPipeline(); await this.loadPipeline();
console.log("[Memex] embed: pipe call\u2026");
const result = await this.pipe(text.slice(0, 512), { pooling: "mean", normalize: true }); const result = await this.pipe(text.slice(0, 512), { pooling: "mean", normalize: true });
console.log("[Memex] embed: done, dims:", result.data.length);
return Array.from(result.data); return Array.from(result.data);
} }
/** embed() with a hard timeout; rejects with "embed timeout" if exceeded. */ /** embed() with a hard timeout; rejects with "embed timeout" if exceeded. */
@@ -32386,7 +32383,6 @@ var EmbedSearch = class {
} }
// ─── Index ──────────────────────────────────────────────────────────────── // ─── Index ────────────────────────────────────────────────────────────────
async buildIndex() { async buildIndex() {
console.log("[Memex] buildIndex START, indexing:", this.indexing);
if (this.indexing) if (this.indexing)
return; return;
this.indexing = true; this.indexing = true;
@@ -32397,17 +32393,14 @@ var EmbedSearch = class {
try { try {
await import_fs3.promises.mkdir(this.modelsDir, { recursive: true }); await import_fs3.promises.mkdir(this.modelsDir, { recursive: true });
await import_fs3.promises.mkdir(this.embedDir, { recursive: true }); await import_fs3.promises.mkdir(this.embedDir, { recursive: true });
console.log("[Memex] Verzeichnisse OK:", this.embedDir);
} catch (e) { } catch (e) {
console.error("[Memex] Verzeichnisse konnten nicht angelegt werden:", e); console.error("[Memex] Verzeichnisse konnten nicht angelegt werden:", e);
} }
try { try {
await this.loadCache(); await this.loadCache();
console.log("[Memex] Cache geladen, Eintr\xE4ge:", this.cache.size);
const allFiles = this.app.vault.getMarkdownFiles(); const allFiles = this.app.vault.getMarkdownFiles();
const files = this.excludeFolders.length ? allFiles.filter((f) => !this.excludeFolders.some((ex) => f.path.startsWith(ex + "/"))) : allFiles; const files = this.excludeFolders.length ? allFiles.filter((f) => !this.excludeFolders.some((ex) => f.path.startsWith(ex + "/"))) : allFiles;
const total = files.length; const total = files.length;
console.log("[Memex] Dateien gesamt:", total, "(ausgeschlossen:", allFiles.length - total, ")");
let done = 0; let done = 0;
let windowStart = Date.now(); let windowStart = Date.now();
let windowEmbedded = 0; let windowEmbedded = 0;
@@ -32427,8 +32420,6 @@ var EmbedSearch = class {
this.vecs.set(file.path, { vec, file }); this.vecs.set(file.path, { vec, file });
changed.push(file.path); changed.push(file.path);
windowEmbedded++; windowEmbedded++;
if (changed.length === 1 || changed.length % 50 === 0)
console.log(`[Memex] Eingebettet: ${changed.length}/${total}`);
if (changed.length % 100 === 0) if (changed.length % 100 === 0)
await this.flushBatch(changed.slice(-100)); await this.flushBatch(changed.slice(-100));
} catch (e) { } catch (e) {
@@ -32453,7 +32444,6 @@ var EmbedSearch = class {
this.onProgress(done, total, speed); this.onProgress(done, total, speed);
} }
} }
console.log("[Memex] Loop fertig, changed:", changed.length, "pipelineError:", !!pipelineError);
if (pipelineError) if (pipelineError)
throw pipelineError; throw pipelineError;
const allPaths = new Set(files.map((f) => f.path)); const allPaths = new Set(files.map((f) => f.path));
@@ -32466,7 +32456,6 @@ var EmbedSearch = class {
console.error("[Memex] buildIndex Fehler:", e); console.error("[Memex] buildIndex Fehler:", e);
} finally { } finally {
this.indexing = false; this.indexing = false;
console.log("[Memex] buildIndex END, indexed:", this.indexed);
} }
} }
/** /**
@@ -32489,7 +32478,6 @@ var EmbedSearch = class {
this.cache.set(file.path, { mtime, vec }); this.cache.set(file.path, { mtime, vec });
this.vecs.set(file.path, { vec, file }); this.vecs.set(file.path, { vec, file });
await this.saveCache([file.path], new Set(this.vecs.keys())); await this.saveCache([file.path], new Set(this.vecs.keys()));
console.log("[Memex] Re-embedded:", file.path);
} catch (e) { } catch (e) {
console.warn("[Memex] Re-embed fehlgeschlagen:", file.path, e); console.warn("[Memex] Re-embed fehlgeschlagen:", file.path, e);
} }
@@ -33334,7 +33322,6 @@ var MemexChatPlugin = class extends import_obsidian5.Plugin {
this.initEmbedSearch().catch(console.error); this.initEmbedSearch().catch(console.error);
} }
}); });
console.log("[Memex Chat] Plugin geladen");
} }
onunload() { onunload() {
this.app.workspace.detachLeavesOfType(VIEW_TYPE_MEMEX_CHAT); this.app.workspace.detachLeavesOfType(VIEW_TYPE_MEMEX_CHAT);
+1
View File
@@ -5,5 +5,6 @@
"minAppVersion": "1.4.0", "minAppVersion": "1.4.0",
"description": "Chat with your Obsidian vault using Claude AI — semantic context retrieval, @ mentions, thread history.", "description": "Chat with your Obsidian vault using Claude AI — semantic context retrieval, @ mentions, thread history.",
"author": "Sven", "author": "Sven",
"authorUrl": "https://github.com/svemagie",
"isDesktopOnly": false "isDesktopOnly": false
} }
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "memex-chat", "name": "memex-chat",
"version": "0.2.3", "version": "1.0.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "memex-chat", "name": "memex-chat",
"version": "0.2.3", "version": "1.0.2",
"devDependencies": { "devDependencies": {
"@types/node": "^20.0.0", "@types/node": "^20.0.0",
"@xenova/transformers": "^2.17.2", "@xenova/transformers": "^2.17.2",
+10
View File
@@ -2,6 +2,16 @@
"name": "memex-chat", "name": "memex-chat",
"version": "1.0.2", "version": "1.0.2",
"description": "Obsidian plugin: Chat with your vault using Claude AI", "description": "Obsidian plugin: Chat with your vault using Claude AI",
"author": "Sven",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/svemagie/memex-chat.git"
},
"bugs": {
"url": "https://github.com/svemagie/memex-chat/issues"
},
"homepage": "https://github.com/svemagie/memex-chat#readme",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
"build": "node esbuild.config.mjs production", "build": "node esbuild.config.mjs production",
-12
View File
@@ -114,11 +114,8 @@ export class EmbedSearch {
} }
private async embed(text: string): Promise<number[]> { private async embed(text: string): Promise<number[]> {
console.log("[Memex] embed: loadPipeline…");
await this.loadPipeline(); await this.loadPipeline();
console.log("[Memex] embed: pipe call…");
const result = await this.pipe!(text.slice(0, 512), { pooling: "mean", normalize: true }); const result = await this.pipe!(text.slice(0, 512), { pooling: "mean", normalize: true });
console.log("[Memex] embed: done, dims:", result.data.length);
return Array.from(result.data); return Array.from(result.data);
} }
@@ -141,7 +138,6 @@ export class EmbedSearch {
// ─── Index ──────────────────────────────────────────────────────────────── // ─── Index ────────────────────────────────────────────────────────────────
async buildIndex(): Promise<void> { async buildIndex(): Promise<void> {
console.log("[Memex] buildIndex START, indexing:", this.indexing);
if (this.indexing) return; if (this.indexing) return;
this.indexing = true; this.indexing = true;
this.indexed = false; this.indexed = false;
@@ -154,21 +150,18 @@ export class EmbedSearch {
try { try {
await fsp.mkdir(this.modelsDir, { recursive: true }); await fsp.mkdir(this.modelsDir, { recursive: true });
await fsp.mkdir(this.embedDir, { recursive: true }); await fsp.mkdir(this.embedDir, { recursive: true });
console.log("[Memex] Verzeichnisse OK:", this.embedDir);
} catch (e) { } catch (e) {
console.error("[Memex] Verzeichnisse konnten nicht angelegt werden:", e); console.error("[Memex] Verzeichnisse konnten nicht angelegt werden:", e);
} }
try { try {
await this.loadCache(); await this.loadCache();
console.log("[Memex] Cache geladen, Einträge:", this.cache.size);
const allFiles = this.app.vault.getMarkdownFiles(); const allFiles = this.app.vault.getMarkdownFiles();
const files = this.excludeFolders.length const files = this.excludeFolders.length
? allFiles.filter((f) => !this.excludeFolders.some((ex) => f.path.startsWith(ex + "/"))) ? allFiles.filter((f) => !this.excludeFolders.some((ex) => f.path.startsWith(ex + "/")))
: allFiles; : allFiles;
const total = files.length; const total = files.length;
console.log("[Memex] Dateien gesamt:", total, "(ausgeschlossen:", allFiles.length - total, ")");
let done = 0; let done = 0;
let windowStart = Date.now(); let windowStart = Date.now();
let windowEmbedded = 0; let windowEmbedded = 0;
@@ -193,8 +186,6 @@ export class EmbedSearch {
this.vecs.set(file.path, { vec, file }); this.vecs.set(file.path, { vec, file });
changed.push(file.path); changed.push(file.path);
windowEmbedded++; windowEmbedded++;
if (changed.length === 1 || changed.length % 50 === 0)
console.log(`[Memex] Eingebettet: ${changed.length}/${total}`);
// Flush newly embedded notes to disk every 100 to preserve progress // Flush newly embedded notes to disk every 100 to preserve progress
if (changed.length % 100 === 0) await this.flushBatch(changed.slice(-100)); if (changed.length % 100 === 0) await this.flushBatch(changed.slice(-100));
} catch (e) { } catch (e) {
@@ -220,7 +211,6 @@ export class EmbedSearch {
} }
} }
console.log("[Memex] Loop fertig, changed:", changed.length, "pipelineError:", !!pipelineError);
if (pipelineError) throw pipelineError; if (pipelineError) throw pipelineError;
const allPaths = new Set(files.map((f) => f.path)); const allPaths = new Set(files.map((f) => f.path));
@@ -233,7 +223,6 @@ export class EmbedSearch {
console.error("[Memex] buildIndex Fehler:", e); console.error("[Memex] buildIndex Fehler:", e);
} finally { } finally {
this.indexing = false; this.indexing = false;
console.log("[Memex] buildIndex END, indexed:", this.indexed);
} }
} }
@@ -259,7 +248,6 @@ export class EmbedSearch {
this.cache.set(file.path, { mtime, vec }); this.cache.set(file.path, { mtime, vec });
this.vecs.set(file.path, { vec, file }); this.vecs.set(file.path, { vec, file });
await this.saveCache([file.path], new Set(this.vecs.keys())); await this.saveCache([file.path], new Set(this.vecs.keys()));
console.log("[Memex] Re-embedded:", file.path);
} catch (e) { } catch (e) {
console.warn("[Memex] Re-embed fehlgeschlagen:", file.path, e); console.warn("[Memex] Re-embed fehlgeschlagen:", file.path, e);
} }
-2
View File
@@ -106,8 +106,6 @@ export default class MemexChatPlugin extends Plugin {
this.initEmbedSearch().catch(console.error); this.initEmbedSearch().catch(console.error);
} }
}); });
console.log("[Memex Chat] Plugin geladen");
} }
onunload(): void { onunload(): void {
+3
View File
@@ -0,0 +1,3 @@
{
"1.0.2": "1.4.0"
}