@glodon-aiot/agent-cli-ui 3.10.0-alpha.14 → 3.10.0-alpha.15
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/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style14.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style16.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style18.css +1 -1
- package/dist/es/src/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style24.css +1 -1
- package/dist/es/src/style25.css +1 -1
- package/dist/es/src/style27.css +1 -1
- package/dist/es/src/style28.css +1 -1
- package/dist/es/src/style29.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style31.css +1 -1
- package/dist/es/src/style32.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/es/src/style7.css +1 -1
- package/dist/es/src/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "@glodon-aiot/agent-cli-ui", t = "3.10.0-alpha.
|
|
1
|
+
const e = "@glodon-aiot/agent-cli-ui", t = "3.10.0-alpha.15", s = "./dist/es/index.mjs", i = "./dist/lib/index.js", o = "./dist/src/index.d.ts", n = {
|
|
2
2
|
import: "./dist/es/index.mjs",
|
|
3
3
|
require: "./dist/lib/index.js",
|
|
4
4
|
types: "./dist/src/index.d.ts"
|
|
@@ -25,8 +25,8 @@ const e = "@glodon-aiot/agent-cli-ui", t = "3.10.0-alpha.14", s = "./dist/es/ind
|
|
|
25
25
|
webpack: "*"
|
|
26
26
|
}, p = {
|
|
27
27
|
"@ant-design/icons": "^5.3.4",
|
|
28
|
-
"@glodon-aiot/apis": "^3.10.0-alpha.
|
|
29
|
-
"@glodon-aiot/bot-client-sdk": "^3.10.0-alpha.
|
|
28
|
+
"@glodon-aiot/apis": "^3.10.0-alpha.15",
|
|
29
|
+
"@glodon-aiot/bot-client-sdk": "^3.10.0-alpha.15",
|
|
30
30
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
31
31
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
32
32
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|
package/dist/es/src/style11.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .input-files{margin-bottom:8px;display:flex;gap:4px;width:100%;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap}.gbot-dialog-modal .file-preview{width:auto;border-radius:4px;border:1px solid #e8e9eb;background:#ffffff;position:relative;display:inline-block;max-height:80px;flex:0 0 auto}.gbot-dialog-modal .file-preview .file-icon{height:100%;width:48px}.gbot-dialog-modal .file-preview.thumb-40{display:flex;align-items:center;justify-content:center;width:40px;height:40px;max-height:40px;overflow:hidden}.gbot-dialog-modal .file-preview.thumb-40 .file-icon{width:100%;height:100%}.gbot-dialog-modal .file-preview.thumb-40 .file-icon .ant-image-img{width:100%;height:100%;object-fit:cover;display:block}.gbot-dialog-modal .file-preview.small{height:30px;width:150px;padding:3px 6px 3px 3px}.gbot-dialog-modal .file-preview.small .file-icon{width:24px}.gbot-dialog-modal .file-preview .file-desc{flex:1;overflow:hidden}.gbot-dialog-modal .file-preview .file-desc .file-desc-name{color:#5c5f66;font-size:12px;font-style:normal;font-weight:700;line-height:150%;margin-bottom:4px}.gbot-dialog-modal .file-preview .file-action{position:absolute;right:0;top:0}.gbot-dialog-modal .file-preview .file-process{background-color:#f7f7f9;border-radius:4px;width:10px;height:10px;line-height:10px;text-align:center;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-preview .file-remove{display:inline-block;border-radius:4px;width:14px;height:14px;line-height:14px;text-align:center;color:#84868c;border:1px solid #e8e9eb;display:inline-flex;align-items:center;justify-content:center;background-color:#f7f7f9}.gbot-dialog-modal .file-preview .file-remove:hover{background-color:#fff;color:#b452ff}.gbot-dialog-modal .file-remove-tooltip .gbot-tooltip-content .gbot-tooltip-inner{padding:12px}
|
package/dist/es/src/style12.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal.inlay .questions,.gbot-dialog-modal.float .questions{width:100%}.gbot-dialog-modal .questions .question-tip{display:flex;align-items:center;margin-bottom:10px;height:24px;color:#84868c}.gbot-dialog-modal .questions .question-tip img{width:24px;height:24px}.gbot-dialog-modal .questions .question-row{max-height:260px;overflow-y:auto}.gbot-dialog-modal .questions .question-pannel{background:white;padding:12px;border-radius:8px;width:100%;cursor:pointer;border:1px solid transparent}.gbot-dialog-modal .questions .question-pannel .question-top{font-size:16px;height:32px;color:#070c14;font-weight:700;display:flex;width:100%}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-tip{flex:0 0 24px;margin-right:8px}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-title{flex:0 0 1;overflow:hidden;display:flex;align-items:center}.gbot-dialog-modal .questions .question-pannel .question-top .question-top-type{margin-left:8px;flex:0 0 24px}.gbot-dialog-modal .questions .question-pannel .question-top .question-only-plus-file{margin-left:0}.gbot-dialog-modal .questions .question-pannel .question-top img{width:24px}.gbot-dialog-modal .questions .question-pannel .not-have-top{display:none}.gbot-dialog-modal .questions .question-pannel .question-bottom{font-size:14px;color:#070c14;line-height:21px}.gbot-dialog-modal .questions .question-pannel .multiline-question{height:56px;margin-top:-7px}.gbot-dialog-modal .questions .question-pannel__active{border:1px solid #b452ff;transition:all .25s}.gbot-dialog-modal .questions .multiline-question-pannel{padding:16px 12px}.gbot-dialog-modal .recommend-tooltip-overlay .gbot-tooltip-inner{max-width:400px;max-height:300px;overflow-y:auto}
|
package/dist/es/src/style13.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .history-item{margin-bottom:16px}.gbot-dialog-modal .history-item .history-item-user{width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-panel{display:flex;justify-content:flex-end}.gbot-dialog-modal .history-item .history-item-user .item-user-panel .user-panel-main{max-width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-panel .user-panel-main .item-user-content{background:#f9f2ff;padding:12px;border-radius:12px 2px 12px 12px;border:1px solid #9c24f2;display:inline-block;width:auto;max-width:100%;color:#070c14;word-wrap:break-word}.gbot-dialog-modal .history-item .history-item-user .item-user-file{display:flex-end;margin-top:10px}.gbot-dialog-modal .history-item .history-item-user .item-user-file-dialog{display:flex-end;margin-bottom:10px}.gbot-dialog-modal .history-item .history-item-user .item-user-images{width:100%;display:flex;justify-content:flex-end}.gbot-dialog-modal .history-item .history-item-user .item-user-images>div{width:100%;max-width:100%}.gbot-dialog-modal .history-item .history-item-user .item-user-images>div>.markdown{width:100%;max-width:100%;display:flex;gap:4px;justify-content:flex-end;flex-wrap:wrap;margin-bottom:12px}.gbot-dialog-modal .history-item .history-item-user .item-user-images>div>.markdown>p{margin-bottom:0}.gbot-dialog-modal .history-item .history-item-user .item-user-images>div>.markdown>p .gbot-image{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:40px;height:40px;border-radius:4px;overflow:hidden;background-color:#fff}.gbot-dialog-modal .history-item .history-item-user .item-user-images>div>.markdown>p .gbot-image .gbot-image-mask-info{padding:0 4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.gbot-dialog-modal .history-item .history-item-user .item-user-images>div>.markdown>p .gbot-image img{object-fit:cover;display:block;margin-bottom:0}.gbot-dialog-modal .history-item .history-item-user ::selection{background-color:#b1d7ffb3;color:#fff}.gbot-dialog-modal .history-item .history-item-bot{width:100%;border-radius:2px 12px 12px;background:white;padding:0 12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin{padding-top:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-success{display:inline-block;width:14px;height:14px;color:#fff;background:#47d1cb;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-error{display:inline-block;width:14px;height:14px;color:#fff;background:#f95b81;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-status .plugin-status-loading{display:inline-block;width:14px;height:14px;color:#477bff;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-title{font-weight:700;color:#000000a6}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-action{border:1px solid #00000026;border-radius:4px;color:#000000e0;padding:1px 8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .gbot-collapse-header{padding:0;height:38px;display:flex;align-items:center}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .gbot-collapse-content-box{padding:0}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-content{height:32px;line-height:32px;font-weight:700}.gbot-dialog-modal .history-item .history-item-bot .item-bot-plugin .bot-plugin-json{background:white}.gbot-dialog-modal .history-item .history-item-bot .item-bot-net{padding-top:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content{width:100%;border-radius:2px 12px 12px;background:white;padding:12px 0;word-wrap:break-word}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think{margin-bottom:12px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top{font-size:14px;line-height:24px;color:#070c14;display:flex;align-items:center;margin-bottom:12px;cursor:pointer}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top img{width:24px;margin-right:4px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-top .think-action{margin-left:8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom{font-size:14px;line-height:150%;color:#999;position:relative}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left{background:#d9d9d9;width:1px;position:absolute;left:10px;top:4px;bottom:4px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left .thinking{position:absolute;left:-5px;top:0;width:12px;height:12px;background:#b752ea;border-radius:50%}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-left .thinked{position:absolute;z-index:100;left:-5px;top:0;width:12px;height:12px;background:#04d68d;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:8px}.gbot-dialog-modal .history-item .history-item-bot .item-bot-content .content-think .think-bottom .bottom-right{padding-left:22px}.gbot-dialog-modal .history-item .gbot-collapse-item{border-radius:4px;background-color:#f5f5f5;margin-bottom:8px;padding:0 0 0 8px}.gbot-dialog-modal .history-item .gbot-collapse-item .gbot-collapse-content{padding-bottom:8px}.gbot-dialog-modal .history-item .gbot-collapse-item:last-child{margin-bottom:0}.gbot-dialog-modal .history-item .gbot-collapse-header-text{width:100%}.gbot-dialog-modal.inlay .history-item__user{display:flex;justify-content:flex-end}.gbot-dialog-modal.inlay .history-item-user,.gbot-dialog-modal.inlay .history-item-bot{max-width:calc(100% - 64px)}.gbot-dialog-modal .session-item-overlay-popover .gbot-popover-inner-content{padding:6px}.gbot-dialog-modal .session-item-overlay-popover .gbot-popover-arrow{display:none}
|
package/dist/es/src/style14.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal
|
|
1
|
+
.gbot-dialog-modal .quill-editor{position:relative}.gbot-dialog-modal .quill-editor .ql-container{border-radius:4px}.gbot-dialog-modal .quill-editor .ql-container:hover{border:1px solid none;outline:0}.gbot-dialog-modal .quill-editor .quill-editor-send{position:absolute;left:8px;right:8px;bottom:34px;height:0;display:flex;justify-content:space-between}.gbot-dialog-modal .quill-editor .ql-editor:before{font-style:normal;font-weight:400}.gbot-dialog-modal .quill-editor .ql-editor.hide-placeholder:before{display:none!important}.gbot-dialog-modal .quill-editor .shortcut-direct{width:15px;height:15px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .quill-editor .shortcut-direct .gbot-popover-inner-content{padding:0}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel{width:180px;padding:4px 0}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;cursor:pointer}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item .title{color:#393939}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item .text{color:#84868c}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item:hover{background:#f9f2ff}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;cursor:not-allowed}.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled .title,.gbot-dialog-modal .quill-editor .shortcut-direct .shortcut-direct-pannel .shortcut-direct-item__disabled .text{color:#b8babf}.gbot-dialog-modal .quill-editor__active .ql-container{transition:all .3s,height 0;border:1px solid #b452ff;outline:0;box-shadow:none}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper{max-height:344px;position:relative}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper .ql-editor{min-height:134px;padding-bottom:32px}.gbot-dialog-modal.inlay .quill-editor .quill-editor-wrapper__scroll{overflow-y:auto;scrollbar-width:none}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper{max-height:200px;position:relative}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper .ql-editor{min-height:134px;padding-bottom:24px}.gbot-dialog-modal.float .quill-editor .quill-editor-wrapper__scroll{overflow-y:auto;scrollbar-width:none}
|
package/dist/es/src/style15.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .home-footer{background:#f5f5f5;width:100%;max-width:824px;margin:0 auto}.gbot-dialog-modal .home-footer .footer-warning{display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:400;line-height:18px;text-align:left;color:#999}
|
package/dist/es/src/style16.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .greeting{display:flex;flex-direction:column;align-items:center;flex:1;margin:0 auto;max-width:824px;width:100%;padding:16px 0}.gbot-dialog-modal .greeting-icon{width:74px;height:74px;border-radius:50%;box-shadow:0 6px 16px 2px #070c1414;padding:5px;margin-bottom:24px}.gbot-dialog-modal .greeting-icon img{width:64px;height:64px}.gbot-dialog-modal .greeting-word{font-weight:700;font-size:24px;line-height:30px;margin-bottom:24px}.gbot-dialog-modal .greeting-questions{width:100%;padding:0 12px}.gbot-dialog-modal.inlay .greeting{margin-top:40px}.gbot-dialog-modal.float .greeting{overflow-y:auto;flex:none}
|
package/dist/es/src/style17.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .prompt-modal .title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500;text-align:left;color:#161616}.gbot-dialog-modal .prompt-modal .content{font-size:14px;font-weight:400;line-height:22px;text-align:justified;color:#393939}
|
package/dist/es/src/style18.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .prompt-setting-panel{display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .agent-prompt{margin:12px 12px 0;padding:12px;border-radius:4px;border:1px solid #e8e9eb;background:#fff;flex:1;max-width:824px}.gbot-dialog-modal .agent-prompt .prompt-header{font-size:16px;line-height:24px;font-weight:600;color:#84868c}.gbot-dialog-modal .agent-prompt .prompt-header .prompt-btn{color:#84868c}.gbot-dialog-modal .agent-prompt .prompt-header .prompt-title{color:#5c5f66;font-style:normal;line-height:150%}.gbot-dialog-modal .agent-prompt .prompt-form{margin:12px 12px 0}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-form-item{margin-left:15px}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-collapse{max-height:254px;overflow:auto}.gbot-dialog-modal .agent-prompt .prompt-form .prompt-variables-collapse{border-radius:4px;opacity:1;background:#FFFFFF;width:100%}.gbot-dialog-modal .agent-prompt .prompt-form .gbot-collapse-ghost>.gbot-collapse-item>.gbot-collapse-content>.gbot-collapse-content-box{padding-top:0;padding-bottom:0}.gbot-dialog-modal .agent-prompt .icon-prompt-question{cursor:pointer}.gbot-dialog-modal .prompt-form{margin:12px 12px 0}.gbot-dialog-modal .prompt-form .gbot-form-item{margin-left:15px}.gbot-dialog-modal .prompt-form .gbot-collapse{max-height:254px;overflow:auto}.gbot-dialog-modal .prompt-form .prompt-variables-collapse{border-radius:4px;opacity:1;background:#FFFFFF;width:100%}.gbot-dialog-modal .prompt-form .gbot-collapse-ghost>.gbot-collapse-item>.gbot-collapse-content>.gbot-collapse-content-box{padding-top:0;padding-bottom:0}.gbot-dialog-modal .icon-prompt-question{cursor:pointer}
|
package/dist/es/src/style19.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .footer-upload{display:flex;justify-content:center;align-items:center}.gbot-dialog-modal .footer-upload .upload-enter{padding:0;height:24px;width:24px;display:flex;justify-content:center;align-items:center;cursor:pointer}.gbot-dialog-modal .footer-upload .upload-enter.disabled{color:#b8babf;cursor:not-allowed}.gbot-dialog-modal .footer-upload .upload-enter:hover{background:#ebebeb;border-radius:4px}.gbot-dialog-modal .file-upload{width:100%;display:flex;flex-direction:column}.gbot-dialog-modal .file-upload .gbot-upload-drag{background-color:#fff;border:unset}.gbot-dialog-modal .file-upload .gbot-upload-drag .gbot-upload-btn{padding:0}.gbot-dialog-modal .file-upload .file-upload-icon{font-size:35px;color:#d3d3d3}.gbot-dialog-modal .file-upload .file-upload-action{display:flex;justify-content:center;align-items:center;margin-bottom:12px}.gbot-dialog-modal .file-upload .file-upload-desc{text-align:left;display:flex;flex-direction:column;font-weight:400;font-size:12px;margin:0 auto;color:#84868c;width:232px;line-height:18px;padding-left:20px}.gbot-dialog-modal .file-upload .file-upload-desc .item-upload-desc{line-height:150%}.gbot-dialog-modal .file-upload .file-upload-desc .item-upload-desc__1{display:flex;align-items:center}.gbot-dialog-modal .file-upload .upload-wrapper{height:300px;overflow-y:auto;overflow-x:hidden}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main{flex:1;width:100%;overflow-y:auto;margin-bottom:16px}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-pannel{width:100%}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-empty{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-item{cursor:pointer}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-item .upload-item-file-icon{display:inline-block;width:10px}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-item .upload-item-name{margin-left:10px;display:inline-block;max-width:230px;word-break:break-all}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-item .upload-item-upload-delete{display:inline-block;width:10px;color:#9c24f2;display:none}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-item:hover{background:rgba(0,0,0,.04)}.gbot-dialog-modal .file-upload .upload-wrapper .upload-main .upload-item:hover .upload-item-upload-delete{display:inline-block}.gbot-dialog-modal .card-title{display:flex;justify-content:space-between;align-items:center;color:#393939;font-size:14px}.gbot-dialog-modal .card-title .name{font-weight:500}.gbot-dialog-modal .card-title .actions{font-weight:400;display:flex;gap:12px}.gbot-dialog-modal .card-title .actions .action{padding:4px 2px;cursor:pointer}.gbot-dialog-modal .card-title .actions .action .detail{display:flex;gap:6px;align-items:center}.gbot-dialog-modal .split-line{width:100%;height:1px;border:.5px solid #e8e9eb}.gbot-dialog-modal .upload-popover{z-index:1}
|
package/dist/es/src/style20.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .session-list-component{position:relative;z-index:1}.gbot-dialog-modal .session-list-component .session-list-overlay .gbot-popover-inner-content{padding:8px 10px}.gbot-dialog-modal .session-list-component .list-overlay-action:hover{color:#9c24f2}
|
package/dist/es/src/style21.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper{height:calc(100% - 54px)!important;border-radius:12px 12px 0 0}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header{padding:12px 16px;border-bottom:none}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title{justify-content:space-between;flex-direction:row-reverse;font-size:16px;color:#393939}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title .gbot-drawer-close{margin:0;padding:0}.gbot-dialog-modal .session-history-drawer .gbot-drawer-content-wrapper .gbot-drawer-body{padding:0 16px 26px}.gbot-dialog-modal .session-history-drawer.loading-panel .gbot-drawer-body{display:flex;justify-content:center;align-items:center}.gbot-dialog-modal .session-history-drawer .bot-session-container .agent-sessions{width:100%}.gbot-dialog-modal .session-history-drawer .bot-session-container .agent-sessions .sessions-main{border:none}
|
package/dist/es/src/style22.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .connect{position:relative}.gbot-dialog-modal .connect .net-tip{position:absolute;top:-45px;left:50%;transform:translate(-88%);white-space:nowrap;background:#ffffff;padding:8px;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:10}
|
package/dist/es/src/style24.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .input-progress{display:flex}.gbot-dialog-modal .input-progress .progress-point{display:flex;align-items:center;margin-right:8px}.gbot-dialog-modal .input-progress .progress-point .point{width:6px;height:6px;border-radius:50%}.gbot-dialog-modal .input-progress .progress-point .point1{background:#9c24f2;animation:gbot-animation1 1s ease-in infinite}.gbot-dialog-modal .input-progress .progress-point .point2{background:#c47dff;margin:0 3px;animation:gbot-animation2 1s ease-in infinite}.gbot-dialog-modal .input-progress .progress-point .point3{background:#ead4ff;animation:gbot-animation3 1s ease-in infinite}.gbot-dialog-modal .input-progress .progress-waiting{color:#9c24f2}@keyframes gbot-animation1{0%{opacity:0}33%{opacity:1}to{opacity:1}}@keyframes gbot-animation2{0%,33%{opacity:0}67%{opacity:1}to{opacity:1}}@keyframes gbot-animation3{0%,67%{opacity:0}to{opacity:1}}
|
package/dist/es/src/style25.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .session-action{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e8e9eb;color:#84868c}.gbot-dialog-modal .session-action .session-action-again{cursor:pointer;user-select:none}.gbot-dialog-modal .session-action .session-action-again:hover{color:#b452ff}.gbot-dialog-modal .session-action .session-action-comment{border-radius:4px;padding:4px}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback{font-size:16px}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item{display:inline-block;width:100%;height:100%;cursor:pointer}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item:hover{color:#b452ff}.gbot-dialog-modal .session-action .session-action-comment .action-comment-feedback .comment-feedback-item__active{color:#9c24f2}.gbot-dialog-modal .cai-pannel{width:260px;overflow:hidden}.gbot-dialog-modal .cai-pannel .cai-error{color:#f33e3e;margin-bottom:12px}.gbot-dialog-modal .cai-pannel .cai-title{margin-bottom:12px}.gbot-dialog-modal .cai-pannel .cai-title .cai-require{color:#f33e3e}.gbot-dialog-modal .cai-pannel .cai-title .cai-question{color:#070c14;text-align:center;font-size:14px}.gbot-dialog-modal .cai-pannel .cai-list{display:flex;flex-wrap:wrap}.gbot-dialog-modal .cai-pannel .cai-list .cai-item{padding:6px 8px;border-radius:4px;border:1px solid #e8e9eb;margin-bottom:12px;margin-right:12px;cursor:pointer}.gbot-dialog-modal .cai-pannel .cai-list .cai-item:hover{color:#b452ff;border:1px solid #b452ff}.gbot-dialog-modal .cai-pannel .cai-list .cai-item__active{color:#8614cc;border:1px solid #8614cc}.gbot-dialog-modal .chat-item:last-child{margin-bottom:0}
|
package/dist/es/src/style27.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .search-reference .bot-net-panel{user-select:none;margin-bottom:10px;width:180px;height:32px;background:white;line-height:32px;display:flex;justify-content:space-between;padding:0 12px;cursor:pointer}.gbot-dialog-modal .search-reference .bot-net-main{background:white;padding:12px;line-height:22px}.gbot-dialog-modal .search-reference .bot-net-main .text .link{cursor:pointer;color:#0f64ff}.gbot-dialog-modal .search-reference .think-top{font-size:14px;line-height:24px;color:#070c14;display:flex;align-items:center;margin-bottom:12px;cursor:pointer}.gbot-dialog-modal .search-reference .think-top img{width:24px;margin-right:4px}.gbot-dialog-modal .search-reference .think-top .think-action{margin-left:8px}.gbot-dialog-modal .search-reference .thinking{width:12px;height:12px;background:#b752ea;border-radius:50%;margin:6px}.gbot-dialog-modal .search-reference .thinked{width:12px;height:12px;background:#04d68d;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:8px;margin:6px}.gbot-dialog-modal .search-reference .thinked.error{background:#f33e3e}.gbot-dialog-modal .search-reference .item-bot-plugin{line-height:24px}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-status .icon-search{font-size:24px}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-status .plugin-status-success{display:inline-block;width:14px;height:14px;color:#fff;background:#47d1cb;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-status .plugin-status-error{display:inline-block;width:14px;height:14px;color:#fff;background:#f95b81;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-status .plugin-status-loading{display:inline-block;width:14px;height:14px;color:#477bff;border-radius:50%;font-size:10px;display:flex;align-items:center;justify-content:center}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-title{font-weight:700;color:#000000a6}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-action{border:1px solid #00000026;border-radius:4px;color:#000000e0;padding:1px 8px}.gbot-dialog-modal .search-reference .item-bot-plugin .gbot-collapse-header{padding:0;height:38px;display:flex;align-items:center}.gbot-dialog-modal .search-reference .item-bot-plugin .gbot-collapse-content-box{padding:0}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-content{height:32px;line-height:32px;font-weight:700}.gbot-dialog-modal .search-reference .item-bot-plugin .bot-plugin-json{background:white}.gbot-dialog-modal .search-reference .gbot-collapse-item{padding:0 8px}.gbot-dialog-modal .search-reference-list{margin-right:8px;border-radius:6px}.gbot-dialog-modal .search-reference-list-item{display:flex;flex-direction:column;padding:12px 8px 8px;gap:0px 10px;flex-wrap:wrap;align-content:flex-start;border-radius:6px;background:#ffffff;box-sizing:border-box;border:1px solid #e5e7eb;margin-bottom:8px}.gbot-dialog-modal .search-reference-list-item :last-child{margin-bottom:0}.gbot-dialog-modal .search-reference-list-item :hover{cursor:pointer}.gbot-dialog-modal .search-reference-list-item-footer{display:flex;justify-content:space-between;padding:0;row-gap:0px;flex-wrap:wrap;align-content:flex-start;z-index:0;line-height:24px;align-items:center}.gbot-dialog-modal .search-reference-list-item-footer .logo{width:24px;height:24px}.gbot-dialog-modal .search-reference-list-item-footer .name{font-family:Roboto;font-size:12x;font-weight:400;line-height:24px;letter-spacing:normal;color:#4b5563}.gbot-dialog-modal .search-reference-list-item-footer .time{font-family:Roboto;font-size:12x;font-weight:400;line-height:24px;letter-spacing:normal;color:#9ca3af}.gbot-dialog-modal .search-reference-list-item-title{font-family:Roboto;font-size:16px;font-weight:600;line-height:28px;letter-spacing:normal;color:#000}.gbot-dialog-modal .search-reference-list-item-title .number{margin-right:4px}.gbot-dialog-modal .search-reference-list-item-content{font-family:Roboto;font-size:14px;font-weight:400;line-height:24px;letter-spacing:normal;color:#4b5563;padding:0 8px;display:inline-block}
|
package/dist/es/src/style28.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .json-display{margin:0;padding:4px}
|
package/dist/es/src/style29.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .session-related{padding-bottom:12px}.gbot-dialog-modal .session-related .session-related-header{height:18px;padding:0}.gbot-dialog-modal .session-related .session-related-main .question-main-item{color:#0f64ff;display:flex;align-items:center;cursor:pointer}.gbot-dialog-modal .session-related .session-related-main .question-main-item:before{content:"";display:block;background:#0f64ff;width:4px;height:4px;border-radius:50%;margin:0 8px;cursor:pointer}
|
package/dist/es/src/style30.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .file-card{height:38px;min-width:232px;max-width:600px;display:flex;padding:6px 12px 6px 6px;align-items:center;gap:4px;border-radius:6px;background:#ffffff;position:relative}.gbot-dialog-modal .file-card .analysis{display:flex;justify-content:center;align-items:center;gap:8px;font-size:12px;font-weight:400;line-height:22px;text-align:left;color:#84868c}.gbot-dialog-modal .file-card .file-icon{height:100%;width:24px}.gbot-dialog-modal .file-card.small{height:30px;width:150px;padding:3px 6px 3px 3px}.gbot-dialog-modal .file-card.small .file-icon{width:24px}.gbot-dialog-modal .file-card .file-desc{flex:1;overflow:hidden}.gbot-dialog-modal .file-card .file-desc .file-desc-name{color:#5c5f66;font-size:12px;font-style:normal;font-weight:700;line-height:150%}.gbot-dialog-modal .file-card .file-desc .file-desc-name:hover{cursor:pointer}.gbot-dialog-modal .file-card .file-desc .file-desc-name:hover .gbot-typography{color:#b452ff}.gbot-dialog-modal .file-card .file-desc .file-desc-size{color:#84868c;font-size:10px;font-style:normal;font-weight:400;line-height:150%}.gbot-dialog-modal .file-card .file-process{background-color:#f7f7f9;border-radius:8px;width:16px;height:16px;line-height:16px;text-align:center;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-card .file-remove{cursor:pointer;display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;color:#151b26;display:inline-flex;align-items:center;justify-content:center}.gbot-dialog-modal .file-card .file-remove:hover{background-color:#fff;color:#b452ff}.gbot-dialog-modal .file-card .file-failed{display:inline-block;width:16px;height:16px;line-height:16px;text-align:center;color:#dc4446;display:inline-flex;align-items:center;justify-content:center}
|
package/dist/es/src/style31.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .clear-modal .title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:500;text-align:left;color:#161616}.gbot-dialog-modal .clear-modal .content{font-size:14px;font-weight:400;line-height:22px;text-align:justified;color:#393939}
|
package/dist/es/src/style32.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .gbot-drawer-content-wrapper{height:calc(100% - 54px)!important;border-radius:12px 12px 0 0}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-header{padding:12px 16px;border-bottom:none}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title{justify-content:space-between;flex-direction:row-reverse;font-size:16px;color:#393939}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-header .gbot-drawer-header-title .gbot-drawer-close{margin:0;padding:0}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body{padding:0 16px 26px}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel{max-height:124px;width:100%;padding:2px 0;border-bottom:1px solid #e8e9eb}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .session-item-space{padding:10px 0;overflow:hidden}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel:hover{cursor:pointer}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .gbot-space{width:100%}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question{font-size:14px;font-weight:700;line-height:21px;color:#070c14;width:100%;display:flex;align-items:center;justify-content:space-between}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .gbot-tag{width:58px;height:24px;padding:1px 8px;border-radius:4px;font-size:14px;font-weight:400;background-color:#9c24f2;color:#fff}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .session-item-name{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .icons-bar{display:flex}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .icons-bar .gbot-btn{margin:0 3px}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .gbot-btn{width:20px;height:20px;padding:0;font-size:12px;color:#000}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .name-edit-panel{width:100%;position:relative}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .name-edit-panel .name-edit-input{width:100%}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .name-edit-panel .name-edit-input .gbot-input-show-count-suffix{font-size:12px;font-weight:400;color:#e0e0e0;margin-right:60px}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .name-edit-panel .gbot-btn{position:absolute;right:12px;top:7px;z-index:999}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-question .name-edit-panel .gbot-btn .anticon{font-size:14px}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-answer{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#84868c}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file{font-size:12px;color:#84868c}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .file-icon{width:16px;height:16px}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .file-name{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .gbot-tag{font-size:10px;border:1px solid #84868c;background-color:transparent;color:#84868c}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .file-status-icon{position:absolute;left:6px;top:-2px;border-radius:10px;border:1px solid #fff}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .success-file-icon{color:#45cc27}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .failed-file-icon{color:#dc4446}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .session-item-panel .item-file .loading-file-icon{height:12px;width:12px;font-size:10px;background-color:#fff}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .current-item{margin:2px 0}.gbot-dialog-modal .gbot-drawer-content-wrapper .gbot-drawer-body .current-item .session-item-space{border-radius:8px;background-color:#f9f2ff;padding:8px}.gbot-dialog-modal .loading-panel .gbot-drawer-body{display:flex;justify-content:center;align-items:center}
|
package/dist/es/src/style5.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .chat-header{height:56px;padding:0 24px;border-bottom:1px solid #e8e9eb;display:flex;align-items:center;justify-content:space-between;background:white}.gbot-dialog-modal .chat-header .header-title{color:#151b26;font-size:16px;font-style:normal;font-weight:700;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
package/dist/es/src/style6.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .sider-container{height:100%;width:100%;display:flex;flex-direction:column}
|
package/dist/es/src/style7.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .agent-chat{width:100%;height:100%;display:flex;flex-direction:column;max-width:824px;margin:0 auto;overflow:hidden}.gbot-dialog-modal .agent-chat .chat-main{flex:1;padding:16px;overflow:hidden;width:100%;transition:all 1s;position:relative}.gbot-dialog-modal .agent-chat .chat-main .chat-main-wrapper{width:100%;height:100%;overflow-y:auto;overflow-x:hidden}.gbot-dialog-modal .agent-chat .chat-main .session-stop{display:flex;align-items:center;justify-content:center;position:absolute;left:0;right:0;bottom:4px}.gbot-dialog-modal .agent-chat .chat-main .back-bottom{transition:all 3.3s;position:absolute;background:white;box-shadow:0 0 5px #ddd;font-size:0;border-radius:50%;width:26px;height:26px;right:4px;bottom:0;display:flex;justify-content:center;align-content:center}.gbot-dialog-modal .agent-chat .chat-main .main-empty{width:100%;height:100%;overflow-y:auto}.gbot-dialog-modal .agent-chat .chat-footer{position:relative;flex:0;padding:0 16px 8px;display:flex}.gbot-dialog-modal .agent-chat .chat-footer .camera-out-btn:hover,.gbot-dialog-modal .agent-chat .chat-footer .camera-out-btn:active,.gbot-dialog-modal .agent-chat .chat-footer .camera-out-btn.active{color:#9c24f2}.gbot-dialog-modal .agent-chat .chat-footer .chat-footer-input{flex:1;position:relative;width:100%}.gbot-dialog-modal .agent-chat .chat-footer .chat-footer-input .gbot-upload.gbot-upload-select-picture-card{width:20px;height:20px;border:none;margin:0}.gbot-dialog-modal .agent-chat .chat-footer .chat-footer-input .upload-wrapper{height:20px;width:20px;font-size:16px;border:1px solid #9c24f2;color:#9c24f2;border-radius:2px;display:flex;justify-content:center;align-items:center;cursor:pointer}.gbot-dialog-modal .agent-chat .chat-footer .chat-footer-input .upload-wrapper.upload-wrapper__disabled{border:1px solid #b8babf;color:#b8babf;cursor:not-allowed}.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action{width:100%;height:28px;display:flex;justify-content:space-between;align-items:center}.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action .footer-upload-picture{display:inline-block;width:20px}.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action .add-btn{width:70px;height:24px;padding:0;font-size:12px;border-radius:10px 10px 10px 2px}.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action .add-btn:disabled,.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action .add-btn:disabled:hover{background:#b8babf;color:#fff}.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action .session-history-drawer-component .history-overlay-action:hover{color:#9c24f2}.gbot-dialog-modal .agent-chat .chat-footer .footer-upload-action .session-history-overlay .gbot-popover-inner-content{padding:8px 10px}.gbot-dialog-modal .agent-chat .session-loading{width:100%;height:100%;display:flex;justify-content:center;align-items:center}
|
package/dist/es/src/style8.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .knowledge-select{width:204px;height:28px;border-radius:10px;border:1px solid}.gbot-dialog-modal .knowledge-select .select-popover{cursor:pointer;width:100%;height:100%;padding:0 8px;display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:400}.gbot-dialog-modal .knowledge-select .select-popover .select-icon{color:#84868c}.gbot-dialog-modal .knowledge-select .select-popover .title{line-height:22px;color:#84868c}.gbot-dialog-modal .knowledge-select .select-popover .content{padding:2px 8px;border-radius:4px;background:#f7f7f9;line-height:18px;color:#84868c}.gbot-dialog-modal .knowledge-select .gbot-popover-placement-bottomRight{padding-top:5px!important}.gbot-dialog-modal .knowledge-select .gbot-popover-placement-bottomRight .gbot-popover-arrow{display:none}.gbot-dialog-modal .knowledge-select .gbot-popover-placement-bottomRight .gbot-popover-inner .gbot-popover-inner-content{height:200px;overflow-y:auto;font-size:14px;font-weight:400;line-height:21px;color:#84868c}
|
package/dist/es/src/style9.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gbot-dialog-modal .
|
|
1
|
+
.gbot-dialog-modal .session-refer{padding:12px 0;border-top:1px solid #e8e9eb}.gbot-dialog-modal .session-refer .session-refer-header{color:#070c14;margin-bottom:12px;height:18px;display:flex;align-items:center}.gbot-dialog-modal .session-refer .session-refer-header .refer-header-title{font-style:normal;font-weight:400;line-height:150%}.gbot-dialog-modal .session-refer .session-refer-content .refer-markdown p{color:#84868c;line-height:150%}.gbot-dialog-modal .session-refer .gbot-collapse-header{padding:4px 0!important}.gbot-dialog-modal .session-refer .gbot-collapse-content-box{padding:4px 10px 4px 24px!important}
|
package/dist/lib/index.js
CHANGED
|
@@ -317,7 +317,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
317
317
|
${i}`:i}if(t&&t.length>0){const a=t.filter(Boolean).map(o=>``).join(`
|
|
318
318
|
`);i=a?`${a}
|
|
319
319
|
${i}`:i}}return i},XV=z.forwardRef((e,t)=>{var Om,vm,km,Ym,Rm,_m,Um,Qm,Pm,Fm,Bm,Gm,Wm,Hm;const{application:n,docViewerUrl:r="",currentSession:i,onCreateSession:a,embeddingService:o,setCurrentSession:s,networkStatus:l,setNetworkStatus:u}=e,[c,M]=z.useState([]),[d,g]=z.useState(),[p,m]=z.useState(),T=z.useRef(null),{service:D,agentClient:y,depId:I,footer:b,transform:w,defaultInput:A,onMessage:U,onHistoryLoad:P,beforeMessageSend:x,bodyStyle:C,disabled:_,features:k,popupContainer:F,icon:$,sider:J,mode:fe}=z.useContext(Wt),[V,se]=z.useState(!1),de=z.useRef(c),O=z.useRef(void 0),[pe,ye]=z.useState(0),[L,ae]=z.useState([]),[we,Ee]=z.useState([]),[te,X]=z.useState(0),[me,Ie]=z.useState(!1);z.useEffect(()=>{Ie(te>0)},[te]);const re=z.useRef(null),[xe,ke]=z.useState([]),[Je,$e]=z.useState(!1),[ne,Ce]=z.useState(!1),[Qe,ct]=z.useState(""),[Ve,lt]=z.useState(),[ft,ot]=z.useState({}),ht=z.useRef(null),Ut=z.useRef(null),B=z.useRef(null),[H,Z]=z.useState(!1),[Te,_e]=z.useState([]),[Tt,We]=z.useState(!0),[Ye,Xt]=z.useState(!0),[Rn,jt]=z.useState(!1),[lr,Kt]=z.useState(!1),[Dm,UL]=z.useState(!1),[Xn,Oa]=z.useState(typeof(k==null?void 0:k.promptVariables)=="object"?k.promptVariables.default||[]:[]),[QL,PL]=z.useState(()=>{const G=typeof(k==null?void 0:k.knowledges)=="object"&&k.knowledges.default||void 0;if(G){if(Array.isArray(G)&&G.some(De=>Array.isArray(De.fileIds)&&De.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(dl(G)>ii)throw Error(`knowledges and fileIds total count cannot exceed ${ii}`)}return G}),[jm,Lr]=z.useState(!1),[Am,va]=z.useState(!1),[FL,Bi]=z.useState(typeof(k==null?void 0:k.connectNetwork)=="object"&&typeof(k==null?void 0:k.connectNetwork.default)=="boolean"?k.connectNetwork.default:!1),[zm,Jo]=z.useState(!1),[BL,Jr]=z.useState(!1),[GL,WL]=z.useState(null),[Xo,Di]=z.useState(!1),[bm,wm]=z.useState(!1),{isSwitchingToExistingSession:Em,setIsSwitchingToExistingSession:Ko}=Xf(),Gi=z.useRef(null);z.useEffect(()=>{if(WL(i),i===null)Jr(!1);else if(i===void 0)Jr(!0);else{if(GL===null){if(Em){Jr(!0),Ko(!1);return}Jr(!1);return}i.ready?Jr(!1):Jr(!0)}},[i,i==null?void 0:i.ready,Em]),z.useEffect(()=>{var he,De;i&&(de.current=[]),M([]);const G=T.current;if(G&&G.scrollTo({top:0}),!((he=i==null?void 0:i.data)!=null&&he.id))return;if(Kt(!1),jt(!1),(De=i.messages)!=null&&De.length){const qe=[...i.messages.filter(ze=>ze==null?void 0:ze.messageId)].reverse();de.current=[...qe],M([...qe]),Jr(!1)}const q=ie=>{var qe;(qe=i==null?void 0:i.data)!=null&&qe.id&&(de.current=[...ie].reverse(),M([...ie].reverse()),!ie||ie.length<10?va(!1):va(!0),Jr(!1),P&&P({applicationId:n.id,sessionId:i.data.id,histories:ie}))};return i.addEventListener("history:loaded",q),()=>{de.current=[],M([]),i==null||i.removeEventListener("history:loaded",q)}},[i]),z.useEffect(()=>{const G=()=>{var q;(q=i==null?void 0:i.data)!=null&&q.id&&(i.promptVariables&&Oa(i.promptVariables.sort((he,De)=>he.key.localeCompare(De.key))),i.knowledges&&PL(i.knowledges),u(i.netOpen))};return i==null||i.addEventListener("data:updated",G),()=>{i==null||i.removeEventListener("data:updated",G)}},[i]),z.useEffect(()=>{var q;if(!((q=i==null?void 0:i.data)!=null&&q.id))return;const G=he=>{var De;console.error(he.message,he.cause,"e.case"),v.notification.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-notification"}),v.notification.error({message:((De=he.cause)==null?void 0:De.message)||he.message}),v.notification.config({getContainer:void 0,prefixCls:"gbot-notification"})};return i.addEventListener("error",G),()=>{i==null||i.removeEventListener("error",G)}},[i]);const HL=()=>{var he;if(!((he=i==null?void 0:i.data)!=null&&he.id)||!(n!=null&&n.id))return;const G=i.data.id,q=c[c.length-1];if(q&&q.isContext){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.success("已开启新话题"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}else i.clear().then(()=>{const De=new Ha("",G,Oe.IHistoryRole.System);De.isContext=!0,M([De,...c])})};z.useEffect(()=>{n!=null&&n.id&&(D==null||D.getRecommendQues(n.id).then(G=>{ke(G)}))},[I,n]);const Lm=G=>Ge(exports,null,function*(){var Xr,Kr;if(_){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("发送功能被禁用"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}const q=G||d;if(!(q!=null&&q.trim())){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("请输入你想问的"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!(Xn==null?void 0:Xn.every($t=>!!($t!=null&&$t.value))))if(w!=null&&w.promptVariables){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("变量值不能为空"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}else console.error("变量值不能为空",Xn==null?void 0:Xn.map($t=>!!($t!=null&&$t.value)));if(lr){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("正在回复中"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(V){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("等待初始化"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(!Tt){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("正在解析文件"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}if(me){v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("正在上传图片"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"});return}ae([]),Ee([]);const De=(Xr=i==null?void 0:i.data)==null?void 0:Xr.id;if(!De){if(Xo)return;Di(!0),a==null||a({netOpen:l?cr.OPEN:cr.CLOSE}).then($t=>{var fn,ka;Lr(!0),u(!!((fn=$t.data)!=null&&fn.netOpen)),Bi(!!((ka=$t.data)!=null&&ka.enableNetOpen)),es($t).then(()=>{s==null||s($t),Lr(!1),m(q)})}).catch($t=>{Di(!1)});return}if(Xo)return;Di(!0),Jo(!0);const ie=ap(q,we,ft[De],(n==null?void 0:n.type)||0);let qe;try{x?qe=yield x==null?void 0:x({applicationId:n.id,sessionId:De,message:{content:ie,sessionId:De,role:Oe.ChatMessageRole.User,files:ft[De]}}):qe=!0}catch($t){qe=!1}if(Jo(!1),qe===!1){Di(!1);return}let ze=q;typeof qe=="object"&&(ze=qe.content||q);const tn=yield(()=>new Promise($t=>{Oa(fn=>($t(fn),fn))}))();if(!(yield i.setPromptVariables(tn))){Di(!1);return}((Kr=ft[De])==null?void 0:Kr.length)>0?$L(ze):au(ze)}),es=G=>new Promise((q,he)=>Ge(exports,null,function*(){const qe=(G==null?void 0:G.promptVariables).filter(ze=>ze.type?!((ze.type===Oe.PromptVariableType.User||ze.type===void 0)&&ze.key==="query")&&!((ze.type===Oe.PromptVariableType.System||ze.type===void 0)&&ze.key==="datetime"):ze.key!=="query").map(ze=>{var tn;const St=(tn=Xn.find(Kn=>Kn.key===ze.key&&Kn.type===ze.type))==null?void 0:tn.value;return ze.value=St||"",ze});Oa(qe.sort((ze,St)=>ze.key.localeCompare(St.key))),yield G==null?void 0:G.setPromptVariables(qe).catch(ze=>{console.error(ze),v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error(ze.message),v.message.config({getContainer:void 0,prefixCls:"gbot-message"})}),q()})),$L=G=>{var ie,qe,ze;if(We(!1),!((ie=i==null?void 0:i.data)!=null&&ie.id)||!(n!=null&&n.id))return;const q=((qe=i.data)==null?void 0:qe.id)||"";let he=[],De=new Set;(ze=ft[q])==null||ze.forEach(St=>{De.has(St.id)||(he.push(St),De.add(St.id))}),We(!0),au(G,he)};z.useEffect(()=>{if(!p||!i)return;const G=p,q=()=>Ge(exports,null,function*(){Jo(!0);const he=ap(G,we,ft[i.id],(n==null?void 0:n.type)||0);let De;try{x?De=yield x==null?void 0:x({applicationId:n.id,sessionId:i.id,message:{content:he,sessionId:i.id,role:Oe.ChatMessageRole.User,files:ft[i.id]}}):De=!0}catch(ie){De=!1}if(Jo(!1),De===!1){Di(!1);return}au(G),m(void 0)});return i.ready?q():i.addEventListener("ready",q,!0),()=>{i==null||i.removeEventListener("ready",q)}},[p,i]);const au=(G,q)=>Ge(exports,null,function*(){var Xr,Kr,$t;const he=(Xr=i==null?void 0:i.data)==null?void 0:Xr.id;if(!he)return;Kt(!0),jt(!0);const De=ap(G,we,q,(n==null?void 0:n.type)||0);let ie;if(n.type===Oe.ApplicationTypes.Agent)ie=void 0;else if(n.type===Oe.ApplicationTypes.Dialog&&((Kr=n.arrange)!=null&&Kr.length)&&n.arrange[0].visionOpen){const fn=we&&we.length?we.filter(Boolean):[];ie=fn.length?fn:void 0}else ie=void 0;const qe=new Ha(De,he,Oe.IHistoryRole.User,q,ie);g(void 0),lt(void 0),de.current=[qe,...c],M(de.current),n.id&&U&&U({applicationId:n.id,sessionId:he,message:qe});const ze=new Ha("",he,Oe.IHistoryRole.System);ze.isWaiting=!0,de.current=[ze,...de.current],M(de.current);const St=(q==null?void 0:q.map(fn=>fn.id))||[],tn={stream:Va.configuration.stream,referenceFirst:!1};if(w!=null&&w.promptVariables){const fn=Xn==null?void 0:Xn.reduce((ka,$m)=>(ka[$m.key]=$m.value,ka),{});tn.formatValues=fn}if(w!=null&&w.knowledges){const fn=QL;tn.knowledges=fn}const Kn={text:De,fileIds:St,files:q};ie&&ie.length>0&&(Kn.imageContent=ie),yield i.send(Kn,tn),ot({[he]:[]}),($t=ht.current)==null||$t.update(),ae([]),Ee([]),Di(!1)});z.useEffect(()=>{var De;const G=(De=i==null?void 0:i.data)==null?void 0:De.id;if(!G)return;const q=ie=>{if(!ie.sessionId||ie.sessionId&&ie.sessionId!==O.current||ie.role===Oe.IHistoryRole.User)return;if(ie.index===-1&&ie.code!==200&&ie.code!==11915&&(jt(!1),Kt(!1),de.current=de.current.filter(St=>!St.isWaiting),M([...de.current]),de.current=[...de.current],ie.content)){v.notification.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-notification"}),v.notification.error({message:ie.content}),v.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const qe=ie.actions||[],ze=new Ha(ie.content,G,Oe.IHistoryRole.Robot);ze.messageId=ie.messageId||Mo.v4(),ze.reasoningContent=ie.reasoningContent,ze.searchReference=ie.searchReference,ze.thinkingSecs=ie.thinkingSecs,ze.thinkingStatus=ie.thinkingStatus,ze.actions=qe,ze.isLoading=!0,ze.searchingStatus=ie.searchingStatus,de.current=de.current.filter(St=>!St.isWaiting).filter(St=>!St.isReplying),ie.index===void 0&&M([ze,...de.current]),ie.code===11915&&(jt(!1),Kt(!1),ze.isLoading=!1,ze.content="请您换个问题问我吧~",ze.isSensitive=!0,M([ze,...de.current])),ie.index===-2&&(jt(!1),Kt(!1),ze.isLoading=!1,ze.content="回答已中止~",ze.isSuspend=!0,M([ze,...de.current])),ie.index===-1&&(jt(!1),Kt(!1),ze.isLoading=!1,ze.reference=ie.reference,M([ze,...de.current]),n.id&&U&&U({applicationId:n.id,sessionId:G,message:ze})),ie.index===-3&&(jt(!1),Kt(!1),ze.isLoading=!1,ze.reference=ie.reference,ze.relatedQuesion=ie.relatedQuesion,M([ze,...de.current]))},he=()=>{i.addEventListener("message:updated",q)};return i.ready?i.addEventListener("message:updated",q):i.addEventListener("ready",he),()=>{i==null||i.removeEventListener("message:updated",q),i==null||i.removeEventListener("ready",he)}},[i]),z.useEffect(()=>{if(!i){se(!1);return}const G=q=>{se(q)};return se(i.frozen),i.addEventListener("frozen",G),()=>{i==null||i.removeEventListener("frozen",G)}},[i]),z.useEffect(()=>{if(!y)return;const G=y.questionContextMaxLength||4e3;ye(G)},[y,D]),z.useEffect(()=>{A&<(A.text)},[A]);const qL=G=>{const q=G.size;return q<=0?(v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("该文件为空,请重新上传"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1):q>20*Qs?(v.message.config({getContainer:()=>(F==null?void 0:F.current)||document.body,prefixCls:"gbot-message"}),v.message.error("图片须小于20M"),v.message.config({getContainer:void 0,prefixCls:"gbot-message"}),!1):(ae(he=>he.length>=zs?he:[...he,G]),!1)},VL=()=>Ge(exports,null,function*(){var G;return(G=i==null?void 0:i.data)!=null&&G.id?i:(Gi.current||(Gi.current=new Promise((q,he)=>{Lr(!0),a==null||a({netOpen:l?cr.OPEN:cr.CLOSE}).then(De=>{var ie,qe;s==null||s(De),Lr(!1),u(!!((ie=De.data)!=null&&ie.netOpen)),Bi(!!((qe=De.data)!=null&&qe.enableNetOpen)),es(De),q(De)}).catch(De=>{Gi.current=null,he(De)})})),Gi.current)}),ZL=G=>Ge(exports,null,function*(){const q=yield VL();return JL(q,G)}),JL=(G,q)=>{const he=NV(q.name);return new Promise(De=>{var qe;const ie={files:[`${Mo.v4()}.${he}`],isv:"minio",knowledgeId:((qe=G.data)==null?void 0:qe.id)||"",type:1};D==null||D.postTicket(ie).then(ze=>{D.uploadMinioFile(ze.minio,q).then(()=>{var Xr,Kr;const St=(Xr=ze.minio.endpoints)==null?void 0:Xr[0],tn=ze.minio.bucket,Kn=(Kr=ze.minio.fileKeys)==null?void 0:Kr[0];De(`${location.protocol}//${St}/${tn}/${Kn}`)}).catch(()=>{})}).catch(()=>{})})};z.useEffect(()=>{const G=T.current;G&&!Dm&&G.scrollTo({top:G.scrollHeight})},[c]);const xm=(G,q)=>new Promise(he=>{if(!q.file.url||!(n!=null&&n.id))return he();const De=Et(K({},q.file),{type:1});D==null||D.postApplicationIdSessionKnowledgeSessionFile(n==null?void 0:n.id,G,De).finally(()=>{var ie;(ie=ht.current)==null||ie.update().finally(he)})}),XL=()=>{var G;(G=i==null?void 0:i.data)!=null&&G.id&&(jt(!1),i.suspend())},KL=G=>{const q=T.current;q&&setTimeout(()=>{q.scrollTo({top:q.scrollHeight,behavior:G==null?void 0:G.behavior})},G==null?void 0:G.ms)},ex=()=>{if(!T.current)return;const G=T.current.scrollTop<=-80;UL(G)},tx=hr.useMemoizedFn(G=>{var q,he;(q=re.current)==null||q.update(G),(he=re.current)==null||he.focus()}),nx=hr.useMemoizedFn(G=>{Lm(G)}),rx=hr.useMemoizedFn(()=>{var q;if(!((q=i==null?void 0:i.data)!=null&&q.id))return;de.current=[...c.slice(1,c.length)],M(de.current);const G=new Ha("",i.data.id,Oe.IHistoryRole.System);G.isWaiting=!0,de.current=[G,...de.current],M(de.current),Kt(!0),jt(!0),i.answerAgain()});z.useEffect(()=>{var G,q;O.current=(G=i==null?void 0:i.data)==null?void 0:G.id,!jm&&((q=B.current)==null||q.clear())},[i]);const ix=()=>{var he;if(!((he=i==null?void 0:i.data)!=null&&he.id))return;const q=c[c.length-1].messageTime;i.fetchMessages({endTime:q,pageSize:Tz}).then(De=>{const ie=De||[];if(!ie||!(ie!=null&&ie.length)){va(!1);return}ie.length<10?va(!1):va(!0),M([...c,...ie.reverse()])})},ax=G=>Ge(exports,null,function*(){var q,he;if(!((q=i==null?void 0:i.data)!=null&&q.id))u(G);else{if(yield i.setNetOpen(G),!((he=i.data)!=null&&he.id))return;u(G)}}),ou=()=>Ge(exports,null,function*(){i?i.fetchData().then(G=>{var q;(q=i==null?void 0:i.data)!=null&&q.id&&(u(G.netOpen),Bi(G.enableNetOpen))}):(u(typeof(k==null?void 0:k.connectNetwork)=="object"&&typeof(k==null?void 0:k.connectNetwork.default)=="boolean"?k.connectNetwork.default:!1),Bi(n.arrange[0].enableNetOpen))});z.useEffect(()=>{ou()},[i]),z.useEffect(()=>{requestAnimationFrame(()=>{var q,he;if(T.current){const De=document.getElementById("chat-main"),ie=(q=T.current)==null?void 0:q.querySelector(".infinite-scroll-component__outerdiv"),qe=(he=T.current)==null?void 0:he.querySelector(".infinite-scroll-component");if(!ie||!qe||!De)return;const ze=De.offsetHeight;if(qe.offsetHeight<=ze){if(ie.style.height==="100%")return;ie.style.height="100%"}else{if(ie.style.height==="auto")return;ie.style.height="auto"}}})},[c]),z.useEffect(()=>{if(i)return;const G=()=>{const De=((y==null?void 0:y.promptVariables)||[]).filter(ie=>ie.type?!(ie.type===Oe.PromptVariableType.User&&ie.key==="query")&&!(ie.type===Oe.PromptVariableType.System&&ie.key==="datetime")&&ie.status===1:ie.key!=="query"&&ie.status===1).map((ie,qe)=>{var St,tn;let ze="";return typeof(k==null?void 0:k.promptVariables)=="object"&&(ze=((tn=(St=k.promptVariables.default)==null?void 0:St.find(Kn=>Kn.key===ie.key&&Kn.type===ie.type))==null?void 0:tn.value)||""),{id:qe+"",key:ie.key,name:ie.name,value:ze,type:ie.type}});Oa([...De].sort((ie,qe)=>ie.key.localeCompare(qe.key)))};return y!=null&&y.ready?G():y==null||y.addEventListener("ready",G),()=>{y==null||y.removeEventListener("ready",G)}},[i,y,k==null?void 0:k.promptVariables]);const Cm=()=>a==null?void 0:a({netOpen:l?cr.OPEN:cr.CLOSE}).then(G=>{var q,he;return s==null||s(G),Lr(!1),u(!!((q=G.data)!=null&&q.netOpen)),Bi(!!((he=G.data)!=null&&he.enableNetOpen)),es(G),G}),Sm=z.useMemo(()=>{var G;return n.arrange&&((G=n.arrange[0])!=null&&G.openingContent)?f.jsx(UE,{application:n,history:{role:1,content:n.arrange[0].openingContent,code:200,messageId:"opening-message",sessionId:"",reference:[],searchReference:[],messageTime:qt(Date.now()).format("YYYY-MM-DD HH:mm:ss"),actions:[],isLoading:!1},actions:!!c.length,markdown:k==null?void 0:k.markdown}):null},[n==null?void 0:n.arrange,c]);return z.useImperativeHandle(t,()=>({getCurrentInputText:()=>{var G;return(G=re.current)==null?void 0:G.getCurrentText()}})),z.useEffect(()=>{var q;const G=(q=i==null?void 0:i.data)==null?void 0:q.id;G&&ot(he=>Et(K({},he),{[G]:[]}))},[(Om=i==null?void 0:i.data)==null?void 0:Om.id]),f.jsxs("div",{className:"agent-chat",children:[BL?f.jsx("div",{className:"session-loading",children:f.jsx(v.Spin,{})}):f.jsxs(f.Fragment,{children:[(w==null?void 0:w.promptVariables)&&f.jsx(BE,{ref:Ut,appId:n.id,currentSession:i,promptVariables:Xn,setPromptVariables:Oa,setCurrentSession:s}),f.jsxs("div",{className:"chat-main",id:"chat-main",style:C,children:[f.jsx("div",{className:"chat-main-wrapper",id:"scrollableDiv",style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column-reverse"},ref:T,onScroll:ex,children:(vm=i==null?void 0:i.data)!=null&&vm.id&&(c!=null&&c.length)?f.jsxs(dx,{dataLength:c.length,next:ix,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:c.length>Tz&&((km=T.current)!=null&&km.scrollTop)&&((Ym=T.current)==null?void 0:Ym.scrollTop)<-10?f.jsx(v.Divider,{plain:!0,children:"没有更多数据了"}):null,hasMore:Am,loader:f.jsx("div",{style:{height:"50px",textAlign:"center",overflow:"hidden"},children:f.jsx(v.Spin,{})}),scrollableTarget:"scrollableDiv",children:[c.map((G,q)=>f.jsx(JV,{application:n,currentSession:i,history:G,docViewerUrl:r,isLastHistory:q===0,onRelatedClick:nx,onAgainClick:rx,onEditClick:tx,markdown:k==null?void 0:k.markdown},G.messageId+q)),!Am&&Sm]}):f.jsxs("div",{className:"main-empty",children:[(k==null?void 0:k.greeting)!==!1&&f.jsx(CV,{text:k!=null&&k.greeting&&typeof k.greeting=="object"&&k.greeting.text!==void 0?k.greeting.text:(Rm=n.arrange)!=null&&Rm.length&&((_m=n.arrange[0])!=null&&_m.greetings)?n.arrange[0].greetings:yz.text,icon:k===void 0||k.greeting===!0||((Um=k.greeting)==null?void 0:Um.icon)===void 0?$||yz.icon:k.greeting.icon,children:!!xe.length&&(((k==null?void 0:k.greeting)===void 0||(k==null?void 0:k.greeting))===!0||typeof(k==null?void 0:k.greeting)=="object"&&k.greeting.questions!==!1)&&f.jsx(PE,{ref:B,sid:(Qm=i==null?void 0:i.data)==null?void 0:Qm.id,isRecommendClearing:Je,data:xe,layoutBreakpoints:typeof(k==null?void 0:k.greeting)=="object"?k.greeting.layoutBreakpoints:void 0,onItemClick:G=>{var he,De,ie;if(g(G==null?void 0:G.question),lt(G==null?void 0:G.question),Je)return;G!=null&&G.id&&$e(!0);const q=(he=i==null?void 0:i.data)==null?void 0:he.id;w!=null&&w.fileUpload?(ie=(De=ht.current)==null?void 0:De.clear())==null||ie.then(()=>{var qe,ze;G!=null&&G.id&&(q?(qe=xm(q,G))==null||qe.finally(()=>{$e(!1)}):($e(!1),Lr(!0),(ze=Cm())==null||ze.then(St=>{var tn;(tn=xm(St.id,G))==null||tn.finally(()=>{$e(!1)})})))}):q?$e(!1):($e(!1),Lr(!0),Cm())}})}),Sm]})}),Rn&&f.jsx("div",{className:"session-stop",children:f.jsx(v.Button,{type:"primary",style:{background:"white"},ghost:!0,size:"small",icon:f.jsx(nt,{type:"icon-zantinghuida",style:{fontSize:16}}),onClick:()=>XL(),children:"停止回答"})}),Dm&&(c==null?void 0:c.length)>0&&f.jsx("div",{className:"back-bottom",children:f.jsx(v.Button,{size:"small",onClick:()=>KL({behavior:"smooth"}),type:"link",icon:f.jsx(nt,{type:"icon-yijianhuidaodibu",style:{fontSize:24}})})})]}),f.jsx("div",{className:"chat-footer",children:f.jsxs("div",{className:"chat-footer-input",children:[L.length>0&&f.jsx("div",{className:"input-files",children:L.map((G,q)=>f.jsx(EV,{className:"thumb-40",file:G,actions:{upload:he=>Ge(exports,null,function*(){X(De=>De+1);try{return yield ZL(he)}finally{X(De=>Math.max(0,De-1))}}),remove:()=>{ae(he=>he.filter((De,ie)=>ie!==q)),Ee(he=>he.filter((De,ie)=>ie!==q))}},onUrlChange:he=>{Ee(De=>{const ie=[...De];return ie[q]=he,ie})}},q))}),f.jsxs(v.Space,{className:"footer-upload-action",onClick:G=>G.preventDefault(),children:[f.jsxs(v.Space,{children:[(n.type===Oe.ApplicationTypes.Agent&&(w==null?void 0:w.imageUpload)||n.type===Oe.ApplicationTypes.Dialog&&((Pm=n.arrange)==null?void 0:Pm.length)&&!!n.arrange[0].visionOpen&&(w==null?void 0:w.imageUpload))&&f.jsx(v.Upload,{multiple:!0,disabled:L.length>=zs||_,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:qL,className:"footer-upload-picture",showUploadList:!1,children:L.length<zs?f.jsx(v.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:f.jsx("div",{children:`支持上传.jpg .png .jpeg
|
|
320
|
-
.bmp格式的图片数据,单文件最大20M,最多${zs}张`}),children:f.jsx(v.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:f.jsx(nt,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}):f.jsx(v.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},disabled:!0,icon:f.jsx(nt,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}),o&&(w!=null&&w.fileUpload)&&(n!=null&&n.id)?f.jsx(FE,{appId:n==null?void 0:n.id,ref:ht,isFirstSession:jm,docViewerUrl:r,onStatusChange:G=>Ge(exports,null,function*(){G!=="process"?(We(!0),ou()):We(!1)}),createSession:()=>new Promise(G=>{Lr(!0),a==null||a({netOpen:l?cr.OPEN:cr.CLOSE}).then(q=>{var De,ie,qe;s==null||s(q),Lr(!1),u(!!((De=q.data)!=null&&De.netOpen)),Bi(!!((ie=q.data)!=null&&ie.enableNetOpen)),es(q);const he=((qe=q.data)==null?void 0:qe.id)||"";G(he)})}),sid:(Fm=i==null?void 0:i.data)==null?void 0:Fm.id,disabled:lr||_,afterFileAdd:(G,q)=>{q&&ot(he=>{const De=he[q]||[];return{[q]:[...De,G]}})},afterFileDelete:G=>{var he;const q=(he=i==null?void 0:i.data)==null?void 0:he.id;q&&ot(De=>{const ie=De[q]||[];return{[q]:ie.filter(qe=>qe.id!==G)}})},onFileListChange:G=>{_e(G)},shouldContinue:Ye,afterFilesClear:()=>{var q;const G=(q=i==null?void 0:i.data)==null?void 0:q.id;G&&(ot({[G]:[]}),ou())}}):null,(w==null?void 0:w.prompt)&&(n==null?void 0:n.id)&&f.jsx(ZV,{appId:n.id,list:[],search:ne?Qe:"",onPromptSelect:G=>{lt(G.context),g(G.context)},disabled:_})]}),f.jsxs(v.Space,{children:[(w==null?void 0:w.connectNetwork)&&n.type===Oe.ApplicationTypes.Dialog&&((Bm=n.arrange)==null?void 0:Bm.length)&&!!n.arrange[0].enableNetOpen&&f.jsx(GV,{sessionId:(Gm=i==null?void 0:i.data)==null?void 0:Gm.id,netStatus:l,enable:typeof(k==null?void 0:k.connectNetwork)=="object"&&typeof(k==null?void 0:k.connectNetwork.diabled)=="boolean"?!(k!=null&&k.connectNetwork.diabled):FL,disabledTip:i?void 0:"网络访问已被禁用",onNetStatusChange:G=>{ax(G)}}),(w==null?void 0:w.sessionList)&&f.jsx(QV,{currentSessionId:(Wm=i==null?void 0:i.data)==null?void 0:Wm.id,onSessionChange:(G,q)=>{lt(void 0),Ko(!0),s==null||s(q)},disabled:_}),J&&fe==="float"&&f.jsx("div",{className:"session-history-drawer-component",children:f.jsx(v.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:G=>G.parentNode,content:"会话历史记录",children:f.jsx(v.Button,{className:"history-overlay-action",disabled:_,type:"text",icon:f.jsx(nt,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>wm(!0)})})}),(w==null?void 0:w.sessionOpen)&&f.jsx(v.Button,{icon:f.jsx(mt.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:Rn||!i||!c.length||_,onClick:()=>{var G,q;Ko(!1),s==null||s(null),Gi.current=null,u(!1),(G=Ut.current)==null||G.clear(),(q=B.current)==null||q.clear()},children:"新会话"})]})]}),f.jsx("div",{className:"footer-textarea",children:f.jsx(QE,{ref:re,maxLength:pe,text:Ve,networkStatus:!1,loading:zm||Xo,disabled:V||me||_||zm||Xo,onTextSend:Lm,onChange:(G,q)=>{lt(G);const he=q.getText().replace(/[\n\s]+$/,"");g(he),ct(he),ne||Ce(!0)},clearAction:f.jsx(v.Space,{size:0,children:f.jsx(v.Button,{type:"link",disabled:lr||_,ghost:!0,icon:f.jsx(nt,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>HL()})})})})]})}),f.jsx(OV,{tips:b}),H&&f.jsx(YV,{isvisible:H,files:Te,sessionId:(Hm=i==null?void 0:i.data)==null?void 0:Hm.id,onClose:G=>{Z(!1),Xt(!1)}})]}),bm&&f.jsx(BV,{currentSession:i,application:n,networkStatus:l,setCurrentSession:s,disabled:_,isSessionHistoryVisible:bm,setIsSessionHistoryVisible:wm,onSessionChange:G=>{Ko(!0)}})]})});const HE=e=>{const{disabled:t,checkedValues:n,currKnowledgeList:r,selectCount:i,onSelectChange:a}=e,[o,s]=z.useState(!1),l=f.jsx(v.Checkbox.Group,{style:{width:"100%"},onChange:a,value:n,disabled:t,children:f.jsx(v.Row,{gutter:[20,12],children:r==null?void 0:r.map(c=>f.jsx(v.Col,{span:24,children:f.jsx(v.Checkbox,{value:c.id,children:c.name})},c.id))})}),u=c=>{s(c)};return f.jsx("div",{className:"knowledge-select",style:{borderColor:o?"#9C24F2":"#84868C"},children:f.jsx(v.Popover,{className:"select-popover",placement:"bottomRight",title:null,content:l,trigger:"click",overlayStyle:{width:280},onOpenChange:u,getPopupContainer:c=>c.parentNode,children:f.jsxs("div",{className:"",onClick:c=>c.preventDefault(),children:[f.jsx(nt,{className:"select-icon",type:"icon-open"}),f.jsx("span",{className:"title",children:"参考知识库"}),f.jsxs("span",{className:"content",children:["已选 ",i," 个"]})]})})})},KV=e=>{var T,D;const{currentSession:t,application:n,setCheckKnowledges:r}=e,{mode:i,transform:a,features:o}=z.useContext(Wt),[s,l]=z.useState([]),[u,c]=z.useState(typeof(o==null?void 0:o.knowledges)=="object"?((T=o.knowledges.default)==null?void 0:T.map(y=>y.id))||[]:[]),[M,d]=z.useState(0),[g,p]=z.useState(!1);z.useEffect(()=>{if(!(n!=null&&n.id))return;const y=n.arrange;if(!(y!=null&&y.length))return;const b=y[0].knowledges||[];l(b);const w=typeof(o==null?void 0:o.knowledges)=="object"&&o.knowledges.default||b;if(Array.isArray(w)&&w.some(x=>Array.isArray(x.fileIds)&&x.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(dl(w||[])>ii)throw Error(`knowledges and fileIds total count cannot exceed ${ii}`);if(!t){c(w.map(P=>P.id)),d(w.length),r==null||r(w);return}const U=()=>{const P=t.knowledges||w;d(P.length);const x=P.map(C=>C.id);c(x)};return U(),t.addEventListener("data:updated",U),()=>{t==null||t.removeEventListener("data:updated",U)}},[n,t]),z.useEffect(()=>{var I;if(!g||(p(!1),!(n!=null&&n.id)))return;const y=[];u==null||u.map(b=>{const w=s==null?void 0:s.find(A=>A.id===b);y.push(w)}),(I=t==null?void 0:t.data)!=null&&I.id&&t.setKnowledges(y)},[g]);const m=y=>{p(!0),c(y);const I=[];y==null||y.map(b=>{const w=s==null?void 0:s.find(A=>A.id===b);I.push(w)}),r==null||r(I),d(y.length)};return f.jsxs("div",{className:"chat-header",children:[f.jsxs(v.Space,{className:"header-title",children:[i==="inlay"&&((D=t==null?void 0:t.data)==null?void 0:D.name),i==="float"&&(n==null?void 0:n.name)]}),(a==null?void 0:a.knowledges)&&s.length!==0&&f.jsx(HE,{disabled:typeof(o==null?void 0:o.knowledges)=="object"&&(o==null?void 0:o.knowledges.diabled)||!1,checkedValues:u,currKnowledgeList:s,selectCount:M,onSelectChange:m})]})};const eZ=z.forwardRef((e,t)=>{const{sessionId:n,appId:r,docViewerUrl:i}=e,[a,o]=z.useState(),{showHeader:s,agentClient:l,sider:u,onSessionLoad:c,features:M,mode:d}=z.useContext(Wt),[g,p]=z.useState(),m=z.useRef(null),[T,D]=z.useState(""),[y,I]=z.useState(),b=z.useRef(null),[w,A]=z.useState(!1);z.useState([]);const{setIsSwitchingToExistingSession:U}=Xf();z.useEffect(()=>{var x;A(a?!!((x=a.data)!=null&&x.netOpen):typeof(M==null?void 0:M.connectNetwork)=="object"&&typeof(M==null?void 0:M.connectNetwork.default)=="boolean"?M.connectNetwork.default:!1)},[a]),z.useEffect(()=>{const x=()=>Ge(exports,null,function*(){const C=l==null?void 0:l.application;if(!(C!=null&&C.id))return;const _=C==null?void 0:C.arrange;if(!(_!=null&&_.length))return;const F=_[0].embeddingService;D(F),p(C)});if(l!=null&&l.ready){x();return}return l==null||l.addEventListener("ready",()=>x()),()=>{l==null||l.removeEventListener("ready",x)}},[l]),z.useEffect(()=>{l&&n&&(l.ready?l==null||l.getSessions().then(x=>Ge(exports,null,function*(){o==null||o(x.find(C=>C.id===n))})):l.addEventListener("ready",()=>Ge(exports,null,function*(){l==null||l.getSessions().then(x=>Ge(exports,null,function*(){o==null||o(x.find(C=>C.id===n))}))}),!0))},[l,n]),z.useEffect(()=>{if(!a){c&&c({applicationId:r,sessionId:"",session:null,sessionInstance:null});return}a.data&&c&&c({applicationId:r,sessionId:a.data.id,session:a.data,sessionInstance:a}),a.addEventListener("data:loaded",()=>{a!=null&&a.data&&c&&c({applicationId:r,sessionId:a.data.id,session:a.data,sessionInstance:a})},!0)},[a]);const P=x=>{var C;return(C=m.current)==null?void 0:C.create(Et(K({},x),{knowledges:y}))};return z.useImperativeHandle(t,()=>({createSession:x=>P(x),getSessionList:()=>{var C;const x=((C=m.current)==null?void 0:C.list())||[];return Promise.resolve(x)},getCurrentInputText:()=>{var x;return(x=b.current)==null?void 0:x.getCurrentInputText()}})),f.jsx("div",{className:"dialog",children:f.jsxs("div",{className:"dialog-pannel",children:[f.jsx("div",{className:"dialog-sider",style:{display:u&&d==="inlay"?"block":"none"},children:f.jsx(Kf,{ref:m,appId:r,networkStatus:w,currentSession:a,application:g,setCurrentSession:o,checkKnowledges:y,setCheckKnowledges:s?I:void 0,sessionId:n,afterSessionClick:x=>{var C,_;((C=x.data)==null?void 0:C.id)!==((_=a==null?void 0:a.data)==null?void 0:_.id)&&U(!0)}})}),f.jsx("div",{className:"dialog-content",children:f.jsxs("div",{className:"dialog-chat",children:[s&&f.jsx("div",{className:"dialog-chat-header",children:f.jsx(KV,{setCheckKnowledges:I,application:g,currentSession:a})}),f.jsx("div",{className:"dialog-chat-content",children:(g==null?void 0:g.id)&&f.jsx(XV,{setNetworkStatus:A,networkStatus:w,application:g,currentSession:a,onCreateSession:P,docViewerUrl:i,embeddingService:T,setCurrentSession:o,ref:b})})]})})]})})}),tZ=z.forwardRef((e,t)=>{const{className:n,triggerButton:r,size:i,theme:a,icon:o,docViewerUrl:s,token:l,debug:u,env:c,plugins:M,mcp:d,footer:g,defaultInput:p,onComment:m,onSessionLoad:T,onSessionUnload:D,onMessage:y,beforeMessageSend:I,bodyStyle:b,apiUrl:w,sessionId:A,disabled:U,transform:P,features:x,stream:C,agentClient:_,application:k}=e,F=z.useRef(null),[$,J]=z.useState(!1),[fe,V]=z.useState(),[se,de]=z.useState(i),[O,pe]=z.useState(e.open),ye=z.useRef(null);z.useEffect(()=>{k&&(console.log("[AgentClientUI] token",_,k),V(k.id))},[k]),v.ConfigProvider.config({theme:a}),z.useEffect(()=>{i&&de(i)},[i]);const L=(ae,{element:we,size:Ee})=>{de({width:Number(Ee.width),height:Ee.height})};return z.useImperativeHandle(t,()=>({createSession:ae=>{var we;return(we=ye.current)==null?void 0:we.createSession(ae)},getSessionList:()=>{var ae;return(ae=ye.current)==null?void 0:ae.getSessionList()},getCurrentInputText:()=>{var ae;return(ae=ye.current)==null?void 0:ae.getCurrentInputText()}})),f.jsx(v.ConfigProvider,{locale:Sz,children:f.jsxs(Yz,{value:Et(K({},e),{popupContainer:F,agentClient:_,footer:g,defaultInput:p,onComment:m,onSessionLoad:T,onSessionUnload:D,onMessage:y,beforeMessageSend:I,bodyStyle:b,disabled:U,transform:P,features:x}),children:[f.jsx(ux.Resizable,{height:(se==null?void 0:se.height)||"100%",width:(se==null?void 0:se.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(i==null?void 0:i.minWidth)],onResize:L,handle:f.jsx("span",{className:"resize-handle-ew"}),resizeHandles:n=="float"?["w"]:[],children:f.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${n} ${O?"opened":"closed"}`,style:Et(K({},i),{width:n=="float"?se==null?void 0:se.width:i==null?void 0:i.width,height:n==="float"?se==null?void 0:se.height:i==null?void 0:i.height,maxHeight:"100vh"}),ref:F,children:[$?f.jsx("div",{className:"loading",children:f.jsx(v.Spin,{})}):fe&&_?f.jsx(PV,{children:f.jsx(eZ,{ref:ye,appId:fe,docViewerUrl:s,bodyStyle:b,sessionId:A})}):null,(r==null?void 0:r.visible)&&f.jsx(v.Button,{className:"trigger-btn close-btn",icon:f.jsx("img",{src:o}),onClick:()=>pe(!1)})]})}),(r==null?void 0:r.visible)&&!O&&f.jsx(v.Button,{className:`${n}-trigger-btn open-btn`,style:r.style,icon:f.jsx("img",{src:o}),onClick:()=>pe(!0)})]})})}),nZ="@glodon-aiot/agent-cli-ui",rZ="3.10.0-alpha.14",iZ="./dist/es/index.mjs",aZ="./dist/lib/index.js",oZ="./dist/src/index.d.ts",sZ={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},lZ=["dist"],uZ="module",cZ="dist/src/index.d.ts",MZ={dev:"vite",start:"vite",build:"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn","build:pre":"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod","build:cdn":"tsc && vite build --mode prod --config ./vite.config.cdn.ts",preview:"vite preview",check:"yarn prettier --check .",write:"yarn prettier --write .",lint:"eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",storybook:"start-storybook -p 6006 -s public","build-storybook":"build-storybook -s public",docs:"start-storybook -p 6006",commit:"cz"},dZ={antd:">=4.0.0",react:">=16.9.0","react-dom":">=16.9.0",webpack:"*"},gZ={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.10.0-alpha.14","@glodon-aiot/bot-client-sdk":"^3.10.0-alpha.14","@matejmazur/react-mathjax":"^0.1.10","@react-pdf-viewer/core":"^3.12.0","@react-pdf-viewer/default-layout":"^3.12.0","@react-pdf-viewer/locales":"^1.0.0","@react-pdf-viewer/toolbar":"^3.12.0",ahooks:"^3.8.5",axios:"0.24.0",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.13",lodash:"^4.17.21","quill-delta":"^5.1.0","react-infinite-scroll-component":"^6.1.0","react-quill-new":"^3.6.0","react-resizable":"^3.0.5",uuid:"^11.1.0"},pZ={"@babel/core":"^7.20.12","@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^11.1.6","@storybook/addon-actions":"6.3.6","@storybook/addon-essentials":"6.4.9","@storybook/addon-interactions":"^6.5.16","@storybook/addon-links":"6.3.5","@storybook/addon-postcss":"2.0.0","@storybook/builder-vite":"^0.4.0","@storybook/node-logger":"6.4.9","@storybook/react":"6.4.9","@storybook/testing-library":"^0.0.13","@types/lodash":"^4","@types/react":"^16.9.0 || ^17.0.0 || ^18.0.0","@types/react-dom":"^16.9.0 || ^17.0.0 || ^18.0.0","@typescript-eslint/eslint-plugin":"^5.35.1","@typescript-eslint/parser":"^5.35.1","@vitejs/plugin-react":"^3.1.0",antd:"^4.24.0","babel-loader":"^8.3.0","babel-plugin-import":"^1.13.8",commitizen:"^4.3.0","css-loader":"^6.7.3","cz-conventional-changelog":"^3.3.0","cz-customizable":"^7.0.0",eslint:"^8.0.1","eslint-config-prettier":"^8.5.0","eslint-config-standard-with-typescript":"^22.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.0","eslint-plugin-storybook":"^0.6.10",husky:">=6",less:"^4.1.2","less-loader":"^11.1.0","lint-staged":">=10","postcss-loader":"^7.2.4",prettier:"2.7.1",react:"^17.0.2","react-dom":"^17.0.2","require-from-string":"^2.0.2","rollup-plugin-visualizer":"^6.0.1","storybook-less-loader":"^0.1.0",typescript:"*",vite:"^4.1.1","vite-plugin-css-injected-by-js":"^3.5.0","vite-plugin-dts":"^4.3.0","vite-plugin-externalize-deps":"^0.9.0"},NZ=[">0.2%","not dead","not op_mini all"],fZ=["last 1 chrome version","last 1 firefox version","last 1 safari version"],mZ={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},hZ={access:"public",registry:"https://registry.npmjs.org/"},yZ={hooks:{"commit-msg":"validate-commit-msg"}},TZ={name:nZ,version:rZ,module:iZ,main:aZ,typings:oZ,exports:sZ,files:lZ,type:uZ,types:cZ,scripts:MZ,peerDependencies:dZ,dependencies:gZ,devDependencies:pZ,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:NZ,development:fZ,config:mZ,publishConfig:hZ,husky:yZ};var $E=(e=>(e.dev="https://aiot-dev.glodon.com/api/cvforcepd",e.test="https://aiot-dev.glodon.com/api/cvforce",e.prod="https://copilot.glodon.com/api/cvforce",e.local="http://localhost:3000/api/cvforcepd",e))($E||{});//! moment.js
|
|
320
|
+
.bmp格式的图片数据,单文件最大20M,最多${zs}张`}),children:f.jsx(v.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:f.jsx(nt,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}):f.jsx(v.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},disabled:!0,icon:f.jsx(nt,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}),o&&(w!=null&&w.fileUpload)&&(n!=null&&n.id)?f.jsx(FE,{appId:n==null?void 0:n.id,ref:ht,isFirstSession:jm,docViewerUrl:r,onStatusChange:G=>Ge(exports,null,function*(){G!=="process"?(We(!0),ou()):We(!1)}),createSession:()=>new Promise(G=>{Lr(!0),a==null||a({netOpen:l?cr.OPEN:cr.CLOSE}).then(q=>{var De,ie,qe;s==null||s(q),Lr(!1),u(!!((De=q.data)!=null&&De.netOpen)),Bi(!!((ie=q.data)!=null&&ie.enableNetOpen)),es(q);const he=((qe=q.data)==null?void 0:qe.id)||"";G(he)})}),sid:(Fm=i==null?void 0:i.data)==null?void 0:Fm.id,disabled:lr||_,afterFileAdd:(G,q)=>{q&&ot(he=>{const De=he[q]||[];return{[q]:[...De,G]}})},afterFileDelete:G=>{var he;const q=(he=i==null?void 0:i.data)==null?void 0:he.id;q&&ot(De=>{const ie=De[q]||[];return{[q]:ie.filter(qe=>qe.id!==G)}})},onFileListChange:G=>{_e(G)},shouldContinue:Ye,afterFilesClear:()=>{var q;const G=(q=i==null?void 0:i.data)==null?void 0:q.id;G&&(ot({[G]:[]}),ou())}}):null,(w==null?void 0:w.prompt)&&(n==null?void 0:n.id)&&f.jsx(ZV,{appId:n.id,list:[],search:ne?Qe:"",onPromptSelect:G=>{lt(G.context),g(G.context)},disabled:_})]}),f.jsxs(v.Space,{children:[(w==null?void 0:w.connectNetwork)&&n.type===Oe.ApplicationTypes.Dialog&&((Bm=n.arrange)==null?void 0:Bm.length)&&!!n.arrange[0].enableNetOpen&&f.jsx(GV,{sessionId:(Gm=i==null?void 0:i.data)==null?void 0:Gm.id,netStatus:l,enable:typeof(k==null?void 0:k.connectNetwork)=="object"&&typeof(k==null?void 0:k.connectNetwork.diabled)=="boolean"?!(k!=null&&k.connectNetwork.diabled):FL,disabledTip:i?void 0:"网络访问已被禁用",onNetStatusChange:G=>{ax(G)}}),(w==null?void 0:w.sessionList)&&f.jsx(QV,{currentSessionId:(Wm=i==null?void 0:i.data)==null?void 0:Wm.id,onSessionChange:(G,q)=>{lt(void 0),Ko(!0),s==null||s(q)},disabled:_}),J&&fe==="float"&&f.jsx("div",{className:"session-history-drawer-component",children:f.jsx(v.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:G=>G.parentNode,content:"会话历史记录",children:f.jsx(v.Button,{className:"history-overlay-action",disabled:_,type:"text",icon:f.jsx(nt,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>wm(!0)})})}),(w==null?void 0:w.sessionOpen)&&f.jsx(v.Button,{icon:f.jsx(mt.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:Rn||!i||!c.length||_,onClick:()=>{var G,q;Ko(!1),s==null||s(null),Gi.current=null,u(!1),(G=Ut.current)==null||G.clear(),(q=B.current)==null||q.clear()},children:"新会话"})]})]}),f.jsx("div",{className:"footer-textarea",children:f.jsx(QE,{ref:re,maxLength:pe,text:Ve,networkStatus:!1,loading:zm||Xo,disabled:V||me||_||zm||Xo,onTextSend:Lm,onChange:(G,q)=>{lt(G);const he=q.getText().replace(/[\n\s]+$/,"");g(he),ct(he),ne||Ce(!0)},clearAction:f.jsx(v.Space,{size:0,children:f.jsx(v.Button,{type:"link",disabled:lr||_,ghost:!0,icon:f.jsx(nt,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>HL()})})})})]})}),f.jsx(OV,{tips:b}),H&&f.jsx(YV,{isvisible:H,files:Te,sessionId:(Hm=i==null?void 0:i.data)==null?void 0:Hm.id,onClose:G=>{Z(!1),Xt(!1)}})]}),bm&&f.jsx(BV,{currentSession:i,application:n,networkStatus:l,setCurrentSession:s,disabled:_,isSessionHistoryVisible:bm,setIsSessionHistoryVisible:wm,onSessionChange:G=>{Ko(!0)}})]})});const HE=e=>{const{disabled:t,checkedValues:n,currKnowledgeList:r,selectCount:i,onSelectChange:a}=e,[o,s]=z.useState(!1),l=f.jsx(v.Checkbox.Group,{style:{width:"100%"},onChange:a,value:n,disabled:t,children:f.jsx(v.Row,{gutter:[20,12],children:r==null?void 0:r.map(c=>f.jsx(v.Col,{span:24,children:f.jsx(v.Checkbox,{value:c.id,children:c.name})},c.id))})}),u=c=>{s(c)};return f.jsx("div",{className:"knowledge-select",style:{borderColor:o?"#9C24F2":"#84868C"},children:f.jsx(v.Popover,{className:"select-popover",placement:"bottomRight",title:null,content:l,trigger:"click",overlayStyle:{width:280},onOpenChange:u,getPopupContainer:c=>c.parentNode,children:f.jsxs("div",{className:"",onClick:c=>c.preventDefault(),children:[f.jsx(nt,{className:"select-icon",type:"icon-open"}),f.jsx("span",{className:"title",children:"参考知识库"}),f.jsxs("span",{className:"content",children:["已选 ",i," 个"]})]})})})},KV=e=>{var T,D;const{currentSession:t,application:n,setCheckKnowledges:r}=e,{mode:i,transform:a,features:o}=z.useContext(Wt),[s,l]=z.useState([]),[u,c]=z.useState(typeof(o==null?void 0:o.knowledges)=="object"?((T=o.knowledges.default)==null?void 0:T.map(y=>y.id))||[]:[]),[M,d]=z.useState(0),[g,p]=z.useState(!1);z.useEffect(()=>{if(!(n!=null&&n.id))return;const y=n.arrange;if(!(y!=null&&y.length))return;const b=y[0].knowledges||[];l(b);const w=typeof(o==null?void 0:o.knowledges)=="object"&&o.knowledges.default||b;if(Array.isArray(w)&&w.some(x=>Array.isArray(x.fileIds)&&x.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(dl(w||[])>ii)throw Error(`knowledges and fileIds total count cannot exceed ${ii}`);if(!t){c(w.map(P=>P.id)),d(w.length),r==null||r(w);return}const U=()=>{const P=t.knowledges||w;d(P.length);const x=P.map(C=>C.id);c(x)};return U(),t.addEventListener("data:updated",U),()=>{t==null||t.removeEventListener("data:updated",U)}},[n,t]),z.useEffect(()=>{var I;if(!g||(p(!1),!(n!=null&&n.id)))return;const y=[];u==null||u.map(b=>{const w=s==null?void 0:s.find(A=>A.id===b);y.push(w)}),(I=t==null?void 0:t.data)!=null&&I.id&&t.setKnowledges(y)},[g]);const m=y=>{p(!0),c(y);const I=[];y==null||y.map(b=>{const w=s==null?void 0:s.find(A=>A.id===b);I.push(w)}),r==null||r(I),d(y.length)};return f.jsxs("div",{className:"chat-header",children:[f.jsxs(v.Space,{className:"header-title",children:[i==="inlay"&&((D=t==null?void 0:t.data)==null?void 0:D.name),i==="float"&&(n==null?void 0:n.name)]}),(a==null?void 0:a.knowledges)&&s.length!==0&&f.jsx(HE,{disabled:typeof(o==null?void 0:o.knowledges)=="object"&&(o==null?void 0:o.knowledges.diabled)||!1,checkedValues:u,currKnowledgeList:s,selectCount:M,onSelectChange:m})]})};const eZ=z.forwardRef((e,t)=>{const{sessionId:n,appId:r,docViewerUrl:i}=e,[a,o]=z.useState(),{showHeader:s,agentClient:l,sider:u,onSessionLoad:c,features:M,mode:d}=z.useContext(Wt),[g,p]=z.useState(),m=z.useRef(null),[T,D]=z.useState(""),[y,I]=z.useState(),b=z.useRef(null),[w,A]=z.useState(!1);z.useState([]);const{setIsSwitchingToExistingSession:U}=Xf();z.useEffect(()=>{var x;A(a?!!((x=a.data)!=null&&x.netOpen):typeof(M==null?void 0:M.connectNetwork)=="object"&&typeof(M==null?void 0:M.connectNetwork.default)=="boolean"?M.connectNetwork.default:!1)},[a]),z.useEffect(()=>{const x=()=>Ge(exports,null,function*(){const C=l==null?void 0:l.application;if(!(C!=null&&C.id))return;const _=C==null?void 0:C.arrange;if(!(_!=null&&_.length))return;const F=_[0].embeddingService;D(F),p(C)});if(l!=null&&l.ready){x();return}return l==null||l.addEventListener("ready",()=>x()),()=>{l==null||l.removeEventListener("ready",x)}},[l]),z.useEffect(()=>{l&&n&&(l.ready?l==null||l.getSessions().then(x=>Ge(exports,null,function*(){o==null||o(x.find(C=>C.id===n))})):l.addEventListener("ready",()=>Ge(exports,null,function*(){l==null||l.getSessions().then(x=>Ge(exports,null,function*(){o==null||o(x.find(C=>C.id===n))}))}),!0))},[l,n]),z.useEffect(()=>{if(!a){c&&c({applicationId:r,sessionId:"",session:null,sessionInstance:null});return}a.data&&c&&c({applicationId:r,sessionId:a.data.id,session:a.data,sessionInstance:a}),a.addEventListener("data:loaded",()=>{a!=null&&a.data&&c&&c({applicationId:r,sessionId:a.data.id,session:a.data,sessionInstance:a})},!0)},[a]);const P=x=>{var C;return(C=m.current)==null?void 0:C.create(Et(K({},x),{knowledges:y}))};return z.useImperativeHandle(t,()=>({createSession:x=>P(x),getSessionList:()=>{var C;const x=((C=m.current)==null?void 0:C.list())||[];return Promise.resolve(x)},getCurrentInputText:()=>{var x;return(x=b.current)==null?void 0:x.getCurrentInputText()}})),f.jsx("div",{className:"dialog",children:f.jsxs("div",{className:"dialog-pannel",children:[f.jsx("div",{className:"dialog-sider",style:{display:u&&d==="inlay"?"block":"none"},children:f.jsx(Kf,{ref:m,appId:r,networkStatus:w,currentSession:a,application:g,setCurrentSession:o,checkKnowledges:y,setCheckKnowledges:s?I:void 0,sessionId:n,afterSessionClick:x=>{var C,_;((C=x.data)==null?void 0:C.id)!==((_=a==null?void 0:a.data)==null?void 0:_.id)&&U(!0)}})}),f.jsx("div",{className:"dialog-content",children:f.jsxs("div",{className:"dialog-chat",children:[s&&f.jsx("div",{className:"dialog-chat-header",children:f.jsx(KV,{setCheckKnowledges:I,application:g,currentSession:a})}),f.jsx("div",{className:"dialog-chat-content",children:(g==null?void 0:g.id)&&f.jsx(XV,{setNetworkStatus:A,networkStatus:w,application:g,currentSession:a,onCreateSession:P,docViewerUrl:i,embeddingService:T,setCurrentSession:o,ref:b})})]})})]})})}),tZ=z.forwardRef((e,t)=>{const{className:n,triggerButton:r,size:i,theme:a,icon:o,docViewerUrl:s,token:l,debug:u,env:c,plugins:M,mcp:d,footer:g,defaultInput:p,onComment:m,onSessionLoad:T,onSessionUnload:D,onMessage:y,beforeMessageSend:I,bodyStyle:b,apiUrl:w,sessionId:A,disabled:U,transform:P,features:x,stream:C,agentClient:_,application:k}=e,F=z.useRef(null),[$,J]=z.useState(!1),[fe,V]=z.useState(),[se,de]=z.useState(i),[O,pe]=z.useState(e.open),ye=z.useRef(null);z.useEffect(()=>{k&&(console.log("[AgentClientUI] token",_,k),V(k.id))},[k]),v.ConfigProvider.config({theme:a}),z.useEffect(()=>{i&&de(i)},[i]);const L=(ae,{element:we,size:Ee})=>{de({width:Number(Ee.width),height:Ee.height})};return z.useImperativeHandle(t,()=>({createSession:ae=>{var we;return(we=ye.current)==null?void 0:we.createSession(ae)},getSessionList:()=>{var ae;return(ae=ye.current)==null?void 0:ae.getSessionList()},getCurrentInputText:()=>{var ae;return(ae=ye.current)==null?void 0:ae.getCurrentInputText()}})),f.jsx(v.ConfigProvider,{locale:Sz,children:f.jsxs(Yz,{value:Et(K({},e),{popupContainer:F,agentClient:_,footer:g,defaultInput:p,onComment:m,onSessionLoad:T,onSessionUnload:D,onMessage:y,beforeMessageSend:I,bodyStyle:b,disabled:U,transform:P,features:x}),children:[f.jsx(ux.Resizable,{height:(se==null?void 0:se.height)||"100%",width:(se==null?void 0:se.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(i==null?void 0:i.minWidth)],onResize:L,handle:f.jsx("span",{className:"resize-handle-ew"}),resizeHandles:n=="float"?["w"]:[],children:f.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${n} ${O?"opened":"closed"}`,style:Et(K({},i),{width:n=="float"?se==null?void 0:se.width:i==null?void 0:i.width,height:n==="float"?se==null?void 0:se.height:i==null?void 0:i.height,maxHeight:"100vh"}),ref:F,children:[$?f.jsx("div",{className:"loading",children:f.jsx(v.Spin,{})}):fe&&_?f.jsx(PV,{children:f.jsx(eZ,{ref:ye,appId:fe,docViewerUrl:s,bodyStyle:b,sessionId:A})}):null,(r==null?void 0:r.visible)&&f.jsx(v.Button,{className:"trigger-btn close-btn",icon:f.jsx("img",{src:o}),onClick:()=>pe(!1)})]})}),(r==null?void 0:r.visible)&&!O&&f.jsx(v.Button,{className:`${n}-trigger-btn open-btn`,style:r.style,icon:f.jsx("img",{src:o}),onClick:()=>pe(!0)})]})})}),nZ="@glodon-aiot/agent-cli-ui",rZ="3.10.0-alpha.15",iZ="./dist/es/index.mjs",aZ="./dist/lib/index.js",oZ="./dist/src/index.d.ts",sZ={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},lZ=["dist"],uZ="module",cZ="dist/src/index.d.ts",MZ={dev:"vite",start:"vite",build:"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn","build:pre":"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod","build:cdn":"tsc && vite build --mode prod --config ./vite.config.cdn.ts",preview:"vite preview",check:"yarn prettier --check .",write:"yarn prettier --write .",lint:"eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",storybook:"start-storybook -p 6006 -s public","build-storybook":"build-storybook -s public",docs:"start-storybook -p 6006",commit:"cz"},dZ={antd:">=4.0.0",react:">=16.9.0","react-dom":">=16.9.0",webpack:"*"},gZ={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.10.0-alpha.15","@glodon-aiot/bot-client-sdk":"^3.10.0-alpha.15","@matejmazur/react-mathjax":"^0.1.10","@react-pdf-viewer/core":"^3.12.0","@react-pdf-viewer/default-layout":"^3.12.0","@react-pdf-viewer/locales":"^1.0.0","@react-pdf-viewer/toolbar":"^3.12.0",ahooks:"^3.8.5",axios:"0.24.0",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.13",lodash:"^4.17.21","quill-delta":"^5.1.0","react-infinite-scroll-component":"^6.1.0","react-quill-new":"^3.6.0","react-resizable":"^3.0.5",uuid:"^11.1.0"},pZ={"@babel/core":"^7.20.12","@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^11.1.6","@storybook/addon-actions":"6.3.6","@storybook/addon-essentials":"6.4.9","@storybook/addon-interactions":"^6.5.16","@storybook/addon-links":"6.3.5","@storybook/addon-postcss":"2.0.0","@storybook/builder-vite":"^0.4.0","@storybook/node-logger":"6.4.9","@storybook/react":"6.4.9","@storybook/testing-library":"^0.0.13","@types/lodash":"^4","@types/react":"^16.9.0 || ^17.0.0 || ^18.0.0","@types/react-dom":"^16.9.0 || ^17.0.0 || ^18.0.0","@typescript-eslint/eslint-plugin":"^5.35.1","@typescript-eslint/parser":"^5.35.1","@vitejs/plugin-react":"^3.1.0",antd:"^4.24.0","babel-loader":"^8.3.0","babel-plugin-import":"^1.13.8",commitizen:"^4.3.0","css-loader":"^6.7.3","cz-conventional-changelog":"^3.3.0","cz-customizable":"^7.0.0",eslint:"^8.0.1","eslint-config-prettier":"^8.5.0","eslint-config-standard-with-typescript":"^22.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.0","eslint-plugin-storybook":"^0.6.10",husky:">=6",less:"^4.1.2","less-loader":"^11.1.0","lint-staged":">=10","postcss-loader":"^7.2.4",prettier:"2.7.1",react:"^17.0.2","react-dom":"^17.0.2","require-from-string":"^2.0.2","rollup-plugin-visualizer":"^6.0.1","storybook-less-loader":"^0.1.0",typescript:"*",vite:"^4.1.1","vite-plugin-css-injected-by-js":"^3.5.0","vite-plugin-dts":"^4.3.0","vite-plugin-externalize-deps":"^0.9.0"},NZ=[">0.2%","not dead","not op_mini all"],fZ=["last 1 chrome version","last 1 firefox version","last 1 safari version"],mZ={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},hZ={access:"public",registry:"https://registry.npmjs.org/"},yZ={hooks:{"commit-msg":"validate-commit-msg"}},TZ={name:nZ,version:rZ,module:iZ,main:aZ,typings:oZ,exports:sZ,files:lZ,type:uZ,types:cZ,scripts:MZ,peerDependencies:dZ,dependencies:gZ,devDependencies:pZ,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:NZ,development:fZ,config:mZ,publishConfig:hZ,husky:yZ};var $E=(e=>(e.dev="https://aiot-dev.glodon.com/api/cvforcepd",e.test="https://aiot-dev.glodon.com/api/cvforce",e.prod="https://copilot.glodon.com/api/cvforce",e.local="http://localhost:3000/api/cvforcepd",e))($E||{});//! moment.js
|
|
321
321
|
//! version : 2.30.1
|
|
322
322
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
323
323
|
//! license : MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/agent-cli-ui",
|
|
3
|
-
"version": "3.10.0-alpha.
|
|
3
|
+
"version": "3.10.0-alpha.15",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ant-design/icons": "^5.3.4",
|
|
40
|
-
"@glodon-aiot/apis": "^3.10.0-alpha.
|
|
41
|
-
"@glodon-aiot/bot-client-sdk": "^3.10.0-alpha.
|
|
40
|
+
"@glodon-aiot/apis": "^3.10.0-alpha.15",
|
|
41
|
+
"@glodon-aiot/bot-client-sdk": "^3.10.0-alpha.15",
|
|
42
42
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
43
43
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
44
44
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|