@retrivora-ai/rag-engine 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.css CHANGED
@@ -112,6 +112,7 @@
112
112
  --color-white: #fff;
113
113
  --spacing: 0.25rem;
114
114
  --container-xs: 20rem;
115
+ --container-sm: 24rem;
115
116
  --container-md: 28rem;
116
117
  --container-2xl: 42rem;
117
118
  --container-4xl: 56rem;
@@ -123,11 +124,14 @@
123
124
  --text-base--line-height: calc(1.5 / 1);
124
125
  --text-lg: 1.125rem;
125
126
  --text-lg--line-height: calc(1.75 / 1.125);
127
+ --text-xl: 1.25rem;
128
+ --text-xl--line-height: calc(1.75 / 1.25);
126
129
  --text-3xl: 1.875rem;
127
130
  --text-3xl--line-height: calc(2.25 / 1.875);
128
131
  --font-weight-medium: 500;
129
132
  --font-weight-semibold: 600;
130
133
  --font-weight-bold: 700;
134
+ --font-weight-extrabold: 800;
131
135
  --tracking-tight: -0.025em;
132
136
  --tracking-wider: 0.05em;
133
137
  --tracking-widest: 0.1em;
@@ -759,6 +763,9 @@
759
763
  .max-w-none {
760
764
  max-width: none;
761
765
  }
766
+ .max-w-sm {
767
+ max-width: var(--container-sm);
768
+ }
762
769
  .max-w-xs {
763
770
  max-width: var(--container-xs);
764
771
  }
@@ -777,6 +784,9 @@
777
784
  .flex-shrink-0 {
778
785
  flex-shrink: 0;
779
786
  }
787
+ .shrink-0 {
788
+ flex-shrink: 0;
789
+ }
780
790
  .flex-grow {
781
791
  flex-grow: 1;
782
792
  }
@@ -930,6 +940,9 @@
930
940
  .gap-2 {
931
941
  gap: calc(var(--spacing) * 2);
932
942
  }
943
+ .gap-2\.5 {
944
+ gap: calc(var(--spacing) * 2.5);
945
+ }
933
946
  .gap-3 {
934
947
  gap: calc(var(--spacing) * 3);
935
948
  }
@@ -1111,6 +1124,12 @@
1111
1124
  .border-emerald-100 {
1112
1125
  border-color: var(--color-emerald-100);
1113
1126
  }
1127
+ .border-emerald-100\/50 {
1128
+ border-color: color-mix(in srgb, oklch(95% 0.052 163.051) 50%, transparent);
1129
+ @supports (color: color-mix(in lab, red, red)) {
1130
+ border-color: color-mix(in oklab, var(--color-emerald-100) 50%, transparent);
1131
+ }
1132
+ }
1114
1133
  .border-emerald-200 {
1115
1134
  border-color: var(--color-emerald-200);
1116
1135
  }
@@ -1363,6 +1382,12 @@
1363
1382
  .bg-slate-950 {
1364
1383
  background-color: var(--color-slate-950);
1365
1384
  }
1385
+ .bg-slate-950\/70 {
1386
+ background-color: color-mix(in srgb, oklch(12.9% 0.042 264.695) 70%, transparent);
1387
+ @supports (color: color-mix(in lab, red, red)) {
1388
+ background-color: color-mix(in oklab, var(--color-slate-950) 70%, transparent);
1389
+ }
1390
+ }
1366
1391
  .bg-transparent {
1367
1392
  background-color: transparent;
1368
1393
  }
@@ -1520,6 +1545,10 @@
1520
1545
  font-size: var(--text-sm);
1521
1546
  line-height: var(--tw-leading, var(--text-sm--line-height));
1522
1547
  }
1548
+ .text-xl {
1549
+ font-size: var(--text-xl);
1550
+ line-height: var(--tw-leading, var(--text-xl--line-height));
1551
+ }
1523
1552
  .text-xs {
1524
1553
  font-size: var(--text-xs);
1525
1554
  line-height: var(--tw-leading, var(--text-xs--line-height));
@@ -1551,6 +1580,10 @@
1551
1580
  --tw-font-weight: var(--font-weight-bold);
1552
1581
  font-weight: var(--font-weight-bold);
1553
1582
  }
1583
+ .font-extrabold {
1584
+ --tw-font-weight: var(--font-weight-extrabold);
1585
+ font-weight: var(--font-weight-extrabold);
1586
+ }
1554
1587
  .font-medium {
1555
1588
  --tw-font-weight: var(--font-weight-medium);
1556
1589
  font-weight: var(--font-weight-medium);
@@ -1649,6 +1682,9 @@
1649
1682
  .text-emerald-800 {
1650
1683
  color: var(--color-emerald-800);
1651
1684
  }
1685
+ .text-emerald-900 {
1686
+ color: var(--color-emerald-900);
1687
+ }
1652
1688
  .text-emerald-950 {
1653
1689
  color: var(--color-emerald-950);
1654
1690
  }
@@ -2363,6 +2399,14 @@
2363
2399
  }
2364
2400
  }
2365
2401
  }
2402
+ .dark\:border-emerald-500\/10 {
2403
+ @media (prefers-color-scheme: dark) {
2404
+ border-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 10%, transparent);
2405
+ @supports (color: color-mix(in lab, red, red)) {
2406
+ border-color: color-mix(in oklab, var(--color-emerald-500) 10%, transparent);
2407
+ }
2408
+ }
2409
+ }
2366
2410
  .dark\:border-emerald-500\/20 {
2367
2411
  @media (prefers-color-scheme: dark) {
2368
2412
  border-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 20%, transparent);
@@ -9,6 +9,7 @@ import { IProviderValidator, IProviderHealthChecker } from '../../core/ProviderI
9
9
  export abstract class BaseVectorProvider {
10
10
  protected readonly config: VectorDBConfig;
11
11
  protected indexName: string;
12
+ protected projectId?: string;
12
13
 
13
14
  constructor(config: VectorDBConfig) {
14
15
  this.config = config;
@@ -88,8 +88,20 @@ export class PineconeProvider extends BaseVectorProvider {
88
88
  let key = this.apiKey || process.env.PINECONE_API_KEY || '';
89
89
 
90
90
  if (!key) {
91
- const projectId = process.env.RAG_PROJECT_ID || process.env.NEXT_PUBLIC_RAG_PROJECT_ID || 'my-rag-app';
92
91
  const licenseKey = process.env.RETRIVORA_LICENSE_KEY || process.env.NEXT_PUBLIC_RETRIVORA_LICENSE_KEY;
92
+ const jwtProjectId = (() => {
93
+ if (!licenseKey) return undefined;
94
+ try {
95
+ const parts = licenseKey.split('.');
96
+ if (parts.length >= 2) {
97
+ const payload = JSON.parse(Buffer.from(parts[1], 'base64url').toString('utf8'));
98
+ return payload?.projectId;
99
+ }
100
+ } catch { /* ignore */ }
101
+ return undefined;
102
+ })();
103
+
104
+ const projectId = process.env.RAG_PROJECT_ID || process.env.NEXT_PUBLIC_RAG_PROJECT_ID || jwtProjectId || this.projectId || 'default';
93
105
 
94
106
  const remoteConfig = await ConfigFetcher.fetchRemoteVectorConfig(projectId, licenseKey);
95
107
  if (remoteConfig?.apiKey) {
@@ -98,6 +110,9 @@ export class PineconeProvider extends BaseVectorProvider {
98
110
  if (remoteConfig.indexName) {
99
111
  this.indexName = remoteConfig.indexName;
100
112
  }
113
+ if (remoteConfig.projectId) {
114
+ this.projectId = remoteConfig.projectId;
115
+ }
101
116
  }
102
117
  }
103
118