Fix/一键配置失效 (#2249)

* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 显示供应商备注信息

* style(FailoverQueueItem): 添加供应商备注字段以支持备注信息显示

* style(FailoverQueueManager): 更新供应商备注信息的显示样式

* style(FailoverQueueItem): 添加条件序列化以优化供应商备注字段

* fix: 优化模型状态管理,确保配置更新时正确引用最新设置

* fix(skill): improve error handling for skill source directory resolution

Co-authored-by: Copilot <copilot@github.com>

* fix(gemini): simplify project directory retrieval in scan_sessions function

* fix(useModelState): optimize latestConfigRef assignment in useModelState hook

* fix(useModelState): remove unnecessary blank line in useModelState hook

---------

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Coconut-Fish
2026-04-23 15:36:03 +08:00
committed by GitHub
parent 59735f976b
commit 010b163430
4 changed files with 23 additions and 20 deletions
+12 -12
View File
@@ -672,15 +672,16 @@ impl SkillService {
repo_branch = used_branch;
// 复制到 SSOT
let source = Self::resolve_skill_source_dir(&temp_dir, &skill.directory).ok_or_else(|| {
let missing = temp_dir.join(&source_rel).display().to_string();
let _ = fs::remove_dir_all(&temp_dir);
anyhow!(format_skill_error(
"SKILL_DIR_NOT_FOUND",
&[("path", &missing)],
Some("checkRepoUrl"),
))
})?;
let source =
Self::resolve_skill_source_dir(&temp_dir, &skill.directory).ok_or_else(|| {
let missing = temp_dir.join(&source_rel).display().to_string();
let _ = fs::remove_dir_all(&temp_dir);
anyhow!(format_skill_error(
"SKILL_DIR_NOT_FOUND",
&[("path", &missing)],
Some("checkRepoUrl"),
))
})?;
let canonical_temp = temp_dir.canonicalize().unwrap_or_else(|_| temp_dir.clone());
let canonical_source = source.canonicalize().map_err(|_| {
@@ -3024,9 +3025,8 @@ mod tests {
let nested = temp.path().join("skills").join("nested-skill");
write_skill(&nested, "Nested Skill");
let resolved =
SkillService::resolve_skill_source_dir(temp.path(), "skills/nested-skill")
.expect("nested skill should resolve from its relative source path");
let resolved = SkillService::resolve_skill_source_dir(temp.path(), "skills/nested-skill")
.expect("nested skill should resolve from its relative source path");
assert_eq!(resolved, nested);
}
@@ -35,10 +35,7 @@ pub fn scan_sessions() -> Vec<SessionMeta> {
};
let project_root_file = entry.path().join(".project_root");
let project_dir = match std::fs::read_to_string(project_root_file) {
Ok(name) => Some(name),
Err(_) => None,
};
let project_dir = std::fs::read_to_string(project_root_file).ok();
for file_entry in chat_files.flatten() {
let path = file_entry.path();