@kitkat-vn/kitcode 0.2.0-staging.3 → 0.2.0-staging.5

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.
@@ -505,7 +505,9 @@ export function readProjectSourcesUnder(root, {sourceType = 'vibe', rules}) {
505
505
  // A read in which git did anything but the user's own commits carries `gitOperation`: what it found
506
506
  // changed is git's, and not activity (operator decision Q4, 2026-09-25). A baseline always does; so does
507
507
  // a read after git acted without moving HEAD, as a stash does, which is read whole too, like a move, so
508
- // that none of what git changed is left for a later scan to take for the user's.
508
+ // that none of what git changed is left for a later scan to take for the user's. A read that is a
509
+ // baseline because an operation waits for the user carries `gitWaiting` too, the files git left for it,
510
+ // for the tracker's log (since 2026-10-01).
509
511
  function checkedAgainstGit(root, sourceType, since, read, readAll) {
510
512
  const first = read();
511
513
 
@@ -513,9 +515,15 @@ function checkedAgainstGit(root, sourceType, since, read, readAll) {
513
515
  return first;
514
516
  }
515
517
 
516
- const {arrival, operation, position} = gitArrival(root, since);
518
+ const {arrival, operation, position, waiting} = gitArrival(root, since);
517
519
  const reads = arrival === 'moved' || arrival === 'unexplained' || (arrival === null && operation) ? readAll() : first;
518
- const mark = (entry) => ({...entry, git: position, ...(arrival ? {baseline: arrival} : {}), ...(operation ? {gitOperation: true} : {})});
520
+ const mark = (entry) => ({
521
+ ...entry,
522
+ git: position,
523
+ ...(arrival ? {baseline: arrival} : {}),
524
+ ...(waiting ? {gitWaiting: waiting} : {}),
525
+ ...(operation ? {gitOperation: true} : {}),
526
+ });
519
527
 
520
528
  return Array.isArray(reads) ? reads.map(mark) : mark(reads);
521
529
  }
@@ -10,6 +10,7 @@ const PROBLEM_SENTENCES = {
10
10
  'project-missing': 'A KitCode project folder is missing, so nothing in it is counted.',
11
11
  'scan-failed': 'KitCode tracker could not read a project, so its = are not being counted.',
12
12
  'git-locked': 'A KitCode project\'s git index has stayed locked (index.lock in its .git folder), so nothing in it is counted until the lock goes; a git command that crashed can leave that file behind.',
13
+ 'git-unfinished': 'A KitCode project has an unfinished git operation (a merge, rebase, cherry-pick, revert, am or squash merge), so nothing in it is counted until that operation is finished or aborted.',
13
14
  };
14
15
  const UNKNOWN_PROBLEM = 'KitCode tracker is working with a problem; its log is ~/.kitcode/tracker.log.';
15
16