@agent-link/server 0.1.38 → 0.1.40
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/web/app.js +3 -3
- package/web/modules/connection.js +5 -0
- package/web/modules/sidebar.js +13 -3
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -124,7 +124,7 @@ const App = {
|
|
|
124
124
|
|
|
125
125
|
const sidebar = createSidebar({
|
|
126
126
|
wsSend: (msg) => _wsSend(msg),
|
|
127
|
-
messages, isProcessing, sidebarOpen,
|
|
127
|
+
messages, isProcessing, isCompacting, sidebarOpen,
|
|
128
128
|
historySessions, currentClaudeSessionId, needsResume,
|
|
129
129
|
loadingSessions, loadingHistory, workDir, visibleLimit,
|
|
130
130
|
folderPickerOpen, folderPickerPath, folderPickerEntries,
|
|
@@ -316,7 +316,7 @@ const App = {
|
|
|
316
316
|
</div>
|
|
317
317
|
<div class="sidebar-workdir-header">
|
|
318
318
|
<div class="sidebar-workdir-label">Working Directory</div>
|
|
319
|
-
<button class="sidebar-change-dir-btn" @click="openFolderPicker" title="Change working directory"
|
|
319
|
+
<button class="sidebar-change-dir-btn" @click="openFolderPicker" title="Change working directory">
|
|
320
320
|
<svg viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>
|
|
321
321
|
</button>
|
|
322
322
|
</div>
|
|
@@ -332,7 +332,7 @@ const App = {
|
|
|
332
332
|
</button>
|
|
333
333
|
</div>
|
|
334
334
|
|
|
335
|
-
<button class="new-conversation-btn" @click="newConversation"
|
|
335
|
+
<button class="new-conversation-btn" @click="newConversation">
|
|
336
336
|
<svg viewBox="0 0 24 24" width="14" height="14"><path fill="currentColor" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
|
337
337
|
New conversation
|
|
338
338
|
</button>
|
|
@@ -298,6 +298,8 @@ export function createConnection(deps) {
|
|
|
298
298
|
content: textAcc, timestamp: new Date(),
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
+
// Finalize so subsequent real-time messages create fresh streaming entries
|
|
302
|
+
finalizeStreamingMsg(scheduleHighlight);
|
|
301
303
|
scrollToBottom();
|
|
302
304
|
} else if (msg.type === 'sessions_list') {
|
|
303
305
|
historySessions.value = msg.sessions || [];
|
|
@@ -382,6 +384,9 @@ export function createConnection(deps) {
|
|
|
382
384
|
const wasConnected = status.value === 'Connected' || status.value === 'Connecting...';
|
|
383
385
|
isProcessing.value = false;
|
|
384
386
|
isCompacting.value = false;
|
|
387
|
+
// Finalize any in-flight streaming message so reconnect starts clean
|
|
388
|
+
streaming.flushReveal();
|
|
389
|
+
finalizeStreamingMsg(scheduleHighlight);
|
|
385
390
|
|
|
386
391
|
if (wasConnected || reconnectAttempts > 0) {
|
|
387
392
|
scheduleReconnect(scheduleHighlight);
|
package/web/modules/sidebar.js
CHANGED
|
@@ -7,6 +7,7 @@ const { computed } = Vue;
|
|
|
7
7
|
* @param {Function} deps.wsSend
|
|
8
8
|
* @param {import('vue').Ref} deps.messages
|
|
9
9
|
* @param {import('vue').Ref} deps.isProcessing
|
|
10
|
+
* @param {import('vue').Ref} deps.isCompacting
|
|
10
11
|
* @param {import('vue').Ref} deps.sidebarOpen
|
|
11
12
|
* @param {import('vue').Ref} deps.historySessions
|
|
12
13
|
* @param {import('vue').Ref} deps.currentClaudeSessionId
|
|
@@ -24,7 +25,7 @@ const { computed } = Vue;
|
|
|
24
25
|
*/
|
|
25
26
|
export function createSidebar(deps) {
|
|
26
27
|
const {
|
|
27
|
-
wsSend, messages, isProcessing, sidebarOpen,
|
|
28
|
+
wsSend, messages, isProcessing, isCompacting, sidebarOpen,
|
|
28
29
|
historySessions, currentClaudeSessionId, needsResume,
|
|
29
30
|
loadingSessions, loadingHistory, workDir, visibleLimit,
|
|
30
31
|
folderPickerOpen, folderPickerPath, folderPickerEntries,
|
|
@@ -39,7 +40,12 @@ export function createSidebar(deps) {
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
function resumeSession(session) {
|
|
42
|
-
if (
|
|
43
|
+
if (session.sessionId === currentClaudeSessionId.value) return;
|
|
44
|
+
if (isProcessing.value || isCompacting.value) {
|
|
45
|
+
wsSend({ type: 'cancel_execution' });
|
|
46
|
+
isProcessing.value = false;
|
|
47
|
+
isCompacting.value = false;
|
|
48
|
+
}
|
|
43
49
|
if (window.innerWidth <= 768) sidebarOpen.value = false;
|
|
44
50
|
messages.value = [];
|
|
45
51
|
visibleLimit.value = 50;
|
|
@@ -58,7 +64,11 @@ export function createSidebar(deps) {
|
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
function newConversation() {
|
|
61
|
-
if (isProcessing.value)
|
|
67
|
+
if (isProcessing.value || isCompacting.value) {
|
|
68
|
+
wsSend({ type: 'cancel_execution' });
|
|
69
|
+
isProcessing.value = false;
|
|
70
|
+
isCompacting.value = false;
|
|
71
|
+
}
|
|
62
72
|
if (window.innerWidth <= 768) sidebarOpen.value = false;
|
|
63
73
|
messages.value = [];
|
|
64
74
|
visibleLimit.value = 50;
|