Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Coverage Report
File CoverageNo changed files found. |
|
✅ Admin Preview Image Ready! 🕒 Time: 2026-10-20 17:28:00 (UTC+8) |
|
✅ Build and publish successful - Preview fastgpt Image: 🕒 Time: 2026-10-20 16:23:29 (UTC+8) |
This branch has not been deployed
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.
保存资源协作者或权限后,原先的列表刷新会清空已加载数据并卸载权限弹窗。现在应用、知识库和 Skill 通过 ListV2 的 IDs 查询更新目标资源,保留弹窗、滚动位置及其他页缓存;取消编辑只关闭弹窗。
资源列表与局部刷新
Skill 和知识库 ListV2 保留
withAppCount公共请求参数,分页与 IDs 模式均生效。管理列表及其局部刷新显式开启统计,选择器显式关闭以跳过聚合;只向非文件夹资源的 Owner 返回数量。沿用原接口默认行为:Skill 未传时统计,知识库未传时不统计。三类资源支持分页 / IDs 两种请求格式。传 IDs 时优先按 ID 查询,解析时过滤 parentId 和分页字段;单次最多 500 个 ID,保留公共筛选与权限过滤。
局部刷新仅按 ID 替换实际返回的条目,未返回的 ID 保留原缓存,返回空列表时不更新缓存;列表总数、顺序和下一页 offset 不变。文件夹侧栏同步已缓存子资源,处理并发请求与过期响应。
分页错误由
error维护,IDs 后台同步错误由refreshError独立维护,互不覆盖;后台同步失败保留旧缓存,仍可触底加载后续页。重新初始化列表时清除旧的同步错误。移除旧 Skill list 接口并迁移调用方;应用和知识库旧 list 通过 deprecated 标记弃用,保留原接口名称。
已知边界:保存请求在切换目录后才完成时,旧保存回调的局部刷新仍可能抢占新目录首屏请求;本次不调整该请求调度行为。
公共分页与鉴权合约
normalizePagination统一计算偏移;原有parsePaginationRequest委托该函数。主应用和 Pro 的资源列表、集合、工具、日志、成员、评估及账单等调用方同步收敛,保留业务 Schema 的默认条数与 IDs / 不分页模式。OpenAPI 展示
配套与验证
后台同步错误隔离:Hook 的 16 个局部测试、相关 TypeScript、ESLint 和格式检查通过,覆盖隐藏分页按钮时同步失败后触底续载,以及两种错误互不覆盖。
引用统计开关恢复后,6 个相关测试文件、108 个用例,以及主应用与 Pro TypeScript、ESLint 检查通过;测试验证了关闭开关时不调用统计函数,以及管理页两种查询模式均保留开启标记。
IDs 未返回条目保留缓存的调整:3 个相关测试文件、22 个用例及 ESLint 检查通过,覆盖部分缺失、空结果、分页位置、弹窗与并发刷新。
分页计算收敛后,15 个相关测试文件、120 个用例通过;主应用与 Pro TypeScript、ESLint 和格式检查通过。
Pro 配套 PR: https://github.com/labring/fastgpt-pro/pull/1203 。子模块从 upstream/main 更新至该 PR 提交,主仓库合并前需与 Pro 最终合并提交对齐。
40 个相关测试文件、507 个用例通过,覆盖 IDs 权限过滤、缓存/弹窗/并发刷新、分页选择及外链鉴权优先级。
主应用与 Pro TypeScript 检查通过;ESLint 无错误,格式和 diff 检查通过。
训练异常分页补充验证:2 个相关测试文件、56 个用例通过,覆盖默认 10 条、实际返回 21 个集合及公共分页约束的文档生成;共享包 TypeScript 检查通过。
Scalar 预览验证了 union 名称、默认值、字段顺序与枚举滚动;未运行全量测试。