colana 1.0.0-beta.44 → 1.0.0-beta.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colana",
3
- "version": "1.0.0-beta.44",
3
+ "version": "1.0.0-beta.46",
4
4
  "description": "Agent-First. Multiplied. Multi-agent command center for AI coding agents.",
5
5
  "type": "module",
6
6
  "main": "server/index.js",
package/public/app.js CHANGED
@@ -1514,7 +1514,7 @@ async function sendPersonalChatMessage() {
1514
1514
  assistantBubble.className = 'chat-bubble error';
1515
1515
 
1516
1516
  const isAuthError = err.code === 'GATEWAY_AUTH_FAILED' || err.code === 'GATEWAY_AUTH_MISSING';
1517
- const isTokenError = err.code === 'GATEWAY_TOKEN_MISSING' || err.code === 'GATEWAY_TOKEN_STALE';
1517
+ const isTokenError = err.code === 'GATEWAY_TOKEN_STALE';
1518
1518
 
1519
1519
  if (isAuthError) {
1520
1520
  // Provider API key error: show "Add API Key" button
@@ -1555,12 +1555,24 @@ async function sendPersonalChatMessage() {
1555
1555
  restartBtn.disabled = true;
1556
1556
  restartBtn.textContent = 'Restarting...';
1557
1557
  try {
1558
- await fetch('/api/personal-agent/restart-gateway', {
1558
+ const res = await fetch('/api/personal-agent/restart-gateway', {
1559
1559
  method: 'POST',
1560
1560
  headers: getAuthHeaders(),
1561
1561
  });
1562
- restartBtn.textContent = 'Restarted — try again';
1563
- showToast('Gateway restarted. Try sending your message again.', 'success');
1562
+ if (!res.ok) throw new Error('Restart failed');
1563
+ restartBtn.textContent = 'Restarted retrying...';
1564
+ // Auto-retry: find the last user message and resend
1565
+ const pa = state.personalAgent;
1566
+ const lastUserMsg = [...pa.chatMessages].reverse().find(m => m.role === 'user');
1567
+ if (lastUserMsg) {
1568
+ // Set the input to the last message and trigger send
1569
+ const textarea = document.getElementById('personal-panel-input');
1570
+ if (textarea) textarea.value = lastUserMsg.content;
1571
+ // Small delay so gateway has time to fully initialize
1572
+ setTimeout(() => sendPersonalChatMessage(), 1500);
1573
+ } else {
1574
+ showToast('Gateway restarted. Try sending your message again.', 'success');
1575
+ }
1564
1576
  } catch {
1565
1577
  restartBtn.textContent = 'Restart Failed';
1566
1578
  showToast('Gateway restart failed. Open Settings to troubleshoot.', 'error');
@@ -96,18 +96,13 @@ export function registerPersonalAgentRoutes(app, { sensitiveLimiter }) {
96
96
  'x-openclaw-agent-id': 'main',
97
97
  };
98
98
 
99
+ // Attach gateway auth token if configured.
100
+ // OpenClaw on some platforms (notably Windows) sets gateway.auth: false,
101
+ // meaning the gateway runs without token auth. In that case, skip the
102
+ // Authorization header entirely — the gateway accepts unauthenticated requests.
99
103
  const authToken = getOpenClawAuthToken();
100
104
  if (authToken) {
101
105
  headers['Authorization'] = `Bearer ${authToken}`;
102
- } else {
103
- // Gateway auth token not found — the gateway will reject with 401.
104
- // Log config state for diagnosis on fresh installs.
105
- const cfg = getOpenClawConfig();
106
- const hasConfig = !!cfg;
107
- const hasGateway = !!cfg?.gateway;
108
- const hasAuth = !!cfg?.gateway?.auth;
109
- const authMode = cfg?.gateway?.auth?.mode || 'none';
110
- console.warn(`[personal-agent] No gateway auth token found — config:${hasConfig} gateway:${hasGateway} auth:${hasAuth} mode:${authMode}`);
111
106
  }
112
107
 
113
108
  // 60-second timeout