- Add `listModels()`, `setModel()`, and `getModel()` methods to `OllamaClient`
- Populate model dropdown in chat view from `/api/tags` endpoint
- Synchronize model selection across main and agent clients
- Detect user intent for vault operations from message content
- Expand action phrase matching for `shouldAutoRunReadTools()`
- Streamline retry logic and suppress "Let me..." text with actual tool calls
- Improve fallback search query generation by removing more filler words
Move send button after activity indicator in DOM order and reposition
elements via CSS. Set textarea rows to 3, increase min/max heights,
add flex-shrink to activity dot to prevent squishing, and fix
activity indicator padding and white-space handling.
Expand CRITICAL RULE instructions across edit, organize, and research agent
modes to explicitly prohibit planning language, reasoning, apologies, and
permission-seeking. Replace generic follow-up text with empty content when
tool calls are emitted.
Add a retry loop (up to 3 attempts) that suppresses text-only responses
and re-prompts the model to emit tool_calls immediately. If the model
still fails to call tools after retries, fall back to automatically
generated read tool calls based on the user's message intent.
Shows a pulsing dot with status text during workflow execution, LLM
thinking, and tool use. Disables the input and send button while active
to prevent duplicate submissions. Also restructures the chat layout to
use flexbox with the input container locked at the bottom.
Replace manual intent phrase matching with dedicated helpers that detect
when the assistant wants to use tools but didn't emit tool calls. When
detected, automatically build and execute read-only tool calls based on
the user's original message instead of nudging the model again.
This reduces back-and-forth latency for organize and research modes by
directly querying vault stats, tags, and files when the assistant
expresses intent like "let me read" or "I will check" but fails to
actually call tools.
Includes tests for the new auto-run behavior in organize mode.
Implement persistent chat history using a new ChatHistoryManager class.
Sessions are saved on view close, restored on open, and selectable via a
dropdown in the chat header. Includes delete and clear-all commands,
with automatic title generation from the first user message.
Tighten system prompts across edit, organize, and research modes to
prohibit "Let me..." / "I will..." prefatory text and require immediate
tool_call emission. Remove stale instructions referencing deleted tools.
Improve search_vault_files description for LLM clarity. Add runtime
auto-nudge: if a tool-capable mode emits no tool_calls but language
suggests intent to act, re-prompt the model to emit the required calls.
Extend the tool registry to support vault-wide tag listing and statistical
overview tools, adding them to READ, EDIT, ORGANIZE, and RESEARCH agent
modes. Includes implementations for tag aggregation, folder structure
reporting, and metadataCache integration in VaultIndexer.
- Add listener/history API to Logger for live log streaming
- Add toggle button and styled log panel to chat view
- Enhance ToolExecutor to use VaultIndexer for rich search results
- Instruct all agent modes to emit tool calls immediately instead of describing intent
Split the single model setting into `chatModel` and `agentModel` to allow
using different LLMs for conversational modes (Ask, Research) versus
agentic modes (Edit, Organize, Workflow, auto-organizer). Defaults are
`deepseek-v4-flash` for chat and `glm-5.1` for agents.
Includes backward compatibility migration from legacy `model` field,
updated settings UI, per-mode tool filtering via new `agent-modes.ts`
configs, and vault search scoring improvements (exact phrase, recency,
filename bonuses).
- chat-view.ts: include 'Tags: ...' prefix in vault context when tags exist
- chat-view.ts: update system prompt to instruct AI to pay attention to tags
when organizing or categorizing notes
- Add AutoTagger: scans untagged notes, generates AI tags via Ollama,
and applies them to frontmatter
- Add AutoLinker: finds semantically related notes via vault search
and appends a 'Related Notes' section with wiki-links
- Add settings UI for both features with configurable thresholds,
prompt templates, and limits
- Add commands: 'Auto-Tag Untagged Notes' and 'Auto-Link Related Notes'
- Add auto-organizer.test.ts with 17 tests covering tagging,
linking, frontmatter manipulation, and filtering
- main.ts: process files sequentially (not Promise.all) to avoid concurrent
embedding requests hammering Ollama; batch size reduced to 1
- vectorization.ts: shorten embedding prompts from 1000 to 500 chars,
limit headings to 5, remove frontmatter from prompt to stay well within
embedding model context window
- Update vectorization and indexing-pipeline tests for new prompt format
- Add AbortController to cancel ongoing indexing before clear/rebuild
- Track currentIndexingPromise to await cancellation before clearing collection
- Batch background indexing (5 files at a time) with 100ms delays between batches
- Skip incremental event-based indexing while a full rebuild is in progress
- Cancel indexing on plugin unload
- Fix nginx CORS headers on OPTIONS preflight responses
- src/semantic-cache.ts: Add robust URL sanitization in initialize().
Trim whitespace and reject malformed URLs (e.g. empty host like
'http://:8666') before passing to ChromaClient.
- src/main.ts: Validate ChromaDB URL in the settings tab onChange.
Fall back to 'http://localhost:8000' if the value is empty or lacks
'://'.
- docker-compose.yml: Add CHROMA_SERVER_CORS_ALLOW_ORIGINS=["*"] to
allow cross-origin requests from Obsidian's app://obsidian.md origin.
The plugin hard-capped streaming responses at 1000 chunks. For large
models like qwen2.5:32b generating detailed answers, this limit was
easily exceeded, causing the response to stop mid-sentence.
The Ollama stream already terminates naturally when the model sends the
final done signal, so the artificial chunk limit served no purpose.
- src/chat-view.ts: Remove chunkCount tracking and MAX_STREAM_CHUNKS
constant. Let the stream run until Ollama signals completion.
- src/types.ts: Add isThinking flag to ChatMessage to track transient
'model is working' state.
- src/chat-view.ts: Set isThinking: true on the assistant placeholder
message when user sends input. Clear it when the first stream chunk
arrives or on error. Update render() to show a spinner + 'Thinking…'
text while isThinking is active.
- styles.css: Add ollama-thinking-indicator class with a CSS spinner
animation and muted italic text styling.
- src/chat-view.ts: Add getIcon() returning 'bot' for the view tab icon.
Improve render() with role-specific CSS classes (user vs assistant) and
message header structure for better styling hooks.
- src/main.ts: Add ribbon icon ('bot') in the left sidebar that opens the
chat view with a single click.
- styles.css (new): Modern chat UI with message bubbles, distinct user and
assistant themes using Obsidian CSS variables, sticky input bar, styled
send button with accent color, and emoji role indicators.
- install.sh: Copy styles.css into the plugin directory and verify its
presence during installation.
- README.md: Include styles.css in manual install instructions.
- __mocks__/obsidian.ts: Add addRibbonIcon() mock for test compatibility.
- tests/chat-view.test.ts: Add getIcon() assertion.
- src/ollama-client.ts: Detect HTTP 404 on /api/chat and throw a descriptive
ApiError with the model name and the exact ollama pull command needed.
- src/error-handler.ts: For API_ERROR type, return the error message directly
instead of prefixing with 'API error: ', so the user-friendly 404 message
is shown cleanly in the Obsidian notice.
- tests/ollama-client.test.ts: Update 404 assertions to match the new
descriptive error message.
- src/semantic-cache.ts: Replace require('chromadb') with static import and
use proper ChromaClient/Collection types instead of any. Fix camelCase
API parameters (queryEmbeddings, nResults) and wrap single embedding into
Embedding[] for upsert. Fix clearCache to call client.reset() instead of
collection.reset() (matches actual chromadb API).
- src/workflow-engine/workflow-engine.ts: Fix unnecessary escapes in regex,
remove redundant 'as unknown' assertion, handle never type in template
literal, and add type annotations to replace callback to satisfy
no-unsafe-argument and no-base-to-string rules.
- tests/semantic-cache.test.ts: Update mocks to include client.reset() and
adjust clearCache assertions to match new implementation.
- Bundle chromadb into main.js via esbuild instead of externalizing it.
Obsidian's renderer cannot resolve bare require('chromadb') against a
plugin-local node_modules. By bundling, the client library is inlined and
works out of the box with just manifest.json + main.js.
- Remove eager cache initialization from OllamaClient constructor to avoid
unhandled promise rejections when chromadb/ChromaDB is unavailable.
- Fix 'Failed to execute fetch on Window: Illegal invocation' by wrapping
the default fetch fallback in an arrow function:
this.fetchFn = fetchFn ?? ((url, init) => fetch(url, init));
This preserves the window binding when fetch is called later.
- Update install.sh and README to remove the obsolete node_modules/chromadb
copy step.
- Update ollama-client-cache tests to reflect that cache initialization is
no longer eager.
Replace dynamic ESM import with require() for chromadb to ensure
Electron can resolve the package against the plugin's node_modules.
Also wrap default fetch fallback in an arrow function to avoid
potential strict mode issues with global fetch.
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
- 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
Obsidian's plugin loader expects main.js at the plugin root alongside
manifest.json — it does not resolve subdirectory paths in the 'main'
field. Added a thin CommonJS shim that re-exports from dist/main.js.
- main.js: new entry shim (module.exports = require('./dist/main.js'))
- manifest.json: 'main' changed from 'dist/main.js' to 'main.js'
- install.sh: copy main.js shim to plugin folder, verify its presence
- README.md: add main.js to manual install instructions