@gitlab/duo-ui 13.2.0 → 13.3.0
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 +7 -0
- package/dist/components/chat/components/duo_chat_header/duo_chat_header.js +4 -2
- package/dist/components/chat/components/duo_chat_header/duo_chat_header_agent_item/duo_chat_header_agent_item.js +62 -0
- package/dist/components/chat/components/duo_chat_header/web_duo_chat_header.js +4 -2
- package/package.json +1 -1
- package/src/components/chat/components/duo_chat_header/duo_chat_header.vue +3 -6
- package/src/components/chat/components/duo_chat_header/duo_chat_header_agent_item/duo_chat_header_agent_item.vue +43 -0
- package/src/components/chat/components/duo_chat_header/web_duo_chat_header.md +1 -0
- package/src/components/chat/components/duo_chat_header/web_duo_chat_header.vue +3 -6
- package/translations.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [13.3.0](https://gitlab.com/gitlab-org/duo-ui/compare/v13.2.0...v13.3.0) (2025-10-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **DuoChatHeader:** adds visual tip for foundational agents ([9524a88](https://gitlab.com/gitlab-org/duo-ui/commit/9524a88b72d37db64a25a742cfaf76812c30db9f))
|
|
7
|
+
|
|
1
8
|
# [13.2.0](https://gitlab.com/gitlab-org/duo-ui/compare/v13.1.0...v13.2.0) (2025-10-28)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -2,6 +2,7 @@ import Vue from 'vue';
|
|
|
2
2
|
import { GlToast, GlAlert, GlButton, GlExperimentBadge, GlDisclosureDropdown, GlSafeHtmlDirective, GlTooltipDirective } from '@gitlab/ui';
|
|
3
3
|
import { translate, sprintf } from '../../../../utils/i18n';
|
|
4
4
|
import { VIEW_TYPES } from './constants';
|
|
5
|
+
import DuoChatHeaderAgentItem from './duo_chat_header_agent_item/duo_chat_header_agent_item';
|
|
5
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
7
|
|
|
7
8
|
const i18n = {
|
|
@@ -24,7 +25,8 @@ var script = {
|
|
|
24
25
|
GlAlert,
|
|
25
26
|
GlButton,
|
|
26
27
|
GlExperimentBadge,
|
|
27
|
-
GlDisclosureDropdown
|
|
28
|
+
GlDisclosureDropdown,
|
|
29
|
+
DuoChatHeaderAgentItem
|
|
28
30
|
},
|
|
29
31
|
directives: {
|
|
30
32
|
SafeHtml: GlSafeHtmlDirective,
|
|
@@ -149,7 +151,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
149
151
|
_vm.isMultithreaded && (_vm.activeThreadId || _vm.currentView === _vm.VIEW_TYPES.LIST || _vm.hasManyAgents)
|
|
150
152
|
)?[(_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){
|
|
151
153
|
var item = ref.item;
|
|
152
|
-
return [_c('
|
|
154
|
+
return [_c('duo-chat-header-agent-item',{attrs:{"agent":item}})]}}],null,false,1406306174)}):_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-disclosure-dropdown',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip",value:(_vm.showSessionDropdownTooltip),expression:"showSessionDropdownTooltip"}],attrs:{"icon":"ellipsis_v","category":"tertiary","text-sr-only":"","size":"small","toggle-text":_vm.$options.i18n.CHAT_DROPDOWN_MORE_OPTIONS,"items":_vm.sessionIdItems,"no-caret":""},on:{"shown":_vm.showSessionDropdown,"hidden":_vm.hideSessionDropdown}}):_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)};
|
|
153
155
|
var __vue_staticRenderFns__ = [];
|
|
154
156
|
|
|
155
157
|
/* style */
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
|
|
2
|
+
import { translate } from '@gitlab/ui/dist/utils/i18n';
|
|
3
|
+
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
4
|
+
|
|
5
|
+
const i18n = {
|
|
6
|
+
CHAT_VERIFIED_AGENT: translate('DuoChat.verifiedAgent', 'Created and maintained by GitLab')
|
|
7
|
+
};
|
|
8
|
+
var script = {
|
|
9
|
+
name: 'ChatAgentItem',
|
|
10
|
+
components: {
|
|
11
|
+
GlIcon
|
|
12
|
+
},
|
|
13
|
+
directives: {
|
|
14
|
+
GlTooltip: GlTooltipDirective
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
agent: {
|
|
18
|
+
type: Object,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
i18n
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/* script */
|
|
26
|
+
const __vue_script__ = script;
|
|
27
|
+
|
|
28
|
+
/* template */
|
|
29
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"gl-flex gl-flex-col"},[_c('span',{staticClass:"gl-mb-1 gl-inline-block gl-text-lg gl-font-bold gl-text-strong"},[_vm._v("\n "+_vm._s(_vm.agent.name)+"\n "),(_vm.agent.foundational)?_c('gl-icon',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{"name":"tanuki-verified","variant":"subtle","title":_vm.$options.i18n.CHAT_VERIFIED_AGENT}}):_vm._e()],1),_vm._v(" "),_c('span',{staticClass:"gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-text-sm"},[_vm._v("\n "+_vm._s(_vm.agent.description)+"\n ")])])};
|
|
30
|
+
var __vue_staticRenderFns__ = [];
|
|
31
|
+
|
|
32
|
+
/* style */
|
|
33
|
+
const __vue_inject_styles__ = undefined;
|
|
34
|
+
/* scoped */
|
|
35
|
+
const __vue_scope_id__ = undefined;
|
|
36
|
+
/* module identifier */
|
|
37
|
+
const __vue_module_identifier__ = undefined;
|
|
38
|
+
/* functional template */
|
|
39
|
+
const __vue_is_functional_template__ = false;
|
|
40
|
+
/* style inject */
|
|
41
|
+
|
|
42
|
+
/* style inject SSR */
|
|
43
|
+
|
|
44
|
+
/* style inject shadow dom */
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
const __vue_component__ = __vue_normalize__(
|
|
49
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
50
|
+
__vue_inject_styles__,
|
|
51
|
+
__vue_script__,
|
|
52
|
+
__vue_scope_id__,
|
|
53
|
+
__vue_is_functional_template__,
|
|
54
|
+
__vue_module_identifier__,
|
|
55
|
+
false,
|
|
56
|
+
undefined,
|
|
57
|
+
undefined,
|
|
58
|
+
undefined
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export default __vue_component__;
|
|
62
|
+
export { i18n };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import { GlToast, GlAlert, GlAvatar, GlButton, GlDisclosureDropdown, GlSafeHtmlDirective, GlTooltipDirective } from '@gitlab/ui';
|
|
3
3
|
import { translate, sprintf } from '../../../../utils/i18n';
|
|
4
|
+
import DuoChatHeaderAgentItem from './duo_chat_header_agent_item/duo_chat_header_agent_item';
|
|
4
5
|
import { VIEW_TYPES } from './constants';
|
|
5
6
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
6
7
|
|
|
@@ -24,7 +25,8 @@ var script = {
|
|
|
24
25
|
GlAlert,
|
|
25
26
|
GlAvatar,
|
|
26
27
|
GlButton,
|
|
27
|
-
GlDisclosureDropdown
|
|
28
|
+
GlDisclosureDropdown,
|
|
29
|
+
DuoChatHeaderAgentItem
|
|
28
30
|
},
|
|
29
31
|
directives: {
|
|
30
32
|
SafeHtml: GlSafeHtmlDirective,
|
|
@@ -154,7 +156,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
154
156
|
_vm.isMultithreaded && (_vm.activeThreadId || _vm.currentView === _vm.VIEW_TYPES.LIST || _vm.hasManyAgents)
|
|
155
157
|
)?[(_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){
|
|
156
158
|
var item = ref.item;
|
|
157
|
-
return [_c('
|
|
159
|
+
return [_c('duo-chat-header-agent-item',{attrs:{"agent":item}})]}}],null,false,1406306174)}):_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.showStudioHeader && _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-disclosure-dropdown',{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip",value:(_vm.showSessionDropdownTooltip),expression:"showSessionDropdownTooltip"}],attrs:{"icon":"ellipsis_v","category":"tertiary","text-sr-only":"","size":"small","toggle-text":_vm.$options.i18n.CHAT_DROPDOWN_MORE_OPTIONS,"items":_vm.sessionIdItems,"no-caret":""},on:{"shown":_vm.showSessionDropdown,"hidden":_vm.hideSessionDropdown}}):_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)};
|
|
158
160
|
var __vue_staticRenderFns__ = [];
|
|
159
161
|
|
|
160
162
|
/* style */
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from '@gitlab/ui';
|
|
12
12
|
import { sprintf, translate } from '../../../../utils/i18n';
|
|
13
13
|
import { VIEW_TYPES } from './constants';
|
|
14
|
+
import DuoChatHeaderAgentItem from './duo_chat_header_agent_item/duo_chat_header_agent_item.vue';
|
|
14
15
|
|
|
15
16
|
export const i18n = {
|
|
16
17
|
CHAT_BACK_LABEL: translate('DuoChat.chatBackLabel', 'Back to history'),
|
|
@@ -42,6 +43,7 @@ export default {
|
|
|
42
43
|
GlButton,
|
|
43
44
|
GlExperimentBadge,
|
|
44
45
|
GlDisclosureDropdown,
|
|
46
|
+
DuoChatHeaderAgentItem,
|
|
45
47
|
},
|
|
46
48
|
directives: {
|
|
47
49
|
SafeHtml,
|
|
@@ -198,12 +200,7 @@ export default {
|
|
|
198
200
|
@action="startNewChat"
|
|
199
201
|
>
|
|
200
202
|
<template #list-item="{ item }">
|
|
201
|
-
<
|
|
202
|
-
<span clas="gl-block">{{ item.name }}</span>
|
|
203
|
-
<span class="gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-text-sm">{{
|
|
204
|
-
item.description
|
|
205
|
-
}}</span>
|
|
206
|
-
</span>
|
|
203
|
+
<duo-chat-header-agent-item :agent="item" />
|
|
207
204
|
</template>
|
|
208
205
|
</gl-disclosure-dropdown>
|
|
209
206
|
<gl-button
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
|
|
3
|
+
import { translate } from '@gitlab/ui/dist/utils/i18n';
|
|
4
|
+
|
|
5
|
+
export const i18n = {
|
|
6
|
+
CHAT_VERIFIED_AGENT: translate('DuoChat.verifiedAgent', 'Created and maintained by GitLab'),
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: 'ChatAgentItem',
|
|
11
|
+
components: {
|
|
12
|
+
GlIcon,
|
|
13
|
+
},
|
|
14
|
+
directives: {
|
|
15
|
+
GlTooltip: GlTooltipDirective,
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
agent: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
i18n,
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<span class="gl-flex gl-flex-col">
|
|
29
|
+
<span class="gl-mb-1 gl-inline-block gl-text-lg gl-font-bold gl-text-strong">
|
|
30
|
+
{{ agent.name }}
|
|
31
|
+
<gl-icon
|
|
32
|
+
v-if="agent.foundational"
|
|
33
|
+
v-gl-tooltip
|
|
34
|
+
name="tanuki-verified"
|
|
35
|
+
variant="subtle"
|
|
36
|
+
:title="$options.i18n.CHAT_VERIFIED_AGENT"
|
|
37
|
+
/>
|
|
38
|
+
</span>
|
|
39
|
+
<span class="gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-text-sm">
|
|
40
|
+
{{ agent.description }}
|
|
41
|
+
</span>
|
|
42
|
+
</span>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
A component that handles the header of the chat, including agent selection
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
GlDisclosureDropdown,
|
|
11
11
|
} from '@gitlab/ui';
|
|
12
12
|
import { sprintf, translate } from '../../../../utils/i18n';
|
|
13
|
+
import DuoChatHeaderAgentItem from './duo_chat_header_agent_item/duo_chat_header_agent_item.vue';
|
|
13
14
|
import { VIEW_TYPES } from './constants';
|
|
14
15
|
|
|
15
16
|
export const i18n = {
|
|
@@ -42,6 +43,7 @@ export default {
|
|
|
42
43
|
GlAvatar,
|
|
43
44
|
GlButton,
|
|
44
45
|
GlDisclosureDropdown,
|
|
46
|
+
DuoChatHeaderAgentItem,
|
|
45
47
|
},
|
|
46
48
|
directives: {
|
|
47
49
|
SafeHtml,
|
|
@@ -222,12 +224,7 @@ export default {
|
|
|
222
224
|
@action="startNewChat"
|
|
223
225
|
>
|
|
224
226
|
<template #list-item="{ item }">
|
|
225
|
-
<
|
|
226
|
-
<span class="gl-block">{{ item.name }}</span>
|
|
227
|
-
<span class="gl-overflow-hidden gl-text-ellipsis gl-whitespace-nowrap gl-text-sm">{{
|
|
228
|
-
item.description
|
|
229
|
-
}}</span>
|
|
230
|
-
</span>
|
|
227
|
+
<duo-chat-header-agent-item :agent="item" />
|
|
231
228
|
</template>
|
|
232
229
|
</gl-disclosure-dropdown>
|
|
233
230
|
<gl-button
|
package/translations.js
CHANGED
|
@@ -81,6 +81,7 @@ export default {
|
|
|
81
81
|
'DuoChat.emptyHistoryTitle': 'See your chat history',
|
|
82
82
|
'DuoChat.openChatLabel': 'Open chat: %{title}',
|
|
83
83
|
'DuoChat.threadDeleteLabel': 'Delete this chat',
|
|
84
|
+
'DuoChat.verifiedAgent': 'Created and maintained by GitLab',
|
|
84
85
|
'DuoChatContextItemDetailsModal.contentErrorMessage': 'Item content could not be displayed.',
|
|
85
86
|
'DuoChatContextItemDetailsModal.title': 'Preview',
|
|
86
87
|
'DuoChatContextItemMenu.emptyStateMessage': 'No results found',
|