( cmd *cobra.Command, ctx skillCommandContext, skill *skills.Skill, filePath string, )
| 210 | } |
| 211 | |
| 212 | func runLocalSkillResourceViewCommand( |
| 213 | cmd *cobra.Command, |
| 214 | ctx skillCommandContext, |
| 215 | skill *skills.Skill, |
| 216 | filePath string, |
| 217 | ) error { |
| 218 | content, err := readSkillResource(skill, ctx.bundledFS, filePath) |
| 219 | if err != nil { |
| 220 | return err |
| 221 | } |
| 222 | item := skillViewItem{ |
| 223 | Name: skill.Meta.Name, |
| 224 | Source: skillSourceLabel(skill.Source), |
| 225 | Path: skill.FilePath, |
| 226 | File: strings.TrimSpace(filePath), |
| 227 | Content: content, |
| 228 | } |
| 229 | return writeCommandOutput(cmd, skillViewBundle(item, content)) |
| 230 | } |
| 231 | |
| 232 | func runLocalSkillXMLViewCommand(cmd *cobra.Command, ctx skillCommandContext, skill *skills.Skill) error { |
| 233 | resources, err := listSkillResources(skill, ctx.bundledFS) |
no test coverage detected