fix: restore missing assets and address Copilot review comments

- Add hardware-banner.jpg, launcher-webui.jpg, launcher-tui.jpg (lost in
  previous force push)
- Add io.LimitReader (1MB) to BaiduSearchProvider response body read
- Add no-results fallback and "Results for: ... (via Baidu Search)" header
- Add api_keys field to Brave and Perplexity tables in fr/ja/pt-br/vi
  tools_configuration.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
BeaconCat 2026-03-23 10:21:06 +08:00
parent 4bc64497e3
commit 48cba906cd
8 changed files with 38 additions and 26 deletions

BIN
assets/hardware-banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
assets/launcher-tui.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
assets/launcher-webui.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

View file

@ -75,17 +75,19 @@ Paramètres généraux pour la récupération et le traitement du contenu des pa
| Config | Type | Par défaut | Description | | Config | Type | Par défaut | Description |
|---------------|--------|------------|--------------------------------| |---------------|--------|------------|--------------------------------|
| `enabled` | bool | false | Activer la recherche Perplexity | | `enabled` | bool | false | Activer la recherche Perplexity |
| `api_key` | string | - | Clé API Perplexity | | `api_key` | string | - | Clé API Perplexity |
| `max_results` | int | 5 | Nombre maximum de résultats | | `api_keys` | string[] | - | Plusieurs clés API Perplexity pour la rotation (`api_key` prioritaire) |
| `max_results` | int | 5 | Nombre maximum de résultats |
### Brave ### Brave
| Config | Type | Par défaut | Description | | Config | Type | Par défaut | Description |
|---------------|--------|------------|---------------------------| |---------------|--------|------------|---------------------------|
| `enabled` | bool | false | Activer la recherche Brave | | `enabled` | bool | false | Activer la recherche Brave |
| `api_key` | string | - | Clé API Brave Search | | `api_key` | string | - | Clé API Brave Search |
| `max_results` | int | 5 | Nombre maximum de résultats | | `api_keys` | string[] | - | Plusieurs clés API Brave Search pour la rotation (`api_key` prioritaire) |
| `max_results` | int | 5 | Nombre maximum de résultats |
### Tavily ### Tavily

View file

@ -75,17 +75,19 @@ Web ツールはウェブ検索とフェッチに使用されます。
| 設定項目 | 型 | デフォルト | 説明 | | 設定項目 | 型 | デフォルト | 説明 |
|---------------|--------|------------|---------------------------| |---------------|--------|------------|---------------------------|
| `enabled` | bool | false | Perplexity 検索を有効にする | | `enabled` | bool | false | Perplexity 検索を有効にする |
| `api_key` | string | - | Perplexity API キー | | `api_key` | string | - | Perplexity API キー |
| `max_results` | int | 5 | 最大結果数 | | `api_keys` | string[] | - | 複数の Perplexity API キー(ローテーション用、`api_key` より優先) |
| `max_results` | int | 5 | 最大結果数 |
### Brave ### Brave
| 設定項目 | 型 | デフォルト | 説明 | | 設定項目 | 型 | デフォルト | 説明 |
|---------------|--------|------------|-----------------------| |---------------|--------|------------|-----------------------|
| `enabled` | bool | false | Brave 検索を有効にする | | `enabled` | bool | false | Brave 検索を有効にする |
| `api_key` | string | - | Brave Search API キー | | `api_key` | string | - | Brave Search API キー |
| `max_results` | int | 5 | 最大結果数 | | `api_keys` | string[] | - | 複数の Brave Search API キー(ローテーション用、`api_key` より優先) |
| `max_results` | int | 5 | 最大結果数 |
### Tavily ### Tavily

View file

@ -75,17 +75,19 @@ Configurações gerais para busca e processamento de conteúdo de páginas web.
| Config | Tipo | Padrão | Descrição | | Config | Tipo | Padrão | Descrição |
|---------------|--------|--------|--------------------------------| |---------------|--------|--------|--------------------------------|
| `enabled` | bool | false | Habilitar pesquisa Perplexity | | `enabled` | bool | false | Habilitar pesquisa Perplexity |
| `api_key` | string | - | Chave API do Perplexity | | `api_key` | string | - | Chave API do Perplexity |
| `max_results` | int | 5 | Número máximo de resultados | | `api_keys` | string[] | - | Várias chaves API do Perplexity para rotação (prioridade sobre `api_key`) |
| `max_results` | int | 5 | Número máximo de resultados |
### Brave ### Brave
| Config | Tipo | Padrão | Descrição | | Config | Tipo | Padrão | Descrição |
|---------------|--------|--------|----------------------------| |---------------|--------|--------|----------------------------|
| `enabled` | bool | false | Habilitar pesquisa Brave | | `enabled` | bool | false | Habilitar pesquisa Brave |
| `api_key` | string | - | Chave API do Brave Search | | `api_key` | string | - | Chave API única do Brave Search |
| `max_results` | int | 5 | Número máximo de resultados | | `api_keys` | string[] | - | Várias chaves API do Brave para rotação (prioridade sobre `api_key`) |
| `max_results` | int | 5 | Número máximo de resultados |
### Tavily ### Tavily

View file

@ -75,17 +75,19 @@ Cài đặt chung để tải và xử lý nội dung trang web.
| Cấu hình | Kiểu | Mặc định | Mô tả | | Cấu hình | Kiểu | Mặc định | Mô tả |
|----------------|--------|----------|-------------------------------| |----------------|--------|----------|-------------------------------|
| `enabled` | bool | false | Bật tìm kiếm Perplexity | | `enabled` | bool | false | Bật tìm kiếm Perplexity |
| `api_key` | string | - | Khóa API Perplexity | | `api_key` | string | - | Khóa API Perplexity |
| `max_results` | int | 5 | Số kết quả tối đa | | `api_keys` | string[] | - | Nhiều khóa API Perplexity để xoay vòng (ưu tiên hơn `api_key`) |
| `max_results` | int | 5 | Số kết quả tối đa |
### Brave ### Brave
| Cấu hình | Kiểu | Mặc định | Mô tả | | Cấu hình | Kiểu | Mặc định | Mô tả |
|----------------|--------|----------|----------------------------| |----------------|--------|----------|----------------------------|
| `enabled` | bool | false | Bật tìm kiếm Brave | | `enabled` | bool | false | Bật tìm kiếm Brave |
| `api_key` | string | - | Khóa API Brave Search | | `api_key` | string | - | Khóa API Brave Search |
| `max_results` | int | 5 | Số kết quả tối đa | | `api_keys` | string[] | - | Nhiều khóa API Brave Search để xoay vòng (ưu tiên hơn `api_key`) |
| `max_results` | int | 5 | Số kết quả tối đa |
### Tavily ### Tavily

View file

@ -656,7 +656,7 @@ func (p *BaiduSearchProvider) Search(ctx context.Context, query string, count in
} }
defer resp.Body.Close() defer resp.Body.Close()
body, err := io.ReadAll(resp.Body) body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20))
if err != nil { if err != nil {
return "", fmt.Errorf("failed to read response: %w", err) return "", fmt.Errorf("failed to read response: %w", err)
} }
@ -676,7 +676,11 @@ func (p *BaiduSearchProvider) Search(ctx context.Context, query string, count in
return "", fmt.Errorf("failed to parse response: %w", err) return "", fmt.Errorf("failed to parse response: %w", err)
} }
var lines []string if len(result.References) == 0 {
return fmt.Sprintf("No results for: %s", query), nil
}
lines := []string{fmt.Sprintf("Results for: %s (via Baidu Search)", query)}
for i, item := range result.References { for i, item := range result.References {
if i >= count { if i >= count {
break break