Forge
csharp4405de34
1#nullable enable
2
3namespace CascadeIDE.Services.Intercom;
4
5/// <summary>Контекст для L1/L2 кэша attach-resolve (ADR 0135).</summary>
6public readonly record struct IntercomAttachResolveCacheContext(
7 string? WorkspaceRoot,
8 string? SolutionPath,
9 string? RelativePath,
10 string IndexDirectoryRelative = ".hybrid-codebase-index")
11{
12 public string ScopeKey => IntercomAttachResolveScopeKey.From(WorkspaceRoot, SolutionPath);
13
14 public static IntercomAttachResolveCacheContext From(
15 string? workspaceRoot,
16 string? solutionPath,
17 string? relativePath,
18 string? indexDirectoryRelative = null) =>
19 new(
20 workspaceRoot,
21 solutionPath,
22 relativePath,
23 string.IsNullOrWhiteSpace(indexDirectoryRelative)
24 ? ".hybrid-codebase-index"
25 : indexDirectoryRelative.Trim());
26}
27
View only · write via MCP/CIDE