@orbe-agro/client-core 5.6.339 → 5.6.340
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@ecme/assets/styles/app.css +39 -26
- package/dist/@ecme/assets/styles/tailwind/index.css +39 -26
- package/dist/@ecme/components/template/Footer.js +1 -1
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js +3 -2
- package/dist/@ecme/components/view/ChatBox/components/ChatInput.js.map +1 -1
- package/dist/@ecme/index.js +2 -1
- package/dist/@ecme/services/AiService.js +19 -2
- package/dist/@ecme/services/AiService.js.map +1 -1
- package/dist/@ecme/services/index.js +2 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js +42 -40
- package/dist/@ecme/views/concepts/ai/Chat/components/ChatView.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/FormatoCard.js +81 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/FormatoCard.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.js +142 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.js +47 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.js +64 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/components/ToolCallChip.js +7 -3
- package/dist/@ecme/views/concepts/ai/Chat/components/ToolCallChip.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/toolPresentation.js +12 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/toolPresentation.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useChatSend.js +47 -33
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useChatSend.js.map +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useModelos.js +31 -0
- package/dist/@ecme/views/concepts/ai/Chat/hooks/useModelos.js.map +1 -0
- package/dist/@ecme/views/concepts/ai/Chat/store/modeloStore.js +15 -0
- package/dist/@ecme/views/concepts/ai/Chat/store/modeloStore.js.map +1 -0
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts +2 -2
- package/dist/@types/@ecme/components/view/ChatBox/components/ChatInput.d.ts.map +1 -1
- package/dist/@types/@ecme/services/AiService.d.ts +15 -5
- package/dist/@types/@ecme/services/AiService.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ChatView.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/FormatoCard.d.ts +16 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/FormatoCard.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.d.ts +16 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.d.ts +14 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.d.ts +15 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/ToolCallChip.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/toolPresentation.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useChatSend.d.ts +2 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useChatSend.d.ts.map +1 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useModelos.d.ts +26 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/hooks/useModelos.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/store/modeloStore.d.ts +27 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/store/modeloStore.d.ts.map +1 -0
- package/dist/@types/@ecme/views/concepts/ai/Chat/types.d.ts +89 -24
- package/dist/@types/@ecme/views/concepts/ai/Chat/types.d.ts.map +1 -1
- package/dist/base/assets/styles/init.css +46 -30
- package/lib/@ecme/components/view/ChatBox/components/ChatInput.tsx +5 -4
- package/lib/@ecme/services/AiService.ts +31 -4
- package/lib/@ecme/views/concepts/ai/Chat/components/ChatView.tsx +43 -38
- package/lib/@ecme/views/concepts/ai/Chat/components/FormatoCard.tsx +123 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/ModeloERaciocinio.tsx +200 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/PlanilhaNaMensagem.tsx +65 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/RelatorioNaMensagem.tsx +77 -0
- package/lib/@ecme/views/concepts/ai/Chat/components/ToolCallChip.tsx +12 -6
- package/lib/@ecme/views/concepts/ai/Chat/components/toolPresentation.ts +13 -0
- package/lib/@ecme/views/concepts/ai/Chat/hooks/useChatSend.ts +97 -60
- package/lib/@ecme/views/concepts/ai/Chat/hooks/useModelos.ts +63 -0
- package/lib/@ecme/views/concepts/ai/Chat/store/modeloStore.ts +25 -0
- package/lib/@ecme/views/concepts/ai/Chat/types.ts +96 -24
- package/package.json +1 -1
- package/dist/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.js +0 -85
- package/dist/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.js.map +0 -1
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.d.ts +0 -14
- package/dist/@types/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.d.ts.map +0 -1
- package/lib/@ecme/views/concepts/ai/Chat/components/EsforcoRaciocinio.tsx +0 -115
|
@@ -5593,6 +5593,9 @@ video {
|
|
|
5593
5593
|
.h-\[60px\]{
|
|
5594
5594
|
height: 60px;
|
|
5595
5595
|
}
|
|
5596
|
+
.h-\[70vh\]{
|
|
5597
|
+
height: 70vh;
|
|
5598
|
+
}
|
|
5596
5599
|
.h-\[calc\(100\%-100px\)\]{
|
|
5597
5600
|
height: calc(100% - 100px);
|
|
5598
5601
|
}
|
|
@@ -5659,9 +5662,15 @@ video {
|
|
|
5659
5662
|
.max-h-\[600px\]{
|
|
5660
5663
|
max-height: 600px;
|
|
5661
5664
|
}
|
|
5665
|
+
.max-h-\[60vh\]{
|
|
5666
|
+
max-height: 60vh;
|
|
5667
|
+
}
|
|
5662
5668
|
.max-h-\[700px\]{
|
|
5663
5669
|
max-height: 700px;
|
|
5664
5670
|
}
|
|
5671
|
+
.max-h-\[760px\]{
|
|
5672
|
+
max-height: 760px;
|
|
5673
|
+
}
|
|
5665
5674
|
.max-h-full{
|
|
5666
5675
|
max-height: 100%;
|
|
5667
5676
|
}
|
|
@@ -5704,6 +5713,9 @@ video {
|
|
|
5704
5713
|
.min-h-\[320px\]{
|
|
5705
5714
|
min-height: 320px;
|
|
5706
5715
|
}
|
|
5716
|
+
.min-h-\[360px\]{
|
|
5717
|
+
min-height: 360px;
|
|
5718
|
+
}
|
|
5707
5719
|
.min-h-\[46px\]{
|
|
5708
5720
|
min-height: 46px;
|
|
5709
5721
|
}
|
|
@@ -5920,6 +5932,9 @@ video {
|
|
|
5920
5932
|
.min-w-\[330px\]{
|
|
5921
5933
|
min-width: 330px;
|
|
5922
5934
|
}
|
|
5935
|
+
.min-w-\[6rem\]{
|
|
5936
|
+
min-width: 6rem;
|
|
5937
|
+
}
|
|
5923
5938
|
.min-w-full{
|
|
5924
5939
|
min-width: 100%;
|
|
5925
5940
|
}
|
|
@@ -5989,6 +6004,9 @@ video {
|
|
|
5989
6004
|
.max-w-\[900px\]{
|
|
5990
6005
|
max-width: 900px;
|
|
5991
6006
|
}
|
|
6007
|
+
.max-w-\[9rem\]{
|
|
6008
|
+
max-width: 9rem;
|
|
6009
|
+
}
|
|
5992
6010
|
.max-w-full{
|
|
5993
6011
|
max-width: 100%;
|
|
5994
6012
|
}
|
|
@@ -6440,10 +6458,6 @@ video {
|
|
|
6440
6458
|
.border-none{
|
|
6441
6459
|
border-style: none;
|
|
6442
6460
|
}
|
|
6443
|
-
.border-emerald-300{
|
|
6444
|
-
--tw-border-opacity: 1;
|
|
6445
|
-
border-color: rgb(110 231 183 / var(--tw-border-opacity, 1));
|
|
6446
|
-
}
|
|
6447
6461
|
.border-error{
|
|
6448
6462
|
border-color: var(--error);
|
|
6449
6463
|
}
|
|
@@ -6591,10 +6605,6 @@ video {
|
|
|
6591
6605
|
--tw-bg-opacity: 1;
|
|
6592
6606
|
background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));
|
|
6593
6607
|
}
|
|
6594
|
-
.bg-emerald-50{
|
|
6595
|
-
--tw-bg-opacity: 1;
|
|
6596
|
-
background-color: rgb(236 253 245 / var(--tw-bg-opacity, 1));
|
|
6597
|
-
}
|
|
6598
6608
|
.bg-emerald-500{
|
|
6599
6609
|
--tw-bg-opacity: 1;
|
|
6600
6610
|
background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));
|
|
@@ -7303,10 +7313,6 @@ video {
|
|
|
7303
7313
|
--tw-text-opacity: 1;
|
|
7304
7314
|
color: rgb(5 150 105 / var(--tw-text-opacity, 1));
|
|
7305
7315
|
}
|
|
7306
|
-
.text-emerald-700{
|
|
7307
|
-
--tw-text-opacity: 1;
|
|
7308
|
-
color: rgb(4 120 87 / var(--tw-text-opacity, 1));
|
|
7309
|
-
}
|
|
7310
7316
|
.text-error{
|
|
7311
7317
|
color: var(--error);
|
|
7312
7318
|
}
|
|
@@ -7729,10 +7735,6 @@ video {
|
|
|
7729
7735
|
--tw-bg-opacity: 1;
|
|
7730
7736
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
7731
7737
|
}
|
|
7732
|
-
.hover\:bg-emerald-100:hover{
|
|
7733
|
-
--tw-bg-opacity: 1;
|
|
7734
|
-
background-color: rgb(209 250 229 / var(--tw-bg-opacity, 1));
|
|
7735
|
-
}
|
|
7736
7738
|
.hover\:bg-gray-100:hover{
|
|
7737
7739
|
background-color: var(--gray-100);
|
|
7738
7740
|
}
|
|
@@ -7882,6 +7884,24 @@ video {
|
|
|
7882
7884
|
.active\:bg-gray-100:active{
|
|
7883
7885
|
background-color: var(--gray-100);
|
|
7884
7886
|
}
|
|
7887
|
+
.enabled\:hover\:border-primary:hover:enabled{
|
|
7888
|
+
border-color: var(--primary);
|
|
7889
|
+
}
|
|
7890
|
+
.enabled\:hover\:bg-gray-50:hover:enabled{
|
|
7891
|
+
background-color: var(--gray-50);
|
|
7892
|
+
}
|
|
7893
|
+
.enabled\:hover\:text-primary:hover:enabled{
|
|
7894
|
+
color: var(--primary);
|
|
7895
|
+
}
|
|
7896
|
+
.disabled\:cursor-not-allowed:disabled{
|
|
7897
|
+
cursor: not-allowed;
|
|
7898
|
+
}
|
|
7899
|
+
.disabled\:opacity-40:disabled{
|
|
7900
|
+
opacity: 0.4;
|
|
7901
|
+
}
|
|
7902
|
+
.disabled\:opacity-60:disabled{
|
|
7903
|
+
opacity: 0.6;
|
|
7904
|
+
}
|
|
7885
7905
|
.group:hover .group-hover\:block{
|
|
7886
7906
|
display: block;
|
|
7887
7907
|
}
|
|
@@ -8009,10 +8029,6 @@ video {
|
|
|
8009
8029
|
.dark\:border-solid:is(.dark *){
|
|
8010
8030
|
border-style: solid;
|
|
8011
8031
|
}
|
|
8012
|
-
.dark\:border-emerald-700:is(.dark *){
|
|
8013
|
-
--tw-border-opacity: 1;
|
|
8014
|
-
border-color: rgb(4 120 87 / var(--tw-border-opacity, 1));
|
|
8015
|
-
}
|
|
8016
8032
|
.dark\:border-gray-500:is(.dark *){
|
|
8017
8033
|
border-color: var(--gray-500);
|
|
8018
8034
|
}
|
|
@@ -8082,9 +8098,6 @@ video {
|
|
|
8082
8098
|
.dark\:bg-emerald-500\/20:is(.dark *){
|
|
8083
8099
|
background-color: rgb(16 185 129 / 0.2);
|
|
8084
8100
|
}
|
|
8085
|
-
.dark\:bg-emerald-900\/30:is(.dark *){
|
|
8086
|
-
background-color: rgb(6 78 59 / 0.3);
|
|
8087
|
-
}
|
|
8088
8101
|
.dark\:bg-fuchsia-200:is(.dark *){
|
|
8089
8102
|
--tw-bg-opacity: 1;
|
|
8090
8103
|
background-color: rgb(245 208 254 / var(--tw-bg-opacity, 1));
|
|
@@ -8363,9 +8376,6 @@ video {
|
|
|
8363
8376
|
--tw-bg-opacity: 1;
|
|
8364
8377
|
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
8365
8378
|
}
|
|
8366
|
-
.dark\:hover\:bg-emerald-900\/50:hover:is(.dark *){
|
|
8367
|
-
background-color: rgb(6 78 59 / 0.5);
|
|
8368
|
-
}
|
|
8369
8379
|
.dark\:hover\:bg-gray-200:hover:is(.dark *){
|
|
8370
8380
|
background-color: var(--gray-200);
|
|
8371
8381
|
}
|
|
@@ -8424,6 +8434,9 @@ video {
|
|
|
8424
8434
|
.dark\:active\:bg-opacity-40:active:is(.dark *){
|
|
8425
8435
|
--tw-bg-opacity: 0.4;
|
|
8426
8436
|
}
|
|
8437
|
+
.dark\:enabled\:hover\:bg-gray-700:hover:enabled:is(.dark *){
|
|
8438
|
+
background-color: var(--gray-700);
|
|
8439
|
+
}
|
|
8427
8440
|
.group:hover .dark\:group-hover\:bg-gray-800:is(.dark *){
|
|
8428
8441
|
background-color: var(--gray-800);
|
|
8429
8442
|
}
|
|
@@ -1670,6 +1670,9 @@ video {
|
|
|
1670
1670
|
.h-\[60px\] {
|
|
1671
1671
|
height: 60px;
|
|
1672
1672
|
}
|
|
1673
|
+
.h-\[70vh\] {
|
|
1674
|
+
height: 70vh;
|
|
1675
|
+
}
|
|
1673
1676
|
.h-\[calc\(100\%-100px\)\] {
|
|
1674
1677
|
height: calc(100% - 100px);
|
|
1675
1678
|
}
|
|
@@ -1736,9 +1739,15 @@ video {
|
|
|
1736
1739
|
.max-h-\[600px\] {
|
|
1737
1740
|
max-height: 600px;
|
|
1738
1741
|
}
|
|
1742
|
+
.max-h-\[60vh\] {
|
|
1743
|
+
max-height: 60vh;
|
|
1744
|
+
}
|
|
1739
1745
|
.max-h-\[700px\] {
|
|
1740
1746
|
max-height: 700px;
|
|
1741
1747
|
}
|
|
1748
|
+
.max-h-\[760px\] {
|
|
1749
|
+
max-height: 760px;
|
|
1750
|
+
}
|
|
1742
1751
|
.max-h-full {
|
|
1743
1752
|
max-height: 100%;
|
|
1744
1753
|
}
|
|
@@ -1781,6 +1790,9 @@ video {
|
|
|
1781
1790
|
.min-h-\[320px\] {
|
|
1782
1791
|
min-height: 320px;
|
|
1783
1792
|
}
|
|
1793
|
+
.min-h-\[360px\] {
|
|
1794
|
+
min-height: 360px;
|
|
1795
|
+
}
|
|
1784
1796
|
.min-h-\[46px\] {
|
|
1785
1797
|
min-height: 46px;
|
|
1786
1798
|
}
|
|
@@ -1997,6 +2009,9 @@ video {
|
|
|
1997
2009
|
.min-w-\[330px\] {
|
|
1998
2010
|
min-width: 330px;
|
|
1999
2011
|
}
|
|
2012
|
+
.min-w-\[6rem\] {
|
|
2013
|
+
min-width: 6rem;
|
|
2014
|
+
}
|
|
2000
2015
|
.min-w-full {
|
|
2001
2016
|
min-width: 100%;
|
|
2002
2017
|
}
|
|
@@ -2066,6 +2081,9 @@ video {
|
|
|
2066
2081
|
.max-w-\[900px\] {
|
|
2067
2082
|
max-width: 900px;
|
|
2068
2083
|
}
|
|
2084
|
+
.max-w-\[9rem\] {
|
|
2085
|
+
max-width: 9rem;
|
|
2086
|
+
}
|
|
2069
2087
|
.max-w-full {
|
|
2070
2088
|
max-width: 100%;
|
|
2071
2089
|
}
|
|
@@ -2519,10 +2537,6 @@ video {
|
|
|
2519
2537
|
.border-none {
|
|
2520
2538
|
border-style: none;
|
|
2521
2539
|
}
|
|
2522
|
-
.border-emerald-300 {
|
|
2523
|
-
--tw-border-opacity: 1;
|
|
2524
|
-
border-color: rgb(110 231 183 / var(--tw-border-opacity, 1));
|
|
2525
|
-
}
|
|
2526
2540
|
.border-error {
|
|
2527
2541
|
border-color: var(--error);
|
|
2528
2542
|
}
|
|
@@ -2670,10 +2684,6 @@ video {
|
|
|
2670
2684
|
--tw-bg-opacity: 1;
|
|
2671
2685
|
background-color: rgb(167 243 208 / var(--tw-bg-opacity, 1));
|
|
2672
2686
|
}
|
|
2673
|
-
.bg-emerald-50 {
|
|
2674
|
-
--tw-bg-opacity: 1;
|
|
2675
|
-
background-color: rgb(236 253 245 / var(--tw-bg-opacity, 1));
|
|
2676
|
-
}
|
|
2677
2687
|
.bg-emerald-500 {
|
|
2678
2688
|
--tw-bg-opacity: 1;
|
|
2679
2689
|
background-color: rgb(16 185 129 / var(--tw-bg-opacity, 1));
|
|
@@ -3382,10 +3392,6 @@ video {
|
|
|
3382
3392
|
--tw-text-opacity: 1;
|
|
3383
3393
|
color: rgb(5 150 105 / var(--tw-text-opacity, 1));
|
|
3384
3394
|
}
|
|
3385
|
-
.text-emerald-700 {
|
|
3386
|
-
--tw-text-opacity: 1;
|
|
3387
|
-
color: rgb(4 120 87 / var(--tw-text-opacity, 1));
|
|
3388
|
-
}
|
|
3389
3395
|
.text-error {
|
|
3390
3396
|
color: var(--error);
|
|
3391
3397
|
}
|
|
@@ -3808,10 +3814,6 @@ video {
|
|
|
3808
3814
|
--tw-bg-opacity: 1;
|
|
3809
3815
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
3810
3816
|
}
|
|
3811
|
-
.hover\:bg-emerald-100:hover {
|
|
3812
|
-
--tw-bg-opacity: 1;
|
|
3813
|
-
background-color: rgb(209 250 229 / var(--tw-bg-opacity, 1));
|
|
3814
|
-
}
|
|
3815
3817
|
.hover\:bg-gray-100:hover {
|
|
3816
3818
|
background-color: var(--gray-100);
|
|
3817
3819
|
}
|
|
@@ -3961,6 +3963,24 @@ video {
|
|
|
3961
3963
|
.active\:bg-gray-100:active {
|
|
3962
3964
|
background-color: var(--gray-100);
|
|
3963
3965
|
}
|
|
3966
|
+
.enabled\:hover\:border-primary:hover:enabled {
|
|
3967
|
+
border-color: var(--primary);
|
|
3968
|
+
}
|
|
3969
|
+
.enabled\:hover\:bg-gray-50:hover:enabled {
|
|
3970
|
+
background-color: var(--gray-50);
|
|
3971
|
+
}
|
|
3972
|
+
.enabled\:hover\:text-primary:hover:enabled {
|
|
3973
|
+
color: var(--primary);
|
|
3974
|
+
}
|
|
3975
|
+
.disabled\:cursor-not-allowed:disabled {
|
|
3976
|
+
cursor: not-allowed;
|
|
3977
|
+
}
|
|
3978
|
+
.disabled\:opacity-40:disabled {
|
|
3979
|
+
opacity: 0.4;
|
|
3980
|
+
}
|
|
3981
|
+
.disabled\:opacity-60:disabled {
|
|
3982
|
+
opacity: 0.6;
|
|
3983
|
+
}
|
|
3964
3984
|
.group:hover .group-hover\:block {
|
|
3965
3985
|
display: block;
|
|
3966
3986
|
}
|
|
@@ -4106,10 +4126,6 @@ video {
|
|
|
4106
4126
|
.dark\:border-solid:is(.dark *) {
|
|
4107
4127
|
border-style: solid;
|
|
4108
4128
|
}
|
|
4109
|
-
.dark\:border-emerald-700:is(.dark *) {
|
|
4110
|
-
--tw-border-opacity: 1;
|
|
4111
|
-
border-color: rgb(4 120 87 / var(--tw-border-opacity, 1));
|
|
4112
|
-
}
|
|
4113
4129
|
.dark\:border-gray-500:is(.dark *) {
|
|
4114
4130
|
border-color: var(--gray-500);
|
|
4115
4131
|
}
|
|
@@ -4179,9 +4195,6 @@ video {
|
|
|
4179
4195
|
.dark\:bg-emerald-500\/20:is(.dark *) {
|
|
4180
4196
|
background-color: rgb(16 185 129 / 0.2);
|
|
4181
4197
|
}
|
|
4182
|
-
.dark\:bg-emerald-900\/30:is(.dark *) {
|
|
4183
|
-
background-color: rgb(6 78 59 / 0.3);
|
|
4184
|
-
}
|
|
4185
4198
|
.dark\:bg-fuchsia-200:is(.dark *) {
|
|
4186
4199
|
--tw-bg-opacity: 1;
|
|
4187
4200
|
background-color: rgb(245 208 254 / var(--tw-bg-opacity, 1));
|
|
@@ -4460,9 +4473,6 @@ video {
|
|
|
4460
4473
|
--tw-bg-opacity: 1;
|
|
4461
4474
|
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1));
|
|
4462
4475
|
}
|
|
4463
|
-
.dark\:hover\:bg-emerald-900\/50:hover:is(.dark *) {
|
|
4464
|
-
background-color: rgb(6 78 59 / 0.5);
|
|
4465
|
-
}
|
|
4466
4476
|
.dark\:hover\:bg-gray-200:hover:is(.dark *) {
|
|
4467
4477
|
background-color: var(--gray-200);
|
|
4468
4478
|
}
|
|
@@ -4521,6 +4531,9 @@ video {
|
|
|
4521
4531
|
.dark\:active\:bg-opacity-40:active:is(.dark *) {
|
|
4522
4532
|
--tw-bg-opacity: 0.4;
|
|
4523
4533
|
}
|
|
4534
|
+
.dark\:enabled\:hover\:bg-gray-700:hover:enabled:is(.dark *) {
|
|
4535
|
+
background-color: var(--gray-700);
|
|
4536
|
+
}
|
|
4524
4537
|
.group:hover .dark\:group-hover\:bg-gray-800:is(.dark *) {
|
|
4525
4538
|
background-color: var(--gray-800);
|
|
4526
4539
|
}
|
|
@@ -3,7 +3,7 @@ import Container from "../shared/Container.js";
|
|
|
3
3
|
import classNames from "../../utils/classNames.js";
|
|
4
4
|
import { APP_NAME } from "../../constants/app.constant.js";
|
|
5
5
|
import { PAGE_CONTAINER_GUTTER_X } from "../../constants/theme.constant.js";
|
|
6
|
-
const version = true ? "5.6.
|
|
6
|
+
const version = true ? "5.6.340" : "0.0.0";
|
|
7
7
|
const FooterContent = () => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-auto items-center justify-between", children: [
|
|
9
9
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -58,8 +58,9 @@ const ChatInput = (props) => {
|
|
|
58
58
|
children: /* @__PURE__ */ jsx(
|
|
59
59
|
"button",
|
|
60
60
|
{
|
|
61
|
-
className: "text-xl heading-text hover:text-primary px-1 py-2",
|
|
61
|
+
className: "text-xl heading-text enabled:hover:text-primary disabled:cursor-not-allowed disabled:opacity-40 px-1 py-2",
|
|
62
62
|
type: "button",
|
|
63
|
+
disabled: uploadProps?.disabled,
|
|
63
64
|
children: /* @__PURE__ */ jsx(TbPhotoPlus, {})
|
|
64
65
|
}
|
|
65
66
|
)
|
|
@@ -69,7 +70,7 @@ const ChatInput = (props) => {
|
|
|
69
70
|
"input",
|
|
70
71
|
{
|
|
71
72
|
ref: useMergeRef(inputRef, ref),
|
|
72
|
-
className: "flex-1 h-full placeholder:text-gray-400 bg-transparent focus:outline-none heading-text",
|
|
73
|
+
className: "flex-1 min-w-[6rem] h-full placeholder:text-gray-400 bg-transparent focus:outline-none heading-text",
|
|
73
74
|
placeholder,
|
|
74
75
|
onKeyDown: handleKeyDown
|
|
75
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.js","sources":["../../../../../../lib/@ecme/components/view/ChatBox/components/ChatInput.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Button from '@/components/ui/Button'\nimport Upload from '@/components/ui/Upload'\nimport hooks from '@/components/ui/hooks'\nimport { TbPhotoPlus, TbArrowRight } from 'react-icons/tb'\nimport type { UploadProps } from '@/components/ui/Upload'\nimport type { KeyboardEvent, ReactNode, Ref } from 'react'\n\nexport type ChatInputProps = {\n placeholder?: string\n onInputChange?: (payload: { value: string; attachments: File[] }) => void\n ref?: Ref<HTMLInputElement>\n /** Controles extras dentro da caixa, logo antes do botão de enviar. */\n inputActions?: ReactNode\n /** Restrições do seletor de anexos (tipos aceitos e
|
|
1
|
+
{"version":3,"file":"ChatInput.js","sources":["../../../../../../lib/@ecme/components/view/ChatBox/components/ChatInput.tsx"],"sourcesContent":["import { useState, useRef } from 'react'\nimport Button from '@/components/ui/Button'\nimport Upload from '@/components/ui/Upload'\nimport hooks from '@/components/ui/hooks'\nimport { TbPhotoPlus, TbArrowRight } from 'react-icons/tb'\nimport type { UploadProps } from '@/components/ui/Upload'\nimport type { KeyboardEvent, ReactNode, Ref } from 'react'\n\nexport type ChatInputProps = {\n placeholder?: string\n onInputChange?: (payload: { value: string; attachments: File[] }) => void\n ref?: Ref<HTMLInputElement>\n /** Controles extras dentro da caixa, logo antes do botão de enviar. */\n inputActions?: ReactNode\n /** Restrições do seletor de anexos (tipos aceitos, validação e bloqueio). */\n uploadProps?: Pick<UploadProps, 'accept' | 'beforeUpload' | 'disabled'>\n}\n\nconst { useMergeRef } = hooks\n\nconst ChatInput = (props: ChatInputProps) => {\n const [attachments, setAttachments] = useState<File[]>([])\n\n const {\n placeholder,\n onInputChange,\n ref = null,\n inputActions,\n uploadProps,\n } = props\n\n const inputRef = useRef<HTMLInputElement>(null)\n\n const handleInputClear = () => {\n if (inputRef.current) {\n inputRef.current.value = ''\n }\n setAttachments([])\n }\n\n /** Envia texto, anexos ou os dois; com a caixa vazia não faz nada. */\n const enviar = () => {\n const value = inputRef.current?.value ?? ''\n if (!value.trim() && attachments.length === 0) {\n return\n }\n onInputChange?.({ value, attachments })\n handleInputClear()\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n enviar()\n }\n }\n\n return (\n <div className=\"border-2 border-gray-200 dark:border-gray-700 rounded-xl min-h-[50px] px-3 flex flex-col\">\n {attachments.length > 0 && (\n <Upload\n fileList={attachments}\n fileListClass=\"flex gap-4\"\n fileItemClass=\"flex gap-8\"\n onFileRemove={setAttachments}\n >\n <></>\n </Upload>\n )}\n <div className=\"flex items-center gap-2 w-full h-[50px]\">\n <Upload\n {...uploadProps}\n fileList={attachments}\n showList={false}\n onChange={setAttachments}\n >\n <button\n className=\"text-xl heading-text enabled:hover:text-primary disabled:cursor-not-allowed disabled:opacity-40 px-1 py-2\"\n type=\"button\"\n disabled={uploadProps?.disabled}\n >\n <TbPhotoPlus />\n </button>\n </Upload>\n <input\n ref={useMergeRef(inputRef, ref)}\n className=\"flex-1 min-w-[6rem] h-full placeholder:text-gray-400 bg-transparent focus:outline-none heading-text\"\n placeholder={placeholder}\n onKeyDown={handleKeyDown}\n />\n {inputActions}\n <Button\n size=\"xs\"\n shape=\"circle\"\n variant=\"solid\"\n icon={<TbArrowRight />}\n onClick={enviar}\n />\n </div>\n </div>\n )\n}\n\nexport default ChatInput\n"],"names":[],"mappings":";;;;;;;;AAkBA,MAAM,EAAE,gBAAgB;AAExB,MAAM,YAAY,CAAC,UAA0B;AACzC,QAAM,CAAC,aAAa,cAAc,IAAI,SAAiB,CAAA,CAAE;AAEzD,QAAM;AAAA,IACF;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,EAAA,IACA;AAEJ,QAAM,WAAW,OAAyB,IAAI;AAE9C,QAAM,mBAAmB,MAAM;AAC3B,QAAI,SAAS,SAAS;AAClB,eAAS,QAAQ,QAAQ;AAAA,IAC7B;AACA,mBAAe,CAAA,CAAE;AAAA,EACrB;AAGA,QAAM,SAAS,MAAM;AACjB,UAAM,QAAQ,SAAS,SAAS,SAAS;AACzC,QAAI,CAAC,MAAM,KAAA,KAAU,YAAY,WAAW,GAAG;AAC3C;AAAA,IACJ;AACA,oBAAgB,EAAE,OAAO,aAAa;AACtC,qBAAA;AAAA,EACJ;AAEA,QAAM,gBAAgB,CAAC,UAA2C;AAC9D,QAAI,MAAM,QAAQ,SAAS;AACvB,aAAA;AAAA,IACJ;AAAA,EACJ;AAEA,SACI,qBAAC,OAAA,EAAI,WAAU,4FACV,UAAA;AAAA,IAAA,YAAY,SAAS,KAClB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,UAAU;AAAA,QACV,eAAc;AAAA,QACd,eAAc;AAAA,QACd,cAAc;AAAA,QAEd,UAAA,oBAAA,UAAA,CAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,IAGV,qBAAC,OAAA,EAAI,WAAU,2CACX,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACI,GAAG;AAAA,UACJ,UAAU;AAAA,UACV,UAAU;AAAA,UACV,UAAU;AAAA,UAEV,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,WAAU;AAAA,cACV,MAAK;AAAA,cACL,UAAU,aAAa;AAAA,cAEvB,8BAAC,aAAA,CAAA,CAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MAAA;AAAA,MAEJ;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,KAAK,YAAY,UAAU,GAAG;AAAA,UAC9B,WAAU;AAAA,UACV;AAAA,UACA,WAAW;AAAA,QAAA;AAAA,MAAA;AAAA,MAEd;AAAA,MACD;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,MAAK;AAAA,UACL,OAAM;AAAA,UACN,SAAQ;AAAA,UACR,0BAAO,cAAA,EAAa;AAAA,UACpB,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACb,EAAA,CACJ;AAAA,EAAA,GACJ;AAER;"}
|
package/dist/@ecme/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import "./auth/index.js";
|
|
|
10
10
|
import "./assets/index.js";
|
|
11
11
|
import "./locales/index.js";
|
|
12
12
|
import { ADMIN, USER } from "./constants/roles.constant.js";
|
|
13
|
-
import { AI_API_URL, apiDeleteConversation, apiGetChatHistory, apiGetConversations, apiGetImagemDoChat, apiGetImages, apiPostImages, apiRenameConversation, resumeChat, streamChat } from "./services/AiService.js";
|
|
13
|
+
import { AI_API_URL, apiDeleteConversation, apiGetChatHistory, apiGetConversations, apiGetImagemDoChat, apiGetImages, apiGetModelos, apiPostImages, apiRenameConversation, resumeChat, streamChat } from "./services/AiService.js";
|
|
14
14
|
import { APP_NAME, REDIRECT_URL_KEY } from "./constants/app.constant.js";
|
|
15
15
|
import { AUTH_PREFIX_PATH, CONCEPTS_PREFIX_PATH, DASHBOARDS_PREFIX_PATH, GUIDE_PREFIX_PATH, PAGES_PREFIX_PATH, ROOT, UI_COMPONENTS_PREFIX_PATH } from "./constants/route.constant.js";
|
|
16
16
|
import { default as default2 } from "./components/shared/AbbreviateNumber.js";
|
|
@@ -400,6 +400,7 @@ export {
|
|
|
400
400
|
apiGetMail,
|
|
401
401
|
apiGetMails,
|
|
402
402
|
apiGetMarketingDashboard,
|
|
403
|
+
apiGetModelos,
|
|
403
404
|
apiGetNotificationCount,
|
|
404
405
|
apiGetNotificationList,
|
|
405
406
|
apiGetOrder,
|
|
@@ -48,17 +48,24 @@ async function apiDeleteConversation(conversationId) {
|
|
|
48
48
|
method: "delete"
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
+
async function apiGetModelos() {
|
|
52
|
+
return aiRequest({
|
|
53
|
+
url: "/ai/chat/models",
|
|
54
|
+
method: "get"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
51
57
|
async function streamChat({
|
|
52
58
|
prompt,
|
|
53
59
|
conversationId,
|
|
54
60
|
esforco,
|
|
61
|
+
modelo,
|
|
55
62
|
imagens,
|
|
56
63
|
signal,
|
|
57
64
|
onEvent
|
|
58
65
|
}) {
|
|
59
66
|
await postarEConsumir(
|
|
60
67
|
"/ai/chat/stream",
|
|
61
|
-
{ prompt, conversation_id: conversationId, esforco, imagens },
|
|
68
|
+
{ prompt, conversation_id: conversationId, esforco, modelo, imagens },
|
|
62
69
|
onEvent,
|
|
63
70
|
signal
|
|
64
71
|
);
|
|
@@ -74,14 +81,23 @@ async function apiGetImagemDoChat(objectName) {
|
|
|
74
81
|
async function resumeChat({
|
|
75
82
|
approved,
|
|
76
83
|
dados,
|
|
84
|
+
formato,
|
|
77
85
|
conversationId,
|
|
78
86
|
esforco,
|
|
87
|
+
modelo,
|
|
79
88
|
signal,
|
|
80
89
|
onEvent
|
|
81
90
|
}) {
|
|
82
91
|
await postarEConsumir(
|
|
83
92
|
"/ai/chat/resume",
|
|
84
|
-
{
|
|
93
|
+
{
|
|
94
|
+
approved,
|
|
95
|
+
dados,
|
|
96
|
+
formato,
|
|
97
|
+
conversation_id: conversationId,
|
|
98
|
+
esforco,
|
|
99
|
+
modelo
|
|
100
|
+
},
|
|
85
101
|
onEvent,
|
|
86
102
|
signal
|
|
87
103
|
);
|
|
@@ -128,6 +144,7 @@ export {
|
|
|
128
144
|
apiGetConversations,
|
|
129
145
|
apiGetImagemDoChat,
|
|
130
146
|
apiGetImages,
|
|
147
|
+
apiGetModelos,
|
|
131
148
|
apiPostImages,
|
|
132
149
|
apiRenameConversation,
|
|
133
150
|
resumeChat,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiService.js","sources":["../../../lib/@ecme/services/AiService.ts"],"sourcesContent":["import { endpointsConfig } from '@base/configs'\nimport { authHeaders } from './aiAuthHeaders'\nimport ApiService from './ApiService'\nimport { readSse } from './sseParser'\nimport type {\n ArquivoDoStorage,\n ChatEvent,\n Esforco,\n ImagemEnviada,\n} from '@/views/concepts/ai/Chat/types'\nimport type { AxiosRequestConfig } from 'axios'\n\nconst AI_DEV_URL = 'http://localhost:8000'\nconst AI_QAS_URL = 'https://orbe-ai.apps.qas.orbeagro.com.br'\nconst AI_PRD_URL = 'https://orbe-ai.apps.prd.orbeagro.com.br'\n\n/**\n * Host da API de IA.\n *\n * O /ai/* nao vive no gateway do resto da aplicacao, entao nao pode usar o\n * baseURL do AxiosBase (API_URL). A resolucao e por origin em runtime, e nao\n * por import.meta.env.MODE, porque o MODE e congelado na build da lib como\n * \"production\" e nao reflete o dev do MFE consumidor.\n */\nfunction getAiApiUrl() {\n const origin = globalThis?.location?.origin ?? ''\n\n if (origin.includes('localhost') || origin.includes('127.0.0.1')) {\n return AI_DEV_URL\n }\n\n if (origin.includes('.prd.')) {\n return AI_PRD_URL\n }\n\n return AI_QAS_URL\n}\n\nexport const AI_API_URL = getAiApiUrl()\n\n/**\n * Toda chamada de IA sai pelo AI_API_URL (o baseURL por requisicao vence o da\n * instancia do AxiosBase) e fica fora do loading global — o chat mostra o\n * proprio balaozinho de \"digitando\".\n */\nconst aiRequest = <T>(config: AxiosRequestConfig) =>\n ApiService.fetchDataWithAxios<T>({\n ...config,\n baseURL: AI_API_URL,\n skipGlobalLoading: true,\n })\n\nexport async function apiGetChatHistory<T>(conversationId?: string) {\n return aiRequest<T>({\n url: '/ai/chat/history',\n method: 'get',\n params: conversationId ? { conversation_id: conversationId } : undefined,\n })\n}\n\n/** Conversas do usuário (só o resumo), a mais recente primeiro. */\nexport async function apiGetConversations<T>() {\n return aiRequest<T>({\n url: '/ai/chat/conversations',\n method: 'get',\n })\n}\n\nexport async function apiRenameConversation(conversationId: string, title: string) {\n return aiRequest<void>({\n url: `/ai/chat/conversations/${encodeURIComponent(conversationId)}`,\n method: 'patch',\n data: { title },\n })\n}\n\n/** Apaga a conversa e toda a memória dela no backend. */\nexport async function apiDeleteConversation(conversationId: string) {\n return aiRequest<void>({\n url: `/ai/chat/conversations/${encodeURIComponent(conversationId)}`,\n method: 'delete',\n })\n}\n\nexport type StreamChatParams = {\n prompt: string\n /** Identifica a conversa; o backend usa como thread da memoria. */\n conversationId?: string\n /** Nivel de raciocinio desta mensagem; ausente = o padrao do backend. */\n esforco?: Esforco\n /** Imagens desta mensagem; ausente = so texto. */\n imagens?: ImagemEnviada[]\n signal?: AbortSignal\n onEvent: (evento: ChatEvent) => void\n}\n\n/**\n * Resposta a pausa atual do agente. Ha
|
|
1
|
+
{"version":3,"file":"AiService.js","sources":["../../../lib/@ecme/services/AiService.ts"],"sourcesContent":["import { endpointsConfig } from '@base/configs'\nimport { authHeaders } from './aiAuthHeaders'\nimport ApiService from './ApiService'\nimport { readSse } from './sseParser'\nimport type {\n ArquivoDoStorage,\n ChatEvent,\n Esforco,\n FormatoDoRelatorio,\n ImagemEnviada,\n} from '@/views/concepts/ai/Chat/types'\nimport type { AxiosRequestConfig } from 'axios'\n\nconst AI_DEV_URL = 'http://localhost:8000'\nconst AI_QAS_URL = 'https://orbe-ai.apps.qas.orbeagro.com.br'\nconst AI_PRD_URL = 'https://orbe-ai.apps.prd.orbeagro.com.br'\n\n/**\n * Host da API de IA.\n *\n * O /ai/* nao vive no gateway do resto da aplicacao, entao nao pode usar o\n * baseURL do AxiosBase (API_URL). A resolucao e por origin em runtime, e nao\n * por import.meta.env.MODE, porque o MODE e congelado na build da lib como\n * \"production\" e nao reflete o dev do MFE consumidor.\n */\nfunction getAiApiUrl() {\n const origin = globalThis?.location?.origin ?? ''\n\n if (origin.includes('localhost') || origin.includes('127.0.0.1')) {\n return AI_DEV_URL\n }\n\n if (origin.includes('.prd.')) {\n return AI_PRD_URL\n }\n\n return AI_QAS_URL\n}\n\nexport const AI_API_URL = getAiApiUrl()\n\n/**\n * Toda chamada de IA sai pelo AI_API_URL (o baseURL por requisicao vence o da\n * instancia do AxiosBase) e fica fora do loading global — o chat mostra o\n * proprio balaozinho de \"digitando\".\n */\nconst aiRequest = <T>(config: AxiosRequestConfig) =>\n ApiService.fetchDataWithAxios<T>({\n ...config,\n baseURL: AI_API_URL,\n skipGlobalLoading: true,\n })\n\nexport async function apiGetChatHistory<T>(conversationId?: string) {\n return aiRequest<T>({\n url: '/ai/chat/history',\n method: 'get',\n params: conversationId ? { conversation_id: conversationId } : undefined,\n })\n}\n\n/** Conversas do usuário (só o resumo), a mais recente primeiro. */\nexport async function apiGetConversations<T>() {\n return aiRequest<T>({\n url: '/ai/chat/conversations',\n method: 'get',\n })\n}\n\nexport async function apiRenameConversation(conversationId: string, title: string) {\n return aiRequest<void>({\n url: `/ai/chat/conversations/${encodeURIComponent(conversationId)}`,\n method: 'patch',\n data: { title },\n })\n}\n\n/** Apaga a conversa e toda a memória dela no backend. */\nexport async function apiDeleteConversation(conversationId: string) {\n return aiRequest<void>({\n url: `/ai/chat/conversations/${encodeURIComponent(conversationId)}`,\n method: 'delete',\n })\n}\n\n/** Modelos que o chat oferece e o padrão; a lista vem do .env do backend. */\nexport async function apiGetModelos<T>() {\n return aiRequest<T>({\n url: '/ai/chat/models',\n method: 'get',\n })\n}\n\nexport type StreamChatParams = {\n prompt: string\n /** Identifica a conversa; o backend usa como thread da memoria. */\n conversationId?: string\n /** Nivel de raciocinio desta mensagem; ausente = o padrao do backend. */\n esforco?: Esforco\n /** Modelo desta mensagem, da lista do backend; ausente = o padrao. */\n modelo?: string\n /** Imagens desta mensagem; ausente = so texto. */\n imagens?: ImagemEnviada[]\n signal?: AbortSignal\n onEvent: (evento: ChatEvent) => void\n}\n\n/**\n * Resposta a pausa atual do agente. Ha tres, e um endpoint so:\n * - `approved` responde ao `approval_required` (true aprova, false nega).\n * - `dados` responde ao `input_required`; `null` = o usuario fechou o\n * formulario sem preencher.\n * - `formato` responde ao `format_required`; `null` = o usuario fechou a\n * escolha sem escolher.\n */\nexport type ResumeChatParams = {\n approved?: boolean\n dados?: Record<string, unknown> | null\n formato?: FormatoDoRelatorio | null\n conversationId?: string\n /** A retomada tambem chama o modelo: vale o mesmo nivel do envio. */\n esforco?: Esforco\n /** E o mesmo modelo do envio. */\n modelo?: string\n signal?: AbortSignal\n onEvent: (evento: ChatEvent) => void\n}\n\n/**\n * Envia a mensagem e consome a resposta em streaming (SSE).\n *\n * Usa `fetch`, e nao o Axios, porque o Axios no browser so resolve a Promise\n * com a resposta inteira — nao ha como ler o corpo enquanto ele chega.\n */\nexport async function streamChat({\n prompt,\n conversationId,\n esforco,\n modelo,\n imagens,\n signal,\n onEvent,\n}: StreamChatParams): Promise<void> {\n await postarEConsumir(\n '/ai/chat/stream',\n { prompt, conversation_id: conversationId, esforco, modelo, imagens },\n onEvent,\n signal,\n )\n}\n\n/**\n * Imagem do chat guardada no object storage, pelo `objectName` do historico.\n *\n * Vai pelo gateway, como os outros modulos (e nao pelo AI_API_URL): e o mesmo\n * endpoint do `ObjectStorageService`, mas fora do loading global - a miniatura\n * carrega dentro da mensagem, sem travar a tela.\n */\nexport async function apiGetImagemDoChat(objectName: string) {\n return ApiService.fetchDataWithAxios<ArquivoDoStorage>({\n url: endpointsConfig.objectStorage.minio.download,\n method: 'get',\n params: { fileName: objectName },\n skipGlobalLoading: true,\n })\n}\n\n/**\n * Retoma uma conversa parada numa pausa (aprovacao, coleta de dados ou escolha\n * do formato do relatorio).\n *\n * Devolve o mesmo tipo de stream do `streamChat`, e a resposta continua na\n * MESMA mensagem do chat — o backend so volta do ponto onde parou.\n *\n * O `JSON.stringify` descarta chaves `undefined`, entao o backend recebe apenas\n * o campo da pausa que esta sendo respondida.\n */\nexport async function resumeChat({\n approved,\n dados,\n formato,\n conversationId,\n esforco,\n modelo,\n signal,\n onEvent,\n}: ResumeChatParams): Promise<void> {\n await postarEConsumir(\n '/ai/chat/resume',\n {\n approved,\n dados,\n formato,\n conversation_id: conversationId,\n esforco,\n modelo,\n },\n onEvent,\n signal,\n )\n}\n\n/** POST + leitura do SSE, comum ao envio e a retomada. */\nasync function postarEConsumir(\n caminho: string,\n corpo: Record<string, unknown>,\n onEvent: (evento: ChatEvent) => void,\n signal?: AbortSignal,\n): Promise<void> {\n const resposta = await fetch(`${AI_API_URL}${caminho}`, {\n method: 'POST',\n headers: {\n ...authHeaders(),\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(corpo),\n signal,\n })\n\n if (!resposta.ok || !resposta.body) {\n throw new Error(`Falha ao falar com a IA (HTTP ${resposta.status})`)\n }\n\n await readSse(resposta.body, ({ event, data }) => {\n try {\n onEvent({ type: event, data: JSON.parse(data) } as ChatEvent)\n } catch (error) {\n // Evento malformado nao pode derrubar o stream inteiro.\n console.debug('Evento SSE ignorado:', event, error)\n }\n })\n}\n\nexport async function apiGetImages<T, U extends Record<string, unknown>>(\n params: U,\n) {\n return aiRequest<T>({\n url: '/ai/images',\n method: 'get',\n params,\n })\n}\n\nexport async function apiPostImages<T, U extends Record<string, unknown>>(\n data: U,\n) {\n return aiRequest<T>({\n url: '/ai/images',\n method: 'post',\n data,\n })\n}\n"],"names":["endpointsConfig"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as default2 } from "./ApiService.js";
|
|
2
2
|
import { apiGetPricingPlans, apiGetRolesPermissionsRoles, apiGetRolesPermissionsUsers, apiGetSettingsBilling, apiGetSettingsIntergration, apiGetSettingsNotification, apiGetSettingsProfile } from "./AccontsService.js";
|
|
3
|
-
import { AI_API_URL, apiDeleteConversation, apiGetChatHistory, apiGetConversations, apiGetImagemDoChat, apiGetImages, apiPostImages, apiRenameConversation, resumeChat, streamChat } from "./AiService.js";
|
|
3
|
+
import { AI_API_URL, apiDeleteConversation, apiGetChatHistory, apiGetConversations, apiGetImagemDoChat, apiGetImages, apiGetModelos, apiPostImages, apiRenameConversation, resumeChat, streamChat } from "./AiService.js";
|
|
4
4
|
import { apiForgotPassword, apiResetPassword, apiSignIn, apiSignOut, apiSignUp } from "./AuthService.js";
|
|
5
5
|
import { apiGetCalendar } from "./CalendarService.js";
|
|
6
6
|
import { apiGetChats, apiGetContactDetails, apiGetContacts, apiGetConversation } from "./ChatService.js";
|
|
@@ -40,6 +40,7 @@ export {
|
|
|
40
40
|
apiGetMail,
|
|
41
41
|
apiGetMails,
|
|
42
42
|
apiGetMarketingDashboard,
|
|
43
|
+
apiGetModelos,
|
|
43
44
|
apiGetNotificationCount,
|
|
44
45
|
apiGetNotificationList,
|
|
45
46
|
apiGetOrder,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useEffect, useMemo
|
|
3
|
-
import { TbDownload } from "react-icons/tb";
|
|
4
|
-
import * as XLSX from "xlsx";
|
|
2
|
+
import { useRef, useEffect, useMemo } from "react";
|
|
5
3
|
import "../../../../../components/ui/Card/index.js";
|
|
6
4
|
import "../../../../../components/view/ChatBox/index.js";
|
|
7
5
|
import ChatLandingView from "./ChatLandingView.js";
|
|
@@ -13,12 +11,16 @@ import AiErrorMessage from "./AiErrorMessage.js";
|
|
|
13
11
|
import ToolCallChip from "./ToolCallChip.js";
|
|
14
12
|
import ApprovalCard from "./ApprovalCard.js";
|
|
15
13
|
import DataRequestCard from "./DataRequestCard.js";
|
|
16
|
-
import
|
|
14
|
+
import FormatoCard from "./FormatoCard.js";
|
|
15
|
+
import ModeloERaciocinio from "./ModeloERaciocinio.js";
|
|
17
16
|
import ImagensDaMensagem from "./ImagensDaMensagem.js";
|
|
17
|
+
import PlanilhaNaMensagem from "./PlanilhaNaMensagem.js";
|
|
18
|
+
import RelatorioNaMensagem from "./RelatorioNaMensagem.js";
|
|
18
19
|
import { UPLOAD_DE_IMAGENS } from "../imagens.js";
|
|
19
20
|
import { usGenerativeChatStore } from "../store/generativeChatStore.js";
|
|
20
21
|
import useChatSend from "../hooks/useChatSend.js";
|
|
21
22
|
import useConversationMessages from "../hooks/useConversationMessages.js";
|
|
23
|
+
import useModelos from "../hooks/useModelos.js";
|
|
22
24
|
import Card from "../../../../../components/ui/Card/Card.js";
|
|
23
25
|
import ChatBox from "../../../../../components/view/ChatBox/ChatBox.js";
|
|
24
26
|
const BALAO_AGENTE = "prose rounded-xl bg-gray-100 px-5 py-2.5 text-sm text-gray-900 dark:bg-gray-700 dark:text-gray-100";
|
|
@@ -28,8 +30,9 @@ const ChatView = ({
|
|
|
28
30
|
}) => {
|
|
29
31
|
const scrollRef = useRef(null);
|
|
30
32
|
const { selectedConversation, chatHistory, isTyping, disabledChatFresh } = usGenerativeChatStore();
|
|
31
|
-
const { handleSend, handleApproval, handleDataSubmit } = useChatSend();
|
|
33
|
+
const { handleSend, handleApproval, handleDataSubmit, handleFormato } = useChatSend();
|
|
32
34
|
const { carregando } = useConversationMessages();
|
|
35
|
+
const { atual } = useModelos();
|
|
33
36
|
const scrollToBottom = () => {
|
|
34
37
|
if (scrollRef.current?.getScrollElement) {
|
|
35
38
|
const scrollElement = scrollRef.current.getScrollElement();
|
|
@@ -57,22 +60,6 @@ const ChatView = ({
|
|
|
57
60
|
disabledChatFresh(id);
|
|
58
61
|
scrollToBottom();
|
|
59
62
|
};
|
|
60
|
-
const handleSpreadsheetDownload = useCallback(
|
|
61
|
-
(titulo, abas) => {
|
|
62
|
-
const workbook = XLSX.utils.book_new();
|
|
63
|
-
for (const aba of abas) {
|
|
64
|
-
const sheet = XLSX.utils.aoa_to_sheet([
|
|
65
|
-
aba.colunas,
|
|
66
|
-
...aba.linhas.map(
|
|
67
|
-
(linha) => aba.colunas.map((col) => linha[col] ?? "")
|
|
68
|
-
)
|
|
69
|
-
]);
|
|
70
|
-
XLSX.utils.book_append_sheet(workbook, sheet, aba.nome.slice(0, 31));
|
|
71
|
-
}
|
|
72
|
-
XLSX.writeFile(workbook, `${titulo}.xlsx`);
|
|
73
|
-
},
|
|
74
|
-
[]
|
|
75
|
-
);
|
|
76
63
|
return /* @__PURE__ */ jsxs(Card, { className: "flex-1 h-full", bodyClass: "h-full", children: [
|
|
77
64
|
showMobileNav && /* @__PURE__ */ jsx(ChatMobileNav, {}),
|
|
78
65
|
/* @__PURE__ */ jsx(
|
|
@@ -100,7 +87,13 @@ const ChatView = ({
|
|
|
100
87
|
return /* @__PURE__ */ jsx(AiErrorMessage, {});
|
|
101
88
|
}
|
|
102
89
|
if (message.sender.id === "ai") {
|
|
103
|
-
const {
|
|
90
|
+
const {
|
|
91
|
+
tools,
|
|
92
|
+
pendingApproval,
|
|
93
|
+
pendingInput,
|
|
94
|
+
pendingFormat,
|
|
95
|
+
relatorios
|
|
96
|
+
} = message;
|
|
104
97
|
const temTexto = Boolean(
|
|
105
98
|
message.content?.trim()
|
|
106
99
|
);
|
|
@@ -114,23 +107,29 @@ const ChatView = ({
|
|
|
114
107
|
onFinish: () => handleFinish(message.id)
|
|
115
108
|
}
|
|
116
109
|
) }),
|
|
117
|
-
|
|
118
|
-
"
|
|
110
|
+
relatorios?.map(
|
|
111
|
+
(relatorio) => relatorio.formato === "xlsx" ? /* @__PURE__ */ jsx(
|
|
112
|
+
PlanilhaNaMensagem,
|
|
113
|
+
{
|
|
114
|
+
planilha: relatorio
|
|
115
|
+
},
|
|
116
|
+
relatorio.id
|
|
117
|
+
) : /* @__PURE__ */ jsx(
|
|
118
|
+
RelatorioNaMensagem,
|
|
119
|
+
{
|
|
120
|
+
relatorio
|
|
121
|
+
},
|
|
122
|
+
relatorio.id
|
|
123
|
+
)
|
|
124
|
+
),
|
|
125
|
+
pendingFormat && /* @__PURE__ */ jsx(
|
|
126
|
+
FormatoCard,
|
|
119
127
|
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
125
|
-
className: "inline-flex items-center gap-2 rounded-lg border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-700 transition-colors hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400 dark:hover:bg-emerald-900/50",
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ jsx(TbDownload, { size: 18 }),
|
|
128
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
129
|
-
"Baixar ",
|
|
130
|
-
spreadsheet.titulo,
|
|
131
|
-
".xlsx"
|
|
132
|
-
] })
|
|
133
|
-
]
|
|
128
|
+
onChoose: (formato) => handleFormato(
|
|
129
|
+
selectedConversation,
|
|
130
|
+
message.id,
|
|
131
|
+
formato
|
|
132
|
+
)
|
|
134
133
|
}
|
|
135
134
|
),
|
|
136
135
|
pendingInput && /* @__PURE__ */ jsx(
|
|
@@ -175,8 +174,11 @@ const ChatView = ({
|
|
|
175
174
|
return null;
|
|
176
175
|
},
|
|
177
176
|
onInputChange: handleInputChange,
|
|
178
|
-
uploadProps:
|
|
179
|
-
|
|
177
|
+
uploadProps: {
|
|
178
|
+
...UPLOAD_DE_IMAGENS,
|
|
179
|
+
disabled: atual?.imagens === false
|
|
180
|
+
},
|
|
181
|
+
inputActions: /* @__PURE__ */ jsx(ModeloERaciocinio, { floatingClass: dropdownFloatingClass }),
|
|
180
182
|
children: selectedConversation ? /* @__PURE__ */ jsx("p", { className: "py-1 text-center text-xs text-gray-500 dark:text-gray-400", children: "Orbe-AI é uma inteligência artificial e pode cometer erros." }) : /* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx(ChatLandingView, {}) })
|
|
181
183
|
}
|
|
182
184
|
)
|