AppShortcutProvider does not launch the shortcut in macOS

I have created an intent using AppIntent and this intent(TWIntent in the code below) can be seen in the shortcuts app as an action to create the shortcut.

I am using AppShortcutProvider to create the shortcut so that user can directly make use of it. However, my shortcut does not appear in the shortcut app. The phrases used also do not launch the intent in the spotlight search. Below is my AppShortcutProvider file:

@available(macOS 13.0, *)
struct TWShortcuts: AppShortcutsProvider {
    
    static var appShortcuts: [AppShortcut] {
        AppShortcut(
            intent: TWIntent(),
            phrases: [
                "Open Intent in \(.applicationName)",
                "Open \(.applicationName) Intent",
                "Open my Intent in \(.applicationName)",
                "Open my \(.applicationName) Intent",
                "Open TWIntent"
            ],
            shortTitle: "Open TWIntent",
            systemImageName: "rectangle.stack.fill"
        )
    }
    
    static var shortcutTileColor: ShortcutTileColor = .lightBlue
}

Is there something I m missing? Also can these phrases be used for siri launch in macOS because the documentation mentions that macOS does not have siri capability?

Below is my AppIntent file:


import SwiftUI


@available(macOS 13, *)
struct TWIntent: AppIntent {
    
    static let title: LocalizedStringResource = "TWIntent"
    static var description = IntentDescription("try adding this sample action as your TW shortcut")
    
    //launch app on running action
    static var openAppWhenRun: Bool = false
    
    static var parameterSummary: some ParameterSummary {
        Summary("Get information on \(\.$TWType)")
    }
   
    @Parameter(title: "TWType", description: "The type to get information on.")
     var TWType: String
    
    
    func perform() async throws -> some IntentResult & ReturnsValue<String> & ProvidesDialog {
        
        //perform essential task here to update the application content
        
        return .result(value: TWType, dialog: "Logged a 15 minute break.\(TWType)")
  }
}
AppShortcutProvider does not launch the shortcut in macOS
 
 
Q