4cce4f6392
Add comprehensive admin controls for the unified search provider and enhance the frontend UI with filtering and visualization improvements. **Admin Settings:** - Configure default search algorithm (hybrid, semantic, bm25) - Set fusion method for hybrid search (rrf, dbsf) - Adjust minimum score threshold (0-100%) - Set result limit (1-100 results) **Frontend Enhancements:** - Add score-based result filtering with slider control - Add expandable excerpts for search results - Improve result visualization and formatting - Add algorithm badge to show search method used **API Changes:** - Add `/api/admin/search-settings` POST endpoint - Add `searchForUnifiedSearch()` method to McpServerClient - Load and apply admin settings in SemanticSearchProvider **Technical Details:** - Settings stored in app config table - Defaults: hybrid algorithm, rrf fusion, 0% threshold, 20 results - SemanticSearchProvider respects admin-configured limits 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
53 lines
1022 B
PHP
53 lines
1022 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\Astroglobe\Settings;
|
|
|
|
use OCP\IL10N;
|
|
use OCP\IURLGenerator;
|
|
use OCP\Settings\IIconSection;
|
|
|
|
/**
|
|
* Admin settings section for Astroglobe.
|
|
*
|
|
* Creates a dedicated section in admin settings for semantic search administration.
|
|
*/
|
|
class AdminSection implements IIconSection {
|
|
private $l;
|
|
private $urlGenerator;
|
|
|
|
public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
|
|
$this->l = $l;
|
|
$this->urlGenerator = $urlGenerator;
|
|
}
|
|
|
|
/**
|
|
* @return string The section ID
|
|
*/
|
|
public function getID(): string {
|
|
return 'astroglobe';
|
|
}
|
|
|
|
/**
|
|
* @return string The translated section name
|
|
*/
|
|
public function getName(): string {
|
|
return $this->l->t('Astroglobe');
|
|
}
|
|
|
|
/**
|
|
* @return int Priority (lower = higher up in list)
|
|
*/
|
|
public function getPriority(): int {
|
|
return 80;
|
|
}
|
|
|
|
/**
|
|
* @return string Section icon (SVG or image URL)
|
|
*/
|
|
public function getIcon(): string {
|
|
return $this->urlGenerator->imagePath('astroglobe', 'app-dark.svg');
|
|
}
|
|
}
|