Skip to content

Commit 3cf9dd1

Browse files
committed
improvement(knowledge): keep the permitted-set resolver's TSDoc on its function
1 parent 8b1a096 commit 3cf9dd1

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎apps/sim/lib/knowledge/search/queries.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -962,14 +962,6 @@ export type PermittedDocuments =
962962
| { kind: 'bounded'; documents: readonly PermittedDocument[] }
963963
| { kind: 'unbounded' }
964964

965-
/**
966-
* Resolve the permitted set with the candidate predicate both legs apply, so restricting a leg
967-
* to it never admits a document the leg would otherwise refuse. Tag filters stay chunk-level in
968-
* each leg; the set is the document-level superset they narrow.
969-
*
970-
* It runs ahead of both legs on the vector leg's budget, so exhausting that budget here reports
971-
* `unbounded` and marks the vector leg timed out rather than failing the keyword leg with it.
972-
*/
973965
/**
974966
* How long a caller's saturated reach is remembered. Reach counts the documents a caller's tokens
975967
* touch in the bases, which moves slowly, and an unbounded set only means the legs search the
@@ -988,6 +980,14 @@ function reachKey(
988980
return `${[...knowledgeBaseIds].sort().join(',')}:${sha256Hex([...access.tokens].sort().join('\n'))}`
989981
}
990982

983+
/**
984+
* Resolve the permitted set with the candidate predicate both legs apply, so restricting a leg
985+
* to it never admits a document the leg would otherwise refuse. Tag filters stay chunk-level in
986+
* each leg; the set is the document-level superset they narrow.
987+
*
988+
* It runs ahead of both legs on the vector leg's budget, so exhausting that budget here reports
989+
* `unbounded` and marks the vector leg timed out rather than failing the keyword leg with it.
990+
*/
991991
export async function resolvePermittedDocuments(params: {
992992
knowledgeBaseIds: string[]
993993
access: KnowledgeAccessScope

0 commit comments

Comments
 (0)