neohive 6.2.0 → 6.2.2

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 (3) hide show
  1. package/cli.js +4 -0
  2. package/dashboard.html +75 -32
  3. package/package.json +1 -1
package/cli.js CHANGED
@@ -123,9 +123,11 @@ function setupClaude(serverPath, cwd) {
123
123
  }
124
124
  }
125
125
 
126
+ const abDataDir = path.join(path.resolve(cwd), '.neohive').replace(/\\/g, '/');
126
127
  mcpConfig.mcpServers['neohive'] = {
127
128
  command: mcpNodeCommand(),
128
129
  args: [serverPath],
130
+ env: { NEOHIVE_DATA_DIR: abDataDir },
129
131
  timeout: CLI_CONFIG.MCP_TOOL_TIMEOUT_S,
130
132
  };
131
133
 
@@ -155,9 +157,11 @@ function setupGemini(serverPath, cwd) {
155
157
  }
156
158
  }
157
159
 
160
+ const abDataDir = path.join(path.resolve(cwd), '.neohive').replace(/\\/g, '/');
158
161
  settings.mcpServers['neohive'] = {
159
162
  command: mcpNodeCommand(),
160
163
  args: [serverPath],
164
+ env: { NEOHIVE_DATA_DIR: abDataDir },
161
165
  timeout: CLI_CONFIG.MCP_TOOL_TIMEOUT_S,
162
166
  trust: true,
163
167
  };
package/dashboard.html CHANGED
@@ -3257,8 +3257,30 @@
3257
3257
  align-items: center;
3258
3258
  gap: 10px;
3259
3259
  padding: 14px 16px 10px;
3260
+ position: relative;
3260
3261
  }
3261
3262
 
3263
+ .pp-delete-x {
3264
+ position: absolute;
3265
+ top: 8px;
3266
+ right: 8px;
3267
+ width: 22px;
3268
+ height: 22px;
3269
+ border: none;
3270
+ background: transparent;
3271
+ color: var(--red, #ef4444);
3272
+ font-size: 16px;
3273
+ line-height: 1;
3274
+ cursor: pointer;
3275
+ border-radius: 4px;
3276
+ display: flex;
3277
+ align-items: center;
3278
+ justify-content: center;
3279
+ opacity: 0.5;
3280
+ transition: opacity 0.15s, background 0.15s;
3281
+ }
3282
+ .pp-delete-x:hover { opacity: 1; background: var(--red-dim, rgba(239,68,68,0.15)); }
3283
+
3262
3284
  .profile-popup-avatar {
3263
3285
  width: 36px;
3264
3286
  height: 36px;
@@ -4555,6 +4577,7 @@
4555
4577
  </div>
4556
4578
  <div class="profile-popup-id" id="pp-id"></div>
4557
4579
  </div>
4580
+ <button class="pp-delete-x" id="pp-delete-x" onclick="confirmDeleteAgentX()" title="Remove agent">&times;</button>
4558
4581
  </div>
4559
4582
  <!-- Tabs (hidden but kept for JS compat) -->
4560
4583
  <div class="pp-tabs" style="display:none">
@@ -7832,8 +7855,7 @@ function showAgentPopup(agentName) {
7832
7855
 
7833
7856
  document.addEventListener('click', function() {
7834
7857
  document.getElementById('profile-popup').classList.remove('open');
7835
- var delBtn = document.getElementById('pp-delete-btn');
7836
- if (delBtn) { delBtn.textContent = 'Delete Agent'; delBtn._confirming = false; }
7858
+ _resetDeleteBtns();
7837
7859
  });
7838
7860
 
7839
7861
  var _deleteConfirmTimer = null;
@@ -7841,50 +7863,71 @@ function confirmDeleteAgent() {
7841
7863
  var btn = document.getElementById('pp-delete-btn');
7842
7864
  if (!editingAgent) return;
7843
7865
  if (!btn._confirming) {
7844
- // First click: change to confirm state
7845
7866
  btn._confirming = true;
7846
7867
  btn.textContent = 'Confirm Delete';
7847
7868
  btn.style.background = 'var(--red-dim)';
7848
- // Reset after 3s if not confirmed
7849
7869
  _deleteConfirmTimer = setTimeout(function() {
7850
7870
  btn.textContent = 'Delete Agent';
7851
7871
  btn.style.background = '';
7852
7872
  btn._confirming = false;
7853
7873
  }, 3000);
7854
7874
  } else {
7855
- // Second click: actually delete
7856
7875
  if (_deleteConfirmTimer) clearTimeout(_deleteConfirmTimer);
7857
- btn.textContent = 'Deleting...';
7858
- btn.disabled = true;
7859
- var agentName = editingAgent;
7860
- var pq = projectParam();
7861
- lttFetch('/api/agents' + pq, {
7862
- method: 'DELETE',
7863
- headers: { 'Content-Type': 'application/json' },
7864
- body: JSON.stringify({ name: agentName })
7865
- }).then(function(r) { return r.json(); }).then(function(data) {
7866
- if (data.error) {
7867
- showToast('!', 'Delete failed: ' + data.error);
7868
- btn.textContent = 'Delete Agent';
7869
- btn.disabled = false;
7870
- btn._confirming = false;
7871
- } else {
7872
- showToast('&#x2713;', agentName + ' removed');
7873
- document.getElementById('profile-popup').classList.remove('open');
7874
- btn.textContent = 'Delete Agent';
7875
- btn.disabled = false;
7876
- btn._confirming = false;
7877
- poll(); // Refresh agents
7878
- }
7879
- }).catch(function() {
7880
- showToast('!', 'Delete failed');
7881
- btn.textContent = 'Delete Agent';
7882
- btn.disabled = false;
7876
+ _doDeleteAgent(editingAgent, btn);
7877
+ }
7878
+ }
7879
+
7880
+ function confirmDeleteAgentX() {
7881
+ var btn = document.getElementById('pp-delete-x');
7882
+ if (!editingAgent) return;
7883
+ if (!btn._confirming) {
7884
+ btn._confirming = true;
7885
+ btn.innerHTML = '&#x2713;';
7886
+ btn.title = 'Click again to confirm';
7887
+ btn.style.opacity = '1';
7888
+ btn.style.background = 'var(--red-dim, rgba(239,68,68,0.15))';
7889
+ _deleteConfirmTimer = setTimeout(function() {
7890
+ btn.innerHTML = '&times;';
7891
+ btn.title = 'Remove agent';
7892
+ btn.style.opacity = '';
7893
+ btn.style.background = '';
7883
7894
  btn._confirming = false;
7884
- });
7895
+ }, 3000);
7896
+ } else {
7897
+ if (_deleteConfirmTimer) clearTimeout(_deleteConfirmTimer);
7898
+ _doDeleteAgent(editingAgent, btn);
7885
7899
  }
7886
7900
  }
7887
7901
 
7902
+ function _doDeleteAgent(agentName, btn) {
7903
+ btn.disabled = true;
7904
+ var pq = projectParam();
7905
+ lttFetch('/api/agents' + pq, {
7906
+ method: 'DELETE',
7907
+ headers: { 'Content-Type': 'application/json' },
7908
+ body: JSON.stringify({ name: agentName })
7909
+ }).then(function(r) { return r.json(); }).then(function(data) {
7910
+ if (data.error) {
7911
+ showToast('!', 'Delete failed: ' + data.error);
7912
+ } else {
7913
+ showToast('&#x2713;', agentName + ' removed');
7914
+ document.getElementById('profile-popup').classList.remove('open');
7915
+ poll();
7916
+ }
7917
+ _resetDeleteBtns();
7918
+ }).catch(function() {
7919
+ showToast('!', 'Delete failed');
7920
+ _resetDeleteBtns();
7921
+ });
7922
+ }
7923
+
7924
+ function _resetDeleteBtns() {
7925
+ var xBtn = document.getElementById('pp-delete-x');
7926
+ if (xBtn) { xBtn.innerHTML = '&times;'; xBtn.title = 'Remove agent'; xBtn.style.opacity = ''; xBtn.style.background = ''; xBtn._confirming = false; xBtn.disabled = false; }
7927
+ var delBtn = document.getElementById('pp-delete-btn');
7928
+ if (delBtn) { delBtn.textContent = 'Delete Agent'; delBtn.style.background = ''; delBtn._confirming = false; delBtn.disabled = false; }
7929
+ }
7930
+
7888
7931
  // ==================== v3.0: PROFILE EDITOR ====================
7889
7932
 
7890
7933
  var BUILT_IN_AVATARS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neohive",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "description": "The MCP collaboration layer for AI CLI tools. Turn Claude Code, Gemini CLI, and Codex CLI into a team.",
5
5
  "main": "server.js",
6
6
  "bin": {