@blueking/ai-ui-sdk 0.0.15-beta.22 → 0.0.15-beta.24

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.
Files changed (89) hide show
  1. package/dist/component/render-input/index.vue.css +17 -17
  2. package/dist/component/render-input/index.vue.js +1 -1
  3. package/dist/component/render-input/render-drag.vue.css +5 -5
  4. package/dist/component/render-input/render-drag.vue.js +1 -1
  5. package/dist/component/render-input/render-quill.script.vue.js +2 -2
  6. package/dist/component/render-knowledge-icon/index.vue.css +1 -1
  7. package/dist/component/render-knowledge-icon/index.vue.js +1 -1
  8. package/dist/component/render-markdown/mark-down.js +1 -1
  9. package/dist/component/render-message/openai-message.vue.css +15 -15
  10. package/dist/component/render-message/openai-message.vue.js +1 -1
  11. package/dist/component/render-message/skeleton-message.vue.css +1 -1
  12. package/dist/component/render-message/skeleton-message.vue.js +1 -1
  13. package/dist/component/render-message/system-message.vue.css +2 -2
  14. package/dist/component/render-message/system-message.vue.js +1 -1
  15. package/dist/component/render-message/time-message.vue.css +1 -1
  16. package/dist/component/render-message/time-message.vue.js +1 -1
  17. package/dist/component/render-message/token-expired-message.vue.css +9 -9
  18. package/dist/component/render-message/token-expired-message.vue.js +1 -1
  19. package/dist/component/render-message/user-message.vue.css +15 -15
  20. package/dist/component/render-message/user-message.vue.js +1 -1
  21. package/dist/component/render-stop/index.vue.css +2 -2
  22. package/dist/component/render-stop/index.vue.js +1 -1
  23. package/dist/hooks/use-chat.js +22 -40
  24. package/package.json +11 -11
  25. package/dist/node_modules/call-bind/index.js +0 -24
  26. package/dist/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  27. package/dist/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  28. package/dist/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  29. package/dist/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  30. package/dist/node_modules/call-bind-apply-helpers/index.js +0 -15
  31. package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  32. package/dist/node_modules/call-bound/index.js +0 -19
  33. package/dist/node_modules/deep-equal/index.js +0 -112
  34. package/dist/node_modules/define-data-property/index.js +0 -56
  35. package/dist/node_modules/define-properties/index.js +0 -47
  36. package/dist/node_modules/dunder-proto/get.js +0 -30
  37. package/dist/node_modules/es-define-property/index.js +0 -14
  38. package/dist/node_modules/es-errors/eval.js +0 -4
  39. package/dist/node_modules/es-errors/index.js +0 -4
  40. package/dist/node_modules/es-errors/range.js +0 -4
  41. package/dist/node_modules/es-errors/ref.js +0 -4
  42. package/dist/node_modules/es-errors/syntax.js +0 -4
  43. package/dist/node_modules/es-errors/type.js +0 -4
  44. package/dist/node_modules/es-errors/uri.js +0 -4
  45. package/dist/node_modules/es-object-atoms/index.js +0 -4
  46. package/dist/node_modules/extend/index.js +0 -117
  47. package/dist/node_modules/fast-diff/diff.js +0 -738
  48. package/dist/node_modules/function-bind/implementation.js +0 -84
  49. package/dist/node_modules/function-bind/index.js +0 -5
  50. package/dist/node_modules/functions-have-names/index.js +0 -31
  51. package/dist/node_modules/get-intrinsic/index.js +0 -378
  52. package/dist/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  53. package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  54. package/dist/node_modules/get-proto/index.js +0 -27
  55. package/dist/node_modules/gopd/gOPD.js +0 -4
  56. package/dist/node_modules/gopd/index.js +0 -15
  57. package/dist/node_modules/has-property-descriptors/index.js +0 -22
  58. package/dist/node_modules/has-symbols/index.js +0 -14
  59. package/dist/node_modules/has-symbols/shams.js +0 -45
  60. package/dist/node_modules/has-tostringtag/shams.js +0 -8
  61. package/dist/node_modules/hasown/index.js +0 -8
  62. package/dist/node_modules/is-arguments/index.js +0 -44
  63. package/dist/node_modules/is-date-object/index.js +0 -27
  64. package/dist/node_modules/is-regex/index.js +0 -69
  65. package/dist/node_modules/math-intrinsics/abs.js +0 -4
  66. package/dist/node_modules/math-intrinsics/floor.js +0 -4
  67. package/dist/node_modules/math-intrinsics/isNaN.js +0 -6
  68. package/dist/node_modules/math-intrinsics/max.js +0 -4
  69. package/dist/node_modules/math-intrinsics/min.js +0 -4
  70. package/dist/node_modules/math-intrinsics/pow.js +0 -4
  71. package/dist/node_modules/math-intrinsics/round.js +0 -4
  72. package/dist/node_modules/math-intrinsics/sign.js +0 -11
  73. package/dist/node_modules/object-is/implementation.js +0 -19
  74. package/dist/node_modules/object-is/index.js +0 -18
  75. package/dist/node_modules/object-is/polyfill.js +0 -7
  76. package/dist/node_modules/object-is/shim.js +0 -14
  77. package/dist/node_modules/object-keys/implementation.js +0 -122
  78. package/dist/node_modules/object-keys/index.js +0 -32
  79. package/dist/node_modules/object-keys/isArguments.js +0 -17
  80. package/dist/node_modules/quill/dist/quill.js +0 -11562
  81. package/dist/node_modules/quill-delta/lib/delta.js +0 -344
  82. package/dist/node_modules/quill-delta/lib/op.js +0 -155
  83. package/dist/node_modules/regexp.prototype.flags/implementation.js +0 -39
  84. package/dist/node_modules/regexp.prototype.flags/index.js +0 -18
  85. package/dist/node_modules/regexp.prototype.flags/polyfill.js +0 -39
  86. package/dist/node_modules/regexp.prototype.flags/shim.js +0 -26
  87. package/dist/node_modules/set-function-length/index.js +0 -42
  88. package/dist/node_modules/set-function-name/index.js +0 -23
  89. package/dist/node_modules/x-mavon-editor/dist/mavon-editor.js +0 -31
@@ -1,37 +1,37 @@
1
1
 
2
2
  .send-prompt-container {
3
- &[data-v-4lsfavww] {
3
+ &[data-v-rvbpz0lg] {
4
4
  width: 800px;
5
5
  z-index: 1501;
6
6
  overflow: visible;
7
7
  position: relative;
8
8
  }
9
- [data-v-4lsfavww] .textarea-list {
9
+ [data-v-rvbpz0lg] .textarea-list {
10
10
  bottom: var(--textarea-bottom);
11
11
  }
12
12
  &:hover {
13
- .clear-icon[data-v-4lsfavww] {
13
+ .clear-icon[data-v-rvbpz0lg] {
14
14
  display: inline-flex !important;
15
15
  }
16
16
  }
17
17
  }
18
18
  .quill-container {
19
- &[data-v-4lsfavww] {
19
+ &[data-v-rvbpz0lg] {
20
20
  background: #fff;
21
21
  box-shadow: 0 0 6px 0 #0000001a;
22
22
  border-radius: 4px;
23
23
  box-sizing: border-box !important;
24
24
  border: 1px solid transparent;
25
25
  }
26
- &.active[data-v-4lsfavww] {
26
+ &.active[data-v-rvbpz0lg] {
27
27
  border: 1px solid #3A84FF !important;
28
28
  }
29
- &[data-v-4lsfavww]:has(.ql-editor:focus) {
29
+ &[data-v-rvbpz0lg]:has(.ql-editor:focus) {
30
30
  border: 1px solid #3A84FF !important;
31
31
  }
32
32
  }
33
33
  .send-prompt {
34
- &[data-v-4lsfavww] {
34
+ &[data-v-rvbpz0lg] {
35
35
  width: 800px;
36
36
  border: 1px solid transparent;
37
37
  flex-direction: row;
@@ -41,28 +41,28 @@
41
41
  border-radius: 4px;
42
42
  border: 1px solid transparent !important;
43
43
  }
44
- [data-v-4lsfavww] .content-input-wrapper {
44
+ [data-v-rvbpz0lg] .content-input-wrapper {
45
45
  padding: 0 !important;
46
46
  height: 100% !important;
47
47
  }
48
- [data-v-4lsfavww] .auto-textarea-wrapper {
48
+ [data-v-rvbpz0lg] .auto-textarea-wrapper {
49
49
  height: 100% !important;
50
50
  }
51
- [data-v-4lsfavww] .v-note-panel {
51
+ [data-v-rvbpz0lg] .v-note-panel {
52
52
  border-radius: 4px;
53
53
  }
54
- [data-v-4lsfavww] .scroll-style {
54
+ [data-v-rvbpz0lg] .scroll-style {
55
55
  overflow-y: hidden !important;
56
56
  }
57
- [data-v-4lsfavww] .auto-textarea-block {
57
+ [data-v-rvbpz0lg] .auto-textarea-block {
58
58
  display: none;
59
59
  }
60
- &[data-v-4lsfavww]:has(.ql-editor:focus) {
60
+ &[data-v-rvbpz0lg]:has(.ql-editor:focus) {
61
61
  height: var(--text-height);
62
62
  }
63
63
  }
64
64
  .ai-ui-sdk-fasong {
65
- &[data-v-4lsfavww] {
65
+ &[data-v-rvbpz0lg] {
66
66
  width: 28px;
67
67
  height: 28px;
68
68
  line-height: 28px;
@@ -76,16 +76,16 @@
76
76
  text-align: center;
77
77
  z-index: 1501;
78
78
  }
79
- &[data-v-4lsfavww]:hover {
79
+ &[data-v-rvbpz0lg]:hover {
80
80
  background: #F0F5FF;
81
81
  color: #3a84ff;
82
82
  }
83
- &.disable[data-v-4lsfavww] {
83
+ &.disable[data-v-rvbpz0lg] {
84
84
  color: #dcdee5;
85
85
  cursor: not-allowed;
86
86
  }
87
87
  }
88
- .clear-icon[data-v-4lsfavww] {
88
+ .clear-icon[data-v-rvbpz0lg] {
89
89
  display: none !important;
90
90
  position: absolute;
91
91
  bottom: 42px;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-4lsfavww";
2
+ script.__scopeId = "data-v-rvbpz0lg";
3
3
  script.__file = "./src/component/render-input/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,6 +1,6 @@
1
1
 
2
2
  .send-tool-container {
3
- &[data-v-hlf3c71u] {
3
+ &[data-v-rl4lb3jz] {
4
4
  position: absolute;
5
5
  left: 50%;
6
6
  top: 16px;
@@ -14,18 +14,18 @@
14
14
  z-index: 15001;
15
15
  }
16
16
  &.bottom {
17
- &[data-v-hlf3c71u] {
17
+ &[data-v-rl4lb3jz] {
18
18
  bottom: 0;
19
19
  top: auto;
20
20
  }
21
- .ai-ui-sdk-gengduo[data-v-hlf3c71u] {
21
+ .ai-ui-sdk-gengduo[data-v-rl4lb3jz] {
22
22
  margin-top: -10px;
23
23
  }
24
24
  }
25
- &[data-v-hlf3c71u]:hover, &.is-dragging[data-v-hlf3c71u] {
25
+ &[data-v-rl4lb3jz]:hover, &.is-dragging[data-v-rl4lb3jz] {
26
26
  background: #3A84FF;
27
27
  }
28
- .ai-ui-sdk-gengduo[data-v-hlf3c71u] {
28
+ .ai-ui-sdk-gengduo[data-v-rl4lb3jz] {
29
29
  margin-top: -2px;
30
30
  color: #63656E;
31
31
  }
@@ -1,5 +1,5 @@
1
1
  import script from './render-drag.script.vue.js';
2
- script.__scopeId = "data-v-hlf3c71u";
2
+ script.__scopeId = "data-v-rl4lb3jz";
3
3
  script.__file = "./src/component/render-input/render-drag.vue";
4
4
  import './render-drag.vue.css';
5
5
  export default script;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as _defineComponent } from 'vue';
2
2
  import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
3
- import Quill from '../../../dist/node_modules/quill/dist/quill.js';
4
- import Delta from '../../../dist/node_modules/quill-delta/lib/delta.js';
3
+ import Quill from 'quill';
4
+ import Delta from 'quill-delta';
5
5
  import { getCurrentInstance, onMounted, watch } from 'vue';
6
6
  import '../../../dist/node_modules/quill/dist/quill.snow.css';
7
7
  export default /*@__PURE__*/ _defineComponent({
@@ -1,4 +1,4 @@
1
1
 
2
- .ai-ui-sdk-icon[data-v-i2g46imf] {
2
+ .ai-ui-sdk-icon[data-v-h4ciwhk0] {
3
3
  color: #C4C6CC;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-i2g46imf";
2
+ script.__scopeId = "data-v-h4ciwhk0";
3
3
  script.__file = "./src/component/render-knowledge-icon/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
51
51
  return target;
52
52
  }
53
53
  import { defineComponent, h } from 'vue';
54
- import Mavon from '../../../dist/node_modules/x-mavon-editor/dist/mavon-editor.js';
54
+ import Mavon from 'x-mavon-editor';
55
55
  import { MarkDownCodePlugin } from './mark-down-code.js';
56
56
  import { MarkDownEmojiPlugin } from './mark-down-emoji.js';
57
57
  import '../../../dist/node_modules/x-mavon-editor/dist/css/index.css';
@@ -1,11 +1,11 @@
1
1
 
2
- .ai-message-home[data-v-nvg6vlaq] {
2
+ .ai-message-home[data-v-uyuzaxz7] {
3
3
  justify-content: center;
4
4
  align-items: flex-start;
5
5
  width: 100%;
6
6
  }
7
7
  .ai-content {
8
- &[data-v-nvg6vlaq] {
8
+ &[data-v-uyuzaxz7] {
9
9
  flex: 1;
10
10
  max-width: calc(100% - 104px);
11
11
  background: #FFFFFF;
@@ -18,12 +18,12 @@
18
18
  padding-top: 12px;
19
19
  margin-right: 52px;
20
20
  }
21
- .ai-ui-sdk-warning-circle-fill[data-v-nvg6vlaq] {
21
+ .ai-ui-sdk-warning-circle-fill[data-v-uyuzaxz7] {
22
22
  color: #EA3636;
23
23
  font-size: 18px;
24
24
  margin-right: 2px;
25
25
  }
26
- .ai-ui-sdk-quanquan[data-v-nvg6vlaq] {
26
+ .ai-ui-sdk-quanquan[data-v-uyuzaxz7] {
27
27
  display: inline-block;
28
28
  color: #3A84FF;
29
29
  animation: rotate 800ms linear infinite;
@@ -32,12 +32,12 @@
32
32
  top: 23px;
33
33
  z-index: 1501;
34
34
  }
35
- .message-check[data-v-nvg6vlaq] {
35
+ .message-check[data-v-uyuzaxz7] {
36
36
  position: absolute;
37
37
  top: 0;
38
38
  left: -80px;
39
39
  }
40
- &[data-v-nvg6vlaq]::before {
40
+ &[data-v-uyuzaxz7]::before {
41
41
  position: absolute;
42
42
  content: '';
43
43
  width: 15px;
@@ -47,25 +47,25 @@
47
47
  rotate: 45deg;
48
48
  background: #FFFFFF;
49
49
  }
50
- &.fail[data-v-nvg6vlaq] {
50
+ &.fail[data-v-uyuzaxz7] {
51
51
  padding: 12px;
52
52
  word-break: break-all;
53
53
  }
54
- &.loading[data-v-nvg6vlaq] {
54
+ &.loading[data-v-uyuzaxz7] {
55
55
  padding: 12px 0;
56
56
  word-break: break-all;
57
57
  }
58
58
  }
59
- .skeleton-message[data-v-nvg6vlaq] {
59
+ .skeleton-message[data-v-uyuzaxz7] {
60
60
  margin-right: 52px;
61
61
  }
62
62
  .message-photo {
63
- &[data-v-nvg6vlaq] {
63
+ &[data-v-uyuzaxz7] {
64
64
  width: 52px;
65
65
  text-align: right;
66
66
  user-select: none;
67
67
  }
68
- img[data-v-nvg6vlaq] {
68
+ img[data-v-uyuzaxz7] {
69
69
  margin-right: 16px;
70
70
  margin-top: 5px;
71
71
  width: 36px;
@@ -73,24 +73,24 @@ img[data-v-nvg6vlaq] {
73
73
  }
74
74
  }
75
75
  .message-tools {
76
- &[data-v-nvg6vlaq] {
76
+ &[data-v-uyuzaxz7] {
77
77
  margin: 12px 12px 12px;
78
78
  padding-top: 10px;
79
79
  justify-content: space-between;
80
80
  border-top: 1px solid #EAEBF0;
81
81
  }
82
- .rate-tip[data-v-nvg6vlaq] {
82
+ .rate-tip[data-v-uyuzaxz7] {
83
83
  font-size: 12px;
84
84
  color: #979BA5;
85
85
  margin-left: 7px;
86
86
  }
87
87
  .tool-icons {
88
88
  .ai-ui-sdk-icon {
89
- &[data-v-nvg6vlaq] {
89
+ &[data-v-uyuzaxz7] {
90
90
  cursor: pointer;
91
91
  color: #979BA5;
92
92
  }
93
- &[data-v-nvg6vlaq]:hover {
93
+ &[data-v-uyuzaxz7]:hover {
94
94
  color: #3A84FF;
95
95
  }
96
96
  }
@@ -1,5 +1,5 @@
1
1
  import script from './openai-message.script.vue.js';
2
- script.__scopeId = "data-v-nvg6vlaq";
2
+ script.__scopeId = "data-v-uyuzaxz7";
3
3
  script.__file = "./src/component/render-message/openai-message.vue";
4
4
  import './openai-message.vue.css';
5
5
  export default script;
@@ -1,5 +1,5 @@
1
1
 
2
- .skeleton-message[data-v-0qnantzb] {
2
+ .skeleton-message[data-v-ac4qcw72] {
3
3
  height: 50px;
4
4
  flex: 1;
5
5
  background-color: #EBECF3;
@@ -1,6 +1,6 @@
1
1
  import { render } from './skeleton-message.script.vue.js';
2
2
  const script = { render };
3
- script.__scopeId = "data-v-0qnantzb";
3
+ script.__scopeId = "data-v-ac4qcw72";
4
4
  script.__file = "./src/component/render-message/skeleton-message.vue";
5
5
  import './skeleton-message.vue.css';
6
6
  export default script;
@@ -1,6 +1,6 @@
1
1
 
2
2
  .system-message {
3
- &[data-v-rpaim43x] {
3
+ &[data-v-jeeg2n8i] {
4
4
  position: relative;
5
5
  width: calc(100% - 204px) !important;
6
6
  max-width: 800px !important;
@@ -8,7 +8,7 @@
8
8
  border-bottom: 1px dashed #DCDEE5;
9
9
  margin: 24px 0 40px !important;
10
10
  }
11
- span[data-v-rpaim43x] {
11
+ span[data-v-jeeg2n8i] {
12
12
  position: absolute;
13
13
  left: 50%;
14
14
  top: 50%;
@@ -1,5 +1,5 @@
1
1
  import script from './system-message.script.vue.js';
2
- script.__scopeId = "data-v-rpaim43x";
2
+ script.__scopeId = "data-v-jeeg2n8i";
3
3
  script.__file = "./src/component/render-message/system-message.vue";
4
4
  import './system-message.vue.css';
5
5
  export default script;
@@ -1,5 +1,5 @@
1
1
 
2
- .time-message[data-v-rwyviq8n] {
2
+ .time-message[data-v-urwabci1] {
3
3
  position: relative;
4
4
  padding: 0 8px !important;
5
5
  height: 22px;
@@ -1,5 +1,5 @@
1
1
  import script from './time-message.script.vue.js';
2
- script.__scopeId = "data-v-rwyviq8n";
2
+ script.__scopeId = "data-v-urwabci1";
3
3
  script.__file = "./src/component/render-message/time-message.vue";
4
4
  import './time-message.vue.css';
5
5
  export default script;
@@ -1,11 +1,11 @@
1
1
 
2
- .ai-message-home[data-v-ar25cgut] {
2
+ .ai-message-home[data-v-49l4wfg4] {
3
3
  justify-content: center;
4
4
  align-items: flex-start;
5
5
  width: 100%;
6
6
  }
7
7
  .ai-content {
8
- &[data-v-ar25cgut] {
8
+ &[data-v-49l4wfg4] {
9
9
  flex: 1;
10
10
  background: #FFFFFF;
11
11
  line-height: 22px;
@@ -17,17 +17,17 @@
17
17
  padding-top: 12px;
18
18
  margin-right: 52px;
19
19
  }
20
- .ai-ui-sdk-warning-circle-fill[data-v-ar25cgut] {
20
+ .ai-ui-sdk-warning-circle-fill[data-v-49l4wfg4] {
21
21
  color: #EA3636;
22
22
  font-size: 18px;
23
23
  margin-right: 2px;
24
24
  }
25
- .message-check[data-v-ar25cgut] {
25
+ .message-check[data-v-49l4wfg4] {
26
26
  position: absolute;
27
27
  top: 0;
28
28
  left: -80px;
29
29
  }
30
- &[data-v-ar25cgut]::before {
30
+ &[data-v-49l4wfg4]::before {
31
31
  position: absolute;
32
32
  content: '';
33
33
  width: 15px;
@@ -37,24 +37,24 @@
37
37
  rotate: 45deg;
38
38
  background: #FFFFFF;
39
39
  }
40
- &.fail[data-v-ar25cgut] {
40
+ &.fail[data-v-49l4wfg4] {
41
41
  padding: 12px;
42
42
  }
43
43
  }
44
44
  .message-photo {
45
- &[data-v-ar25cgut] {
45
+ &[data-v-49l4wfg4] {
46
46
  width: 52px;
47
47
  text-align: right;
48
48
  user-select: none;
49
49
  }
50
- img[data-v-ar25cgut] {
50
+ img[data-v-49l4wfg4] {
51
51
  margin-right: 16px;
52
52
  margin-top: 5px;
53
53
  width: 36px;
54
54
  height: 36px;
55
55
  }
56
56
  }
57
- .clear-message[data-v-ar25cgut] {
57
+ .clear-message[data-v-49l4wfg4] {
58
58
  color: #3a84ff;
59
59
  cursor: pointer;
60
60
  }
@@ -1,5 +1,5 @@
1
1
  import script from './token-expired-message.script.vue.js';
2
- script.__scopeId = "data-v-ar25cgut";
2
+ script.__scopeId = "data-v-49l4wfg4";
3
3
  script.__file = "./src/component/render-message/token-expired-message.vue";
4
4
  import './token-expired-message.vue.css';
5
5
  export default script;
@@ -1,23 +1,23 @@
1
1
 
2
- .user-message-home[data-v-961m65rq] {
2
+ .user-message-home[data-v-d958lol5] {
3
3
  align-items: flex-start;
4
4
  justify-content: flex-end;
5
5
  }
6
6
  .user-message-extra {
7
- &[data-v-961m65rq] {
7
+ &[data-v-d958lol5] {
8
8
  padding: 0 52px;
9
9
  }
10
- &[data-v-961m65rq]:after {
10
+ &[data-v-d958lol5]:after {
11
11
  content: '';
12
12
  display: table;
13
13
  clear: both;
14
14
  }
15
- .ai-ui-sdk-icon[data-v-961m65rq] {
15
+ .ai-ui-sdk-icon[data-v-d958lol5] {
16
16
  font-size: 14px;
17
17
  }
18
18
  }
19
19
  .user-content {
20
- &[data-v-961m65rq] {
20
+ &[data-v-d958lol5] {
21
21
  flex: 1;
22
22
  max-width: calc(100% - 104px);
23
23
  background: #E1ECFF;
@@ -30,7 +30,7 @@
30
30
  margin-left: 52px;
31
31
  }
32
32
  .ai-ui-sdk-icon {
33
- &[data-v-961m65rq] {
33
+ &[data-v-d958lol5] {
34
34
  width: 28px;
35
35
  height: 28px;
36
36
  background: #FFFFFF;
@@ -45,20 +45,20 @@
45
45
  margin-right: 8px;
46
46
  margin-top: 8px;
47
47
  }
48
- &.hover-show[data-v-961m65rq] {
48
+ &.hover-show[data-v-d958lol5] {
49
49
  display: none;
50
50
  }
51
- &.ai-ui-sdk-yinyong-2[data-v-961m65rq]:hover, &.ai-ui-sdk-copy[data-v-961m65rq]:hover, &.ai-ui-sdk-baocun[data-v-961m65rq]:hover, &.ai-ui-sdk-delete[data-v-961m65rq]:hover {
51
+ &.ai-ui-sdk-yinyong-2[data-v-d958lol5]:hover, &.ai-ui-sdk-copy[data-v-d958lol5]:hover, &.ai-ui-sdk-baocun[data-v-d958lol5]:hover, &.ai-ui-sdk-delete[data-v-d958lol5]:hover {
52
52
  color: #3A84FF;
53
53
  border-color: #3A84FF;
54
54
  }
55
55
  }
56
56
  &:hover {
57
- .hover-show[data-v-961m65rq] {
57
+ .hover-show[data-v-d958lol5] {
58
58
  display: flex;
59
59
  }
60
60
  }
61
- &[data-v-961m65rq]::after {
61
+ &[data-v-d958lol5]::after {
62
62
  position: absolute;
63
63
  content: '';
64
64
  width: 15px;
@@ -69,24 +69,24 @@
69
69
  background: #E1ECFF;
70
70
  }
71
71
  }
72
- .message-tools[data-v-961m65rq] {
72
+ .message-tools[data-v-d958lol5] {
73
73
  justify-content: flex-end;
74
74
  position: absolute;
75
75
  width: 150px;
76
76
  left: -150px;
77
77
  top: 2px;
78
78
  }
79
- .message-check[data-v-961m65rq] {
79
+ .message-check[data-v-d958lol5] {
80
80
  position: absolute;
81
81
  top: 0;
82
82
  left: -80px;
83
83
  }
84
84
  .message-photo {
85
- &[data-v-961m65rq] {
85
+ &[data-v-d958lol5] {
86
86
  width: 52px;
87
87
  user-select: none;
88
88
  }
89
- img[data-v-961m65rq] {
89
+ img[data-v-d958lol5] {
90
90
  margin-left: 16px;
91
91
  margin-top: 5px;
92
92
  width: 36px;
@@ -95,6 +95,6 @@ img[data-v-961m65rq] {
95
95
  border-radius: 100%;
96
96
  }
97
97
  }
98
- .skeleton-message[data-v-961m65rq] {
98
+ .skeleton-message[data-v-d958lol5] {
99
99
  margin-left: 52px;
100
100
  }
@@ -1,5 +1,5 @@
1
1
  import script from './user-message.script.vue.js';
2
- script.__scopeId = "data-v-961m65rq";
2
+ script.__scopeId = "data-v-d958lol5";
3
3
  script.__file = "./src/component/render-message/user-message.vue";
4
4
  import './user-message.vue.css';
5
5
  export default script;
@@ -1,6 +1,6 @@
1
1
 
2
2
  .render-stop {
3
- &[data-v-v89tz0ix] {
3
+ &[data-v-jycav01d] {
4
4
  background: #FFFFFF;
5
5
  border: 1px solid #DCDEE5;
6
6
  border-radius: 2px;
@@ -9,7 +9,7 @@
9
9
  font-size: 12px;
10
10
  cursor: pointer;
11
11
  }
12
- .stop-icon[data-v-v89tz0ix] {
12
+ .stop-icon[data-v-jycav01d] {
13
13
  width: 8px;
14
14
  height: 8px;
15
15
  background: #FFDDDD;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-v89tz0ix";
2
+ script.__scopeId = "data-v-jycav01d";
3
3
  script.__file = "./src/component/render-stop/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -67,35 +67,15 @@ import { processPromptTemplate, throttle } from '../common/util.js';
67
67
  export const useChat = ({ handleStart, handleText, handleReferenceDoc, handleThink, handleEnd, handleError, requestOptions })=>{
68
68
  // 用 ref 存储 requestOptions,使其可更新
69
69
  const currentRequestOptions = ref(requestOptions);
70
- // 创建一个获取 API 函数的方法,便于重用
71
- const createHttpApis = (options)=>{
72
- return useHttp(options.url);
73
- };
74
- // 初始 API 实例
75
- let httpApis = createHttpApis(currentRequestOptions.value);
76
- // 解构 API 方法
77
- let { getAgentInfo: getAgentInfoApi, clearSession: clearSessionApi, getSessions: getSessionsApi, plusSession: plusSessionApi, modifySession: modifySessionApi, deleteSession: deleteSessionApi, batchDeleteSessions: batchDeleteSessionsApi, getSession: getSessionApi, getSessionContents: getSessionContentsApi, plusSessionContent: plusSessionContentApi, modifySessionContent: modifySessionContentApi, deleteSessionContent: deleteSessionContentApi, batchDeleteSessionContents: batchDeleteSessionContentsApi } = httpApis;
70
+ // 创建一个变量保存当前的API实现
71
+ let apiImpl = useHttp(currentRequestOptions.value.url);
78
72
  // 更新 requestOptions 的方法
79
73
  function updateRequestOptions(newOptions) {
80
74
  // 合并新旧配置
81
75
  currentRequestOptions.value = _object_spread({}, currentRequestOptions.value, newOptions);
82
76
  // 如果 URL 变更,重新获取 API
83
77
  if (newOptions.url) {
84
- httpApis = createHttpApis(currentRequestOptions.value);
85
- // 更新所有 API 引用
86
- getAgentInfoApi = httpApis.getAgentInfo;
87
- clearSessionApi = httpApis.clearSession;
88
- getSessionsApi = httpApis.getSessions;
89
- plusSessionApi = httpApis.plusSession;
90
- modifySessionApi = httpApis.modifySession;
91
- deleteSessionApi = httpApis.deleteSession;
92
- batchDeleteSessionsApi = httpApis.batchDeleteSessions;
93
- getSessionApi = httpApis.getSession;
94
- getSessionContentsApi = httpApis.getSessionContents;
95
- plusSessionContentApi = httpApis.plusSessionContent;
96
- modifySessionContentApi = httpApis.modifySessionContent;
97
- deleteSessionContentApi = httpApis.deleteSessionContent;
98
- batchDeleteSessionContentsApi = httpApis.batchDeleteSessionContents;
78
+ apiImpl = useHttp(currentRequestOptions.value.url);
99
79
  }
100
80
  }
101
81
  const startMessage = '内容正在生成中...';
@@ -219,14 +199,14 @@ export const useChat = ({ handleStart, handleText, handleReferenceDoc, handleThi
219
199
  });
220
200
  // 新增 db
221
201
  function plusSessionContent2Db(sessionContent) {
222
- return plusSessionContentApi(sessionContent).then((result)=>{
202
+ return apiImpl.plusSessionContent(sessionContent).then((result)=>{
223
203
  sessionContent.id = result.id;
224
204
  sessionContent.createdAt = result.createdAt;
225
205
  return sessionContent;
226
206
  });
227
207
  }
228
208
  // 防抖更新 db
229
- const throttleModifySessionContentApi = throttle((id, sessionContent)=>modifySessionContentApi(sessionContent), 1000);
209
+ const throttleModifySessionContentApi = throttle((id, sessionContent)=>apiImpl.modifySessionContent(sessionContent), 1000);
230
210
  // 设置 currentSession
231
211
  function setCurrentSession(session) {
232
212
  currentSession.value = session;
@@ -331,12 +311,12 @@ export const useChat = ({ handleStart, handleText, handleReferenceDoc, handleThi
331
311
  const deleteSessionContentIds = getDeleteSessionContents(sessionCode, [
332
312
  contentId
333
313
  ], true);
334
- return batchDeleteSessionContentsApi(deleteSessionContentIds);
314
+ return apiImpl.batchDeleteSessionContents(deleteSessionContentIds);
335
315
  }
336
316
  // 批量删除
337
317
  function deleteSessionContents(sessionCode, contentIds) {
338
318
  const deleteSessionContentIds = getDeleteSessionContents(sessionCode, contentIds, false);
339
- return batchDeleteSessionContentsApi(deleteSessionContentIds);
319
+ return apiImpl.batchDeleteSessionContents(deleteSessionContentIds);
340
320
  }
341
321
  function handleStartChat(sessionCode) {
342
322
  return _handleStartChat.apply(this, arguments);
@@ -578,6 +558,7 @@ export const useChat = ({ handleStart, handleText, handleReferenceDoc, handleThi
578
558
  function stopChat(sessionCode) {
579
559
  chatHelper.stop(sessionCode);
580
560
  }
561
+ // 返回包装函数,这些函数会在调用时使用当前的apiImpl
581
562
  return {
582
563
  currentSession,
583
564
  sessionContents,
@@ -602,19 +583,20 @@ export const useChat = ({ handleStart, handleText, handleReferenceDoc, handleThi
602
583
  reGenerateChat,
603
584
  reSendChat,
604
585
  deleteChat,
605
- getAgentInfoApi,
606
- clearSessionApi,
607
- getSessionsApi,
608
- plusSessionApi,
609
- modifySessionApi,
610
- deleteSessionApi,
611
- batchDeleteSessionsApi,
612
- getSessionApi,
613
- getSessionContentsApi,
614
- plusSessionContentApi,
615
- modifySessionContentApi,
616
- deleteSessionContentApi,
617
- batchDeleteSessionContentsApi,
586
+ // API 方法包装器,使用正确的类型签名
587
+ getAgentInfoApi: (...args)=>apiImpl.getAgentInfo(...args),
588
+ clearSessionApi: (...args)=>apiImpl.clearSession(...args),
589
+ getSessionsApi: (...args)=>apiImpl.getSessions(...args),
590
+ plusSessionApi: (...args)=>apiImpl.plusSession(...args),
591
+ modifySessionApi: (...args)=>apiImpl.modifySession(...args),
592
+ deleteSessionApi: (...args)=>apiImpl.deleteSession(...args),
593
+ batchDeleteSessionsApi: (...args)=>apiImpl.batchDeleteSessions(...args),
594
+ getSessionApi: (...args)=>apiImpl.getSession(...args),
595
+ getSessionContentsApi: (...args)=>apiImpl.getSessionContents(...args),
596
+ plusSessionContentApi: (...args)=>apiImpl.plusSessionContent(...args),
597
+ modifySessionContentApi: (...args)=>apiImpl.modifySessionContent(...args),
598
+ deleteSessionContentApi: (...args)=>apiImpl.deleteSessionContent(...args),
599
+ batchDeleteSessionContentsApi: (...args)=>apiImpl.batchDeleteSessionContents(...args),
618
600
  updateRequestOptions
619
601
  };
620
602
  };