({
activeWorkspace,
activeWorkspaceId,
activeItems,
activeThreadId,
activeTab,
tabletTab,
isCompact,
isTablet,
setActiveTab,
appSettings,
addDebugEntry,
updateWorkspaceSettings,
commitMessageModelId,
connectWorkspace,
startThreadForWorkspace,
sendUserMessageToThread,
}: UseMainAppGitStateOptions)
| 187 | } |
| 188 | |
| 189 | export function useMainAppGitState({ |
| 190 | activeWorkspace, |
| 191 | activeWorkspaceId, |
| 192 | activeItems, |
| 193 | activeThreadId, |
| 194 | activeTab, |
| 195 | tabletTab, |
| 196 | isCompact, |
| 197 | isTablet, |
| 198 | setActiveTab, |
| 199 | appSettings, |
| 200 | addDebugEntry, |
| 201 | updateWorkspaceSettings, |
| 202 | commitMessageModelId, |
| 203 | connectWorkspace, |
| 204 | startThreadForWorkspace, |
| 205 | sendUserMessageToThread, |
| 206 | }: UseMainAppGitStateOptions) { |
| 207 | const alertError = useCallback((error: unknown) => { |
| 208 | alert(error instanceof Error ? error.message : String(error)); |
| 209 | }, []); |
| 210 | |
| 211 | const { |
| 212 | gitIssues, |
| 213 | gitIssuesTotal, |
| 214 | gitIssuesLoading, |
| 215 | gitIssuesError, |
| 216 | gitPullRequests, |
| 217 | gitPullRequestsTotal, |
| 218 | gitPullRequestsLoading, |
| 219 | gitPullRequestsError, |
| 220 | gitPullRequestDiffs, |
| 221 | gitPullRequestDiffsLoading, |
| 222 | gitPullRequestDiffsError, |
| 223 | gitPullRequestComments, |
| 224 | gitPullRequestCommentsLoading, |
| 225 | gitPullRequestCommentsError, |
| 226 | handleGitIssuesChange, |
| 227 | handleGitPullRequestsChange, |
| 228 | handleGitPullRequestDiffsChange, |
| 229 | handleGitPullRequestCommentsChange, |
| 230 | resetGitHubPanelState, |
| 231 | } = useGitHubPanelController(); |
| 232 | |
| 233 | useEffect(() => { |
| 234 | resetGitHubPanelState(); |
| 235 | }, [activeWorkspaceId, resetGitHubPanelState]); |
| 236 | |
| 237 | const { remote: gitRemoteUrl, refresh: refreshGitRemote } = useGitRemote(activeWorkspace); |
| 238 | const { |
| 239 | repos: gitRootCandidates, |
| 240 | isLoading: gitRootScanLoading, |
| 241 | error: gitRootScanError, |
| 242 | depth: gitRootScanDepth, |
| 243 | hasScanned: gitRootScanHasScanned, |
| 244 | scan: scanGitRoots, |
| 245 | setDepth: setGitRootScanDepth, |
| 246 | clear: clearGitRootCandidates, |
no test coverage detected