({
settingsViewComponent,
workspaces,
workspaceGroups,
groupedWorkspaces,
ungroupedLabel,
activeWorkspace,
setActiveWorkspaceId,
branches,
currentBranch,
threadRename,
git,
workspacePrompts,
settings,
}: UseMainAppModalsArgs)
| 355 | } |
| 356 | |
| 357 | export function useMainAppModals({ |
| 358 | settingsViewComponent, |
| 359 | workspaces, |
| 360 | workspaceGroups, |
| 361 | groupedWorkspaces, |
| 362 | ungroupedLabel, |
| 363 | activeWorkspace, |
| 364 | setActiveWorkspaceId, |
| 365 | branches, |
| 366 | currentBranch, |
| 367 | threadRename, |
| 368 | git, |
| 369 | workspacePrompts, |
| 370 | settings, |
| 371 | }: UseMainAppModalsArgs): UseMainAppModalsResult { |
| 372 | const { |
| 373 | settingsOpen, |
| 374 | settingsSection, |
| 375 | openSettings, |
| 376 | closeSettings, |
| 377 | } = useSettingsModalState(); |
| 378 | |
| 379 | const { |
| 380 | renamePrompt, |
| 381 | openRenamePrompt, |
| 382 | handleRenamePromptChange, |
| 383 | handleRenamePromptCancel, |
| 384 | handleRenamePromptConfirm, |
| 385 | } = useRenameThreadPrompt({ |
| 386 | threadsByWorkspace: threadRename.threadsByWorkspace, |
| 387 | renameThread: threadRename.renameThread, |
| 388 | }); |
| 389 | |
| 390 | const { |
| 391 | branchSwitcher, |
| 392 | openBranchSwitcher, |
| 393 | closeBranchSwitcher, |
| 394 | handleBranchSelect, |
| 395 | } = useBranchSwitcher({ |
| 396 | activeWorkspace, |
| 397 | checkoutBranch: git.checkoutBranch, |
| 398 | setActiveWorkspaceId, |
| 399 | }); |
| 400 | |
| 401 | const { |
| 402 | initGitRepoPrompt, |
| 403 | openInitGitRepoPrompt, |
| 404 | handleInitGitRepoPromptBranchChange, |
| 405 | handleInitGitRepoPromptCreateRemoteChange, |
| 406 | handleInitGitRepoPromptRepoNameChange, |
| 407 | handleInitGitRepoPromptPrivateChange, |
| 408 | handleInitGitRepoPromptCancel, |
| 409 | handleInitGitRepoPromptConfirm, |
| 410 | } = useInitGitRepoPrompt({ |
| 411 | activeWorkspace, |
| 412 | initGitRepo: git.initGitRepo, |
| 413 | createGitHubRepo: git.createGitHubRepo, |
| 414 | refreshGitRemote: git.refreshGitRemote, |
no test coverage detected