@gitlab/duo-ui 10.22.1 → 10.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/components/agentic_chat/agentic_duo_chat.js +37 -18
- package/dist/components/agentic_chat/components/agentic_tool_approval_flow/agentic_tool_approval_flow.js +51 -3
- package/dist/components/agentic_chat/components/agentic_tool_approval_flow/agentic_tool_approval_modal/agentic_tool_approval_modal.js +64 -14
- package/dist/components/chat/components/duo_chat_header/duo_chat_header.js +4 -4
- package/dist/components/chat/duo_chat.js +54 -35
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/index.js +0 -2
- package/dist/tailwind.css +1 -1
- package/dist/tailwind.css.map +1 -1
- package/package.json +1 -2
- package/src/components/agentic_chat/agentic_duo_chat.vue +244 -210
- package/src/components/agentic_chat/components/agentic_tool_approval_flow/agentic_tool_approval_flow.vue +57 -2
- package/src/components/agentic_chat/components/agentic_tool_approval_flow/agentic_tool_approval_modal/agentic_tool_approval_modal.vue +105 -16
- package/src/components/chat/components/duo_chat_header/duo_chat_header.vue +22 -24
- package/src/components/chat/duo_chat.scss +2 -1
- package/src/components/chat/duo_chat.vue +238 -214
- package/src/index.js +0 -2
- package/translations.js +6 -5
- package/dist/components/ui/duo_layout/duo_layout.js +0 -100
- package/dist/components/ui/side_rail/side_rail.js +0 -67
- package/src/components/ui/duo_layout/duo_layout.md +0 -0
- package/src/components/ui/duo_layout/duo_layout.vue +0 -95
- package/src/components/ui/side_rail/side_rail.vue +0 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [10.23.1](https://gitlab.com/gitlab-org/duo-ui/compare/v10.23.0...v10.23.1) (2025-09-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* trigger release pipeline after reverting MR 271 and MR 263 ([514243a](https://gitlab.com/gitlab-org/duo-ui/commit/514243a6e5ccdaff638032e4d7970f80d2c6acd9))
|
|
7
|
+
|
|
8
|
+
# [10.23.0](https://gitlab.com/gitlab-org/duo-ui/compare/v10.22.1...v10.23.0) (2025-09-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **MCP:** Add DOM element based testing in favor of vm ([aa57f8b](https://gitlab.com/gitlab-org/duo-ui/commit/aa57f8bac963af318ff9e113731bef0864c43147))
|
|
14
|
+
* **MCP:** Add new schema for button option configs ([1cfc076](https://gitlab.com/gitlab-org/duo-ui/commit/1cfc076366b6fecea9b511ee0d24ec9798816c55))
|
|
15
|
+
* **MCP:** Add safeApproval computed property and replace manual checks ([fc093da](https://gitlab.com/gitlab-org/duo-ui/commit/fc093da8ba2e9a2f961e46d85c7b66e2a50c434a))
|
|
16
|
+
* **MCP:** Add tests for button and cleanup unused code for local dev ([d8da63b](https://gitlab.com/gitlab-org/duo-ui/commit/d8da63b38f3395acd08ef28a2b6ad3bc1bfcf782))
|
|
17
|
+
* **MCP:** Add working split button from gitlab-ui ([cdfee53](https://gitlab.com/gitlab-org/duo-ui/commit/cdfee53e3fee66c063987f442a6d0185032b732a))
|
|
18
|
+
* **MCP:** Ensure correct formatting with lint fix ([8ddcda8](https://gitlab.com/gitlab-org/duo-ui/commit/8ddcda822257d0a6b0ccf266cc5bb6f5c80c0f46))
|
|
19
|
+
* **MCP:** Fix Vue3 specs ([31377d7](https://gitlab.com/gitlab-org/duo-ui/commit/31377d772e76ddf802c09ec5443e946b958b2324))
|
|
20
|
+
* **MCP:** Rename single approval tool emit message ([ddb3c4e](https://gitlab.com/gitlab-org/duo-ui/commit/ddb3c4e6ef43bfeec274b42777227a31959577e1))
|
|
21
|
+
* **MCP:** Require that approve-once is always in component ([f9a9d7a](https://gitlab.com/gitlab-org/duo-ui/commit/f9a9d7ae362fad882f28d3b39f86a274dc6c4e0f))
|
|
22
|
+
|
|
1
23
|
## [10.22.1](https://gitlab.com/gitlab-org/duo-ui/compare/v10.22.0...v10.22.1) (2025-09-12)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import throttle from 'lodash/throttle';
|
|
2
|
-
import
|
|
2
|
+
import VueResizable from 'vue-resizable';
|
|
3
|
+
import { GlButton, GlAlert, GlFormInputGroup, GlFormTextarea, GlForm, GlExperimentBadge, GlCard, GlDropdownItem, GlSafeHtmlDirective } from '@gitlab/ui';
|
|
3
4
|
import { translate, sprintf, translatePlural } from '@gitlab/ui/dist/utils/i18n';
|
|
4
5
|
import { badgeTypes, badgeTypeValidator, MAX_PROMPT_LENGTH, PROMPT_LENGTH_WARNING, CHAT_RESET_MESSAGE, CHAT_INCLUDE_MESSAGE, MESSAGE_MODEL_ROLES, CHAT_BASE_COMMANDS } from '../chat/constants';
|
|
5
6
|
import { VIEW_TYPES } from '../chat/components/duo_chat_header/constants';
|
|
@@ -13,10 +14,9 @@ import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
|
13
14
|
const i18n = {
|
|
14
15
|
CHAT_DEFAULT_TITLE: translate('AgenticDuoChat.chatDefaultTitle', 'GitLab Duo Agentic Chat'),
|
|
15
16
|
CHAT_HISTORY_TITLE: translate('AgenticDuoChat.chatHistoryTitle', 'Chat history'),
|
|
16
|
-
CHAT_DISCLAMER: translate('AgenticDuoChat.chatDisclamer', 'Responses
|
|
17
|
+
CHAT_DISCLAMER: translate('AgenticDuoChat.chatDisclamer', 'Chat can autonomously change code. Responses and changes can be inaccurate. Review carefully.'),
|
|
17
18
|
CHAT_EMPTY_STATE_TITLE: translate('AgenticDuoChat.chatEmptyStateTitle', '👋 I am GitLab Duo Agentic Chat, your personal AI-powered assistant. How can I help you today?'),
|
|
18
|
-
CHAT_PROMPT_PLACEHOLDER_DEFAULT: translate('AgenticDuoChat.chatPromptPlaceholderDefault',
|
|
19
|
-
CHAT_MODEL_PLACEHOLDER: translate('AgenticDuoChat.chatModelPlaceholder', 'GitLab Duo Agentic Chat'),
|
|
19
|
+
CHAT_PROMPT_PLACEHOLDER_DEFAULT: translate('AgenticDuoChat.chatPromptPlaceholderDefault', 'GitLab Duo Agentic Chat'),
|
|
20
20
|
CHAT_PROMPT_PLACEHOLDER_WITH_COMMANDS: translate('AgenticDuoChat.chatPromptPlaceholderWithCommands', 'Type /help to learn more'),
|
|
21
21
|
CHAT_SUBMIT_LABEL: translate('AgenticDuoChat.chatSubmitLabel', 'Send chat message.'),
|
|
22
22
|
CHAT_CANCEL_LABEL: translate('AgenticDuoChat.chatCancelLabel', 'Cancel'),
|
|
@@ -45,15 +45,19 @@ var script = {
|
|
|
45
45
|
name: 'DuoChat',
|
|
46
46
|
components: {
|
|
47
47
|
GlButton,
|
|
48
|
+
GlAlert,
|
|
49
|
+
GlFormInputGroup,
|
|
48
50
|
GlFormTextarea,
|
|
49
51
|
GlForm,
|
|
52
|
+
GlExperimentBadge,
|
|
50
53
|
DuoChatLoader,
|
|
51
54
|
DuoChatPredefinedPrompts,
|
|
52
55
|
DuoChatConversation,
|
|
53
56
|
DuoChatHeader,
|
|
54
57
|
DuoChatThreads,
|
|
55
58
|
GlCard,
|
|
56
|
-
GlDropdownItem
|
|
59
|
+
GlDropdownItem,
|
|
60
|
+
VueResizable
|
|
57
61
|
},
|
|
58
62
|
directives: {
|
|
59
63
|
SafeHtml: GlSafeHtmlDirective
|
|
@@ -279,6 +283,7 @@ var script = {
|
|
|
279
283
|
},
|
|
280
284
|
data() {
|
|
281
285
|
return {
|
|
286
|
+
isHidden: false,
|
|
282
287
|
prompt: '',
|
|
283
288
|
scrolledToBottom: true,
|
|
284
289
|
activeCommandIndex: 0,
|
|
@@ -382,6 +387,7 @@ var script = {
|
|
|
382
387
|
if (!loading && !this.isStreaming) {
|
|
383
388
|
this.canSubmit = true; // Re-enable submit button when loading stops
|
|
384
389
|
}
|
|
390
|
+
this.isHidden = false;
|
|
385
391
|
},
|
|
386
392
|
isStreaming(streaming) {
|
|
387
393
|
if (!streaming && !this.isLoading) {
|
|
@@ -420,10 +426,14 @@ var script = {
|
|
|
420
426
|
this.focusChatInput();
|
|
421
427
|
});
|
|
422
428
|
},
|
|
429
|
+
updateSize(e) {
|
|
430
|
+
this.$emit('chat-resize', e);
|
|
431
|
+
},
|
|
423
432
|
compositionEnd() {
|
|
424
433
|
this.compositionJustEnded = true;
|
|
425
434
|
},
|
|
426
435
|
hideChat() {
|
|
436
|
+
this.isHidden = true;
|
|
427
437
|
/**
|
|
428
438
|
* Emitted when clicking the cross in the title and the chat gets closed.
|
|
429
439
|
*/
|
|
@@ -677,19 +687,28 @@ var script = {
|
|
|
677
687
|
const __vue_script__ = script;
|
|
678
688
|
|
|
679
689
|
/* template */
|
|
680
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
'gl-form-input',
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.shouldRenderResizable ? 'vue-resizable' : 'div',{tag:"component",class:{
|
|
691
|
+
'duo-chat-resizable': _vm.shouldRenderResizable,
|
|
692
|
+
'non-resizable-wrapper': !_vm.shouldRenderResizable,
|
|
693
|
+
},attrs:{"width":_vm.shouldRenderResizable ? _vm.dimensions.width : null,"height":_vm.shouldRenderResizable ? _vm.dimensions.height : null,"max-width":_vm.shouldRenderResizable ? _vm.dimensions.maxWidth : null,"max-height":_vm.shouldRenderResizable ? _vm.dimensions.maxHeight : null,"min-width":_vm.shouldRenderResizable ? _vm.dimensions.minWidth : null,"left":_vm.shouldRenderResizable ? _vm.dimensions.left : null,"top":_vm.shouldRenderResizable ? _vm.dimensions.top : null,"fit-parent":true,"min-height":_vm.shouldRenderResizable ? _vm.dimensions.minHeight : null,"active":_vm.shouldRenderResizable ? ['l', 't', 'lt'] : null},on:{"resize:end":_vm.updateSize}},[(!_vm.isHidden)?_c('aside',{staticClass:"markdown-code-block duo-chat gl-bottom-0 gl-flex gl-max-h-full gl-flex-col",class:{
|
|
694
|
+
'resizable-content': _vm.shouldRenderResizable,
|
|
695
|
+
'duo-chat-drawer': !_vm.shouldRenderResizable,
|
|
696
|
+
},attrs:{"id":"chat-component","role":"complementary","data-testid":"chat-component"}},[(_vm.showHeader)?_c('duo-chat-header',{ref:"header",attrs:{"active-thread-id":_vm.activeThreadId,"title":_vm.isMultithreaded && _vm.currentView === 'list' ? _vm.$options.i18n.CHAT_HISTORY_TITLE : _vm.title,"subtitle":_vm.activeThreadTitleForView,"error":_vm.error,"is-multithreaded":_vm.isMultithreaded,"current-view":_vm.currentView,"should-render-resizable":_vm.shouldRenderResizable,"badge-type":_vm.isMultithreaded ? null : _vm.badgeType,"session-id":_vm.sessionId,"agents":_vm.agents},on:{"go-back":_vm.onGoBack,"new-chat":_vm.onNewChat,"close":_vm.hideChat},scopedSlots:_vm._u([{key:"subheader",fn:function(){return [_vm._t("subheader")]},proxy:true}],null,true)}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-flex gl-flex-1 gl-flex-grow gl-flex-col gl-overflow-y-auto gl-overscroll-contain gl-bg-inherit",attrs:{"data-testid":"chat-history"},on:{"scroll":_vm.handleScrollingThrottled}},[(_vm.shouldShowThreadList)?_c('duo-chat-threads',{attrs:{"threads":_vm.threadList,"preferred-locale":_vm.preferredLocale},on:{"new-chat":_vm.onNewChat,"select-thread":_vm.onSelectThread,"delete-thread":_vm.onDeleteThread,"close":_vm.hideChat}}):_c('transition-group',{staticClass:"duo-chat-history gl-mt-auto gl-p-5",attrs:{"mode":"out-in","tag":"section","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('duo-chat-conversation',{key:("conversation-" + index),attrs:{"enable-code-insertion":_vm.enableCodeInsertion,"messages":conversation,"show-delimiter":index > 0,"with-feedback":_vm.withFeedback,"is-tool-approval-processing":_vm.isToolApprovalProcessing,"working-directory":_vm.workingDirectory},on:{"track-feedback":_vm.onTrackFeedback,"insert-code-snippet":_vm.onInsertCodeSnippet,"copy-code-snippet":_vm.onCopyCodeSnippet,"copy-message":_vm.onCopyMessage,"get-context-item-content":_vm.onGetContextItemContent,"approve-tool":_vm.onApproveToolCall,"deny-tool":_vm.onDenyToolCall,"open-file-path":_vm.onOpenFilePath}})}),_vm._v(" "),(!_vm.hasMessages && !_vm.isLoading)?[_c('div',{key:"empty-state-message",staticClass:"duo-chat-message gl-rounded-bl-none gl-leading-20 gl-text-gray-900 gl-break-anywhere",attrs:{"data-testid":"gl-duo-chat-empty-state"}},[(_vm.emptyStateTitle)?_c('p',{staticClass:"gl-m-0",attrs:{"data-testid":"gl-duo-chat-empty-state-title"}},[_vm._v("\n "+_vm._s(_vm.emptyStateTitle)+"\n ")]):_vm._e(),_vm._v(" "),_c('duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})],1)]:_vm._e(),_vm._v(" "),(_vm.isLoading)?_c('duo-chat-loader',{key:"loader",attrs:{"tool-name":_vm.toolName}}):_vm._e(),_vm._v(" "),_c('div',{key:"anchor",ref:"anchor",staticClass:"scroll-anchor"})],2)],1),_vm._v(" "),(_vm.isChatAvailable && !_vm.shouldShowThreadList)?_c('footer',{staticClass:"duo-chat-drawer-footer gl-relative gl-z-2 gl-shrink-0 gl-border-0 gl-bg-default gl-pb-3",class:{ 'duo-chat-drawer-body-scrim-on-footer': !_vm.scrolledToBottom },attrs:{"data-testid":"chat-footer"}},[_c('gl-form',{attrs:{"data-testid":"chat-prompt-form"},on:{"submit":function($event){$event.stopPropagation();$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}}},[_c('div',{staticClass:"gl-relative gl-max-w-full"},[_vm._t("context-items-menu",null,{"isOpen":_vm.contextItemsMenuIsOpen,"onClose":_vm.closeContextItemsMenuOpen,"setRef":_vm.setContextItemsMenuRef,"focusPrompt":_vm.focusChatInput})],2),_vm._v(" "),_c('gl-form-input-group',{scopedSlots:_vm._u([{key:"append",fn:function(){return [(_vm.canSubmit)?_c('gl-button',{staticClass:"!gl-absolute gl-bottom-2 gl-right-2 !gl-rounded-full",attrs:{"icon":"paper-airplane","category":"primary","variant":"confirm","type":"submit","disabled":_vm.isPromptEmpty || !_vm.hasValidPrompt,"data-testid":"chat-prompt-submit-button","aria-label":_vm.$options.i18n.CHAT_SUBMIT_LABEL}}):_c('gl-button',{staticClass:"!gl-absolute gl-bottom-2 gl-right-2 !gl-rounded-full",attrs:{"icon":"stop","category":"primary","variant":"default","data-testid":"chat-prompt-cancel-button","aria-label":_vm.$options.i18n.CHAT_CANCEL_LABEL},on:{"click":_vm.cancelPrompt}})]},proxy:true}],null,false,2030360392)},[_c('div',{staticClass:"duo-chat-input gl-min-h-8 gl-max-w-full gl-grow gl-align-top",attrs:{"data-value":_vm.prompt}},[(_vm.shouldShowSlashCommands)?_c('gl-card',{ref:"commands",staticClass:"slash-commands !gl-absolute gl-w-full -gl-translate-y-full gl-list-none gl-pl-0 gl-shadow-md",attrs:{"body-class":"!gl-p-2"}},_vm._l((_vm.filteredSlashCommands),function(command,index){return _c('gl-dropdown-item',{key:command.name,class:{ 'active-command': index === _vm.activeCommandIndex },on:{"click":function($event){return _vm.selectSlashCommand(index)}},nativeOn:{"mouseenter":function($event){_vm.activeCommandIndex = index;}}},[_c('span',{staticClass:"gl-flex gl-justify-between"},[_c('span',{staticClass:"gl-block"},[_vm._v(_vm._s(command.name))]),_vm._v(" "),_c('small',{staticClass:"gl-pl-3 gl-text-right gl-italic gl-text-subtle"},[_vm._v(_vm._s(command.description))])])])}),1):_vm._e(),_vm._v(" "),_c('gl-form-textarea',{ref:"prompt",attrs:{"disabled":!_vm.canSubmit,"data-testid":"chat-prompt-input","placeholder":_vm.inputPlaceholder,"character-count-limit":_vm.maxPromptLength,"textarea-classes":[
|
|
697
|
+
'gl-absolute',
|
|
698
|
+
'!gl-h-full',
|
|
699
|
+
'gl-rounded-br-none',
|
|
700
|
+
'gl-rounded-tr-none',
|
|
701
|
+
'!gl-bg-transparent',
|
|
702
|
+
'!gl-py-4',
|
|
703
|
+
'!gl-shadow-none',
|
|
704
|
+
'form-control',
|
|
705
|
+
'gl-form-input',
|
|
706
|
+
'gl-form-textarea',
|
|
707
|
+
{ 'gl-truncate': !_vm.prompt } ],"aria-label":"Chat prompt input","autofocus":""},on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"z",undefined,$event.key,undefined)){ return null; }if(!$event.ctrlKey){ return null; }if($event.shiftKey||$event.altKey||$event.metaKey){ return null; }return _vm.handleUndo.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"z",undefined,$event.key,undefined)){ return null; }if(!$event.metaKey){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey){ return null; }return _vm.handleUndo.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"z",undefined,$event.key,undefined)){ return null; }if(!$event.ctrlKey){ return null; }if(!$event.shiftKey){ return null; }if($event.altKey||$event.metaKey){ return null; }return _vm.handleRedo.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"z",undefined,$event.key,undefined)){ return null; }if(!$event.metaKey){ return null; }if(!$event.shiftKey){ return null; }if($event.ctrlKey||$event.altKey){ return null; }return _vm.handleRedo.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"y",undefined,$event.key,undefined)){ return null; }if(!$event.ctrlKey){ return null; }if($event.shiftKey||$event.altKey||$event.metaKey){ return null; }return _vm.handleRedo.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"y",undefined,$event.key,undefined)){ return null; }if(!$event.metaKey){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey){ return null; }return _vm.handleRedo.apply(null, arguments)}],"compositionend":_vm.compositionEnd},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();},"keyup":function($event){return _vm.onInputKeyup.apply(null, arguments)}},scopedSlots:_vm._u([{key:"remaining-character-count-text",fn:function(ref){
|
|
708
|
+
var count = ref.count;
|
|
709
|
+
return [(count <= _vm.promptLengthWarningCount)?_c('span',{staticClass:"gl-absolute gl-bottom-[-25px] gl-right-px gl-pr-3"},[_vm._v("\n "+_vm._s(_vm.remainingCharacterCountMessage(count))+"\n ")]):_vm._e()]}},{key:"character-count-over-limit-text",fn:function(ref){
|
|
710
|
+
var count = ref.count;
|
|
711
|
+
return [_c('span',{staticClass:"gl-absolute gl-bottom-[-25px] gl-right-px gl-pr-3"},[_vm._v(_vm._s(_vm.overLimitCharacterCountMessage(count)))])]}}],null,false,578626568),model:{value:(_vm.prompt),callback:function ($$v) {_vm.prompt=$$v;},expression:"prompt"}})],1)])],1),_vm._v(" "),_vm._t("footer-controls"),_vm._v(" "),_c('p',{staticClass:"gl-mb-0 gl-mt-3 gl-px-4 gl-text-sm gl-text-secondary",class:{ 'gl-mt-6 sm:gl-mt-3 sm:gl-max-w-1/2': _vm.prompt.length >= _vm.maxPromptLengthWarning }},[_vm._v("\n "+_vm._s(_vm.$options.i18n.CHAT_DISCLAMER)+"\n ")])],2):_vm._e()],1):_vm._e()])};
|
|
693
712
|
var __vue_staticRenderFns__ = [];
|
|
694
713
|
|
|
695
714
|
/* style */
|
|
@@ -10,6 +10,11 @@ const MODAL_TYPES = {
|
|
|
10
10
|
APPROVAL: 'approval',
|
|
11
11
|
REJECTION: 'rejection'
|
|
12
12
|
};
|
|
13
|
+
const DEFAULT_APPROVAL_OPTIONS = [{
|
|
14
|
+
type: 'approve-tool-once',
|
|
15
|
+
text: 'Approve',
|
|
16
|
+
primary: true
|
|
17
|
+
}];
|
|
13
18
|
var script = {
|
|
14
19
|
name: 'AgenticToolApprovalFlow',
|
|
15
20
|
components: {
|
|
@@ -44,6 +49,47 @@ var script = {
|
|
|
44
49
|
type: String,
|
|
45
50
|
required: false,
|
|
46
51
|
default: i18n.DEFAULT_DESCRIPTION
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Configuration for approval options
|
|
55
|
+
* Must include at least one option with type 'approve-tool-once' for legacy compatibility
|
|
56
|
+
* @property {string} type - Event payload identifier (must include 'approve-tool-once')
|
|
57
|
+
* @property {string} text - Display text for button/dropdown
|
|
58
|
+
* @property {boolean} primary - Mark as primary action (exactly one required)
|
|
59
|
+
* @property {boolean} disabled - Disable this option (passed through to GitLab UI)
|
|
60
|
+
*/
|
|
61
|
+
approvalOptions: {
|
|
62
|
+
type: Array,
|
|
63
|
+
required: false,
|
|
64
|
+
default: () => DEFAULT_APPROVAL_OPTIONS,
|
|
65
|
+
validator: options => {
|
|
66
|
+
if (!Array.isArray(options) || options.length === 0) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const primaryCount = options.filter(option => option.primary === true).length;
|
|
70
|
+
if (primaryCount !== 1) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
const types = options.map(option => option.type);
|
|
74
|
+
if (new Set(types).size !== types.length) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Require 'approve-tool-once' type for legacy compatibility
|
|
79
|
+
const hasApproveOnce = types.includes('approve-tool-once');
|
|
80
|
+
if (!hasApproveOnce) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return options.every(option => {
|
|
84
|
+
if (!option.type || !option.text) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
if (option.primary === true && option.disabled === true) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
47
93
|
}
|
|
48
94
|
},
|
|
49
95
|
data() {
|
|
@@ -67,11 +113,13 @@ var script = {
|
|
|
67
113
|
}
|
|
68
114
|
},
|
|
69
115
|
methods: {
|
|
70
|
-
handleApprove() {
|
|
116
|
+
handleApprove(approvalPayload) {
|
|
71
117
|
/**
|
|
72
118
|
* Emitted when the user approves the tool execution
|
|
119
|
+
* @param {Object} approvalPayload - Contains the approval type and any additional data
|
|
120
|
+
* @param {string} approvalPayload.type - The type of approval ('once', 'session', 'all')
|
|
73
121
|
*/
|
|
74
|
-
this.$emit('approve');
|
|
122
|
+
this.$emit('approve', approvalPayload);
|
|
75
123
|
},
|
|
76
124
|
handleInitialDeny() {
|
|
77
125
|
this.currentModal = MODAL_TYPES.REJECTION;
|
|
@@ -97,7 +145,7 @@ var script = {
|
|
|
97
145
|
const __vue_script__ = script;
|
|
98
146
|
|
|
99
147
|
/* template */
|
|
100
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"data-testid":"agentic-tool-approval-flow"}},[_c('agentic-tool-approval-modal',{attrs:{"visible":_vm.showApprovalModal,"tool-details":_vm.toolDetails,"description":_vm.description},on:{"approve":_vm.handleApprove,"deny":_vm.handleInitialDeny,"deny-force":_vm.handleForceDeny}}),_vm._v(" "),_c('agentic-tool-rejection-modal',{attrs:{"visible":_vm.showRejectionModal},on:{"submit":_vm.handleRejectionSubmit,"back":_vm.handleBack}})],1)};
|
|
148
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"data-testid":"agentic-tool-approval-flow"}},[_c('agentic-tool-approval-modal',{attrs:{"visible":_vm.showApprovalModal,"tool-details":_vm.toolDetails,"description":_vm.description,"approval-options":_vm.approvalOptions},on:{"approve":_vm.handleApprove,"deny":_vm.handleInitialDeny,"deny-force":_vm.handleForceDeny}}),_vm._v(" "),_c('agentic-tool-rejection-modal',{attrs:{"visible":_vm.showRejectionModal},on:{"submit":_vm.handleRejectionSubmit,"back":_vm.handleBack}})],1)};
|
|
101
149
|
var __vue_staticRenderFns__ = [];
|
|
102
150
|
|
|
103
151
|
/* style */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlModal } from '@gitlab/ui';
|
|
1
|
+
import { GlModal, GlButton, GlDropdown, GlDropdownItem } from '@gitlab/ui';
|
|
2
2
|
import { translate } from '../../../../../utils/i18n';
|
|
3
3
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
4
4
|
|
|
@@ -8,12 +8,17 @@ const i18n = {
|
|
|
8
8
|
TOOL_LABEL: translate('AgenticToolApprovalModal.toolLabel', 'Tool:'),
|
|
9
9
|
TOOL_UNKNOWN: translate('AgenticToolApprovalModal.toolUnknown', 'Unknown'),
|
|
10
10
|
APPROVE_TEXT: translate('AgenticToolApprovalModal.approveText', 'Approve'),
|
|
11
|
+
APPROVE_ONCE_TEXT: translate('AgenticToolApprovalModal.approveOnceText', 'Approve Once'),
|
|
12
|
+
APPROVE_ALL_TEXT: translate('AgenticToolApprovalModal.approveAllText', 'Always approve this tool'),
|
|
11
13
|
DENY_TEXT: translate('AgenticToolApprovalModal.denyText', 'Deny')
|
|
12
14
|
};
|
|
13
15
|
var script = {
|
|
14
16
|
name: 'AgenticToolApprovalModal',
|
|
15
17
|
components: {
|
|
16
|
-
GlModal
|
|
18
|
+
GlModal,
|
|
19
|
+
GlButton,
|
|
20
|
+
GlDropdown,
|
|
21
|
+
GlDropdownItem
|
|
17
22
|
},
|
|
18
23
|
props: {
|
|
19
24
|
/**
|
|
@@ -43,19 +48,35 @@ var script = {
|
|
|
43
48
|
type: String,
|
|
44
49
|
required: false,
|
|
45
50
|
default: i18n.DEFAULT_DESCRIPTION
|
|
51
|
+
},
|
|
52
|
+
approvalOptions: {
|
|
53
|
+
type: Array,
|
|
54
|
+
required: false,
|
|
55
|
+
default: () => [{
|
|
56
|
+
type: 'approve-tool-once',
|
|
57
|
+
text: 'Approve',
|
|
58
|
+
primary: true
|
|
59
|
+
}]
|
|
46
60
|
}
|
|
47
61
|
},
|
|
62
|
+
data() {
|
|
63
|
+
return {
|
|
64
|
+
isApprovalAction: false
|
|
65
|
+
};
|
|
66
|
+
},
|
|
48
67
|
computed: {
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
safeApprovalOptions() {
|
|
69
|
+
return this.approvalOptions || [];
|
|
70
|
+
},
|
|
71
|
+
primaryApprovalOption() {
|
|
72
|
+
const primary = this.safeApprovalOptions.find(option => option.primary === true);
|
|
73
|
+
return primary || this.safeApprovalOptions[0] || {};
|
|
74
|
+
},
|
|
75
|
+
additionalApprovalOptions() {
|
|
76
|
+
return this.safeApprovalOptions.filter(option => option.primary !== true);
|
|
77
|
+
},
|
|
78
|
+
showSplitButton() {
|
|
79
|
+
return this.safeApprovalOptions.length > 1;
|
|
59
80
|
},
|
|
60
81
|
denyAction() {
|
|
61
82
|
return {
|
|
@@ -74,11 +95,34 @@ var script = {
|
|
|
74
95
|
}
|
|
75
96
|
},
|
|
76
97
|
methods: {
|
|
98
|
+
handlePrimaryApprove() {
|
|
99
|
+
/**
|
|
100
|
+
* Emitted when the user clicks the primary approve button
|
|
101
|
+
*/
|
|
102
|
+
this.isApprovalAction = true;
|
|
103
|
+
this.$emit('approve', {
|
|
104
|
+
type: this.primaryApprovalOption.type
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
handleDropdownSelection(option) {
|
|
108
|
+
/**
|
|
109
|
+
* Emitted when the user selects an option from the dropdown
|
|
110
|
+
* @param {Object} option - The selected dropdown option
|
|
111
|
+
*/
|
|
112
|
+
this.isApprovalAction = true;
|
|
113
|
+
this.$emit('approve', {
|
|
114
|
+
type: option.type
|
|
115
|
+
});
|
|
116
|
+
},
|
|
77
117
|
handleApprove() {
|
|
78
118
|
/**
|
|
119
|
+
* Legacy method for backwards compatibility - defaults to 'approve-tool-once' approval
|
|
79
120
|
* Emitted when the user approves the tool execution
|
|
80
121
|
*/
|
|
81
|
-
this
|
|
122
|
+
this.isApprovalAction = true;
|
|
123
|
+
this.$emit('approve', {
|
|
124
|
+
type: 'approve-tool-once'
|
|
125
|
+
});
|
|
82
126
|
},
|
|
83
127
|
handleDeny() {
|
|
84
128
|
/**
|
|
@@ -87,6 +131,12 @@ var script = {
|
|
|
87
131
|
this.$emit('deny');
|
|
88
132
|
},
|
|
89
133
|
handleModalHide(event) {
|
|
134
|
+
// If the modal is being hidden by an approval action, don't emit deny-force
|
|
135
|
+
if (this.isApprovalAction) {
|
|
136
|
+
this.isApprovalAction = false;
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
90
140
|
// If the modal is being hidden by the X button or ESC key,
|
|
91
141
|
// treat it as a deny-force action
|
|
92
142
|
if (event.trigger !== 'ok' && event.trigger !== 'cancel') {
|
|
@@ -101,7 +151,7 @@ var script = {
|
|
|
101
151
|
const __vue_script__ = script;
|
|
102
152
|
|
|
103
153
|
/* template */
|
|
104
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-modal',{attrs:{"visible":_vm.visible,"modal-id":"agentic-tool-approval-modal","title":_vm.$options.i18n.TITLE,"action-primary":
|
|
154
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('gl-modal',{attrs:{"visible":_vm.visible,"modal-id":"agentic-tool-approval-modal","title":_vm.$options.i18n.TITLE,"action-primary":null,"action-cancel":null,"no-close-on-backdrop":true,"no-close-on-esc":true,"data-testid":"agentic-tool-approval-modal"},on:{"hide":_vm.handleModalHide},scopedSlots:_vm._u([{key:"modal-footer",fn:function(){return [_c('div',{staticClass:"gl-flex gl-justify-end gl-gap-3"},[_c('gl-button',_vm._b({on:{"click":_vm.handleDeny}},'gl-button',_vm.denyAction.attributes,false),[_vm._v("\n "+_vm._s(_vm.denyAction.text)+"\n ")]),_vm._v(" "),(_vm.showSplitButton)?_c('gl-dropdown',{attrs:{"variant":"confirm","size":"small","split":"","text":_vm.primaryApprovalOption.text,"disabled":_vm.primaryApprovalOption.disabled,"right":"","data-testid":"approve-dropdown"},on:{"click":_vm.handlePrimaryApprove}},_vm._l((_vm.additionalApprovalOptions),function(option){return _c('gl-dropdown-item',{key:option.type,attrs:{"disabled":option.disabled},on:{"click":function($event){return _vm.handleDropdownSelection(option)}}},[_vm._v("\n "+_vm._s(option.text)+"\n ")])}),1):_c('gl-button',{attrs:{"variant":"confirm","size":"small","disabled":_vm.primaryApprovalOption.disabled,"data-testid":"approve-button"},on:{"click":_vm.handlePrimaryApprove}},[_vm._v("\n "+_vm._s(_vm.primaryApprovalOption.text)+"\n ")])],1)]},proxy:true}])},[_c('div',{staticClass:"gl-mb-4"},[_c('p',{staticClass:"gl-mb-3",attrs:{"data-testid":"approval-description"}},[_vm._v("\n "+_vm._s(_vm.description)+"\n ")]),_vm._v(" "),(_vm.toolDetails)?_c('div',{staticClass:"gl-mb-3 gl-rounded-base gl-bg-gray-10 gl-p-3",attrs:{"data-testid":"tool-details"}},[_c('strong',[_vm._v(_vm._s(_vm.$options.i18n.TOOL_LABEL)+" "+_vm._s(_vm.toolName))]),_vm._v(" "),(_vm.toolDetails.parameters)?_c('pre',{staticClass:"gl-mb-0 gl-mt-2 gl-text-inherit",attrs:{"data-testid":"tool-parameters"}},[_vm._v(_vm._s(JSON.stringify(_vm.toolDetails.parameters, null, 2)))]):_vm._e()]):_vm._e()])])};
|
|
105
155
|
var __vue_staticRenderFns__ = [];
|
|
106
156
|
|
|
107
157
|
/* style */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
|
-
import { GlToast, GlAlert, GlBadge,
|
|
2
|
+
import { GlToast, GlAlert, GlBadge, GlButton, GlDropdown, GlDropdownItem, GlExperimentBadge, GlDisclosureDropdown, GlSafeHtmlDirective, GlTooltipDirective } from '@gitlab/ui';
|
|
3
3
|
import { translate } from '../../../../utils/i18n';
|
|
4
4
|
import { VIEW_TYPES } from './constants';
|
|
5
5
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
@@ -23,10 +23,10 @@ var script = {
|
|
|
23
23
|
components: {
|
|
24
24
|
GlAlert,
|
|
25
25
|
GlBadge,
|
|
26
|
-
GlAvatar,
|
|
27
26
|
GlButton,
|
|
28
27
|
GlDropdown,
|
|
29
28
|
GlDropdownItem,
|
|
29
|
+
GlExperimentBadge,
|
|
30
30
|
GlDisclosureDropdown
|
|
31
31
|
},
|
|
32
32
|
directives: {
|
|
@@ -121,11 +121,11 @@ var script = {
|
|
|
121
121
|
const __vue_script__ = script;
|
|
122
122
|
|
|
123
123
|
/* template */
|
|
124
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"gl-border-b gl-shrink-0 gl-bg-default gl-p-0",attrs:{"data-testid":"chat-header"}},[_c('div',{staticClass:"
|
|
124
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:"gl-border-b gl-shrink-0 gl-bg-default gl-p-0",attrs:{"data-testid":"chat-header"}},[_c('div',{staticClass:"drawer-title gl-flex gl-items-center gl-justify-start gl-p-5"},[_c('div',{staticClass:"gl-flex-1 gl-overflow-hidden"},[_c('div',{staticClass:"gl-flex gl-items-center"},[_c('h3',{staticClass:"gl-my-0 gl-text-size-h2"},[_vm._v(_vm._s(_vm.title))]),_vm._v(" "),(_vm.badgeType)?_c('gl-experiment-badge',{attrs:{"type":_vm.badgeType,"container-id":"chat-component"}}):_vm._e()],1),_vm._v(" "),(_vm.subtitle)?_c('h4',{staticClass:"gl-mb-0 gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-pr-3 gl-text-sm gl-font-normal gl-text-subtle",attrs:{"data-testid":"chat-subtitle"}},[_vm._v("\n "+_vm._s(_vm.subtitle)+"\n ")]):_vm._e()]),_vm._v(" "),_c('div',{staticClass:"gl-flex gl-gap-3"},[(
|
|
125
125
|
_vm.isMultithreaded && (_vm.activeThreadId || _vm.currentView === _vm.VIEW_TYPES.LIST || _vm.hasManyAgents)
|
|
126
126
|
)?[(_vm.hasManyAgents)?_c('gl-disclosure-dropdown',{attrs:{"title":_vm.$options.i18n.CHAT_NEW_TOOLTIP,"toggle-text":_vm.$options.i18n.CHAT_NEW_TOOLTIP,"items":_vm.agents,"data-testid":"chat-new-button","variant":"confirm","category":"tertiary","size":"small","icon":"duo-chat-new","text-sr-only":"","aria-label":_vm.$options.i18n.CHAT_NEW_LABEL,"no-caret":""},on:{"action":_vm.startNewChat},scopedSlots:_vm._u([{key:"list-item",fn:function(ref){
|
|
127
127
|
var item = ref.item;
|
|
128
|
-
return [_c('span',{staticClass:"gl-flex gl-flex-col"},[_c('span',{attrs:{"clas":"gl-block"}},[_vm._v(_vm._s(item.name))]),_vm._v(" "),_c('span',{staticClass:"gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-text-sm"},[_vm._v(_vm._s(item.description))])])]}}],null,false,117082970)}):_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"title":_vm.$options.i18n.CHAT_NEW_TOOLTIP,"data-testid":"chat-new-button","variant":"confirm","category":"tertiary","size":"small","icon":"duo-chat-new","aria-label":_vm.$options.i18n.CHAT_NEW_LABEL},on:{"click":_vm.startNewChat}})]:_vm._e(),_vm._v(" "),(_vm.isMultithreaded && _vm.currentView === _vm.VIEW_TYPES.CHAT)?_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"title":_vm.$options.i18n.CHAT_HISTORY_TOOLTIP,"data-testid":"go-back-to-list-button","category":"tertiary","size":"small","icon":"history","aria-label":_vm.$options.i18n.CHAT_BACK_LABEL},on:{"click":function($event){return _vm.$emit('go-back')}}}):_vm._e(),_vm._v(" "),(_vm.isMultithreaded && _vm.activeThreadId && _vm.currentView === _vm.VIEW_TYPES.LIST)?_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"title":_vm.$options.i18n.CHAT_BACK_TO_CHAT_TOOLTIP,"data-testid":"go-back-to-chat-button","category":"tertiary","size":"small","icon":"go-back","aria-label":_vm.$options.i18n.CHAT_BACK_TO_CHAT_TOOLTIP},on:{"click":function($event){return _vm.$emit('go-back-to-chat')}}}):_vm._e(),_vm._v(" "),(_vm.sessionId)?_c('gl-dropdown',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{"hover":true}}],attrs:{"icon":"ellipsis_v","category":"tertiary","text-sr-only":"","size":"small","text":_vm.$options.i18n.CHAT_DROPDOWN_MORE_OPTIONS,"title":_vm.$options.i18n.CHAT_DROPDOWN_MORE_OPTIONS,"no-caret":""}},[_c('gl-dropdown-item',{on:{"click":function($event){return _vm.copySessionIdToClipboard()}}},[_c('span',{staticClass:"gl-flex gl-items-center gl-gap-2"},[_c('span',{staticClass:"gl-flex-shrink-0"},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_COPY_TOOLTIP))]),_vm._v(" "),_c('gl-badge',{staticClass:"gl-flex-shrink"},[_c('span',{staticClass:"gl-max-w-12 gl-truncate",attrs:{"title":_vm.sessionId}},[_vm._v("\n "+_vm._s(_vm.sessionId)+"\n ")])])],1)])],1):_vm._e()],2)]),_vm._v(" "),_vm._t("subheader"),_vm._v(" "),(_vm.error)?_c('gl-alert',{key:"error",staticClass:"!gl-pl-9",attrs:{"dismissible":false,"variant":"danger","role":"alert","data-testid":"chat-error"}},[_c('span',{directives:[{name:"safe-html",rawName:"v-safe-html",value:(_vm.error),expression:"error"}]})]):_vm._e()],2)};
|
|
128
|
+
return [_c('span',{staticClass:"gl-flex gl-flex-col"},[_c('span',{attrs:{"clas":"gl-block"}},[_vm._v(_vm._s(item.name))]),_vm._v(" "),_c('span',{staticClass:"gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-text-sm"},[_vm._v(_vm._s(item.description))])])]}}],null,false,117082970)}):_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"title":_vm.$options.i18n.CHAT_NEW_TOOLTIP,"data-testid":"chat-new-button","variant":"confirm","category":"tertiary","size":"small","icon":"duo-chat-new","aria-label":_vm.$options.i18n.CHAT_NEW_LABEL},on:{"click":_vm.startNewChat}})]:_vm._e(),_vm._v(" "),(_vm.isMultithreaded && _vm.currentView === _vm.VIEW_TYPES.CHAT)?_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"title":_vm.$options.i18n.CHAT_HISTORY_TOOLTIP,"data-testid":"go-back-to-list-button","category":"tertiary","size":"small","icon":"history","aria-label":_vm.$options.i18n.CHAT_BACK_LABEL},on:{"click":function($event){return _vm.$emit('go-back')}}}):_vm._e(),_vm._v(" "),(_vm.isMultithreaded && _vm.activeThreadId && _vm.currentView === _vm.VIEW_TYPES.LIST)?_c('gl-button',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"title":_vm.$options.i18n.CHAT_BACK_TO_CHAT_TOOLTIP,"data-testid":"go-back-to-chat-button","category":"tertiary","size":"small","icon":"go-back","aria-label":_vm.$options.i18n.CHAT_BACK_TO_CHAT_TOOLTIP},on:{"click":function($event){return _vm.$emit('go-back-to-chat')}}}):_vm._e(),_vm._v(" "),(_vm.sessionId)?_c('gl-dropdown',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.hover",modifiers:{"hover":true}}],attrs:{"icon":"ellipsis_v","category":"tertiary","text-sr-only":"","size":"small","text":_vm.$options.i18n.CHAT_DROPDOWN_MORE_OPTIONS,"title":_vm.$options.i18n.CHAT_DROPDOWN_MORE_OPTIONS,"no-caret":""}},[_c('gl-dropdown-item',{on:{"click":function($event){return _vm.copySessionIdToClipboard()}}},[_c('span',{staticClass:"gl-flex gl-items-center gl-gap-2"},[_c('span',{staticClass:"gl-flex-shrink-0"},[_vm._v(_vm._s(_vm.$options.i18n.CHAT_COPY_TOOLTIP))]),_vm._v(" "),_c('gl-badge',{staticClass:"gl-flex-shrink"},[_c('span',{staticClass:"gl-max-w-12 gl-truncate",attrs:{"title":_vm.sessionId}},[_vm._v("\n "+_vm._s(_vm.sessionId)+"\n ")])])],1)])],1):_vm._e(),_vm._v(" "),_c('gl-button',{staticClass:"gl-ml-auto",attrs:{"category":"tertiary","variant":"default","icon":"close","size":"small","data-testid":"chat-close-button","aria-label":_vm.$options.i18n.CHAT_CLOSE_LABEL},on:{"click":function($event){return _vm.$emit('close')}}})],2)]),_vm._v(" "),_vm._t("subheader"),_vm._v(" "),(_vm.error)?_c('gl-alert',{key:"error",staticClass:"!gl-pl-9",attrs:{"dismissible":false,"variant":"danger","role":"alert","data-testid":"chat-error"}},[_c('span',{directives:[{name:"safe-html",rawName:"v-safe-html",value:(_vm.error),expression:"error"}]})]):_vm._e()],2)};
|
|
129
129
|
var __vue_staticRenderFns__ = [];
|
|
130
130
|
|
|
131
131
|
/* style */
|