Commit Graph
362 Commits
Author SHA1 Message Date
leokunandCursor 3725f27d7b fix(ci): rustfmt the WebSearch query test let-else
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 23:43:46 +08:00
leokunandCursor 3ed02f9a09 chore(release): bump desktop to 1.0.0
Co-authored-by: Cursor <cursoragent@cursor.com>
v1.0.0
2026-09-15 23:26:32 +08:00
leokun 51927a0587 Merge pull request #406 from linanwanttodo/main
perf(desktop): on-demand webview lifecycle and mimalloc allocator
2026-09-15 22:43:17 +08:00
leokun d23c341471 Merge pull request #431 from MaxFreedomPollard/fix/web-search-duplicate-url-rrf
fix(search): stop a repeated URL from faking cross-engine agreement
2026-09-15 21:48:25 +08:00
leokun 5f23405704 Merge pull request #432 from LyricalNanoha/feat/antigravity-3.8-flash
feat(antigravity): add Gemini 3.8 Flash models and fix endpoint/UA
2026-09-15 21:47:49 +08:00
leokunandCursor 127cf8b883 fix(settings): map unknown UI locales to en-US for commit prompts
Portuguese and other interface languages have no commit prompt catalog; sending pt-BR made settings fail to deserialize.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 21:31:00 +08:00
leokun c0d5f9a815 Merge pull request #454 from decsters01/feature/melhorias-contribuicao
feat: add Brazilian Portuguese locale and configurable token pricing
2026-09-15 21:23:10 +08:00
Usuario ExemploandCursor 0ce64e20ba feat: add Brazilian Portuguese locale and configurable token pricing
Enable Portuguese-speaking users with full pt-BR translations and let users
set per-million token rates so home cost estimates reflect their actual pricing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 18:47:23 -03:00
leokun 3b37c33607 Merge pull request #435 from MuRo-J/fix/tool-parameter-aliases
fix: accept common tool parameter aliases
2026-09-08 16:32:23 +08:00
吉杨杰andCursor fc1e96d6a1 fix: accept common tool parameter aliases
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 15:39:20 +08:00
nanoha 02ecbedf7d feat(antigravity): add Gemini 3.8 Flash models and fix endpoint/UA
Root cause: Google's fetchAvailableModels API returns different model
catalogs depending on the endpoint. The daily endpoint returns 33
models including Gemini 3.8 Flash series, while the production
endpoint only returns 28 models without 3.8.

Additionally, the User-Agent header was using a stale Electron-style
format (Antigravity/4.3.0) that does not match the real Antigravity
client's UA (antigravity/hub/2.12.2), and unnecessary x-client-name /
x-client-version headers were being sent.

Changes:
- Reorder ANTIGRAVITY_ENDPOINTS to try daily endpoint first (matching
  real Antigravity client behavior)
- Update ANTIGRAVITY_USER_AGENT to match the real Antigravity hub UA
- Remove unnecessary x-client-name/x-client-version headers
- Add Gemini 3.8 Flash (high/medium/low/tiered) to static model list
- Add gemini-3.8-flash passthrough in resolveAntigravityModel
2026-09-08 09:36:11 +08:00
Max Freedom Pollard ff9978f74c fix(search): stop a repeated URL from faking cross-engine agreement
`WebSearch::search` fuses the engines with Reciprocal Rank Fusion, which
sums one term per ranked list. `merge` added a term for every result
instead, so an engine that listed the same canonical URL twice had both
of its ranks counted:

    1/61 + 1/62 = 0.0325

That is what two independent engines agreeing at rank 1 are worth
(2/61 = 0.0328), produced from a single list. Agreement across engines is
the only ranking signal this federation has, and a repeat inside one
engine forges it.

The repeats come from the repository's own canonicalization, not from
exotic input. `canonicalize` in `search/engine.rs` drops the fragment,
the trailing slash and the `utm_*`, `gclid`, `fbclid` and `mc_*`
parameters, and `redirected_target` unwraps the Bing, DuckDuckGo and
Google redirector links, so rows that are visibly distinct on one result
page collapse onto one URL. Nothing dedupes an engine's own list before
`merge` sees it.

`merge` already knew the rule: the engine label was guarded with
`!existing.engines.contains(&engine)`. Put the score behind the same
guard, so each engine contributes its best rank once. Cross-engine
merging and the longest-snippet rule are untouched.
2026-09-07 05:56:57 -04:00
leokun 1268e99b5a Merge branch 'main' of github.com:leookun/cursor-byok 2026-09-07 09:47:48 +08:00
leokun 99d527d9c1 Merge pull request #425 from kevin9327/fix/mcp-resource-truncation-notice
fix(tools): report the ListMcpResources cap in resources, not bytes
2026-09-06 20:57:55 +08:00
The Gru fdae9c41c7 fix(run): make automatic compaction recover an over-limit conversation (#426)
Automatic compaction cannot do its job once a conversation crosses the
context window, so the conversation stays there permanently. Observed
against a 1M-token Anthropic window:

1. The summarize call replays the full history. It runs precisely
   because that history is too large, so the request is itself over the
   limit ("prompt is too long"), or it ends with an assistant/tool
   message that Anthropic refuses as a prefill. Either way the run falls
   back to the 12K truncated JSON summary, which discards the context.
   In one trace the summarizer received 771 messages (2.78 MB) and
   returned a single token.

2. The compaction check uses a 10K fixed reserve. The estimate trails
   the provider's own count by the request context and provider-side
   overhead that the message-tail estimate does not model; a 948K
   estimate passed the check and Anthropic counted 1,017,628.

3. When the provider does refuse the prompt, the run retries the same
   prompt eight times at 5s intervals and then fails. Nothing compacts.

Fixes, all in server/src/run:

- compaction_history trims the summarizer input to the context budget
  at user-turn boundaries (never splitting a tool call from its
  results) and guarantees it ends with a user message.
- context_budget keeps 10% of the window free instead of a fixed 10K,
  so the reserve scales with the model and absorbs the drift.
- A provider refusal matching is_context_overflow compacts once and
  retries the turn instead of failing it.
- 4xx responses other than 408/425/429 are terminal. A rejected request
  fails identically every time, so retrying only delays the error.

Separately, Cursor can resume a finished turn whose checkpoint already
ends with the assistant, which Anthropic also rejects as a prefill.
run/history.rs appends a transient user tail to every provider request
that would otherwise end with the assistant. The tail is never
persisted, so committed checkpoints stay an exact prefix of the next
turn and the usage anchor still counts persisted messages only.
2026-09-06 20:33:03 +08:00
leookun 9637efd795 chore(release): bump desktop to 0.1.7 v0.1.7 2026-09-05 01:40:32 +08:00
leookun d8190fc07e fix(desktop): cache ads across refresh failures 2026-09-05 01:35:30 +08:00
leookun f1ab8c7221 fix(desktop): terminate Cursor before proxy setup 2026-09-05 01:23:34 +08:00
leokun 03b25be9d8 fix(desktop): speed up ad marquee text 2026-09-05 00:36:53 +08:00
leokun 7484bb9e07 fix(desktop): improve ad marquee and hide windows consoles 2026-09-05 00:36:11 +08:00
leokun 20fdea8fb3 fix(codex-auth): add reset card actions and tests 2026-09-05 00:12:26 +08:00
leokun c379c315e6 feat(desktop): add compact modal size 2026-09-05 00:12:20 +08:00
leokun 2cb15b541b feat(desktop): add plugin resource actions 2026-09-05 00:12:14 +08:00
leokun 8fbbcd5ae9 feat(desktop): add promotion marquee and proxy fix 2026-09-04 23:07:41 +08:00
leokun 900364229e Merge branch 'main' of github.com:leookun/cursor-byok 2026-09-04 21:58:29 +08:00
leokun 4700d3abc0 feat(desktop): add tooltip provider and model management 2026-09-04 21:58:24 +08:00
leokun 50ac77cdf3 Merge pull request #422 from kevin9327/fix/proxy-settings-unreadable-row
fix(store): keep an unreadable proxy row from bricking every request
2026-09-04 19:39:26 +08:00
kevin9327andClaude Opus 5 c3951a448c fix(tools): report the ListMcpResources cap in resources, not bytes
`gate_mcp_resources` caps the list at `MCP_RESOURCE_LIMIT` (200 resources),
then describes that truncation with `truncation_notice`, which is written
for byte budgets and was handed `MCP_TEXT_LIMIT`. A server returning 250
resources produced:

    [truncated: ListMcpResources result exceeded 32768 bytes; showing 200 of 250 bytes]

Neither figure describes what happened: 32768 is a text budget this path
never applies, and the counts are resources rather than bytes. The notice
goes into a sentinel resource's description, so it is what the model reads
to learn why the list is short -- and it invites the conclusion that the
list was cut for size and would fit under a smaller byte budget.

State the cap that was actually applied, in its own unit, matching the
wording the sibling item-count truncation in `gate_mcp` already uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 20:12:02 +09:00
kevin9327andClaude Opus 5 0a8934b46d fix(store): keep an unreadable proxy row from bricking every request
`8942287` renamed `ProxyMode::System` to `ProxyMode::Default`, changing the
persisted wire value from `"system"` to `"default"`. No migration rewrites
the existing `service_settings` row and `ProxyMode` has no alias, so any
install that ever saved proxy settings on an earlier build now holds a row
this build cannot deserialize:

    unknown variant `system`, expected `default` or `custom`

`proxy_settings_secret` turned that into a hard error, and it is the first
statement of every outbound client factory, so on upgrade the failure hits
model calls, plugin installs, search, and the Cursor upstream proxy alike.

It is also unrecoverable from the UI. `proxy_settings` reads the same row,
so the settings page cannot render the proxy card, and `set_proxy_settings`
reads the existing row before it writes, so the user cannot overwrite the
row that broke them. Only editing SQLite by hand clears it.

Read the row through a fallback that logs and returns the default instead.
The affected rows are exactly the ones whose mode meant "no outbound proxy",
which is what the default already is, so nothing is silently changed for
them; a genuinely corrupt row costs the user a re-entered address instead of
a dead install.

Deliberately not `#[serde(alias = "system")]`: `8942287` added a test
asserting that value no longer parses, and this keeps that true while making
the persisted row survivable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 19:50:51 +09:00
leokun 37f9c4c4c8 Merge pull request #401 from masudranaxpert/main
feat(antigravity): add Google Antigravity auth plugin with auto-rotation, model catalog & multi-turn support
2026-09-04 17:21:39 +08:00
leokun 6ad0d74379 Merge main and host authorization-code OAuth in core 2026-09-04 17:16:29 +08:00
leokun 2f3bffd15a fix(ci): satisfy Rust 1.98 clippy checks 2026-09-04 16:35:37 +08:00
leokun edcdd77cad style(desktop): refine ads menu background 2026-09-04 16:18:42 +08:00
leokun 242861436d fix(desktop): show discovered model options 2026-09-04 16:17:56 +08:00
leokun 3aae326914 ci: check frontend and desktop platforms 2026-09-04 16:13:53 +08:00
leokun 082b6f05d8 Merge pull request #396 from kevin9327/ci/run-make-check-on-pull-requests 2026-09-04 16:12:52 +08:00
leokun 0f564c0e7c fix(tools): preserve accurate truncation notices 2026-09-04 16:12:31 +08:00
leokun 3039eaff21 Merge pull request #392 from kevin9327/fix/tool-result-truncation-budget 2026-09-04 16:08:43 +08:00
leokun aa47152f1f fix(provider): preserve content-filtered tool call rejection 2026-09-04 16:08:26 +08:00
leokun 56b67aff88 Merge pull request #391 from kevin9327/fix/openai-chat-stop-with-tool-calls 2026-09-04 16:07:15 +08:00
leokun 296c9a947f Merge pull request #408 from kevin9327/chore/restore-make-check-green-2 2026-09-04 16:06:56 +08:00
leokun a000ac8921 Merge pull request #393 from kevin9327/fix/usage-accumulation-drops-known-counts 2026-09-04 16:06:56 +08:00
leokun 02db171f2c Merge pull request #390 from kevin9327/fix/local-rules-test-blob-ack 2026-09-04 16:06:56 +08:00
leokun cd09c60657 Merge remote-tracking branch 'origin/main' 2026-09-04 15:46:50 +08:00
leokun 52c52abc66 Merge pull request #397 from kevin9327/fix/duplicate-tool-call-id-hang
fix(conversation): scope completed tool call ids to their round
2026-09-04 15:46:17 +08:00
leokun 82f6add55d Merge pull request #412 from ProtectCookies/main 2026-09-04 15:45:51 +08:00
leokun 17342167ac feat: update desktop settings and server compatibility 2026-09-04 15:33:55 +08:00
leokun 8942287a27 refactor(proxy): change proxy mode from "system" to "default" across the application
- Updated the default proxy mode in `api.ts`, `ProxySettingsCard.tsx`, and `SettingsPage.tsx` to "default".
- Adjusted related translations in `catalog.json`, `en-US.json`, and `zh-CN.json`.
- Modified the `ProxyMode` enum in `settings.rs` to reflect the change from "system" to "default".
- Enhanced proxy handling in the server code to support the new default mode.
2026-09-03 16:32:02 +08:00
leokun 924b5e5926 feat(cursor): cli 接入本地模型路由与配置
- feat(服务配置): 本地响应配置并禁用 HTTP/2 传输
- feat(模型目录): 提供默认模型接口及本地路由凭据
- fix(待办状态): 基于检查点合并增量待办并保留未变更项
- fix(模型参数): 忽略未知参数以兼容新版 Cursor 请求
- test(本地路由): 覆盖模型元数据路由与凭据行为
2026-09-03 16:01:25 +08:00
ProtectCookies a511fb983d Merge branch 'main' of https://github.com/ProtectCookies/cursor-byok 2026-09-03 11:47:10 +08:00