-
Notifications
You must be signed in to change notification settings - Fork 2
feat: capture opt-in instruction context #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -433,6 +433,11 @@ function printSnapshotCommitDetails(commit: SnapshotCommit): void { | |
| for (const file of commit.files) { | ||
| console.log(` ${formatSnapshotFile(file)}`); | ||
| } | ||
| if (commit.instructionContext) { | ||
| console.log( | ||
| ` instruction_context: ${commit.instructionContext.files.length} files, raw_text=false`, | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes the details view less useful than the issue asks for. |
||
| ); | ||
| } | ||
| } | ||
|
|
||
| function parseSnapshotHistoryMode(mode: string): SnapshotHistoryMode { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blocking] This hashes
$root/$rel_pathwithout resolving the target and checking that it still lives inside$root. Because.cursor/rules/*can include symlinks,--instruction-contextcan hash a file outside the workspace while reporting only the workspace-relative symlink path. I reproduced this with.cursor/rules/external.mdc -> /private/tmp/...; the snapshot marked itcapturedand logged the external target hash. Please skip symlinks/out-of-root resolved paths, or mark them with a non-captured warning status.