@agent-link/server 0.1.44 → 0.1.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 +1 -1
- package/web/app.js +11 -10
- package/web/modules/connection.js +21 -2
- package/web/style.css +21 -22
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -403,8 +403,7 @@ const App = {
|
|
|
403
403
|
<template v-if="msg.role === 'user'">
|
|
404
404
|
<div class="message-role-label user-label">You</div>
|
|
405
405
|
<div class="message-bubble user-bubble" :title="formatTimestamp(msg.timestamp)">
|
|
406
|
-
<div
|
|
407
|
-
<div v-else class="message-content">{{ msg.content }}</div>
|
|
406
|
+
<div class="message-content">{{ msg.content }}</div>
|
|
408
407
|
<div v-if="msg.attachments && msg.attachments.length" class="message-attachments">
|
|
409
408
|
<div v-for="(att, ai) in msg.attachments" :key="ai" class="message-attachment-chip">
|
|
410
409
|
<img v-if="att.isImage && att.thumbUrl" :src="att.thumbUrl" class="message-attachment-thumb" />
|
|
@@ -506,19 +505,21 @@ const App = {
|
|
|
506
505
|
</div>
|
|
507
506
|
|
|
508
507
|
<!-- System message -->
|
|
509
|
-
<div v-else-if="msg.role === 'system'" class="system-msg">
|
|
510
|
-
|
|
508
|
+
<div v-else-if="msg.role === 'system'" :class="['system-msg', { 'compact-msg': msg.isCompactStart, 'command-output-msg': msg.isCommandOutput }]">
|
|
509
|
+
<template v-if="msg.isCompactStart && !msg.compactDone">
|
|
510
|
+
<span class="compact-inline-spinner"></span>
|
|
511
|
+
</template>
|
|
512
|
+
<template v-if="msg.isCompactStart && msg.compactDone">
|
|
513
|
+
<span class="compact-done-icon">✓</span>
|
|
514
|
+
</template>
|
|
515
|
+
<div v-if="msg.isCommandOutput" class="message-content markdown-body" v-html="getRenderedContent(msg)"></div>
|
|
516
|
+
<template v-else>{{ msg.content }}</template>
|
|
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
|
|
|
@@ -183,7 +183,7 @@ export function createConnection(deps) {
|
|
|
183
183
|
streaming.flushReveal();
|
|
184
184
|
finalizeStreamingMsg(scheduleHighlight);
|
|
185
185
|
messages.value.push({
|
|
186
|
-
id: streaming.nextId(), role: '
|
|
186
|
+
id: streaming.nextId(), role: 'system',
|
|
187
187
|
content: msg.content, isCommandOutput: true,
|
|
188
188
|
timestamp: new Date(),
|
|
189
189
|
});
|
|
@@ -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;
|
|
@@ -250,10 +263,16 @@ export function createConnection(deps) {
|
|
|
250
263
|
content: h.content, contextExpanded: false,
|
|
251
264
|
timestamp: h.timestamp ? new Date(h.timestamp) : new Date(),
|
|
252
265
|
});
|
|
266
|
+
} else if (h.isCommandOutput) {
|
|
267
|
+
batch.push({
|
|
268
|
+
id: streaming.nextId(), role: 'system',
|
|
269
|
+
content: h.content, isCommandOutput: true,
|
|
270
|
+
timestamp: h.timestamp ? new Date(h.timestamp) : new Date(),
|
|
271
|
+
});
|
|
253
272
|
} else {
|
|
254
273
|
batch.push({
|
|
255
274
|
id: streaming.nextId(), role: 'user',
|
|
256
|
-
content: h.content,
|
|
275
|
+
content: h.content,
|
|
257
276
|
timestamp: h.timestamp ? new Date(h.timestamp) : new Date(),
|
|
258
277
|
});
|
|
259
278
|
}
|
package/web/style.css
CHANGED
|
@@ -1190,6 +1190,13 @@ body {
|
|
|
1190
1190
|
padding: 0.25rem 0;
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
+
.system-msg.command-output-msg {
|
|
1194
|
+
text-align: left;
|
|
1195
|
+
font-style: normal;
|
|
1196
|
+
font-size: 0.85rem;
|
|
1197
|
+
padding: 0.5rem 0;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1193
1200
|
/* ── History loading indicator ── */
|
|
1194
1201
|
.history-loading {
|
|
1195
1202
|
display: flex;
|
|
@@ -1263,25 +1270,20 @@ body {
|
|
|
1263
1270
|
30% { opacity: 1; transform: scale(1); }
|
|
1264
1271
|
}
|
|
1265
1272
|
|
|
1266
|
-
/* ── Context compaction
|
|
1267
|
-
.
|
|
1268
|
-
display: flex;
|
|
1273
|
+
/* ── Context compaction inline message ── */
|
|
1274
|
+
.compact-msg {
|
|
1275
|
+
display: inline-flex;
|
|
1269
1276
|
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;
|
|
1277
|
+
gap: 6px;
|
|
1278
|
+
color: var(--warning) !important;
|
|
1279
|
+
font-style: normal !important;
|
|
1278
1280
|
font-weight: 500;
|
|
1279
|
-
animation: compacting-pulse 2s ease-in-out infinite;
|
|
1280
1281
|
}
|
|
1281
1282
|
|
|
1282
|
-
.
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
.compact-inline-spinner {
|
|
1284
|
+
display: inline-block;
|
|
1285
|
+
width: 12px;
|
|
1286
|
+
height: 12px;
|
|
1285
1287
|
border: 2px solid rgba(245, 158, 11, 0.3);
|
|
1286
1288
|
border-top-color: var(--warning);
|
|
1287
1289
|
border-radius: 50%;
|
|
@@ -1289,13 +1291,10 @@ body {
|
|
|
1289
1291
|
flex-shrink: 0;
|
|
1290
1292
|
}
|
|
1291
1293
|
|
|
1292
|
-
.
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
@keyframes compacting-pulse {
|
|
1297
|
-
0%, 100% { opacity: 1; }
|
|
1298
|
-
50% { opacity: 0.7; }
|
|
1294
|
+
.compact-done-icon {
|
|
1295
|
+
color: var(--success, #22c55e);
|
|
1296
|
+
font-weight: 700;
|
|
1297
|
+
font-style: normal;
|
|
1299
1298
|
}
|
|
1300
1299
|
|
|
1301
1300
|
/* ── Input area ── */
|