( cmd *cobra.Command, deps commandDeps, name string, filePath string, agentName string, )
| 189 | } |
| 190 | |
| 191 | func runLocalSkillViewCommand( |
| 192 | cmd *cobra.Command, |
| 193 | deps commandDeps, |
| 194 | name string, |
| 195 | filePath string, |
| 196 | agentName string, |
| 197 | ) error { |
| 198 | ctx, err := loadSkillCommandContext(cmd.Context(), deps, agentName) |
| 199 | if err != nil { |
| 200 | return err |
| 201 | } |
| 202 | skill, err := findSkillByName(ctx.skills, name) |
| 203 | if err != nil { |
| 204 | return err |
| 205 | } |
| 206 | if strings.TrimSpace(filePath) != "" { |
| 207 | return runLocalSkillResourceViewCommand(cmd, ctx, skill, filePath) |
| 208 | } |
| 209 | return runLocalSkillXMLViewCommand(cmd, ctx, skill) |
| 210 | } |
| 211 | |
| 212 | func runLocalSkillResourceViewCommand( |
| 213 | cmd *cobra.Command, |
no test coverage detected