feat(server): expose threshold (#12023)

This commit is contained in:
darkskygit
2025-05-09 03:59:03 +00:00
parent cb49ab0f69
commit 3db91bdc8e
4 changed files with 16 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt) {
query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
currentUser {
copilot {
contexts(contextId: $contextId) {
matchWorkspaceDocs(content: $content, limit: $limit) {
matchWorkspaceDocs(content: $content, limit: $limit, scopedThreshold: $scopedThreshold, threshold: $threshold) {
docId
chunk
content

View File

@@ -1,8 +1,8 @@
query matchFiles($contextId: String!, $content: String!, $limit: SafeInt) {
query matchFiles($contextId: String!, $content: String!, $limit: SafeInt, $threshold: Float) {
currentUser {
copilot {
contexts(contextId: $contextId) {
matchFiles(content: $content, limit: $limit) {
matchFiles(content: $content, limit: $limit, threshold: $threshold) {
fileId
chunk
content

View File

@@ -501,11 +501,16 @@ export const matchContextQuery = {
export const matchWorkspaceDocsQuery = {
id: 'matchWorkspaceDocsQuery' as const,
op: 'matchWorkspaceDocs',
query: `query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt) {
query: `query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
currentUser {
copilot {
contexts(contextId: $contextId) {
matchWorkspaceDocs(content: $content, limit: $limit) {
matchWorkspaceDocs(
content: $content
limit: $limit
scopedThreshold: $scopedThreshold
threshold: $threshold
) {
docId
chunk
content
@@ -520,11 +525,11 @@ export const matchWorkspaceDocsQuery = {
export const matchFilesQuery = {
id: 'matchFilesQuery' as const,
op: 'matchFiles',
query: `query matchFiles($contextId: String!, $content: String!, $limit: SafeInt) {
query: `query matchFiles($contextId: String!, $content: String!, $limit: SafeInt, $threshold: Float) {
currentUser {
copilot {
contexts(contextId: $contextId) {
matchFiles(content: $content, limit: $limit) {
matchFiles(content: $content, limit: $limit, threshold: $threshold) {
fileId
chunk
content

View File

@@ -3017,6 +3017,8 @@ export type MatchWorkspaceDocsQueryVariables = Exact<{
contextId: Scalars['String']['input'];
content: Scalars['String']['input'];
limit?: InputMaybe<Scalars['SafeInt']['input']>;
scopedThreshold?: InputMaybe<Scalars['Float']['input']>;
threshold?: InputMaybe<Scalars['Float']['input']>;
}>;
export type MatchWorkspaceDocsQuery = {
@@ -3043,6 +3045,7 @@ export type MatchFilesQueryVariables = Exact<{
contextId: Scalars['String']['input'];
content: Scalars['String']['input'];
limit?: InputMaybe<Scalars['SafeInt']['input']>;
threshold?: InputMaybe<Scalars['Float']['input']>;
}>;
export type MatchFilesQuery = {