@agent-link/server 0.1.16 → 0.1.18
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 +9 -25
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -852,6 +852,15 @@ const App = {
|
|
|
852
852
|
isCompacting.value = false;
|
|
853
853
|
} else if (msg.type === 'claude_output') {
|
|
854
854
|
handleClaudeOutput(msg);
|
|
855
|
+
} else if (msg.type === 'command_output') {
|
|
856
|
+
flushReveal();
|
|
857
|
+
finalizeStreamingMsg();
|
|
858
|
+
messages.value.push({
|
|
859
|
+
id: ++messageIdCounter, role: 'user',
|
|
860
|
+
content: msg.content, isCommandOutput: true,
|
|
861
|
+
timestamp: new Date(),
|
|
862
|
+
});
|
|
863
|
+
scrollToBottom();
|
|
855
864
|
} else if (msg.type === 'context_compaction') {
|
|
856
865
|
if (msg.status === 'started') {
|
|
857
866
|
isCompacting.value = true;
|
|
@@ -1034,31 +1043,6 @@ const App = {
|
|
|
1034
1043
|
scrollToBottom();
|
|
1035
1044
|
return;
|
|
1036
1045
|
}
|
|
1037
|
-
|
|
1038
|
-
// Command output (e.g. /cost, /context) — user message with content containing stdout/stderr tags
|
|
1039
|
-
if (data.type === 'user' && data.message && data.message.content) {
|
|
1040
|
-
const raw = typeof data.message.content === 'string'
|
|
1041
|
-
? data.message.content
|
|
1042
|
-
: Array.isArray(data.message.content)
|
|
1043
|
-
? data.message.content.filter(b => b.type === 'text').map(b => b.text || '').join('')
|
|
1044
|
-
: '';
|
|
1045
|
-
if (raw.trim()) {
|
|
1046
|
-
const stdoutMatch = raw.match(/<local-command-stdout>([\s\S]*?)<\/local-command-stdout>/);
|
|
1047
|
-
const stderrMatch = raw.match(/<local-command-stderr>([\s\S]*?)<\/local-command-stderr>/);
|
|
1048
|
-
const cmdOutput = (stdoutMatch && stdoutMatch[1].trim()) || (stderrMatch && stderrMatch[1].trim());
|
|
1049
|
-
if (cmdOutput) {
|
|
1050
|
-
flushReveal();
|
|
1051
|
-
finalizeStreamingMsg();
|
|
1052
|
-
messages.value.push({
|
|
1053
|
-
id: ++messageIdCounter, role: 'user',
|
|
1054
|
-
content: cmdOutput, isCommandOutput: true,
|
|
1055
|
-
timestamp: new Date(),
|
|
1056
|
-
});
|
|
1057
|
-
scrollToBottom();
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
return;
|
|
1061
|
-
}
|
|
1062
1046
|
}
|
|
1063
1047
|
|
|
1064
1048
|
// Apply syntax highlighting after DOM updates
|