The disableTypeChecked block strips type info from test files but only
turns off @typescript-eslint typed rules; obsidianmd's type-aware rules
(no-plugin-as-component, no-view-references-in-plugin,
prefer-file-manager-trash-file) stayed on and crashed eslint. Turn them
off for tests alongside disableTypeChecked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Align Obsidian event/view handler signatures with the public API,
narrow AI SDK source handling to url sources, and add module
augmentation for the custom settings-changed event. Switch tsconfig
to bundler module resolution with skipLibCheck; keeps types limited
to obsidian to preserve the no-Node mobile guardrail. Reduces tsc
errors from 18 to 3 (remaining 3 are pre-existing test-mock issues).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address the source-code issues flagged by the Obsidian community plugin
review tool (https://community.obsidian.md/account/plugins/co-intelligence):
- Add `App.commands` module augmentation so `executeCommandById` is typed
rather than an unsafe-any call.
- Cast `processFrontMatter` callbacks to `CoiNoteFrontmatter` (with
`linked-tags` added to the type) instead of indexing `any` frontmatter.
- Derive provider name in model-service from the registered `Model.provider`
rather than introspecting the SDK's `LanguageModel.provider`, and type the
`generateText` params via `Parameters<typeof generateText>[0]`.
- Type the regex `replace` callback args in ChatInterface and notes.ts.
- Drop the dead `triggerChange` prop from UserInput and its call site.
- Rename unused params with `_` prefix and configure
`@typescript-eslint/no-unused-vars` with `argsIgnorePattern: "^_"`.
- Replace `document.createElementNS`/`createElement` and `el.createEl("div")`
with Obsidian's `createSvg`, `createDiv`, `createSpan` helpers in settings
and the suggestion modals.
- Narrow `state.state?.file` from `any` before passing to a string parameter,
and capture `this.app` outside the monkey-patched closure.
Replaces the read-then-modify pair in serializeCoiNote with a single
Vault.process call so the read and write happen atomically and won't
clobber concurrent edits to the note. The chat-marker guard now runs
inside the process callback, with an outer flag gating the downstream
frontmatter updates. Addresses the plugin reviewer feedback on PR
obsidianmd/obsidian-releases#6690.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
API keys for OpenAI, Anthropic, Google, and Perplexity now live in
app.secretStorage rather than the unencrypted plugin data file.
loadSettings runs a one-shot migration that copies any pre-existing
*ApiKey values into SecretStorage and strips them from saved data, so
upgrading users keep their keys without leaving an unencrypted copy
behind. Bumps minAppVersion to 1.11.4 (required by SecretStorage) and
the obsidian devDep to match. Addresses the plugin reviewer feedback
on PR obsidianmd/obsidian-releases#6690.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces the plain text input on "Default folder" and "System prompt
folder" with a folder autocomplete, and converts "Default system
prompt" from a fixed dropdown to a text input with file autocomplete
scoped to the configured prompt folder. Addresses the plugin reviewer
feedback on PR obsidianmd/obsidian-releases#6690.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove disallowed eslint-disable for sentence-case rule, remove unused
ModelId import, and remove unused doingReasoning variable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolved conflicts in favor of main's nullish coalescing (??) and
AI SDK v6 reasoning-start/reasoning-end streaming approach.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The automated PR review workflow was failing due to insufficient API credits on the associated Anthropic account.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The fullStream TextStreamPart type uses `text` property and
`reasoning-delta` chunk type, not the old `textDelta` property and
`reasoning` type. Also guard against undefined message content in
BotMessage rendering and note serialization.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address all Required and Optional lint violations flagged by the
eslint-plugin-obsidianmd automated review:
- Fix `any` types (ChatView.dispose, monkey patch typing)
- Remove unnecessary async/await from non-async functions
- Add `void` operator for intentionally unhandled promises
- Fix promise-returning callbacks where void expected
- Use String() in template literals for error objects
- Fix sentence case in UI text (Notice, setName, setDesc, setTitle)
- Replace console.log with console.error
- Remove unused imports and variables
- Remove unnecessary type assertions and escape characters
- Simplify union type override in onPaneMenu
- Add eslint-plugin-obsidianmd and ESLint config for local validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The root cause was ChatView.refresh() — triggered by the
co-intelligence:settings-changed event — tearing down and rebuilding
the entire Solid.js chat app on every settings save. This stole focus
from the active input field.
Changes:
- Remove the settings-changed listener from ChatView that called
refresh(). The Solid.js components already read from the shared
plugin object and don't need re-mounting on settings changes.
SystemPromptSelector has its own listener for prompt reloading.
- Replace the debounce/pendingChanges system with direct saves
following the standard Obsidian pattern (save in onChange).
- Update model dropdowns in-place on API key blur instead of
rebuilding the entire settings DOM.
- Remove displayWithFocusPreservation() hack.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AI SDK v6 renamed fullStream chunk properties: `textDelta` → `text`,
and split `reasoning` into `reasoning-start`/`reasoning-delta`/`reasoning-end`.
The old property names returned undefined, causing TypeError crashes in
message rendering and serialization.
Also adds nullish coalescing fallbacks on unsafe `content as string` casts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update AI SDK packages (ai, @ai-sdk/anthropic, google, openai, perplexity)
and add pnpm overrides for seroval (>=1.4.1) and jsondiffpatch (>=0.7.2) to
address 5 high, 3 medium, and 3 low severity vulnerabilities.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a test vault with sample content and a script to build and open it
in Obsidian for manual plugin testing. Add development section to README.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix issues raised in obsidianmd/obsidian-releases#6690:
- Update copyright year to 2025-2026
- Namespace generic CSS classes (sr-only, model-selector, etc.) with coi- prefix
- Add FolderSuggest (AbstractInputSuggest) for folder setting inputs
- Fix MarkdownRenderChild memory leak by tracking and unloading instances
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create Obsidian API mock (test/mocks/obsidian.ts) and test setup with
String.prototype.contains polyfill. Add tests for all utility functions
and core services: notes serialization/deserialization, URL helpers,
model context, model registry, and model service.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable --generate-notes on gh release create and add .github/release.yml
config to categorize PRs by label (enhancement, bug). Also update CLAUDE.md
with more detailed architecture and conventions documentation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>