feat: Clippy Code Tips - Because your code deserves unsolicited advice #855
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
It looks like you're writing code without a judgmental paperclip watching your every keystroke! Bold choice. Let me fix that for you.
This PR teaches Clippy to do what Clippy was born to do: pop up with helpful (or sarcastic, or encouraging—your choice!) tips as you navigate your code. Finally, a feature nobody asked for but everyone secretly wanted since 1997.
This adds an opt-in feature where your pet gives contextual tips as you code - detecting patterns like
console.log statements, TODOs, class definitions, and more. Tips appear in a speech bubble with the
personality of your choice.
Why?
vscode-pets is about fun. This makes pets feel alive - they're not just sitting there, they're watching
you code and have opinions about it.
Features
4 Personalities
before committing!")
Smart detection across vscode supported languages
UserRepositoryclass with 12 members. Is it getting too big?"Non-intrusive
Settings
{ "vscode-pets.clippyHover.enabled": true, "vscode-pets.clippyHover.personality": "helpful", "vscode-pets.clippyHover.frequency": "sometimes" }Architecture
src/extension/clippy/
├── provider.ts # Event subscriptions (selection, save, open) - core logic
├── semanticDetector.ts # VS Code symbol API integration
├── languages/ # Language registry + triggers for things like logging functions, etc
├── handlers/ # Document & file event handlers
├── messages.ts # i18n + template replacement
└── rateLimit.ts # Frequency control
Key decisions:
rather than fragile regex-only approach
Test Plan