claudeck 1.4.0 → 1.4.1

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 (37) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
  3. package/plugins/claude-editor/manifest.json +10 -0
  4. package/plugins/linear/manifest.json +10 -0
  5. package/plugins/repos/manifest.json +10 -0
  6. package/public/css/ui/right-panel.css +207 -0
  7. package/public/css/ui/settings.css +75 -0
  8. package/public/index.html +7 -0
  9. package/public/js/components/settings-modal.js +65 -0
  10. package/public/js/core/events.js +11 -0
  11. package/public/js/core/plugin-loader.js +96 -11
  12. package/public/js/core/store.js +11 -0
  13. package/public/js/main.js +1 -0
  14. package/public/js/panels/assistant-bot.js +16 -0
  15. package/public/js/panels/dev-docs.js +2 -2
  16. package/public/js/panels/memory.js +1 -0
  17. package/public/js/ui/context-gauge.js +10 -1
  18. package/public/js/ui/header-dropdowns.js +30 -0
  19. package/public/js/ui/input-meta.js +13 -6
  20. package/public/js/ui/max-turns.js +6 -3
  21. package/public/js/ui/model-selector.js +1 -0
  22. package/public/js/ui/permissions.js +1 -0
  23. package/public/js/ui/tab-sdk.js +395 -176
  24. package/public/style.css +1 -0
  25. package/server/memory-optimizer.js +17 -13
  26. package/server/routes/marketplace.js +316 -0
  27. package/server/ws-handler.js +22 -15
  28. package/server.js +18 -0
  29. package/plugins/event-stream/client.css +0 -207
  30. package/plugins/event-stream/client.js +0 -271
  31. package/plugins/sudoku/client.css +0 -196
  32. package/plugins/sudoku/client.js +0 -329
  33. package/plugins/tasks/client.css +0 -414
  34. package/plugins/tasks/client.js +0 -394
  35. package/plugins/tasks/server.js +0 -116
  36. package/plugins/tic-tac-toe/client.css +0 -167
  37. package/plugins/tic-tac-toe/client.js +0 -241
@@ -109,6 +109,7 @@ function renderMemories() {
109
109
  try {
110
110
  await fetchApi(`/${m.id}`, { method: 'DELETE' });
111
111
  memories = memories.filter(x => x.id !== m.id);
112
+ if ($.memoryTitle) $.memoryTitle.textContent = `Memory (${memories.length})`;
112
113
  renderMemories();
113
114
  loadStats();
114
115
  } catch { /* ignore */ }
@@ -5,11 +5,13 @@ import { $ } from '../core/dom.js';
5
5
  const sbGaugeSep = document.getElementById("sb-gauge-sep");
6
6
 
7
7
  const MODEL_LIMITS = {
8
+ opus: 1_000_000,
8
9
  default: 200_000,
9
10
  };
10
11
 
11
12
  function getLimit() {
12
- return MODEL_LIMITS.default;
13
+ const model = $.modelSelect?.value || '';
14
+ return MODEL_LIMITS[model] || MODEL_LIMITS.default;
13
15
  }
14
16
 
15
17
  function formatTokens(n) {
@@ -73,6 +75,13 @@ export function resetContextGauge() {
73
75
  if (sbGaugeSep) sbGaugeSep.classList.add('hidden');
74
76
  }
75
77
 
78
+ // Re-render gauge when model changes (limit may differ)
79
+ $.modelSelect?.addEventListener('change', () => {
80
+ const tokens = getState('sessionTokens');
81
+ const total = tokens.input + tokens.output + tokens.cacheRead + tokens.cacheCreation;
82
+ if (total > 0) renderGauge(tokens);
83
+ });
84
+
76
85
  export async function loadContextGauge(sessionId) {
77
86
  if (!sessionId) return;
78
87
  try {
@@ -70,3 +70,33 @@ document.addEventListener("keydown", (e) => {
70
70
  document.querySelectorAll(".header-dropdown.open").forEach((d) => d.classList.remove("open"));
71
71
  }
72
72
  });
73
+
74
+ // Sync header dropdown display when hidden selects change programmatically
75
+ function syncDropdownDisplay(selectId) {
76
+ const select = document.getElementById(selectId);
77
+ if (!select) return;
78
+
79
+ function sync() {
80
+ const val = select.value;
81
+ const items = document.querySelectorAll(`.header-submenu-item[data-target="${selectId}"]`);
82
+ let matchedText = null;
83
+ items.forEach((item) => {
84
+ const isMatch = item.dataset.value === val;
85
+ item.classList.toggle("active", isMatch);
86
+ if (isMatch) matchedText = item.textContent.trim();
87
+ });
88
+ if (matchedText) {
89
+ const parent = items[0]?.closest(".header-dropdown-item");
90
+ const display = parent?.querySelector(".header-dropdown-item-value");
91
+ if (display) display.textContent = matchedText;
92
+ }
93
+ }
94
+
95
+ select.addEventListener("change", sync);
96
+ // Initial sync for values restored from localStorage
97
+ sync();
98
+ }
99
+
100
+ syncDropdownDisplay("model-select");
101
+ syncDropdownDisplay("perm-mode-select");
102
+ syncDropdownDisplay("max-turns-select");
@@ -6,16 +6,23 @@ const elPerm = document.getElementById("input-meta-perm");
6
6
  const elTurns = document.getElementById("input-meta-turns");
7
7
 
8
8
  const permLabels = {
9
- bypass: "bypass",
10
- confirmDangerous: "confirm dangerous",
11
- confirmAll: "confirm all",
12
- plan: "plan only",
9
+ bypass: "Bypass",
10
+ confirmDangerous: "Confirm Writes",
11
+ confirmAll: "Confirm All",
12
+ plan: "Plan Mode",
13
+ };
14
+
15
+ const modelLabels = {
16
+ "": "Auto",
17
+ sonnet: "Sonnet",
18
+ opus: "Opus",
19
+ haiku: "Haiku",
13
20
  };
14
21
 
15
22
  function updateModel() {
16
23
  if (!elModel) return;
17
24
  const val = $.modelSelect?.value || "";
18
- elModel.textContent = val || "default model";
25
+ elModel.textContent = modelLabels[val] || val || "Auto";
19
26
  }
20
27
 
21
28
  function updatePerm() {
@@ -27,7 +34,7 @@ function updatePerm() {
27
34
  function updateTurns() {
28
35
  if (!elTurns) return;
29
36
  const val = $.maxTurnsSelect?.value || "30";
30
- elTurns.textContent = val === "0" ? "unlimited turns" : `${val} turns`;
37
+ elTurns.textContent = val === "0" ? "Unlimited" : `${val} turns`;
31
38
  }
32
39
 
33
40
  // Also watch header dropdown display elements (used when dropdowns replace <select>)
@@ -9,13 +9,16 @@ export function getMaxTurns() {
9
9
  }
10
10
 
11
11
  function init() {
12
+ $.maxTurnsSelect?.addEventListener('change', () => {
13
+ localStorage.setItem(STORAGE_KEY, $.maxTurnsSelect.value);
14
+ });
12
15
  const saved = localStorage.getItem(STORAGE_KEY);
13
16
  if (saved && $.maxTurnsSelect) {
14
17
  $.maxTurnsSelect.value = saved;
18
+ queueMicrotask(() => {
19
+ $.maxTurnsSelect?.dispatchEvent(new Event('change', { bubbles: true }));
20
+ });
15
21
  }
16
- $.maxTurnsSelect?.addEventListener('change', () => {
17
- localStorage.setItem(STORAGE_KEY, $.maxTurnsSelect.value);
18
- });
19
22
  }
20
23
 
21
24
  init();
@@ -11,6 +11,7 @@ function init() {
11
11
  const saved = localStorage.getItem(STORAGE_KEY);
12
12
  if (saved && $.modelSelect) {
13
13
  $.modelSelect.value = saved;
14
+ $.modelSelect.dispatchEvent(new Event('change', { bubbles: true }));
14
15
  }
15
16
  $.modelSelect?.addEventListener('change', () => {
16
17
  localStorage.setItem(STORAGE_KEY, $.modelSelect.value);
@@ -153,6 +153,7 @@ function initPermissions() {
153
153
  const saved = localStorage.getItem(STORAGE_KEY);
154
154
  if (saved && $.permModeSelect) {
155
155
  $.permModeSelect.value = saved;
156
+ $.permModeSelect.dispatchEvent(new Event('change', { bubbles: true }));
156
157
  }
157
158
 
158
159
  // Persist mode changes