MCPcopy
hub / github.com/Dimillian/CodexMonitor / useMainAppModals

Function useMainAppModals

src/features/app/hooks/useMainAppModals.ts:357–579  ·  view source on GitHub ↗
({
  settingsViewComponent,
  workspaces,
  workspaceGroups,
  groupedWorkspaces,
  ungroupedLabel,
  activeWorkspace,
  setActiveWorkspaceId,
  branches,
  currentBranch,
  threadRename,
  git,
  workspacePrompts,
  settings,
}: UseMainAppModalsArgs)

Source from the content-addressed store, hash-verified

355}
356
357export 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,

Callers 1

MainAppFunction · 0.90

Calls 8

useSettingsModalStateFunction · 0.90
useRenameThreadPromptFunction · 0.90
useBranchSwitcherFunction · 0.90
useInitGitRepoPromptFunction · 0.90
useWorktreePromptFunction · 0.90
useClonePromptFunction · 0.90
buildSettingsViewPropsFunction · 0.85
buildAppModalsPropsFunction · 0.85

Tested by

no test coverage detected