MCPcopy Create free account
hub / github.com/compozy/agh / skillActionBundle

Function skillActionBundle

internal/cli/skill_output.go:285–312  ·  view source on GitHub ↗
(name string, action string, record SkillActionRecord)

Source from the content-addressed store, hash-verified

283}
284
285func skillActionBundle(name string, action string, record SkillActionRecord) outputBundle {
286 item := struct {
287 Name string `json:"name"`
288 Action string `json:"action"`
289 OK bool `json:"ok"`
290 }{
291 Name: name,
292 Action: action,
293 OK: record.OK,
294 }
295 return outputBundle{
296 jsonValue: item,
297 human: func() (string, error) {
298 return renderHumanSection("Skill Action", []keyValue{
299 {Label: automationNameValue, Value: stringOrDash(item.Name)},
300 {Label: skillOutputActionValue, Value: stringOrDash(item.Action)},
301 {Label: "OK", Value: strconv.FormatBool(item.OK)},
302 }), nil
303 },
304 toon: func() (string, error) {
305 return renderToonObject("skill_action", []string{automationNameKey, skillOutputActionKey, "ok"}, []string{
306 item.Name,
307 item.Action,
308 strconv.FormatBool(item.OK),
309 }), nil
310 },
311 }
312}
313
314func skillInstallBundle(item skillInstallItem) outputBundle {
315 return outputBundle{

Callers 1

newSkillActionCommandFunction · 0.85

Calls 3

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
renderToonObjectFunction · 0.85

Tested by

no test coverage detected