Files
nextcloud-mcp-server/third_party/astroglobe/lib/Settings/PersonalSection.php
T
Chris Coutinho 4cce4f6392 feat(astrolabe): add admin search settings and enhanced UI
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>
2025-12-18 00:01:19 +01:00

53 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\Astroglobe\Settings;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;
/**
* Personal settings section for Astroglobe.
*
* Creates a dedicated section in personal settings for semantic search configuration.
*/
class PersonalSection 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, 0-99)
*/
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');
}
}