-
Notifications
You must be signed in to change notification settings - Fork 42
[PoC] Create issue with Jira AI #431
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
base: main
Are you sure you want to change the base?
Conversation
@@ -170,6 +170,10 @@ export function useEditor<T extends UserType>(props: { | |||
const view = useRef<EditorView | null>(null); | |||
const [content, setContent] = useState(props.value || ''); | |||
|
|||
if (props.value !== content) { |
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.
Not sure if we still need this here, might need feedback from @cabella-dot
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.
Yeah no need for this. Will have to revisit when we want to implement this editor
96c04a8
to
dc84de6
Compare
dc84de6
to
236ac9f
Compare
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.
why is this file necessary?
"description": "Enables AI-assisted issue suggestion for TODO comments", | ||
"scope": "window" | ||
}, | ||
"atlascode.issueSuggestion.contextLevel": { |
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.
didn't we decide to cut this choice leaving "codeContext" as the only way?
|
||
return responseData; | ||
} catch (error) { | ||
console.error('Error fetching issue suggestions:', error); |
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.
console.error('Error fetching issue suggestions:', error); | |
Logger.error(error, 'Error fetching issue suggestions'); |
}, | ||
}); | ||
|
||
const buildRequestHeaders = (authInfo: BasicAuthInfo): any => ({ |
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.
I think you can type this as Record<string, string>
@@ -171,7 +171,7 @@ export function registerCommands(vscodeContext: ExtensionContext) { | |||
} | |||
}, | |||
), | |||
commands.registerCommand(Commands.CreateIssue, (data: any, source?: string) => createIssue(data, source)), | |||
commands.registerCommand(Commands.CreateIssue, async (data: any, source?: string) => createIssue(data, source)), |
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.
I'm curious about this change
} | ||
|
||
static async getSuggestionAvailable(): Promise<boolean> { | ||
const isFeatureEnabled = FeatureFlagClient.checkGate(Features.EnableAiSuggestions); |
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.
if this is false, return immediately like you did in getSuggestionEnabled
, so we don't waste resources spawning the configuration promise
error: '', | ||
}; | ||
} catch (error) { | ||
console.error('Error fetching issue suggestions:', error); |
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.
console.error('Error fetching issue suggestions:', error); | |
Logger.error(error, 'Error fetching issue suggestions'); |
// TODO: actually send an analytics event | ||
window.showInformationMessage(`Thank you for your feedback!`); | ||
} catch (error) { | ||
console.error('Error sending feedback:', error); |
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.
console.error('Error sending feedback:', error); | |
Logger.error(error, 'Error sending feedback'); |
|
||
case 'aiSuggestionFeedback': { | ||
handled = true; | ||
const { isPositive, todoData } = msg as any; |
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.
this casting of msg to any looks sus... why isn't the typing working?
What Is This Change?
This is the POC integration of the issue-creating ai agent into the TODO workflow :)
This version is not intended for broad audience yet for a variety of reasons, but we can use it to do some internal testing :)
How Has This Been Tested?
Basic checks:
npm run lint
npm run test
<- addressed, but [AXON-385] chore: fix jest config to work with src/ paths #432 solves the underlying issue with tests hereAdvanced checks:
If Atlassian employee & Bitbucket changes: did you test with DC in mind? See InstructionsN/ARecommendations:
Update the CHANGELOG if making a user facing changeN/A