@@ -6,7 +6,7 @@ import cc.unitmesh.agent.scoring.ExpandedKeywords
66import cc.unitmesh.agent.scoring.KeywordExpander
77import 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