-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(autofix): Allow users to add feedback when rethinking #110695
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -541,22 +541,28 @@ export function useExplorerAutofix( | |
| * @param runId - Optional run ID to continue an existing run | ||
| */ | ||
| const startStep = useCallback( | ||
| async (step: AutofixExplorerStep, runId?: number) => { | ||
| async (step: AutofixExplorerStep, runId?: number, userContext?: string) => { | ||
| setWaitingForResponse(true); | ||
|
|
||
| try { | ||
| const data: Record<string, any> = {step}; | ||
|
|
||
| if (defined(runId)) { | ||
| data.run_id = runId; | ||
| } | ||
|
|
||
| if (userContext) { | ||
| data.user_context = userContext; | ||
| } | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+555
to
+556
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixUpdate the backend to handle the Prompt for AI Agent |
||
|
|
||
| const response = await api.requestPromise( | ||
| getApiUrl('/organizations/$organizationIdOrSlug/issues/$issueId/autofix/', { | ||
| path: {organizationIdOrSlug: orgSlug, issueId: groupId}, | ||
| }), | ||
| { | ||
| method: 'POST', | ||
| query: {mode: 'explorer'}, | ||
| data: { | ||
| step, | ||
| intelligence_level: 'low', | ||
| ...(runId !== undefined && {run_id: runId}), | ||
| }, | ||
| data, | ||
| } | ||
| ); | ||
|
|
||
|
|
||
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.
Refactoring accidentally removed
intelligence_levelfrom request dataLow Severity
The refactoring to support
user_feedbackaccidentally droppedintelligence_level: 'low'from the POST request data. The backend serializer happens to default to'low', so behavior is currently preserved, but the explicit field was clearly intentional and its silent removal could cause issues if the backend default changes.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.
Intentionally removed to allow the backend to decide.