Skip to content

feat(ui): marketplace recent-used chips — localStorage top-5 dedup, click to reuse, clear button (v1.20 D) - #67

Merged
argszero merged 1 commit into
mainfrom
feat/ui-ue-round5-recent
Aug 17, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-ue-round5-recent

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Item D of rant 2026-08-17T20:46:57 (UI/UE 第五轮多角度深化, v1.20): 市场「最近使用」 — recently-used model chips on the Marketplace.

  • New 「最近使用」row (#mk-recent) under the marketplace toolbar (above the table): label + .chips container + 清空 button; hidden when empty
  • localStorage atp-recent-models: JSON array of model ids, max 5, deduped with most-recent-first (markRecentUsed → filter out existing, unshift to front, truncate to 5; getRecentIds try/catch for corrupt/legacy data)
  • Chips reuse the existing .chip pill style (model name + title with provider; hover accent highlight); renderRecent() skips ids no longer in D.MARKET
  • Click a chip → directly opens that model's chat (reuses openChat — same primary action as the "使用 / 消费" button; guests get the "请先登录" toast)
  • 清空 button wipes storage and hides the row
  • Restore on entering the marketplace (renderMarketplace()renderRecent()), plus immediate refresh right after a use (openChatmarkRecentUsed + renderRecent)

Rant reference (verbatim)

D. 市场「最近使用」— localStorage 最近 5 个去重 chips(复用 .chip),点击直接使用

Verification

Progress on rant 20:46:57: A (#63) + B (#65) + C (#66) + D (#67) merged; remaining E–G.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant