feat: unify workspace routing through tab-based URLs and remove legacy per-type routes
This commit is contained in:
@@ -82,7 +82,7 @@ import { createMarkdownStyles } from "@/styles/markdown-styles";
|
||||
import { MAX_CONTENT_WIDTH } from "@/constants/layout";
|
||||
import { isPerfLoggingEnabled, measurePayload, perfLog } from "@/utils/perf";
|
||||
import { getMarkdownListMarker } from "@/utils/markdown-list";
|
||||
import { buildHostWorkspaceFileRoute } from "@/utils/host-routes";
|
||||
import { buildHostWorkspaceFileTabRoute } from "@/utils/host-routes";
|
||||
|
||||
const isUserMessageItem = (item?: StreamItem) => item?.kind === "user_message";
|
||||
const isToolSequenceItem = (item?: StreamItem) =>
|
||||
@@ -213,7 +213,7 @@ export const AgentStreamView = forwardRef<AgentStreamViewHandle, AgentStreamView
|
||||
}
|
||||
|
||||
if (normalized.file) {
|
||||
const route = buildHostWorkspaceFileRoute(
|
||||
const route = buildHostWorkspaceFileTabRoute(
|
||||
resolvedServerId,
|
||||
workspaceId,
|
||||
normalized.file
|
||||
|
||||
@@ -19,9 +19,7 @@ import { getIsTauri } from '@/constants/layout'
|
||||
import { projectIconQueryKey } from '@/hooks/use-project-icon-query'
|
||||
import {
|
||||
buildHostWorkspaceRoute,
|
||||
parseHostWorkspaceAgentRouteFromPathname,
|
||||
parseHostWorkspaceRouteFromPathname,
|
||||
parseHostWorkspaceTerminalRouteFromPathname,
|
||||
} from '@/utils/host-routes'
|
||||
import {
|
||||
type SidebarProjectEntry,
|
||||
@@ -516,10 +514,7 @@ export function SidebarAgentList({
|
||||
if (!pathname) {
|
||||
return null
|
||||
}
|
||||
const parsed =
|
||||
parseHostWorkspaceAgentRouteFromPathname(pathname) ??
|
||||
parseHostWorkspaceTerminalRouteFromPathname(pathname) ??
|
||||
parseHostWorkspaceRouteFromPathname(pathname)
|
||||
const parsed = parseHostWorkspaceRouteFromPathname(pathname)
|
||||
if (!parsed) {
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user