@imdeadpool/guardex 7.0.27 → 7.0.34

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.
@@ -36,7 +36,7 @@ const ACTIVE_AGENTS_MANIFEST_RELATIVE = path.join('vscode', 'guardex-active-agen
36
36
  const ACTIVE_AGENTS_INSTALL_SCRIPT_RELATIVE = path.join('scripts', 'install-vscode-active-agents-extension.js');
37
37
  const RELOAD_WINDOW_ACTION = 'Reload Window';
38
38
  const UPDATE_LATER_ACTION = 'Later';
39
- const ACTIVE_AGENTS_EXTENSION_ID = 'recodeee.gitguardex-active-agents';
39
+ const ACTIVE_AGENTS_EXTENSION_ID = 'Recodee.gitguardex-active-agents';
40
40
  const RESTART_EXTENSION_HOST_COMMAND = 'workbench.action.restartExtensionHost';
41
41
  const REFRESH_POLL_INTERVAL_MS = 30_000;
42
42
  const INSPECT_PANEL_VIEW_TYPE = 'gitguardex.activeAgents.inspect';
@@ -56,6 +56,7 @@ const MANAGED_REPO_SCAN_IGNORED_FOLDERS = [
56
56
  const SESSION_ACTIVITY_GROUPS = [
57
57
  { kind: 'blocked', label: 'BLOCKED' },
58
58
  { kind: 'working', label: 'WORKING NOW' },
59
+ { kind: 'finished', label: 'FINISHED' },
59
60
  { kind: 'idle', label: 'THINKING' },
60
61
  { kind: 'stalled', label: 'STALLED' },
61
62
  { kind: 'dead', label: 'DEAD' },
@@ -63,6 +64,7 @@ const SESSION_ACTIVITY_GROUPS = [
63
64
  const SESSION_ACTIVITY_ICON_IDS = {
64
65
  blocked: 'warning',
65
66
  working: 'loading~spin',
67
+ finished: 'pass-filled',
66
68
  idle: 'comment-discussion',
67
69
  stalled: 'clock',
68
70
  dead: 'error',
@@ -108,6 +110,10 @@ function iconColorId(iconId) {
108
110
  return 'terminal.ansiCyan';
109
111
  case 'list-tree':
110
112
  return 'terminal.ansiBlue';
113
+ case 'pass-filled':
114
+ case 'pass':
115
+ case 'check':
116
+ return 'testing.iconPassed';
111
117
  default:
112
118
  return '';
113
119
  }
@@ -468,9 +474,15 @@ function agentBadgeFromBranch(branch) {
468
474
 
469
475
  function buildActiveAgentsStatusSummary(summary) {
470
476
  const workingCount = summary?.workingCount || 0;
477
+ const finishedCount = summary?.finishedCount || 0;
471
478
  const idleCount = summary?.idleCount || 0;
472
- if (workingCount > 0 || idleCount > 0) {
473
- return `$(git-branch) ${workingCount} working · ${idleCount} idle`;
479
+ if (workingCount > 0 || finishedCount > 0 || idleCount > 0) {
480
+ const parts = [`${workingCount} working`];
481
+ if (finishedCount > 0) {
482
+ parts.push(`${finishedCount} finished`);
483
+ }
484
+ parts.push(`${idleCount} idle`);
485
+ return `$(git-branch) ${parts.join(' · ')}`;
474
486
  }
475
487
  return `$(git-branch) ${formatCountLabel(summary?.sessionCount || 0, 'tracked session')}`;
476
488
  }
@@ -490,6 +502,7 @@ function buildActiveAgentsStatusTooltip(selectedSession, summary) {
490
502
  return [
491
503
  formatCountLabel(activeCount, 'active agent'),
492
504
  formatCountLabel(summary?.workingCount || 0, 'working now session', 'working now sessions'),
505
+ formatCountLabel(summary?.finishedCount || 0, 'finished session'),
493
506
  formatCountLabel(summary?.idleCount || 0, 'idle session'),
494
507
  formatCountLabel(summary?.unassignedChangeCount || 0, 'unassigned change'),
495
508
  formatCountLabel(summary?.lockedFileCount || 0, 'locked file'),
@@ -534,6 +547,10 @@ function countWorkingSessions(sessions) {
534
547
  )).length;
535
548
  }
536
549
 
550
+ function countFinishedSessions(sessions) {
551
+ return sessions.filter((session) => session.activityKind === 'finished').length;
552
+ }
553
+
537
554
  function countIdleSessions(sessions) {
538
555
  return sessions.filter((session) => (
539
556
  session.activityKind === 'idle' || session.activityKind === 'stalled'
@@ -571,6 +588,9 @@ function sessionFreshnessLabel(session, now = Date.now()) {
571
588
  if (session.activityKind === 'blocked') {
572
589
  return 'Needs attention';
573
590
  }
591
+ if (session.activityKind === 'finished') {
592
+ return 'Finished';
593
+ }
574
594
  if (session.activityKind === 'stalled') {
575
595
  return 'Possibly stale';
576
596
  }
@@ -598,6 +618,8 @@ function sessionStatusLabel(session) {
598
618
  return 'Blocked';
599
619
  case 'working':
600
620
  return 'Working';
621
+ case 'finished':
622
+ return 'Finished';
601
623
  case 'idle':
602
624
  return 'Idle';
603
625
  case 'stalled':
@@ -804,6 +826,7 @@ function buildWorktreeBranchDescription(sessions) {
804
826
  function buildOverviewDescription(summary) {
805
827
  return [
806
828
  formatCountLabel(summary?.workingCount || 0, 'working agent'),
829
+ formatCountLabel(summary?.finishedCount || 0, 'finished agent'),
807
830
  formatCountLabel(summary?.idleCount || 0, 'idle agent'),
808
831
  formatCountLabel(summary?.unassignedChangeCount || 0, 'unassigned change'),
809
832
  formatCountLabel(summary?.lockedFileCount || 0, 'locked file'),
@@ -923,6 +946,9 @@ function workingSessionSortKey(session) {
923
946
  if (session.deltaLabel === 'New') {
924
947
  return 3;
925
948
  }
949
+ if (session.activityKind === 'finished') {
950
+ return 5;
951
+ }
926
952
  return 4;
927
953
  }
928
954
 
@@ -2490,6 +2516,7 @@ function buildRepoOverview(sessions, unassignedChanges, lockEntries) {
2490
2516
  return {
2491
2517
  sessionCount: sessions.length,
2492
2518
  workingCount: countWorkingSessions(sessions),
2519
+ finishedCount: countFinishedSessions(sessions),
2493
2520
  idleCount: countIdleSessions(sessions),
2494
2521
  unassignedChangeCount: (unassignedChanges || []).length,
2495
2522
  lockedFileCount: Array.isArray(lockEntries) ? lockEntries.length : 0,
@@ -2860,6 +2887,7 @@ class ActiveAgentsProvider {
2860
2887
  this.viewSummary = {
2861
2888
  sessionCount: 0,
2862
2889
  workingCount: 0,
2890
+ finishedCount: 0,
2863
2891
  idleCount: 0,
2864
2892
  unassignedChangeCount: 0,
2865
2893
  lockedFileCount: 0,
@@ -2878,6 +2906,7 @@ class ActiveAgentsProvider {
2878
2906
  this.updateViewState({
2879
2907
  sessionCount: 0,
2880
2908
  workingCount: 0,
2909
+ finishedCount: 0,
2881
2910
  idleCount: 0,
2882
2911
  unassignedChangeCount: 0,
2883
2912
  lockedFileCount: 0,
@@ -3000,6 +3029,10 @@ class ActiveAgentsProvider {
3000
3029
  const summary = {
3001
3030
  sessionCount: repoEntries.reduce((total, entry) => total + entry.sessions.length, 0),
3002
3031
  workingCount: repoEntries.reduce((total, entry) => total + entry.overview.workingCount, 0),
3032
+ finishedCount: repoEntries.reduce(
3033
+ (total, entry) => total + (entry.overview.finishedCount || 0),
3034
+ 0,
3035
+ ),
3003
3036
  idleCount: repoEntries.reduce((total, entry) => total + entry.overview.idleCount, 0),
3004
3037
  unassignedChangeCount: repoEntries.reduce(
3005
3038
  (total, entry) => total + entry.overview.unassignedChangeCount,
@@ -3049,6 +3082,7 @@ class ActiveAgentsProvider {
3049
3082
  }),
3050
3083
  ], {
3051
3084
  description: '1',
3085
+ collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
3052
3086
  }),
3053
3087
  ];
3054
3088
 
@@ -3056,6 +3090,7 @@ class ActiveAgentsProvider {
3056
3090
  if (workingNowItems.length > 0) {
3057
3091
  sectionItems.push(new SectionItem('Working now', workingNowItems, {
3058
3092
  description: String(workingNowItems.length),
3093
+ collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
3059
3094
  iconId: 'loading~spin',
3060
3095
  }));
3061
3096
  }
@@ -3096,7 +3131,7 @@ class ActiveAgentsProvider {
3096
3131
  if (advancedItems.length > 0) {
3097
3132
  sectionItems.push(new SectionItem('Advanced details', advancedItems, {
3098
3133
  description: String(advancedItems.length),
3099
- collapsedState: vscode.TreeItemCollapsibleState.Collapsed,
3134
+ collapsedState: vscode.TreeItemCollapsibleState.Expanded,
3100
3135
  iconId: 'list-tree',
3101
3136
  }));
3102
3137
  }
@@ -2,15 +2,15 @@
2
2
  "name": "gitguardex-active-agents",
3
3
  "displayName": "GitGuardex Active Agents",
4
4
  "description": "Shows live Guardex sandbox sessions and repo changes in a dedicated VS Code Active Agents sidebar.",
5
- "publisher": "recodeee",
6
- "version": "0.0.18",
5
+ "publisher": "Recodee",
6
+ "version": "0.0.19",
7
7
  "license": "MIT",
8
8
  "icon": "icon.png",
9
9
  "engines": {
10
10
  "vscode": "^1.88.0"
11
11
  },
12
12
  "categories": [
13
- "Source Control",
13
+ "SCM Providers",
14
14
  "Other"
15
15
  ],
16
16
  "activationEvents": [
@@ -123,7 +123,7 @@
123
123
  "extension/context": [
124
124
  {
125
125
  "command": "gitguardex.activeAgents.restart",
126
- "when": "extension == recodeee.gitguardex-active-agents && extensionStatus == installed",
126
+ "when": "extension == Recodee.gitguardex-active-agents && extensionStatus == installed",
127
127
  "group": "2_configure@2"
128
128
  }
129
129
  ],
@@ -700,17 +700,35 @@ function deriveSessionActivity(session, options = {}) {
700
700
  .filter(Boolean))]
701
701
  .sort((left, right) => left.localeCompare(right));
702
702
 
703
+ const workingLatestFileActivityMs = deriveLatestWorktreeFileActivity(session.worktreePath, {
704
+ now,
705
+ useCache: options.useCache,
706
+ });
707
+ const workingLastFileActivityAt = Number.isFinite(workingLatestFileActivityMs)
708
+ ? new Date(workingLatestFileActivityMs).toISOString()
709
+ : '';
710
+ const workingLastFileActivityLabel = workingLastFileActivityAt
711
+ ? formatElapsedFrom(workingLastFileActivityAt, now)
712
+ : '';
713
+ const workingFileActivityAgeMs = Number.isFinite(workingLatestFileActivityMs)
714
+ ? Math.max(0, now - workingLatestFileActivityMs)
715
+ : null;
716
+ const isFinishedUncommitted = workingFileActivityAgeMs !== null
717
+ && workingFileActivityAgeMs > IDLE_ACTIVITY_WINDOW_MS;
718
+
703
719
  return {
704
- activityKind: 'working',
705
- activityLabel: 'working',
720
+ activityKind: isFinishedUncommitted ? 'finished' : 'working',
721
+ activityLabel: isFinishedUncommitted ? 'finished' : 'working',
706
722
  activityCountLabel: formatFileCount(worktreeChangedPaths.length),
707
- activitySummary: previewChangedPaths(worktreeChangedPaths),
723
+ activitySummary: isFinishedUncommitted && workingLastFileActivityLabel
724
+ ? `${previewChangedPaths(worktreeChangedPaths)} · idle ${workingLastFileActivityLabel}`
725
+ : previewChangedPaths(worktreeChangedPaths),
708
726
  changeCount: worktreeChangedPaths.length,
709
727
  changedPaths,
710
728
  worktreeChangedPaths: worktreeRelativePaths,
711
729
  pidAlive,
712
- lastFileActivityAt: '',
713
- lastFileActivityLabel: '',
730
+ lastFileActivityAt: workingLastFileActivityAt,
731
+ lastFileActivityLabel: workingLastFileActivityLabel,
714
732
  };
715
733
  }
716
734