Skip to content

Commit 7062024

Browse files
committed
refactor(docql): rename SmartSearchStrategy to SearchStrategy
Rename interface and implementations for clarity and consistency.
1 parent e7107f8 commit 7062024

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import cc.unitmesh.agent.scoring.ExpandedKeywords
66
import cc.unitmesh.agent.scoring.KeywordExpander
77
import cc.unitmesh.agent.tool.ToolResult
88

9-
interface SmartSearchStrategy {
9+
interface SearchStrategy {
1010
suspend fun execute(context: SmartSearchContext): ToolResult
1111
}
1212

@@ -37,7 +37,7 @@ data class SearchLevelResult(
3737
val activeChannels: List<String>
3838
)
3939

40-
class KeepStrategy : SmartSearchStrategy {
40+
class KeepStrategy : SearchStrategy {
4141
override suspend fun execute(context: SmartSearchContext): ToolResult {
4242
return context.resultBuilder(
4343
context.level1Results,
@@ -55,7 +55,7 @@ class KeepStrategy : SmartSearchStrategy {
5555
}
5656
}
5757

58-
class FilterStrategy : SmartSearchStrategy {
58+
class FilterStrategy : SearchStrategy {
5959
override suspend fun execute(context: SmartSearchContext): ToolResult {
6060
val filterKeywords = if (context.secondaryKeyword != null) {
6161
listOf(context.secondaryKeyword) + context.expandedKeywords.secondary.take(3)
@@ -135,7 +135,7 @@ class FilterStrategy : SmartSearchStrategy {
135135
}
136136
}
137137

138-
class ExpandStrategy : SmartSearchStrategy {
138+
class ExpandStrategy : SearchStrategy {
139139
override suspend fun execute(context: SmartSearchContext): ToolResult {
140140
// Too few results, expand to Level 2
141141
val level2Results = context.searchExecutor(

0 commit comments

Comments
 (0)