Skip to content

Commit dd5479b

Browse files
committed
v0.5.18
feat(snapshot):The snapshot is saved back to the user directory, and the interactive tool supports multiple selections
1 parent 4e47a99 commit dd5479b

4 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ jobs:
5858
5959
### What's New
6060
61-
- Fix memory leaks
62-
- More configurable items have been added to the codebase
63-
61+
- The snapshot is saved back to the user directory, and the interactive tool supports multiple selections
62+
6463
### Installation
6564
```bash
6665
npm install -g snow-ai

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snow-ai",
3-
"version": "0.5.17",
3+
"version": "0.5.18",
44
"description": "Intelligent Command Line Assistant powered by AI",
55
"license": "MIT",
66
"bin": {

source/utils/codebase/hashBasedSnapshot.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import fs from 'fs/promises';
22
import fssync from 'fs';
33
import path from 'path';
4+
import os from 'os';
45
import crypto from 'crypto';
56
import ignore, {type Ignore} from 'ignore';
67
import {logger} from '../core/logger.js';
8+
import {getProjectId} from '../session/projectUtils.js';
79

810
/**
911
* File state tracked by hash AND content (optional for memory optimization)
@@ -55,7 +57,13 @@ class HashBasedSnapshotManager {
5557
private ignoreFilter: Ignore;
5658

5759
constructor() {
58-
this.snapshotsDir = path.join(process.cwd(), '.snow', 'snapshots');
60+
const projectId = getProjectId();
61+
this.snapshotsDir = path.join(
62+
os.homedir(),
63+
'.snow',
64+
'snapshots',
65+
projectId,
66+
);
5967
this.ignoreFilter = ignore();
6068
this.loadIgnorePatterns();
6169
}

0 commit comments

Comments
 (0)