@glodon-aiot/agent-cli-ui 3.15.0 → 3.15.5-alpha.2

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.
@@ -1,10 +1,10 @@
1
- const e = "@glodon-aiot/agent-cli-ui", t = "3.15.0", s = "./dist/es/index.mjs", i = "./dist/lib/index.js", o = "./dist/src/index.d.ts", n = {
1
+ const e = "@glodon-aiot/agent-cli-ui", t = "3.15.5-alpha.2", 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"
5
- }, r = [
5
+ }, l = [
6
6
  "dist"
7
- ], c = "module", l = "dist/src/index.d.ts", d = {
7
+ ], r = "module", c = "dist/src/index.d.ts", d = {
8
8
  dev: "vite",
9
9
  start: "vite",
10
10
  build: "tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn",
@@ -25,8 +25,8 @@ const e = "@glodon-aiot/agent-cli-ui", t = "3.15.0", s = "./dist/es/index.mjs",
25
25
  webpack: "*"
26
26
  }, p = {
27
27
  "@ant-design/icons": "^5.3.4",
28
- "@glodon-aiot/apis": "^3.15.0",
29
- "@glodon-aiot/bot-client-sdk": "^3.15.0",
28
+ "@glodon-aiot/apis": "^3.15.5-alpha.2",
29
+ "@glodon-aiot/bot-client-sdk": "^3.15.5-alpha.2",
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",
@@ -125,9 +125,9 @@ const e = "@glodon-aiot/agent-cli-ui", t = "3.15.0", s = "./dist/es/index.mjs",
125
125
  main: i,
126
126
  typings: o,
127
127
  exports: n,
128
- files: r,
129
- type: c,
130
- types: l,
128
+ files: l,
129
+ type: r,
130
+ types: c,
131
131
  scripts: d,
132
132
  peerDependencies: a,
133
133
  dependencies: p,
@@ -148,7 +148,7 @@ export {
148
148
  u as devDependencies,
149
149
  b as development,
150
150
  n as exports,
151
- r as files,
151
+ l as files,
152
152
  v as husky,
153
153
  i as main,
154
154
  s as module,
@@ -157,8 +157,8 @@ export {
157
157
  m as production,
158
158
  y as publishConfig,
159
159
  d as scripts,
160
- c as type,
161
- l as types,
160
+ r as type,
161
+ c as types,
162
162
  o as typings,
163
163
  t as version
164
164
  };
@@ -1 +1 @@
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}
1
+ .gbot-dialog-modal .bot-session-container{height:100%}.gbot-dialog-modal .bot-session-container .agent-sessions{height:100%;width:310px;display:flex;flex-direction:column;overflow:hidden;background:white}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-header{height:56px;padding:0 16px;border-right:1px solid #e8e9eb;border-bottom:1px solid #e8e9eb;display:flex;justify-content:space-between;align-items:center}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-header .session-header-title{color:#151b26;font-size:18px;font-weight:700;line-height:24px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main{flex:1;border-right:1px solid #e8e9eb;overflow-y:auto}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-header-btn-wrapper{position:sticky;top:0;z-index:2;background-color:#fff;width:100%;height:48px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-header-btn-wrapper .session-header-btn{width:70px;height:24px;padding:0;font-size:12px;border-radius:10px 10px 10px 2px;margin:16px 0 0 16px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-group .group-header{padding:16px;font-size:14px;font-weight:700;background-color:#fff;position:sticky;z-index:1}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item{width:100%;padding:8px 0;cursor:pointer;margin-bottom:4px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper{width:100%;height:100%;padding:0 16px;height:26px;border-left:3px solid #f9f2ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top{font-size:14px;font-weight:700;line-height:22px;height:22px;width:100%;margin-bottom:4px;display:flex;justify-content:space-between}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-title{max-width:calc(100% - 100px);margin-right:4px;color:#5c5f66}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-time{display:flex;width:100px;color:#84868c;font-size:12px;line-height:22px;justify-content:flex-end}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-action{display:none;font-size:12px;align-items:center}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-action .icon-action{color:#9c24f2}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-action .icon-action:hover{color:#b452ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item__active{border-radius:4px;background:#f9f2ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item__active .session-item-wrapper{border-left:3px solid #9c24f2}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item:hover{border-radius:4px;background:#f9f2ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item:hover .session-item-top .item-top-action{display:flex}
@@ -1 +1 @@
1
- .gbot-dialog-modal .bot-session-container{height:100%}.gbot-dialog-modal .bot-session-container .agent-sessions{height:100%;width:310px;display:flex;flex-direction:column;overflow:hidden;background:white}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-header{height:56px;padding:0 16px;border-right:1px solid #e8e9eb;border-bottom:1px solid #e8e9eb;display:flex;justify-content:space-between;align-items:center}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-header .session-header-title{color:#151b26;font-size:18px;font-weight:700;line-height:24px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main{flex:1;border-right:1px solid #e8e9eb;overflow-y:auto}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-header-btn-wrapper{position:sticky;top:0;z-index:2;background-color:#fff;width:100%;height:48px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-header-btn-wrapper .session-header-btn{width:70px;height:24px;padding:0;font-size:12px;border-radius:10px 10px 10px 2px;margin:16px 0 0 16px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-group .group-header{padding:16px;font-size:14px;font-weight:700;background-color:#fff;position:sticky;z-index:1}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item{width:100%;padding:8px 0;cursor:pointer;margin-bottom:4px}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper{width:100%;height:100%;padding:0 16px;height:26px;border-left:3px solid #f9f2ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top{font-size:14px;font-weight:700;line-height:22px;height:22px;width:100%;margin-bottom:4px;display:flex;justify-content:space-between}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-title{max-width:calc(100% - 100px);margin-right:4px;color:#5c5f66}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-time{display:flex;width:100px;color:#84868c;font-size:12px;line-height:22px;justify-content:flex-end}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-action{display:none;font-size:12px;align-items:center}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-action .icon-action{color:#9c24f2}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item .session-item-wrapper .session-item-top .item-top-action .icon-action:hover{color:#b452ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item__active{border-radius:4px;background:#f9f2ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item__active .session-item-wrapper{border-left:3px solid #9c24f2}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item:hover{border-radius:4px;background:#f9f2ff}.gbot-dialog-modal .bot-session-container .agent-sessions .sessions-main .session-item:hover .session-item-top .item-top-action{display:flex}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
1
+ .gbot-dialog-modal .json-display{margin:0;padding:4px}
@@ -1 +1 @@
1
- .gbot-dialog-modal .json-display{margin:0;padding:4px}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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}
@@ -1 +1 @@
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}
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/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=>`![](${o})`).join(`
318
318
  `);i=a?`${a}
319
319
  ${i}`:i}}return i},MZ=A.forwardRef((e,t)=>{var Gm,Wm,Hm,$m,qm,Vm,Zm,Jm,Xm,Km,eh,th,nh,rh;const{application:n,docViewerUrl:r="",currentSession:i,onCreateSession:a,embeddingService:o,setCurrentSession:s,networkStatus:l,setNetworkStatus:u}=e,[c,M]=A.useState([]),[d,g]=A.useState(),[p,m]=A.useState(),T=A.useRef(null),{service:D,agentClient:y,depId:I,footer:w,transform:b,defaultInput:z,onMessage:_,onHistoryLoad:P,beforeMessageSend:x,bodyStyle:C,disabled:R,features:Y,popupContainer:G,icon:q,sider:J,mode:pe}=A.useContext(qt),[Z,oe]=A.useState(!1),de=A.useRef(c),v=A.useRef(void 0),[fe,he]=A.useState(0),[L,ie]=A.useState([]),[Le,Ee]=A.useState([]),[Fe,H]=A.useState(0),[me,ye]=A.useState(!1);A.useEffect(()=>{ye(Fe>0)},[Fe]);const X=A.useRef(null),[ze,Ue]=A.useState([]),[$e,qe]=A.useState(!1),[ee,be]=A.useState(!1),[ke,ct]=A.useState(""),[Ze,lt]=A.useState(),[ft,ot]=A.useState({}),mt=A.useRef(null),Ft=A.useRef(null),B=A.useRef(null),[$,K]=A.useState(!1),[Te,Re]=A.useState([]),[Dt,We]=A.useState(!0),[Oe,en]=A.useState(!0),[Qn,zt]=A.useState(!1),[Mr,tn]=A.useState(!1),[wm,ex]=A.useState(!1),[tr,Ya]=A.useState(typeof(Y==null?void 0:Y.promptVariables)=="object"?Y.promptVariables.default||[]:[]),[tx,nx]=A.useState(()=>{const F=typeof(Y==null?void 0:Y.knowledges)=="object"&&Y.knowledges.default||void 0;if(F){if(Array.isArray(F)&&F.some(De=>Array.isArray(De.fileIds)&&De.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(pl(F)>ai)throw Error(`knowledges and fileIds total count cannot exceed ${ai}`)}return F}),[Em,ji]=A.useState(!1),[Lm,Ra]=A.useState(!1),[rx,_a]=A.useState(typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.default)=="boolean"?Y.connectNetwork.default:!1),[xm,ts]=A.useState(!1),[ix,Kr]=A.useState(!1),[ax,ox]=A.useState(null),[ns,Ai]=A.useState(!1),[Cm,Sm]=A.useState(!1),{isSwitchingToExistingSession:vm,setIsSwitchingToExistingSession:rs}=rm(),Hi=A.useRef(null);A.useEffect(()=>{if(ox(i),i===null)Kr(!1);else if(i===void 0)Kr(!0);else{if(ax===null){if(vm){Kr(!0),rs(!1);return}Kr(!1);return}i.ready?Kr(!1):Kr(!0)}},[i,i==null?void 0:i.ready,vm]),A.useEffect(()=>{var se,De;i&&(de.current=[]),M([]);const F=T.current;if(F&&F.scrollTo({top:0}),!((se=i==null?void 0:i.data)!=null&&se.id))return;if(tn(!1),zt(!1),(De=i.messages)!=null&&De.length){const Ve=[...i.messages.filter(Ie=>Ie==null?void 0:Ie.messageId)].reverse();de.current=[...Ve],M([...Ve]),Kr(!1)}const V=re=>{var Ve;(Ve=i==null?void 0:i.data)!=null&&Ve.id&&(de.current=[...re].reverse(),M([...re].reverse()),!re||re.length<10?Ra(!1):Ra(!0),Kr(!1),P&&P({applicationId:n.id,sessionId:i.data.id,histories:re}))};return i.addEventListener("history:loaded",V),()=>{de.current=[],M([]),i==null||i.removeEventListener("history:loaded",V)}},[i]),A.useEffect(()=>{const F=()=>{var V;(V=i==null?void 0:i.data)!=null&&V.id&&(i.promptVariables&&Ya(i.promptVariables.sort((se,De)=>se.key.localeCompare(De.key))),i.knowledges&&nx(i.knowledges),u(i.netOpen))};return i==null||i.addEventListener("data:updated",F),()=>{i==null||i.removeEventListener("data:updated",F)}},[i]),A.useEffect(()=>{var V;if(!((V=i==null?void 0:i.data)!=null&&V.id))return;const F=se=>{var De;console.error(se.message,se.cause,"e.case"),U.notification.config({getContainer:()=>(G==null?void 0:G.current)||document.body,prefixCls:"gbot-notification"}),U.notification.error({message:((De=se.cause)==null?void 0:De.message)||se.message}),U.notification.config({getContainer:void 0,prefixCls:"gbot-notification"})};return i.addEventListener("error",F),()=>{i==null||i.removeEventListener("error",F)}},[i]);const sx=()=>{var se;if(!((se=i==null?void 0:i.data)!=null&&se.id)||!(n!=null&&n.id))return;const F=i.data.id,V=c[c.length-1];if(V&&V.isContext){hn("success","已开启新话题");return}else i.clear().then(()=>{const De=new Za("",F,Se.IHistoryRole.System);De.isContext=!0,M([De,...c])})};A.useEffect(()=>{n!=null&&n.id&&(D==null||D.getRecommendQues(n.id).then(F=>{Ue(F)}))},[I,n]);const Om=F=>Ge(exports,null,function*(){var nr,Ln;if(R){hn("error","发送功能被禁用");return}const V=F||d;if(!(V!=null&&V.trim())){hn("error","请输入你想问的");return}if(!(tr==null?void 0:tr.every(Qt=>!!(Qt!=null&&Qt.value))))if(b!=null&&b.promptVariables){hn("error","变量值不能为空");return}else console.error("变量值不能为空",tr==null?void 0:tr.map(Qt=>!!(Qt!=null&&Qt.value)));if(Mr){hn("error","正在回复中");return}if(Z){hn("error","等待初始化");return}if(!Dt){hn("error","正在解析文件");return}if(me){hn("error","正在上传图片");return}ie([]),Ee([]);const De=(nr=i==null?void 0:i.data)==null?void 0:nr.id;if(!De){if(ns)return;Ai(!0),a==null||a({netOpen:l?ii.OPEN:ii.CLOSE}).then(Qt=>{var yt,Cr;ji(!0),u(!!((yt=Qt.data)!=null&&yt.netOpen)),_a(!!((Cr=Qt.data)!=null&&Cr.enableNetOpen)),su(Qt).then(()=>{s==null||s(Qt),ji(!1),m(V)})}).catch(Qt=>{Ai(!1)});return}if(ns)return;Ai(!0),ts(!0);const re=cp(V,Le,ft[De],(n==null?void 0:n.type)||0);let Ve;try{x?Ve=yield x==null?void 0:x({applicationId:n.id,sessionId:De,message:{content:re,sessionId:De,role:Se.ChatMessageRole.User,files:ft[De]}}):Ve=!0}catch(Qt){Ve=!1}if(ts(!1),Ve===!1){Ai(!1);return}let Ie=V;typeof Ve=="object"&&(Ie=Ve.content||V);const Yt=yield(()=>new Promise(Qt=>{Ya(yt=>(Qt(yt),yt))}))();if(!(yield i.setPromptVariables(Yt))){Ai(!1);return}((Ln=ft[De])==null?void 0:Ln.length)>0?lx(Ie):lu(Ie)}),su=F=>new Promise((V,se)=>Ge(exports,null,function*(){const Ve=(F==null?void 0:F.promptVariables).filter(Ie=>Ie.type?!((Ie.type===Se.PromptVariableType.User||Ie.type===void 0)&&Ie.key==="query")&&!((Ie.type===Se.PromptVariableType.System||Ie.type===void 0)&&Ie.key==="datetime"):Ie.key!=="query").map(Ie=>{var Yt;const Tt=(Yt=tr.find(nn=>nn.key===Ie.key&&nn.type===Ie.type))==null?void 0:Yt.value;return Ie.value=Tt||"",Ie});Ya(Ve.sort((Ie,Tt)=>Ie.key.localeCompare(Tt.key))),yield F==null?void 0:F.setPromptVariables(Ve).catch(Ie=>{console.error(Ie),hn("error",Ie.message)}),V()})),lx=F=>{var re,Ve,Ie;if(We(!1),!((re=i==null?void 0:i.data)!=null&&re.id)||!(n!=null&&n.id))return;const V=((Ve=i.data)==null?void 0:Ve.id)||"";let se=[],De=new Set;(Ie=ft[V])==null||Ie.forEach(Tt=>{De.has(Tt.id)||(se.push(Tt),De.add(Tt.id))}),We(!0),lu(F,se)};A.useEffect(()=>{if(!p||!i)return;const F=p,V=()=>Ge(exports,null,function*(){ts(!0);const se=cp(F,Le,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:se,sessionId:i.id,role:Se.ChatMessageRole.User,files:ft[i.id]}}):De=!0}catch(re){De=!1}if(ts(!1),De===!1){Ai(!1);return}lu(F),m(void 0)});return i.ready?V():i.addEventListener("ready",V,!0),()=>{i==null||i.removeEventListener("ready",V)}},[p,i]);const lu=(F,V)=>Ge(exports,null,function*(){var nr,Ln,Qt;const se=(nr=i==null?void 0:i.data)==null?void 0:nr.id;if(!se)return;tn(!0),zt(!0);const De=cp(F,Le,V,(n==null?void 0:n.type)||0);let re;if(n.type===Se.ApplicationTypes.Agent)re=void 0;else if(n.type===Se.ApplicationTypes.Dialog&&((Ln=n.arrange)!=null&&Ln.length)&&n.arrange[0].visionOpen){const yt=Le&&Le.length?Le.filter(Boolean):[];re=yt.length?yt:void 0}else re=void 0;const Ve=new Za(De,se,Se.IHistoryRole.User,V,re);g(void 0),lt(void 0),de.current=[Ve,...c],M(de.current),n.id&&_&&_({applicationId:n.id,sessionId:se,message:Ve});const Ie=new Za("",se,Se.IHistoryRole.System);Ie.isWaiting=!0,de.current=[Ie,...de.current],M(de.current);const Tt=(V==null?void 0:V.map(yt=>yt.id))||[],Yt={stream:Ka.configuration.stream,referenceFirst:!1};if(b!=null&&b.promptVariables){const yt=tr==null?void 0:tr.reduce((Cr,$i)=>(Cr[$i.key]=$i.value,Cr),{});Yt.formatValues=yt}if(b!=null&&b.knowledges){const yt=tx;Yt.knowledges=yt}const nn={text:De,fileIds:Tt,files:V};re&&re.length>0&&(nn.imageContent=re),yield i.send(nn,Yt),ot({[se]:[]}),(Qt=mt.current)==null||Qt.update(),ie([]),Ee([]),Ai(!1)});A.useEffect(()=>{var De;const F=(De=i==null?void 0:i.data)==null?void 0:De.id;if(!F)return;const V=re=>{if(!re.sessionId||re.sessionId&&re.sessionId!==v.current||re.role===Se.IHistoryRole.User)return;if(re.index===-1&&re.code!==200&&re.code!==11915&&(zt(!1),tn(!1),de.current=de.current.filter(Tt=>!Tt.isWaiting),M([...de.current]),de.current=[...de.current],re.content)){U.notification.config({getContainer:()=>(G==null?void 0:G.current)||document.body,prefixCls:"gbot-notification"}),U.notification.error({message:re.content}),U.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const Ve=re.actions||[],Ie=new Za(re.content,F,Se.IHistoryRole.Robot);Ie.messageId=re.messageId||fo.v4(),Ie.reasoningContent=re.reasoningContent,Ie.searchReference=re.searchReference,Ie.thinkingSecs=re.thinkingSecs,Ie.thinkingStatus=re.thinkingStatus,Ie.actions=Ve,Ie.isLoading=!0,Ie.searchingStatus=re.searchingStatus,de.current=de.current.filter(Tt=>!Tt.isWaiting).filter(Tt=>!Tt.isReplying),re.index===void 0&&M([Ie,...de.current]),re.code===11915&&(zt(!1),tn(!1),Ie.isLoading=!1,Ie.content="请您换个问题问我吧~",Ie.isSensitive=!0,M([Ie,...de.current])),re.index===-2&&(zt(!1),tn(!1),Ie.isLoading=!1,Ie.content="回答已中止~",Ie.isSuspend=!0,M([Ie,...de.current])),re.index===-1&&(zt(!1),tn(!1),Ie.isLoading=!1,Ie.reference=re.reference,M([Ie,...de.current]),n.id&&_&&_({applicationId:n.id,sessionId:F,message:Ie})),re.index===-3&&(zt(!1),tn(!1),Ie.isLoading=!1,Ie.reference=re.reference,Ie.relatedQuesion=re.relatedQuesion,M([Ie,...de.current]))},se=()=>{i.addEventListener("message:updated",V)};return i.ready?i.addEventListener("message:updated",V):i.addEventListener("ready",se),()=>{i==null||i.removeEventListener("message:updated",V),i==null||i.removeEventListener("ready",se)}},[i]),A.useEffect(()=>{if(!i){oe(!1);return}const F=V=>{oe(V)};return oe(i.frozen),i.addEventListener("frozen",F),()=>{i==null||i.removeEventListener("frozen",F)}},[i]),A.useEffect(()=>{if(!y)return;const F=y.questionContextMaxLength||4e3;he(F)},[y,D]),A.useEffect(()=>{z&&lt(z.text)},[z]),A.useEffect(()=>{U.message.config({getContainer:()=>(G==null?void 0:G.current)||document.body,prefixCls:"gbot-message",maxCount:5})},[G]);const hn=(F,V,se)=>{U.message.open({type:F,content:V,key:se})},km=F=>{const V=F.size;return V<=0?(hn("error","该文件为空,请重新上传"),!1):V>up*Fs?(hn("error",`图片须小于${up}M`),!1):(ie(se=>se.length>=xi?(hn("warning",`图片最多上传${xi}张`),se):[...se,F]),!1)},ux=()=>{var F;return(n.type===Se.ApplicationTypes.Agent&&(b==null?void 0:b.imageUpload)||n.type===Se.ApplicationTypes.Dialog&&((F=n.arrange)==null?void 0:F.length)&&!!n.arrange[0].visionOpen&&(b==null?void 0:b.imageUpload))&&!R},cx=()=>!!o&&(b==null?void 0:b.fileUpload)&&(n==null?void 0:n.id)&&!R,Ym=F=>{var Ln,Qt;const V=Array.from(F||[]).filter(Boolean);if(!V.length)return;const se=ux(),De=cx(),re=[],Ve=[];let Ie=0,Tt=0,Yt=0;V.forEach(yt=>{var ih,ah,oh;if(((ih=yt.type)==null?void 0:ih.startsWith("image/"))||!!w1(yt.name)){se?re.push(yt):Ie++;return}const $i=(oh=(ah=yt.name)==null?void 0:ah.split(".").pop())==null?void 0:oh.toLowerCase();if(KE.includes(yt.type)||["pdf","doc","docx"].includes($i||"")){De?Ve.push(yt):Tt++;return}Yt++});const nn=[],nr=Ie+Tt+Yt;if(!De&&!se)nr&&nn.push(`当前不支持上传文件/图片,已忽略${nr}个文件`);else if(De&&!se){const yt=Ie+Yt;yt&&nn.push(`仅支持上传 .doc/.docx/.pdf 文件,已忽略${yt}个其他类型文件`)}else if(!De&&se){const yt=Tt+Yt;yt&&nn.push(`仅支持上传图片(.jpg/.jpeg/.png/.bmp),已忽略${yt}个其他类型文件`)}else Yt&&nn.push(`存在不支持的文件类型,已忽略${Yt}个文件`);if(nn.length&&hn("warning",nn.join(";"),"precheck-warn"),re.length){const yt=Math.max(0,xi-L.length),Cr=re.slice(0,yt);Cr.forEach($i=>km($i)),re.length>Cr.length&&hn("warning",`最多上传${xi}张图片`)}Ve.length&&((Qt=(Ln=mt.current)==null?void 0:Ln.appendFiles)==null||Qt.call(Ln,Ve))},Rm=F=>{var se;const V=(se=F.clipboardData)==null?void 0:se.files;V&&V.length&&(F.preventDefault(),F.stopPropagation(),Ym(V))},_m=F=>{F.preventDefault()},Um=F=>{var se;F.preventDefault(),F.stopPropagation();const V=(se=F.dataTransfer)==null?void 0:se.files;V&&V.length&&Ym(V)},Qm=()=>Ge(exports,null,function*(){var F;return(F=i==null?void 0:i.data)!=null&&F.id?i:(Hi.current||(Hi.current=new Promise((V,se)=>{ji(!0),a==null||a({netOpen:l?ii.OPEN:ii.CLOSE}).then(De=>{var re,Ve;s==null||s(De),ji(!1),u(!!((re=De.data)!=null&&re.netOpen)),_a(!!((Ve=De.data)!=null&&Ve.enableNetOpen)),su(De),V(De)}).catch(De=>{Hi.current=null,se(De)})})),Hi.current)}),Mx=F=>Ge(exports,null,function*(){const V=yield Qm();return dx(V,F)}),dx=(F,V)=>{const se=w1(V.name);return new Promise(De=>{var Ve;const re={files:[`${fo.v4()}.${se}`],isv:"minio",knowledgeId:((Ve=F.data)==null?void 0:Ve.id)||"",type:1};D==null||D.postTicket(re).then(Ie=>{D.uploadMinioFile(Ie.minio,V).then(()=>{var nr,Ln;const Tt=(nr=Ie.minio.endpoints)==null?void 0:nr[0],Yt=Ie.minio.bucket,nn=(Ln=Ie.minio.fileKeys)==null?void 0:Ln[0];De(`${Ie.minio.useSSL?"https:":location.protocol}//${Tt}/${Yt}/${nn}`)}).catch(()=>{})}).catch(()=>{})})};A.useEffect(()=>{const F=T.current;F&&!wm&&F.scrollTo({top:F.scrollHeight})},[c]);const Pm=(F,V)=>new Promise(se=>{if(!V.file.url||!(n!=null&&n.id))return se();const De=xt(te({},V.file),{type:1});D==null||D.postApplicationIdSessionKnowledgeSessionFile(n==null?void 0:n.id,F,De).finally(()=>{var re;(re=mt.current)==null||re.update().finally(se)})}),gx=()=>{var F;(F=i==null?void 0:i.data)!=null&&F.id&&(zt(!1),i.suspend())},px=F=>{const V=T.current;V&&setTimeout(()=>{V.scrollTo({top:V.scrollHeight,behavior:F==null?void 0:F.behavior})},F==null?void 0:F.ms)},Nx=()=>{if(!T.current)return;const F=T.current.scrollTop<=-80;ex(F)},fx=Tr.useMemoizedFn(F=>{var V,se;(V=X.current)==null||V.update(F),(se=X.current)==null||se.focus()}),mx=Tr.useMemoizedFn(F=>{Om(F)}),hx=Tr.useMemoizedFn(()=>{var V;if(!((V=i==null?void 0:i.data)!=null&&V.id))return;de.current=[...c.slice(1,c.length)],M(de.current);const F=new Za("",i.data.id,Se.IHistoryRole.System);F.isWaiting=!0,de.current=[F,...de.current],M(de.current),tn(!0),zt(!0),i.answerAgain()});A.useEffect(()=>{var F,V;v.current=(F=i==null?void 0:i.data)==null?void 0:F.id,!Em&&((V=B.current)==null||V.clear())},[i]);const yx=()=>{var se;if(!((se=i==null?void 0:i.data)!=null&&se.id))return;const V=c[c.length-1].messageTime;i.fetchMessages({endTime:V,pageSize:O1}).then(De=>{const re=De||[];if(!re||!(re!=null&&re.length)){Ra(!1);return}re.length<10?Ra(!1):Ra(!0),M([...c,...re.reverse()])})},Tx=F=>Ge(exports,null,function*(){var V,se;if(!((V=i==null?void 0:i.data)!=null&&V.id))u(F);else{if(yield i.setNetOpen(F),!((se=i.data)!=null&&se.id))return;u(F)}}),uu=()=>Ge(exports,null,function*(){i?i.fetchData().then(F=>{var V;(V=i==null?void 0:i.data)!=null&&V.id&&(u(F.netOpen),_a(F.enableNetOpen))}):(u(typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.default)=="boolean"?Y.connectNetwork.default:!1),_a(n.arrange[0].enableNetOpen))});A.useEffect(()=>{uu()},[i]),A.useEffect(()=>{requestAnimationFrame(()=>{var V,se;if(T.current){const De=document.getElementById("chat-main"),re=(V=T.current)==null?void 0:V.querySelector(".infinite-scroll-component__outerdiv"),Ve=(se=T.current)==null?void 0:se.querySelector(".infinite-scroll-component");if(!re||!Ve||!De)return;const Ie=De.offsetHeight;if(Ve.offsetHeight<=Ie){if(re.style.height==="100%")return;re.style.height="100%"}else{if(re.style.height==="auto")return;re.style.height="auto"}}})},[c]),A.useEffect(()=>{if(i)return;const F=()=>{const De=((y==null?void 0:y.promptVariables)||[]).filter(re=>re.type?!(re.type===Se.PromptVariableType.User&&re.key==="query")&&!(re.type===Se.PromptVariableType.System&&re.key==="datetime")&&re.status===1:re.key!=="query"&&re.status===1).map((re,Ve)=>{var Tt,Yt;let Ie="";return typeof(Y==null?void 0:Y.promptVariables)=="object"&&(Ie=((Yt=(Tt=Y.promptVariables.default)==null?void 0:Tt.find(nn=>nn.key===re.key&&nn.type===re.type))==null?void 0:Yt.value)||""),{id:Ve+"",key:re.key,name:re.name,value:Ie,type:re.type}});Ya([...De].sort((re,Ve)=>re.key.localeCompare(Ve.key)))};return y!=null&&y.ready?F():y==null||y.addEventListener("ready",F),()=>{y==null||y.removeEventListener("ready",F)}},[i,y,Y==null?void 0:Y.promptVariables]);const Fm=()=>a==null?void 0:a({netOpen:l?ii.OPEN:ii.CLOSE}).then(F=>{var V,se;return s==null||s(F),ji(!1),u(!!((V=F.data)!=null&&V.netOpen)),_a(!!((se=F.data)!=null&&se.enableNetOpen)),su(F),F}),Bm=A.useMemo(()=>{var F;return n.arrange&&((F=n.arrange[0])!=null&&F.openingContent)?f.jsx(eL,{application:n,history:{role:1,content:n.arrange[0].openingContent,code:200,messageId:"opening-message",sessionId:"",reference:[],searchReference:[],messageTime:Zt(Date.now()).format("YYYY-MM-DD HH:mm:ss"),actions:[],isLoading:!1},actions:!!c.length,markdown:Y==null?void 0:Y.markdown}):null},[n==null?void 0:n.arrange,c]);return A.useImperativeHandle(t,()=>({getCurrentInputText:()=>{var F;return(F=X.current)==null?void 0:F.getCurrentText()}})),A.useEffect(()=>{var V;const F=(V=i==null?void 0:i.data)==null?void 0:V.id;F&&ot(se=>xt(te({},se),{[F]:[]}))},[(Gm=i==null?void 0:i.data)==null?void 0:Gm.id]),f.jsxs("div",{className:"agent-chat",children:[ix?f.jsx("div",{className:"session-loading",children:f.jsx(U.Spin,{})}):f.jsxs(f.Fragment,{children:[(b==null?void 0:b.promptVariables)&&f.jsx(iL,{ref:Ft,appId:n.id,currentSession:i,promptVariables:tr,setPromptVariables:Ya,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:Nx,children:(Wm=i==null?void 0:i.data)!=null&&Wm.id&&(c!=null&&c.length)?f.jsxs(wx,{dataLength:c.length,next:yx,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:c.length>O1&&((Hm=T.current)!=null&&Hm.scrollTop)&&(($m=T.current)==null?void 0:$m.scrollTop)<-10?f.jsx(U.Divider,{plain:!0,children:"没有更多数据了"}):null,hasMore:Lm,loader:f.jsx("div",{style:{height:"50px",textAlign:"center",overflow:"hidden"},children:f.jsx(U.Spin,{})}),scrollableTarget:"scrollableDiv",children:[c.map((F,V)=>f.jsx(cZ,{application:n,currentSession:i,history:F,docViewerUrl:r,isLastHistory:V===0,onRelatedClick:mx,onAgainClick:hx,onEditClick:fx,markdown:Y==null?void 0:Y.markdown},F.messageId+V)),!Lm&&Bm]}):f.jsxs("div",{className:"main-empty",children:[(Y==null?void 0:Y.greeting)!==!1&&f.jsx(GV,{text:Y!=null&&Y.greeting&&typeof Y.greeting=="object"&&Y.greeting.text!==void 0?Y.greeting.text:(qm=n.arrange)!=null&&qm.length&&((Vm=n.arrange[0])!=null&&Vm.greetings)?n.arrange[0].greetings:v1.text,icon:Y===void 0||Y.greeting===!0||((Zm=Y.greeting)==null?void 0:Zm.icon)===void 0?q||v1.icon:Y.greeting.icon,children:!!ze.length&&(((Y==null?void 0:Y.greeting)===void 0||(Y==null?void 0:Y.greeting))===!0||typeof(Y==null?void 0:Y.greeting)=="object"&&Y.greeting.questions!==!1)&&f.jsx(nL,{ref:B,sid:(Jm=i==null?void 0:i.data)==null?void 0:Jm.id,isRecommendClearing:$e,data:ze,layoutBreakpoints:typeof(Y==null?void 0:Y.greeting)=="object"?Y.greeting.layoutBreakpoints:void 0,onItemClick:F=>{var se,De,re;if(g(F==null?void 0:F.question),lt(F==null?void 0:F.question),$e)return;F!=null&&F.id&&qe(!0);const V=(se=i==null?void 0:i.data)==null?void 0:se.id;b!=null&&b.fileUpload?(re=(De=mt.current)==null?void 0:De.clear())==null||re.then(()=>{var Ve,Ie;F!=null&&F.id&&(V?(Ve=Pm(V,F))==null||Ve.finally(()=>{qe(!1)}):(qe(!1),ji(!0),(Ie=Fm())==null||Ie.then(Tt=>{var Yt;(Yt=Pm(Tt.id,F))==null||Yt.finally(()=>{qe(!1)})})))}):V?qe(!1):(qe(!1),ji(!0),Fm())}})}),Bm]})}),Qn&&f.jsx("div",{className:"session-stop",children:f.jsx(U.Button,{type:"primary",style:{background:"white"},ghost:!0,size:"small",icon:f.jsx(nt,{type:"icon-zantinghuida",style:{fontSize:16}}),onClick:()=>gx(),children:"停止回答"})}),wm&&(c==null?void 0:c.length)>0&&f.jsx("div",{className:"back-bottom",children:f.jsx(U.Button,{size:"small",onClick:()=>px({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((F,V)=>f.jsx(PV,{className:"thumb-40",file:F,actions:{upload:se=>Ge(exports,null,function*(){H(De=>De+1);try{return yield Mx(se)}finally{H(De=>Math.max(0,De-1))}}),remove:()=>{ie(se=>se.filter((De,re)=>re!==V)),Ee(se=>se.filter((De,re)=>re!==V))}},onUrlChange:se=>{Ee(De=>{const re=[...De];return re[V]=se,re})}},V))}),f.jsxs(U.Space,{className:"footer-upload-action",onClick:F=>F.preventDefault(),children:[f.jsxs(U.Space,{children:[(n.type===Se.ApplicationTypes.Agent&&(b==null?void 0:b.imageUpload)||n.type===Se.ApplicationTypes.Dialog&&((Xm=n.arrange)==null?void 0:Xm.length)&&!!n.arrange[0].visionOpen&&(b==null?void 0:b.imageUpload))&&f.jsx(U.Upload,{multiple:!0,disabled:L.length>=xi||R,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:km,className:"footer-upload-picture",showUploadList:!1,children:L.length<xi?f.jsx(U.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:f.jsx("div",{children:`支持上传.jpg .png .jpeg
320
- .bmp格式的图片数据,单文件最大${up}M,最多${xi}张`}),children:f.jsx(U.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(U.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&&(b!=null&&b.fileUpload)&&(n!=null&&n.id)?f.jsx(rL,{appId:n==null?void 0:n.id,ref:mt,isFirstSession:Em,docViewerUrl:r,onStatusChange:F=>Ge(exports,null,function*(){F!=="process"?(We(!0),uu()):We(!1)}),createSession:()=>Qm().then(F=>{var se;return((se=F.data)==null?void 0:se.id)||""}),sid:(Km=i==null?void 0:i.data)==null?void 0:Km.id,disabled:Mr||R,afterFileAdd:(F,V)=>{V&&ot(se=>{const De=se[V]||[];return{[V]:[...De,F]}})},afterFileDelete:F=>{var se;const V=(se=i==null?void 0:i.data)==null?void 0:se.id;V&&ot(De=>{const re=De[V]||[];return{[V]:re.filter(Ve=>Ve.id!==F)}})},onFileListChange:F=>{Re(F)},shouldContinue:Oe,afterFilesClear:()=>{var V;const F=(V=i==null?void 0:i.data)==null?void 0:V.id;F&&(ot({[F]:[]}),uu())}}):null,(b==null?void 0:b.prompt)&&(n==null?void 0:n.id)&&f.jsx(uZ,{appId:n.id,list:[],search:ee?ke:"",onPromptSelect:F=>{lt(F.context),g(F.context)},disabled:R})]}),f.jsxs(U.Space,{children:[(b==null?void 0:b.connectNetwork)&&n.type===Se.ApplicationTypes.Dialog&&((eh=n.arrange)==null?void 0:eh.length)&&!!n.arrange[0].enableNetOpen&&f.jsx(rZ,{sessionId:(th=i==null?void 0:i.data)==null?void 0:th.id,netStatus:l,enable:typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.diabled)=="boolean"?!(Y!=null&&Y.connectNetwork.diabled):rx,disabledTip:i?void 0:"网络访问已被禁用",onNetStatusChange:F=>{Tx(F)}}),(b==null?void 0:b.sessionList)&&f.jsx(KV,{currentSessionId:(nh=i==null?void 0:i.data)==null?void 0:nh.id,onSessionChange:(F,V)=>{lt(void 0),rs(!0),s==null||s(V)},disabled:R}),J&&pe==="float"&&f.jsx("div",{className:"session-history-drawer-component",children:f.jsx(U.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:F=>F.parentNode,content:"会话历史记录",children:f.jsx(U.Button,{className:"history-overlay-action",disabled:R,type:"text",icon:f.jsx(nt,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>Sm(!0)})})}),(b==null?void 0:b.sessionOpen)&&f.jsx(U.Button,{icon:f.jsx(ht.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:Qn||!i||!c.length||R,onClick:()=>{var F,V;rs(!1),s==null||s(null),Hi.current=null,u(!1),(F=Ft.current)==null||F.clear(),(V=B.current)==null||V.clear()},children:"新会话"})]})]}),f.jsx("div",{className:"footer-textarea",onPaste:Rm,onPasteCapture:Rm,onDrop:Um,onDropCapture:Um,onDragOver:_m,onDragOverCapture:_m,children:f.jsx(tL,{ref:X,maxLength:fe,text:Ze,networkStatus:!1,loading:xm||ns,disabled:Z||me||R||xm||ns,onTextSend:Om,onChange:(F,V)=>{lt(F);const se=V.getText().replace(/[\n\s]+$/,"");g(se),ct(se),ee||be(!0)},clearAction:f.jsx(U.Space,{size:0,children:f.jsx(U.Button,{type:"link",disabled:Mr||R,ghost:!0,icon:f.jsx(nt,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>sx()})})})})]})}),f.jsx(HV,{tips:w}),$&&f.jsx(VV,{isvisible:$,files:Te,sessionId:(rh=i==null?void 0:i.data)==null?void 0:rh.id,onClose:F=>{K(!1),en(!1)}})]}),Cm&&f.jsx(nZ,{currentSession:i,application:n,networkStatus:l,setCurrentSession:s,disabled:R,isSessionHistoryVisible:Cm,setIsSessionHistoryVisible:Sm,onSessionChange:F=>{rs(!0)}})]})});const sL=e=>{const{disabled:t,checkedValues:n,currKnowledgeList:r,selectCount:i,onSelectChange:a}=e,[o,s]=A.useState(!1),l=f.jsx(U.Checkbox.Group,{style:{width:"100%"},onChange:a,value:n,disabled:t,children:f.jsx(U.Row,{gutter:[20,12],children:r==null?void 0:r.map(c=>f.jsx(U.Col,{span:24,children:f.jsx(U.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(U.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," 个"]})]})})})},dZ=e=>{var T,D;const{currentSession:t,application:n,setCheckKnowledges:r}=e,{mode:i,transform:a,features:o}=A.useContext(qt),[s,l]=A.useState([]),[u,c]=A.useState(typeof(o==null?void 0:o.knowledges)=="object"?((T=o.knowledges.default)==null?void 0:T.map(y=>y.id))||[]:[]),[M,d]=A.useState(0),[g,p]=A.useState(!1);A.useEffect(()=>{if(!(n!=null&&n.id))return;const y=n.arrange;if(!(y!=null&&y.length))return;const w=y[0].knowledges||[];l(w);const b=typeof(o==null?void 0:o.knowledges)=="object"&&o.knowledges.default||w;if(Array.isArray(b)&&b.some(x=>Array.isArray(x.fileIds)&&x.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(pl(b||[])>ai)throw Error(`knowledges and fileIds total count cannot exceed ${ai}`);if(!t){c(b.map(P=>P.id)),d(b.length),r==null||r(b);return}const _=()=>{const P=t.knowledges||b;d(P.length);const x=P.map(C=>C.id);c(x)};return _(),t.addEventListener("data:updated",_),()=>{t==null||t.removeEventListener("data:updated",_)}},[n,t]),A.useEffect(()=>{var I;if(!g||(p(!1),!(n!=null&&n.id)))return;const y=[];u==null||u.map(w=>{const b=s==null?void 0:s.find(z=>z.id===w);y.push(b)}),(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(w=>{const b=s==null?void 0:s.find(z=>z.id===w);I.push(b)}),r==null||r(I),d(y.length)};return f.jsxs("div",{className:"chat-header",children:[f.jsxs(U.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(sL,{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 gZ=A.forwardRef((e,t)=>{const{sessionId:n,appId:r,docViewerUrl:i}=e,[a,o]=A.useState(),{showHeader:s,agentClient:l,sider:u,onSessionLoad:c,features:M,mode:d}=A.useContext(qt),[g,p]=A.useState(),m=A.useRef(null),[T,D]=A.useState(""),[y,I]=A.useState(),w=A.useRef(null),[b,z]=A.useState(!1);A.useState([]);const{setIsSwitchingToExistingSession:_}=rm();A.useEffect(()=>{var x;z(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]),A.useEffect(()=>{const x=()=>Ge(exports,null,function*(){const C=l==null?void 0:l.application;if(!(C!=null&&C.id))return;const R=C==null?void 0:C.arrange;if(!(R!=null&&R.length))return;const G=R[0].embeddingService;D(G),p(C)});if(l!=null&&l.ready){x();return}return l==null||l.addEventListener("ready",()=>x()),()=>{l==null||l.removeEventListener("ready",x)}},[l]),A.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]),A.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(xt(te({},x),{knowledges:y}))};return A.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=w.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(im,{ref:m,appId:r,networkStatus:b,currentSession:a,application:g,setCurrentSession:o,checkKnowledges:y,setCheckKnowledges:s?I:void 0,sessionId:n,afterSessionClick:x=>{var C,R;((C=x.data)==null?void 0:C.id)!==((R=a==null?void 0:a.data)==null?void 0:R.id)&&_(!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(dZ,{setCheckKnowledges:I,application:g,currentSession:a})}),f.jsx("div",{className:"dialog-chat-content",children:(g==null?void 0:g.id)&&f.jsx(MZ,{setNetworkStatus:z,networkStatus:b,application:g,currentSession:a,onCreateSession:P,docViewerUrl:i,embeddingService:T,setCurrentSession:o,ref:w})})]})})]})})}),pZ=A.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:w,apiUrl:b,sessionId:z,disabled:_,transform:P,features:x,stream:C,agentClient:R,application:Y}=e,G=A.useRef(null),[q,J]=A.useState(!1),[pe,Z]=A.useState(),[oe,de]=A.useState(i),[v,fe]=A.useState(e.open),he=A.useRef(null);A.useEffect(()=>{Y&&(console.log("[AgentClientUI] token",R,Y),Z(Y.id))},[Y]),U.ConfigProvider.config({theme:a}),A.useEffect(()=>{i&&de(i)},[i]);const L=(ie,{element:Le,size:Ee})=>{de({width:Number(Ee.width),height:Ee.height})};return A.useImperativeHandle(t,()=>({createSession:ie=>{var Le;return(Le=he.current)==null?void 0:Le.createSession(ie)},getSessionList:()=>{var ie;return(ie=he.current)==null?void 0:ie.getSessionList()},getCurrentInputText:()=>{var ie;return(ie=he.current)==null?void 0:ie.getCurrentInputText()}})),f.jsx(U.ConfigProvider,{locale:H1,children:f.jsxs(Z1,{value:xt(te({},e),{popupContainer:G,agentClient:R,footer:g,defaultInput:p,onComment:m,onSessionLoad:T,onSessionUnload:D,onMessage:y,beforeMessageSend:I,bodyStyle:w,disabled:_,transform:P,features:x}),children:[f.jsx(Ax.Resizable,{height:(oe==null?void 0:oe.height)||"100%",width:(oe==null?void 0:oe.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} ${v?"opened":"closed"}`,style:xt(te({},i),{width:n=="float"?oe==null?void 0:oe.width:i==null?void 0:i.width,height:n==="float"?oe==null?void 0:oe.height:i==null?void 0:i.height,maxHeight:"100vh"}),ref:G,children:[q?f.jsx("div",{className:"loading",children:f.jsx(U.Spin,{})}):pe&&R?f.jsx(eZ,{children:f.jsx(gZ,{ref:he,appId:pe,docViewerUrl:s,bodyStyle:w,sessionId:z})}):null,(r==null?void 0:r.visible)&&f.jsx(U.Button,{className:"trigger-btn close-btn",icon:f.jsx("img",{src:o}),onClick:()=>fe(!1)})]})}),(r==null?void 0:r.visible)&&!v&&f.jsx(U.Button,{className:`${n}-trigger-btn open-btn`,style:r.style,icon:f.jsx("img",{src:o}),onClick:()=>fe(!0)})]})})}),NZ="@glodon-aiot/agent-cli-ui",fZ="3.15.0",mZ="./dist/es/index.mjs",hZ="./dist/lib/index.js",yZ="./dist/src/index.d.ts",TZ={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},IZ=["dist"],DZ="module",jZ="dist/src/index.d.ts",AZ={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"},zZ={antd:">=4.0.0",react:">=16.9.0","react-dom":">=16.9.0",webpack:"*"},bZ={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.15.0","@glodon-aiot/bot-client-sdk":"^3.15.0","@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"},wZ={"@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"},EZ=[">0.2%","not dead","not op_mini all"],LZ=["last 1 chrome version","last 1 firefox version","last 1 safari version"],xZ={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},CZ={access:"public",registry:"https://registry.npmjs.org/"},SZ={hooks:{"commit-msg":"validate-commit-msg"}},vZ={name:NZ,version:fZ,module:mZ,main:hZ,typings:yZ,exports:TZ,files:IZ,type:DZ,types:jZ,scripts:AZ,peerDependencies:zZ,dependencies:bZ,devDependencies:wZ,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:EZ,development:LZ,config:xZ,publishConfig:CZ,husky:SZ};var lL=(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))(lL||{});//! moment.js
320
+ .bmp格式的图片数据,单文件最大${up}M,最多${xi}张`}),children:f.jsx(U.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(U.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&&(b!=null&&b.fileUpload)&&(n!=null&&n.id)?f.jsx(rL,{appId:n==null?void 0:n.id,ref:mt,isFirstSession:Em,docViewerUrl:r,onStatusChange:F=>Ge(exports,null,function*(){F!=="process"?(We(!0),uu()):We(!1)}),createSession:()=>Qm().then(F=>{var se;return((se=F.data)==null?void 0:se.id)||""}),sid:(Km=i==null?void 0:i.data)==null?void 0:Km.id,disabled:Mr||R,afterFileAdd:(F,V)=>{V&&ot(se=>{const De=se[V]||[];return{[V]:[...De,F]}})},afterFileDelete:F=>{var se;const V=(se=i==null?void 0:i.data)==null?void 0:se.id;V&&ot(De=>{const re=De[V]||[];return{[V]:re.filter(Ve=>Ve.id!==F)}})},onFileListChange:F=>{Re(F)},shouldContinue:Oe,afterFilesClear:()=>{var V;const F=(V=i==null?void 0:i.data)==null?void 0:V.id;F&&(ot({[F]:[]}),uu())}}):null,(b==null?void 0:b.prompt)&&(n==null?void 0:n.id)&&f.jsx(uZ,{appId:n.id,list:[],search:ee?ke:"",onPromptSelect:F=>{lt(F.context),g(F.context)},disabled:R})]}),f.jsxs(U.Space,{children:[(b==null?void 0:b.connectNetwork)&&n.type===Se.ApplicationTypes.Dialog&&((eh=n.arrange)==null?void 0:eh.length)&&!!n.arrange[0].enableNetOpen&&f.jsx(rZ,{sessionId:(th=i==null?void 0:i.data)==null?void 0:th.id,netStatus:l,enable:typeof(Y==null?void 0:Y.connectNetwork)=="object"&&typeof(Y==null?void 0:Y.connectNetwork.diabled)=="boolean"?!(Y!=null&&Y.connectNetwork.diabled):rx,disabledTip:i?void 0:"网络访问已被禁用",onNetStatusChange:F=>{Tx(F)}}),(b==null?void 0:b.sessionList)&&f.jsx(KV,{currentSessionId:(nh=i==null?void 0:i.data)==null?void 0:nh.id,onSessionChange:(F,V)=>{lt(void 0),rs(!0),s==null||s(V)},disabled:R}),J&&pe==="float"&&f.jsx("div",{className:"session-history-drawer-component",children:f.jsx(U.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:F=>F.parentNode,content:"会话历史记录",children:f.jsx(U.Button,{className:"history-overlay-action",disabled:R,type:"text",icon:f.jsx(nt,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>Sm(!0)})})}),(b==null?void 0:b.sessionOpen)&&f.jsx(U.Button,{icon:f.jsx(ht.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:Qn||!i||!c.length||R,onClick:()=>{var F,V;rs(!1),s==null||s(null),Hi.current=null,u(!1),(F=Ft.current)==null||F.clear(),(V=B.current)==null||V.clear()},children:"新会话"})]})]}),f.jsx("div",{className:"footer-textarea",onPaste:Rm,onPasteCapture:Rm,onDrop:Um,onDropCapture:Um,onDragOver:_m,onDragOverCapture:_m,children:f.jsx(tL,{ref:X,maxLength:fe,text:Ze,networkStatus:!1,loading:xm||ns,disabled:Z||me||R||xm||ns,onTextSend:Om,onChange:(F,V)=>{lt(F);const se=V.getText().replace(/[\n\s]+$/,"");g(se),ct(se),ee||be(!0)},clearAction:f.jsx(U.Space,{size:0,children:f.jsx(U.Button,{type:"link",disabled:Mr||R,ghost:!0,icon:f.jsx(nt,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>sx()})})})})]})}),f.jsx(HV,{tips:w}),$&&f.jsx(VV,{isvisible:$,files:Te,sessionId:(rh=i==null?void 0:i.data)==null?void 0:rh.id,onClose:F=>{K(!1),en(!1)}})]}),Cm&&f.jsx(nZ,{currentSession:i,application:n,networkStatus:l,setCurrentSession:s,disabled:R,isSessionHistoryVisible:Cm,setIsSessionHistoryVisible:Sm,onSessionChange:F=>{rs(!0)}})]})});const sL=e=>{const{disabled:t,checkedValues:n,currKnowledgeList:r,selectCount:i,onSelectChange:a}=e,[o,s]=A.useState(!1),l=f.jsx(U.Checkbox.Group,{style:{width:"100%"},onChange:a,value:n,disabled:t,children:f.jsx(U.Row,{gutter:[20,12],children:r==null?void 0:r.map(c=>f.jsx(U.Col,{span:24,children:f.jsx(U.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(U.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," 个"]})]})})})},dZ=e=>{var T,D;const{currentSession:t,application:n,setCheckKnowledges:r}=e,{mode:i,transform:a,features:o}=A.useContext(qt),[s,l]=A.useState([]),[u,c]=A.useState(typeof(o==null?void 0:o.knowledges)=="object"?((T=o.knowledges.default)==null?void 0:T.map(y=>y.id))||[]:[]),[M,d]=A.useState(0),[g,p]=A.useState(!1);A.useEffect(()=>{if(!(n!=null&&n.id))return;const y=n.arrange;if(!(y!=null&&y.length))return;const w=y[0].knowledges||[];l(w);const b=typeof(o==null?void 0:o.knowledges)=="object"&&o.knowledges.default||w;if(Array.isArray(b)&&b.some(x=>Array.isArray(x.fileIds)&&x.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(pl(b||[])>ai)throw Error(`knowledges and fileIds total count cannot exceed ${ai}`);if(!t){c(b.map(P=>P.id)),d(b.length),r==null||r(b);return}const _=()=>{const P=t.knowledges||b;d(P.length);const x=P.map(C=>C.id);c(x)};return _(),t.addEventListener("data:updated",_),()=>{t==null||t.removeEventListener("data:updated",_)}},[n,t]),A.useEffect(()=>{var I;if(!g||(p(!1),!(n!=null&&n.id)))return;const y=[];u==null||u.map(w=>{const b=s==null?void 0:s.find(z=>z.id===w);y.push(b)}),(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(w=>{const b=s==null?void 0:s.find(z=>z.id===w);I.push(b)}),r==null||r(I),d(y.length)};return f.jsxs("div",{className:"chat-header",children:[f.jsxs(U.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(sL,{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 gZ=A.forwardRef((e,t)=>{const{sessionId:n,appId:r,docViewerUrl:i}=e,[a,o]=A.useState(),{showHeader:s,agentClient:l,sider:u,onSessionLoad:c,features:M,mode:d}=A.useContext(qt),[g,p]=A.useState(),m=A.useRef(null),[T,D]=A.useState(""),[y,I]=A.useState(),w=A.useRef(null),[b,z]=A.useState(!1);A.useState([]);const{setIsSwitchingToExistingSession:_}=rm();A.useEffect(()=>{var x;z(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]),A.useEffect(()=>{const x=()=>Ge(exports,null,function*(){const C=l==null?void 0:l.application;if(!(C!=null&&C.id))return;const R=C==null?void 0:C.arrange;if(!(R!=null&&R.length))return;const G=R[0].embeddingService;D(G),p(C)});if(l!=null&&l.ready){x();return}return l==null||l.addEventListener("ready",()=>x()),()=>{l==null||l.removeEventListener("ready",x)}},[l]),A.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]),A.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(xt(te({},x),{knowledges:y}))};return A.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=w.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(im,{ref:m,appId:r,networkStatus:b,currentSession:a,application:g,setCurrentSession:o,checkKnowledges:y,setCheckKnowledges:s?I:void 0,sessionId:n,afterSessionClick:x=>{var C,R;((C=x.data)==null?void 0:C.id)!==((R=a==null?void 0:a.data)==null?void 0:R.id)&&_(!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(dZ,{setCheckKnowledges:I,application:g,currentSession:a})}),f.jsx("div",{className:"dialog-chat-content",children:(g==null?void 0:g.id)&&f.jsx(MZ,{setNetworkStatus:z,networkStatus:b,application:g,currentSession:a,onCreateSession:P,docViewerUrl:i,embeddingService:T,setCurrentSession:o,ref:w})})]})})]})})}),pZ=A.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:w,apiUrl:b,sessionId:z,disabled:_,transform:P,features:x,stream:C,agentClient:R,application:Y}=e,G=A.useRef(null),[q,J]=A.useState(!1),[pe,Z]=A.useState(),[oe,de]=A.useState(i),[v,fe]=A.useState(e.open),he=A.useRef(null);A.useEffect(()=>{Y&&(console.log("[AgentClientUI] token",R,Y),Z(Y.id))},[Y]),U.ConfigProvider.config({theme:a}),A.useEffect(()=>{i&&de(i)},[i]);const L=(ie,{element:Le,size:Ee})=>{de({width:Number(Ee.width),height:Ee.height})};return A.useImperativeHandle(t,()=>({createSession:ie=>{var Le;return(Le=he.current)==null?void 0:Le.createSession(ie)},getSessionList:()=>{var ie;return(ie=he.current)==null?void 0:ie.getSessionList()},getCurrentInputText:()=>{var ie;return(ie=he.current)==null?void 0:ie.getCurrentInputText()}})),f.jsx(U.ConfigProvider,{locale:H1,children:f.jsxs(Z1,{value:xt(te({},e),{popupContainer:G,agentClient:R,footer:g,defaultInput:p,onComment:m,onSessionLoad:T,onSessionUnload:D,onMessage:y,beforeMessageSend:I,bodyStyle:w,disabled:_,transform:P,features:x}),children:[f.jsx(Ax.Resizable,{height:(oe==null?void 0:oe.height)||"100%",width:(oe==null?void 0:oe.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} ${v?"opened":"closed"}`,style:xt(te({},i),{width:n=="float"?oe==null?void 0:oe.width:i==null?void 0:i.width,height:n==="float"?oe==null?void 0:oe.height:i==null?void 0:i.height,maxHeight:"100vh"}),ref:G,children:[q?f.jsx("div",{className:"loading",children:f.jsx(U.Spin,{})}):pe&&R?f.jsx(eZ,{children:f.jsx(gZ,{ref:he,appId:pe,docViewerUrl:s,bodyStyle:w,sessionId:z})}):null,(r==null?void 0:r.visible)&&f.jsx(U.Button,{className:"trigger-btn close-btn",icon:f.jsx("img",{src:o}),onClick:()=>fe(!1)})]})}),(r==null?void 0:r.visible)&&!v&&f.jsx(U.Button,{className:`${n}-trigger-btn open-btn`,style:r.style,icon:f.jsx("img",{src:o}),onClick:()=>fe(!0)})]})})}),NZ="@glodon-aiot/agent-cli-ui",fZ="3.15.5-alpha.2",mZ="./dist/es/index.mjs",hZ="./dist/lib/index.js",yZ="./dist/src/index.d.ts",TZ={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},IZ=["dist"],DZ="module",jZ="dist/src/index.d.ts",AZ={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"},zZ={antd:">=4.0.0",react:">=16.9.0","react-dom":">=16.9.0",webpack:"*"},bZ={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.15.5-alpha.2","@glodon-aiot/bot-client-sdk":"^3.15.5-alpha.2","@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"},wZ={"@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"},EZ=[">0.2%","not dead","not op_mini all"],LZ=["last 1 chrome version","last 1 firefox version","last 1 safari version"],xZ={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},CZ={access:"public",registry:"https://registry.npmjs.org/"},SZ={hooks:{"commit-msg":"validate-commit-msg"}},vZ={name:NZ,version:fZ,module:mZ,main:hZ,typings:yZ,exports:TZ,files:IZ,type:DZ,types:jZ,scripts:AZ,peerDependencies:zZ,dependencies:bZ,devDependencies:wZ,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:EZ,development:LZ,config:xZ,publishConfig:CZ,husky:SZ};var lL=(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))(lL||{});//! 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.15.0",
3
+ "version": "3.15.5-alpha.2",
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.15.0",
41
- "@glodon-aiot/bot-client-sdk": "^3.15.0",
40
+ "@glodon-aiot/apis": "^3.15.5-alpha.2",
41
+ "@glodon-aiot/bot-client-sdk": "^3.15.5-alpha.2",
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",