mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
* feat(tools): add base:create command and .base active note support Add `base:create` to the obsidianBases CLI tool, enabling creation of new items in Obsidian Bases through natural language. Also add .base files as recognized active notes so they appear in chat context. Changes: - Add base:create command with name, content, view params to CLI tool - Support .base files as active notes in chat context - Add TEXT_READABLE_EXTENSIONS and ALLOWED_NOTE_CONTEXT_EXTENSIONS to constants.ts as single source of truth for file extension checks - Use isTextReadableFile() in contextProcessor and utils instead of hardcoded extension checks - Register .base in MarkdownParser for content reading - Fix inaccurate filter syntax in Base YAML prompt instructions - Fix broken lint-staged eslint flag (--no-warn-ignored not in eslint 8) - Update design doc with base:create in v1 tier and write policy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tools): improve LLM routing for .base file operations Add explicit disambiguation in both writeToFile and obsidianBases prompts to prevent the LLM from using Composer for .base operations. writeToFile now excludes .base files by default, and obsidianBases declares itself as the primary tool for all .base operations with clear examples of when each tool should be used. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tools): add execution-time guard for .base file routing Add a code-level guard in executeSequentialToolCall that intercepts writeToFile/replaceInFile calls targeting .base files and redirects the LLM to use obsidianBases instead. This is more reliable than prompt-only disambiguation since it works regardless of what the LLM decides. The guard only fires when obsidianBases is available (desktop). On mobile or when the tool is disabled, writeToFile proceeds normally. The error message tells the LLM exactly which commands to use, so it self-corrects on the next iteration. Also simplifies the prompt instructions by removing the verbose disambiguation text that wasn't working reliably. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(composer): respect user auto-accept setting over LLM confirmation param The writeToFile tool allowed the LLM to bypass the diff preview by passing confirmation=false, even when the user had not enabled auto-accept edits in settings. Now the preview is always shown unless the user has explicitly enabled auto-accept. The LLM's confirmation parameter is ignored. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(tools): add daily command to create today's daily note The agent had no way to create a daily note - daily:append/prepend require non-empty content and don't apply templates. Add the CLI `daily` command which creates today's daily note with the user's configured template and folder from the core Daily Notes plugin. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tools): allow composer to create new .base files The execution-time guard was blocking writeToFile for ALL .base paths, including creating brand new .base files. Now the guard only redirects when the .base file already exists (editing an existing base should use CLI). Creating a new .base file via composer proceeds normally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tools): improve Base YAML filter syntax and add validation step Fix LLM generating invalid Base YAML by adding explicit filter format rules: single string or and/or/not objects only, bare YAML lists are invalid. Also add a validation step that calls base:views after creating a .base file to verify it parses correctly, enabling the agent to self-correct on errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tools): remove .base file execution guard The guard was too aggressive - it blocked legitimate .base YAML edits (adding columns, changing filters) because the CLI has no commands to modify .base file structure. Editing .base YAML requires writeToFile. Routing between CLI (base:create, base:query) and composer (YAML edits) is now handled entirely by prompt instructions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: restrict embedded note segment parsing to markdown files only Revert the embed gate from isTextReadableFile() back to .md-only. The extractMarkdownSegment logic treats # as a heading reference, but .base files use # for view names (![[Library.base#To Read]]). Routing .base embeds through heading parsing would fail and return an error block instead of usable context. The chain restriction check (Plus-mode gating) correctly uses isTextReadableFile since it's about access control, not parsing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| todo | ||
| BEDROCK_TOOL_CALLING.md | ||
| CITATION_IMPLEMENTATION.md | ||
| CONTEXT_ENGINEERING.md | ||
| MESSAGE_ARCHITECTURE.md | ||
| OBSIDIAN_CLI_INTEGRATION.md | ||
| TOOLS.md | ||