refactor(coderd/x/chatd/chattool): simplify goal ID validation

This commit is contained in:
Michael Suchacz
2026-05-29 23:12:44 +00:00
parent 20eb3f6aa3
commit b5b905694d
2 changed files with 1 additions and 4 deletions
+1 -3
View File
@@ -80,9 +80,7 @@ func CompleteGoal(db database.Store, options GoalToolOptions) fantasy.AgentTool
}
goalID, err := uuid.Parse(goalIDStr)
if err != nil {
return fantasy.NewTextErrorResponse(
xerrors.Errorf("invalid goal_id: %w", err).Error(),
), nil
return fantasy.NewTextErrorResponse("invalid goal_id"), nil
}
summary := strings.TrimSpace(args.Summary)
if summary == "" {
-1
View File
@@ -89,7 +89,6 @@ func TestCompleteGoalSchemaUsesStringGoalID(t *testing.T) {
goalIDParam, ok := info.Parameters["goal_id"].(map[string]any)
require.True(t, ok)
require.Equal(t, "string", goalIDParam["type"])
require.NotEqual(t, "array", goalIDParam["type"])
}
func TestGetGoalReturnsNullWithoutCurrentGoal(t *testing.T) {