chore(search): drop internal issue refs and external-project names from plugin search code

- Remove "(issue #477)" internal planning references from shipped Java
  (SearchProviderRegistry, PluginSearchBridge, and the two new tests) — code
  should describe what it does, not point at issue trackers.
- Drop "openclaw" external-project attribution from the search provider
  comments (SearchProviderRegistry, SearchCache, SearchQuery), restating them
  as objective functional descriptions.
This commit is contained in:
matevip 2026-07-03 17:00:13 +08:00
parent 0a58b3fb35
commit 80815612ce
6 changed files with 8 additions and 8 deletions

View File

@ -13,7 +13,7 @@ import java.util.List;
/**
* Bridge that wraps a plugin's {@link PluginSearchProvider} into the platform's
* internal {@link SearchProvider} interface (issue #477).
* internal {@link SearchProvider} interface.
* <p>
* The platform-side {@link SystemSettingsDTO} is intentionally ignored plugin
* providers read their own config via {@code PluginContext#getConfig}, keeping

View File

@ -8,7 +8,7 @@ import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
/**
* 搜索结果内存缓存 借鉴 openclaw SEARCH_CACHE 设计
* 搜索结果内存缓存
*
* <p>避免 Agent 同一对话中多次搜索相同/相似 query 时重复调用搜索 API
* <ul>

View File

@ -15,7 +15,7 @@ import java.util.stream.Collectors;
/**
* 搜索提供商注册表 收集所有 {@link SearchProvider} 实现提供优先级排序与自动探测
*
* <p>借鉴 openclaw provider auto-detect 机制
* <p>provider 自动探测机制
* <ol>
* <li>用户显式配置的 primary provider 直接使用</li>
* <li> autoDetectOrder 遍历优先选有 credential provider</li>
@ -45,7 +45,7 @@ public class SearchProviderRegistry {
}
/**
* 注册一个插件提供的 providerissue #477
* 注册一个插件提供的 provider
*
* @throws IllegalArgumentException id 为空或与内置/已注册插件 provider 冲突
*/
@ -95,7 +95,7 @@ public class SearchProviderRegistry {
/**
* 根据当前配置解析应使用的 provider
*
* <p>解析策略借鉴 openclaw resolveWebSearchProviderId
* <p>解析策略
* <ol>
* <li>如果用户配置了 primary provider 且该 provider 可用 选中</li>
* <li>否则按 autoDetectOrder 遍历跳过 keyless先找有 credential </li>

View File

@ -1,7 +1,7 @@
package vip.mate.tool.search;
/**
* 搜索查询参数封装 借鉴 openclaw 的丰富工具参数设计
* 搜索查询参数封装
*
* @param query 搜索关键词必须
* @param freshness 时间范围过滤day / week / month / year可选

View File

@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock;
/**
* PluginContextImpl#registerSearchProvider: wraps the plugin SPI in a bridge,
* registers it into SearchProviderRegistry, and records the id on LoadedPlugin
* so disable/rollback can unregister it (issue #477).
* so disable/rollback can unregister it.
*/
class PluginContextImplSearchTest {

View File

@ -12,7 +12,7 @@ import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
/**
* Plugin-provider mutability of {@link SearchProviderRegistry} (issue #477):
* Plugin-provider mutability of {@link SearchProviderRegistry}:
* plugin JARs register/unregister providers at runtime; the registry must merge
* them with the Spring-injected built-ins and reject id conflicts.
*/