Skip to content

feat(ui): show model count as enabled/total - #19

Open
245678000000 wants to merge 1 commit into
CometixSpace:mainfrom
245678000000:feat/model-count-enabled-over-total
Open

feat(ui): show model count as enabled/total#19
245678000000 wants to merge 1 commit into
CometixSpace:mainfrom
245678000000:feat/model-count-enabled-over-total

Conversation

@245678000000

Copy link
Copy Markdown

Closes the first half of #9.

Summary

Both counters in the sidebar showed only the total, so there was no way to tell how many of a provider's models are actually registered into Cursor's model picker without expanding the provider and reading every toggle.

Where Was Now
Provider accordion head 7 models 2/7 models
Models section title Models (7) Models (2/7)

Both spans also get a title="Enabled / total models" so the ratio explains itself on hover.

Notes

  • Counting lives in a new store helper modelCountLabel(), following getModelErrors()'s precedent of keeping long expressions out of the templates.
  • "Enabled" is defaultOn === true — the same test the model-card toggle binds to (x-bind:checked="m.defaultOn === true"), so the ratio always matches what the switches show.
  • The accordion head loses its 1 model singular form, which no longer reads sensibly next to a ratio.
  • The second half of enhancement. 关于两个页面显示功能 #9 (editing apiModel/displayName on an existing model sometimes not refreshing in chat until the server is restarted) is not addressed here — that one needs digging into the client-side cache and deserves its own PR.

Test plan

The repo has no UI test harness (vitest only collects src/server/tests/**), so instead of restructuring that for one label, I rendered the two components through their hono/jsx factory and evaluated the emitted x-text against the helper:

acc-meta     x-text: $store.app.modelCountLabel(p.id) + ' models'
models-title x-text: 'Models (' + $store.app.modelCountLabel(p.id) + ')'

  none configured          -> "0/0 models"   "Models (0/0)"
  1 of 1 on                -> "1/1 models"   "Models (1/1)"
  0 of 1 (flag missing)    -> "0/1 models"   "Models (0/1)"
  2 of 5                   -> "2/5 models"   "Models (2/5)"
  • pnpm --dir "Cursor++" run check-types
  • pnpm --dir "Cursor++" run lint
  • node esbuild.js --production
  • Not exercised in a running Cursor sidebar — worth a quick look before merging.

Closes the first half of CometixSpace#9.

Both counters in the sidebar showed only the total, so there was no way
to tell how many of a provider's models are actually registered into
Cursor's model picker without expanding the provider and reading every
toggle.

  accordion head   "7 models"    -> "2/7 models"
  models section   "Models (7)"  -> "Models (2/7)"

The counting lives in a new store helper modelCountLabel(), following
getModelErrors()'s precedent of keeping long expressions out of the
templates. "Enabled" is defaultOn === true, the same test the model-card
toggle binds to. Both spans get a title so the ratio is self-explaining.

The head loses its "1 model" singular form, which no longer reads
sensibly next to a ratio.

The second half of CometixSpace#9 (edited apiModel/displayName sometimes not
refreshing in chat until the server is restarted) is untouched.
Rogers-F added a commit to Rogers-F/CCursor that referenced this pull request Aug 29, 2026
- LLMMessage/StoredMessage 链路白名单透传 providerOptions.cursor.isSummary:
  normalizeStoredMessage/restoreStoredMessage/storedMessageToLLMMessage/
  llmMessageToStoredMessage/materializeHistoryEntries/flushMessageBlobs
  不再丢弃该字段 —— 根治"旧摘要重复进摘要源+重复归档"的地板爬升
- isSummaryBlobMessage 增加内容前缀 fallback (双格式):
  assistant + `Previous conversation summary:` 或官方 `[Previous conversation summary]:`
  对修复上线前的存量摘要 blob (标记已丢) 立即生效
- repair 无连续同角色合并逻辑, Σ+assistant 邻接由测试锁定不被合并 (豁免以测试守护)
- 测试: CometixSpace#19 双格式识别 / CometixSpace#7 标记经 repairHistoryEntries 存活 + archive 过滤
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