Skip to content

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]

Web: Reformat code with prettier

Kilian Lieret0a2930180c80
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 67239609..24a279df 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -21,3 +21,8 @@ repos:
# Run the formatter.
# - id: ruff-format
+ - repo: https://github.com/pre-commit/mirrors-prettier
+ rev: "" # Use the sha or tag you want to point at
+ hooks:
+ - id: prettier
+ types_or: ["javascript", "css"]
diff --git a/inspector/fileViewer.js b/inspector/fileViewer.js
index 7cc9896c..1f87fb40 100644
--- a/inspector/fileViewer.js
+++ b/inspector/fileViewer.js
@@ -1,72 +1,81 @@
let currentFileName = null; // Store the current file name
-let trajectoryDirectory = ''; // Global variable to store the directory
+let trajectoryDirectory = ""; // Global variable to store the directory
let timeoutIds = []; // Store timeout IDs for pending operations
-
function getBaseUrl() {
- const protocol = window.location.protocol;
- const host = window.location.hostname;
- const port = window.location.port;
-
- // Use the default port if the port number is empty (for standard HTTP/HTTPS)
- const defaultPort = (protocol === 'http:' && !port) ? '80' : (protocol === 'https:' && !port) ? '443' : port;
-
- return `${protocol}//${host}:${defaultPort}`;
+ const protocol = window.location.protocol;
+ const host = window.location.hostname;
+ const port = window.location.port;
+
+ // Use the default port if the port number is empty (for standard HTTP/HTTPS)
+ const defaultPort =
+ protocol === "http:" && !port
+ ? "80"
+ : protocol === "https:" && !port
+ ? "443"
+ : port;
+
+ return `${protocol}//${host}:${defaultPort}`;
}
-
function fetchFiles() {
- const baseUrl = getBaseUrl();
- fetch(`${baseUrl}/files`)
- .then(response => response.json())
- .then(files => {
- const fileList = document.getElementById('fileList');
- fileList.innerHTML = '';
- files.forEach(file => {
- const fileElement = document.createElement('li');
- fileElement.textContent = file;
- fileElement.onclick = () => viewFile(file.split(' ')[0]);
- fileList.appendChild(fileElement);
- });
- });
+ const baseUrl = getBaseUrl();
+ fetch(`${baseUrl}/files`)
+ .then((response) => response.json())
+ .then((files) => {
+ const fileList = document.getElementById("fileList");
+ fileList.innerHTML = "";
+ files.forEach((file) => {
+ const fileElement = document.createElement("li");
+ fileElement.textContent = file;
+ fileElement.onclick = () => viewFile(file.split(" ")[0]);
+ fileList.appendChild(fileElement);
+ });
+ });
}
function viewFile(fileName) {
- // Clear any pending message loading from previous files
- timeoutIds.forEach(timeoutId => clearTimeout(timeoutId));
- timeoutIds = []; // Reset the list of timeout IDs
-
- const baseUrl = getBaseUrl();
- fetch(`${baseUrl}/trajectory/${fileName}`)
- .then(response => {
- if (!response.ok) {
- throw new Error('Network response was not ok');
+ // Clear any pending message loading from previous files
+ timeoutIds.forEach((timeoutId) => clearTimeout(timeoutId));
+ timeoutIds = []; // Reset the list of timeout IDs
+
+ const baseUrl = getBaseUrl();
+ fetch(`${baseUrl}/trajectory/${fileName}`)
+ .then((response) => {
+ if (!response.ok) {
+ throw new Error("Network response was not ok");
+ }
+ return response.json();
+ })
+ .then((content) => {
+ const container = document.getElementById("fileContent");
+ container.innerHTML = ""; // Clear existing content
+
+ if (content.history && Array.isArray(content.history)) {
+ let delay = 200; // Initial delay
+ const delayIncrement = 50; // Delay between each message, in milliseconds
+
+ content.history.forEach((item, index) => {
+ const timeoutId = setTimeout(() => {
+ const contentText = item.content
+ ? item.content.replace(/</g, "&lt;").replace(/>/g, "&gt;")
+ : "";
+ let roleClass =
+ item.agent && item.agent !== "primary"
+ ? "subroutine"
+ : item.role
+ ? item.role.toLowerCase().replaceAll(" ", "-")
+ : "default";
+ const elementId = "historyItem" + index;
+ const historyItem = document.createElement("div");
+ historyItem.className = `history-item ${roleClass} fade-in`;
+ historyItem.id = elementId;
+ if (contentText.includes("--- DEMONSTRATION ---")) {
+ item.role = "demo";
+ } else if ("is_demo" in item && item.is_demo === true) {
+ item.role += "[demo]";
}
- return response.json();
- })
- .then(content => {
- const container = document.getElementById('fileContent');
- container.innerHTML = ''; // Clear existing content
-
- if (content.history && Array.isArray(content.history)) {
- let delay = 200; // Initial delay
- const delayIncrement = 50; // Delay between each message, in milliseconds
-
- content.history.forEach((item, index) => {
- const timeoutId = setTimeout(() => {
- const contentText = item.content ? item.content.replace(/</g, '&lt;').replace(/>/g, '&gt;') : '';
- let roleClass = item.agent && item.agent !== "primary" ? "subroutine" : item.role ? item.role.toLowerCase().replaceAll(' ', '-') : 'default';
- const elementId = 'historyItem' + index;
- const historyItem = document.createElement('div');
- historyItem.className = `history-item ${roleClass} fade-in`;
- historyItem.id = elementId;
- if (contentText.includes("--- DEMONSTRATION ---")) {
- item.role = "demo";
- }
- else if ('is_demo' in item && item.is_demo === true) {
- item.role += '[demo]';
- }
- historyItem.innerHTML = `
+ historyItem.innerHTML = `
<div class="role-bar ${roleClass}">
<strong>
<span>${item.role}</span>
@@ -77,57 +86,60 @@ function viewFile(fileName) {
</div>
<div class="shadow"></div>
`;
- container.appendChild(historyItem);
- }, delay);
+ container.appendChild(historyItem);
+ }, delay);
- delay += delayIncrement; // Increment delay for the next message
- timeoutIds.push(timeoutId); // Store the timeout ID
- });
- } else {
- container.textContent = 'No history content found.';
- }
- })
- .catch(error => {
- console.error('Error fetching file:', error);
- document.getElementById('fileContent').textContent = 'Error loading content. ' + error;
+ delay += delayIncrement; // Increment delay for the next message
+ timeoutIds.push(timeoutId); // Store the timeout ID
});
-
- // Highlight the selected file in the list
- document.querySelectorAll('#fileList li').forEach(li => {
- li.classList.remove('selected');
- if (li.textContent.split(' ')[0] === fileName) {
- li.classList.add('selected');
- }
+ } else {
+ container.textContent = "No history content found.";
+ }
+ })
+ .catch((error) => {
+ console.error("Error fetching file:", error);
+ document.getElementById("fileContent").textContent =
+ "Error loading content. " + error;
});
+
+ // Highlight the selected file in the list
+ document.querySelectorAll("#fileList li").forEach((li) => {
+ li.classList.remove("selected");
+ if (li.textContent.split(" ")[0] === fileName) {
+ li.classList.add("selected");
+ }
+ });
}
function refreshCurrentFile() {
- if (currentFileName) {
- const currentScrollPosition = document.documentElement.scrollTop || document.body.scrollTop;
- viewFile(currentFileName.split(' ')[0]); // Reload the current file
- // Restore the scroll position after the content is loaded
- setTimeout(() => {
- window.scrollTo(0, currentScrollPosition);
- }, 100);
- }
+ if (currentFileName) {
+ const currentScrollPosition =
+ document.documentElement.scrollTop || document.body.scrollTop;
+ viewFile(currentFileName.split(" ")[0]); // Reload the current file
+ // Restore the scroll position after the content is loaded
+ setTimeout(() => {
+ window.scrollTo(0, currentScrollPosition);
+ }, 100);
+ }
}
function fetchDirectoryInfo() {
- const baseUrl = getBaseUrl();
- fetch(`${baseUrl}/directory_info`)
- .then(response => response.json())
- .then(data => {
- if (data.directory) {
- trajectoryDirectory = data.directory; // Store the directory
- document.title = `Trajectory Viewer: ${data.directory}`;
- document.querySelector('h1').textContent = `Trajectory Viewer: ${data.directory}`;
- }
- })
- .catch(error => console.error('Error fetching directory info:', error));
+ const baseUrl = getBaseUrl();
+ fetch(`${baseUrl}/directory_info`)
+ .then((response) => response.json())
+ .then((data) => {
+ if (data.directory) {
+ trajectoryDirectory = data.directory; // Store the directory
+ document.title = `Trajectory Viewer: ${data.directory}`;
+ document.querySelector(
+ "h1",
+ ).textContent = `Trajectory Viewer: ${data.directory}`;
+ }
+ })
+ .catch((error) => console.error("Error fetching directory info:", error));
}
-
-window.onload = function() {
- fetchFiles();
- fetchDirectoryInfo();
-};
\ No newline at end of file
+window.onload = function () {
+ fetchFiles();
+ fetchDirectoryInfo();
+};
diff --git a/inspector/style.css b/inspector/style.css
index fd7c5921..99313a0d 100644
--- a/inspector/style.css
+++ b/inspector/style.css
@@ -1,254 +1,260 @@
body {
- font-family: Arial, sans-serif;
- margin: 0;
- padding: 20px;
- background-color: #f4f4f4;
+ font-family: Arial, sans-serif;
+ margin: 0;
+ padding: 20px;
+ background-color: #f4f4f4;
}
-h1, h2 {
- color: #333;
+h1,
+h2 {
+ color: #333;
}
#fileList {
- list-style-type: none;
- padding: 10px;
- max-height: 400px;
- overflow-y: auto;
- margin: 0;
- background-color: #eee;
- border: 3px solid #1697e2;
- border-radius: 10px;
+ list-style-type: none;
+ padding: 10px;
+ max-height: 400px;
+ overflow-y: auto;
+ margin: 0;
+ background-color: #eee;
+ border: 3px solid #1697e2;
+ border-radius: 10px;
}
#fileList li {
- cursor: pointer;
- padding: 10px;
- background-color: #fff;
- margin-bottom: 5px;
- border: 2px solid #333;
- border-radius: 5px;
- transition: background-color 0.3s;
+ cursor: pointer;
+ padding: 10px;
+ background-color: #fff;
+ margin-bottom: 5px;
+ border: 2px solid #333;
+ border-radius: 5px;
+ transition: background-color 0.3s;
}
#fileList li:hover {
- background-color: #bbb;
+ background-color: #bbb;
}
#fileList li.selected {
- border-color: #fabb00;
+ border-color: #fabb00;
}
#fileContent {
- background-color: #fff;
- border: 1px solid #ddd;
- padding: 10px;
- margin-top: 20px;
- white-space: pre-wrap;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ padding: 10px;
+ margin-top: 20px;
+ white-space: pre-wrap;
}
.button-container {
- display: flex;
- justify-content: center;
- align-items: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
}
#refreshButton {
- padding: 4px 10px;
- min-width: 80px;
- border: none;
- font: inherit;
- color: #373030;
- border-radius: 10px;
- outline: none;
- text-decoration: none;
- cursor: default;
- font-weight: 400;
- background: #fff;
- box-shadow: 0px 0px 1px #0000004d, 0px 1px 1px #00000066;
+ padding: 4px 10px;
+ min-width: 80px;
+ border: none;
+ font: inherit;
+ color: #373030;
+ border-radius: 10px;
+ outline: none;
+ text-decoration: none;
+ cursor: default;
+ font-weight: 400;
+ background: #fff;
+ box-shadow:
+ 0px 0px 1px #0000004d,
+ 0px 1px 1px #00000066;
}
#refreshButton:hover {
- /* hover MUST come before active */
- background: linear-gradient(#0000004d, #00000066);
- color: #fff;
- position: relative;
+ /* hover MUST come before active */
+ background: linear-gradient(#0000004d, #00000066);
+ color: #fff;
+ position: relative;
}
#refreshButton:active {
- background: linear-gradient(#4faefc, #006bff);
- color: #fff;
- position: relative;
+ background: linear-gradient(#4faefc, #006bff);
+ color: #fff;
+ position: relative;
}
.history-item {
- border: 3px solid black;
- border-radius: 5px;
- padding: 0px;
- /* padding-bottom: 5%; */
- margin-bottom: 15px;
- overflow-x: hidden;
- white-space: normal;
- /* overflow-x: auto; Enables horizontal scrolling */
- /* white-space: nowrap; Keeps content in a single line */
- max-height: 450px; /* Adjust as needed for 25 lines */
- overflow: hidden;
- position: relative;
+ border: 3px solid black;
+ border-radius: 5px;
+ padding: 0px;
+ /* padding-bottom: 5%; */
+ margin-bottom: 15px;
+ overflow-x: hidden;
+ white-space: normal;
+ /* overflow-x: auto; Enables horizontal scrolling */
+ /* white-space: nowrap; Keeps content in a single line */
+ max-height: 450px; /* Adjust as needed for 25 lines */
+ overflow: hidden;
+ position: relative;
}
.shadow {
- height: 30px; /* Height of the shadow */
- background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- pointer-events: none; /* Ensures the shadow doesn't interfere with interaction */
- display: none; /* Initially hidden */
+ height: 30px; /* Height of the shadow */
+ background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ pointer-events: none; /* Ensures the shadow doesn't interfere with interaction */
+ display: none; /* Initially hidden */
}
.has-shadow .shadow {
- display: block;
+ display: block;
}
.content-container {
- max-height: 400px; /* Adjust as needed */
- overflow-y: auto;
- position: relative;
- padding: 10px;
+ max-height: 400px; /* Adjust as needed */
+ overflow-y: auto;
+ position: relative;
+ padding: 10px;
}
.content-container pre {
- white-space: pre-wrap; /* Wrap lines and preserve whitespace */
- overflow-wrap: break-word; /* Handle long words */
+ white-space: pre-wrap; /* Wrap lines and preserve whitespace */
+ overflow-wrap: break-word; /* Handle long words */
}
.container {
- max-width: 1000px;
- margin: 0 auto; /* Centers the container */
- padding: 20px; /* Optional: for some inner spacing */
+ max-width: 1000px;
+ margin: 0 auto; /* Centers the container */
+ padding: 20px; /* Optional: for some inner spacing */
}
.role-bar {
- background-color: #fff;
- padding: 5px 10px;
- margin: 0;
- border-bottom: 1px solid #fff;
- font-size: 18px;
- display: flex;
- align-items: center;
- background-repeat: no-repeat;
- background-size: 22px 22px;
- padding-left: 35px; /* Adjust according to your icon size */
- padding-right: 35px; /* Same padding on the right for balance */
+ background-color: #fff;
+ padding: 5px 10px;
+ margin: 0;
+ border-bottom: 1px solid #fff;
+ font-size: 18px;
+ display: flex;
+ align-items: center;
+ background-repeat: no-repeat;
+ background-size: 22px 22px;
+ padding-left: 35px; /* Adjust according to your icon size */
+ padding-right: 35px; /* Same padding on the right for balance */
}
.role-bar.user {
- background-image: url('icons/swellama_brown.png');
- background-color: #9cdcff;
- justify-content: flex-end; /* Aligns content to the right */
- background-position: right 10px center; /* Moves the image to the right */
- text-align: right; /* Text aligned right */
+ background-image: url("icons/swellama_brown.png");
+ background-color: #9cdcff;
+ justify-content: flex-end; /* Aligns content to the right */
+ background-position: right 10px center; /* Moves the image to the right */
+ text-align: right; /* Text aligned right */
}
.role-bar.tool {
- background-image: url('icons/swellama_brown.png');
- background-color: #1eacf8;
- justify-content: flex-end; /* Aligns content to the right */
- background-position: right 10px center; /* Moves the image to the right */
- text-align: right; /* Text aligned right */
+ background-image: url("icons/swellama_brown.png");
+ background-color: #1eacf8;
+ justify-content: flex-end; /* Aligns content to the right */
+ background-position: right 10px center; /* Moves the image to the right */
+ text-align: right; /* Text aligned right */
}
.role-bar.system {
- background-image: url('icons/swellama_blue.png');
- background-color: #8aa8bd;
- justify-content: center; /* Center the flex container contents */
- background-position: calc(50% - 32px) center; /* Adjust position */
- text-align: center; /* Center the text */
+ background-image: url("icons/swellama_blue.png");
+ background-color: #8aa8bd;
+ justify-content: center; /* Center the flex container contents */
+ background-position: calc(50% - 32px) center; /* Adjust position */
+ text-align: center; /* Center the text */
}
.role-bar.system span {
- padding-left: 32px;
+ padding-left: 32px;
}
.role-bar.subroutine {
- background-image: url('icons/swellama_blue.png');
- background-color: #7bb776;
- justify-content: center;
- background-position: calc(50% - 45px) center;
- text-align: center;
+ background-image: url("icons/swellama_blue.png");
+ background-color: #7bb776;
+ justify-content: center;
+ background-position: calc(50% - 45px) center;
+ text-align: center;
}
.role-bar.subroutine span {
- padding-left: 45px;
+ padding-left: 45px;
}
.role-bar.model-patch {
- background-image: url('icons/swellama_blue.png');
- background-color: #bdbdbd;
- justify-content: center;
- background-position: calc(50% - 45px) center;
- text-align: center;
+ background-image: url("icons/swellama_blue.png");
+ background-color: #bdbdbd;
+ justify-content: center;
+ background-position: calc(50% - 45px) center;
+ text-align: center;
}
.role-bar.gold-patch {
- background-image: url('icons/swellama_blue.png');
- background-color: #ffc65b;
- justify-content: center;
- background-position: calc(50% - 46px) center;
- text-align: center;
+ background-image: url("icons/swellama_blue.png");
+ background-color: #ffc65b;
+ justify-content: center;
+ background-position: calc(50% - 46px) center;
+ text-align: center;
}
.role-bar.gold-patch span {
- padding-left: 46px;
+ padding-left: 46px;
}
.role-bar.test-patch {
- background-image: url('icons/swellama_blue.png');
- background-color: #8888ff;
- justify-content: center;
- background-position: calc(50% - 46px) center;
- text-align: center;
+ background-image: url("icons/swellama_blue.png");
+ background-color: #8888ff;
+ justify-content: center;
+ background-position: calc(50% - 46px) center;
+ text-align: center;
}
.role-bar.test-patch span {
- padding-left: 46px;
+ padding-left: 46px;
}
.role-bar.assistant {
- background-image: url('icons/swe-agent-logo-50.png');
- background-color: #FFF7EC;
- background-position: left 10px center;
+ background-image: url("icons/swe-agent-logo-50.png");
+ background-color: #fff7ec;
+ background-position: left 10px center;
}
.role-bar.evaluation-report {
- background-image: url('icons/swellama_blue.png');
- background-color: #86ad7a;
- justify-content: center;
- background-position: calc(50% - 96px) center;
- text-align: center;
+ background-image: url("icons/swellama_blue.png");
+ background-color: #86ad7a;
+ justify-content: center;
+ background-position: calc(50% - 96px) center;
+ text-align: center;
}
.role-bar.evaluation-report span {
- padding-left: 23px;
+ padding-left: 23px;
}
.history-item.user {
- border-color: #1697e2;
+ border-color: #1697e2;
}
.history-item.tool {
- border-color: #1483c3;
+ border-color: #1483c3;
}
.history-item.system {
- border-color: #004b80;
+ border-color: #004b80;
}
.history-item.subroutine {
- border-color: #006b00;
+ border-color: #006b00;
}
.history-item.gold-patch {
- border-color: #fabb00;
+ border-color: #fabb00;
}
.history-item.assistant {
- border-color: rgb(0, 0, 0);
+ border-color: rgb(0, 0, 0);
}
.history-item.test-patch {
- border-color: #7373d9;
+ border-color: #7373d9;
}
.history-item.evaluation-report {
- border-color: #35614b;
+ border-color: #35614b;
}
-
/* filepath-tree stuff */
.filepath {
- display: flex;
- flex-direction: column; /* Changes layout to one part per line */
- align-items: flex-start; /* Aligns parts to the start of the container */
- font-size: 16px;
- gap: 10px;
- padding: 5px;
- background-color: #f4f4f4;
- }
- .part {
- border: 1px solid #ddd;
- white-space: nowrap; /* Prevents wrapping within parts */
- padding: 5px;
- background-color: #fff;
- border-radius: 5px;
- }
+ display: flex;
+ flex-direction: column; /* Changes layout to one part per line */
+ align-items: flex-start; /* Aligns parts to the start of the container */
+ font-size: 16px;
+ gap: 10px;
+ padding: 5px;
+ background-color: #f4f4f4;
+}
+.part {
+ border: 1px solid #ddd;
+ white-space: nowrap; /* Prevents wrapping within parts */
+ padding: 5px;
+ background-color: #fff;
+ border-radius: 5px;
+}
@keyframes fadeIn {
- from { opacity: 0; }
- to { opacity: 1; }
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
}
.fade-in {
- animation: fadeIn 1s ease-out;
+ animation: fadeIn 1s ease-out;
}
diff --git a/sweagent/frontend/src/App.js b/sweagent/frontend/src/App.js
index a1d02fe2..1a62b47e 100644
--- a/sweagent/frontend/src/App.js
+++ b/sweagent/frontend/src/App.js
@@ -1,17 +1,16 @@
-import Footer from './components/Footer';
-import { Routes, Route } from 'react-router-dom';
-import Run from './Run';
-import Header from './components/Header';
-import './static/font.css';
-import './static/index.css';
+import Footer from "./components/Footer";
+import { Routes, Route } from "react-router-dom";
+import Run from "./Run";
+import Header from "./components/Header";
+import "./static/font.css";
+import "./static/index.css";
function App() {
-
return (
<div>
<Header />
<Routes>
- <Route path="/" element={<Run/>} />
+ <Route path="/" element={<Run />} />
</Routes>
<Footer />
</div>
@@ -19,4 +18,3 @@ function App() {
}
export default App;
-
diff --git a/sweagent/frontend/src/App.test.js b/sweagent/frontend/src/App.test.js
index 1f03afee..9382b9ad 100644
--- a/sweagent/frontend/src/App.test.js
+++ b/sweagent/frontend/src/App.test.js
@@ -1,7 +1,7 @@
-import { render, screen } from '@testing-library/react';
-import App from './App';
+import { render, screen } from "@testing-library/react";
+import App from "./App";
-test('renders learn react link', () => {
+test("renders learn react link", () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
diff --git a/sweagent/frontend/src/Run.js b/sweagent/frontend/src/Run.js
index 06129ba6..0e947131 100644
--- a/sweagent/frontend/src/Run.js
+++ b/sweagent/frontend/src/Run.js
@@ -1,28 +1,30 @@
-import React, { useState, useRef, useEffect } from 'react';
-import axios from 'axios';
-import io from 'socket.io-client';
-import './static/run.css';
-import AgentFeed from './components/panels/AgentFeed';
-import EnvFeed from './components/panels/EnvFeed';
-import LogPanel from './components/panels/LogPanel';
-import LRunControl from './components/controls/LRunControl';
-
-const url = ''; // Will get this from .env
+import React, { useState, useRef, useEffect } from "react";
+import axios from "axios";
+import io from "socket.io-client";
+import "./static/run.css";
+import AgentFeed from "./components/panels/AgentFeed";
+import EnvFeed from "./components/panels/EnvFeed";
+import LogPanel from "./components/panels/LogPanel";
+import LRunControl from "./components/controls/LRunControl";
+
+const url = ""; // Will get this from .env
// Connect to Socket.io
const socket = io(url);
function Run() {
const [isConnected, setIsConnected] = useState(socket.connected);
- const [errorBanner, setErrorBanner] = useState('');
+ const [errorBanner, setErrorBanner] = useState("");
- const [dataPath, setDataPath] = useState('https://github.com/marshmallow-code/marshmallow/issues/1359');
+ const [dataPath, setDataPath] = useState(
+ "https://github.com/marshmallow-code/marshmallow/issues/1359",
+ );
const [repoPath, setRepoPath] = useState("");
const [model, setModel] = useState("gpt4");
const [testRun, setTestRun] = useState(false);
const [agentFeed, setAgentFeed] = useState([]);
const [envFeed, setEnvFeed] = useState([]);
const [highlightedStep, setHighlightedStep] = useState(null);
- const [logs, setLogs] = useState('');
+ const [logs, setLogs] = useState("");
const [isComputing, setIsComputing] = useState(false);
const hoverTimeoutRef = useRef(null);
@@ -30,26 +32,31 @@ function Run() {
const agentFeedRef = useRef(null);
const envFeedRef = useRef(null);
const logsRef = useRef(null);
-
- const [tabKey, setTabKey] = useState('problem');
+
+ const [tabKey, setTabKey] = useState("problem");
const stillComputingTimeoutRef = useRef(null);
axios.defaults.baseURL = url;
-
function scrollToHighlightedStep(highlightedStep, ref) {
if (highlightedStep && ref.current) {
- console.log('Scrolling to highlighted step', highlightedStep, ref.current);
- const firstStepMessage = ref.current.querySelector(`.step${highlightedStep}`);
- if (firstStepMessage) {
- window.requestAnimationFrame(() => {
- ref.current.scrollTo({
- top: firstStepMessage.offsetTop - ref.current.offsetTop,
- behavior: 'smooth'
- });
- });
- }
+ console.log(
+ "Scrolling to highlighted step",
+ highlightedStep,
+ ref.current,
+ );
+ const firstStepMessage = ref.current.querySelector(
+ `.step${highlightedStep}`,
+ );
+ if (firstStepMessage) {
+ window.requestAnimationFrame(() => {
+ ref.current.scrollTo({
+ top: firstStepMessage.offsetTop - ref.current.offsetTop,
+ behavior: "smooth",
+ });
+ });
+ }
}
}
@@ -77,21 +84,21 @@ function Run() {
};
const handleMouseLeave = () => {
- console.log('Mouse left');
+ console.log("Mouse left");
if (hoverTimeoutRef.current) {
clearTimeout(hoverTimeoutRef.current);
}
setHighlightedStep(null);
- }
+ };
const requeueStopComputeTimeout = () => {
clearTimeout(stillComputingTimeoutRef.current);
setIsComputing(true);
stillComputingTimeoutRef.current = setTimeout(() => {
- setIsComputing(false);
- console.log("No activity for 30s, setting isComputing to false");
+ setIsComputing(false);
+ console.log("No activity for 30s, setting isComputing to false");
}, 30000);
- }
+ };
// Handle form submission
const handleSubmit = async (event) => {
@@ -99,25 +106,31 @@ function Run() {
setIsComputing(true);
event.preventDefault();
setAgentFeed([]);
- setEnvFeed([]);
- setLogs('');
+ setEnvFeed([]);
+ setLogs("");
setHighlightedStep(null);
- setErrorBanner('');
+ setErrorBanner("");
try {
- await axios.get(`/run`, { params: { data_path: dataPath, test_run: testRun, repo_path: repoPath, model: model } });
+ await axios.get(`/run`, {
+ params: {
+ data_path: dataPath,
+ test_run: testRun,
+ repo_path: repoPath,
+ model: model,
+ },
+ });
} catch (error) {
- console.error('Error:', error);
+ console.error("Error:", error);
}
};
-
const handleStop = async () => {
setIsComputing(false);
try {
- const response = await axios.get('/stop');
- console.log(response.data);
+ const response = await axios.get("/stop");
+ console.log(response.data);
} catch (error) {
- console.error('Error stopping:', error);
+ console.error("Error stopping:", error);
}
};
@@ -125,103 +138,150 @@ function Run() {
React.useEffect(() => {
const handleUpdate = (data) => {
requeueStopComputeTimeout();
- if (data.feed === 'agent') {
- setAgentFeed(prevMessages => [...prevMessages, { type: data.type, message: data.message, format: data.format, step: data.thought_idx }]);
- }
- else if (data.feed === "env") {
- setEnvFeed(prevMessages => [...prevMessages, { message: data.message, type: data.type, format: data.format, step: data.thought_idx }]);
+ if (data.feed === "agent") {
+ setAgentFeed((prevMessages) => [
+ ...prevMessages,
+ {
+ type: data.type,
+ message: data.message,
+ format: data.format,
+ step: data.thought_idx,
+ },
+ ]);
+ } else if (data.feed === "env") {
+ setEnvFeed((prevMessages) => [
+ ...prevMessages,
+ {
+ message: data.message,
+ type: data.type,
+ format: data.format,
+ step: data.thought_idx,
+ },
+ ]);
}
};
const scrollLog = () => {
logsRef.current.scrollTop = logsRef.current.scrollHeight;
- }
+ };
const handleLogMessage = (data) => {
requeueStopComputeTimeout();
- setLogs(prevLogs => prevLogs + data.message);
+ setLogs((prevLogs) => prevLogs + data.message);
if (data.level === "critical") {
console.log("Critical error", data.message);
- setErrorBanner("Critical errror encountered: "+ data.message);
+ setErrorBanner("Critical errror encountered: " + data.message);
}
if (logsRef.current) {
setTimeout(() => {
scrollLog();
}, 100);
}
- }
+ };
const handleFinishedRun = (data) => {
setIsComputing(false);
- }
+ };
- socket.on('update', handleUpdate);
- socket.on('log_message', handleLogMessage);
- socket.on('finish_run', handleFinishedRun);
- socket.on('connect', () => {
+ socket.on("update", handleUpdate);
+ socket.on("log_message", handleLogMessage);
+ socket.on("finish_run", handleFinishedRun);
+ socket.on("connect", () => {
console.log("Connected to server");
setIsConnected(true);
- setErrorBanner('');
+ setErrorBanner("");
});
- socket.on('disconnect', () => {
+ socket.on("disconnect", () => {
console.log("Disconnected from server");
- setIsConnected(false);
- setErrorBanner('Connection to flask server lost, please restart it.');
- setIsComputing(false);
- scrollLog(); // reveal copy button
+ setIsConnected(false);
+ setErrorBanner("Connection to flask server lost, please restart it.");
+ setIsComputing(false);
+ scrollLog(); // reveal copy button
});
- socket.on('connect_error', (error) => {
- setIsConnected(false);
- setErrorBanner('Failed to connect to the flask server, please restart it.');
- setIsComputing(false);
- scrollLog(); // reveal copy button
+ socket.on("connect_error", (error) => {
+ setIsConnected(false);
+ setErrorBanner(
+ "Failed to connect to the flask server, please restart it.",
+ );
+ setIsComputing(false);
+ scrollLog(); // reveal copy button
});
return () => {
- socket.off('update', handleUpdate);
- socket.off('log_message', handleLogMessage);
- socket.off('finish_run', handleFinishedRun);
- socket.off('connect');
- socket.off('disconnect');
- socket.off('connect_error');
+ socket.off("update", handleUpdate);
+ socket.off("log_message", handleLogMessage);
+ socket.off("finish_run", handleFinishedRun);
+ socket.off("connect");
+ socket.off("disconnect");
+ socket.off("connect_error");
};
}, []);
function renderErrorMessage() {
if (errorBanner) {
- return (
- <div className="alert alert-danger" role="alert">
- {errorBanner}
- <br/>
- If you think this was a bug, please head over to <a href="https://github.com/princeton-nlp/swe-agent/issues" target='blank'>our GitHub issue tracker</a>,
- check if someone has already reported the issue, and if not, create a new issue.
- Please include the full log, all settings that you entered, and a screenshot of this page.
- </div>
- );
+ return (
+ <div className="alert alert-danger" role="alert">
+ {errorBanner}
+ <br />
+ If you think this was a bug, please head over to{" "}
+ <a
+ href="https://github.com/princeton-nlp/swe-agent/issues"
+ target="blank"
+ >
+ our GitHub issue tracker
+ </a>
+ , check if someone has already reported the issue, and if not, create
+ a new issue. Please include the full log, all settings that you
+ entered, and a screenshot of this page.
+ </div>
+ );
}
return null;
}
return (
-
- <div className="container-demo">
- {renderErrorMessage()}
- <LRunControl isComputing={isComputing} isConnected={isConnected} handleStop={handleStop} handleSubmit={handleSubmit} setDataPath={setDataPath} setTestRun={setTestRun} setRepoPath={setRepoPath} testRun={testRun} setModel={setModel} tabKey={tabKey} setTabKey={setTabKey}/>
- <div id="demo">
- <hr />
- <div className="panels">
- <AgentFeed feed={agentFeed} highlightedStep={highlightedStep} handleMouseEnter={handleMouseEnter} handleMouseLeave={handleMouseLeave} selfRef={agentFeedRef} otherRef={envFeedRef} />
- <EnvFeed feed={envFeed} highlightedStep={highlightedStep} handleMouseEnter={handleMouseEnter} handleMouseLeave={handleMouseLeave} selfRef={envFeedRef} otherRef={agentFeedRef} />
- <LogPanel logs={logs} logsRef={logsRef} isComputing={isComputing}/>
- </div>
- </div>
- <hr />
- </div>
-
+ <div className="container-demo">
+ {renderErrorMessage()}
+ <LRunControl
+ isComputing={isComputing}
+ isConnected={isConnected}
+ handleStop={handleStop}
+ handleSubmit={handleSubmit}
+ setDataPath={setDataPath}
+ setTestRun={setTestRun}
+ setRepoPath={setRepoPath}
+ testRun={testRun}
+ setModel={setModel}
+ tabKey={tabKey}
+ setTabKey={setTabKey}
+ />
+ <div id="demo">
+ <hr />
+ <div className="panels">
+ <AgentFeed
+ feed={agentFeed}
+ highlightedStep={highlightedStep}
+ handleMouseEnter={handleMouseEnter}
+ handleMouseLeave={handleMouseLeave}
+ selfRef={agentFeedRef}
+ otherRef={envFeedRef}
+ />
+ <EnvFeed
+ feed={envFeed}
+ highlightedStep={highlightedStep}
+ handleMouseEnter={handleMouseEnter}
+ handleMouseLeave={handleMouseLeave}
+ selfRef={envFeedRef}
+ otherRef={agentFeedRef}
+ />
+ <LogPanel logs={logs} logsRef={logsRef} isComputing={isComputing} />
+ </div>
+ </div>
+ <hr />
+ </div>
);
}
export default Run;
-
diff --git a/sweagent/frontend/src/components/AgentMessage.js b/sweagent/frontend/src/components/AgentMessage.js
index c9090bb0..1f1902bf 100644
--- a/sweagent/frontend/src/components/AgentMessage.js
+++ b/sweagent/frontend/src/components/AgentMessage.js
@@ -1,23 +1,29 @@
-import React from 'react';
+import React from "react";
import "../static/message.css";
import "../static/agentMessage.css";
-import {Gear} from 'react-bootstrap-icons';
+import { Gear } from "react-bootstrap-icons";
-const AgentMessage = ({ item, handleMouseEnter, handleMouseLeave, isHighlighted, feedRef }) => {
- const stepClass = item.step !== null ? `step${item.step}` : '';
- const highlightClass = isHighlighted ? 'highlight' : '';
+const AgentMessage = ({
+ item,
+ handleMouseEnter,
+ handleMouseLeave,
+ isHighlighted,
+ feedRef,
+}) => {
+ const stepClass = item.step !== null ? `step${item.step}` : "";
+ const highlightClass = isHighlighted ? "highlight" : "";
- return (
- <div
- className={`message ${item.format} ${stepClass} ${highlightClass}`}
- onMouseEnter={() => handleMouseEnter(item, feedRef)}
- onMouseLeave={handleMouseLeave}
- >
- { item.type !== "thought" && <Gear style={{marginRight: 5}}/>}
- <span>{item.message}</span>
- </div>
- );
+ return (
+ <div
+ className={`message ${item.format} ${stepClass} ${highlightClass}`}
+ onMouseEnter={() => handleMouseEnter(item, feedRef)}
+ onMouseLeave={handleMouseLeave}
+ >
+ {item.type !== "thought" && <Gear style={{ marginRight: 5 }} />}
+ <span>{item.message}</span>
+ </div>
+ );
};
-export default AgentMessage;
\ No newline at end of file
+export default AgentMessage;
diff --git a/sweagent/frontend/src/components/EnvMessage.js b/sweagent/frontend/src/components/EnvMessage.js
index 5fdd5819..69095c8c 100644
--- a/sweagent/frontend/src/components/EnvMessage.js
+++ b/sweagent/frontend/src/components/EnvMessage.js
@@ -1,87 +1,90 @@
-import React from 'react';
+import React from "react";
import "../static/message.css";
import "../static/envMessage.css";
-import {
- Prism as SyntaxHighlighter,
- } from 'react-syntax-highlighter';
-import bash from 'react-syntax-highlighter/dist/esm/languages/prism/bash';
-import { prism } from 'react-syntax-highlighter/dist/esm/styles/prism';
+import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
+import bash from "react-syntax-highlighter/dist/esm/languages/prism/bash";
+import { prism } from "react-syntax-highlighter/dist/esm/styles/prism";
// SyntaxHighlighter.registerLanguage('bash', bash);
function capitalizeFirstLetter(str) {
- return str[0].toUpperCase() + str.slice(1);
+ return str[0].toUpperCase() + str.slice(1);
}
+const EnvMessage = ({
+ item,
+ handleMouseEnter,
+ handleMouseLeave,
+ isHighlighted,
+ feedRef,
+}) => {
+ const stepClass = item.step !== null ? `step${item.step}` : "";
+ const highlightClass = isHighlighted ? "highlight" : "";
+ const messageTypeClass = "envMessage" + capitalizeFirstLetter(item.type);
-const EnvMessage = ({ item, handleMouseEnter, handleMouseLeave, isHighlighted, feedRef}) => {
- const stepClass = item.step !== null ? `step${item.step}` : '';
- const highlightClass = isHighlighted ? 'highlight' : '';
- const messageTypeClass = "envMessage" + capitalizeFirstLetter(item.type);
+ const paddingBottom = item.type === "command" ? "0" : "0.5em";
+ const paddingTop = ["output", "diff"].includes(item.type) ? "0" : "0.5em";
- const paddingBottom = item.type === "command" ? "0" : "0.5em";
- const paddingTop = ["output", "diff"].includes(item.type) ? "0" : "0.5em";
+ const customStyle = {
+ margin: 0,
+ padding: `${paddingTop} 0.5em ${paddingBottom} 0.5em`,
+ overflowX: "hidden",
+ overflowY: "hidden",
+ lineHeight: "100%",
+ backgroundColor: "transparent",
+ fontSize: "93%",
+ };
- const customStyle = {
- margin: 0,
- padding: `${paddingTop} 0.5em ${paddingBottom} 0.5em`,
- overflowX: 'hidden',
- overflowY: 'hidden',
- lineHeight: '100%',
- backgroundColor: 'transparent',
- fontSize: '93%',
- }
+ const codeTagProps = {
+ style: {
+ boxShadow: "none",
+ margin: "0",
+ overflowY: "hidden",
+ overflowX: "hidden",
+ padding: "0",
+ lineHeight: "inherit",
+ fontSize: "93%",
+ },
+ };
- const codeTagProps = {
- style: {
- boxShadow: "none",
- margin: "0",
- overflowY: "hidden",
- overflowX: "hidden",
- padding: "0",
- lineHeight: 'inherit',
- fontSize: '93%',
- }
- }
+ const typeToLanguage = {
+ command: "bash",
+ output: "markdown",
+ diff: "diff",
+ };
- const typeToLanguage = {
- "command": "bash",
- "output": "markdown",
- "diff": "diff",
- }
-
- if (item.format !== "text") {
- return (
- <div
- className={`message envMessage ${stepClass} ${highlightClass} ${messageTypeClass}`}
- onMouseEnter={() => handleMouseEnter(item, feedRef)}
- onMouseLeave={handleMouseLeave}
- >
- <SyntaxHighlighter
- codeTagProps={codeTagProps}
- customStyle={customStyle}
- language={typeToLanguage[item.type]}
- // lineProps={{ style: {wordBreak: 'break-word', whiteSpace: 'normal'} }}
- style={{backgroundColor: 'transparent', ...prism}}
- wrapLines={true}
- showLineNumbers={false}
- >
- {item.message}
- </SyntaxHighlighter>
- </div>
- );
- } else {
- return (
- <div
- className={`message ${stepClass} ${highlightClass} ${messageTypeClass}`}
- onMouseEnter={() => handleMouseEnter(item, feedRef)}
- >
- <span>{item.message}</span>
- </div>
- );
- }
+ if (item.format !== "text") {
+ return (
+ <div
+ className={`message envMessage ${stepClass} ${highlightClass} ${messageTypeClass}`}
+ onMouseEnter={() => handleMouseEnter(item, feedRef)}
+ onMouseLeave={handleMouseLeave}
+ >
+ <SyntaxHighlighter
+ codeTagProps={codeTagProps}
+ customStyle={customStyle}
+ language={typeToLanguage[item.type]}
+ // lineProps={{ style: {wordBreak: 'break-word', whiteSpace: 'normal'} }}
+ style={{ backgroundColor: "transparent", ...prism }}
+ wrapLines={true}
+ showLineNumbers={false}
+ >
+ {item.message}
+ </SyntaxHighlighter>
+ </div>
+ );
+ } else {
+ return (
+ <div
+ className={`message ${stepClass} ${highlightClass} ${messageTypeClass}`}
+ onMouseEnter={() => handleMouseEnter(item, feedRef)}
+ >
+ <span>{item.message}</span>
+ </div>
+ );
+ }
};
-export default EnvMessage;
\ No newline at end of file
+export default EnvMessage;
diff --git a/sweagent/frontend/src/components/Footer.js b/sweagent/frontend/src/components/Footer.js
index 937b2ab2..a1acf556 100644
--- a/sweagent/frontend/src/components/Footer.js
+++ b/sweagent/frontend/src/components/Footer.js
@@ -1,13 +1,16 @@
-import "../static/footer.css"
+import "../static/footer.css";
const Footer = () => {
return (
<footer>
<div>
- <p style={{ fontSize: "smaller" }}>© 2024 John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press</p>
+ <p style={{ fontSize: "smaller" }}>
+ © 2024 John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret,
+ Shunyu Yao, Karthik Narasimhan, Ofir Press
+ </p>
</div>
</footer>
);
};
-export default Footer;
\ No newline at end of file
+export default Footer;
diff --git a/sweagent/frontend/src/components/Header.js b/sweagent/frontend/src/components/Header.js
index 61483a3b..55651c6e 100644
--- a/sweagent/frontend/src/components/Header.js
+++ b/sweagent/frontend/src/components/Header.js
@@ -1,7 +1,7 @@
import React from "react";
import "../static/header.css";
-import logo from '../assets/logo.png'
-import { Link } from 'react-router-dom';
+import logo from "../assets/logo.png";
+import { Link } from "react-router-dom";
const Header = () => {
return (
@@ -11,8 +11,12 @@ const Header = () => {
to="https://github.com/princeton-nlp/swe-agent"
target="_blank"
rel="noopener noreferrer"
- >
- <img src={logo} style={{height: 50, marginRight: 20}} alt="swe agent logo"/>
+ >
+ <img
+ src={logo}
+ style={{ height: 50, marginRight: 20 }}
+ alt="swe agent logo"
+ />
</Link>
{/* <Link to="/">
<button>Home</button>
@@ -29,4 +33,4 @@ const Header = () => {
);
};
-export default Header;
\ No newline at end of file
+export default Header;
diff --git a/sweagent/frontend/src/components/MacBar.js b/sweagent/frontend/src/components/MacBar.js
index 8943a1c5..9745a3b2 100644
--- a/sweagent/frontend/src/components/MacBar.js
+++ b/sweagent/frontend/src/components/MacBar.js
@@ -2,19 +2,14 @@ import React from "react";
import "../static/macbar.css";
-
-const MacBar = ({
- title,
- logo,
- dark=false
-}) => {
- const darkClass = dark ? 'dark' : '';
+const MacBar = ({ title, logo, dark = false }) => {
+ const darkClass = dark ? "dark" : "";
return (
- <div className={`mac-window-top-bar ${darkClass}`} >
- <div className="label">
- <img src={logo} alt="title" />
- <span>{title}</span>
- </div>
+ <div className={`mac-window-top-bar ${darkClass}`}>
+ <div className="label">
+ <img src={logo} alt="title" />
+ <span>{title}</span>
+ </div>
</div>
);
};
diff --git a/sweagent/frontend/src/components/controls/LRunControl.js b/sweagent/frontend/src/components/controls/LRunControl.js
index f94f2cb2..9cbd1c2f 100644
--- a/sweagent/frontend/src/components/controls/LRunControl.js
+++ b/sweagent/frontend/src/components/controls/LRunControl.js
@@ -1,15 +1,28 @@
-import React, { useState } from 'react';
-import { Tab, Tabs } from 'react-bootstrap';
-import Form from 'react-bootstrap/Form';
-import '../../static/runControl.css';
-import { PlayFill, StopFill} from 'react-bootstrap-icons';
+import React, { useState } from "react";
+import { Tab, Tabs } from "react-bootstrap";
+import Form from "react-bootstrap/Form";
+import "../../static/runControl.css";
+import { PlayFill, StopFill } from "react-bootstrap-icons";
-import { Link } from 'react-router-dom';
+import { Link } from "react-router-dom";
-function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDataPath, setTestRun, testRun, setRepoPath, setModel, tabKey, setTabKey}) {
- const [psType, setPsType] = useState('gh');
+function LRunControl({
+ isComputing,
+ isConnected,
+ handleStop,
+ handleSubmit,
+ setDataPath,
+ setTestRun,
+ testRun,
+ setRepoPath,
+ setModel,
+ tabKey,
+ setTabKey,
+}) {
+ const [psType, setPsType] = useState("gh");
- const defaultPS = "https://github.com/marshmallow-code/marshmallow/issues/1359" ;
+ const defaultPS =
+ "https://github.com/marshmallow-code/marshmallow/issues/1359";
const handlePsTypeChange = (event) => {
const selectedType = event.target.value;
@@ -17,37 +30,42 @@ function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDat
};
function getPsInput() {
- if (psType === 'gh') {
+ if (psType === "gh") {
return (
<div className="input-group mb-3">
<span className="input-group-text">GitHub issue URL</span>
- <input
- type="text"
- className="form-control"
+ <input
+ type="text"
+ className="form-control"
onChange={(e) => setDataPath(e.target.value || defaultPS)}
- placeholder={defaultPS}/>
+ placeholder={defaultPS}
+ />
</div>
);
}
- if (psType === 'local') {
+ if (psType === "local") {
return (
<div className="input-group mb-3">
- <span className="input-group-text">Path to local .md or .txt file with problem statement</span>
- <input
- type="text"
- className="form-control"
+ <span className="input-group-text">
+ Path to local .md or .txt file with problem statement
+ </span>
+ <input
+ type="text"
+ className="form-control"
onChange={(e) => setDataPath(e.target.value)}
- placeholder="/path/to/your/local/file.md"/>
+ placeholder="/path/to/your/local/file.md"
+ />
</div>
);
}
- if (psType === 'write') {
+ if (psType === "write") {
return (
- <textarea
- className="form-control"
- onChange={(e) => setDataPath("text://" + e.target.value)}
- rows="5"
- placeholder="Enter problem statement" />
+ <textarea
+ className="form-control"
+ onChange={(e) => setDataPath("text://" + e.target.value)}
+ rows="5"
+ placeholder="Enter problem statement"
+ />
);
}
}
@@ -55,8 +73,7 @@ function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDat
function onTabClicked(keyClicked) {
if (keyClicked === tabKey) {
setTabKey(null);
- }
- else {
+ } else {
setTabKey(keyClicked);
}
}
@@ -73,18 +90,27 @@ function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDat
<div className="p-3">
<div className="input-group mb-3">
<span className="input-group-text">Problem source</span>
- <select className="form-select" aria-label="Select problem statement type" onChange={handlePsTypeChange}>
+ <select
+ className="form-select"
+ aria-label="Select problem statement type"
+ onChange={handlePsTypeChange}
+ >
<option value="gh">GitHub issue URL</option>
<option value="local">Local file</option>
<option value="write">Write here</option>
</select>
</div>
+ <div className="input-group mb-3">{getPsInput()}</div>
<div className="input-group mb-3">
- {getPsInput()}
- </div>
- <div className="input-group mb-3">
- <span className="input-group-text">Local repo path or GitHub URL</span>
- <input type="text" className="form-control" placeholder="Optional when using GitHub issue as problem source" onChange={(e) => setRepoPath(e.target.value)} />
+ <span className="input-group-text">
+ Local repo path or GitHub URL
+ </span>
+ <input
+ type="text"
+ className="form-control"
+ placeholder="Optional when using GitHub issue as problem source"
+ onChange={(e) => setRepoPath(e.target.value)}
+ />
</div>
</div>
</Tab>
@@ -92,7 +118,12 @@ function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDat
<div className="p-3">
<div className="input-group mb-3">
<span className="input-group-text">Model name</span>
- <input type="text" className="form-control" placeholder="gpt4" onChange={(e) => setModel(e.target.value || "gpt4")} />
+ <input
+ type="text"
+ className="form-control"
+ placeholder="gpt4"
+ onChange={(e) => setModel(e.target.value || "gpt4")}
+ />
</div>
<div className="alert alert-info" role="alert">
Please make sure that you have your API keys set in keys.cfg
@@ -101,7 +132,7 @@ function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDat
</Tab>
<Tab eventKey="settings" title="Extra Settings">
<div className="p-3">
- <Form.Check
+ <Form.Check
type="switch"
id="custom-switch"
label="Test run (dummy agent without LM queries)"
@@ -111,27 +142,42 @@ function LRunControl({isComputing, isConnected, handleStop, handleSubmit, setDat
</div>
</Tab>
</Tabs>
- <div className="runControl p-3">
- <div>
- <div className="btn-group" role="group" aria-label="Basic example">
- <button type="submit" className="btn btn-primary" onClick={handleSubmit} disabled={isComputing || !isConnected}><PlayFill/> Run</button>
- <button onClick={handleStop} disabled={!isComputing} className="btn btn-primary"><StopFill/> Stop</button>
+ <div className="runControl p-3">
+ <div>
+ <div className="btn-group" role="group" aria-label="Basic example">
+ <button
+ type="submit"
+ className="btn btn-primary"
+ onClick={handleSubmit}
+ disabled={isComputing || !isConnected}
+ >
+ <PlayFill /> Run
+ </button>
+ <button
+ onClick={handleStop}
+ disabled={!isComputing}
+ className="btn btn-primary"
+ >
+ <StopFill /> Stop
+ </button>
+ </div>
</div>
- </div>
- <div className="extraButtons">
- <div className="btn-group" role="group" aria-label="Basic example">
- <Link
- to="https://github.com/princeton-nlp/SWE-agent"
- target="_blank"
- rel="noopener noreferrer"
- >
- <button type="button" className="btn btn-outline-secondary">GitHub readme</button>
- </Link>
+ <div className="extraButtons">
+ <div className="btn-group" role="group" aria-label="Basic example">
+ <Link
+ to="https://github.com/princeton-nlp/SWE-agent"
+ target="_blank"
+ rel="noopener noreferrer"
+ >
+ <button type="button" className="btn btn-outline-secondary">
+ GitHub readme
+ </button>
+ </Link>
+ </div>
</div>
</div>
</div>
- </div>
);
}
-export default LRunControl;
\ No newline at end of file
+export default LRunControl;
diff --git a/sweagent/frontend/src/components/panels/AgentFeed.js b/sweagent/frontend/src/components/panels/AgentFeed.js
index 9a9857e8..32152d48 100644
--- a/sweagent/frontend/src/components/panels/AgentFeed.js
+++ b/sweagent/frontend/src/components/panels/AgentFeed.js
@@ -1,43 +1,48 @@
-import React, { useEffect } from 'react';
-import Message from '../AgentMessage';
-import MacBar from '../MacBar';
-import workspaceLogo from '../../assets/panel_icons/workspace.png';
+import React, { useEffect } from "react";
+import Message from "../AgentMessage";
+import MacBar from "../MacBar";
+import workspaceLogo from "../../assets/panel_icons/workspace.png";
import "../../static/agentFeed.css";
function useScrollToBottom(feed, ref) {
useEffect(() => {
- if (ref.current) {
- ref.current.scrollTop = ref.current.scrollHeight;
- }
+ if (ref.current) {
+ ref.current.scrollTop = ref.current.scrollHeight;
+ }
}, [feed, ref]);
}
-const AgentFeed = ({ feed, highlightedStep, handleMouseEnter, handleMouseLeave, selfRef, }) => {
- useScrollToBottom(feed, selfRef);
+const AgentFeed = ({
+ feed,
+ highlightedStep,
+ handleMouseEnter,
+ handleMouseLeave,
+ selfRef,
+}) => {
+ useScrollToBottom(feed, selfRef);
- return (
- <div id="agentFeed" className="agentFeed">
- <MacBar
- title="Agent"
- logo={workspaceLogo}
+ return (
+ <div id="agentFeed" className="agentFeed">
+ <MacBar title="Agent" logo={workspaceLogo} />
+ <div className="scrollableDiv" ref={selfRef}>
+ <div className="innerDiv">
+ {feed.map((item, index) => (
+ <Message
+ key={index}
+ item={item}
+ handleMouseEnter={handleMouseEnter}
+ handleMouseLeave={handleMouseLeave}
+ isHighlighted={
+ item.step !== null && highlightedStep === item.step
+ }
+ feedRef={selfRef}
/>
- <div className="scrollableDiv" ref={selfRef} >
- <div className="innerDiv">
- {feed.map((item, index) => (
- <Message
- key={index}
- item={item}
- handleMouseEnter={handleMouseEnter}
- handleMouseLeave={handleMouseLeave}
- isHighlighted={item.step !== null && highlightedStep === item.step}
- feedRef={selfRef}
- />
- ))}
- <div style={{ clear: "both", marginTop: '1em' }}/>
- </div>
- </div>
+ ))}
+ <div style={{ clear: "both", marginTop: "1em" }} />
</div>
- );
+ </div>
+ </div>
+ );
};
export default AgentFeed;
diff --git a/sweagent/frontend/src/components/panels/EnvFeed.js b/sweagent/frontend/src/components/panels/EnvFeed.js
index fbf47cc4..0606dd7d 100644
--- a/sweagent/frontend/src/components/panels/EnvFeed.js
+++ b/sweagent/frontend/src/components/panels/EnvFeed.js
@@ -1,45 +1,49 @@
-import React, { useEffect } from 'react';
-import EnvMessage from '../EnvMessage';
+import React, { useEffect } from "react";
+import EnvMessage from "../EnvMessage";
-import MacBar from '../MacBar';
-import terminalLogo from '../../assets/panel_icons/terminal.png';
+import MacBar from "../MacBar";
+import terminalLogo from "../../assets/panel_icons/terminal.png";
import "../../static/envFeed.css";
function useScrollToBottom(feed, ref) {
useEffect(() => {
- if (ref.current) {
- ref.current.scrollTop = ref.current.scrollHeight;
- }
+ if (ref.current) {
+ ref.current.scrollTop = ref.current.scrollHeight;
+ }
}, [feed, ref]);
}
-const EnvFeed = ({ feed, highlightedStep, handleMouseEnter, handleMouseLeave, selfRef}) => {
- useScrollToBottom(feed, selfRef);
+const EnvFeed = ({
+ feed,
+ highlightedStep,
+ handleMouseEnter,
+ handleMouseLeave,
+ selfRef,
+}) => {
+ useScrollToBottom(feed, selfRef);
- return (
- <div id="envFeed" className="envFeed">
- <MacBar
- title="Terminal"
- logo={terminalLogo}
- dark={false}
+ return (
+ <div id="envFeed" className="envFeed">
+ <MacBar title="Terminal" logo={terminalLogo} dark={false} />
+ <div className="scrollableDiv" ref={selfRef}>
+ <div className="innerDiv">
+ {feed.map((item, index) => (
+ <EnvMessage
+ key={index}
+ item={item}
+ handleMouseEnter={handleMouseEnter}
+ handleMouseLeave={handleMouseLeave}
+ isHighlighted={
+ item.step !== null && highlightedStep === item.step
+ }
+ feedRef={selfRef}
/>
- <div className="scrollableDiv" ref={selfRef} >
- <div className="innerDiv">
- {feed.map((item, index) => (
- <EnvMessage
- key={index}
- item={item}
- handleMouseEnter={handleMouseEnter}
- handleMouseLeave={handleMouseLeave}
- isHighlighted={item.step !== null && highlightedStep === item.step}
- feedRef={selfRef}
- />
- ))}
- <div style={{ clear: "both", marginTop: '1em' }}/>
- </div>
- </div>
+ ))}
+ <div style={{ clear: "both", marginTop: "1em" }} />
</div>
- );
+ </div>
+ </div>
+ );
};
export default EnvFeed;
diff --git a/sweagent/frontend/src/components/panels/LogPanel.js b/sweagent/frontend/src/components/panels/LogPanel.js
index f22e9235..7bcc7045 100644
--- a/sweagent/frontend/src/components/panels/LogPanel.js
+++ b/sweagent/frontend/src/components/panels/LogPanel.js
@@ -1,52 +1,53 @@
-import MacBar from '../MacBar';
-import editorLogo from '../../assets/panel_icons/editor.png';
+import MacBar from "../MacBar";
+import editorLogo from "../../assets/panel_icons/editor.png";
import "../../static/logPanel.css";
-import { Button } from 'react-bootstrap';
-import { Clipboard } from 'react-bootstrap-icons';
+import { Button } from "react-bootstrap";
+import { Clipboard } from "react-bootstrap-icons";
const LogPanel = ({ logs, logsRef, isComputing }) => {
-
const copyToClipboard = (text) => {
// Create a temporary textarea element
- const textarea = document.createElement('textarea');
+ const textarea = document.createElement("textarea");
textarea.value = text;
document.body.appendChild(textarea);
// Select and copy the text
textarea.select();
- document.execCommand('copy');
+ document.execCommand("copy");
// Clean up
document.body.removeChild(textarea);
};
const handleCopy = () => {
- const contentToCopy = document.getElementById('logContent').innerText;
+ const contentToCopy = document.getElementById("logContent").innerText;
copyToClipboard(contentToCopy);
};
- return (
- <div id="logPanel" className="logPanel">
- <MacBar
- logo={editorLogo}
- title="Log file"
- dark={true}
- />
- <div className="scrollableDiv" ref={logsRef}>
- <div className="innerDiv">
- <pre id="logContent">{logs}</pre>
- <div style={{ clear: "both", marginTop: '1em' }}/>
- </div>
- { !isComputing && logs &&
- <div style={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
- <Button variant="light" onClick={handleCopy} style={{marginBottom: 20, marginRight: 20}}>
- <Clipboard /> Copy to clipboard
- </Button>
- </div>
- }
- </div>
+ return (
+ <div id="logPanel" className="logPanel">
+ <MacBar logo={editorLogo} title="Log file" dark={true} />
+ <div className="scrollableDiv" ref={logsRef}>
+ <div className="innerDiv">
+ <pre id="logContent">{logs}</pre>
+ <div style={{ clear: "both", marginTop: "1em" }} />
</div>
- );
+ {!isComputing && logs && (
+ <div
+ style={{ display: "flex", justifyContent: "center", width: "100%" }}
+ >
+ <Button
+ variant="light"
+ onClick={handleCopy}
+ style={{ marginBottom: 20, marginRight: 20 }}
+ >
+ <Clipboard /> Copy to clipboard
+ </Button>
+ </div>
+ )}
+ </div>
+ </div>
+ );
};
export default LogPanel;
diff --git a/sweagent/frontend/src/components/utils/icons/ExpandIcon.js b/sweagent/frontend/src/components/utils/icons/ExpandIcon.js
index 838358a9..ab7ddaab 100644
--- a/sweagent/frontend/src/components/utils/icons/ExpandIcon.js
+++ b/sweagent/frontend/src/components/utils/icons/ExpandIcon.js
@@ -1,16 +1,28 @@
-import React from 'react';
+import React from "react";
const ExpandIcon = ({ fillColor, height, style }) => (
- <svg fill={fillColor} height={height} viewBox="0 0 242.133 242.133" xmlns="http://www.w3.org/2000/svg" style={style}>
+ <svg
+ fill={fillColor}
+ height={height}
+ viewBox="0 0 242.133 242.133"
+ xmlns="http://www.w3.org/2000/svg"
+ style={style}
+ >
<g id="XMLID_25_">
- <path id="XMLID_26_" d="M89.247,131.673l-47.732,47.73l-15.909-15.91c-4.29-4.291-10.742-5.572-16.347-3.252
+ <path
+ id="XMLID_26_"
+ d="M89.247,131.673l-47.732,47.73l-15.909-15.91c-4.29-4.291-10.742-5.572-16.347-3.252
C3.654,162.563,0,168.033,0,174.1v53.032c0,8.284,6.716,15,15,15l53.033,0.001c0.007-0.001,0.012-0.001,0.019,0
c8.285,0,15-6.716,15-15c0-4.377-1.875-8.316-4.865-11.059l-15.458-15.458l47.73-47.729c5.858-5.858,5.858-15.355,0-21.213
- C104.603,125.815,95.104,125.816,89.247,131.673z"/>
- <path id="XMLID_28_" d="M227.133,0H174.1c-6.067,0-11.536,3.655-13.858,9.26c-2.321,5.605-1.038,12.057,3.252,16.347l15.911,15.911
+ C104.603,125.815,95.104,125.816,89.247,131.673z"
+ />
+ <path
+ id="XMLID_28_"
+ d="M227.133,0H174.1c-6.067,0-11.536,3.655-13.858,9.26c-2.321,5.605-1.038,12.057,3.252,16.347l15.911,15.911
l-47.729,47.73c-5.858,5.858-5.858,15.355,0,21.213c2.929,2.929,6.768,4.393,10.606,4.393c3.839,0,7.678-1.464,10.606-4.394
l47.73-47.73l15.909,15.91c2.869,2.87,6.706,4.394,10.609,4.394c1.933,0,3.882-0.373,5.737-1.142
- c5.605-2.322,9.26-7.792,9.26-13.858V15C242.133,6.716,235.417,0,227.133,0z"/>
+ c5.605-2.322,9.26-7.792,9.26-13.858V15C242.133,6.716,235.417,0,227.133,0z"
+ />
</g>
</svg>
);
@@ -19,7 +31,7 @@ const ExpandIcon = ({ fillColor, height, style }) => (
ExpandIcon.defaultProps = {
fillColor: "#000000",
height: "24px",
- style: {}
+ style: {},
};
export default ExpandIcon;
diff --git a/sweagent/frontend/src/index.css b/sweagent/frontend/src/index.css
index 605a75c0..90e6b921 100644
--- a/sweagent/frontend/src/index.css
+++ b/sweagent/frontend/src/index.css
@@ -1,6 +1,6 @@
body {
- font-family: 'basic-sans';
- background-color: #FFF7EC;
+ font-family: "basic-sans";
+ background-color: #fff7ec;
}
hr {
diff --git a/sweagent/frontend/src/index.js b/sweagent/frontend/src/index.js
index 1b42cd2b..f8dbfe34 100644
--- a/sweagent/frontend/src/index.js
+++ b/sweagent/frontend/src/index.js
@@ -1,16 +1,16 @@
-import React from 'react';
-import { createRoot } from 'react-dom/client';
-import { BrowserRouter } from 'react-router-dom';
-import 'bootstrap/dist/css/bootstrap.css';
-import App from './App';
-import reportWebVitals from './reportWebVitals';
+import React from "react";
+import { createRoot } from "react-dom/client";
+import { BrowserRouter } from "react-router-dom";
+import "bootstrap/dist/css/bootstrap.css";
+import App from "./App";
+import reportWebVitals from "./reportWebVitals";
-const container = document.getElementById('root');
+const container = document.getElementById("root");
const root = createRoot(container); // Create a root.
root.render(
<BrowserRouter>
<App />
- </BrowserRouter>
+ </BrowserRouter>,
);
// If you want to start measuring performance in your app, pass a function
diff --git a/sweagent/frontend/src/reportWebVitals.js b/sweagent/frontend/src/reportWebVitals.js
index 5253d3ad..9ecd33f9 100644
--- a/sweagent/frontend/src/reportWebVitals.js
+++ b/sweagent/frontend/src/reportWebVitals.js
@@ -1,6 +1,6 @@
-const reportWebVitals = onPerfEntry => {
+const reportWebVitals = (onPerfEntry) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
+ import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
diff --git a/sweagent/frontend/src/setupTests.js b/sweagent/frontend/src/setupTests.js
index 8f2609b7..1dd407a6 100644
--- a/sweagent/frontend/src/setupTests.js
+++ b/sweagent/frontend/src/setupTests.js
@@ -2,4 +2,4 @@
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
-import '@testing-library/jest-dom';
+import "@testing-library/jest-dom";
diff --git a/sweagent/frontend/src/static/agentFeed.css b/sweagent/frontend/src/static/agentFeed.css
index f726459a..dc7573a2 100644
--- a/sweagent/frontend/src/static/agentFeed.css
+++ b/sweagent/frontend/src/static/agentFeed.css
@@ -1,4 +1,4 @@
.agentFeed {
- grid-column: 1 / 3;
- grid-row: 1 / 5;
-}
\ No newline at end of file
+ grid-column: 1 / 3;
+ grid-row: 1 / 5;
+}
diff --git a/sweagent/frontend/src/static/agentMessage.css b/sweagent/frontend/src/static/agentMessage.css
index 5073890e..a1dd4406 100644
--- a/sweagent/frontend/src/static/agentMessage.css
+++ b/sweagent/frontend/src/static/agentMessage.css
@@ -1,4 +1,4 @@
.agentMessageTitle {
- font-weight: bold;
- color: black;
-}
\ No newline at end of file
+ font-weight: bold;
+ color: black;
+}
diff --git a/sweagent/frontend/src/static/envMessage.css b/sweagent/frontend/src/static/envMessage.css
index a6d0274e..c40008dd 100644
--- a/sweagent/frontend/src/static/envMessage.css
+++ b/sweagent/frontend/src/static/envMessage.css
@@ -4,7 +4,8 @@
/* border-bottom: 1px dashed black; */
}
-.envMessageOutput, .envMessageDiff {
+.envMessageOutput,
+.envMessageDiff {
border-radius: 0em 0em 1em 1em;
margin: 0em 1em 1em 1em;
}
diff --git a/sweagent/frontend/src/static/font.css b/sweagent/frontend/src/static/font.css
index 5d2396a6..a52c4a55 100644
--- a/sweagent/frontend/src/static/font.css
+++ b/sweagent/frontend/src/static/font.css
@@ -1,23 +1,59 @@
@font-face {
-font-family:"basic-sans";
-src:url("https://use.typekit.net/af/8883dd/00000000000000007735abe1/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff2"),url("https://use.typekit.net/af/8883dd/00000000000000007735abe1/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("woff"),url("https://use.typekit.net/af/8883dd/00000000000000007735abe1/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3") format("opentype");
-font-display:auto;font-style:italic;font-weight:600;font-stretch:normal;
+ font-family: "basic-sans";
+ src:
+ url("https://use.typekit.net/af/8883dd/00000000000000007735abe1/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3")
+ format("woff2"),
+ url("https://use.typekit.net/af/8883dd/00000000000000007735abe1/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3")
+ format("woff"),
+ url("https://use.typekit.net/af/8883dd/00000000000000007735abe1/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i6&v=3")
+ format("opentype");
+ font-display: auto;
+ font-style: italic;
+ font-weight: 600;
+ font-stretch: normal;
}
@font-face {
-font-family:"basic-sans";
-src:url("https://use.typekit.net/af/c68f64/00000000000000007735abe6/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff2"),url("https://use.typekit.net/af/c68f64/00000000000000007735abe6/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("woff"),url("https://use.typekit.net/af/c68f64/00000000000000007735abe6/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3") format("opentype");
-font-display:auto;font-style:normal;font-weight:600;font-stretch:normal;
+ font-family: "basic-sans";
+ src:
+ url("https://use.typekit.net/af/c68f64/00000000000000007735abe6/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3")
+ format("woff2"),
+ url("https://use.typekit.net/af/c68f64/00000000000000007735abe6/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3")
+ format("woff"),
+ url("https://use.typekit.net/af/c68f64/00000000000000007735abe6/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n6&v=3")
+ format("opentype");
+ font-display: auto;
+ font-style: normal;
+ font-weight: 600;
+ font-stretch: normal;
}
@font-face {
-font-family:"basic-sans";
-src:url("https://use.typekit.net/af/49252d/00000000000000007735abed/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff2"),url("https://use.typekit.net/af/49252d/00000000000000007735abed/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("woff"),url("https://use.typekit.net/af/49252d/00000000000000007735abed/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3") format("opentype");
-font-display:auto;font-style:italic;font-weight:400;font-stretch:normal;
+ font-family: "basic-sans";
+ src:
+ url("https://use.typekit.net/af/49252d/00000000000000007735abed/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3")
+ format("woff2"),
+ url("https://use.typekit.net/af/49252d/00000000000000007735abed/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3")
+ format("woff"),
+ url("https://use.typekit.net/af/49252d/00000000000000007735abed/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=i4&v=3")
+ format("opentype");
+ font-display: auto;
+ font-style: italic;
+ font-weight: 400;
+ font-stretch: normal;
}
@font-face {
-font-family:"basic-sans";
-src:url("https://use.typekit.net/af/721f9c/00000000000000007735abf2/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff2"),url("https://use.typekit.net/af/721f9c/00000000000000007735abf2/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("woff"),url("https://use.typekit.net/af/721f9c/00000000000000007735abf2/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3") format("opentype");
-font-display:auto;font-style:normal;font-weight:400;font-stretch:normal;
-}
\ No newline at end of file
+ font-family: "basic-sans";
+ src:
+ url("https://use.typekit.net/af/721f9c/00000000000000007735abf2/30/l?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3")
+ format("woff2"),
+ url("https://use.typekit.net/af/721f9c/00000000000000007735abf2/30/d?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3")
+ format("woff"),
+ url("https://use.typekit.net/af/721f9c/00000000000000007735abf2/30/a?primer=7cdcb44be4a7db8877ffa5c0007b8dd865b3bbc383831fe2ea177f62257a9191&fvd=n4&v=3")
+ format("opentype");
+ font-display: auto;
+ font-style: normal;
+ font-weight: 400;
+ font-stretch: normal;
+}
diff --git a/sweagent/frontend/src/static/footer.css b/sweagent/frontend/src/static/footer.css
index 5d471843..c3c1a4e3 100644
--- a/sweagent/frontend/src/static/footer.css
+++ b/sweagent/frontend/src/static/footer.css
@@ -6,4 +6,4 @@ footer {
align-items: center;
justify-content: center;
display: flex;
-}
\ No newline at end of file
+}
diff --git a/sweagent/frontend/src/static/header.css b/sweagent/frontend/src/static/header.css
index 6b8bd901..dd783e86 100644
--- a/sweagent/frontend/src/static/header.css
+++ b/sweagent/frontend/src/static/header.css
@@ -22,7 +22,7 @@ header button {
}
header button::before {
- content: '';
+ content: "";
position: absolute;
bottom: 0;
left: 0;
diff --git a/sweagent/frontend/src/static/index.css b/sweagent/frontend/src/static/index.css
index 605a75c0..90e6b921 100644
--- a/sweagent/frontend/src/static/index.css
+++ b/sweagent/frontend/src/static/index.css
@@ -1,6 +1,6 @@
body {
- font-family: 'basic-sans';
- background-color: #FFF7EC;
+ font-family: "basic-sans";
+ background-color: #fff7ec;
}
hr {
diff --git a/sweagent/frontend/src/static/logPanel.css b/sweagent/frontend/src/static/logPanel.css
index 5fac32d4..85c2000d 100644
--- a/sweagent/frontend/src/static/logPanel.css
+++ b/sweagent/frontend/src/static/logPanel.css
@@ -1,14 +1,14 @@
.logPanel {
- grid-column: 3 / 6;
- grid-row: 3 / 5;
- color: white;
+ grid-column: 3 / 6;
+ grid-row: 3 / 5;
+ color: white;
}
.logPanel .innerDiv {
- padding-left: 1em;
- font-size: 75%;
+ padding-left: 1em;
+ font-size: 75%;
}
.logPanel .scrollableDiv {
- background-color: #1e1e1e !important;
-}
\ No newline at end of file
+ background-color: #1e1e1e !important;
+}
diff --git a/sweagent/frontend/src/static/macbar.css b/sweagent/frontend/src/static/macbar.css
index 9441eb26..09b945e2 100644
--- a/sweagent/frontend/src/static/macbar.css
+++ b/sweagent/frontend/src/static/macbar.css
@@ -1,6 +1,6 @@
.mac-window-top-bar {
background-color: #f0f0f0;
- background-image: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
+ background-image: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
border-top-left-radius: 0.5em;
border-top-right-radius: 0.5em;
height: 2em;
@@ -11,13 +11,16 @@
.mac-window-top-bar.dark {
background-color: #f0f0f0;
- background-image: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.9));
+ background-image: linear-gradient(
+ to bottom,
+ rgba(0, 0, 0, 0.6),
+ rgba(0, 0, 0, 0.9)
+ );
/* messageStyle={{
color: "white",
fontSize: "smaller",
marginBottom: "0.1em",
}} */
-
}
.label {
@@ -38,4 +41,4 @@
.dark .label span {
color: #eae5e5;
-}
\ No newline at end of file
+}
diff --git a/sweagent/frontend/src/static/message.css b/sweagent/frontend/src/static/message.css
index c26c3996..17a42394 100644
--- a/sweagent/frontend/src/static/message.css
+++ b/sweagent/frontend/src/static/message.css
@@ -1,12 +1,12 @@
.message {
- background-color: #eee;
- border-radius: 1em 1em 1em 1em;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- padding: 0.25em 1em;
- margin: 1em;
- overflow-x: hidden;
+ background-color: #eee;
+ border-radius: 1em 1em 1em 1em;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ padding: 0.25em 1em;
+ margin: 1em;
+ overflow-x: hidden;
}
.highlight {
background-color: #c0d6ff;
-}
\ No newline at end of file
+}
diff --git a/sweagent/frontend/src/static/run.css b/sweagent/frontend/src/static/run.css
index ee0dbd85..74315173 100644
--- a/sweagent/frontend/src/static/run.css
+++ b/sweagent/frontend/src/static/run.css
@@ -61,8 +61,6 @@
border-radius: 5px;
} */
-
-
#demo hr {
border-top: 1px dotted #bbb;
margin: 0.5em 0;
@@ -84,17 +82,14 @@
height: 100%;
margin: 0.2em;
overflow: auto;
-
-
}
-
+
.envFeed {
grid-column: 3 / 6;
grid-row: 1 / 3;
height: 95%;
}
-
.innerDiv {
flex-grow: 1;
}
@@ -114,4 +109,4 @@
white-space: pre-wrap;
overflow-x: auto;
}
-}
\ No newline at end of file
+}
diff --git a/sweagent/frontend/src/static/runControl.css b/sweagent/frontend/src/static/runControl.css
index 6f7c5955..97e43d67 100644
--- a/sweagent/frontend/src/static/runControl.css
+++ b/sweagent/frontend/src/static/runControl.css
@@ -1,24 +1,24 @@
.tab-content > .tab-pane {
- border-left: 1px solid #ddd;
- border-right: 1px solid #ddd;
- border-bottom: 1px solid #ddd;
- padding: 10px;
+ border-left: 1px solid #ddd;
+ border-right: 1px solid #ddd;
+ border-bottom: 1px solid #ddd;
+ padding: 10px;
}
.nav-tabs {
- margin-bottom: 0 !important;
+ margin-bottom: 0 !important;
}
.tab-pane {
- background-color: white;
+ background-color: white;
}
-div .runControl{
- background-color: white;
- padding: 10px;
- border-radius: 0 0 0.5em 0.5em;
- border: 1px solid #ddd;
- border-top: none;
- display: flex;
- justify-content: space-between;
-}
\ No newline at end of file
+div .runControl {
+ background-color: white;
+ padding: 10px;
+ border-radius: 0 0 0.5em 0.5em;
+ border: 1px solid #ddd;
+ border-top: none;
+ display: flex;
+ justify-content: space-between;
+}