Skip to content

Commit 589c2ea

Browse files
fix(ui): wrap fork dialog with PlatformProvider context
Closes anomalyco#18250 Made-with: Cursor
1 parent a6ef9e9 commit 589c2ea

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎packages/app/src/pages/session/use-session-commands.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { DialogSelectFile } from "@/components/dialog-select-file"
1515
import { DialogSelectModel } from "@/components/dialog-select-model"
1616
import { DialogSelectMcp } from "@/components/dialog-select-mcp"
1717
import { DialogFork } from "@/components/dialog-fork"
18+
import { PlatformProvider, usePlatform } from "@/context/platform"
1819
import { showToast } from "@opencode-ai/ui/toast"
1920
import { findLast } from "@opencode-ai/util/array"
2021
import { createSessionTabs } from "@/pages/session/helpers"
@@ -49,6 +50,7 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
4950
const terminal = useTerminal()
5051
const layout = useLayout()
5152
const navigate = useNavigate()
53+
const platform = usePlatform()
5254
const { params, tabs, view } = useSessionLayout()
5355

5456
const info = () => {
@@ -487,7 +489,12 @@ export const useSessionCommands = (actions: SessionCommandContext) => {
487489
description: language.t("command.session.fork.description"),
488490
slash: "fork",
489491
disabled: !params.id || visibleUserMessages().length === 0,
490-
onSelect: () => dialog.show(() => <DialogFork />),
492+
onSelect: () =>
493+
dialog.show(() => (
494+
<PlatformProvider value={platform}>
495+
<DialogFork />
496+
</PlatformProvider>
497+
)),
491498
}),
492499
...share,
493500
]

0 commit comments

Comments
 (0)