Skip to content

Fix jump-to-source mapping#30

Merged
ultmaster merged 6 commits intomainfrom
975s3d-codex/fix-jump-to-source-code-feature
Jun 30, 2025
Merged

Fix jump-to-source mapping#30
ultmaster merged 6 commits intomainfrom
975s3d-codex/fix-jump-to-source-code-feature

Conversation

@ultmaster
Copy link
Contributor

Summary

  • expose richContentFromSourceMap and use it for preview output
  • send mappings only for rendering and remove unused data-source-map
  • simplify panel update message
  • adjust tests for new mapping behavior

Testing

  • npm test
  • npm run test-vscode

https://chatgpt.com/codex/tasks/task_e_685d1e2d1c00832e8a633d95a4a241f8

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@ultmaster ultmaster requested a review from Copilot June 30, 2025 07:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to fix the jump-to-source mapping by exposing richContentFromSourceMap and updating all related code paths and tests to support additional mapping indices.

  • Exposes and utilizes richContentFromSourceMap for preview output.
  • Adjusts mapping node and source segment structures to include original and IR indices.
  • Updates tests and panel functionality to work with the new mapping behavior.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/poml/writer.ts Updates mapping node creation, source segment handling, and removes internal richContentFromSourceMap in favor of the exported version; adds IR index fields.
packages/poml/tests/writer.test.tsx Adjusts tests to reflect new source mapping fields and updated array structure.
packages/poml/tests/index.test.tsx Updates tests to validate the new writeWithSourceMap behavior.
packages/poml/index.ts Exports updated richContentFromSourceMap along with other core constructs.
packages/poml/base.tsx Adds the new richContentFromSourceMap implementation.
packages/poml-vscode/* Updates imports and usage of richContentFromSourceMap and source map fields in panel and LSP code.

// mappings. If we cannot find a mapping, use the first one as a fallback.
chosen = result.mappings[0];
}
console.log(start, end, chosen, chosenOriginal);
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the debug logging statement before merging to production to avoid unintended console output.

Suggested change
console.log(start, end, chosen, chosenOriginal);
// Debug logging removed for production.

Copilot uses AI. Check for mistakes.
cursor[bot]

This comment was marked as outdated.

@ultmaster ultmaster enabled auto-merge (squash) June 30, 2025 07:50
@ultmaster ultmaster merged commit 2f31cae into main Jun 30, 2025
4 checks passed
@ultmaster ultmaster deleted the 975s3d-codex/fix-jump-to-source-code-feature branch July 9, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants