Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]


### ✨ Added
- New command: **CodeCritter: Rename Pet ✏️** to rename your pet.


### Fixed

- Query diagnostics only for visible documents and count split editors once per document, avoiding a workspace-wide scan on every diagnostics event.

---

## [2.0.0] - 2026-09-25

*The massive Companion Update! Bringing new pet species, a persistent sidebar view, wearables, and interactivity to CodeCritter.*
Expand Down
21 changes: 21 additions & 0 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,26 @@ function activate(context) {
}
});

/** Rename the pet using an input box */
const cmdRenamePet = vscode.commands.registerCommand('codecritter.petName', async () => {
const current = petName();
const val = await vscode.window.showInputBox({
title: 'CodeCritter — Rename Pet Name',
prompt: 'What would you like to name your pet?',
value: current,
validateInput: v => {
if (v.trim() === '') return 'Pet name cannot be empty.';
if (v.trim().length > 20) return 'Pet name must be 20 characters max.';
return null;
}
});
if (val !== undefined) {
const newName = val.trim();
await cfg().update('petName', newName, vscode.ConfigurationTarget.Global);
vscode.window.showInformationMessage(`✏️ Your pet has been renamed to ${newName}!`);
}
});

// ── Event: File Saved ──
const onSave = vscode.workspace.onDidSaveTextDocument(() => {
lastActivity = Date.now();
Expand Down Expand Up @@ -433,6 +453,7 @@ function activate(context) {
cmdChooseTheme,
cmdExportStats,
cmdImportStats,
cmdRenamePet,
onSave,
onChange,
onDiagnostics,
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
"command": "codecritter.playPet",
"title": "CodeCritter: Play with Pet 🎾",
"category": "CodeCritter"
},
{
"command": "codecritter.petName",
"title": "CodeCritter: Rename Pet ✏️",
"category": "CodeCritter"
}
],
"viewsContainers": {
Expand Down