@gitlab/duo-ui 13.5.2 ā 13.5.3
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 +9 -0
- package/dist/components/chat/components/duo_chat_message_tool_approval/components/create_commit_tool_params.js +23 -25
- package/dist/components/chat/components/duo_chat_message_tool_approval/components/issuable_tool_params.js +3 -3
- package/dist/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.js +1 -1
- package/dist/components/chat/mock_data.js +18 -3
- package/package.json +1 -1
- package/src/components/chat/components/duo_chat_message_tool_approval/components/create_commit_tool_params.vue +31 -33
- package/src/components/chat/components/duo_chat_message_tool_approval/components/issuable_tool_params.vue +3 -2
- package/src/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.vue +3 -1
- package/src/components/chat/mock_data.js +19 -2
- package/translations.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [13.5.3](https://gitlab.com/gitlab-org/duo-ui/compare/v13.5.2...v13.5.3) (2025-11-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fix display create_commit tool params bug ([408116e](https://gitlab.com/gitlab-org/duo-ui/commit/408116efb7cce89b2f3acee9341eb99d14ec7468))
|
|
7
|
+
* Fix run command tool param overflow ([fc77e4a](https://gitlab.com/gitlab-org/duo-ui/commit/fc77e4ae0a5dd52de028f42cf7977491cb934a3d))
|
|
8
|
+
* Fix work item note rendering ([4a0f2f2](https://gitlab.com/gitlab-org/duo-ui/commit/4a0f2f2d2ed7a5eb7e2fff2042405ef6ee820fa5))
|
|
9
|
+
|
|
1
10
|
## [13.5.2](https://gitlab.com/gitlab-org/duo-ui/compare/v13.5.1...v13.5.2) (2025-11-03)
|
|
2
11
|
|
|
3
12
|
|
|
@@ -14,41 +14,39 @@ var script = {
|
|
|
14
14
|
PreBlock
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
|
-
|
|
18
|
-
type:
|
|
17
|
+
toolParams: {
|
|
18
|
+
type: Object,
|
|
19
19
|
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
computed: {
|
|
23
|
+
project() {
|
|
24
|
+
var _this$toolParams, _this$toolParams2;
|
|
25
|
+
return ((_this$toolParams = this.toolParams) === null || _this$toolParams === void 0 ? void 0 : _this$toolParams.projectPath) || ((_this$toolParams2 = this.toolParams) === null || _this$toolParams2 === void 0 ? void 0 : _this$toolParams2.projectId) || '';
|
|
20
26
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
default: ''
|
|
27
|
+
branch() {
|
|
28
|
+
var _this$toolParams3;
|
|
29
|
+
return (_this$toolParams3 = this.toolParams) === null || _this$toolParams3 === void 0 ? void 0 : _this$toolParams3.branch;
|
|
25
30
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
startBranch() {
|
|
32
|
+
var _this$toolParams4;
|
|
33
|
+
return ((_this$toolParams4 = this.toolParams) === null || _this$toolParams4 === void 0 ? void 0 : _this$toolParams4.startBranch) || '';
|
|
29
34
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
default: ''
|
|
35
|
+
commitMessage() {
|
|
36
|
+
var _this$toolParams5;
|
|
37
|
+
return (_this$toolParams5 = this.toolParams) === null || _this$toolParams5 === void 0 ? void 0 : _this$toolParams5.commitMessage;
|
|
34
38
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
actions() {
|
|
40
|
+
var _this$toolParams6;
|
|
41
|
+
return ((_this$toolParams6 = this.toolParams) === null || _this$toolParams6 === void 0 ? void 0 : _this$toolParams6.actions) || [];
|
|
38
42
|
},
|
|
39
|
-
actions: {
|
|
40
|
-
type: Array,
|
|
41
|
-
required: true
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
computed: {
|
|
45
43
|
actionsCount() {
|
|
46
44
|
return this.actions.length;
|
|
47
45
|
},
|
|
48
46
|
actionsCountMessage() {
|
|
49
|
-
return sprintf(translatePlural('CreateCommitToolParams.actionsCountMessage', 'The commit contains %{count} file change.', 'The commit contains %{count} file changes.')(this.actionsCount), {
|
|
47
|
+
return this.actionsCount ? sprintf(translatePlural('CreateCommitToolParams.actionsCountMessage', 'The commit contains %{count} file change.', 'The commit contains %{count} file changes.')(this.actionsCount), {
|
|
50
48
|
count: this.actionsCount
|
|
51
|
-
});
|
|
49
|
+
}) : translate('CreateCommitToolParams.noActionsMessage', 'The commit does not contain changes.');
|
|
52
50
|
}
|
|
53
51
|
},
|
|
54
52
|
methods: {
|
|
@@ -131,7 +129,7 @@ const __vue_script__ = script;
|
|
|
131
129
|
/* template */
|
|
132
130
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-flex gl-flex-col"},[_c('div',[_c('gl-sprintf',{attrs:{"message":_vm.branch
|
|
133
131
|
? _vm.$options.i18n.COMMIT_SUMMARY_MESSAGE
|
|
134
|
-
: _vm.$options.i18n.COMMIT_SUMMARY_AUTO_BRANCH_MESSAGE},scopedSlots:_vm._u([{key:"project",fn:function(){return [_c('code',[_vm._v(_vm._s(_vm.
|
|
132
|
+
: _vm.$options.i18n.COMMIT_SUMMARY_AUTO_BRANCH_MESSAGE},scopedSlots:_vm._u([{key:"project",fn:function(){return [_c('code',[_vm._v(_vm._s(_vm.project))])]},proxy:true},(_vm.branch)?{key:"branch",fn:function(){return [_c('code',[_vm._v(_vm._s(_vm.branch))])]},proxy:true}:null],null,true)}),_vm._v("\n "+_vm._s(_vm.actionsCountMessage)+"\n ")],1),_vm._v(" "),_c('gl-accordion',{staticClass:"-gl-ml-2 gl-mt-3",attrs:{"header-level":3}},[_c('gl-accordion-item',{attrs:{"title":_vm.$options.i18n.READ_COMMIT_MESSAGE}},[_c('pre-block',[_vm._v(_vm._s(_vm.commitMessage))])],1),_vm._v(" "),(_vm.actionsCount)?_c('gl-accordion-item',{attrs:{"title":_vm.$options.i18n.EXPAND_CHANGES}},[_c('gl-accordion',{attrs:{"header-level":4}},_vm._l((_vm.actions),function(action,index){return _c('gl-accordion-item',{key:index,attrs:{"title":_vm.getActionTitle(action)}},[_c('pre-block',[_vm._v(_vm._s(_vm.getActionContent(action)))])],1)}),1)],1):_vm._e()],1)],1)};
|
|
135
133
|
var __vue_staticRenderFns__ = [];
|
|
136
134
|
|
|
137
135
|
/* style */
|
|
@@ -3,7 +3,7 @@ import { APPROVAL_TOOL_NAMES } from '../../../constants';
|
|
|
3
3
|
import BaseToolParams from './base_tool_params';
|
|
4
4
|
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';
|
|
5
5
|
|
|
6
|
-
const NOTE_MESSAGE = translate('IssuableToolParams.NOTE_MESSAGE', 'Post a note on %{noteParentLabel} <code>%{noteParentIid}</code
|
|
6
|
+
const NOTE_MESSAGE = translate('IssuableToolParams.NOTE_MESSAGE', 'Post a note on %{noteParentLabel} <code>%{noteParentIid}</code>.');
|
|
7
7
|
var script = {
|
|
8
8
|
name: 'IssuableToolParams',
|
|
9
9
|
components: {
|
|
@@ -64,8 +64,8 @@ var script = {
|
|
|
64
64
|
return ((_this$toolParams10 = this.toolParams) === null || _this$toolParams10 === void 0 ? void 0 : _this$toolParams10.url) || ((_this$toolParams11 = this.toolParams) === null || _this$toolParams11 === void 0 ? void 0 : _this$toolParams11.groupId) || ((_this$toolParams12 = this.toolParams) === null || _this$toolParams12 === void 0 ? void 0 : _this$toolParams12.projectId);
|
|
65
65
|
},
|
|
66
66
|
noteParentIid() {
|
|
67
|
-
var _this$toolParams13, _this$toolParams14, _this$toolParams15;
|
|
68
|
-
return ((_this$toolParams13 = this.toolParams) === null || _this$toolParams13 === void 0 ? void 0 : _this$toolParams13.issueIid) || ((_this$toolParams14 = this.toolParams) === null || _this$toolParams14 === void 0 ? void 0 : _this$toolParams14.mergeRequestIid) || ((_this$toolParams15 = this.toolParams) === null || _this$toolParams15 === void 0 ? void 0 : _this$toolParams15.workItemIid);
|
|
67
|
+
var _this$toolParams13, _this$toolParams14, _this$toolParams15, _this$toolParams16;
|
|
68
|
+
return ((_this$toolParams13 = this.toolParams) === null || _this$toolParams13 === void 0 ? void 0 : _this$toolParams13.issueIid) || ((_this$toolParams14 = this.toolParams) === null || _this$toolParams14 === void 0 ? void 0 : _this$toolParams14.mergeRequestIid) || ((_this$toolParams15 = this.toolParams) === null || _this$toolParams15 === void 0 ? void 0 : _this$toolParams15.workItemIid) || ((_this$toolParams16 = this.toolParams) === null || _this$toolParams16 === void 0 ? void 0 : _this$toolParams16.url);
|
|
69
69
|
},
|
|
70
70
|
noteParentLabel() {
|
|
71
71
|
switch (this.toolName) {
|
|
@@ -67,7 +67,7 @@ var script = {
|
|
|
67
67
|
const __vue_script__ = script;
|
|
68
68
|
|
|
69
69
|
/* template */
|
|
70
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('base-tool-params',{attrs:{"description":_vm.commandOutput,"custom-accordion-title":_vm.$options.i18n.SEE_COMMAND_OUTPUT}},[_c('div',{staticClass:"gl-flex gl-items-center gl-gap-3"},[_c('gl-icon',{staticClass:"gl-shrink-0",attrs:{"name":"terminal"}}),_vm._v(" "),_c('code',{staticClass:"gl-whitespace-pre-wrap gl-break-words"},[_vm._v(_vm._s(_vm.withWorkingDirectory))])],1)])};
|
|
70
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('base-tool-params',{attrs:{"description":_vm.commandOutput,"custom-accordion-title":_vm.$options.i18n.SEE_COMMAND_OUTPUT}},[_c('div',{staticClass:"gl-flex gl-items-center gl-gap-3"},[_c('gl-icon',{staticClass:"gl-shrink-0",attrs:{"name":"terminal"}}),_vm._v(" "),_c('code',{staticClass:"gl-whitespace-pre-wrap gl-break-words gl-break-all"},[_vm._v(_vm._s(_vm.withWorkingDirectory))])],1)])};
|
|
71
71
|
var __vue_staticRenderFns__ = [];
|
|
72
72
|
|
|
73
73
|
/* style */
|
|
@@ -172,7 +172,7 @@ const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_COMMAND = {
|
|
|
172
172
|
name: 'run_command',
|
|
173
173
|
args: {
|
|
174
174
|
program: 'ls',
|
|
175
|
-
args: '-a | grep
|
|
175
|
+
args: '-a | grep src/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.spec.js'
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
timestamp: '2025-06-25T19:22:21.290791+00:00',
|
|
@@ -344,6 +344,21 @@ const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_AUTO_BRANCH = {
|
|
|
344
344
|
status: 'success',
|
|
345
345
|
role: 'request'
|
|
346
346
|
};
|
|
347
|
+
const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_MESSAGE_ONLY = {
|
|
348
|
+
id: '126',
|
|
349
|
+
content: 'Tool create_commit requires approval. Please confirm if you want to proceed.',
|
|
350
|
+
message_type: MESSAGE_MODEL_ROLES.request,
|
|
351
|
+
tool_info: {
|
|
352
|
+
name: 'create_commit',
|
|
353
|
+
args: {
|
|
354
|
+
project_id: 35104827,
|
|
355
|
+
commit_message: 'feat: add web-ide-duo-chat package with TypeScript setup\n\n- Create new package @gitlab/web-ide-duo-chat\n- Set up TypeScript configuration following project patterns\n- Add src directory with index.ts entry point\n- Configure package.json with workspace dependencies\n- Add package reference to root tsconfig.json'
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
timestamp: '2025-06-25T19:22:21.290791+00:00',
|
|
359
|
+
status: 'success',
|
|
360
|
+
role: 'request'
|
|
361
|
+
};
|
|
347
362
|
const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM = {
|
|
348
363
|
id: '127',
|
|
349
364
|
content: 'Tool create_work_item requires approval. Please confirm if you want to proceed.',
|
|
@@ -405,7 +420,7 @@ const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM_NOTE = {
|
|
|
405
420
|
name: 'create_work_item_note',
|
|
406
421
|
args: {
|
|
407
422
|
project_id: 'gitlab-org/duo-ui',
|
|
408
|
-
|
|
423
|
+
url: 'https://gitlab.com/gitlab-org/duo-ui/-/issues/12',
|
|
409
424
|
body: "I've started working on this work item and made good progress on the initial implementation.\n\n## Progress Update\n\nā
**Completed:**\n- Added toggle button component\n- Implemented basic theme switching logic\n- Created CSS variables for dark mode\n\nš **In Progress:**\n- Testing theme persistence across sessions\n- Ensuring all components support both themes\n\nš **Next Steps:**\n- Update remaining UI components\n- Add accessibility improvements\n- Write comprehensive tests\n\nExpected completion by end of week. Will update with any blockers."
|
|
410
425
|
}
|
|
411
426
|
},
|
|
@@ -741,4 +756,4 @@ const AGENTIC_THREADLIST = [{
|
|
|
741
756
|
}
|
|
742
757
|
}];
|
|
743
758
|
|
|
744
|
-
export { AGENTIC_THREADLIST, INCLUDE_SLASH_COMMAND, MOCK_AGENT_MESSAGE, MOCK_REQUEST_MESSAGE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_AUTO_BRANCH, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_OLD_NEW_CONTENT, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_EPIC, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_ISSUE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_ISSUE_NOTE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_MERGE_REQUEST, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_MERGE_REQUEST_NOTE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM_NOTE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_PARAMS, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_COMMAND, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_COMMAND_WITH_RESPONSE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_GIT_COMMAND, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_UPDATE_ISSUE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_UPDATE_WORK_ITEM, MOCK_RESPONSE_MESSAGE, MOCK_RESPONSE_MESSAGE_FOR_STREAMING, MOCK_TOOL_MESSAGE, MOCK_TOOL_MESSAGE_WITH_LINK, MOCK_USER_PROMPT_MESSAGE, MOCK_WORKFLOW_END_MESSAGE, SLASH_COMMANDS, THREADLIST, generateMockResponseChunks, generateSeparateChunks, renderGFM, renderMarkdown };
|
|
759
|
+
export { AGENTIC_THREADLIST, INCLUDE_SLASH_COMMAND, MOCK_AGENT_MESSAGE, MOCK_REQUEST_MESSAGE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_AUTO_BRANCH, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_MESSAGE_ONLY, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_OLD_NEW_CONTENT, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_EPIC, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_ISSUE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_ISSUE_NOTE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_MERGE_REQUEST, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_MERGE_REQUEST_NOTE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM_NOTE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_PARAMS, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_COMMAND, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_COMMAND_WITH_RESPONSE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_GIT_COMMAND, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_UPDATE_ISSUE, MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_UPDATE_WORK_ITEM, MOCK_RESPONSE_MESSAGE, MOCK_RESPONSE_MESSAGE_FOR_STREAMING, MOCK_TOOL_MESSAGE, MOCK_TOOL_MESSAGE_WITH_LINK, MOCK_USER_PROMPT_MESSAGE, MOCK_WORKFLOW_END_MESSAGE, SLASH_COMMANDS, THREADLIST, generateMockResponseChunks, generateSeparateChunks, renderGFM, renderMarkdown };
|
package/package.json
CHANGED
|
@@ -15,48 +15,46 @@ export default {
|
|
|
15
15
|
PreBlock,
|
|
16
16
|
},
|
|
17
17
|
props: {
|
|
18
|
-
|
|
19
|
-
type:
|
|
18
|
+
toolParams: {
|
|
19
|
+
type: Object,
|
|
20
20
|
required: true,
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
project() {
|
|
25
|
+
return this.toolParams?.projectPath || this.toolParams?.projectId || '';
|
|
26
26
|
},
|
|
27
|
-
branch
|
|
28
|
-
|
|
29
|
-
required: true,
|
|
27
|
+
branch() {
|
|
28
|
+
return this.toolParams?.branch;
|
|
30
29
|
},
|
|
31
|
-
startBranch
|
|
32
|
-
|
|
33
|
-
required: false,
|
|
34
|
-
default: '',
|
|
30
|
+
startBranch() {
|
|
31
|
+
return this.toolParams?.startBranch || '';
|
|
35
32
|
},
|
|
36
|
-
commitMessage
|
|
37
|
-
|
|
38
|
-
required: true,
|
|
33
|
+
commitMessage() {
|
|
34
|
+
return this.toolParams?.commitMessage;
|
|
39
35
|
},
|
|
40
|
-
actions
|
|
41
|
-
|
|
42
|
-
required: true,
|
|
36
|
+
actions() {
|
|
37
|
+
return this.toolParams?.actions || [];
|
|
43
38
|
},
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
39
|
actionsCount() {
|
|
47
40
|
return this.actions.length;
|
|
48
41
|
},
|
|
49
42
|
actionsCountMessage() {
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
return this.actionsCount
|
|
44
|
+
? sprintf(
|
|
45
|
+
translatePlural(
|
|
46
|
+
'CreateCommitToolParams.actionsCountMessage',
|
|
47
|
+
'The commit contains %{count} file change.',
|
|
48
|
+
'The commit contains %{count} file changes.'
|
|
49
|
+
)(this.actionsCount),
|
|
50
|
+
{
|
|
51
|
+
count: this.actionsCount,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
: translate(
|
|
55
|
+
'CreateCommitToolParams.noActionsMessage',
|
|
56
|
+
'The commit does not contain changes.'
|
|
57
|
+
);
|
|
60
58
|
},
|
|
61
59
|
},
|
|
62
60
|
methods: {
|
|
@@ -163,7 +161,7 @@ export default {
|
|
|
163
161
|
"
|
|
164
162
|
>
|
|
165
163
|
<template #project>
|
|
166
|
-
<code>{{
|
|
164
|
+
<code>{{ project }}</code>
|
|
167
165
|
</template>
|
|
168
166
|
<template v-if="branch" #branch>
|
|
169
167
|
<code>{{ branch }}</code>
|
|
@@ -175,7 +173,7 @@ export default {
|
|
|
175
173
|
<gl-accordion-item :title="$options.i18n.READ_COMMIT_MESSAGE">
|
|
176
174
|
<pre-block>{{ commitMessage }}</pre-block>
|
|
177
175
|
</gl-accordion-item>
|
|
178
|
-
<gl-accordion-item :title="$options.i18n.EXPAND_CHANGES">
|
|
176
|
+
<gl-accordion-item v-if="actionsCount" :title="$options.i18n.EXPAND_CHANGES">
|
|
179
177
|
<gl-accordion :header-level="4">
|
|
180
178
|
<gl-accordion-item
|
|
181
179
|
v-for="(action, index) in actions"
|
|
@@ -5,7 +5,7 @@ import BaseToolParams from './base_tool_params.vue';
|
|
|
5
5
|
|
|
6
6
|
const NOTE_MESSAGE = translate(
|
|
7
7
|
'IssuableToolParams.NOTE_MESSAGE',
|
|
8
|
-
'Post a note on %{noteParentLabel} <code>%{noteParentIid}</code
|
|
8
|
+
'Post a note on %{noteParentLabel} <code>%{noteParentIid}</code>.'
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
export default {
|
|
@@ -64,7 +64,8 @@ export default {
|
|
|
64
64
|
return (
|
|
65
65
|
this.toolParams?.issueIid ||
|
|
66
66
|
this.toolParams?.mergeRequestIid ||
|
|
67
|
-
this.toolParams?.workItemIid
|
|
67
|
+
this.toolParams?.workItemIid ||
|
|
68
|
+
this.toolParams?.url
|
|
68
69
|
);
|
|
69
70
|
},
|
|
70
71
|
noteParentLabel() {
|
|
@@ -70,7 +70,9 @@ export default {
|
|
|
70
70
|
>
|
|
71
71
|
<div class="gl-flex gl-items-center gl-gap-3">
|
|
72
72
|
<gl-icon class="gl-shrink-0" name="terminal" />
|
|
73
|
-
<code class="gl-whitespace-pre-wrap gl-break-words">{{
|
|
73
|
+
<code class="gl-whitespace-pre-wrap gl-break-words gl-break-all">{{
|
|
74
|
+
withWorkingDirectory
|
|
75
|
+
}}</code>
|
|
74
76
|
</div>
|
|
75
77
|
</base-tool-params>
|
|
76
78
|
</template>
|
|
@@ -197,7 +197,7 @@ export const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_RUN_COMMAND = {
|
|
|
197
197
|
name: 'run_command',
|
|
198
198
|
args: {
|
|
199
199
|
program: 'ls',
|
|
200
|
-
args: '-a | grep
|
|
200
|
+
args: '-a | grep src/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.spec.js',
|
|
201
201
|
},
|
|
202
202
|
},
|
|
203
203
|
timestamp: '2025-06-25T19:22:21.290791+00:00',
|
|
@@ -391,6 +391,23 @@ export const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_AUTO_BRANCH =
|
|
|
391
391
|
role: 'request',
|
|
392
392
|
};
|
|
393
393
|
|
|
394
|
+
export const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_COMMIT_MESSAGE_ONLY = {
|
|
395
|
+
id: '126',
|
|
396
|
+
content: 'Tool create_commit requires approval. Please confirm if you want to proceed.',
|
|
397
|
+
message_type: MESSAGE_MODEL_ROLES.request,
|
|
398
|
+
tool_info: {
|
|
399
|
+
name: 'create_commit',
|
|
400
|
+
args: {
|
|
401
|
+
project_id: 35104827,
|
|
402
|
+
commit_message:
|
|
403
|
+
'feat: add web-ide-duo-chat package with TypeScript setup\n\n- Create new package @gitlab/web-ide-duo-chat\n- Set up TypeScript configuration following project patterns\n- Add src directory with index.ts entry point\n- Configure package.json with workspace dependencies\n- Add package reference to root tsconfig.json',
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
timestamp: '2025-06-25T19:22:21.290791+00:00',
|
|
407
|
+
status: 'success',
|
|
408
|
+
role: 'request',
|
|
409
|
+
};
|
|
410
|
+
|
|
394
411
|
export const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM = {
|
|
395
412
|
id: '127',
|
|
396
413
|
content: 'Tool create_work_item requires approval. Please confirm if you want to proceed.',
|
|
@@ -457,7 +474,7 @@ export const MOCK_REQUEST_MESSAGE_WITH_TOOL_APPROVAL_CREATE_WORK_ITEM_NOTE = {
|
|
|
457
474
|
name: 'create_work_item_note',
|
|
458
475
|
args: {
|
|
459
476
|
project_id: 'gitlab-org/duo-ui',
|
|
460
|
-
|
|
477
|
+
url: 'https://gitlab.com/gitlab-org/duo-ui/-/issues/12',
|
|
461
478
|
body: "I've started working on this work item and made good progress on the initial implementation.\n\n## Progress Update\n\nā
**Completed:**\n- Added toggle button component\n- Implemented basic theme switching logic\n- Created CSS variables for dark mode\n\nš **In Progress:**\n- Testing theme persistence across sessions\n- Ensuring all components support both themes\n\nš **Next Steps:**\n- Update remaining UI components\n- Add accessibility improvements\n- Write comprehensive tests\n\nExpected completion by end of week. Will update with any blockers.",
|
|
462
479
|
},
|
|
463
480
|
},
|
package/translations.js
CHANGED
|
@@ -47,6 +47,7 @@ export default {
|
|
|
47
47
|
'CreateCommitToolParams.deleteFileActionLabel': 'Delete file %{filePath}',
|
|
48
48
|
'CreateCommitToolParams.expandFileChanges': 'Expand file changes',
|
|
49
49
|
'CreateCommitToolParams.moveFileActionLabel': 'Move file %{filePath}',
|
|
50
|
+
'CreateCommitToolParams.noActionsMessage': 'The commit does not contain changes.',
|
|
50
51
|
'CreateCommitToolParams.readCommitMessage': 'Read commit message',
|
|
51
52
|
'CreateCommitToolParams.unknownFileActionLabel': 'Modify file %{filePath}',
|
|
52
53
|
'CreateCommitToolParams.updateFileActionLabel': 'Update file %{filePath}',
|
|
@@ -134,7 +135,7 @@ export default {
|
|
|
134
135
|
'IssuableToolParams.MERGE_REQUEST_LABEL': 'merge request',
|
|
135
136
|
'IssuableToolParams.NOTE_ACCORDION_TITLE': "Read note's content",
|
|
136
137
|
'IssuableToolParams.NOTE_MESSAGE':
|
|
137
|
-
'Post a note on %{noteParentLabel} <code>%{noteParentIid}</code
|
|
138
|
+
'Post a note on %{noteParentLabel} <code>%{noteParentIid}</code>.',
|
|
138
139
|
'IssuableToolParams.TITLE_MESSAGE': 'Set the title "<em>%{title}</em>".',
|
|
139
140
|
'IssuableToolParams.UPDATE_EPIC':
|
|
140
141
|
'Update epic <code>%{epicId}</code> in group <code>%{groupId}</code>.',
|