@agent-link/server 0.1.44 → 0.1.45
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 +8 -7
- package/web/modules/connection.js +13 -0
- package/web/style.css +14 -22
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -506,19 +506,20 @@ const App = {
|
|
|
506
506
|
</div>
|
|
507
507
|
|
|
508
508
|
<!-- System message -->
|
|
509
|
-
<div v-else-if="msg.role === 'system'" class="system-msg">
|
|
509
|
+
<div v-else-if="msg.role === 'system'" :class="['system-msg', { 'compact-msg': msg.isCompactStart }]">
|
|
510
|
+
<template v-if="msg.isCompactStart && !msg.compactDone">
|
|
511
|
+
<span class="compact-inline-spinner"></span>
|
|
512
|
+
</template>
|
|
513
|
+
<template v-if="msg.isCompactStart && msg.compactDone">
|
|
514
|
+
<span class="compact-done-icon">✓</span>
|
|
515
|
+
</template>
|
|
510
516
|
{{ msg.content }}
|
|
511
517
|
</div>
|
|
512
518
|
</div>
|
|
513
519
|
|
|
514
|
-
<div v-if="isProcessing && !
|
|
520
|
+
<div v-if="isProcessing && !messages.some(m => m.isStreaming)" class="typing-indicator">
|
|
515
521
|
<span></span><span></span><span></span>
|
|
516
522
|
</div>
|
|
517
|
-
|
|
518
|
-
<div v-if="isCompacting" class="compacting-banner">
|
|
519
|
-
<div class="compacting-spinner"></div>
|
|
520
|
-
<span class="compacting-text">Context compacting in progress...</span>
|
|
521
|
-
</div>
|
|
522
523
|
</div>
|
|
523
524
|
</div>
|
|
524
525
|
|
|
@@ -191,8 +191,21 @@ export function createConnection(deps) {
|
|
|
191
191
|
} else if (msg.type === 'context_compaction') {
|
|
192
192
|
if (msg.status === 'started') {
|
|
193
193
|
isCompacting.value = true;
|
|
194
|
+
messages.value.push({
|
|
195
|
+
id: streaming.nextId(), role: 'system',
|
|
196
|
+
content: 'Context compacting...', isCompactStart: true,
|
|
197
|
+
timestamp: new Date(),
|
|
198
|
+
});
|
|
199
|
+
scrollToBottom();
|
|
194
200
|
} else if (msg.status === 'completed') {
|
|
195
201
|
isCompacting.value = false;
|
|
202
|
+
// Update the start message to show completed
|
|
203
|
+
const startMsg = [...messages.value].reverse().find(m => m.isCompactStart && !m.compactDone);
|
|
204
|
+
if (startMsg) {
|
|
205
|
+
startMsg.content = 'Context compacted';
|
|
206
|
+
startMsg.compactDone = true;
|
|
207
|
+
}
|
|
208
|
+
scrollToBottom();
|
|
196
209
|
}
|
|
197
210
|
} else if (msg.type === 'turn_completed' || msg.type === 'execution_cancelled') {
|
|
198
211
|
isProcessing.value = false;
|
package/web/style.css
CHANGED
|
@@ -1263,25 +1263,20 @@ body {
|
|
|
1263
1263
|
30% { opacity: 1; transform: scale(1); }
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
1266
|
-
/* ── Context compaction
|
|
1267
|
-
.
|
|
1268
|
-
display: flex;
|
|
1266
|
+
/* ── Context compaction inline message ── */
|
|
1267
|
+
.compact-msg {
|
|
1268
|
+
display: inline-flex;
|
|
1269
1269
|
align-items: center;
|
|
1270
|
-
gap:
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
border-radius: 8px;
|
|
1274
|
-
background: rgba(245, 158, 11, 0.08);
|
|
1275
|
-
border: 1px solid rgba(245, 158, 11, 0.25);
|
|
1276
|
-
color: var(--warning);
|
|
1277
|
-
font-size: 0.85rem;
|
|
1270
|
+
gap: 6px;
|
|
1271
|
+
color: var(--warning) !important;
|
|
1272
|
+
font-style: normal !important;
|
|
1278
1273
|
font-weight: 500;
|
|
1279
|
-
animation: compacting-pulse 2s ease-in-out infinite;
|
|
1280
1274
|
}
|
|
1281
1275
|
|
|
1282
|
-
.
|
|
1283
|
-
|
|
1284
|
-
|
|
1276
|
+
.compact-inline-spinner {
|
|
1277
|
+
display: inline-block;
|
|
1278
|
+
width: 12px;
|
|
1279
|
+
height: 12px;
|
|
1285
1280
|
border: 2px solid rgba(245, 158, 11, 0.3);
|
|
1286
1281
|
border-top-color: var(--warning);
|
|
1287
1282
|
border-radius: 50%;
|
|
@@ -1289,13 +1284,10 @@ body {
|
|
|
1289
1284
|
flex-shrink: 0;
|
|
1290
1285
|
}
|
|
1291
1286
|
|
|
1292
|
-
.
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
@keyframes compacting-pulse {
|
|
1297
|
-
0%, 100% { opacity: 1; }
|
|
1298
|
-
50% { opacity: 0.7; }
|
|
1287
|
+
.compact-done-icon {
|
|
1288
|
+
color: var(--success, #22c55e);
|
|
1289
|
+
font-weight: 700;
|
|
1290
|
+
font-style: normal;
|
|
1299
1291
|
}
|
|
1300
1292
|
|
|
1301
1293
|
/* ── Input area ── */
|