fuck you, undo that shit
Browse files- components/footer.js +1 -57
- components/navbar.js +1 -76
- index.html +1 -100
- script.js +0 -185
- style.css +0 -81
components/footer.js
CHANGED
|
@@ -1,57 +1 @@
|
|
| 1 |
-
|
| 2 |
-
connectedCallback() {
|
| 3 |
-
this.attachShadow({ mode: 'open' });
|
| 4 |
-
this.shadowRoot.innerHTML = `
|
| 5 |
-
<style>
|
| 6 |
-
footer {
|
| 7 |
-
background: var(--panel-bg-color);
|
| 8 |
-
color: var(--text-primary);
|
| 9 |
-
padding: 2rem;
|
| 10 |
-
text-align: center;
|
| 11 |
-
margin-top: auto;
|
| 12 |
-
}
|
| 13 |
-
.footer-content {
|
| 14 |
-
max-width: 1200px;
|
| 15 |
-
margin: 0 auto;
|
| 16 |
-
}
|
| 17 |
-
.footer-links {
|
| 18 |
-
display: flex;
|
| 19 |
-
justify-content: center;
|
| 20 |
-
gap: 2rem;
|
| 21 |
-
margin-bottom: 1.5rem;
|
| 22 |
-
}
|
| 23 |
-
.footer-links a {
|
| 24 |
-
color: #93c5fd;
|
| 25 |
-
text-decoration: none;
|
| 26 |
-
transition: color 0.2s;
|
| 27 |
-
}
|
| 28 |
-
.footer-links a:hover {
|
| 29 |
-
color: white;
|
| 30 |
-
}
|
| 31 |
-
.copyright {
|
| 32 |
-
font-size: 0.875rem;
|
| 33 |
-
color: #9ca3af;
|
| 34 |
-
}
|
| 35 |
-
@media (max-width: 640px) {
|
| 36 |
-
.footer-links {
|
| 37 |
-
flex-direction: column;
|
| 38 |
-
gap: 1rem;
|
| 39 |
-
}
|
| 40 |
-
}
|
| 41 |
-
</style>
|
| 42 |
-
<footer>
|
| 43 |
-
<div class="footer-content">
|
| 44 |
-
<div class="footer-links">
|
| 45 |
-
<a href="#"><i data-feather="github"></i> GitHub</a>
|
| 46 |
-
<a href="#"><i data-feather="file-text"></i> Documentation</a>
|
| 47 |
-
<a href="#"><i data-feather="mail"></i> Contact</a>
|
| 48 |
-
</div>
|
| 49 |
-
<div class="copyright">
|
| 50 |
-
© ${new Date().getFullYear()} FileMaster Control Panel. All rights reserved.
|
| 51 |
-
</div>
|
| 52 |
-
</div>
|
| 53 |
-
</footer>
|
| 54 |
-
`;
|
| 55 |
-
}
|
| 56 |
-
}
|
| 57 |
-
customElements.define('custom-footer', CustomFooter);
|
|
|
|
| 1 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
components/navbar.js
CHANGED
|
@@ -1,76 +1 @@
|
|
| 1 |
-
|
| 2 |
-
connectedCallback() {
|
| 3 |
-
this.attachShadow({ mode: 'open' });
|
| 4 |
-
this.shadowRoot.innerHTML = `
|
| 5 |
-
<style>
|
| 6 |
-
nav {
|
| 7 |
-
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
|
| 8 |
-
padding: 1rem 2rem;
|
| 9 |
-
display: flex;
|
| 10 |
-
justify-content: space-between;
|
| 11 |
-
align-items: center;
|
| 12 |
-
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
| 13 |
-
position: relative;
|
| 14 |
-
z-index: 50;
|
| 15 |
-
}
|
| 16 |
-
.logo {
|
| 17 |
-
color: white;
|
| 18 |
-
font-weight: bold;
|
| 19 |
-
font-size: 1.5rem;
|
| 20 |
-
display: flex;
|
| 21 |
-
align-items: center;
|
| 22 |
-
gap: 0.5rem;
|
| 23 |
-
}
|
| 24 |
-
.logo-icon {
|
| 25 |
-
width: 24px;
|
| 26 |
-
height: 24px;
|
| 27 |
-
}
|
| 28 |
-
ul {
|
| 29 |
-
display: flex;
|
| 30 |
-
gap: 1.5rem;
|
| 31 |
-
list-style: none;
|
| 32 |
-
margin: 0;
|
| 33 |
-
padding: 0;
|
| 34 |
-
}
|
| 35 |
-
a {
|
| 36 |
-
color: white;
|
| 37 |
-
text-decoration: none;
|
| 38 |
-
font-weight: 500;
|
| 39 |
-
padding: 0.5rem 1rem;
|
| 40 |
-
border-radius: 0.375rem;
|
| 41 |
-
transition: background-color 0.2s;
|
| 42 |
-
}
|
| 43 |
-
a:hover {
|
| 44 |
-
background-color: rgba(255, 255, 255, 0.1);
|
| 45 |
-
}
|
| 46 |
-
@media (max-width: 640px) {
|
| 47 |
-
nav {
|
| 48 |
-
flex-direction: column;
|
| 49 |
-
padding: 1rem;
|
| 50 |
-
}
|
| 51 |
-
ul {
|
| 52 |
-
margin-top: 1rem;
|
| 53 |
-
width: 100%;
|
| 54 |
-
justify-content: space-around;
|
| 55 |
-
}
|
| 56 |
-
a {
|
| 57 |
-
padding: 0.5rem;
|
| 58 |
-
}
|
| 59 |
-
}
|
| 60 |
-
</style>
|
| 61 |
-
<nav>
|
| 62 |
-
<div class="logo">
|
| 63 |
-
<svg class="logo-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
| 64 |
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
| 65 |
-
</svg>
|
| 66 |
-
<span>FileMaster</span>
|
| 67 |
-
</div>
|
| 68 |
-
<ul>
|
| 69 |
-
<li><a href="#"><i data-feather="home"></i> Home</a></li>
|
| 70 |
-
<li><a href="#"><i data-feather="help-circle"></i> Documentation</a></li>
|
| 71 |
-
</ul>
|
| 72 |
-
</nav>
|
| 73 |
-
`;
|
| 74 |
-
}
|
| 75 |
-
}
|
| 76 |
-
customElements.define('custom-navbar', CustomNavbar);
|
|
|
|
| 1 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index.html
CHANGED
|
@@ -1,100 +1 @@
|
|
| 1 |
-
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>FileMaster Control Panel</title>
|
| 7 |
-
<link rel="stylesheet" href="style.css">
|
| 8 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
-
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
-
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
-
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
|
| 12 |
-
<script src="components/navbar.js"></script>
|
| 13 |
-
<script src="components/footer.js"></script>
|
| 14 |
-
</head>
|
| 15 |
-
<body class="bg-gray-100 min-h-screen flex flex-col">
|
| 16 |
-
<custom-navbar></custom-navbar>
|
| 17 |
-
<main class="flex-grow container mx-auto px-4 py-8">
|
| 18 |
-
<div id="vanta-bg" class="absolute top-0 left-0 w-full h-full z-0"></div>
|
| 19 |
-
|
| 20 |
-
<div class="relative z-10 max-w-4xl mx-auto">
|
| 21 |
-
<header class="text-center mb-8">
|
| 22 |
-
<h1 class="text-4xl font-bold text-primary mb-2">FileMaster Control Panel</h1>
|
| 23 |
-
<p class="text-xl text-secondary">A client to interact with the File Operations toolkit server</p>
|
| 24 |
-
</header>
|
| 25 |
-
|
| 26 |
-
<div class="bg-panel-bg-color rounded-xl shadow-lg p-6 mb-8 border border-border-color">
|
| 27 |
-
<div class="mb-6">
|
| 28 |
-
<label for="tool-select" class="block text-lg font-medium text-gray-700 mb-2">Select a Tool</label>
|
| 29 |
-
<select id="tool-select" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
| 30 |
-
<option value="list_files">List Files</option>
|
| 31 |
-
<option value="read_file">Read File</option>
|
| 32 |
-
<option value="create_file">Create File</option>
|
| 33 |
-
<option value="write_file">Write to File</option>
|
| 34 |
-
<option value="delete_file">Delete File</option>
|
| 35 |
-
<option value="identify_log_errors">Identify Log Errors</option>
|
| 36 |
-
</select>
|
| 37 |
-
<p id="tool-description" class="mt-2 text-gray-600">Lists files and directories in a given path.</p>
|
| 38 |
-
</div>
|
| 39 |
-
|
| 40 |
-
<form id="tool-form">
|
| 41 |
-
<div id="parameters-container">
|
| 42 |
-
<div class="mb-4">
|
| 43 |
-
<label for="path" class="block text-sm font-medium text-gray-700 mb-1">Directory Path</label>
|
| 44 |
-
<input type="text" id="path" name="path" class="w-full p-2 border border-gray-300 rounded-md" value="C:\temp" required>
|
| 45 |
-
</div>
|
| 46 |
-
</div>
|
| 47 |
-
|
| 48 |
-
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
|
| 49 |
-
<span id="submit-text">Run: List Files</span>
|
| 50 |
-
<div id="loader" class="hidden ml-2">
|
| 51 |
-
<div class="inline-block animate-spin rounded-full h-5 w-5 border-b-2 border-white"></div>
|
| 52 |
-
</div>
|
| 53 |
-
</button>
|
| 54 |
-
</form>
|
| 55 |
-
</div>
|
| 56 |
-
|
| 57 |
-
<div id="status-card" class="hidden bg-blue-50 rounded-xl shadow-lg p-6 mb-8 text-center">
|
| 58 |
-
<div class="flex justify-center mb-4">
|
| 59 |
-
<div class="animate-pulse flex space-x-2">
|
| 60 |
-
<div class="h-3 w-3 bg-blue-500 rounded-full"></div>
|
| 61 |
-
<div class="h-3 w-3 bg-blue-500 rounded-full"></div>
|
| 62 |
-
<div class="h-3 w-3 bg-blue-500 rounded-full"></div>
|
| 63 |
-
</div>
|
| 64 |
-
</div>
|
| 65 |
-
<p class="text-blue-700">Communicating with FileMaster Server...</p>
|
| 66 |
-
</div>
|
| 67 |
-
|
| 68 |
-
<div id="error-card" class="hidden bg-red-50 rounded-xl shadow-lg p-6 mb-8">
|
| 69 |
-
<h2 class="text-xl font-bold text-red-700 mb-2">Error</h2>
|
| 70 |
-
<pre id="error-message" class="text-red-600 whitespace-pre-wrap"></pre>
|
| 71 |
-
</div>
|
| 72 |
-
|
| 73 |
-
<div id="result-card" class="hidden bg-green-50 rounded-xl shadow-lg p-6">
|
| 74 |
-
<h2 id="result-title" class="text-xl font-bold text-green-700 mb-2"></h2>
|
| 75 |
-
<pre id="result-content" class="text-gray-800 whitespace-pre-wrap"></pre>
|
| 76 |
-
</div>
|
| 77 |
-
</div>
|
| 78 |
-
</main>
|
| 79 |
-
|
| 80 |
-
<custom-footer></custom-footer>
|
| 81 |
-
|
| 82 |
-
<script src="script.js"></script>
|
| 83 |
-
<script>
|
| 84 |
-
feather.replace();
|
| 85 |
-
VANTA.GLOBE({
|
| 86 |
-
el: "#vanta-bg",
|
| 87 |
-
mouseControls: true,
|
| 88 |
-
touchControls: true,
|
| 89 |
-
gyroControls: false,
|
| 90 |
-
minHeight: 200.00,
|
| 91 |
-
minWidth: 200.00,
|
| 92 |
-
scale: 1.00,
|
| 93 |
-
scaleMobile: 1.00,
|
| 94 |
-
color: 0x3b82f6,
|
| 95 |
-
backgroundColor: 0xf1f5f9
|
| 96 |
-
});
|
| 97 |
-
</script>
|
| 98 |
-
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 99 |
-
</body>
|
| 100 |
-
</html>
|
|
|
|
| 1 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
script.js
CHANGED
|
@@ -1,186 +1 @@
|
|
| 1 |
-
// Tool definitions
|
| 2 |
-
const TOOLS = [
|
| 3 |
-
{
|
| 4 |
-
value: 'list_files',
|
| 5 |
-
label: 'List Files',
|
| 6 |
-
description: 'Lists files and directories in a given path.',
|
| 7 |
-
params: [{ name: 'path', type: 'text', label: 'Directory Path' }],
|
| 8 |
-
color: 'var(--color-primary)'
|
| 9 |
-
},
|
| 10 |
-
{
|
| 11 |
-
value: 'read_file',
|
| 12 |
-
label: 'Read File',
|
| 13 |
-
description: 'Reads the content of a specific file.',
|
| 14 |
-
params: [{ name: 'path', type: 'text', label: 'File Path' }]
|
| 15 |
-
},
|
| 16 |
-
{
|
| 17 |
-
value: 'create_file',
|
| 18 |
-
label: 'Create File',
|
| 19 |
-
description: 'Creates a new file with optional content.',
|
| 20 |
-
params: [
|
| 21 |
-
{ name: 'path', type: 'text', label: 'New File Path' },
|
| 22 |
-
{ name: 'content', type: 'textarea', label: 'Initial Content (optional)' }
|
| 23 |
-
]
|
| 24 |
-
},
|
| 25 |
-
{
|
| 26 |
-
value: 'write_file',
|
| 27 |
-
label: 'Write to File',
|
| 28 |
-
description: 'Writes content to a file, creating a backup first.',
|
| 29 |
-
params: [
|
| 30 |
-
{ name: 'path', type: 'text', label: 'File Path' },
|
| 31 |
-
{ name: 'content', type: 'textarea', label: 'New Content' }
|
| 32 |
-
]
|
| 33 |
-
},
|
| 34 |
-
{
|
| 35 |
-
value: 'delete_file',
|
| 36 |
-
label: 'Delete File',
|
| 37 |
-
description: 'Deletes a specific file.',
|
| 38 |
-
params: [{ name: 'path', type: 'text', label: 'File to Delete' }]
|
| 39 |
-
},
|
| 40 |
-
{
|
| 41 |
-
value: 'identify_log_errors',
|
| 42 |
-
label: 'Identify Log Errors',
|
| 43 |
-
description: 'Scans a log file for common error messages.',
|
| 44 |
-
params: [{ name: 'log_file_path', type: 'text', label: 'Log File Path' }]
|
| 45 |
-
}
|
| 46 |
-
];
|
| 47 |
|
| 48 |
-
// DOM elements
|
| 49 |
-
const toolSelect = document.getElementById('tool-select');
|
| 50 |
-
const toolDescription = document.getElementById('tool-description');
|
| 51 |
-
const parametersContainer = document.getElementById('parameters-container');
|
| 52 |
-
const toolForm = document.getElementById('tool-form');
|
| 53 |
-
const submitText = document.getElementById('submit-text');
|
| 54 |
-
const loader = document.getElementById('loader');
|
| 55 |
-
const statusCard = document.getElementById('status-card');
|
| 56 |
-
const errorCard = document.getElementById('error-card');
|
| 57 |
-
const errorMessage = document.getElementById('error-message');
|
| 58 |
-
const resultCard = document.getElementById('result-card');
|
| 59 |
-
const resultTitle = document.getElementById('result-title');
|
| 60 |
-
const resultContent = document.getElementById('result-content');
|
| 61 |
-
|
| 62 |
-
// Current tool state
|
| 63 |
-
let currentTool = TOOLS[0];
|
| 64 |
-
let parameters = { path: 'C:\\temp' };
|
| 65 |
-
|
| 66 |
-
// Initialize the form
|
| 67 |
-
function initializeForm() {
|
| 68 |
-
// Set initial tool description
|
| 69 |
-
toolDescription.textContent = currentTool.description;
|
| 70 |
-
|
| 71 |
-
// Set initial submit button text
|
| 72 |
-
submitText.textContent = `Run: ${currentTool.label}`;
|
| 73 |
-
|
| 74 |
-
// Build parameters UI
|
| 75 |
-
buildParametersUI();
|
| 76 |
-
}
|
| 77 |
-
|
| 78 |
-
// Build parameters UI based on current tool
|
| 79 |
-
function buildParametersUI() {
|
| 80 |
-
parametersContainer.innerHTML = '';
|
| 81 |
-
|
| 82 |
-
currentTool.params.forEach(param => {
|
| 83 |
-
const div = document.createElement('div');
|
| 84 |
-
div.className = 'mb-4';
|
| 85 |
-
|
| 86 |
-
const label = document.createElement('label');
|
| 87 |
-
label.className = 'block text-sm font-medium text-gray-700 mb-1';
|
| 88 |
-
label.htmlFor = param.name;
|
| 89 |
-
label.textContent = param.label;
|
| 90 |
-
|
| 91 |
-
let input;
|
| 92 |
-
|
| 93 |
-
if (param.type === 'textarea') {
|
| 94 |
-
input = document.createElement('textarea');
|
| 95 |
-
input.className = 'w-full p-2 border border-gray-300 rounded-md';
|
| 96 |
-
input.id = param.name;
|
| 97 |
-
input.name = param.name;
|
| 98 |
-
input.value = parameters[param.name] || '';
|
| 99 |
-
} else {
|
| 100 |
-
input = document.createElement('input');
|
| 101 |
-
input.type = 'text';
|
| 102 |
-
input.className = 'w-full p-2 border border-gray-300 rounded-md';
|
| 103 |
-
input.id = param.name;
|
| 104 |
-
input.name = param.name;
|
| 105 |
-
input.value = parameters[param.name] || '';
|
| 106 |
-
}
|
| 107 |
-
|
| 108 |
-
input.required = true;
|
| 109 |
-
|
| 110 |
-
div.appendChild(label);
|
| 111 |
-
div.appendChild(input);
|
| 112 |
-
parametersContainer.appendChild(div);
|
| 113 |
-
|
| 114 |
-
// Add event listener to update parameters state
|
| 115 |
-
input.addEventListener('input', (e) => {
|
| 116 |
-
parameters[param.name] = e.target.value;
|
| 117 |
-
});
|
| 118 |
-
});
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
-
// Handle tool selection change
|
| 122 |
-
toolSelect.addEventListener('change', (e) => {
|
| 123 |
-
const toolValue = e.target.value;
|
| 124 |
-
currentTool = TOOLS.find(tool => tool.value === toolValue);
|
| 125 |
-
|
| 126 |
-
// Update UI
|
| 127 |
-
toolDescription.textContent = currentTool.description;
|
| 128 |
-
submitText.textContent = `Run: ${currentTool.label}`;
|
| 129 |
-
|
| 130 |
-
// Reset parameters
|
| 131 |
-
parameters = {};
|
| 132 |
-
|
| 133 |
-
// Rebuild parameters UI
|
| 134 |
-
buildParametersUI();
|
| 135 |
-
});
|
| 136 |
-
|
| 137 |
-
// Handle form submission
|
| 138 |
-
toolForm.addEventListener('submit', async (e) => {
|
| 139 |
-
e.preventDefault();
|
| 140 |
-
|
| 141 |
-
// Show loading state
|
| 142 |
-
loader.classList.remove('hidden');
|
| 143 |
-
submitText.textContent = 'Running...';
|
| 144 |
-
statusCard.classList.remove('hidden');
|
| 145 |
-
errorCard.classList.add('hidden');
|
| 146 |
-
resultCard.classList.add('hidden');
|
| 147 |
-
|
| 148 |
-
const invocation_id = `filemaster-ui-${Date.now()}`;
|
| 149 |
-
const endpoint = `http://127.0.0.1:8000/mcp/invoke/${currentTool.value}`;
|
| 150 |
-
|
| 151 |
-
try {
|
| 152 |
-
const res = await fetch(endpoint, {
|
| 153 |
-
method: 'POST',
|
| 154 |
-
headers: { 'Content-Type': 'application/json' },
|
| 155 |
-
body: JSON.stringify({
|
| 156 |
-
tool_name: currentTool.value,
|
| 157 |
-
invocation_id,
|
| 158 |
-
parameters,
|
| 159 |
-
}),
|
| 160 |
-
});
|
| 161 |
-
|
| 162 |
-
const data = await res.json();
|
| 163 |
-
|
| 164 |
-
if (!res.ok || data.result?.status === 'error') {
|
| 165 |
-
throw new Error(data.result?.message || `Server responded with status: ${res.status}`);
|
| 166 |
-
}
|
| 167 |
-
|
| 168 |
-
// Show success result
|
| 169 |
-
resultTitle.textContent = `Result for Invocation: ${data.invocation_id}`;
|
| 170 |
-
resultContent.textContent = JSON.stringify(data.result, null, 2);
|
| 171 |
-
resultCard.classList.remove('hidden');
|
| 172 |
-
|
| 173 |
-
} catch (err) {
|
| 174 |
-
// Show error
|
| 175 |
-
errorMessage.textContent = err instanceof Error ? err.message : 'An unknown error occurred.';
|
| 176 |
-
errorCard.classList.remove('hidden');
|
| 177 |
-
} finally {
|
| 178 |
-
// Hide loading state
|
| 179 |
-
loader.classList.add('hidden');
|
| 180 |
-
submitText.textContent = `Run: ${currentTool.label}`;
|
| 181 |
-
statusCard.classList.add('hidden');
|
| 182 |
-
}
|
| 183 |
-
});
|
| 184 |
-
|
| 185 |
-
// Initialize the app
|
| 186 |
-
initializeForm();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style.css
CHANGED
|
@@ -1,82 +1 @@
|
|
| 1 |
-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
-
:root {
|
| 3 |
-
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
| 4 |
-
--font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
| 5 |
|
| 6 |
-
--bg-color: #111827;
|
| 7 |
-
--panel-bg-color: #1f2937;
|
| 8 |
-
--input-bg-color: #111827;
|
| 9 |
-
--modal-bg-color: #1f2937;
|
| 10 |
-
|
| 11 |
-
--border-color: #374151;
|
| 12 |
-
--border-color-focus: #10b981;
|
| 13 |
-
|
| 14 |
-
--text-primary: #f3f4f6;
|
| 15 |
-
--text-secondary: #9ca3af;
|
| 16 |
-
--text-muted: #6b7285;
|
| 17 |
-
|
| 18 |
-
--color-primary: #10b981;
|
| 19 |
-
--color-primary-hover: #10f9b1;
|
| 20 |
-
--color-secondary: #22d3ee;
|
| 21 |
-
--color-secondary-hover: #67e8f9;
|
| 22 |
-
--color-tertiary: #facc15;
|
| 23 |
-
--color-quaternary: #a78bfa;
|
| 24 |
-
--color-danger: #f87171;
|
| 25 |
-
--color-orange: #f97316;
|
| 26 |
-
|
| 27 |
-
--win-item-hover-bg: rgba(255, 255, 255, 0.08);
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
body {
|
| 31 |
-
font-family: var(--font-sans);
|
| 32 |
-
background-color: var(--bg-color);
|
| 33 |
-
color: var(--text-primary);
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
#vanta-bg {
|
| 37 |
-
position: fixed;
|
| 38 |
-
top: 0;
|
| 39 |
-
left: 0;
|
| 40 |
-
width: 100%;
|
| 41 |
-
height: 100%;
|
| 42 |
-
z-index: -1;
|
| 43 |
-
opacity: 0.1;
|
| 44 |
-
}
|
| 45 |
-
pre {
|
| 46 |
-
background-color: var(--input-bg-color);
|
| 47 |
-
padding: 1rem;
|
| 48 |
-
border-radius: 0.5rem;
|
| 49 |
-
overflow-x: auto;
|
| 50 |
-
border: 1px solid var(--border-color);
|
| 51 |
-
color: var(--text-primary);
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
textarea {
|
| 55 |
-
min-height: 150px;
|
| 56 |
-
resize: vertical;
|
| 57 |
-
background-color: var(--input-bg-color);
|
| 58 |
-
border: 1px solid var(--border-color);
|
| 59 |
-
color: var(--text-primary);
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
.button {
|
| 63 |
-
background-color: var(--color-primary);
|
| 64 |
-
color: white;
|
| 65 |
-
border: none;
|
| 66 |
-
padding: 0.5rem 1rem;
|
| 67 |
-
border-radius: 0.5rem;
|
| 68 |
-
cursor: pointer;
|
| 69 |
-
transition: background-color 0.2s;
|
| 70 |
-
}
|
| 71 |
-
|
| 72 |
-
.button:hover {
|
| 73 |
-
background-color: var(--color-primary-hover);
|
| 74 |
-
}
|
| 75 |
-
@keyframes spin {
|
| 76 |
-
from { transform: rotate(0deg); }
|
| 77 |
-
to { transform: rotate(360deg); }
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
.animate-spin {
|
| 81 |
-
animation: spin 1s linear infinite;
|
| 82 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|