Skip to content

Commit 61d1168

Browse files
committed
remove placeholders in monaco
1 parent 54bcf64 commit 61d1168

File tree

2 files changed

+13
-59
lines changed

2 files changed

+13
-59
lines changed

app/static/js/file_tree.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ async function openFile(path) {
209209
const state = window.workspaceManager?.getState();
210210
if (!state || !state.files[path]) {
211211
console.error('File not found:', path);
212-
window.workspaceMonacoEditor.setValue(`⚠️ File not found: "${path}"`);
212+
// Update file path label to show error
213+
updateFilePathLabel(null, `⚠️ File not found: "${path}"`);
214+
// Clear editor
215+
window.workspaceMonacoEditor.setValue('');
213216
return;
214217
}
215218

@@ -229,11 +232,15 @@ async function openFile(path) {
229232
}
230233

231234
// Update file path label
232-
function updateFilePathLabel(path) {
235+
function updateFilePathLabel(path, errorMessage) {
233236
const filePathElement = document.getElementById('current-file-path');
234237
if (!filePathElement) return;
235238

236-
if (path) {
239+
if (errorMessage) {
240+
filePathElement.textContent = errorMessage;
241+
filePathElement.className = 'text-xs text-red-600 bg-red-50 px-2 py-1 border border-red-300 rounded';
242+
filePathElement.style.fontFamily = "'Courier New', monospace";
243+
} else if (path) {
237244
filePathElement.textContent = path;
238245
filePathElement.className = 'text-xs text-gray-600 bg-gray-50 px-2 py-1 border border-gray-300 rounded';
239246
filePathElement.style.fontFamily = "'Courier New', monospace";

app/static/js/monaco_editor.js

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -73,62 +73,9 @@ function initializeQuickActionHandlers() {
7373
}
7474

7575
function updateWorkspaceEditor(tabId) {
76-
if (!workspaceMonacoEditor) return;
77-
78-
const editorContent = {
79-
'tab-claude': {
80-
content: `# Claude Configuration
81-
82-
## Subagents
83-
- Researcher: Information gathering specialist
84-
- Memory Manager: Context and history management
85-
86-
## Guidelines
87-
- Python: PEP 8 compliance, type hints
88-
- Code quality: Clean, documented, tested
89-
90-
## MCPs (Model Context Protocols)
91-
- Database integration
92-
- File system access
93-
- API connections`,
94-
language: 'markdown'
95-
},
96-
'tab-cursor': {
97-
content: `// Cursor/VS Code Configuration
98-
99-
{
100-
"rules": [
101-
"Always use TypeScript for new files",
102-
"Prefer functional components in React",
103-
"Use meaningful variable names",
104-
"Add JSDoc comments for functions"
105-
],
106-
"preferences": {
107-
"tabSize": 2,
108-
"insertSpaces": true,
109-
"trimTrailingWhitespace": true
110-
},
111-
"extensions": [
112-
"Prettier",
113-
"ESLint",
114-
"GitLens",
115-
"Auto Rename Tag"
116-
]
117-
}`,
118-
language: 'json'
119-
}
120-
};
121-
122-
const config = editorContent[tabId];
123-
if (config) {
124-
workspaceMonacoEditor.setValue(config.content);
125-
monaco.editor.setModelLanguage(workspaceMonacoEditor.getModel(), config.language);
126-
console.log("Updated workspace editor:", config.content);
127-
const languageSelect = document.getElementById('workspace-language-select');
128-
if (languageSelect) {
129-
languageSelect.value = config.language;
130-
}
131-
}
76+
// This function is no longer needed as we're using file-based content
77+
// Kept for compatibility but does nothing
78+
return;
13279
}
13380

13481
// Export functions for global use

0 commit comments

Comments
 (0)