feat(mcp): Add 5 developer enhancements (git, logs, clipboard watcher, ast skeleton, nvim ghost text)
This commit is contained in:
1 parent
ccc268d807
commit
0e9748f797
27 files changed
+1401
-174
No files matched your search
@@ -473,11 +473,24 @@
|
||||
<span id="app-version" style="font-size:0.8em; color:var(--text-secondary); margin-left:12px; font-family:monospace;"></span>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<button class="theme-toggle" onclick="testClipboard()" title="Test Clipboard Vision Tool" style="background:#3498db; color:white; border-radius:4px; padding:4px 8px; font-size:14px; display:flex; align-items:center; gap:5px;">📋 Inspect Clipboard</button>
|
||||
<button class="theme-toggle" onclick="toggleTheme()" title="Toggle Dark Mode">🌓</button>
|
||||
<div style="font-weight: 500;"><span class="status-dot"></span>System Online</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Clipboard Modal -->
|
||||
<div id="clipboard-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:9999; justify-content:center; align-items:center; flex-direction:column;">
|
||||
<div style="background:var(--card-bg); padding:20px; border-radius:8px; max-width:80%; max-height:80%; display:flex; flex-direction:column; gap:15px; border:1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5);">
|
||||
<div style="display:flex; justify-content:space-between; align-items:center;">
|
||||
<h3 style="margin:0;">Clipboard Vision Extraction</h3>
|
||||
<button onclick="document.getElementById('clipboard-modal').style.display='none'" style="background:none; border:none; color:var(--text-primary); font-size:20px; cursor:pointer;">×</button>
|
||||
</div>
|
||||
<div id="clipboard-result" style="overflow:auto; text-align:center; display:flex; justify-content:center;">
|
||||
<p id="clipboard-loading">Processing clipboard...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-container">
|
||||
<div class="tabs">
|
||||
<button class="tab-button active" onclick="switchTab('graph-tab', this)">Graph Explorer</button>
|
||||
@@ -1192,6 +1205,26 @@
|
||||
`);
|
||||
}
|
||||
|
||||
async function testClipboard() {
|
||||
const modal = document.getElementById('clipboard-modal');
|
||||
const resultDiv = document.getElementById('clipboard-result');
|
||||
modal.style.display = 'flex';
|
||||
resultDiv.innerHTML = '<p id="clipboard-loading" style="color:var(--text-secondary);">Analyzing your clipboard...</p>';
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/clipboard/capture', { method: 'POST' });
|
||||
const data = await res.json();
|
||||
|
||||
if (data.success) {
|
||||
resultDiv.innerHTML = `<img src="${data.image}" style="max-width:100%; max-height:60vh; border-radius:4px; border:1px solid var(--border-color); box-shadow: 0 5px 15px rgba(0,0,0,0.3);" />`;
|
||||
} else {
|
||||
resultDiv.innerHTML = `<p style="color:var(--error-color); font-weight:bold;">Failed to read clipboard: ${data.error}</p>`;
|
||||
}
|
||||
} catch (err) {
|
||||
resultDiv.innerHTML = `<p style="color:var(--error-color); font-weight:bold;">Error calling endpoint: ${err.message}</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
async function loadVersion() {
|
||||
try {
|
||||
const res = await fetch('/api/version');
|
||||
|
||||
Reference in new issue
Block a user