- 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
20 lines
1.0 KiB
C#
20 lines
1.0 KiB
C#
namespace Gott.Models;
|
|
|
|
public class ScannedKeyRecord
|
|
{
|
|
public long Id { get; set; }
|
|
public string ScannedKeyId { get; set; }
|
|
public string ApiKey { get; set; }
|
|
public string Source { get; set; } // Herkunft: github, serper, gist, pastebin
|
|
public string Type { get; set; } // Key-Typ: anthropic_oauth, etc.
|
|
public string SourceUrl { get; set; } // URL wo der Key gefunden wurde
|
|
public string Status { get; set; } // valid, invalid, auth_error, rate_limited, quota_exceeded, error
|
|
public string Plan { get; set; } // Pro, Max, Pro/Max, API, Unknown
|
|
public double? Usage7d { get; set; }
|
|
public double? Usage5h { get; set; }
|
|
public string ScannedAt { get; set; } // Wann gefunden
|
|
public string CheckedAt { get; set; } // Wann zuletzt geprüft
|
|
public int Deleted { get; set; } // Soft-Delete (1 = gelöscht/ignoriert)
|
|
public long? AdoptedApiKeyId { get; set; } // Verknüpfung zur api_keys.id (null = nicht übernommen)
|
|
}
|