Skip to content

feat(skills): 添加技能仓库缓存和强制刷新功能#1820

Open
TangZhiZzz wants to merge 2 commits intofarion1231:mainfrom
TangZhiZzz:main
Open

feat(skills): 添加技能仓库缓存和强制刷新功能#1820
TangZhiZzz wants to merge 2 commits intofarion1231:mainfrom
TangZhiZzz:main

Conversation

@TangZhiZzz
Copy link
Copy Markdown
Contributor

  • 为技能发现添加本地缓存机制,减少网络请求
  • 新增强制刷新按钮,允许用户手动更新技能列表
  • 支持网格和列表两种视图模式展示技能
  • 添加技能列表项组件用于列表视图

- 为技能发现添加本地缓存机制,减少网络请求
- 新增强制刷新按钮,允许用户手动更新技能列表
- 支持网格和列表两种视图模式展示技能
- 添加技能列表项组件用于列表视图
@farion1231
Copy link
Copy Markdown
Owner

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4200a6f6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1307 to +1310
if !skills.is_empty() {
Self::deduplicate_discoverable_skills(&mut skills);
skills.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase()));
return Ok(skills);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fetch uncached repos before returning cached skill list

When force_refresh is false, the function returns as soon as any cached skills exist, even if other enabled repos have no cache. In a mixed state (e.g., one old repo cached + one newly added repo without cache), discover_available_with_cache exits early and never fetches the new repo, so its skills never appear until a manual force refresh. This breaks the normal add-repo discovery flow and produces incomplete results.

Useful? React with 👍 / 👎.

Comment on lines +221 to +223
refresh: () => {
refetchInstalled();
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep discovery refresh wired to discoverable data reload

The refresh handle now only calls refetchInstalled(), so the Skills Discovery toolbar refresh action no longer refreshes discoverable skills or repo data. As a result, users clicking the existing refresh button won’t see updated discovery results unless they use force refresh, which is a regression from the previous behavior where refresh reloaded discovery content.

Useful? React with 👍 / 👎.

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.

2 participants