Skip to content
代码片段 群组 项目
未验证 提交 09cda7d7 编辑于 作者: Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong 提交者: GitLab
浏览文件

Merge branch 'nl-ai-icon' into 'master'

Use Duo icon and language for AI actions in editor

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/153321



Merged-by: default avatarJustin Ho Tuan Duong <hduong@gitlab.com>
Approved-by: default avatarSuzanne Selhorn <sselhorn@gitlab.com>
Approved-by: default avatarJustin Ho Tuan Duong <hduong@gitlab.com>
Approved-by: default avatarKatie Macoy <kmacoy@gitlab.com>
Reviewed-by: default avatarNick Leonard <nleonard@gitlab.com>
Co-authored-by: default avatarNick Leonard <nleonard@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -171,7 +171,7 @@ To use this feature: ...@@ -171,7 +171,7 @@ To use this feature:
You can generate the description for an issue from a short summary. You can generate the description for an issue from a short summary.
1. Create a new issue. 1. Create a new issue.
1. Above the **Description** field, select **AI actions > Generate issue description**. 1. Above the **Description** field, select **GitLab Duo** (**{tanuki-ai}**) **> Generate issue description**.
1. Write a short description and select **Submit**. 1. Write a short description and select **Submit**.
The issue description is replaced with AI-generated text. The issue description is replaced with AI-generated text.
......
...@@ -59,7 +59,7 @@ GitLab Duo fills in the template and replaces the contents of the description. ...@@ -59,7 +59,7 @@ GitLab Duo fills in the template and replaces the contents of the description.
To use GitLab Duo to generate a merge request description: To use GitLab Duo to generate a merge request description:
1. [Create a new merge request](creating_merge_requests.md) and go to the **Description** field. 1. [Create a new merge request](creating_merge_requests.md) and go to the **Description** field.
1. Select **AI Actions** (**{tanuki}**). 1. Select **GitLab Duo** (**{tanuki-ai}**).
1. Select **Fill in merge request template**. 1. Select **Fill in merge request template**.
The updated description is applied. You can edit or revise the description before you finish creating your merge request. The updated description is applied. You can edit or revise the description before you finish creating your merge request.
......
...@@ -63,12 +63,7 @@ export default { ...@@ -63,12 +63,7 @@ export default {
}, },
}; };
}); });
return [ return items;
{
name: __('AI actions'),
items,
},
];
}, },
}, },
apollo: { apollo: {
...@@ -167,21 +162,21 @@ export default { ...@@ -167,21 +162,21 @@ export default {
<template> <template>
<gl-disclosure-dropdown <gl-disclosure-dropdown
:items="availableActions" :items="availableActions"
placement="right" placement="bottom-start"
class="comment-template-dropdown" class="comment-template-dropdown"
no-caret no-caret
> >
<template #toggle> <template #toggle>
<gl-button <gl-button
v-gl-tooltip v-gl-tooltip
:title="__('AI actions')" :title="__('GitLab Duo')"
:aria-label="__('AI actions')" :aria-label="__('GitLab Duo')"
category="tertiary" category="tertiary"
size="small" size="small"
class="gl-mr-2 gl-px-2!" class="gl-mr-2 gl-px-2!"
> >
<gl-loading-icon v-if="loading" /> <gl-loading-icon v-if="loading" />
<gl-icon v-else name="tanuki" /> <gl-icon v-else name="tanuki-ai" />
</gl-button> </gl-button>
</template> </template>
<template #list-item="{ item }"> <template #list-item="{ item }">
......
...@@ -53,7 +53,7 @@ function initDescriptionModal() { ...@@ -53,7 +53,7 @@ function initDescriptionModal() {
export const generateDescriptionAction = () => ({ export const generateDescriptionAction = () => ({
title: s__('AI|Generate issue description'), title: s__('AI|Generate issue description'),
description: s__('AI|Creates issue description based on a short prompt'), description: s__('AI|Create issue description based on a short prompt'),
handler() { handler() {
initDescriptionModal(); initDescriptionModal();
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
visit(new_project_issue_path(project)) visit(new_project_issue_path(project))
end end
it 'has the AI actions button' do it 'has the GitLab Duo button' do
expect(page).to have_button('AI actions') expect(page).to have_button('GitLab Duo')
end end
end end
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
visit(new_project_issue_path(project)) visit(new_project_issue_path(project))
end end
it 'does not have the AI actions button' do it 'does not have the GitLab Duo button' do
expect(page).not_to have_button('AI actions') expect(page).not_to have_button('GitLab Duo')
end end
end end
......
...@@ -81,7 +81,7 @@ describe('AI actions dropdown component', () => { ...@@ -81,7 +81,7 @@ describe('AI actions dropdown component', () => {
it('passes down correct actions', () => { it('passes down correct actions', () => {
const actions = createActions(); const actions = createActions();
createWrapper(actions); createWrapper(actions);
const [{ items }] = findDropdown().props('items'); const items = findDropdown().props('items');
expect(items).toHaveLength(actions.length); expect(items).toHaveLength(actions.length);
expect(items[0].text).toBe(actions[0].title); expect(items[0].text).toBe(actions[0].title);
}); });
......
...@@ -2024,9 +2024,6 @@ msgstr "" ...@@ -2024,9 +2024,6 @@ msgstr ""
msgid "AI Agent was successfully deleted" msgid "AI Agent was successfully deleted"
msgstr "" msgstr ""
   
msgid "AI actions"
msgstr ""
msgid "AI-generated summary" msgid "AI-generated summary"
msgstr "" msgstr ""
   
...@@ -2132,7 +2129,7 @@ msgstr "" ...@@ -2132,7 +2129,7 @@ msgstr ""
msgid "AI|Autocomplete" msgid "AI|Autocomplete"
msgstr "" msgstr ""
   
msgid "AI|Creates issue description based on a short prompt" msgid "AI|Create issue description based on a short prompt"
msgstr "" msgstr ""
   
msgid "AI|Description is required" msgid "AI|Description is required"
...@@ -23384,6 +23381,9 @@ msgstr "" ...@@ -23384,6 +23381,9 @@ msgstr ""
msgid "GitLab Community Edition" msgid "GitLab Community Edition"
msgstr "" msgstr ""
   
msgid "GitLab Duo"
msgstr ""
msgid "GitLab Duo Pro seats" msgid "GitLab Duo Pro seats"
msgstr "" msgstr ""
   
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册