snow-ai 0.4.19 → 0.4.21

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.
Files changed (2) hide show
  1. package/bundle/cli.mjs +19 -8
  2. package/package.json +1 -1
package/bundle/cli.mjs CHANGED
@@ -405620,14 +405620,16 @@ var init_textBuffer = __esm({
405620
405620
  return;
405621
405621
  }
405622
405622
  this.cursorIndex -= 1;
405623
- this.recomputeVisualCursorOnly();
405623
+ this.recalculateVisualState();
405624
+ this.scheduleUpdate();
405624
405625
  }
405625
405626
  moveRight() {
405626
405627
  if (this.cursorIndex >= cpLen(this.content)) {
405627
405628
  return;
405628
405629
  }
405629
405630
  this.cursorIndex += 1;
405630
- this.recomputeVisualCursorOnly();
405631
+ this.recalculateVisualState();
405632
+ this.scheduleUpdate();
405631
405633
  }
405632
405634
  moveUp() {
405633
405635
  if (this.visualLines.length === 0) {
@@ -472702,7 +472704,7 @@ var init_codebaseIndexAgent = __esm({
472702
472704
  this.progressCallback = progressCallback;
472703
472705
  }
472704
472706
  try {
472705
- this.fileWatcher = fs32.watch(this.projectRoot, { recursive: true }, (_eventType, filename) => {
472707
+ this.fileWatcher = fs32.watch(this.projectRoot, { recursive: true }, (eventType, filename) => {
472706
472708
  if (!filename)
472707
472709
  return;
472708
472710
  const filePath = path39.join(this.projectRoot, filename);
@@ -472714,12 +472716,21 @@ var init_codebaseIndexAgent = __esm({
472714
472716
  if (!_CodebaseIndexAgent.CODE_EXTENSIONS.has(ext)) {
472715
472717
  return;
472716
472718
  }
472717
- if (!fs32.existsSync(filePath)) {
472718
- logger.debug(`File deleted, removing from index: ${relativePath}`);
472719
- this.db.deleteChunksByFile(relativePath);
472720
- return;
472719
+ const fileExists = fs32.existsSync(filePath);
472720
+ if (eventType === "rename") {
472721
+ if (fileExists) {
472722
+ logger.debug(`File created/renamed, indexing: ${relativePath}`);
472723
+ this.debounceFileChange(filePath, relativePath);
472724
+ } else {
472725
+ logger.debug(`File deleted/renamed away, removing from index: ${relativePath}`);
472726
+ this.db.deleteChunksByFile(relativePath);
472727
+ }
472728
+ } else if (eventType === "change") {
472729
+ if (fileExists) {
472730
+ logger.debug(`File modified, reindexing: ${relativePath}`);
472731
+ this.debounceFileChange(filePath, relativePath);
472732
+ }
472721
472733
  }
472722
- this.debounceFileChange(filePath, relativePath);
472723
472734
  });
472724
472735
  this.db.setWatcherEnabled(true);
472725
472736
  logger.info("File watcher started successfully");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-ai",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "description": "Intelligent Command Line Assistant powered by AI",
5
5
  "license": "MIT",
6
6
  "bin": {