@gitlab/duo-ui 13.4.0 → 13.5.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [13.5.1](https://gitlab.com/gitlab-org/duo-ui/compare/v13.5.0...v13.5.1) (2025-11-03)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **DuoChat:** Remove chat history button ([a9d1675](https://gitlab.com/gitlab-org/duo-ui/commit/a9d16755ea828601ac6a3e1e6bf7fa0863bdf54f))
7
+
8
+ # [13.5.0](https://gitlab.com/gitlab-org/duo-ui/compare/v13.4.0...v13.5.0) (2025-10-31)
9
+
10
+
11
+ ### Features
12
+
13
+ * **WebDuoChat:** add `shouldAutoFocusInput` prop to WebDuoChat ([213a673](https://gitlab.com/gitlab-org/duo-ui/commit/213a6730123511d15541e9841a92c0c7a736d8ca))
14
+
1
15
  # [13.4.0](https://gitlab.com/gitlab-org/duo-ui/compare/v13.3.0...v13.4.0) (2025-10-30)
2
16
 
3
17
 
@@ -6,11 +6,9 @@ import { VIEW_TYPES } from './constants';
6
6
  import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
7
7
 
8
8
  const i18n = {
9
- CHAT_BACK_LABEL: translate('WebDuoChat.chatBackLabel', 'Back to history'),
10
9
  CHAT_CLOSE_LABEL: translate('WebDuoChat.closeChatHeaderLabel', 'Close chat'),
11
10
  CHAT_NEW_LABEL: translate('WebDuoChat.chatNewLabel', 'New chat'),
12
11
  CHAT_NEW_TOOLTIP: translate('WebDuoChat.chatNewToolTip', 'New chat'),
13
- CHAT_HISTORY_TOOLTIP: translate('WebDuoChat.chatHistoryToolTip', 'Chat history'),
14
12
  CHAT_BACK_TO_CHAT_TOOLTIP: translate('WebDuoChat.chatBackToChatToolTip', 'Back to chat'),
15
13
  CHAT_TITLE: translate('WebDuoChat.chatTitle', 'GitLab Duo Chat'),
16
14
  CHAT_DROPDOWN_MORE_OPTIONS: translate('WebDuoChat.chatDropdownMoreOptions', 'More options'),
@@ -156,7 +154,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
156
154
  _vm.isMultithreaded && (_vm.activeThreadId || _vm.currentView === _vm.VIEW_TYPES.LIST || _vm.hasManyAgents)
157
155
  )?[(_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){
158
156
  var item = ref.item;
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)};
157
+ 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.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)};
160
158
  var __vue_staticRenderFns__ = [];
161
159
 
162
160
  /* style */
@@ -238,6 +238,11 @@ var script = {
238
238
  type: Boolean,
239
239
  required: false,
240
240
  default: false
241
+ },
242
+ shouldAutoFocusInput: {
243
+ type: Boolean,
244
+ required: false,
245
+ default: true
241
246
  }
242
247
  },
243
248
  data() {
@@ -634,7 +639,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
634
639
  'form-control',
635
640
  'gl-form-input',
636
641
  'gl-form-textarea',
637
- { 'gl-truncate': !_vm.prompt } ],"placeholder":_vm.inputPlaceholder,"character-count-limit":_vm.maxPromptLength,"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; }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; }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; }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; }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){
642
+ { 'gl-truncate': !_vm.prompt } ],"placeholder":_vm.inputPlaceholder,"character-count-limit":_vm.maxPromptLength,"autofocus":_vm.shouldAutoFocusInput},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; }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; }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; }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; }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){
638
643
  var count = ref.count;
639
644
  return [(count <= _vm.promptLengthWarningCount)?_c('span',{staticClass:"gl-absolute gl-bottom-0 gl-bottom-[-1.6rem] gl-right-0 gl-pr-3 gl-text-sm",class:{
640
645
  'gl-bottom-[-5rem]': _vm.hasFooterControls,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/duo-ui",
3
- "version": "13.4.0",
3
+ "version": "13.5.1",
4
4
  "description": "Duo UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -102,8 +102,8 @@
102
102
  "@gitlab/eslint-plugin": "21.2.1",
103
103
  "@gitlab/fonts": "^1.3.1",
104
104
  "@gitlab/stylelint-config": "6.2.2",
105
- "@gitlab/svgs": "^3.149.0",
106
- "@gitlab/ui": "^123.11.2",
105
+ "@gitlab/svgs": "^3.150.0",
106
+ "@gitlab/ui": "^123.12.0",
107
107
  "@jest/test-sequencer": "^29.7.0",
108
108
  "@rollup/plugin-commonjs": "^11.1.0",
109
109
  "@rollup/plugin-node-resolve": "^7.1.3",
@@ -14,11 +14,9 @@ import DuoChatHeaderAgentItem from './duo_chat_header_agent_item/duo_chat_header
14
14
  import { VIEW_TYPES } from './constants';
15
15
 
16
16
  export const i18n = {
17
- CHAT_BACK_LABEL: translate('WebDuoChat.chatBackLabel', 'Back to history'),
18
17
  CHAT_CLOSE_LABEL: translate('WebDuoChat.closeChatHeaderLabel', 'Close chat'),
19
18
  CHAT_NEW_LABEL: translate('WebDuoChat.chatNewLabel', 'New chat'),
20
19
  CHAT_NEW_TOOLTIP: translate('WebDuoChat.chatNewToolTip', 'New chat'),
21
- CHAT_HISTORY_TOOLTIP: translate('WebDuoChat.chatHistoryToolTip', 'Chat history'),
22
20
  CHAT_BACK_TO_CHAT_TOOLTIP: translate('WebDuoChat.chatBackToChatToolTip', 'Back to chat'),
23
21
  CHAT_TITLE: translate('WebDuoChat.chatTitle', 'GitLab Duo Chat'),
24
22
  CHAT_DROPDOWN_MORE_OPTIONS: translate('WebDuoChat.chatDropdownMoreOptions', 'More options'),
@@ -240,17 +238,6 @@ export default {
240
238
  @click="startNewChat"
241
239
  />
242
240
  </template>
243
- <gl-button
244
- v-if="!showStudioHeader && isMultithreaded && currentView === VIEW_TYPES.CHAT"
245
- v-gl-tooltip
246
- :title="$options.i18n.CHAT_HISTORY_TOOLTIP"
247
- data-testid="go-back-to-list-button"
248
- category="tertiary"
249
- size="small"
250
- icon="history"
251
- :aria-label="$options.i18n.CHAT_BACK_LABEL"
252
- @click="$emit('go-back')"
253
- />
254
241
  <gl-button
255
242
  v-if="isMultithreaded && activeThreadId && currentView === VIEW_TYPES.LIST"
256
243
  v-gl-tooltip
@@ -296,6 +296,11 @@ export default {
296
296
  required: false,
297
297
  default: false,
298
298
  },
299
+ shouldAutoFocusInput: {
300
+ type: Boolean,
301
+ required: false,
302
+ default: true,
303
+ },
299
304
  },
300
305
  data() {
301
306
  return {
@@ -865,7 +870,7 @@ export default {
865
870
  ]"
866
871
  :placeholder="inputPlaceholder"
867
872
  :character-count-limit="maxPromptLength"
868
- autofocus
873
+ :autofocus="shouldAutoFocusInput"
869
874
  @keydown.enter.exact.native.prevent
870
875
  @keydown.ctrl.z.exact="handleUndo"
871
876
  @keydown.meta.z.exact="handleUndo"
package/translations.js CHANGED
@@ -196,7 +196,6 @@ export default {
196
196
  'WebAgenticDuoChat.chatSubmitLabel': 'Send chat message.',
197
197
  'WebAgenticDuoChat.overLimitCharacterCountMessage': null,
198
198
  'WebAgenticDuoChat.remainingCharacterCountMessage': null,
199
- 'WebDuoChat.chatBackLabel': 'Back to history',
200
199
  'WebDuoChat.chatBackToChatToolTip': 'Back to chat',
201
200
  'WebDuoChat.chatCancelLabel': 'Cancel',
202
201
  'WebDuoChat.chatDefaultPredefinedPromptsChangePassword': 'How do I change my password in GitLab?',
@@ -209,7 +208,6 @@ export default {
209
208
  'WebDuoChat.chatEmptyStateTitle':
210
209
  '👋 I am GitLab Duo Chat, your personal AI-powered assistant. How can I help you today?',
211
210
  'WebDuoChat.chatHistoryTitle': 'Chat history',
212
- 'WebDuoChat.chatHistoryToolTip': 'Chat history',
213
211
  'WebDuoChat.chatModelPlaceholder': 'GitLab Duo Chat',
214
212
  'WebDuoChat.chatNewLabel': 'New chat',
215
213
  'WebDuoChat.chatNewToolTip': 'New chat',