SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Inspector: Better labels for roles (#368)
Kilian Lieret8491c9582889
diff --git a/inspector/fileViewer.js b/inspector/fileViewer.jsindex ff532d9c..459c91ef 100644--- a/inspector/fileViewer.js+++ b/inspector/fileViewer.js@@ -34,6 +34,19 @@ function fetchFiles() {});}+// translate item.role to what we show the user+const roleMap = {+ user: "Environment",+ assistant: "SWE-Agent",+ subroutine: "SWE-Agent subroutine",+ default: "Default",+ system: "System",+};++function getRoleText(role) {+ return roleMap[role] || role;+}+function viewFile(fileName) {// Clear any pending message loading from previous filestimeoutIds.forEach((timeoutId) => clearTimeout(timeoutId));@@ -78,7 +91,7 @@ function viewFile(fileName) {historyItem.innerHTML = `<div class="role-bar ${roleClass}"><strong>- <span>${item.role}</span>+ <span>${getRoleText(item.role)}</span></strong></div><div class="content-container">