Skip to content

Fix excerpt semantic token coordinates - #3637

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue3563
Jun 14, 2026
Merged

Fix excerpt semantic token coordinates#3637
Widthdom merged 2 commits into
mainfrom
fix-issue3563

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Return excerpt --json semantic tokens in source coordinates and add semantic_token_coordinate_space plus content_line_spans so clamped content can be mapped back to the original source.
  • Exclude clamp marker text from semantic tokenization and keep MCP output-budget truncation from returning stale excerpt spans/tokens.
  • Document the JSON contract in both English and Japanese and add a changelog fragment.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~RunExcerpt_JsonClampsLongSingleLineContentAroundFocus" -p:UseSharedCompilation=false
  • UPDATE_SNAPSHOTS=1 dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-build --no-restore --filter "FullyQualifiedName~JsonOutputSnapshotTests.RunExcerpt_JsonOutput_MatchesGolden"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-build --no-restore --filter "FullyQualifiedName~RunExcerpt_Json"
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~ApplyExcerptOutputBudget_TruncatesAtLineBoundary_Issue1605" -p:UseSharedCompilation=false
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --no-restore --filter "FullyQualifiedName~QueryCommandRunnerSearchTests|FullyQualifiedName~McpServerTests"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • git diff --check
  • dotnet build CodeIndex.sln --no-restore -p:UseSharedCompilation=false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json

Scope

Fixes #3563

@Widthdom
Widthdom marked this pull request as ready for review June 14, 2026 05:50
@Widthdom
Widthdom merged commit b7aeeab into main Jun 14, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3563 branch June 14, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excerpt semantic-token columns should be mapped for clamped content

1 participant