@agent-link/server 0.1.73 → 0.1.74
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 +5 -2
- package/web/modules/connection.js +14 -1
- package/web/style.css +11 -0
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -165,7 +165,7 @@ const App = {
|
|
|
165
165
|
|
|
166
166
|
// ── Computed ──
|
|
167
167
|
const canSend = computed(() =>
|
|
168
|
-
status.value === 'Connected' && (inputText.value.trim() || attachments.value.length > 0) && !
|
|
168
|
+
status.value === 'Connected' && (inputText.value.trim() || attachments.value.length > 0) && !isCompacting.value
|
|
169
169
|
&& !messages.value.some(m => m.role === 'ask-question' && !m.answered)
|
|
170
170
|
);
|
|
171
171
|
|
|
@@ -191,11 +191,13 @@ const App = {
|
|
|
191
191
|
name: f.name, size: f.size, isImage: f.isImage, thumbUrl: f.thumbUrl,
|
|
192
192
|
}));
|
|
193
193
|
|
|
194
|
+
const isQueued = isProcessing.value;
|
|
194
195
|
messages.value.push({
|
|
195
196
|
id: streaming.nextId(), role: 'user',
|
|
196
197
|
content: text || (files.length > 0 ? `[${files.length} file${files.length > 1 ? 's' : ''} attached]` : ''),
|
|
197
198
|
attachments: msgAttachments.length > 0 ? msgAttachments : undefined,
|
|
198
199
|
timestamp: new Date(),
|
|
200
|
+
queued: isQueued,
|
|
199
201
|
});
|
|
200
202
|
isProcessing.value = true;
|
|
201
203
|
scrollToBottom(true);
|
|
@@ -435,6 +437,7 @@ const App = {
|
|
|
435
437
|
<div class="message-role-label user-label">You</div>
|
|
436
438
|
<div class="message-bubble user-bubble" :title="formatTimestamp(msg.timestamp)">
|
|
437
439
|
<div class="message-content">{{ msg.content }}</div>
|
|
440
|
+
<span v-if="msg.queued" class="queued-badge">Queued</span>
|
|
438
441
|
<div v-if="msg.attachments && msg.attachments.length" class="message-attachments">
|
|
439
442
|
<div v-for="(att, ai) in msg.attachments" :key="ai" class="message-attachment-chip">
|
|
440
443
|
<img v-if="att.isImage && att.thumbUrl" :src="att.thumbUrl" class="message-attachment-thumb" />
|
|
@@ -599,7 +602,7 @@ const App = {
|
|
|
599
602
|
<button v-if="isProcessing" @click="cancelExecution" class="send-btn stop-btn" title="Stop generation">
|
|
600
603
|
<svg viewBox="0 0 24 24" width="14" height="14"><rect x="6" y="6" width="12" height="12" rx="2" fill="currentColor"/></svg>
|
|
601
604
|
</button>
|
|
602
|
-
<button
|
|
605
|
+
<button @click="sendMessage" :disabled="!canSend" class="send-btn" title="Send">
|
|
603
606
|
<svg viewBox="0 0 24 24" width="16" height="16"><path fill="currentColor" d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>
|
|
604
607
|
</button>
|
|
605
608
|
</div>
|
|
@@ -256,7 +256,20 @@ export function createConnection(deps) {
|
|
|
256
256
|
} else if (msg.type === 'turn_completed' || msg.type === 'execution_cancelled') {
|
|
257
257
|
streaming.flushReveal();
|
|
258
258
|
finalizeStreamingMsg(scheduleHighlight);
|
|
259
|
-
|
|
259
|
+
if (msg.type === 'execution_cancelled') {
|
|
260
|
+
// Cancel clears all queued messages
|
|
261
|
+
messages.value.forEach(m => { if (m.queued) m.queued = false; });
|
|
262
|
+
isProcessing.value = false;
|
|
263
|
+
} else {
|
|
264
|
+
// Turn completed — check if there's a queued message that Claude will process next
|
|
265
|
+
const nextQueued = messages.value.find(m => m.role === 'user' && m.queued);
|
|
266
|
+
if (nextQueued) {
|
|
267
|
+
nextQueued.queued = false;
|
|
268
|
+
// Still processing — Claude will handle the queued message
|
|
269
|
+
} else {
|
|
270
|
+
isProcessing.value = false;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
260
273
|
isCompacting.value = false;
|
|
261
274
|
if (msg.type === 'execution_cancelled') {
|
|
262
275
|
messages.value.push({
|
package/web/style.css
CHANGED
|
@@ -720,6 +720,17 @@ body {
|
|
|
720
720
|
color: var(--text-primary);
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
+
.queued-badge {
|
|
724
|
+
display: inline-block;
|
|
725
|
+
font-size: 0.65rem;
|
|
726
|
+
color: var(--text-secondary);
|
|
727
|
+
background: var(--bg-secondary);
|
|
728
|
+
padding: 1px 6px;
|
|
729
|
+
border-radius: 4px;
|
|
730
|
+
margin-top: 4px;
|
|
731
|
+
opacity: 0.8;
|
|
732
|
+
}
|
|
733
|
+
|
|
723
734
|
.assistant-bubble {
|
|
724
735
|
background: transparent;
|
|
725
736
|
padding: 0.2rem 0;
|