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:
1 parent
04c7c2e13d
commit
bca5e5145a
11 files changed
+145
-10
No files matched your search
@@ -1625,7 +1625,8 @@ public class AnthropicService
|
||||
var includeMemory = useMemory && _memoryService != null && !string.IsNullOrEmpty(agentId);
|
||||
var includeMemorySearch = _vectorSearch != null && _vectorSearch.GetEmbeddingCount() > 0;
|
||||
var includeSendToSession = _db != null && _chatService != null;
|
||||
var hasTools = hasWorkspace || includeMemory || includeRemote || includeMemorySearch || includeSendToSession;
|
||||
var includeGitHubSearch = _toolService.HasGitHubToken;
|
||||
var hasTools = hasWorkspace || includeMemory || includeRemote || includeMemorySearch || includeSendToSession || includeGitHubSearch;
|
||||
var hasWebSearch = !string.IsNullOrEmpty(webSearchVersion);
|
||||
|
||||
if (!hasTools && !hasWebSearch) return;
|
||||
@@ -1633,7 +1634,7 @@ public class AnthropicService
|
||||
var tools = new List<object>();
|
||||
if (hasTools)
|
||||
{
|
||||
var allTools = _toolService.GetToolDefinitions(includeFileTools: hasWorkspace, includeMemory: includeMemory, includeUserChoice: allowUserChoice, includeRemote: includeRemote, includeMemorySearch: includeMemorySearch, includeSendToSession: includeSendToSession);
|
||||
var allTools = _toolService.GetToolDefinitions(includeFileTools: hasWorkspace, includeMemory: includeMemory, includeUserChoice: allowUserChoice, includeRemote: includeRemote, includeMemorySearch: includeMemorySearch, includeSendToSession: includeSendToSession, includeGitHubSearch: includeGitHubSearch);
|
||||
if (planMode)
|
||||
allTools = _toolService.FilterReadOnlyTools(allTools);
|
||||
tools.AddRange(allTools);
|
||||
|
||||
Reference in new issue
Block a user