🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
♻️ refactor: move working sidebar into features (#17646)
Inneib2802377ea79
diff --git a/packages/const/src/file.ts b/packages/const/src/file.tsindex 595772d72ef..3a29aca8b5d 100644--- a/packages/const/src/file.ts+++ b/packages/const/src/file.ts@@ -19,6 +19,85 @@ export const FILE_UPLOAD_BLACKLIST = SYSTEM_FILES_BLACKLIST;export const MAX_UPLOAD_FILE_COUNT = 10;+export const WORKSPACE_FILE_TREE_EXCLUDED_NAMES = [+ ...SYSTEM_FILES_BLACKLIST,++ // Version-control metadata+ '.git',+ '.svn',+ '.hg',+ '.bzr',+ '_darcs',+ 'CVS',++ // Dependency directories and package-manager caches+ 'node_modules',+ 'bower_components',+ 'jspm_packages',+ '.pnpm-store',++ // Framework, build, and test caches+ '.next',+ '.nuxt',+ '.svelte-kit',+ '.turbo',+ '.cache',+ '.parcel-cache',+ '.vite',+ '.output',+ '.nyc_output',+ 'coverage',++ // Language and infrastructure caches+ '__pycache__',+ '.mypy_cache',+ '.pytest_cache',+ '.ruff_cache',+ '.tox',+ '.venv',+ 'venv',+ '.gradle',+ '.m2',+ '.bundle',+ '.terraform',+ '.serverless',+ '.wrangler',++ // Editor metadata that is not project configuration+ '.idea',+ '.fleet',++ // Generated standalone metadata+ '.eslintcache',+ '.pnp.cjs',+ '.pnp.loader.mjs',+];++export const WORKSPACE_FILE_TREE_EXCLUDED_SUFFIXES = [+ '.class',+ '.log',+ '.pyc',+ '.pyo',+ '.swp',+ '.swo',+ '.tmp',+ '.tsbuildinfo',+ '~',+];++// These names can also be legitimate source directories. Hide them only when+// Git confirms they are generated/ignored, preserving tracked distributables.+export const WORKSPACE_FILE_TREE_GIT_IGNORED_OUTPUT_NAMES = [+ 'bin',+ 'build',+ 'dist',+ 'obj',+ 'out',+ 'target',+ 'tmp',+ 'vendor',+];+/*** DataTransfer MIME type used when dragging a file/folder row from the working* sidebar file tree into the chat input. A custom (non-`Files`) type so thediff --git a/src/features/AgentDocumentPage/RightPanel/index.tsx b/src/features/AgentDocumentPage/RightPanel/index.tsxindex ce4d4ff4fb5..52a374d73e8 100644--- a/src/features/AgentDocumentPage/RightPanel/index.tsx+++ b/src/features/AgentDocumentPage/RightPanel/index.tsx@@ -10,12 +10,12 @@ import { useParams } from 'react-router';import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import { isDesktop } from '@/const/version';+import AgentDocumentsGroup from '@/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup';import RightPanel from '@/features/RightPanel';import { resolveExecutionTarget } from '@/helpers/executionTarget';import { useIsGatewayModeEnabled } from '@/helpers/gatewayMode';import { useEffectiveWorkingDirectory } from '@/hooks/useEffectiveWorkingDirectory';import { useClientDataSWR } from '@/libs/swr';-import AgentDocumentsGroup from '@/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup';import { agentDocumentService, agentDocumentSWRKeys } from '@/services/agentDocument';import { useAgentStore } from '@/store/agent';import { agentByIdSelectors, agentSelectors } from '@/store/agent/selectors';diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/const.ts b/src/features/Conversation/WorkingSidebar/Browser/const.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/const.tsrename to src/features/Conversation/WorkingSidebar/Browser/const.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/index.tsx b/src/features/Conversation/WorkingSidebar/Browser/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/index.tsxrename to src/features/Conversation/WorkingSidebar/Browser/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/useBrowserSidebarState.ts b/src/features/Conversation/WorkingSidebar/Browser/useBrowserSidebarState.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/useBrowserSidebarState.tsrename to src/features/Conversation/WorkingSidebar/Browser/useBrowserSidebarState.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/utils.test.ts b/src/features/Conversation/WorkingSidebar/Browser/utils.test.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/utils.test.tsrename to src/features/Conversation/WorkingSidebar/Browser/utils.test.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/utils.ts b/src/features/Conversation/WorkingSidebar/Browser/utils.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Browser/utils.tsrename to src/features/Conversation/WorkingSidebar/Browser/utils.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/__tests__/index.test.tsx b/src/features/Conversation/WorkingSidebar/Files/__tests__/index.test.tsxsimilarity index 80%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/__tests__/index.test.tsxrename to src/features/Conversation/WorkingSidebar/Files/__tests__/index.test.tsxindex 3a54748d91e..71fddfaa12b 100644--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/__tests__/index.test.tsx+++ b/src/features/Conversation/WorkingSidebar/Files/__tests__/index.test.tsx@@ -90,6 +90,72 @@ vi.mock('../useProjectFiles', () => ({path: '/repo/.env.local',relativePath: '.env.local',},+ {+ gitIgnored: true,+ isDirectory: false,+ name: '.DS_Store',+ path: '/repo/.DS_Store',+ relativePath: '.DS_Store',+ },+ {+ isDirectory: false,+ name: 'draft.md~',+ path: '/repo/draft.md~',+ relativePath: 'draft.md~',+ },+ {+ gitIgnored: true,+ isDirectory: true,+ name: '.git',+ path: '/repo/.git',+ relativePath: '.git/',+ },+ {+ gitIgnored: true,+ isDirectory: false,+ name: 'config',+ path: '/repo/.git/config',+ relativePath: '.git/config',+ },+ {+ gitIgnored: true,+ isDirectory: true,+ name: 'node_modules',+ path: '/repo/node_modules',+ relativePath: 'node_modules/',+ },+ {+ gitIgnored: true,+ isDirectory: true,+ name: '.next',+ path: '/repo/.next',+ relativePath: '.next/',+ },+ {+ gitIgnored: true,+ isDirectory: true,+ name: 'dist',+ path: '/repo/dist',+ relativePath: 'dist/',+ },+ {+ isDirectory: true,+ name: 'build',+ path: '/repo/build',+ relativePath: 'build/',+ },+ {+ isDirectory: true,+ name: '.github',+ path: '/repo/.github',+ relativePath: '.github/',+ },+ {+ isDirectory: true,+ name: '.vscode',+ path: '/repo/.vscode',+ relativePath: '.vscode/',+ },],indexedAt: '2026-01-01',root: '/repo',@@ -198,6 +264,27 @@ afterEach(() => {});describe('Files — reveal request integration', () => {+ it('hides common workspace metadata and generated noise while preserving project configuration', () => {+ render(<Files workingDirectory="/repo" />);++ const nodeIds = (explorerTreeProps.current?.nodes as { id: string }[]).map((node) => node.id);++ expect(nodeIds).toEqual(+ expect.arrayContaining(['.env.local', '.github/', '.vscode/', 'build/']),+ );+ expect(nodeIds).toEqual(+ expect.not.arrayContaining([+ '.DS_Store',+ '.git/',+ '.git/config',+ 'draft.md~',+ 'node_modules/',+ '.next/',+ 'dist/',+ ]),+ );+ });+it('passes git working tree status and per-item context menu items into ExplorerTree', () => {render(<Files workingDirectory="/repo" />);@@ -301,6 +388,41 @@ describe('Files — reveal request integration', () => {});});+ it('keeps excluded workspace metadata out of file search results', async () => {+ searchProjectFilesMock.mockResolvedValue({+ entries: [+ { isDirectory: true, name: '.git', path: '/repo/.git', relativePath: '.git/' },+ {+ isDirectory: false,+ name: 'config',+ path: '/repo/.git/config',+ relativePath: '.git/config',+ },+ { isDirectory: true, name: '.github', path: '/repo/.github', relativePath: '.github/' },+ {+ isDirectory: false,+ name: 'ci.yml',+ path: '/repo/.github/ci.yml',+ relativePath: '.github/ci.yml',+ },+ ],+ root: '/repo',+ searchedAt: '2026-01-01',+ source: 'git',+ });+ render(<Files workingDirectory="/repo" />);++ fireEvent.change(screen.getByPlaceholderText('workingPanel.files.searchPlaceholder'), {+ target: { value: 'git' },+ });++ await waitFor(() => {+ expect((explorerTreeProps.current?.nodes as { id: string }[]).map((node) => node.id)).toEqual(+ ['.github/', '.github/ci.yml'],+ );+ });+ });+it('shows a no-results state when the file filter has no matches', async () => {searchProjectFilesMock.mockResolvedValue({entries: [],diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/__tests__/useGitWorkingTreeFiles.test.ts b/src/features/Conversation/WorkingSidebar/Files/__tests__/useGitWorkingTreeFiles.test.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/__tests__/useGitWorkingTreeFiles.test.tsrename to src/features/Conversation/WorkingSidebar/Files/__tests__/useGitWorkingTreeFiles.test.tsdiff --git a/src/features/Conversation/WorkingSidebar/Files/fileVisibility.ts b/src/features/Conversation/WorkingSidebar/Files/fileVisibility.tsnew file mode 100644index 00000000000..70b7f5bb43c--- /dev/null+++ b/src/features/Conversation/WorkingSidebar/Files/fileVisibility.ts@@ -0,0 +1,22 @@+import {+ WORKSPACE_FILE_TREE_EXCLUDED_NAMES,+ WORKSPACE_FILE_TREE_EXCLUDED_SUFFIXES,+ WORKSPACE_FILE_TREE_GIT_IGNORED_OUTPUT_NAMES,+} from '@lobechat/const';+import type { ProjectFileIndexEntry } from '@lobechat/electron-client-ipc';++const excludedNames = new Set(WORKSPACE_FILE_TREE_EXCLUDED_NAMES);+const gitIgnoredOutputNames = new Set(WORKSPACE_FILE_TREE_GIT_IGNORED_OUTPUT_NAMES);++export const isExcludedProjectFileEntry = (entry: ProjectFileIndexEntry): boolean => {+ const segments = entry.relativePath.split('/');++ return (+ segments.some(+ (segment) =>+ excludedNames.has(segment) ||+ WORKSPACE_FILE_TREE_EXCLUDED_SUFFIXES.some((suffix) => segment.endsWith(suffix)),+ ) ||+ (entry.gitIgnored === true && segments.some((segment) => gitIgnoredOutputNames.has(segment)))+ );+};diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/index.tsx b/src/features/Conversation/WorkingSidebar/Files/index.tsxsimilarity index 98%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/index.tsxrename to src/features/Conversation/WorkingSidebar/Files/index.tsxindex 884ebc451db..d5c816fd3de 100644--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/index.tsx+++ b/src/features/Conversation/WorkingSidebar/Files/index.tsx@@ -26,6 +26,7 @@ import { projectFileService } from '@/services/projectFile';import { useChatStore } from '@/store/chat';import { useGlobalStore } from '@/store/global';+import { isExcludedProjectFileEntry } from './fileVisibility';import { buildGitStatusEntries, useGitWorkingTreeFiles } from './useGitWorkingTreeFiles';import { useProjectFiles } from './useProjectFiles';@@ -143,7 +144,10 @@ const Files = memo<FilesProps>(({ deviceId, workingDirectory }) => {const normalizedDebouncedQuery = debouncedQuery.trim();const isFiltering = normalizedDebouncedQuery.length > 0;const displayEntries = useMemo(- () => (isFiltering ? (searchEntries ?? []) : entries),+ () =>+ (isFiltering ? (searchEntries ?? []) : entries).filter(+ (entry) => !isExcludedProjectFileEntry(entry),+ ),[entries, isFiltering, searchEntries],);const nodes = useMemo(() => buildTreeNodes(displayEntries), [displayEntries]);diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/useGitWorkingTreeFiles.ts b/src/features/Conversation/WorkingSidebar/Files/useGitWorkingTreeFiles.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/useGitWorkingTreeFiles.tsrename to src/features/Conversation/WorkingSidebar/Files/useGitWorkingTreeFiles.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/useProjectFiles.ts b/src/features/Conversation/WorkingSidebar/Files/useProjectFiles.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Files/useProjectFiles.tsrename to src/features/Conversation/WorkingSidebar/Files/useProjectFiles.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Overview/index.tsx b/src/features/Conversation/WorkingSidebar/Overview/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Overview/index.tsxrename to src/features/Conversation/WorkingSidebar/Overview/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ParamsSection/index.tsx b/src/features/Conversation/WorkingSidebar/ParamsSection/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ParamsSection/index.tsxrename to src/features/Conversation/WorkingSidebar/ParamsSection/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ProgressSection/index.tsx b/src/features/Conversation/WorkingSidebar/ProgressSection/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ProgressSection/index.tsxrename to src/features/Conversation/WorkingSidebar/ProgressSection/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.test.ts b/src/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.test.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.test.tsrename to src/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.test.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.ts b/src/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.tsrename to src/features/Conversation/WorkingSidebar/ProgressSection/taskProgressAdapter.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.test.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/AgentDocumentsGroup.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/DeviceLevelSkills.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/DeviceLevelSkills.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/DeviceLevelSkills.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/DeviceLevelSkills.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/ProjectLevelSkills.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/ProjectLevelSkills.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/ProjectLevelSkills.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/ProjectLevelSkills.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/SkillsGroup.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/UserLevelSkills.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/UserLevelSkills.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/UserLevelSkills.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/UserLevelSkills.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/index.tsx b/src/features/Conversation/WorkingSidebar/ResourcesSection/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/ResourcesSection/index.tsxrename to src/features/Conversation/WorkingSidebar/ResourcesSection/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/FileItem.tsx b/src/features/Conversation/WorkingSidebar/Review/FileItem.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/FileItem.tsxrename to src/features/Conversation/WorkingSidebar/Review/FileItem.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/FileRow.tsx b/src/features/Conversation/WorkingSidebar/Review/FileRow.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/FileRow.tsxrename to src/features/Conversation/WorkingSidebar/Review/FileRow.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/FileTreeNav.tsx b/src/features/Conversation/WorkingSidebar/Review/FileTreeNav.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/FileTreeNav.tsxrename to src/features/Conversation/WorkingSidebar/Review/FileTreeNav.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/GroupHeader.tsx b/src/features/Conversation/WorkingSidebar/Review/GroupHeader.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/GroupHeader.tsxrename to src/features/Conversation/WorkingSidebar/Review/GroupHeader.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/__tests__/FileItem.test.tsx b/src/features/Conversation/WorkingSidebar/Review/__tests__/FileItem.test.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/__tests__/FileItem.test.tsxrename to src/features/Conversation/WorkingSidebar/Review/__tests__/FileItem.test.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/__tests__/reviewTreeNodes.test.ts b/src/features/Conversation/WorkingSidebar/Review/__tests__/reviewTreeNodes.test.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/__tests__/reviewTreeNodes.test.tsrename to src/features/Conversation/WorkingSidebar/Review/__tests__/reviewTreeNodes.test.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/index.tsx b/src/features/Conversation/WorkingSidebar/Review/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/index.tsxrename to src/features/Conversation/WorkingSidebar/Review/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/reviewTreeNodes.ts b/src/features/Conversation/WorkingSidebar/Review/reviewTreeNodes.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/reviewTreeNodes.tsrename to src/features/Conversation/WorkingSidebar/Review/reviewTreeNodes.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/selection.test.ts b/src/features/Conversation/WorkingSidebar/Review/selection.test.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/selection.test.tsrename to src/features/Conversation/WorkingSidebar/Review/selection.test.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/selection.ts b/src/features/Conversation/WorkingSidebar/Review/selection.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/selection.tsrename to src/features/Conversation/WorkingSidebar/Review/selection.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/useReviewPatches.test.ts b/src/features/Conversation/WorkingSidebar/Review/useReviewPatches.test.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/useReviewPatches.test.tsrename to src/features/Conversation/WorkingSidebar/Review/useReviewPatches.test.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/useReviewPatches.ts b/src/features/Conversation/WorkingSidebar/Review/useReviewPatches.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/useReviewPatches.tsrename to src/features/Conversation/WorkingSidebar/Review/useReviewPatches.tsdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorksSection/VersionList.tsx b/src/features/Conversation/WorkingSidebar/WorksSection/VersionList.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorksSection/VersionList.tsxrename to src/features/Conversation/WorkingSidebar/WorksSection/VersionList.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorksSection/WorkVersionHistoryCard.tsx b/src/features/Conversation/WorkingSidebar/WorksSection/WorkVersionHistoryCard.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorksSection/WorkVersionHistoryCard.tsxrename to src/features/Conversation/WorkingSidebar/WorksSection/WorkVersionHistoryCard.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorksSection/index.tsx b/src/features/Conversation/WorkingSidebar/WorksSection/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorksSection/index.tsxrename to src/features/Conversation/WorkingSidebar/WorksSection/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorkspaceTab.tsx b/src/features/Conversation/WorkingSidebar/WorkspaceTab.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/WorkspaceTab.tsxrename to src/features/Conversation/WorkingSidebar/WorkspaceTab.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/__tests__/index.test.tsx b/src/features/Conversation/WorkingSidebar/__tests__/index.test.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/__tests__/index.test.tsxrename to src/features/Conversation/WorkingSidebar/__tests__/index.test.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx b/src/features/Conversation/WorkingSidebar/index.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsxrename to src/features/Conversation/WorkingSidebar/index.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/types.ts b/src/features/Conversation/WorkingSidebar/types.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/WorkingSidebar/types.tsrename to src/features/Conversation/WorkingSidebar/types.tsdiff --git a/src/routes/(main)/agent/features/Conversation/useAgentContext.test.tsx b/src/features/Conversation/useAgentContext.test.tsxsimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/useAgentContext.test.tsxrename to src/features/Conversation/useAgentContext.test.tsxdiff --git a/src/routes/(main)/agent/features/Conversation/useAgentContext.ts b/src/features/Conversation/useAgentContext.tssimilarity index 100%rename from src/routes/(main)/agent/features/Conversation/useAgentContext.tsrename to src/features/Conversation/useAgentContext.tsdiff --git a/src/routes/(main)/agent/(chat)/_layout/index.tsx b/src/routes/(main)/agent/(chat)/_layout/index.tsxindex b7589feb314..ff5340d2fa1 100644--- a/src/routes/(main)/agent/(chat)/_layout/index.tsx+++ b/src/routes/(main)/agent/(chat)/_layout/index.tsx@@ -6,8 +6,8 @@ import { memo } from 'react';import { Outlet } from 'react-router';import ChatTerminalPanel from '@/features/ChatTerminal';+import AgentWorkingSidebar from '@/features/Conversation/WorkingSidebar';import ChatHeader from '@/routes/(main)/agent/features/Conversation/Header';-import AgentWorkingSidebar from '@/routes/(main)/agent/features/Conversation/WorkingSidebar';import Portal from '@/routes/(main)/agent/features/Portal';import HeaderSlot from './HeaderSlot';diff --git a/src/routes/(main)/agent/features/Conversation/ConversationArea.tsx b/src/routes/(main)/agent/features/Conversation/ConversationArea.tsxindex 28a41662d2f..e27fffcce43 100644--- a/src/routes/(main)/agent/features/Conversation/ConversationArea.tsx+++ b/src/routes/(main)/agent/features/Conversation/ConversationArea.tsx@@ -16,6 +16,7 @@ import {ForwardMessageDispatcher,MessageForwardFooter,} from '@/features/Conversation/MessageForward';+import { useAgentContext } from '@/features/Conversation/useAgentContext';import { mergeConversationHooks } from '@/features/Conversation/utils/mergeConversationHooks';import { useGatewayReconnect } from '@/hooks/useGatewayReconnect';import { useOperationState } from '@/hooks/useOperationState';@@ -32,7 +33,6 @@ import MainChatInput from './MainChatInput';import MessageFromUrl from './MainChatInput/MessageFromUrl';import ThreadHydration from './ThreadHydration';import { useActionsBarConfig } from './useActionsBarConfig';-import { useAgentContext } from './useAgentContext';const log = debug('lobe-render:agent:ConversationArea');diff --git a/src/routes/(main)/agent/index.desktop.test.tsx b/src/routes/(main)/agent/index.desktop.test.tsxindex 5ecf39f047d..841520ecaad 100644--- a/src/routes/(main)/agent/index.desktop.test.tsx+++ b/src/routes/(main)/agent/index.desktop.test.tsx@@ -62,7 +62,7 @@ vi.mock('./features/Conversation', () => ({default: () => <div data-testid="conversation" />,}));-vi.mock('./features/Conversation/WorkingSidebar', () => ({+vi.mock('@/features/Conversation/WorkingSidebar', () => ({default: () => <div data-testid="working-sidebar" />,}));