docs(ui): describe the recent-models store the code actually keeps - #313
Merged
Merged
Conversation
`ui/README.md`'s market "recently used" section still documented the v1.20 shape: two helpers named `getRecentIds`/`saveRecentIds`, and a stored array of model *ids*. #255 (C2138/C2139) renamed those helpers to `getRecentKeys`/`saveRecentKeys` and made the stored value the model's identity string (`provider/model`), because an array index is not an identity: it is persisted, then resolved again in a different array (`D.MARKET` for a guest session) or in a different catalog order. Neither name exists anywhere else in the repository (two sites, both this section), while the same file documents the new contract 218 lines below ("模型身份:`provider/model`,不是数组下标(C2138)"), so the two sections contradicted each other. No code change: the text is corrected to name what exists.
Owner
Author
|
Self-review (committer, LGTM — merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ui/README.md's 「市场「最近使用」约定」(v1.20) still described the pre-#255 shape of therecent-models store: helpers named
getRecentIds()/saveRecentIds(), and a stored array ofmodel ids. #255 (C2138/C2139) renamed those helpers to
getRecentKeys()/saveRecentKeys()and made the stored value the model's identity string (
provider/model) — an array index isnot an identity, because it is persisted and then resolved again in a different array
(
D.MARKETfor a guest session) or in a different catalog order.Neither dead name exists anywhere in the repository outside that section (two sites, both
ui/README.md), while the same file documents the new contract 220 lines below(「模型身份:
provider/model,不是数组下标(C2138)」) — so the two sections of one documentcontradicted each other, and the stale one names two functions a reader cannot find.
Related Issue
None — found while scanning this repository; no issue was filed for it.
Changes
ui/README.md: the section now names the helpers and the stored value the code actually uses(
getRecentKeys/saveRecentKeys/ identity strings), states that legacy numeric entriesare dropped, and adds a one-line
C2138(#255)更正provenance note in the style this filealready uses for corrected sections, pointing at the existing identity section.
config/config.example.tomlneeds no update.ui/js/*orui/index.htmlchange, so no?v=cache-bust token is bumped.Tests
cargo test— 413 passed, 0 failed (same asmain)cargo fmt --check— cleancargo clippy --all-targets -- -D warnings— cleandocumentation claims is to correct the text rather than to add a gate
(precedents: docs(perf_gate): drop the stale file count from the gate header #309, docs(ui): stop restating the i18n counters and correct two stale gate claims #310, fix(admin): state the refusal a deleted model now meets, not the old zero bill #312).
The claim itself, measured on the branch tree:
Checklist
docs/…)docs(ui): …)