imcp 0.1.1 → 0.1.3

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 (111) hide show
  1. package/dist/cli/index.js +1 -45
  2. package/dist/core/installers/clients/BaseClientInstaller.d.ts +1 -5
  3. package/dist/core/installers/clients/BaseClientInstaller.js +40 -38
  4. package/dist/core/installers/clients/ClientInstaller.d.ts +9 -9
  5. package/dist/core/installers/clients/ClientInstaller.js +105 -99
  6. package/dist/core/installers/requirements/BaseInstaller.d.ts +9 -1
  7. package/dist/core/installers/requirements/CommandInstaller.d.ts +9 -1
  8. package/dist/core/installers/requirements/CommandInstaller.js +46 -12
  9. package/dist/core/installers/requirements/GeneralInstaller.d.ts +11 -1
  10. package/dist/core/installers/requirements/GeneralInstaller.js +46 -10
  11. package/dist/core/installers/requirements/InstallerFactory.d.ts +3 -1
  12. package/dist/core/installers/requirements/InstallerFactory.js +3 -2
  13. package/dist/core/installers/requirements/NpmInstaller.d.ts +4 -2
  14. package/dist/core/installers/requirements/NpmInstaller.js +38 -22
  15. package/dist/core/installers/requirements/PipInstaller.d.ts +3 -1
  16. package/dist/core/installers/requirements/PipInstaller.js +58 -36
  17. package/dist/core/installers/requirements/RequirementInstaller.d.ts +4 -1
  18. package/dist/core/loaders/InstallOperationManager.d.ts +115 -0
  19. package/dist/core/loaders/InstallOperationManager.js +311 -0
  20. package/dist/core/loaders/SystemSettingsManager.d.ts +54 -0
  21. package/dist/core/loaders/SystemSettingsManager.js +257 -0
  22. package/dist/core/metadatas/recordingConstants.d.ts +44 -0
  23. package/dist/core/metadatas/recordingConstants.js +45 -0
  24. package/dist/core/metadatas/types.d.ts +21 -0
  25. package/dist/core/onboard/InstallOperationManager.d.ts +23 -0
  26. package/dist/core/onboard/InstallOperationManager.js +144 -0
  27. package/dist/core/onboard/OnboardStatusManager.js +2 -1
  28. package/dist/core/validators/StdioServerValidator.js +4 -3
  29. package/dist/services/InstallationService.d.ts +2 -37
  30. package/dist/services/InstallationService.js +45 -313
  31. package/dist/services/MCPManager.d.ts +1 -1
  32. package/dist/services/MCPManager.js +4 -58
  33. package/dist/services/RequirementService.d.ts +85 -12
  34. package/dist/services/RequirementService.js +488 -49
  35. package/dist/services/ServerService.d.ts +0 -6
  36. package/dist/services/ServerService.js +0 -74
  37. package/dist/utils/adoUtils.js +6 -3
  38. package/dist/utils/logger.js +1 -1
  39. package/dist/utils/macroExpressionUtils.js +3 -25
  40. package/dist/utils/osUtils.d.ts +22 -1
  41. package/dist/utils/osUtils.js +92 -1
  42. package/dist/utils/versionUtils.d.ts +20 -1
  43. package/dist/utils/versionUtils.js +51 -4
  44. package/dist/web/public/css/modal.css +292 -1
  45. package/dist/web/public/css/serverDetails.css +14 -1
  46. package/dist/web/public/index.html +122 -20
  47. package/dist/web/public/js/flights/flights.js +1 -0
  48. package/dist/web/public/js/modal/index.js +8 -14
  49. package/dist/web/public/js/modal/installModal.js +3 -4
  50. package/dist/web/public/js/modal/installation.js +122 -137
  51. package/dist/web/public/js/modal/loadingModal.js +155 -25
  52. package/dist/web/public/js/modal/messageQueue.js +45 -101
  53. package/dist/web/public/js/modal/modalSetup.js +125 -43
  54. package/dist/web/public/js/modal/modalUtils.js +0 -12
  55. package/dist/web/public/js/modal.js +23 -10
  56. package/dist/web/public/js/onboard/publishHandler.js +22 -20
  57. package/dist/web/public/js/serverCategoryDetails.js +60 -11
  58. package/dist/web/public/js/serverCategoryList.js +2 -2
  59. package/dist/web/public/js/settings.js +314 -0
  60. package/dist/web/public/settings.html +135 -0
  61. package/dist/web/public/styles.css +32 -0
  62. package/dist/web/server.js +82 -0
  63. package/memory-bank/activeContext.md +13 -1
  64. package/memory-bank/decisionLog.md +63 -0
  65. package/memory-bank/progress.md +30 -0
  66. package/memory-bank/systemPatterns.md +7 -0
  67. package/package.json +1 -1
  68. package/src/cli/index.ts +1 -48
  69. package/src/core/installers/clients/BaseClientInstaller.ts +64 -50
  70. package/src/core/installers/clients/ClientInstaller.ts +130 -130
  71. package/src/core/installers/requirements/BaseInstaller.ts +9 -1
  72. package/src/core/installers/requirements/CommandInstaller.ts +47 -13
  73. package/src/core/installers/requirements/GeneralInstaller.ts +48 -10
  74. package/src/core/installers/requirements/InstallerFactory.ts +4 -3
  75. package/src/core/installers/requirements/NpmInstaller.ts +90 -68
  76. package/src/core/installers/requirements/PipInstaller.ts +81 -55
  77. package/src/core/installers/requirements/RequirementInstaller.ts +4 -3
  78. package/src/core/loaders/InstallOperationManager.ts +367 -0
  79. package/src/core/loaders/SystemSettingsManager.ts +278 -0
  80. package/src/core/metadatas/recordingConstants.ts +62 -0
  81. package/src/core/metadatas/types.ts +23 -0
  82. package/src/core/onboard/OnboardStatusManager.ts +2 -1
  83. package/src/core/validators/StdioServerValidator.ts +4 -3
  84. package/src/services/InstallationService.ts +54 -399
  85. package/src/services/MCPManager.ts +4 -77
  86. package/src/services/RequirementService.ts +564 -67
  87. package/src/services/ServerService.ts +0 -90
  88. package/src/utils/adoUtils.ts +6 -4
  89. package/src/utils/logger.ts +1 -1
  90. package/src/utils/macroExpressionUtils.ts +4 -21
  91. package/src/utils/osUtils.ts +92 -1
  92. package/src/utils/versionUtils.ts +71 -19
  93. package/src/web/public/css/modal.css +292 -1
  94. package/src/web/public/css/serverDetails.css +14 -1
  95. package/src/web/public/index.html +122 -20
  96. package/src/web/public/js/flights/flights.js +1 -1
  97. package/src/web/public/js/modal/index.js +8 -14
  98. package/src/web/public/js/modal/installModal.js +3 -4
  99. package/src/web/public/js/modal/installation.js +122 -137
  100. package/src/web/public/js/modal/loadingModal.js +155 -25
  101. package/src/web/public/js/modal/modalSetup.js +125 -43
  102. package/src/web/public/js/modal/modalUtils.js +0 -12
  103. package/src/web/public/js/modal.js +23 -10
  104. package/src/web/public/js/onboard/publishHandler.js +22 -20
  105. package/src/web/public/js/serverCategoryDetails.js +60 -11
  106. package/src/web/public/js/serverCategoryList.js +5 -5
  107. package/src/web/public/js/settings.js +314 -0
  108. package/src/web/public/settings.html +135 -0
  109. package/src/web/public/styles.css +32 -0
  110. package/src/web/server.ts +85 -0
  111. package/src/web/public/js/modal/messageQueue.js +0 -112
@@ -1,6 +1,66 @@
1
1
  /* Import Inter font */
2
2
  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
3
3
 
4
+ /* --- Custom: Loading Modal Overall Status Sizing --- */
5
+ .installation-status-header {
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ margin-bottom: 2rem;
10
+ }
11
+
12
+ .overall-status-icon {
13
+ width: 80px !important;
14
+ height: 80px !important;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ font-size: 3rem !important;
19
+ margin-bottom: 1rem;
20
+ }
21
+
22
+ .overall-status-icon .status-spinner,
23
+ .overall-status-icon .status-icon-circled,
24
+ .overall-status-icon .status-icon {
25
+ width: 80px !important;
26
+ height: 80px !important;
27
+ font-size: 3rem !important;
28
+ }
29
+
30
+ .overall-status-text {
31
+ font-size: 1.5rem !important; /* Reduced from 2.2rem */
32
+ font-weight: 600; /* Slightly lighter weight */
33
+ color: #2563eb;
34
+ margin: 0;
35
+ text-align: center;
36
+ letter-spacing: 0.01em;
37
+ padding: 0 1rem; /* Added padding for better spacing */
38
+ }
39
+
40
+ .overall-status-icon {
41
+ width: 60px !important; /* Reduced from 80px */
42
+ height: 60px !important;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ font-size: 2.5rem !important; /* Reduced from 3rem */
47
+ margin-bottom: 0.75rem;
48
+ border-radius: 50%;
49
+ background: rgba(37, 99, 235, 0.1);
50
+ padding: 0.5rem;
51
+ }
52
+
53
+ .overall-status-icon .status-spinner,
54
+ .overall-status-icon .status-icon-circled,
55
+ .overall-status-icon .status-icon {
56
+ width: 100% !important;
57
+ height: 100% !important;
58
+ font-size: inherit !important;
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ }
63
+
4
64
  /* Base styles */
5
65
  body {
6
66
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
@@ -31,7 +91,7 @@ body {
31
91
  border: 3px solid #3498db !important;
32
92
  color: #222 !important;
33
93
  min-width: 320px;
34
- min-height: 120px;
94
+ min-height: 320px; /* Increased height for larger modal */
35
95
  opacity: 1 !important;
36
96
  box-shadow: 0 0 16px #3498db;
37
97
  position: relative;
@@ -463,4 +523,235 @@ body {
463
523
  border-radius: 3px;
464
524
  border: 1px solid #e2e8f0;
465
525
  color: #2563eb;
526
+ }
527
+
528
+ /* Step message styling */
529
+ .message-line.step-message {
530
+ display: flex;
531
+ align-items: flex-start; /* Align items to the top for timestamp */
532
+ padding: 1px 0; /* Further reduced padding */
533
+ font-size: 0.75rem; /* Further reduced font size for steps */
534
+ margin-bottom: 2px; /* Further reduced margin */
535
+ line-height: 1.4; /* Adjust line height for compactness */
536
+ }
537
+
538
+ .step-icon {
539
+ margin-right: 6px; /* Reduced margin */
540
+ font-size: 0.8rem; /* Further smaller icon */
541
+ width: 14px; /* Fixed width for alignment */
542
+ text-align: center;
543
+ flex-shrink: 0; /* Prevent icon from shrinking */
544
+ margin-top: 1px; /* Align icon better with first line of text */
545
+ }
546
+
547
+ .step-icon.success-icon {
548
+ color: #10b981; /* Green */
549
+ }
550
+
551
+ .step-icon.error-icon {
552
+ color: #ef4444; /* Red */
553
+ }
554
+
555
+ .step-icon.pending-icon {
556
+ color: #6b7280; /* Gray */
557
+ }
558
+
559
+ .step-text-content {
560
+ flex-grow: 1;
561
+ display: flex;
562
+ flex-direction: column; /* Stack text and timestamp */
563
+ }
564
+
565
+ .step-text {
566
+ /* flex-grow: 1; */ /* Handled by step-text-content */
567
+ }
568
+
569
+ .step-timestamp {
570
+ font-size: 0.65rem; /* Very small for timestamp */
571
+ color: #9ca3af; /* Lighter gray for timestamp */
572
+ margin-left: 0px; /* Align with step text, icon has its own margin */
573
+ padding-top: 1px;
574
+ }
575
+
576
+ /* New Loading Modal Styles */
577
+ .installation-status-header {
578
+ display: flex;
579
+ align-items: center;
580
+ padding-bottom: 1rem;
581
+ margin-bottom: 1rem;
582
+ border-bottom: 1px solid #e5e7eb; /* Light gray border */
583
+ }
584
+
585
+ .overall-status-icon {
586
+ margin-right: 1rem;
587
+ display: flex;
588
+ align-items: center;
589
+ justify-content: center;
590
+ width: 32px; /* Increased size for overall status icon */
591
+ height: 32px;
592
+ }
593
+
594
+ .overall-status-icon .status-icon {
595
+ font-size: 24px; /* Larger icon */
596
+ }
597
+
598
+ .overall-status-icon.completed .icon-check-container {
599
+ display: flex;
600
+ align-items: center;
601
+ justify-content: center;
602
+ width: 28px; /* Slightly larger to accommodate circle + check */
603
+ height: 28px;
604
+ border-radius: 50%;
605
+ background-color: #10b981; /* Green background for circle */
606
+ border: 2px solid #059669; /* Darker green border */
607
+ }
608
+
609
+ .overall-status-icon.completed .icon-check-container .icon-check {
610
+ color: #ffffff; /* White checkmark */
611
+ font-size: 18px; /* Adjust size of checkmark within circle */
612
+ line-height: 1; /* Ensure check is centered */
613
+ }
614
+
615
+ .overall-status-icon.failed .icon-cross {
616
+ color: #ef4444; /* Red */
617
+ }
618
+
619
+ .status-spinner {
620
+ border: 3px solid #f3f3f3; /* Light grey */
621
+ border-top: 3px solid #3498db; /* Blue */
622
+ border-radius: 50%;
623
+ width: 24px;
624
+ height: 24px;
625
+ animation: spin 1s linear infinite;
626
+ }
627
+
628
+ @keyframes spin {
629
+ 0% { transform: rotate(0deg); }
630
+ 100% { transform: rotate(360deg); }
631
+ }
632
+
633
+ .overall-status-text {
634
+ font-size: 1.125rem; /* Equivalent to text-lg in Tailwind */
635
+ font-weight: 600; /* semibold */
636
+ color: #374151; /* gray-700 */
637
+ }
638
+
639
+ .installation-steps-container {
640
+ /* Styles for the container of the steps list */
641
+ }
642
+
643
+ .steps-list-header {
644
+ font-size: 0.875rem; /* text-sm */
645
+ font-weight: 500; /* medium */
646
+ color: #6b7280; /* gray-500 */
647
+ margin-bottom: 0.5rem;
648
+ padding-left: 4px; /* Align with step items */
649
+ }
650
+
651
+ .install-step-details-list {
652
+ list-style: none;
653
+ padding: 0;
654
+ margin: 0;
655
+ max-height: 250px; /* Or any desired height */
656
+ overflow-y: auto;
657
+ scrollbar-width: thin;
658
+ scrollbar-color: #a0aec0 #e2e8f0; /* Adjust colors as needed */
659
+ }
660
+
661
+ .install-step-details-list::-webkit-scrollbar {
662
+ width: 6px;
663
+ }
664
+
665
+ .install-step-details-list::-webkit-scrollbar-track {
666
+ background: #e2e8f0;
667
+ border-radius: 3px;
668
+ }
669
+
670
+ .install-step-details-list::-webkit-scrollbar-thumb {
671
+ background-color: #a0aec0;
672
+ border-radius: 3px;
673
+ }
674
+
675
+
676
+ .step-detail-item {
677
+ display: flex;
678
+ align-items: flex-start; /* Align icon with the top of the text block */
679
+ justify-content: flex-start; /* Explicitly align content to the start (left) */
680
+ padding: 0.3rem 0.25rem; /* Compact padding */
681
+ font-size: 0.8rem; /* text-xs or sm */
682
+ border-bottom: 1px solid #f3f4f6; /* very light separator */
683
+ }
684
+ .step-detail-item:last-child {
685
+ border-bottom: none;
686
+ }
687
+
688
+ .step-detail-item .step-icon { /* Re-using .step-icon from previous attempt, ensure it's general enough */
689
+ margin-right: 0.5rem;
690
+ font-size: 0.85rem;
691
+ width: 16px;
692
+ text-align: center;
693
+ flex-shrink: 0;
694
+ margin-top: 1px; /* Small adjustment for alignment */
695
+ }
696
+
697
+ .step-detail-item.success .icon-check-small {
698
+ color: #10b981;
699
+ }
700
+
701
+ .step-detail-item.error .icon-cross-small {
702
+ color: #ef4444;
703
+ }
704
+
705
+ .step-info {
706
+ flex-grow: 1;
707
+ display: flex;
708
+ flex-direction: column;
709
+ align-items: flex-start; /* Ensure children (name, message) are left-aligned */
710
+ text-align: left; /* Ensure text within step-info defaults to left */
711
+ }
712
+
713
+ .step-name {
714
+ font-weight: 500; /* medium */
715
+ color: #4b5563; /* gray-600 */
716
+ /* text-align: left; */ /* Should be inherited from .step-info or default */
717
+ }
718
+
719
+ .step-message {
720
+ font-size: 0.75rem; /* text-xs */
721
+ color: #6b7280; /* gray-500 */
722
+ word-break: break-word;
723
+ text-align: left; /* Explicitly align the message text to the left */
724
+ width: 100%; /* Ensure it takes full available width if align-items: flex-start on parent isn't enough */
725
+ }
726
+
727
+ .step-detail-item.error .step-message {
728
+ color: #ef4444; /* Red for error messages */
729
+ }
730
+
731
+ .step-detail-item .step-timestamp { /* Re-using .step-timestamp */
732
+ font-size: 0.7rem; /* Slightly larger than before for readability */
733
+ color: #a0aec0; /* gray-400 */
734
+ margin-left: 0.75rem;
735
+ white-space: nowrap;
736
+ flex-shrink: 0;
737
+ padding-top: 1px; /* Align with step-name */
738
+ }
739
+
740
+ /* Close button for the loading modal specifically */
741
+ #installLoadingModal .modal-content .modal-close-btn {
742
+ position: absolute;
743
+ top: 10px;
744
+ right: 15px;
745
+ font-size: 1.8rem;
746
+ font-weight: bold;
747
+ color: #aaa;
748
+ background: none;
749
+ border: none;
750
+ cursor: pointer;
751
+ padding: 0;
752
+ line-height: 1;
753
+ }
754
+
755
+ #installLoadingModal .modal-content .modal-close-btn:hover {
756
+ color: #333;
466
757
  }
@@ -110,10 +110,23 @@
110
110
  padding: 0.5rem 1.5rem;
111
111
  text-align: center;
112
112
  font-weight: 600;
113
- transition: all 0.15s ease;
113
+ transition: none; /* No delay for hover effect */
114
114
  white-space: nowrap;
115
115
  }
116
116
 
117
+ /* Update button (orange) */
118
+ .btn-update {
119
+ background-color: #fb923c; /* orange-400 */
120
+ color: #fff;
121
+ border: none;
122
+ }
123
+ .btn-update:hover, .btn-update:focus {
124
+ background-color: #f97316; /* orange-500 */
125
+ color: #fff;
126
+ border: none;
127
+ box-shadow: 0 0 0 2px #fed7aa;
128
+ }
129
+
117
130
  /* Status badges */
118
131
  .server-item-info .flex-wrap span {
119
132
  display: inline-flex;
@@ -9,7 +9,7 @@
9
9
  <link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
10
10
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
11
11
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet">
12
- <link rel="stylesheet" href="styles.css">
12
+ <link rel="stylesheet" href="styles.css">
13
13
  <link rel="stylesheet" href="css/modal.css">
14
14
  <link rel="stylesheet" href="css/notifications.css">
15
15
  <link rel="stylesheet" href="css/serverDetails.css">
@@ -30,20 +30,22 @@
30
30
  <i class='bx bx-server mr-3 text-blue-600'></i>
31
31
  IMCP Server Manager
32
32
  </a>
33
+ <button id="settingsButton"
34
+ class="text-gray-700 hover:text-blue-600 transition-colors flex items-center ml-3 mt-1">
35
+ <i class='bx bx-cog text-3xl'></i>
36
+ </button>
33
37
  </h1>
34
38
  <div class="lg:w-2/3 flex justify-end items-center gap-4">
35
39
  <div class="relative w-48 focus-within:w-96 transition-all duration-300 ease-in-out">
36
- <input type="text" id="searchBox"
37
- placeholder="Search..."
38
- data-expanded-placeholder="Search servers or tools..."
39
- class="w-full px-10 py-2.5 bg-gray-50 border border-gray-200 rounded-lg
40
+ <input type="text" id="searchBox" placeholder="Search..."
41
+ data-expanded-placeholder="Search servers or tools..." class="w-full px-10 py-2.5 bg-gray-50 border border-gray-200 rounded-lg
40
42
  text-gray-700 placeholder-gray-400
41
43
  focus:border-blue-400 focus:ring-2 focus:ring-blue-100
42
44
  transition-all duration-300 ease-in-out">
43
45
  <i class='bx bx-search absolute left-3.5 top-1/2 transform -translate-y-1/2 text-gray-400'></i>
44
46
  </div>
45
47
  <button id="onboardButton" style="display: none;"
46
- class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center">
48
+ class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center">
47
49
  <i class='bx bx-plus-circle mr-2'></i>
48
50
  Onboard
49
51
  </button>
@@ -173,7 +175,7 @@
173
175
  import { fetchServerCategories, handleInstallServer, uninstallTool } from './js/api.js';
174
176
  import { setupSearch } from './js/serverCategoryList.js';
175
177
  import { showServerDetails } from './js/serverCategoryDetails.js';
176
- import { showInstallModal, closeModal, setupModalOutsideClick } from './js/modal.js';
178
+ import { showInstallModal, closeModal } from './js/modal.js';
177
179
  // import { showOnboardModal as navigateToOnboard } from './js/onboard/index.js'; // We are directly navigating
178
180
  import flights, { getFlightQueryParameters, buildUrlWithFlights } from './js/flights/flights.js';
179
181
 
@@ -181,8 +183,8 @@
181
183
  window.showServerDetails = showServerDetails;
182
184
  window.showInstallModal = showInstallModal;
183
185
  // window.showOnboardModal = showOnboardModal; // This might conflict if showOnboardModal is also in onboard/index.js
184
- // We'll rely on the event listener above for the main page's onboard button.
185
- // If other parts of the app call window.showOnboardModal, they'll need updating too.
186
+ // We'll rely on the event listener above for the main page's onboard button.
187
+ // If other parts of the app call window.showOnboardModal, they'll need updating too.
186
188
  window.closeModal = closeModal;
187
189
  window.handleInstallServer = handleInstallServer;
188
190
  window.uninstallTool = uninstallTool;
@@ -190,23 +192,20 @@
190
192
  // Initialize
191
193
  document.addEventListener('DOMContentLoaded', async () => {
192
194
  setupSearch();
193
- setupModalOutsideClick();
194
-
195
195
  const onboardButton = document.getElementById('onboardButton');
196
196
  if (flights.enableOnboard) {
197
197
  onboardButton.style.display = 'flex'; // Make it visible
198
198
  onboardButton.addEventListener('click', () => {
199
- // The original showOnboardModal in onboard/index.js likely does window.location.href = 'onboard.html';
200
- // We need to preserve existing flight parameters.
201
199
  const flightQueryString = getFlightQueryParameters();
202
- // Assuming navigateToOnboard from onboard/index.js handles the actual navigation
203
- // If it directly sets window.location.href, we might need to adjust how it's called or modify it.
204
- // For now, let's assume we can adapt its usage or it's a simple navigation.
205
- // The simplest way if showOnboardModal in onboard/index.js is just `window.location.href = 'onboard.html'`
206
- // would be to directly navigate here.
207
200
  window.location.href = buildUrlWithFlights('onboard.html');
208
201
  });
209
202
  }
203
+
204
+ const settingsButton = document.getElementById('settingsButton');
205
+ settingsButton.addEventListener('click', () => {
206
+ window.location.href = buildUrlWithFlights('settings.html');
207
+ });
208
+
210
209
  // No 'else' block needed as it's hidden by default via inline style
211
210
 
212
211
  try {
@@ -233,8 +232,6 @@
233
232
  window.location.href = buildUrlWithFlights('index.html', { category: allServerCategoriesData[0].name });
234
233
  return; // Stop further execution, page will reload
235
234
  } else {
236
- // No categories at all, or data still loading. Default placeholder will be shown.
237
- // Or, if allServerCategoriesData is empty after fetch, the placeholder from HTML remains.
238
235
  }
239
236
 
240
237
  } catch (error) {
@@ -249,9 +246,114 @@
249
246
  serverCategoryListDiv.innerHTML = `<p class="text-red-500">Could not load categories.</p>`;
250
247
  }
251
248
  }
249
+
250
+ // Fetch and display application version
251
+ try {
252
+ const versionResponse = await fetch('/api/version');
253
+ const appVersionSpan = document.getElementById('appVersion');
254
+ const versionInfoContainer = document.getElementById('versionInfoContainer');
255
+ const versionIcon = versionInfoContainer.querySelector('i');
256
+
257
+ // Create tooltip element
258
+ const tooltip = document.createElement('div');
259
+ tooltip.className = 'version-tooltip';
260
+ versionInfoContainer.appendChild(tooltip);
261
+
262
+ let tooltipMessage = "Loading version information...";
263
+ let isUpdateAvailable = false;
264
+
265
+ if (versionResponse.ok) {
266
+ const versionData = await versionResponse.json();
267
+ if (versionData.success && versionData.data) {
268
+ const currentVersion = versionData.data.version || 'N/A';
269
+ appVersionSpan.textContent = currentVersion;
270
+
271
+ if (versionData.data.availableUpdate) {
272
+ isUpdateAvailable = true;
273
+ tooltipMessage = versionData.data.availableUpdate.message;
274
+ } else {
275
+ tooltipMessage = "You're already up to date!";
276
+ }
277
+ } else {
278
+ appVersionSpan.textContent = 'N/A';
279
+ tooltipMessage = "Could not retrieve version information.";
280
+ }
281
+ } else {
282
+ console.error('Failed to fetch version:', versionResponse.status);
283
+ appVersionSpan.textContent = 'N/A';
284
+ tooltipMessage = "Failed to fetch version information.";
285
+ }
286
+
287
+ tooltip.textContent = tooltipMessage;
288
+
289
+ if (isUpdateAvailable) {
290
+ versionInfoContainer.classList.add('text-orange-500');
291
+ versionIcon.classList.add('text-orange-500');
292
+ appVersionSpan.classList.add('text-orange-500');
293
+ }
294
+
295
+ versionInfoContainer.addEventListener('mouseenter', () => {
296
+ tooltip.classList.add('visible');
297
+ });
298
+
299
+ versionInfoContainer.addEventListener('mouseleave', () => {
300
+ // Only hide if the mouse isn't over the tooltip itself
301
+ setTimeout(() => { // Add a small delay to allow moving to the tooltip
302
+ if (!tooltip.matches(':hover')) {
303
+ tooltip.classList.remove('visible');
304
+ }
305
+ }, 100);
306
+ });
307
+
308
+ tooltip.addEventListener('mouseleave', () => {
309
+ tooltip.classList.remove('visible');
310
+ });
311
+
312
+ // Keep tooltip visible if clicked, and allow clicking outside to close
313
+ versionInfoContainer.addEventListener('click', (event) => {
314
+ event.stopPropagation();
315
+ tooltip.classList.add('visible'); // Ensure it's visible on click
316
+ });
317
+
318
+ document.addEventListener('click', (event) => {
319
+ if (!versionInfoContainer.contains(event.target) && !tooltip.contains(event.target)) {
320
+ tooltip.classList.remove('visible');
321
+ }
322
+ });
323
+
324
+
325
+ } catch (error) {
326
+ console.error('Error fetching version:', error);
327
+ const appVersionSpan = document.getElementById('appVersion');
328
+ if (appVersionSpan) {
329
+ appVersionSpan.textContent = 'N/A';
330
+ const versionInfoContainer = document.getElementById('versionInfoContainer');
331
+ const tooltip = versionInfoContainer.querySelector('.version-tooltip');
332
+ if (tooltip) {
333
+ tooltip.textContent = "Error fetching version information.";
334
+ }
335
+ }
336
+ }
252
337
  });
253
338
  </script>
254
339
  <script src="js/modal.js" type="module"></script>
340
+
341
+ <footer class="text-sm text-gray-600 py-6 mt-10 border-t border-gray-200">
342
+ <div class="container mx-auto px-4">
343
+ <div class="flex flex-col sm:flex-row justify-start items-start sm:items-center space-y-2 sm:space-y-0 sm:space-x-6 px-6">
344
+ <a href="https://github.com/ai-microsoft/imcp" target="_blank" rel="noopener noreferrer"
345
+ class="flex items-center text-blue-600 hover:text-blue-700 hover:underline transition-colors"
346
+ title="Welcome for any feedback.">
347
+ <i class='bx bxl-github mr-1.5'></i> GitHub
348
+ </a>
349
+ <span class="hidden sm:inline text-gray-300">|</span>
350
+ <span id="versionInfoContainer" class="version-info-container flex items-center text-gray-700">
351
+ <i class='bx bx-info-circle mr-1.5 text-gray-500'></i>
352
+ Version: <span id="appVersion" class="ml-1 font-medium">Loading...</span>
353
+ </span>
354
+ </div>
355
+ </div>
356
+ </footer>
255
357
  </body>
256
358
 
257
359
  </html>
@@ -4,7 +4,7 @@ const FLIGHT_STORAGE_KEY = 'activeFlightSettings';
4
4
 
5
5
  // Default flight settings
6
6
  const defaultFlights = {
7
- enableOnboard: false, // Default: Onboarding is enabled. Set to false to disable.
7
+ enableOnboard: true, // Default: Onboarding is enabled. Set to false to disable.
8
8
  // Add other default flights here, e.g., newFeatureX: false,
9
9
  };
10
10
 
@@ -1,8 +1,8 @@
1
1
  // Import all modal-related functionality
2
2
  import { compareVersions } from './versionUtils.js';
3
- import { delayedAppendInstallLoadingMessage } from './messageQueue.js';
4
- import { showInstallLoadingModal, appendInstallLoadingMessage, hideInstallLoadingModal } from './loadingModal.js';
5
- import { closeModal, setupModalOutsideClick } from './modalUtils.js';
3
+ // import { delayedAppendInstallLoadingMessage } from './messageQueue.js'; // Removed
4
+ import { showInstallLoadingModal, hideInstallLoadingModal, updateOverallInstallStatus, addInstallationStep } from './loadingModal.js'; // Removed appendInstallLoadingMessage, added new fns
5
+ import { closeModal } from './modalUtils.js';
6
6
  import { handleBulkClientInstall, uninstallTools } from './installation.js';
7
7
  import { showInstallModal } from './installModal.js';
8
8
  import {
@@ -18,18 +18,17 @@ export {
18
18
  // Version utilities
19
19
  compareVersions,
20
20
 
21
- // Message queue
22
- delayedAppendInstallLoadingMessage,
21
+ // Message queue - (delayedAppendInstallLoadingMessage removed)
23
22
 
24
23
  // Loading modal
25
24
  showInstallLoadingModal,
26
- appendInstallLoadingMessage,
25
+ // appendInstallLoadingMessage, // Removed
27
26
  hideInstallLoadingModal,
27
+ updateOverallInstallStatus, // Added
28
+ addInstallationStep, // Added
28
29
 
29
30
  // Modal utilities
30
31
  closeModal,
31
- setupModalOutsideClick,
32
-
33
32
  // Installation
34
33
  handleBulkClientInstall,
35
34
  uninstallTools,
@@ -45,14 +44,9 @@ export {
45
44
  setupFormSubmitHandler
46
45
  };
47
46
 
48
- // Initialize modal functionality
49
- document.addEventListener('DOMContentLoaded', () => {
50
- setupModalOutsideClick();
51
- });
52
-
53
47
  // Make certain functions available globally
54
48
  window.showInstallModal = showInstallModal;
55
49
  window.showInstallLoadingModal = showInstallLoadingModal;
56
- window.appendInstallLoadingMessage = appendInstallLoadingMessage;
50
+ // window.appendInstallLoadingMessage = appendInstallLoadingMessage; // Removed
57
51
  window.hideInstallLoadingModal = hideInstallLoadingModal;
58
52
  window.uninstallTools = uninstallTools;
@@ -1,8 +1,8 @@
1
1
  import { showToast, showConfirm } from '../notifications.js';
2
2
  import { compareVersions } from './versionUtils.js';
3
- import { delayedAppendInstallLoadingMessage } from './messageQueue.js';
3
+ // import { delayedAppendInstallLoadingMessage } from './messageQueue.js'; // No longer needed here
4
4
  import { showInstallLoadingModal } from './loadingModal.js';
5
- import { setupModalOutsideClick, closeModal, setupToggleStyles } from './modalUtils.js';
5
+ import { closeModal, setupToggleStyles } from './modalUtils.js';
6
6
  import { handleBulkClientInstall, uninstallTools } from './installation.js';
7
7
  import {
8
8
  setupClientItems,
@@ -14,7 +14,6 @@ import {
14
14
 
15
15
  // Initialize modal functionality when DOM is loaded
16
16
  document.addEventListener('DOMContentLoaded', () => {
17
- setupModalOutsideClick();
18
17
  setupToggleStyles();
19
18
  });
20
19
 
@@ -137,7 +136,7 @@ async function setupModalContent(
137
136
  setupEnvironmentVariables(mcpServer, envInputsDiv, targetData);
138
137
 
139
138
  // Handle installation arguments section
140
- setupInstallationArguments(mcpServer.installation, modalArguments, mcpServer);
139
+ setupInstallationArguments(mcpServer.installation, modalArguments, categoryName, mcpServer);
141
140
 
142
141
  // Handle server requirements section
143
142
  setupServerRequirements(mcpServer, serverData, categoryName, serverName, modalRequirements);