logancyang_obsidian-copilot/src/agentMode
Zero Liu 4e8c604efb
feat(agent-mode): teach backends about @-mention pill syntax (#2498)
* feat(agent-mode): teach backends about @-mention pill syntax

The chat editor serializes @-mention pills to `[[note]]`, `{folder}`, and
`{activeNote}` tokens, but only `[[note]]` was understood — the others
were literal strings to the agent. Add a shared pill-syntax directive
appended to opencode, codex, and claude SDK spawn-time instructions
(mirroring the existing skill-creation directive plumbing), and resolve
`{activeNote}` to the real `[[Note Title]]` at send time since the active
file is a client-side concept the agent can't query.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(agent-mode): prune narration comments from pill-syntax change

Cut multi-line JSDoc and inline rationale that explained WHAT or referenced
callers, per the project's "one short line max, only WHY" rule.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(agent-mode): preserve extension when resolving {activeNote}

Non-markdown active files (.pdf, .canvas) lost their extension when
{activeNote} was rewritten via activeFile.basename, leaving the agent
with an ambiguous [[name]] that didn't match the path the pill envelope
carries. Mirror NotePillNode.getTextContent's extension-aware
serialization so the inline token matches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:32:49 -07:00
..
acp fix(agent-mode): make binary auto-detect work under Obsidian's sparse GUI PATH (#2480) 2026-05-20 19:05:41 -07:00
backends feat(agent-mode): teach backends about @-mention pill syntax (#2498) 2026-05-20 23:32:49 -07:00
sdk feat(agent-mode): per-backend env variable overrides (#2499) 2026-05-20 22:58:57 -07:00
session feat(agent-mode): teach backends about @-mention pill syntax (#2498) 2026-05-20 23:32:49 -07:00
skills feat(agent-mode): teach backends about @-mention pill syntax (#2498) 2026-05-20 23:32:49 -07:00
ui feat(agent-mode): teach backends about @-mention pill syntax (#2498) 2026-05-20 23:32:49 -07:00
AGENTS.md feat(agent-mode): introduce Agent Mode feature 2026-05-20 19:05:41 -07:00
CLAUDE.md feat(agent-mode): introduce Agent Mode feature 2026-05-20 19:05:41 -07:00
index.ts feat(agent-mode): inline tool permission cards in chat (#2493) 2026-05-20 19:05:41 -07:00