feat(server): update gql endpoint & workspace doc match test (#11104)

This commit is contained in:
darkskygit
2025-03-25 10:09:22 +00:00
parent bf4107feac
commit 1bb324eeed
20 changed files with 355 additions and 139 deletions
@@ -104,14 +104,14 @@ test('should insert embedding by doc id', async t => {
{
index: 0,
content: 'content',
embedding: Array.from({ length: 512 }, () => 1),
embedding: Array.from({ length: 1024 }, () => 1),
},
]
);
{
const ret = await t.context.copilotContext.matchContentEmbedding(
Array.from({ length: 512 }, () => 0.9),
Array.from({ length: 1024 }, () => 0.9),
contextId,
1,
1
@@ -123,7 +123,7 @@ test('should insert embedding by doc id', async t => {
{
await t.context.copilotContext.deleteEmbedding(contextId, 'file-id');
const ret = await t.context.copilotContext.matchContentEmbedding(
Array.from({ length: 512 }, () => 0.9),
Array.from({ length: 1024 }, () => 0.9),
contextId,
1,
1
@@ -151,7 +151,7 @@ test('should insert embedding by doc id', async t => {
{
index: 0,
content: 'content',
embedding: Array.from({ length: 512 }, () => 1),
embedding: Array.from({ length: 1024 }, () => 1),
},
]
);
@@ -166,7 +166,7 @@ test('should insert embedding by doc id', async t => {
{
const ret = await t.context.copilotContext.matchWorkspaceEmbedding(
Array.from({ length: 512 }, () => 0.9),
Array.from({ length: 1024 }, () => 0.9),
workspace.id,
1,
1