Skip to content

Commit 1be29a3

Browse files
committed
feat: remove limit on the number of symbol definition queries
1 parent 719e9f7 commit 1be29a3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

internal/service/indexer.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ const (
155155
defaultMaxProjects = 3
156156
defaultCacheCapacity = 10_0000 // 假定单个文件平均10个元素,1万个文件
157157
defaultTopN = 10
158-
defaultMaxBatchSymbolDefsLimit = 8
159158
)
160159

161160
// NewCodeIndexer 创建新的代码索引器
@@ -1161,9 +1160,6 @@ func (i *indexer) QueryDefinitions(ctx context.Context, opts *types.QueryDefinit
11611160
symbolNames = append(symbolNames, t)
11621161
}
11631162
}
1164-
if len(symbolNames) > defaultMaxBatchSymbolDefsLimit {
1165-
return nil, fmt.Errorf("the number of symbol definitions in a single batch query cannot exceed %d", defaultMaxBatchSymbolDefsLimit)
1166-
}
11671163
if len(symbolNames) > 0 {
11681164
return i.queryFuncDefinitionsBySymbolNames(ctx, opts.Workspace, symbolNames)
11691165
}
@@ -1435,7 +1431,6 @@ func (i *indexer) QueryCallGraph(ctx context.Context, opts *types.QueryCallGraph
14351431
}
14361432
// 查询组合1:文件路径+行范围
14371433
startLine, endLine = NormalizeLineRange(startLine, endLine, 1000)
1438-
fmt.Println(startLine,endLine)
14391434
results, err = i.queryCallGraphByLineRange(ctx, projectUuid, opts.Workspace, opts.FilePath, startLine, endLine, opts.MaxLayer)
14401435
return results, err
14411436
}

0 commit comments

Comments
 (0)