isPlaywrightCLIMode returns true when the playwright tool in the given tools map is configured with mode: cli.
(tools map[string]any)
| 36 | // isPlaywrightCLIMode returns true when the playwright tool in the given tools map |
| 37 | // is configured with mode: cli. |
| 38 | func isPlaywrightCLIMode(tools map[string]any) bool { |
| 39 | playwrightTool, ok := tools["playwright"] |
| 40 | if !ok || playwrightTool == false { |
| 41 | return false |
| 42 | } |
| 43 | config := parsePlaywrightTool(playwrightTool) |
| 44 | return config != nil && config.IsCLIMode() |
| 45 | } |
| 46 | |
| 47 | // generatePlaywrightCLIInstallSteps returns npm install steps for @playwright/cli |
| 48 | // when playwright is configured in CLI mode. Returns nil if playwright is in MCP mode. |
no test coverage detected