feat: Enhance navigation and cleanup for graph explorer view

- Added a cleanup function to reset the state when navigating away from the graph explorer.
- Updated navigation logic to call the cleanup function before switching views.
- Improved internationalization by adding new translations for graph-related terms.
- Adjusted icon sizes for better UI consistency in the graph explorer.
- Implemented impact analysis button functionality in the graph explorer.
- Refactored CLI tool configuration to use updated model names.
- Enhanced CLI executor to handle prompts correctly for codex commands.
- Introduced code relationship storage for better visualization in the index tree.
- Added support for parsing Markdown and plain text files in the symbol parser.
- Updated tests to reflect changes in language detection logic.
This commit is contained in:
catlog22
2025-12-15 23:11:01 +08:00
parent 894b93e08d
commit 35485bbbb1
35 changed files with 3348 additions and 228 deletions

View File

@@ -52,10 +52,25 @@ function initPathSelector() {
});
}
// Cleanup function for view transitions
function cleanupPreviousView() {
// Cleanup graph explorer
if (currentView === 'graph-explorer' && typeof window.cleanupGraphExplorer === 'function') {
window.cleanupGraphExplorer();
}
// Hide storage card when leaving cli-manager
var storageCard = document.getElementById('storageCard');
if (storageCard) {
storageCard.style.display = 'none';
}
}
// Navigation
function initNavigation() {
document.querySelectorAll('.nav-item[data-filter]').forEach(item => {
item.addEventListener('click', () => {
cleanupPreviousView();
setActiveNavItem(item);
currentFilter = item.dataset.filter;
currentLiteType = null;
@@ -70,6 +85,8 @@ function initNavigation() {
// Lite Tasks Navigation
document.querySelectorAll('.nav-item[data-lite]').forEach(item => {
item.addEventListener('click', () => {
cleanupPreviousView();
setActiveNavItem(item);
currentLiteType = item.dataset.lite;
currentFilter = null;
@@ -84,6 +101,8 @@ function initNavigation() {
// View Navigation (Project Overview, MCP Manager, etc.)
document.querySelectorAll('.nav-item[data-view]').forEach(item => {
item.addEventListener('click', () => {
cleanupPreviousView();
setActiveNavItem(item);
currentView = item.dataset.view;
currentFilter = null;