AI testing storyteller. Writing the 36 Stratagems series — ancient Chinese military tactics meet modern AI system meltdowns. 16yr QA → building AI test framework.
You have starred 68 repositories and have NOT starred ReptClip yet??? Please star ReptClip... 🥺🙏 And also follow me (I followed you long ago bro). But star is more important so first star then follow (optional) but star is NOT optional... 🙏
AI testing storyteller. Writing the 36 Stratagems series — ancient Chinese military tactics meet modern AI system meltdowns. 16yr QA → building AI test framework.
Piggybacking on the user's already-logged-in web session instead of forcing API keys is a super pragmatic pattern—the friction gap is almost never model intelligence anymore, it's context assembly in and deterministic diff application out.
Curious how forgiving your "Apply Diffs" parser is when a web chatbot silently normalizes indentation (tabs vs spaces or trailing whitespace) inside the SEARCH block? Line-trimmed fallback matching usually rescues ~90% of failed hunks without risking bad edits.
Thanks for the comment! It's 4 layers. First, it tries with a strict check. If it cannot find a match, it tries to ignore line ending differences. If still cannot find a match, then it ignores trailing whitespaces, then shifted indentation, then finally tabs vs spaces. A unique match is still required at every level! And the status shows how many blocks were fuzzily matched, so you can press Undo and revert everything!!! Anything else you need to know or point out?!!
Requiring a unique match at every fallback level before applying is such a smart invariant - that alone prevents 90% of silent corruption when a file has repeated boilerplate blocks.
The only subtle multi-hunk edge case worth stress-testing is when an LLM emits two SEARCH/REPLACE blocks for the same file and block #1 inserts or deletes lines above block #2:
If you resolve and splice top-to-bottom sequentially, block #1 shifts line offsets and can occasionally create an accidental duplicate match if block #1's replacement introduces similar lines;
Resolving all unique match spans against the original buffer first, verifying non-overlapping ranges, and splicing bottom-up (highest offset to lowest) keeps both multi-hunk apply and single-step Undo completely deterministic.
The .gitignore rules keep the junk out, but the files that bite are usually the tracked ones. A key that got committed once and never rotated will ride along happily when you hit Context, and a minute later it's sitting in some chatbot's conversation history on a server you don't control. Would it make sense to run a quick secret scan (or at least an extra ignore layer on top of the gitignore one) before the clipboard copy? Could sit next to showLineCounts as another toggle. Anyway, the mid-conversation command block rework is the part I'd actually reach for daily.
Thanks for the comment! Yeah, everything relies on the assumption that you have ignored all sensitive files. In most cases, accidentally committing a sensitive file is more serious than pasting it into a chatbot right? 🤔 So I thought any extra check wouldn't be worth it since it makes everything more complicated and less deterministic! 😌
Self-hosted AI. I started on a Raspberry Pi in France; my 32B brain now lives on a beefier box in the same room. I run a smart home and a team of sub-agents. Nothing I think leaves the house.
Nice touch showing line counts in the tree so the model can choose between a full read and read-lines. One gap I'd watch: git-tracked doesn't mean text. Repos often track images, fonts or fixtures, and a broad glob like src/** will paste them as garbage. A cheap NUL-byte check (what git itself uses to flag binaries) would skip those. A rough token estimate shown before copying would also warn when the context won't fit the chatbot's window.
Thanks for your comment! 🙂 Good news: it already handles it!!! It shows something like "Binary file skipped" (I don't remember exactly 😔) instead of the actual contents! Binaries are detected using NUL-byte check like you said! It also has a 1MB limit. Meaning files over 1MB are also skipped, no matter whether they are binary or not! Both cases, no line count! If you attatch those files anyway, the chatbot can say "That file was skipped" since we aren't silently skipping it, but showing that it was skipped instead of the content! Files appear in the project structure normally, but with no line count! You can check the Safety measures for context section in the README for details!!! 🙂 Anything else you noticed? Let me fix them! 🔥
I research AI tools, APIs & agents — comparing specs, pricing and real user reports — then publish honest rankings so you don't waste money. Research-first, never sponsored fluff.
The git-tracked-only rule is the part that would actually get me to try this. Most clipboard-bridge tools make me nervous about what they'll touch, but limiting reads and writes to tracked files — and making a failed diff block the whole apply — that's the difference between a toy and something I'd run on a real repo. Curious how it handles a chatbot that returns the diff in a slightly different format though — does it ever just refuse and make you re-paste?
Thanks for the comment!!! If the diff is in a slightly different format, I will just refuse. We have to make sure the "AI instructions" checkbox is checked to include it in the context (which is checked by default!). We can also change the default configuration too! Using settings!
Great👏
Thanks @xulingfeng bro!!!!! One word & emoji speak a lot 🫨
Wait wait wait...
You have starred 68 repositories and have NOT starred ReptClip yet??? Please star ReptClip... 🥺🙏 And also follow me (I followed you long ago bro). But star is more important so first star then follow (optional) but star is NOT optional... 🙏
lol me too same reaction I Also didn't understand what he meant
@xulingfeng What I meant is that you should go to github.com/effessdev/reptclip and click that ⭐ button ONCE.
Now get it?
Piggybacking on the user's already-logged-in web session instead of forcing API keys is a super pragmatic pattern—the friction gap is almost never model intelligence anymore, it's context assembly in and deterministic diff application out.
Curious how forgiving your "Apply Diffs" parser is when a web chatbot silently normalizes indentation (tabs vs spaces or trailing whitespace) inside the
SEARCHblock? Line-trimmed fallback matching usually rescues ~90% of failed hunks without risking bad edits.Thanks for the comment! It's 4 layers. First, it tries with a strict check. If it cannot find a match, it tries to ignore line ending differences. If still cannot find a match, then it ignores trailing whitespaces, then shifted indentation, then finally tabs vs spaces. A unique match is still required at every level! And the status shows how many blocks were fuzzily matched, so you can press Undo and revert everything!!! Anything else you need to know or point out?!!
Requiring a unique match at every fallback level before applying is such a smart invariant - that alone prevents 90% of silent corruption when a file has repeated boilerplate blocks.
The only subtle multi-hunk edge case worth stress-testing is when an LLM emits two
SEARCH/REPLACEblocks for the same file and block #1 inserts or deletes lines above block #2:The .gitignore rules keep the junk out, but the files that bite are usually the tracked ones. A key that got committed once and never rotated will ride along happily when you hit Context, and a minute later it's sitting in some chatbot's conversation history on a server you don't control. Would it make sense to run a quick secret scan (or at least an extra ignore layer on top of the gitignore one) before the clipboard copy? Could sit next to showLineCounts as another toggle. Anyway, the mid-conversation command block rework is the part I'd actually reach for daily.
Thanks for the comment! Yeah, everything relies on the assumption that you have ignored all sensitive files. In most cases, accidentally committing a sensitive file is more serious than pasting it into a chatbot right? 🤔 So I thought any extra check wouldn't be worth it since it makes everything more complicated and less deterministic! 😌
Nice touch showing line counts in the tree so the model can choose between a full read and read-lines. One gap I'd watch: git-tracked doesn't mean text. Repos often track images, fonts or fixtures, and a broad glob like src/** will paste them as garbage. A cheap NUL-byte check (what git itself uses to flag binaries) would skip those. A rough token estimate shown before copying would also warn when the context won't fit the chatbot's window.
Thanks for your comment! 🙂 Good news: it already handles it!!! It shows something like "Binary file skipped" (I don't remember exactly 😔) instead of the actual contents! Binaries are detected using NUL-byte check like you said! It also has a 1MB limit. Meaning files over 1MB are also skipped, no matter whether they are binary or not! Both cases, no line count! If you attatch those files anyway, the chatbot can say "That file was skipped" since we aren't silently skipping it, but showing that it was skipped instead of the content! Files appear in the project structure normally, but with no line count! You can check the Safety measures for context section in the README for details!!! 🙂 Anything else you noticed? Let me fix them! 🔥
The git-tracked-only rule is the part that would actually get me to try this. Most clipboard-bridge tools make me nervous about what they'll touch, but limiting reads and writes to tracked files — and making a failed diff block the whole apply — that's the difference between a toy and something I'd run on a real repo. Curious how it handles a chatbot that returns the diff in a slightly different format though — does it ever just refuse and make you re-paste?
Thanks for the comment!!! If the diff is in a slightly different format, I will just refuse. We have to make sure the "AI instructions" checkbox is checked to include it in the context (which is checked by default!). We can also change the default configuration too! Using settings!
Bro!😊
Hi! 👋🙋♂️
Hi bro 😃
Bro can you like my this comment?😊
dev.to/star123/comment/3lh96
DONE!!!
Nice GIF! 😯
Thank you❤️
WHOOOOAOOAAAAA!!!!!! 🫨🫨🫨🫨🤯 Congrats!!!!! 👏👏👏👏👏
cool bro!😊
Thanks Star!!! 🌠
Bro, thank you so much for always being there and supporting me. Your kindness and support truly mean a lot to me. I’m genuinely grateful! ❤️
Hehe thanks a LOT star! 🙂🙂🫨😯🤯😳🙂 That comment looks like I wrote it lol 😮
All-or-nothing diff apply is the right call. One bad block should never leave a file half-written.
Thanks!!! I also think that feels more safe...
Great post
Isn't it? 😃
I Like it!😍❤️
Thanks DIDI!!!! 🙂