diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index 267012a..0000000 --- a/.claude/settings.local.json +++ /dev/null @@ -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 -:*)" - ] - } -} diff --git a/.gitignore b/.gitignore index 6c4042f..e428997 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules/ *.js.map +.claude/ +.DS_Store diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3ec026d --- /dev/null +++ b/LICENSE @@ -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. diff --git a/main.js b/main.js index a9f299b..cb6872d 100644 --- a/main.js +++ b/main.js @@ -32362,11 +32362,8 @@ var EmbedSearch = class { }); } async embed(text) { - console.log("[Memex] embed: loadPipeline\u2026"); await this.loadPipeline(); - console.log("[Memex] embed: pipe call\u2026"); 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); } /** embed() with a hard timeout; rejects with "embed timeout" if exceeded. */ @@ -32386,7 +32383,6 @@ var EmbedSearch = class { } // ─── Index ──────────────────────────────────────────────────────────────── async buildIndex() { - console.log("[Memex] buildIndex START, indexing:", this.indexing); if (this.indexing) return; this.indexing = true; @@ -32397,17 +32393,14 @@ var EmbedSearch = class { try { await import_fs3.promises.mkdir(this.modelsDir, { recursive: true }); await import_fs3.promises.mkdir(this.embedDir, { recursive: true }); - console.log("[Memex] Verzeichnisse OK:", this.embedDir); } catch (e) { console.error("[Memex] Verzeichnisse konnten nicht angelegt werden:", e); } try { await this.loadCache(); - console.log("[Memex] Cache geladen, Eintr\xE4ge:", this.cache.size); const allFiles = this.app.vault.getMarkdownFiles(); const files = this.excludeFolders.length ? allFiles.filter((f) => !this.excludeFolders.some((ex) => f.path.startsWith(ex + "/"))) : allFiles; const total = files.length; - console.log("[Memex] Dateien gesamt:", total, "(ausgeschlossen:", allFiles.length - total, ")"); let done = 0; let windowStart = Date.now(); let windowEmbedded = 0; @@ -32427,8 +32420,6 @@ var EmbedSearch = class { this.vecs.set(file.path, { vec, file }); changed.push(file.path); windowEmbedded++; - if (changed.length === 1 || changed.length % 50 === 0) - console.log(`[Memex] Eingebettet: ${changed.length}/${total}`); if (changed.length % 100 === 0) await this.flushBatch(changed.slice(-100)); } catch (e) { @@ -32453,7 +32444,6 @@ var EmbedSearch = class { this.onProgress(done, total, speed); } } - console.log("[Memex] Loop fertig, changed:", changed.length, "pipelineError:", !!pipelineError); if (pipelineError) throw pipelineError; const allPaths = new Set(files.map((f) => f.path)); @@ -32466,7 +32456,6 @@ var EmbedSearch = class { console.error("[Memex] buildIndex Fehler:", e); } finally { 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.vecs.set(file.path, { vec, file }); await this.saveCache([file.path], new Set(this.vecs.keys())); - console.log("[Memex] Re-embedded:", file.path); } catch (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); } }); - console.log("[Memex Chat] Plugin geladen"); } onunload() { this.app.workspace.detachLeavesOfType(VIEW_TYPE_MEMEX_CHAT); diff --git a/manifest.json b/manifest.json index 95ee51e..495e16a 100644 --- a/manifest.json +++ b/manifest.json @@ -5,5 +5,6 @@ "minAppVersion": "1.4.0", "description": "Chat with your Obsidian vault using Claude AI — semantic context retrieval, @ mentions, thread history.", "author": "Sven", + "authorUrl": "https://github.com/svemagie", "isDesktopOnly": false } diff --git a/package-lock.json b/package-lock.json index 533505c..cc046a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "memex-chat", - "version": "0.2.3", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "memex-chat", - "version": "0.2.3", + "version": "1.0.2", "devDependencies": { "@types/node": "^20.0.0", "@xenova/transformers": "^2.17.2", diff --git a/package.json b/package.json index e6c7636..a83d89a 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,16 @@ "name": "memex-chat", "version": "1.0.2", "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", "scripts": { "build": "node esbuild.config.mjs production", diff --git a/src/EmbedSearch.ts b/src/EmbedSearch.ts index 6c2ec04..8e2dec9 100644 --- a/src/EmbedSearch.ts +++ b/src/EmbedSearch.ts @@ -114,11 +114,8 @@ export class EmbedSearch { } private async embed(text: string): Promise { - console.log("[Memex] embed: loadPipeline…"); await this.loadPipeline(); - console.log("[Memex] embed: pipe call…"); 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); } @@ -141,7 +138,6 @@ export class EmbedSearch { // ─── Index ──────────────────────────────────────────────────────────────── async buildIndex(): Promise { - console.log("[Memex] buildIndex START, indexing:", this.indexing); if (this.indexing) return; this.indexing = true; this.indexed = false; @@ -154,21 +150,18 @@ export class EmbedSearch { try { await fsp.mkdir(this.modelsDir, { recursive: true }); await fsp.mkdir(this.embedDir, { recursive: true }); - console.log("[Memex] Verzeichnisse OK:", this.embedDir); } catch (e) { console.error("[Memex] Verzeichnisse konnten nicht angelegt werden:", e); } try { await this.loadCache(); - console.log("[Memex] Cache geladen, Einträge:", this.cache.size); const allFiles = this.app.vault.getMarkdownFiles(); const files = this.excludeFolders.length ? allFiles.filter((f) => !this.excludeFolders.some((ex) => f.path.startsWith(ex + "/"))) : allFiles; const total = files.length; - console.log("[Memex] Dateien gesamt:", total, "(ausgeschlossen:", allFiles.length - total, ")"); let done = 0; let windowStart = Date.now(); let windowEmbedded = 0; @@ -193,8 +186,6 @@ export class EmbedSearch { this.vecs.set(file.path, { vec, file }); changed.push(file.path); 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 if (changed.length % 100 === 0) await this.flushBatch(changed.slice(-100)); } catch (e) { @@ -220,7 +211,6 @@ export class EmbedSearch { } } - console.log("[Memex] Loop fertig, changed:", changed.length, "pipelineError:", !!pipelineError); if (pipelineError) throw pipelineError; const allPaths = new Set(files.map((f) => f.path)); @@ -233,7 +223,6 @@ export class EmbedSearch { console.error("[Memex] buildIndex Fehler:", e); } finally { 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.vecs.set(file.path, { vec, file }); await this.saveCache([file.path], new Set(this.vecs.keys())); - console.log("[Memex] Re-embedded:", file.path); } catch (e) { console.warn("[Memex] Re-embed fehlgeschlagen:", file.path, e); } diff --git a/src/main.ts b/src/main.ts index 36a6e0a..ad2c189 100644 --- a/src/main.ts +++ b/src/main.ts @@ -106,8 +106,6 @@ export default class MemexChatPlugin extends Plugin { this.initEmbedSearch().catch(console.error); } }); - - console.log("[Memex Chat] Plugin geladen"); } onunload(): void { diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..b4690b3 --- /dev/null +++ b/versions.json @@ -0,0 +1,3 @@ +{ + "1.0.2": "1.4.0" +}