Skip to content

[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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sdzh-atlassian
Copy link
Member

@sdzh-atlassian sdzh-atlassian commented May 30, 2025

What Is This Change?

Note: Waiting for: #432

This is the POC integration of the issue-creating ai agent into the TODO workflow :)

Before After
image image

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:

Advanced checks:

  • If Atlassian employee & Bitbucket changes: did you test with DC in mind? See Instructions N/A

Recommendations:

  • Update the CHANGELOG if making a user facing change N/A

@@ -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) {
Copy link
Member Author

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

Copy link
Contributor

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

@sdzh-atlassian sdzh-atlassian force-pushed the poc/create-issue-with-ai-prod-2 branch from 96c04a8 to dc84de6 Compare May 31, 2025 00:14
@sdzh-atlassian sdzh-atlassian force-pushed the poc/create-issue-with-ai-prod-2 branch from dc84de6 to 236ac9f Compare May 31, 2025 00:39
Copy link
Collaborator

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": {
Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.error('Error fetching issue suggestions:', error);
Logger.error(error, 'Error fetching issue suggestions');

},
});

const buildRequestHeaders = (authInfo: BasicAuthInfo): any => ({
Copy link
Collaborator

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)),
Copy link
Collaborator

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);
Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.error('Error sending feedback:', error);
Logger.error(error, 'Error sending feedback');


case 'aiSuggestionFeedback': {
handled = true;
const { isPositive, todoData } = msg as any;
Copy link
Collaborator

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?

@sdzh-atlassian sdzh-atlassian changed the title [WIP] Create issue with Jira AI (PoC) [PoC] Create issue with Jira AI Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants