vibespot 1.3.0 → 1.5.0

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.
package/ui/index.html CHANGED
@@ -909,28 +909,8 @@
909
909
  </div>
910
910
  </section>
911
911
 
912
- <!-- ================ SETTINGS TAB (formerly modal overlay) ================ -->
912
+ <!-- ================ SETTINGS (now uses global overlay) ================ -->
913
913
  <section class="workspace-panel workspace-panel--settings" id="ws-panel-settings" data-ws-panel="settings" role="tabpanel" aria-labelledby="ws-tab-settings">
914
- <div class="dashboard__container">
915
-
916
- <header class="settings__header">
917
- <h2 class="settings__title">Settings</h2>
918
- </header>
919
- <nav class="settings__tabs" id="settings-tabs" role="tablist" aria-label="Settings categories">
920
- <button class="settings__tab active" data-tab="ai" type="button" role="tab" aria-selected="true">AI</button>
921
- <button class="settings__tab" data-tab="hubspot" type="button" role="tab" aria-selected="false">HubSpot</button>
922
- <button class="settings__tab" data-tab="figma" type="button" role="tab" aria-selected="false">Figma</button>
923
- <button class="settings__tab" data-tab="github" type="button" role="tab" aria-selected="false">GitHub</button>
924
- <button class="settings__tab" data-tab="vibespot" type="button" role="tab" aria-selected="false">vibeSpot</button>
925
- </nav>
926
- <div class="settings__body" id="settings-body" role="tabpanel">
927
- <div class="settings__loading">
928
- <div class="settings__spinner-lg" aria-hidden="true"></div>
929
- <span>Loading environment...</span>
930
- </div>
931
- </div>
932
-
933
- </div>
934
914
  </section>
935
915
 
936
916
  </div><!-- /.dashboard__body -->
@@ -981,6 +961,31 @@
981
961
 
982
962
  </div><!-- /.app-body -->
983
963
 
964
+ <!-- ============================================================ -->
965
+ <!-- SETTINGS OVERLAY — global modal, works from any screen -->
966
+ <!-- ============================================================ -->
967
+ <div class="settings-overlay hidden" id="settings-overlay">
968
+ <div class="settings-panel">
969
+ <header class="settings__header">
970
+ <h2 class="settings__title">Settings</h2>
971
+ <button class="settings__close" id="settings-close" type="button" aria-label="Close settings">&times;</button>
972
+ </header>
973
+ <nav class="settings__tabs" id="settings-tabs" role="tablist" aria-label="Settings categories">
974
+ <button class="settings__tab active" data-tab="ai" type="button" role="tab" aria-selected="true">AI</button>
975
+ <button class="settings__tab" data-tab="hubspot" type="button" role="tab" aria-selected="false">HubSpot</button>
976
+ <button class="settings__tab" data-tab="figma" type="button" role="tab" aria-selected="false">Figma</button>
977
+ <button class="settings__tab" data-tab="github" type="button" role="tab" aria-selected="false">GitHub</button>
978
+ <button class="settings__tab" data-tab="vibespot" type="button" role="tab" aria-selected="false">vibeSpot</button>
979
+ </nav>
980
+ <div class="settings__body" id="settings-body" role="tabpanel">
981
+ <div class="settings__loading">
982
+ <div class="settings__spinner-lg" aria-hidden="true"></div>
983
+ <span>Loading environment...</span>
984
+ </div>
985
+ </div>
986
+ </div>
987
+ </div>
988
+
984
989
  <script src="/vendor/marked.umd.js"></script>
985
990
  <script src="/vendor/codemirror-bundle.global.js"></script>
986
991
  <script src="/icons.js"></script>
package/ui/settings.js CHANGED
@@ -18,14 +18,13 @@ const ENGINE_LABELS = {
18
18
  "gemini-cli": "Gemini CLI",
19
19
  "gemini-api": "Gemini API",
20
20
  "codex-cli": "OpenAI Codex",
21
+ "langdock-api": "Langdock",
21
22
  };
22
23
 
23
24
  // ---------------------------------------------------------------------------
24
25
  // Open / Close
25
26
  // ---------------------------------------------------------------------------
26
27
 
27
- let _prevWorkspaceTab = "pages";
28
-
29
28
  function openSettings(tab) {
30
29
  if (typeof closeMenu === "function") closeMenu();
31
30
  if (tab) {
@@ -34,23 +33,13 @@ function openSettings(tab) {
34
33
  tabs.forEach((t) => t.classList.toggle("active", t.dataset.tab === tab));
35
34
  }
36
35
  const overlay = document.getElementById("settings-overlay");
37
- if (overlay) {
38
- overlay.classList.remove("hidden");
39
- } else if (typeof switchWorkspaceTab === "function") {
40
- const activeWs = document.querySelector(".workspace-tab.active");
41
- if (activeWs && activeWs.dataset.wsTab !== "settings") _prevWorkspaceTab = activeWs.dataset.wsTab;
42
- switchWorkspaceTab("settings");
43
- }
36
+ if (overlay) overlay.classList.remove("hidden");
44
37
  refreshSettings();
45
38
  }
46
39
 
47
40
  function closeSettings() {
48
41
  const overlay = document.getElementById("settings-overlay");
49
- if (overlay) {
50
- overlay.classList.add("hidden");
51
- } else if (typeof switchWorkspaceTab === "function") {
52
- switchWorkspaceTab(_prevWorkspaceTab || "pages");
53
- }
42
+ if (overlay) overlay.classList.add("hidden");
54
43
  Object.keys(activePolls).forEach((id) => {
55
44
  clearInterval(activePolls[id]);
56
45
  delete activePolls[id];
@@ -153,6 +142,7 @@ function renderAITab(body, data) {
153
142
  { id: "gemini-cli", label: "Gemini CLI" },
154
143
  { id: "gemini-api", label: "Gemini API" },
155
144
  { id: "codex-cli", label: "Codex CLI" },
145
+ { id: "langdock-api", label: "Langdock" },
156
146
  ];
157
147
 
158
148
  for (const eng of allEngines) {
@@ -271,6 +261,7 @@ function renderAITab(body, data) {
271
261
  { key: "anthropic", name: "Anthropic", placeholder: "sk-ant-api03-..." },
272
262
  { key: "openai", name: "OpenAI", placeholder: "sk-..." },
273
263
  { key: "gemini", name: "Google AI", placeholder: "AIza..." },
264
+ { key: "langdock", name: "Langdock", placeholder: "ld-..." },
274
265
  ];
275
266
 
276
267
  for (const prov of providers) {
@@ -1482,6 +1473,14 @@ function getModelsForEngine(engine) {
1482
1473
  { id: "gpt-5.4-nano", label: "GPT-5.4 Nano" },
1483
1474
  { id: "codex-mini-latest", label: "Codex Mini (latest)" },
1484
1475
  ];
1476
+ case "langdock-api":
1477
+ return [
1478
+ { id: "claude-sonnet-4-6", label: "Claude Sonnet 4.6 (default)" },
1479
+ { id: "claude-opus-4-7", label: "Claude Opus 4.7" },
1480
+ { id: "claude-opus-4-6", label: "Claude Opus 4.6" },
1481
+ { id: "claude-sonnet-4-5", label: "Claude Sonnet 4.5" },
1482
+ { id: "claude-haiku-4-5-20251001", label: "Claude Haiku 4.5" },
1483
+ ];
1485
1484
  default:
1486
1485
  return [];
1487
1486
  }
@@ -1496,6 +1495,7 @@ function getCurrentModel(engine, config) {
1496
1495
  case "codex-cli": return config.codexCliModel || "gpt-5.5";
1497
1496
  case "gemini-cli": return config.geminiCliModel || "gemini-2.5-pro";
1498
1497
  case "gemini-api": return config.geminiApiModel || "gemini-2.5-pro";
1498
+ case "langdock-api": return config.langdockApiModel || "claude-sonnet-4-6";
1499
1499
  default: return null;
1500
1500
  }
1501
1501
  }
@@ -1558,9 +1558,15 @@ function escSettings(str) {
1558
1558
 
1559
1559
  document.getElementById("btn-setup-settings")?.addEventListener("click", () => openSettings());
1560
1560
 
1561
+ document.getElementById("settings-close")?.addEventListener("click", () => closeSettings());
1562
+
1563
+ document.getElementById("settings-overlay")?.addEventListener("click", (e) => {
1564
+ if (e.target.id === "settings-overlay") closeSettings();
1565
+ });
1566
+
1561
1567
  document.addEventListener("keydown", (e) => {
1562
- const settingsTabActive = document.querySelector('.workspace-tab[data-ws-tab="settings"].active');
1563
- if (e.key === "Escape" && settingsTabActive) {
1568
+ const overlay = document.getElementById("settings-overlay");
1569
+ if (e.key === "Escape" && overlay && !overlay.classList.contains("hidden")) {
1564
1570
  closeSettings();
1565
1571
  }
1566
1572
  });