diff options
Diffstat (limited to 'app/assets/javascripts/ci/pipeline_editor/components/editor/ci_editor_header.vue')
-rw-r--r-- | app/assets/javascripts/ci/pipeline_editor/components/editor/ci_editor_header.vue | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/assets/javascripts/ci/pipeline_editor/components/editor/ci_editor_header.vue b/app/assets/javascripts/ci/pipeline_editor/components/editor/ci_editor_header.vue index b78224e93b0..66957365261 100644 --- a/app/assets/javascripts/ci/pipeline_editor/components/editor/ci_editor_header.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/editor/ci_editor_header.vue @@ -10,6 +10,7 @@ export default { browseTemplates: __('Browse templates'), help: __('Help'), jobAssistant: s__('JobAssistant|Job assistant'), + aiAssistant: s__('PipelinesAiAssistant|Ai assistant'), }, TEMPLATE_REPOSITORY_URL, components: { @@ -25,6 +26,10 @@ export default { type: Boolean, required: true, }, + showAiAssistantDrawer: { + type: Boolean, + required: true, + }, }, methods: { toggleDrawer() { @@ -40,6 +45,11 @@ export default { this.showJobAssistantDrawer ? 'close-job-assistant-drawer' : 'open-job-assistant-drawer', ); }, + toggleAiAssistantDrawer() { + this.$emit( + this.showAiAssistantDrawer ? 'close-ai-assistant-drawer' : 'open-ai-assistant-drawer', + ); + }, trackHelpDrawerClick() { const { label, actions } = pipelineEditorTrackingOptions; this.track(actions.openHelpDrawer, { label }); @@ -85,5 +95,15 @@ export default { > {{ $options.i18n.jobAssistant }} </gl-button> + <gl-button + v-if="glFeatures.aiCiConfigGenerator" + icon="bulb" + size="small" + data-testid="ai-assistant-drawer-toggle" + data-qa-selector="ai_assistant_drawer_toggle" + @click="toggleAiAssistantDrawer" + > + {{ $options.i18n.aiAssistant }} + </gl-button> </div> </template> |