coder-config 0.42.6 → 0.42.8

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.
@@ -19,7 +19,7 @@
19
19
 
20
20
  <!-- PWA Manifest -->
21
21
  <link rel="manifest" href="/manifest.json">
22
- <script type="module" crossorigin src="/assets/index-Bocb6Gsl.js"></script>
22
+ <script type="module" crossorigin src="/assets/index-CokkBE8r.js"></script>
23
23
  <link rel="stylesheet" crossorigin href="/assets/index-X0dVhMey.css">
24
24
  </head>
25
25
  <body>
@@ -618,7 +618,7 @@ async function scanMcpTools(toolsDir) {
618
618
  /**
619
619
  * Get file hashes for change detection
620
620
  */
621
- function getFileHashes(manager, projectDir) {
621
+ function getFileHashes(manager, projectDir, config = {}) {
622
622
  const hashes = {};
623
623
  const crypto = require('crypto');
624
624
 
@@ -659,6 +659,35 @@ function getFileHashes(manager, projectDir) {
659
659
  if (hash) hashes[envPath] = hash;
660
660
  }
661
661
 
662
+ // Hash subprojects list (detect new/removed subprojects)
663
+ try {
664
+ const subprojectDirs = [];
665
+ const entries = fs.readdirSync(projectDir, { withFileTypes: true });
666
+ for (const entry of entries) {
667
+ if (!entry.isDirectory() || entry.name.startsWith('.')) continue;
668
+ const fullPath = path.join(projectDir, entry.name);
669
+ const hasGit = fs.existsSync(path.join(fullPath, '.git'));
670
+ const hasClaude = fs.existsSync(path.join(fullPath, '.claude'));
671
+ if (hasGit) {
672
+ // Include both path and whether it has .claude config
673
+ subprojectDirs.push(`${fullPath}:${hasClaude}`);
674
+ }
675
+ }
676
+ // Also include manual subprojects
677
+ const manualSubprojects = config.manualSubprojects?.[projectDir] || [];
678
+ for (const subDir of manualSubprojects) {
679
+ if (fs.existsSync(subDir)) {
680
+ const hasClaude = fs.existsSync(path.join(subDir, '.claude'));
681
+ subprojectDirs.push(`manual:${subDir}:${hasClaude}`);
682
+ }
683
+ }
684
+ subprojectDirs.sort();
685
+ const subprojectsHash = crypto.createHash('md5').update(subprojectDirs.join('\n')).digest('hex');
686
+ hashes['__subprojects__'] = subprojectsHash;
687
+ } catch (e) {
688
+ // Ignore errors scanning for subprojects
689
+ }
690
+
662
691
  return { hashes };
663
692
  }
664
693
 
package/ui/server.cjs CHANGED
@@ -494,7 +494,7 @@ class ConfigUIServer {
494
494
  break;
495
495
 
496
496
  case '/api/file-hashes':
497
- return this.json(res, routes.fileExplorer.getFileHashes(this.manager, this.projectDir));
497
+ return this.json(res, routes.fileExplorer.getFileHashes(this.manager, this.projectDir, this.config));
498
498
 
499
499
  case '/api/version-check':
500
500
  return this.json(res, await routes.updates.checkForUpdates(this.manager, __dirname));