-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programming exercises
: Increase AI feedback request limit
#8746
Programming exercises
: Increase AI feedback request limit
#8746
Conversation
Warning Rate limit exceeded@undernagruzez has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 33 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe recent changes primarily focus on increasing the threshold for the number of successful AI feedback requests from 3 to 20 across various components in the system. This adjustment affects the conditions for triggering exceptions and warning messages in both backend and frontend components. Additionally, tests have been updated to reflect this new threshold, ensuring that the system correctly handles and simulates the increased limit. Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant Student
participant Frontend
participant Backend
participant Database
Student->>Frontend: Submit request for AI feedback
Frontend->>Backend: Forward request
Backend->>Database: Increment successful request count
Database-->>Backend: Return updated count
Backend->>Frontend: Check if count >= 20
alt Count < 20
Frontend->>Student: Display success message
else Count >= 20
Frontend->>Student: Display warning message
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
72b3c1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range comments (6)
src/main/webapp/app/overview/exercise-details/exercise-details-student-actions.component.ts (4)
Line range hint
44-44
: Consider specifying a more explicit type instead ofany
for better type safety and to leverage TypeScript's capabilities.- any + SpecificType // Replace 'SpecificType' with the actual type you intend to use.
Line range hint
170-170
: Avoid using non-null assertions as they can lead to runtime errors if not handled properly. Consider using optional chaining or proper checks before usage.- participation!.id! + participation?.idAlso applies to: 202-202, 209-209, 210-210, 229-229
Line range hint
171-171
: Avoid assignments within expressions to enhance code clarity and maintainability.- const replacedIndex = this.exercise.studentParticipations!.indexOf(participation!); + const replacedIndex = this.exercise.studentParticipations?.indexOf(participation) ?? -1;Also applies to: 203-203
Line range hint
305-305
: Consider using optional chaining to make the code more robust and prevent runtime errors.- const latestResult = this.gradedParticipation?.results && this.gradedParticipation.results.find(({ assessmentType }) => assessmentType === AssessmentType.AUTOMATIC); + const latestResult = this.gradedParticipation?.results?.find(({ assessmentType }) => assessmentType === AssessmentType.AUTOMATIC);Also applies to: 320-320
src/test/javascript/spec/component/overview/exercise-details/exercise-details-student-actions.component.spec.ts (2)
Line range hint
83-83
: Specify a more explicit type instead ofany
to improve type safety and leverage TypeScript's capabilities.- any + SpecificType // Replace 'SpecificType' with the actual type you intend to use.Tools
Biome
[error] 577-577: This variable's type is not allowed to evolve implicitly, leading to potential any types. (lint/nursery/noEvolvingAny)
The variable's type may evolve, leading to any. Use explicit type or initialization. Specifying an explicit type or initial value to avoid implicit type evolution.
Line range hint
495-495
: Use template literals for string operations to enhance readability and maintainability.- query + (args ? args : '') + `${query}${args || ''}`Tools
Biome
[error] 577-577: This variable's type is not allowed to evolve implicitly, leading to potential any types. (lint/nursery/noEvolvingAny)
The variable's type may evolve, leading to any. Use explicit type or initialization. Specifying an explicit type or initial value to avoid implicit type evolution.
.../spec/component/overview/exercise-details/exercise-details-student-actions.component.spec.ts
Outdated
Show resolved
Hide resolved
…xercise-details-student-actions.component.spec.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range comments (3)
src/test/javascript/spec/component/overview/exercise-details/exercise-details-student-actions.component.spec.ts (3)
Line range hint
1-2
: Optimize imports by usingimport type
for type-only imports.- import { HttpClient } from '@angular/common/http'; - import { DebugElement } from '@angular/core'; + import type { HttpClient } from '@angular/common/http'; + import type { DebugElement } from '@angular/core'; - import { Exercise, ExerciseMode, ExerciseType } from 'app/entities/exercise.model'; + import type { Exercise, ExerciseMode, ExerciseType } from 'app/entities/exercise.model'; - import { ProgrammingExerciseStudentParticipation } from 'app/entities/participation/programming-exercise-student-participation.model'; + import type { ProgrammingExerciseStudentParticipation } from 'app/entities/participation/programming-exercise-student-participation.model'; - import { StudentParticipation } from 'app/entities/participation/student-participation.model'; + import type { StudentParticipation } from 'app/entities/participation/student-participation.model'; - import { ProgrammingExercise } from 'app/entities/programming-exercise.model'; + import type { ProgrammingExercise } from 'app/entities/programming-exercise.model'; - import { QuizBatch, QuizExercise } from 'app/entities/quiz/quiz-exercise.model'; + import type { QuizBatch, QuizExercise } from 'app/entities/quiz/quiz-exercise.model'; - import { TextExercise } from 'app/entities/text-exercise.model'; + import type { TextExercise } from 'app/entities/text-exercise.model'; - import { Team } from 'app/entities/team.model'; + import type { Team } from 'app/entities/team.model'; - import { User } from 'app/core/user/user.model'; + import type { User } from 'app/core/user/user.model'; - import { AssessmentType } from 'app/entities/assessment-type.model'; + import type { AssessmentType } from 'app/entities/assessment-type.model';Also applies to: 6-7, 9-10, 11-12, 13-14, 22-23
Tools
GitHub Check: client-style
[failure] 577-577:
Replace,
with;
Line range hint
495-495
: Use template literals instead of string concatenation for better readability and safety.- ArtemisTranslatePipe, (query: any, args?: any) => query + (args ? args : '') + ArtemisTranslatePipe, (query: any, args?: any) => `${query}${args ? args : ''}`Tools
GitHub Check: client-style
[failure] 577-577:
Replace,
with;
Line range hint
83-83
: Specify a more appropriate type instead ofany
to enhance type safety.- ArtemisTranslatePipe, (query: any, args?: any) => `${query}${args ? args : ''}` + ArtemisTranslatePipe, (query: string, args?: any) => `${query}${args ? args : ''}`Tools
GitHub Check: client-style
[failure] 577-577:
Replace,
with;
.../spec/component/overview/exercise-details/exercise-details-student-actions.component.spec.ts
Outdated
Show resolved
Hide resolved
…xercise-details-student-actions.component.spec.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Programming Exercises
: Increase AI Feedback Request LimitProgramming exercises
: Increase AI feedback request limit
Checklist
General
Server
Motivation and Context
Currently, a student can only do three feedback request. For an experiment that we want to conduct, the number needs to be increased to 20.
In the future, there will be a follow-up PR that let the instructor set the limit:
Description
Hardcodes the limit to 20 requests per exercise.
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review