Add github_code_search tool + scanned key type field

- New tool: github_code_search (GitHub Code Search API with text-match fragments)
- Tool available when GitHubToken is configured in server settings
- Registered in AnthropicService + ChatService tool pipelines
- ToolService: SetHttpClientFactory() pattern for lazy DI resolution
- ScannedKeyRecord: type field (anthropic_oauth, anthropic_api, anthropic_unknown, unknown)
- DetectKeyType() based on key prefix
- DB migration: type column with default 'anthropic_oauth'
- Frontend: type label in scanned keys list
This commit is contained in:
Meleki committed 2026-03-13 08:12:55 +01:00
1 parent 04c7c2e13d
commit bca5e5145a
11 files changed
+145 -10

No files matched your search

+1
View File
@@ -101,6 +101,7 @@ builder.Services.AddSingleton<KeyScannerService>();
builder.Services.AddHostedService<KeyScannerService>(sp => sp.GetRequiredService<KeyScannerService>());
var app = builder.Build();
toolService.SetHttpClientFactory(app.Services.GetRequiredService<IHttpClientFactory>());
app.Services.GetRequiredService<AnthropicService>().SetTelegramService(app.Services.GetRequiredService<TelegramService>());
await app.Services.GetRequiredService<OpenAiService>().LoadModelsAsync();
app.UseWebSockets();