refactor: replace overloaded surface terminology

This commit is contained in:
Turtle
2026-07-24 19:54:25 +08:00
parent c172faed37
commit 0c708cb10d
626 changed files with 1396 additions and 1397 deletions
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/web/web-search-deepseek/README.md
README.md: fb9e528633954b8eb9fd0fec8d19e24381a63f12
README.md: 0ddd64827dde8a9f27937305fcb71d8c55e25ae6
README.zh.md: 4e761aa6ef1a67ce17fbc1cabf595af7f24e15e6
+1 -1
View File
@@ -36,7 +36,7 @@ It reuses the `DEEPSEEK_API_KEY` credential reference (no new secret) but **not*
## Mapping
DeepSeek returns no provider-generated answer surface this provider trusts as `content`, so `content` is omitted. `sources[]` comes from `web_search_result` items inside `web_search_tool_result` blocks: `url``url`, `title``title`, and `publishedAt``page_age`. Snippets live separately as URL-keyed `cited_text` entries in a text block's `citations[]`; the provider joins them, leaving `snippet` absent when no excerpt exists.
DeepSeek returns no provider-generated answer content this provider trusts as `content`, so `content` is omitted. `sources[]` comes from `web_search_result` items inside `web_search_tool_result` blocks: `url``url`, `title``title`, and `publishedAt``page_age`. Snippets live separately as URL-keyed `cited_text` entries in a text block's `citations[]`; the provider joins them, leaving `snippet` absent when no excerpt exists.
Results are deduplicated by URL because one request may surface the same page across searches. DeepSeek exposes `maxUses`, not a result-count knob, so the seam enforces `maxResults` by truncating `sources[]` and setting `truncated`.
@@ -27,7 +27,7 @@ import type {
export const DEEPSEEK_PROVIDER_ID = 'deepseek-official'
/**
* Default endpoint: DeepSeek's Anthropic-compatible surface, `/v1` included
* Default endpoint: DeepSeek's Anthropic-compatible API, `/v1` included
* (`/messages` is appended). This is NOT the chat-completions base
* (`https://api.deepseek.com`) `@deepseek-ai/dsh-llm-deepseek` uses, so this
* provider does NOT reuse `$DEEPSEEK_BASE_URL` — only the API key is shared.
@@ -111,7 +111,7 @@ export interface DeepSeekSearchProviderOptions {
/**
* Build a `url → cited_text` map from every `text` block's `citations[]`. This
* is the snippet surface: Anthropic `web_search_result` items carry
* is the snippet source: Anthropic `web_search_result` items carry
* `url`/`title`/`page_age` but typically NO inline snippet — the excerpt lives
* in a separate `text` block's citation, keyed by `url` (first occurrence wins).
*
@@ -14,13 +14,13 @@ export interface WebSearchResultItem {
page_age?: string | null
}
/** A `web_search_tool_result` content block: the citeable result surface. */
/** A `web_search_tool_result` content block: the citeable result shape. */
export interface WebSearchToolResultBlock {
type: 'web_search_tool_result'
content?: WebSearchResultItem[]
}
/** One citation location inside a `text` block (the snippet surface). */
/** One citation location inside a `text` block (the snippet source). */
export interface CitationLocation {
type?: string
url?: string | null