Commit Graph
5 Commits
Author SHA1 Message Date
yetone 82be8c14a5 gui tests: a model chip's right-click settles in Chromium before its menu is read
model-api-preset, model-test-why, provider-detect-models and model-copy-id
failed in Chromium only, on main. They were stale tests, not app bugs:
- To right-click a chip out of sight, Playwright scrolls the editor first.
  Chromium sends that scroll's event a frame later, after the menu has
  opened, and a menu closes on a scroll, so its items were detached under
  the click. rclick() now scrolls the chip in with a trial click, lets two
  frames pass, then right-clicks.
- model-copy-id read the footer as soon as the fake server had the id,
  before the page had the answer. It now waits for the footer.
- model-api-preset's one-API chip menu now has Copy model ID beside its
  test (81879b90). It expects those two items and no "Asked on".

All four pass in Chromium and WebKit, en and zh.
2026-10-06 05:07:13 +08:00
FanbuzandClaude Opus 5.5 3ce0a0bf27 fix: 收敛中文界面文案 (#846)
删去中文提示里的过程叙述和动机解释,保留数字、条件和后果;同步更新相关测试的中文断言。

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:27:19 +08:00
yetone 71d96e28e8 system one: a decision provider's own models-list URL is asked as given, and its models can each be tested (Discord, ARNO: OpenRouter added as a System One provider with the list https://openrouter.ai/api/v1/models?limit=500&output_modalities=decisions didn't get its models, and a model typed in by hand couldn't be tested from its right-click) — a System One-only provider went to fetchDecide before its ModelsURL was read, so magpie asked …/models, which at OpenRouter lists the 466 chat models, and kept only Jev's ids of those: typesafe/jev-router alone. With a ModelsURL, fetchDecide now asks it as written, query included, and keeps every id in it, since that list is of decision models already (OpenRouter's answers 13: pplx-decider, liquid/d1, cloudflare/clef, respan/span-01, typesafe/jev-1.13 …). Without one nothing changes, Bailian included. Testing a decision model was refused outright (the chip's Test this model off, Test models leaving them out); where the API takes System One's own body (System One, TypeSafe, OpenRouter, Vercel's TypeSafe API) each model is now sent AskSystemOne's yes-or-no question, the one Detect already asks, and the editor offers Test for it (providerJSON.decideTest); Vercel's evaluation models and Workers AI, which wrap it their own way, still say why not. TestDecideModelsURLAndModelTest (a fake OpenRouter: the plain list, the decisions list, a hand-added model through /systemone, an unknown one failing) and TestModelTest's Workers AI case fail on the old code; model-test-why.test.cjs gains a hand-added System One model tested from its chip and Test models, and a Workers AI one still off (WebKit en and zh pass, with model-test-one and model-copy-id; Chromium doesn't launch in this sandbox). OpenRouter's live decisions list returns the 13 models. Not tried with an OpenRouter key: the /systemone question itself. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-04 18:40:13 +08:00
yetone 81879b90f3 providers: a model chip's right-click menu copies the model's id (Discord, ARNO on v0.1.815: 希望provider的模型右击菜单除了测试模型外,还能添加拷贝模型id的功能) — the menu a chip opens in a provider's editor had Test this model (and Asked on … where the provider has more than one API) and nothing to take the id with; a chip shows the model's name where it has one, so the id (zai/glm-5.3-flash under "GLM 5.3 Flash") had to be read off its tooltip and typed. The menu now has Copy model ID / 复制模型 ID under Test this model, through the app's own menu (openRowMenu) and copy(): magpie's /api/copy, the page's clipboard and the copy command after it, as every other copy in the app; the footer says "Model ID {model} copied" / 已复制模型 ID {model}. It is on where the model can't be tested (an own-API subscription's, a classifier's) too. The app has English and Chinese strings only (i18n.js has no Japanese table). model-copy-id.test.cjs (a relay's prefixed, plain and hand-picked ids and an own-API account's: the id, not the name, is posted to /api/copy, the footer says so, nothing is tested, picked or scrolled, no left-border accent; en and zh) fails on the old code and passes in WebKit; model-test-why expects the second item beside the disabled test one. model-test-one, model-test-why, provider-typed, provider-detect-models and click-scroll pass in WebKit; Chromium doesn't launch here, so not tried there. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. Not tried in the app's own window (its /api/copy path is the one the other copies use). 2026-10-04 13:36:54 +08:00
yetone a6b9a7517d providers: a ClinePass model's test is asked as Cline asks, and every provider's model chips say on a right-click whether they can be tested (ARNO on Discord: clinepass的free模型在右击检测的时候会报错 cline-free/xxxxx 没有响应: 500·empty response content; 有些provider里的模型可以右击检测,有些却不可以,为什么?) — the test already carried Cline's desktop headers (probe sets ClineClient), but its body was the generic smallest one: not streamed, max_tokens 16. Cline's free models (deepseek-v4.1-flash, mimo…) reason first, so 16 tokens left nothing to say and the Cline API answered 500 "empty response content", while agents' requests (streamed, with room) were answered (lml). A Cline probe (clineProbe) is now asked as Cline's clients ask: stream true, max_tokens 1024; and probe reads any streamed answer only to the model's first word, thought or tool call (Chat, Responses and Anthropic events), so the room isn't spent, and an error the stream gives after its 200 (an error chunk, Anthropic's error event, response.failed) fails the test with its message instead of passing it — this also applies to the probes that already streamed (stream-only accounts, OpenCode Zen's free tier); a stream that ends with neither is answered, as a 200 was. Which models could be tested was !decide && !account in app.js, with no reason: every signed-in account lost the right-click and Test models, even those magpie sends requests at an endpoint (Claude, Codex, Copilot, Grok, WorkBuddy, ZCode, plugins), whose endpoint Test was offered and which TestModels already handled. provider.ModelTest now says why a provider's models can't each be tested — "decide" for a classifier, "own-api" for a sign-in reached only through its agent's own API (Cursor, Devin, Kiro, Zed, Qoder, a Google sign-in), whose requests the gateway translates and which has no endpoint to probe — and providerJSON carries it as modelTest. The chip's right-click and Test models are offered wherever it is empty; elsewhere the right-click still opens the menu, its Test this model off with the reason under it and as its title (openRowMenu items take a why), and Test models is shown off with the reason as its title; en and zh, no coloured left border, nothing scrolls. TestModels refuses a classifier's model rather than probe its endpoint. No request was made to Cline. TestClineModelTestStreams (a fake Cline API that answers 500 "empty response content" to a non-streamed 16-token request and a stream to Cline's), TestProbeReadsTheStream and TestModelTest fail without the change; model-test-why.test.cjs (WebKit, and Chromium through a temp copy on plain chromium.launch(); en and zh: a Codex account's chip tests its model and Test models is on; a Kiro account's right-click shows the item off with the reason in the menu and its title, the menu fits, Test models off with the reason, nothing posted, nothing moved) fails without it. model-test-one, click-scroll, account-models, provider-typed and models-free-only pass in WebKit and Chromium. go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... under a temp HOME pass (TestFXInState failed once on its TempDir cleanup race, passes on the rerun; untouched). 2026-10-02 14:20:08 +08:00