mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-30 00:32:57 +08:00
Chat & sidebar UX improvements (#929)
This commit is contained in:
@@ -12,6 +12,7 @@ import { useTaskMaster } from '../../../contexts/TaskMasterContext';
|
||||
import { usePaletteOpsRegister } from '../../../contexts/PaletteOpsContext';
|
||||
import { useTasksSettings } from '../../../contexts/TasksSettingsContext';
|
||||
import { useUiPreferences } from '../../../hooks/useUiPreferences';
|
||||
import { useFileOpenResolver } from '../../../hooks/useFileOpenResolver';
|
||||
import { COMPUTER_USE_MENUS_ENABLED } from '../../../constants/featureFlags';
|
||||
import { authenticatedFetch } from '../../../utils/api';
|
||||
import { useEditorSidebar } from '../../code-editor/hooks/useEditorSidebar';
|
||||
@@ -81,6 +82,10 @@ function MainContent({
|
||||
isMobile,
|
||||
});
|
||||
|
||||
// Resolves bare/partial file references (e.g. links inside chat messages) to
|
||||
// real project files before opening them in the in-app editor.
|
||||
const resolvedFileOpen = useFileOpenResolver(selectedProject, handleFileOpen);
|
||||
|
||||
useEffect(() => {
|
||||
// Identify projects by DB `projectId`; the TaskMaster context uses the
|
||||
// same identifier to key its internal maps.
|
||||
@@ -179,6 +184,10 @@ function MainContent({
|
||||
setActiveTab('files');
|
||||
handleFileOpen(filePath);
|
||||
},
|
||||
// Opens the editor side panel in place, keeping the current tab (e.g. chat).
|
||||
openFileInEditor: (filePath: string) => {
|
||||
resolvedFileOpen(filePath);
|
||||
},
|
||||
});
|
||||
|
||||
if (isLoading) {
|
||||
|
||||
Reference in New Issue
Block a user