@@ -51,6 +51,14 @@ import { OverlayPortalHost } from "./components/ui/OverlayPortal"; |
51 | 51 | import { shouldHandleAppLink, restoreDraftLinkState } from "./lib/appLinking"; |
52 | 52 | import { hasCloudPublicConfig } from "./features/cloud/publicConfig"; |
53 | 53 | import { takeScheduledTaskNewLink } from "./features/settings/scheduled-task-editor-state"; |
| 54 | +import { |
| 55 | + resolvePendingNewTaskPromptLink, |
| 56 | + takeNewTaskPromptLink, |
| 57 | +} from "./features/prompt-links/newTaskPromptLink"; |
| 58 | +import { |
| 59 | + resolvePendingThreadPromptLink, |
| 60 | + takeThreadPromptLink, |
| 61 | +} from "./features/prompt-links/threadPromptLink"; |
54 | 62 | import { |
55 | 63 | disposeOnFoundationReplace, |
56 | 64 | type FoundationHotModule, |
@@ -93,9 +101,13 @@ const linkingConfig = { |
93 | 101 |
|
94 | 102 | function getAppStateFromPath(path: string, options: Parameters<typeof getStateFromPath>[1]) { |
95 | 103 | return takeScheduledTaskNewLink( |
96 | | - restoreSettingsLinkState( |
97 | | - restoreDraftLinkState(getStateFromPath(path, options), path), |
98 | | - settingsLinkPage(), |
| 104 | + takeNewTaskPromptLink( |
| 105 | + takeThreadPromptLink( |
| 106 | + restoreSettingsLinkState( |
| 107 | + restoreDraftLinkState(getStateFromPath(path, options), path), |
| 108 | + settingsLinkPage(), |
| 109 | + ), |
| 110 | + ), |
99 | 111 | ), |
100 | 112 | ); |
101 | 113 | } |
@@ -130,6 +142,8 @@ const Navigation = createStaticNavigation(RootStack); |
130 | 142 | function handleNavigationStateChange(state: NavigationState | undefined): void { |
131 | 143 | recordWorkspaceSelections(state); |
132 | 144 | presentPendingIncomingShare(); |
| 145 | + resolvePendingNewTaskPromptLink(state); |
| 146 | + resolvePendingThreadPromptLink(state); |
133 | 147 | if (!state) return; |
134 | 148 | setAgentNotificationPathname(workspaceLocationFromState(state).pathname); |
135 | 149 | recordAppShortcutNavigationState(state); |
|