colana 1.0.0-beta.74 → 1.0.0-beta.76
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 +1 -1
- package/public/app.js +14 -5
package/package.json
CHANGED
package/public/app.js
CHANGED
|
@@ -826,6 +826,13 @@ let _personalAgentAutoStartTimer = null;
|
|
|
826
826
|
async function launchPersonalAgent() {
|
|
827
827
|
// Guard: don't launch if a personal agent session is already running
|
|
828
828
|
if (state.personalAgent.sessionId) return;
|
|
829
|
+
// Guard: no API key configured — silently skip. The header strip already
|
|
830
|
+
// shows "Add API key" with a "Set up" button that opens the panel with an
|
|
831
|
+
// inline key input card. Don't spawn (would hit preflight GATEWAY_AUTH_MISSING)
|
|
832
|
+
// and don't auto-open anything — let the user initiate via the strip/button.
|
|
833
|
+
if (state.personalAgent.installed && !state.personalAgent.chatEnabled) {
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
829
836
|
// Guard: don't launch if another launch call is already in-flight
|
|
830
837
|
if (_personalAgentLaunching) return;
|
|
831
838
|
_personalAgentLaunching = true;
|
|
@@ -870,11 +877,12 @@ async function launchPersonalAgent() {
|
|
|
870
877
|
mode: 'pty',
|
|
871
878
|
}, { repair: err.code === 'BROKEN_INSTALL' });
|
|
872
879
|
} else if (err.code === 'GATEWAY_AUTH_MISSING') {
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
880
|
+
// Safety net — shouldn't normally reach here since the guard above
|
|
881
|
+
// catches missing keys before hitting the server. Open the panel
|
|
882
|
+
// in setup mode so the user can enter a key inline.
|
|
883
|
+
state.personalAgent.status = 'offline';
|
|
884
|
+
renderPersonalStrip();
|
|
885
|
+
openPersonalPanel();
|
|
878
886
|
} else {
|
|
879
887
|
showToast('Failed to start personal agent: ' + (err.message || err), 'error');
|
|
880
888
|
}
|
|
@@ -2130,6 +2138,7 @@ function handleWebSocketMessage(message) {
|
|
|
2130
2138
|
// even if multiple activeSessionsUpdated events arrive in quick succession.
|
|
2131
2139
|
if (localStorage.getItem('colana_personalAutostart') === 'true'
|
|
2132
2140
|
&& state.personalAgent.configured
|
|
2141
|
+
&& state.personalAgent.chatEnabled
|
|
2133
2142
|
&& !state.personalAgent.sessionId) {
|
|
2134
2143
|
if (_personalAgentAutoStartTimer) clearTimeout(_personalAgentAutoStartTimer);
|
|
2135
2144
|
_personalAgentAutoStartTimer = setTimeout(() => {
|