Skip to content

Commit 7bee849

Browse files
chore: Force VectorCache to always be on;
update file picker spacing for attributes
1 parent 67725e8 commit 7bee849

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

docker/.env.example

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
SERVER_PORT=3001
2-
CACHE_VECTORS="true"
32
STORAGE_DIR="/app/server/storage"
43
UID='1000'
54
GID='1000'

frontend/src/components/Modals/MangeWorkspace/Documents/Directory/FileRow/index.jsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default function FileRow({
6060
selected ? "bg-sky-500/20" : ""
6161
} ${expanded ? "bg-sky-500/10" : ""}`}`}
6262
>
63-
<div className="pl-2 col-span-6 flex gap-x-[4px] items-center">
63+
<div className="pl-2 col-span-5 flex gap-x-[4px] items-center">
6464
<div
6565
className="shrink-0 w-3 h-3 rounded border-[1px] border-white flex justify-center items-center cursor-pointer"
6666
role="checkbox"
@@ -88,10 +88,12 @@ export default function FileRow({
8888
)}
8989
</div>
9090
</div>
91-
<p className="col-span-2 pl-3.5 whitespace-nowrap">
91+
<p className="col-span-3 pl-3.5 whitespace-nowrap">
9292
{formatDate(item?.published)}
9393
</p>
94-
<p className="col-span-2 pl-2 uppercase">{getFileExtension(item.url)}</p>
94+
<p className="col-span-2 pl-2 uppercase overflow-x-hidden">
95+
{getFileExtension(item.url)}
96+
</p>
9597
<div className="col-span-2 flex justify-end items-center">
9698
{item?.cached && (
9799
<div className="bg-white/10 rounded-3xl">

frontend/src/components/Modals/MangeWorkspace/Documents/Directory/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export default function Directory({
7171

7272
<div className="relative w-[560px] h-[310px] bg-zinc-900 rounded-2xl">
7373
<div className="rounded-t-2xl text-white/80 text-xs grid grid-cols-12 py-2 px-8 border-b border-white/20 shadow-lg bg-zinc-900 sticky top-0 z-10">
74-
<p className="col-span-6">Name</p>
75-
<p className="col-span-2">Date</p>
74+
<p className="col-span-5">Name</p>
75+
<p className="col-span-3">Date</p>
7676
<p className="col-span-2">Kind</p>
7777
<p className="col-span-2">Cached</p>
7878
</div>

frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/WorkspaceFileRow/index.jsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default function WorkspaceFileRow({
5454
className={`items-center transition-all duration-200 text-white/80 text-xs grid grid-cols-12 py-2 pl-3.5 pr-8 border-b border-white/20 hover:bg-sky-500/20 cursor-pointer
5555
${isMovedItem ? "bg-green-800/40" : ""}`}
5656
>
57-
<div className="col-span-6 flex gap-x-[4px] items-center">
57+
<div className="col-span-5 flex gap-x-[4px] items-center">
5858
<File
5959
className="text-base font-bold w-4 h-4 ml-3 mr-[3px]"
6060
weight="fill"
@@ -74,10 +74,12 @@ export default function WorkspaceFileRow({
7474
)}
7575
</div>
7676
</div>
77-
<p className="col-span-2 pl-3.5 whitespace-nowrap">
77+
<p className="col-span-3 pl-3.5 whitespace-nowrap">
7878
{formatDate(item?.published)}
7979
</p>
80-
<p className="col-span-2 pl-2 uppercase">{getFileExtension(item.url)}</p>
80+
<p className="col-span-2 pl-2 uppercase overflow-x-hidden">
81+
{getFileExtension(item.url)}
82+
</p>
8183
<div className="col-span-2 flex justify-end items-center">
8284
{item?.cached && (
8385
<div className="bg-white/10 rounded-3xl">

frontend/src/components/Modals/MangeWorkspace/Documents/WorkspaceDirectory/index.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default function WorkspaceDirectory({
2626
</div>
2727
<div className="relative w-[560px] h-[445px] bg-zinc-900 rounded-2xl mt-5">
2828
<div className="text-white/80 text-xs grid grid-cols-12 py-2 px-8 border-b border-white/20">
29-
<p className="col-span-6">Name</p>
30-
<p className="col-span-2">Date</p>
29+
<p className="col-span-5">Name</p>
30+
<p className="col-span-3">Date</p>
3131
<p className="col-span-2">Kind</p>
3232
<p className="col-span-2">Cached</p>
3333
</div>
@@ -55,8 +55,8 @@ export default function WorkspaceDirectory({
5555
}`}
5656
>
5757
<div className="text-white/80 text-xs grid grid-cols-12 py-2 px-8 border-b border-white/20 bg-zinc-900 sticky top-0 z-10">
58-
<p className="col-span-6">Name</p>
59-
<p className="col-span-2">Date</p>
58+
<p className="col-span-5">Name</p>
59+
<p className="col-span-3">Date</p>
6060
<p className="col-span-2">Kind</p>
6161
<p className="col-span-2">Cached</p>
6262
</div>

server/.env.example

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
SERVER_PORT=3001
2-
CACHE_VECTORS="true"
32
JWT_SECRET="my-random-string-for-seeding" # Please generate random string at least 12 chars long.
43

54
###########################################

server/utils/files/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ async function viewLocalFiles() {
9999
// Searches the vector-cache folder for existing information so we dont have to re-embed a
100100
// document and can instead push directly to vector db.
101101
async function cachedVectorInformation(filename = null, checkOnly = false) {
102-
if (!process.env.CACHE_VECTORS)
103-
return checkOnly ? false : { exists: false, chunks: [] };
104102
if (!filename) return checkOnly ? false : { exists: false, chunks: [] };
105103

106104
const digest = uuidv5(filename, uuidv5.URL);
@@ -123,7 +121,6 @@ async function cachedVectorInformation(filename = null, checkOnly = false) {
123121
// vectorData: pre-chunked vectorized data for a given file that includes the proper metadata and chunk-size limit so it can be iterated and dumped into Pinecone, etc
124122
// filename is the fullpath to the doc so we can compare by filename to find cached matches.
125123
async function storeVectorResult(vectorData = [], filename = null) {
126-
if (!process.env.CACHE_VECTORS) return;
127124
if (!filename) return;
128125
console.log(
129126
`Caching vectorized results of ${filename} to prevent duplicated embedding.`

server/utils/helpers/updateENV.js

-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ async function dumpENV() {
314314
const frozenEnvs = {};
315315
const protectedKeys = [
316316
...Object.values(KEY_MAPPING).map((values) => values.envKey),
317-
"CACHE_VECTORS",
318317
"STORAGE_DIR",
319318
"SERVER_PORT",
320319
// Password Schema Keys if present.

0 commit comments

Comments
 (0)