Forge
csharp72c0d4fb
1namespace HybridCodebaseIndex.Core;
2
3/// <summary>Стабильные значения типа попадания (слой B, ADR 0105 CascadeIDE). Векторный канал при включении semantic.</summary>
4public static class HitKinds
5{
6 public const string TextFts = "text_fts";
7 public const string TextVector = "text_vector";
8}
9
10public sealed record IndexHit(
11 long HitId,
12 string Path,
13 string Extension,
14 string HitKind,
15 double RankScore,
16 double? FtsScore,
17 double? VecScore,
18 string? Snippet,
19 int LineStart,
20 int LineEnd,
21 int ChunkCharCount,
22 string? LastWriteUtcIso);
23
24public sealed record SearchResponse(
25 int IndexFormatVersion,
26 string Query,
27 string DatabasePath,
28 IReadOnlyList<IndexHit> Hits);
29
30public sealed record ExplainHitResponse(
31 int IndexFormatVersion,
32 string DatabasePath,
33 IndexHit? Hit,
34 string? Err);
35
36public sealed record IndexStatus(
37 int IndexFormatVersion,
38 string DatabasePath,
39 bool DatabaseExists,
40 int DocumentCount,
41 bool DocumentCountMayBeStale,
42 string? IndexedAtIso,
43 string? WorkspaceRootNormalized,
44 string? LastReindexError,
45 string? LastReindexErrorAtIso,
46 string SettingsSource,
47 string? SettingsParseError,
48 EffectiveSettings? EffectiveSettings,
49 string? ReindexState,
50 string? ReindexStartedAtIso);
51
52public sealed record EffectiveSettings(
53 bool IncludeCsInFts,
54 IReadOnlyList<string> ExtraIncludeRoots,
55 IReadOnlyList<string> ExcludeRoots,
56 IReadOnlyList<string> EffectiveExtensions,
57 IReadOnlyList<string> ExcludePathSegments,
58 IReadOnlyList<string> IgnoreFiles,
59 long MaxIndexedFileBytes,
60 int ChunkLines,
61 int ChunkOverlapLines,
62 int BinaryProbeBytes);
63
64public sealed record ReindexSummary(
65 int IndexFormatVersion,
66 string DatabasePath,
67 int FilesIndexed,
68 int FilesSkippedTooLarge,
69 int FilesSkippedBinary,
70 int FilesSkippedExcluded,
71 IReadOnlyDictionary<string, int> SkippedReasonCounts,
72 IReadOnlyList<(string PathPrefix, int Count)> SkippedTopPathPrefixes,
73 IReadOnlyList<SkippedPath> SkippedSample,
74 TimeSpan Duration);
75
76public sealed record SkippedPath(
77 string Path,
78 string Reason);
79
View only · write via MCP/CIDE