feat: add local agent MCP tools and optional source-grounded AI answers
Core CI / core (ubuntu-latest) (push) Failing after 3m6s
Core CI / core (macos-latest) (push) Canceled after 0s
Core CI / core (windows-latest) (push) Canceled after 0s
Core CI / desktop (ubuntu-latest) (push) Successful in 5m41s
Core CI / desktop (macos-latest) (push) Canceled after 0s
Core CI / desktop (windows-latest) (push) Canceled after 0s

This commit is contained in:
karl committed 2026-10-12 20:28:38 +02:00
1 parent 70746ef428
commit f5b03c6fb0
27 files changed
+2988 -13

No files matched your search

+59
View File
@@ -0,0 +1,59 @@
# Optional summaries and questions
searchi's search runs locally with Google EmbeddingGemma 2. You can optionally
connect an OpenAI-compatible text-generation endpoint to summarize a selected
document passage or ask a question about it. This does not change the search
model or require an AI service for ordinary searches.
## Connect your preferred endpoint
In desktop settings, open **Optional AI answers**, enable **summaries and
questions**, and enter your endpoint's API base URL, model name and API key if
required. A local server might use
`http://127.0.0.1:1234/v1`; use the exact URL and model supplied by your provider.
searchi appends `/chat/completions` to that base URL.
Configuration and the key are kept for the current app session only. They are
not saved to the search index, settings file or performance reports. Re-enter
them after restarting the app. There is no default cloud provider.
## Choose what to send
Select a document result with a page, paragraph or text-line source. Open the
**Summarize or ask** panel and inspect the prepared excerpt. Choose
**Summarize this passage**, or enter a question and choose **Ask**. Only that explicit action makes a
request; normal searches and selecting a result do not contact the endpoint.
The request contains the displayed excerpt, your question if present, a generic
source label and its page/paragraph/line location. searchi does not attach the
file, send its filename or path, or upload the whole folder. Anything you type
into the question is sent as entered. A hosted endpoint receives this content;
a local endpoint keeps it on your machine according to that server's setup.
The excerpt is bounded and can be the beginning of the selected indexed source,
rather than the exact small search snippet. Read it before sending. Changed or
deleted source files require reindexing and selecting a current result.
Answers are labeled as model-generated drafts, with source IDs. Read the source
before relying on an answer: citation checks establish which excerpt was cited,
not whether every generated claim is correct. Image/audio/video summaries,
whole-document answers, multiple-result context and conversation history are
not included in this initial integration.
## Compatible API contract
The adapter sends a non-streaming `POST /chat/completions` request with `model`
and `messages`. Authentication, when configured, uses a Bearer header. The
model is instructed to return JSON containing `answer` and `citations` inside
`choices[0].message.content`. The endpoint must support this shape and the
chosen model must follow that instruction. Unknown source citations and invalid
responses produce an error; search remains available.
Requests use timeouts and size limits. Redirects and ambient proxies are
disabled to keep the configured destination explicit. Endpoint URLs must use
HTTP or HTTPS and must not contain embedded credentials, query strings or
fragments. No live hosted provider has been validated by the local fixture
tests; provider compatibility and answer quality remain release checks.
For the underlying format, see the
[OpenAI Chat Completions reference](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create).