fix agent create: keep draft view until agent ready
This commit is contained in:
@@ -85,10 +85,8 @@ export function AgentList({
|
||||
onAgentSelect?.();
|
||||
|
||||
navigate({
|
||||
pathname: "/agent/[...route]",
|
||||
params: {
|
||||
route: [serverId, agentId],
|
||||
},
|
||||
pathname: "/agent/[[...route]]",
|
||||
params: { route: [serverId, agentId] },
|
||||
});
|
||||
},
|
||||
[isActionSheetVisible, pathname, onAgentSelect]
|
||||
|
||||
@@ -607,7 +607,7 @@ export function GitDiffPane({ serverId, agentId }: GitDiffPaneProps) {
|
||||
predicate: (query) =>
|
||||
Array.isArray(query.queryKey) && query.queryKey[0] === "paseoWorktreeList",
|
||||
});
|
||||
router.replace("/agent");
|
||||
router.replace({ pathname: "/agent/[[...route]]" });
|
||||
},
|
||||
onError: (err) => {
|
||||
const message = err instanceof Error ? err.message : "Failed to archive worktree";
|
||||
|
||||
@@ -142,7 +142,7 @@ export function HomeFooter() {
|
||||
<Pressable
|
||||
onPress={() => {
|
||||
console.log("[HomeFooter] New Agent button pressed");
|
||||
router.push("/agent");
|
||||
router.push({ pathname: "/agent/[[...route]]" });
|
||||
}}
|
||||
style={({ pressed }) => [
|
||||
styles.footerButton,
|
||||
|
||||
@@ -82,7 +82,7 @@ export function SlidingSidebar({ selectedAgentId }: SlidingSidebarProps) {
|
||||
}, [closeToAgent]);
|
||||
|
||||
const handleCreateAgentClean = useCallback(() => {
|
||||
router.push("/agent");
|
||||
router.push({ pathname: "/agent/[[...route]]" });
|
||||
}, []);
|
||||
|
||||
// Mobile: close sidebar and navigate
|
||||
|
||||
Reference in New Issue
Block a user