diff --git a/app/static/js/monaco_editor.js b/app/static/js/monaco_editor.js
index 1bab1c7..f453a3f 100644
--- a/app/static/js/monaco_editor.js
+++ b/app/static/js/monaco_editor.js
@@ -50,16 +50,31 @@ function initializeWorkspaceEditor() {
}
function insertTextAtCursor(text) {
- if (!workspaceMonacoEditor) return;
+ console.log('[insertTextAtCursor] Called with text:', text);
+ console.log('[insertTextAtCursor] Type of text:', typeof text);
+ console.trace('Stack trace for insertTextAtCursor');
+
+ if (!workspaceMonacoEditor) {
+ console.error('[insertTextAtCursor] No workspace editor available');
+ return;
+ }
+
+ if (text === 'Unknown' || text === undefined || text === null || text === 'undefined') {
+ console.error('[insertTextAtCursor] WARNING: Attempting to insert problematic text:', text);
+ console.trace('Stack trace for problematic insertion');
+ // Block insertion of "Unknown"
+ return;
+ }
const selection = workspaceMonacoEditor.getSelection();
const position = selection.getStartPosition();
+ console.log('[insertTextAtCursor] Executing edit at position:', position);
workspaceMonacoEditor.executeEdits('quickaction-insert', [{
range: new monaco.Range(position.lineNumber, position.column, position.lineNumber, position.column),
text: text
}]);
- console.log("Inserted text:", text);
+ console.log("[insertTextAtCursor] Successfully inserted text:", text);
// Move cursor to end of inserted text
const newPosition = new monaco.Position(position.lineNumber, position.column + text.length);
diff --git a/app/templates/base.html b/app/templates/base.html
index 8daa445..187cf8c 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -26,6 +26,22 @@
{% include 'components/styles.html' %}
+
{% include 'components/navbar.html' %}
diff --git a/app/templates/components/quick_actions.html b/app/templates/components/quick_actions.html
index 7b8be7c..2f49e2b 100644
--- a/app/templates/components/quick_actions.html
+++ b/app/templates/components/quick_actions.html
@@ -139,6 +139,21 @@
workspaceSection.style.transition = 'opacity 300ms ease-in-out';
}
+ // Debug: Global click logger to catch ALL clicks
+ document.addEventListener('click', function(e) {
+ const target = e.target;
+ const button = target.closest('button');
+ if (button) {
+ console.log('[GLOBAL CLICK DEBUG] Button clicked:', {
+ button: button,
+ onclick: button.getAttribute('onclick'),
+ classes: button.className,
+ text: button.textContent.trim(),
+ target: target
+ });
+ }
+ }, true); // Use capture phase to get it early
+
// Load actions from backend
loadActionsFromBackend();
});
@@ -173,40 +188,49 @@
// Render agents (max 4)
const agentsContainer = document.getElementById('agents-container');
if (agentsContainer && data.agents) {
- agentsContainer.innerHTML = data.agents.slice(0, 4).map(agent => `
-