loopengine 0.1.65 → 0.1.66
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/dist/web/playground.js +10 -1
- package/package.json +1 -1
package/dist/web/playground.js
CHANGED
|
@@ -697,13 +697,22 @@ ${consoleShellScript}
|
|
|
697
697
|
}
|
|
698
698
|
});
|
|
699
699
|
|
|
700
|
+
// "You" for the person typing, the agent's own name for its replies.
|
|
701
|
+
function messageLabel(role) {
|
|
702
|
+
if (role === 'user') return 'You';
|
|
703
|
+
if (role === 'assistant') return agentSelect.value || 'Agent';
|
|
704
|
+
if (role === 'error') return 'Error';
|
|
705
|
+
if (role === 'stopped') return 'Stopped';
|
|
706
|
+
return role;
|
|
707
|
+
}
|
|
708
|
+
|
|
700
709
|
function appendChatMessage(role, text) {
|
|
701
710
|
clearEmptyHint(chatPane);
|
|
702
711
|
var div = document.createElement('div');
|
|
703
712
|
div.className = 'msg msg-' + role;
|
|
704
713
|
var label = document.createElement('div');
|
|
705
714
|
label.className = 'msg-label';
|
|
706
|
-
label.textContent = role;
|
|
715
|
+
label.textContent = messageLabel(role);
|
|
707
716
|
var body = document.createElement('div');
|
|
708
717
|
body.className = 'msg-body';
|
|
709
718
|
// Only an assistant's own reply gets rendered as markdown — a user's
|