(name string, err error)
| 465 | } |
| 466 | |
| 467 | func skillResolveErrorResponse(name string, err error) fantasy.ToolResponse { |
| 468 | if xerrors.Is(err, skillspkg.ErrSkillNotFound) { |
| 469 | return skillNotFoundResponse(name) |
| 470 | } |
| 471 | if xerrors.Is(err, skillspkg.ErrSkillAmbiguous) { |
| 472 | return fantasy.NewTextErrorResponse(err.Error()) |
| 473 | } |
| 474 | return fantasy.NewTextErrorResponse( |
| 475 | fmt.Sprintf("failed to resolve skill %q", name), |
| 476 | ) |
| 477 | } |
| 478 | |
| 479 | func skillNotFoundResponse(name string) fantasy.ToolResponse { |
| 480 | return fantasy.NewTextErrorResponse( |
no test coverage detected