Skip to content

refactor: remove old versioned marker system from agent instructions injection#802

Merged
fengmk2 merged 3 commits intomainfrom
remove-version-inject-on-agent.md
Mar 12, 2026
Merged

refactor: remove old versioned marker system from agent instructions injection#802
fengmk2 merged 3 commits intomainfrom
remove-version-inject-on-agent.md

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 12, 2026

Replace the <!--injected-by-vite-plus-v...--> marker system with the
<!--VITE PLUS START--> / <!--VITE PLUS END--> markers already used
by utils/agent.ts. This removes getOwnVersion(), version comparison
logic, and the old regex constants, reusing replaceMarkedAgentInstructionsSection()
from the shared utility instead.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 12, 2026

Deploy Preview for viteplus-staging canceled.

Name Link
🔨 Latest commit c4128b1
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-staging/deploys/69b2a5a732f61d0008147823

@fengmk2 fengmk2 self-assigned this Mar 12, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 12, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

fengmk2 added 3 commits March 12, 2026 19:26
…injection

Replace the `<!--injected-by-vite-plus-v...-->` marker system with the
`<!--VITE PLUS START-->` / `<!--VITE PLUS END-->` markers already used
by `utils/agent.ts`. This removes `getOwnVersion()`, version comparison
logic, and the old regex constants, reusing `replaceMarkedAgentInstructionsSection()`
from the shared utility instead.
…Block

Cover all code paths: file creation, marker-based update, no-change
skip, and append without markers.
Use detectExistingAgentTargetPaths to check all known agent file paths
instead of hardcoding only AGENTS.md and CLAUDE.md. Revert
AGENT_INSTRUCTIONS_START_MARKER back to non-exported const.
@fengmk2 fengmk2 force-pushed the remove-version-inject-on-agent.md branch from d52adb3 to c4128b1 Compare March 12, 2026 11:38
@fengmk2 fengmk2 marked this pull request as ready for review March 12, 2026 11:39
Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

🙇‍♂️

@fengmk2 fengmk2 merged commit 2c8ded6 into main Mar 12, 2026
31 of 34 checks passed
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 12, 2026

Merge activity

@fengmk2 fengmk2 deleted the remove-version-inject-on-agent.md branch March 12, 2026 12:10
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.

2 participants