From b5a3b33b54af2d7450daa7fedb3087f3a868d4c1 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 1 Feb 2026 17:24:44 +0800 Subject: [PATCH] Add AppGraph.supports flag support --- Sources/OpenSwiftUI/App/App/AppGraph.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Sources/OpenSwiftUI/App/App/AppGraph.swift b/Sources/OpenSwiftUI/App/App/AppGraph.swift index 77e6ff1cf..02d631417 100644 --- a/Sources/OpenSwiftUI/App/App/AppGraph.swift +++ b/Sources/OpenSwiftUI/App/App/AppGraph.swift @@ -130,8 +130,16 @@ package final class AppGraph: GraphHost { extension AppGraph { func supports(_ flag: CommandFlag) -> Bool { Update.ensure { - // TODO - false + let items = rootCommandsList?.items ?? [] + for item in items { + guard case let .flag(f) = item.value, + f == flag + else { + continue + } + return true + } + return false } } }