codewhale.history 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codewhale.history",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "CodeWhale utility commands: session history, tool listing, file snapshot — global install",
5
5
  "bin": {
6
6
  "codewhale-history": "./_list_sessions.js",
@@ -14,8 +14,14 @@ When the user types `//snapshot on`, `//snapshot off`, or `//snapshot status`, m
14
14
  2. **If Git repo exists**: reply "This workspace has a Git repo — snapshotting is not needed. Use `git restore <file>` to undo changes."
15
15
  3. **If no Git repo**: create `_snapshots/` directory, write a note to persist `snapshot_enabled=true`, then confirm to the user.
16
16
  4. From this point forward, before editing any **existing** file:
17
- - Run `Copy-Item <file> _snapshots/<relative-path>.<N>` (PowerShell)
18
- - Increment N per file (v1, v2, v3...)
17
+ - Run the following PowerShell command to snapshot with a timestamp:
18
+ ```
19
+ $ts = Get-Date -Format 'yyyy-MM-dd_HH-mm-ss'
20
+ $base = [System.IO.Path]::GetFileNameWithoutExtension('<file>')
21
+ $ext = [System.IO.Path]::GetExtension('<file>')
22
+ Copy-Item '<file>' "_snapshots/$base.$ts$ext"
23
+ ```
24
+ - Result example: `foo.py` → `_snapshots/foo.2026-06-20_11-30-00.py`
19
25
  - Do NOT snapshot brand-new files being created for the first time
20
26
 
21
27
  ### `//snapshot off`