fix: resolve omo clippy warnings and include app update

This commit is contained in:
YoVinchen
2026-02-12 01:23:24 +08:00
parent 651496eabb
commit 1905765821
2 changed files with 11 additions and 4 deletions

View File

@@ -301,7 +301,7 @@ impl OmoService {
let agents = obj.get("agents").cloned();
let categories = obj.get("categories").cloned();
let other = Self::extract_other_fields(&obj);
let other = Self::extract_other_fields(obj);
let other_fields = if other.is_empty() {
None
} else {
@@ -309,7 +309,7 @@ impl OmoService {
};
let mut global = OmoGlobalConfig::default();
Self::merge_global_from_obj(&obj, &mut global);
Self::merge_global_from_obj(obj, &mut global);
global.other_fields = other_fields.clone();
OmoLocalFileData {
@@ -471,7 +471,10 @@ mod tests {
None,
);
assert_eq!(data.global.schema_url.as_deref(), Some("https://example.com/schema.json"));
assert_eq!(
data.global.schema_url.as_deref(),
Some("https://example.com/schema.json")
);
assert_eq!(data.global.disabled_agents, vec!["oracle".to_string()]);
assert_eq!(

View File

@@ -141,7 +141,11 @@ function App() {
// Fallback from sessions view when switching to an app without session support
useEffect(() => {
if (currentView === "sessions" && activeApp !== "claude" && activeApp !== "codex") {
if (
currentView === "sessions" &&
activeApp !== "claude" &&
activeApp !== "codex"
) {
setCurrentView("providers");
}
}, [activeApp, currentView]);