Commit graph

3 commits

Author SHA1 Message Date
Logan Yang
05a0d03fd9
feat(models): add GA gemini-3.5-flash builtin (#2492)
* feat(models): replace gemini-3-flash-preview with GA gemini-3.5-flash

Swap the preview Gemini flash builtin for the now-GA gemini-3.5-flash
across the Google and OpenRouter providers, enable it by default, and
update the user-facing model docs.

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

* chore(models): drop older Gemini 2.5 builtins, keep latest per family

Remove the Gemini 2.5 pro/flash builtins (Google + OpenRouter), leaving
only the latest of each family: gemini-3.1-pro-preview, gemini-3.5-flash,
and gemini-3.1-flash-lite. Reassign the default, required, and Google
test model roles from gemini-2.5-flash to gemini-3.5-flash.

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

* chore(models): keep gemini-2.5-pro as the GA Gemini pro builtin

gemini-3.1-pro is preview-only on the public Gemini API, so retain
gemini-2.5-pro (Google + OpenRouter) to guarantee at least one GA Gemini
pro model in the builtin list.

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

* chore(models): keep gemini-2.5-flash default, add gemini-3.5-flash alongside

Restore gemini-2.5-flash (Google + OpenRouter) and its default, required,
core, and Google test-model roles. gemini-3.5-flash stays as an additional
enabled builtin rather than taking over the default.

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 18:00:00 -07:00
Logan Yang
d3ee3f999b
fix: agent loop improvements, clickable citations, and UI fixes (#2287)
* fix: prevent agent ReAct loop from getting stuck with small local models

Small local models (e.g. qwen3.5-4b-mlx) get stuck calling localSearch
repeatedly with near-identical queries and never synthesizing an answer.

- Remove QueryExpander from agent loop to avoid model contention on
  single-connection local models (retriever still expands internally)
- Add query deduplication that pre-filters tool call batches using
  Jaccard word-overlap similarity before execution
- Force synthesis via raw model (without tools) after 2 consecutive
  iterations where all tool calls are duplicates
- Add agent-specific system prompt guidance for search limits
- Strip leaked chat template role tokens from intermediate content
- Add intermediate model output logging for debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: make inline citation numbers clickable and restore Max Sources setting

Inline citation numbers like [1], [2] in chat responses are now clickable
links that open the corresponding source note. Also restores the Max Sources
slider in QA settings, reverting the hardcoded DEFAULT_MAX_SOURCE_CHUNKS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove excessive 32px bottom padding from chat view on desktop

The padding-bottom on .view-content used max(safe-area + 4px, 32px),
forcing a 32px minimum even on desktop where safe-area-inset-bottom is 0.
Simplified to safe-area + 4px so desktop gets minimal padding while
devices with safe areas still get proper spacing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(agent): track dedup queries post-execution to keep failed searches retryable

Move previousSearchQueries tracking from before to after each localSearch tool
call executes. Previously, queries were marked as seen before any tool ran, so
if a call was aborted or the loop threw early, those queries were still blocked
from retrying on the next iteration. Now each query is added to
previousSearchQueries immediately after its tool call returns, keeping the dedup
effective for completed calls while leaving transient failures retryable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(citations): preserve Obsidian internal-link attributes on inline citation anchors

When building clickable inline citation links (e.g. [1], [2]), the previous code
only copied the href from the source section anchor. Obsidian vault-note links have
additional attributes such as data-href and class="internal-link" that are required
for in-app note navigation. Without them, clicking an inline citation resolves the
link as a plain relative URL instead of opening the corresponding note.

Fix: store the source anchor element rather than just the href, then copy all
attributes onto the generated citation anchor before setting the citation-specific
class and aria-label overrides.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(agent): only mark localSearch queries as seen after successful execution

Change the dedup tracking condition from always tracking queries post-execution
to only tracking when the tool call succeeds (result.success is true). This
ensures transient failures (e.g. temporary index unavailability) leave the
query retryable: if a localSearch fails, the model can issue the same query
again on the next iteration. Previously, even a failed execution would mark
the query as seen, blocking recovery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: deduplicate inline citations after source consolidation

When multiple chunks come from the same note, the LLM cites them
separately. After consolidation maps them to the same source number,
adjacent duplicates like [1][1] or [1] and [1] now collapse to [1].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: update GPT-5.2 to GPT-5.4 in builtin models

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add dynamic status bar clearance for desktop chat view

The chat input was hidden behind Obsidian's status bar on desktop.
Adds ChatViewLayout which measures the geometric overlap between
the view-content and the status bar, setting a CSS variable to
provide the exact padding needed. Adapts to any theme: no clearance
for auto-hide themes (opacity: 0) or themes that already account
for the status bar in their layout; correct clearance for themes
where the bar is visible and overlapping. Re-checks on theme
switches via debounced css-change listener.

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

* fix: suppress thinking tokens during streaming when reasoning is disabled

When a local model (e.g. Qwen 3.5 via LM Studio) emits text-level
<think> tags but the user has not enabled the reasoning capability,
the thinking content was visibly rendered during streaming and only
stripped once the </think> tag arrived. Now tracks the position of
excluded think blocks across chunks and truncates fullResponse to
the safe prefix on each chunk, so thinking content never appears.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 16:17:37 -07:00
Logan Yang
d7d54d2a34
docs: add user-facing documentation (#2254)
* docs: add user-facing documentation (closes #2253)

- 13 docs covering all major features: getting started, chat interface,
  LLM providers, models/parameters, context/mentions, custom commands,
  vault search/indexing, agent mode/tools, projects, system prompts,
  Copilot Plus/self-host, troubleshooting/FAQ, and index
- Written for non-technical Obsidian users
- Each doc is standalone with cross-references to related docs
- All values verified against source code (defaults, model names, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: improve user docs with website reference material

- getting-started: add glossary (LLM, API, Token, Context Window,
  Embeddings, RAG, Vector Store) and API key billing note
- chat-interface: add user/AI message buttons (edit, copy, delete,
  insert/replace at cursor, regenerate), [[Note Title]] inline reference
  syntax, Relevant Notes feature, manual Save Chat button, and
  auto-compact user experience note
- context-and-mentions: add PDF context (+ Add context button) and
  image context (drag/drop or image button) methods
- custom-commands: fix placeholder syntax ({} not {selected text}),
  add {FolderPath} variable, note tags must be in note properties,
  add richer example prompts
- llm-providers: add LM Studio CORS requirement, 3rd-party CORS warning
- vault-search-and-indexing: add cost estimation tip (Count total
  tokens command), RangeError/partitioning note, tag property note
- agent-mode-and-tools: add Revert option, note @composer works in
  both Plus and Projects modes
- projects: add 50+ file type support detail
- copilot-plus-and-self-host: add dashboard URL
- troubleshooting-and-faq: add first-steps section, RangeError fix,
  response cut-off fix, notes-not-found checklist, note referencing
  FAQ, English response FAQ, image/PDF FAQ, privacy note

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove UI_RENDERING_PERFORMANCE.md from docs (already in designdocs)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: add doc maintenance rule to CLAUDE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix custom command variable syntax and project deletion claim

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: clarify 16 built-in providers + unlimited OpenAI-compatible models

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix semantic search default and partitioning claims

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix self-host status and remaining partitioning claim

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: fix self-host setup steps, tool count, and memory tool availability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 17:39:00 -08:00