Commit Graph

9 Commits

Author SHA1 Message Date
fegger 9367811c5a fix: switch to esbuild bundling — single main.js at plugin root
The root cause: Obsidian's plugin loader expects main.js at the plugin root
alongside manifest.json.  The previous 'dist/' output + shim approach caused
'Cannot find module ./dist/main.js' because dist/ was either missing or not
resolved correctly in Obsidian's module loader.

Changes:
- build: use esbuild to bundle all source into a single main.js (61KB)
  tsc --noEmit for type checking; esbuild for the actual bundle
- main.js: no longer a shim — it's the fully bundled plugin
- package.json: added esbuild as devDependency; obsidian moved to devDeps
- install.sh: remove dist/ copy step, add cleanup of old dist/ from vault
- README.md: updated manual install steps to reflect bundling
2026-05-19 18:23:24 +02:00
fegger 4ea2734ade fix: move obsidian to devDependencies, improve shim export
- package.json: move obsidian from dependencies to devDependencies
  (it is a type stub — having it in dependencies risks shadowing
  Obsidian's built-in API if node_modules is present in the plugin folder)
- main.js: explicitly extract default export from dist/main.js so the
  shim works with both plugin.default and direct-export loader patterns
2026-05-19 18:21:17 +02:00
fegger 378642152e fix: plugin cannot be installed — manifest path, deps, and install script
- manifest.json: fix 'main' from 'src/main.js' to 'dist/main.js'
  (TypeScript compiles to dist/, not src/ — Obsidian could not find the entry point)
- manifest.json: set isDesktopOnly to true (plugin requires a local Ollama server)
- package.json: remove unused node-fetch dependency (ESM-only, conflicts with CommonJS build)
- src/semantic-cache.ts: use dynamic import for chromadb instead of top-level import
  (prevents plugin load crash when chromadb is not installed; cache defaults to disabled)
- install.sh: new script that installs deps, builds, and copies the plugin into a vault
- README.md: add quick install, manual install, and expanded troubleshooting sections
2026-05-19 17:39:10 +02:00
fegger 2d78882594 chore: move compiled output to dist
Update the plugin entrypoint and TypeScript output directory to use dist instead of writing generated JavaScript into src.

Remove previously checked-in compiled source files and add coverage for the Ollama client and tool executor.
2026-05-19 17:30:05 +02:00
fegger 179a58b95b Add semantic cache support using ChromaDB 2026-05-07 22:47:01 +02:00
fegger 4fabf1df98 Refactor lint config and retry logic 2026-05-07 14:44:59 +02:00
fegger 2968932d69 Add error handler and improve coverage 2026-05-06 18:24:24 +02:00
fegger 59df2f6856 Refactor Ollama client and related components
Update error handling and improve streaming capabilities in the Ollama client and related components. Key changes
include:

- Simplify error types and improve error handling
- Refactor streaming logic to use async generators
- Update tool execution and vault indexing
- Improve utility functions and types
- Update test files to reflect changes
2026-05-05 17:09:16 +02:00
fegger f638b06a86 initial commit 2026-05-04 22:05:10 +02:00