@openchamber/web 1.24.0 → 1.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.test.js +29 -6
- package/bin/lib/cli-http.js +5 -1
- package/bin/lib/commands-status.js +5 -0
- package/dist/assets/{CodeMirrorCommentWidgets-C9kV-n7r.js → CodeMirrorCommentWidgets-B_vBPQYm.js} +1 -1
- package/dist/assets/DiffView-Ce0oBXXQ.js +4 -0
- package/dist/assets/{FilesView-vjJx7VaM.js → FilesView-DtXueAWP.js} +6 -6
- package/dist/assets/GitView-k0hUF8KB.js +6 -0
- package/dist/assets/GuestAttachDialog-DIf2U85Z.js +1 -0
- package/dist/assets/{JsonTreeView-D_4G5X6-.js → JsonTreeView-4AnJ04Pw.js} +1 -1
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/{LinearIssuesView-1uKhePfH.js → LinearIssuesView-z_9p2GuO.js} +1 -1
- package/dist/assets/{MarkdownImageGallery-Ix7N_2wp.js → MarkdownImageGallery-BC-BNN-s.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-Deel_y5S.js → MarkdownRendererImpl-DyaBTUbH.js} +6 -6
- package/dist/assets/{OnboardingScreen-ToIakxb_.js → OnboardingScreen-DKU_yTb6.js} +1 -1
- package/dist/assets/{PatchDiff-BjMgezr1.js → PatchDiff-DpGmHRnV.js} +1 -1
- package/dist/assets/PierreDiffViewer-CgLl_tp7.js +210 -0
- package/dist/assets/{PlanView-BGAzxDwD.js → PlanView-CrfB4qqY.js} +4 -4
- package/dist/assets/PluginPane-B5cn-jPy.js +3 -0
- package/dist/assets/SettingsView-DMKKwezx.js +29 -0
- package/dist/assets/SettingsWindow-DwbnVzOC.js +1 -0
- package/dist/assets/{SubmoduleDiffSummary--YFqK6Ih.js → SubmoduleDiffSummary-hkGcvs0E.js} +1 -1
- package/dist/assets/{ToolOutputDialog-DRWBvdaJ.js → ToolOutputDialog-DuoIOc0j.js} +6 -6
- package/dist/assets/{ToolPartDiffPreview-BxZJCU28.js → ToolPartDiffPreview-t1Bvq_2Y.js} +2 -2
- package/dist/assets/{VirtualizedFileDiff-DCXjBGRf.js → VirtualizedFileDiff-BK4aU5qJ.js} +1 -1
- package/dist/assets/{WalkthroughView-CfIPvWWa.js → WalkthroughView-Bk6TPNFw.js} +2 -2
- package/dist/assets/{appThemeRegistry-DDROzcUO.js → appThemeRegistry-DnOVbJjF.js} +1 -1
- package/dist/assets/commitAndPush-DLWNZkkY.js +1 -0
- package/dist/assets/{computeVirtualFileMetrics-DHgQIkUq.js → computeVirtualFileMetrics-BVTujWSX.js} +1 -1
- package/dist/assets/{de-CX_f-T5U.js → de-zEHaAIi3.js} +4 -4
- package/dist/assets/{es-BERmWNn_.js → es-CBDgEzgk.js} +4 -4
- package/dist/assets/{fr-BjYYE_-z.js → fr-DjiTptT_.js} +4 -4
- package/dist/assets/index-AgOdanig.css +1 -0
- package/dist/assets/index-B-2_X4DD.js +40 -0
- package/dist/assets/{index-WjufPkIV.js → index-CkA4p2IK.js} +1 -1
- package/dist/assets/{isDiffPlainText-D9faP70y.js → isDiffPlainText-D3yX_vx4.js} +1 -1
- package/dist/assets/{isFilePlainText-6qOcz5Ky.js → isFilePlainText-CZR9TcHV.js} +1 -1
- package/dist/assets/ja-CerMgj3r.js +16 -0
- package/dist/assets/{ko-Dty1aUod.js → ko-DHYDAze5.js} +4 -4
- package/dist/assets/main-BDka4W43.js +896 -0
- package/dist/assets/main-Dl7Dyge_.js +2 -0
- package/dist/assets/markdownCore-DFmr0rUR.js +5 -0
- package/dist/assets/miniChat-CLKQPPpO.js +2 -0
- package/dist/assets/mobile--giD2Q1L.js +2 -0
- package/dist/assets/{patchFileDiff-BvU6KOQC.js → patchFileDiff-DRh-AQvd.js} +1 -1
- package/dist/assets/{pl-CX-_ROkr.js → pl-BTB_93bq.js} +6 -6
- package/dist/assets/{pt-BR-DhRR1arx.js → pt-BR-BwA3oyCK.js} +4 -4
- package/dist/assets/renderElectronMiniChatApp-DmB7zpVK.js +2 -0
- package/dist/assets/renderMobileApp-pMfOuQfl.js +25 -0
- package/dist/assets/runtimeEndpointReset-Gqhmkm3U.js +25 -0
- package/dist/assets/{scheduledTasksApi-DW3xqMQ8.js → scheduledTasksApi-CeRAIUmW.js} +1 -1
- package/dist/assets/{shikiHighlight-DsxD9QEa.js → shikiHighlight-BfjuB3CD.js} +1 -1
- package/dist/assets/{textMateThemeFromAppTheme-Da7ed8qM.js → textMateThemeFromAppTheme-BP60t9SX.js} +1 -1
- package/dist/assets/tr-CcPsJoNM.js +7 -0
- package/dist/assets/{uk-CD21CXFV.js → uk-B68WibXi.js} +4 -4
- package/dist/assets/{useAppFontEffects-hfv2s6mZ.js → useAppFontEffects-DcdrFv2Z.js} +147 -147
- package/dist/assets/{useInlineCommentController-BmtfVbo8.js → useInlineCommentController-Cq4SUjsA.js} +2 -2
- package/dist/assets/useRootScrollLock-CSdR6Wnm.js +2 -0
- package/dist/assets/{vendor-codemirror-language-data-BPMJpOpT.js → vendor-codemirror-language-data-BFm1Ju2w.js} +2 -2
- package/dist/assets/vendor-katex-Cp579UoJ.css +1 -0
- package/dist/assets/{vendor-tanstack-react-virtual-g05Cx3z9.js → vendor-tanstack-react-virtual-ClYN8CzB.js} +1 -1
- package/dist/assets/{vendor-tanstack-virtual-core-Dubg10g5.js → vendor-tanstack-virtual-core-BewVQryB.js} +1 -1
- package/dist/assets/{vendor-zod-fZppILAM.js → vendor-zod-CgAdXWZO.js} +4 -4
- package/dist/assets/{web-components-U-hWbgJo.js → web-components-2vo9YsZc.js} +1 -1
- package/dist/assets/zh-CN-DbFHYXwP.js +16 -0
- package/dist/assets/{zh-TW-CRp5dJU2.js → zh-TW-DmXAwdty.js} +4 -4
- package/dist/index.html +6 -4
- package/dist/mini-chat.html +6 -4
- package/dist/mobile.html +6 -4
- package/package.json +6 -5
- package/server/index.js +29 -7
- package/server/lib/agent-tool/DOCUMENTATION.md +17 -4
- package/server/lib/agent-tool/runtime.js +62 -15
- package/server/lib/agent-tool/runtime.test.js +88 -2
- package/server/lib/changelog/update-notes.js +2 -1
- package/server/lib/changelog/update-notes.test.js +19 -0
- package/server/lib/event-stream/DOCUMENTATION.md +23 -0
- package/server/lib/event-stream/delta-coalescer.js +0 -0
- package/server/lib/event-stream/delta-coalescer.test.js +292 -0
- package/server/lib/event-stream/global-hub.js +53 -23
- package/server/lib/event-stream/global-hub.test.js +160 -0
- package/server/lib/event-stream/global-ws-bridge.js +1 -0
- package/server/lib/event-stream/index.js +4 -0
- package/server/lib/fs/DOCUMENTATION.md +2 -1
- package/server/lib/fs/routes.js +56 -4
- package/server/lib/fs/routes.test.js +116 -0
- package/server/lib/git/DOCUMENTATION.md +18 -5
- package/server/lib/git/routes.js +1 -1
- package/server/lib/git/serial-refresh.js +93 -0
- package/server/lib/git/serial-refresh.test.js +112 -0
- package/server/lib/git/service.js +325 -70
- package/server/lib/git/service.test.js +291 -0
- package/server/lib/github/pr-status.js +5 -5
- package/server/lib/github/pr-status.test.js +1 -1
- package/server/lib/github/routes.js +4 -4
- package/server/lib/guests/DOCUMENTATION.md +5 -3
- package/server/lib/guests/background.test.js +83 -0
- package/server/lib/guests/catalog.js +20 -9
- package/server/lib/guests/catalog.test.js +5 -5
- package/server/lib/guests/routes.js +2 -2
- package/server/lib/message-queue/DOCUMENTATION.md +10 -1
- package/server/lib/message-queue/runtime.js +21 -1
- package/server/lib/message-queue/runtime.test.js +52 -5
- package/server/lib/notifications/routes.js +5 -0
- package/server/lib/openchamber-sessions/routes.js +18 -18
- package/server/lib/openchamber-sessions/routes.test.js +49 -0
- package/server/lib/opencode/DOCUMENTATION.md +1 -1
- package/server/lib/opencode/bootstrap-runtime.js +1 -0
- package/server/lib/opencode/feature-routes-runtime.js +5 -0
- package/server/lib/opencode/session-runtime.js +68 -0
- package/server/lib/opencode/session-runtime.test.js +43 -0
- package/server/lib/opencode/settings-helpers.js +3 -0
- package/server/lib/opencode/settings-registry.json +8 -0
- package/server/lib/permission-auto-accept/DOCUMENTATION.md +8 -0
- package/server/lib/permission-auto-accept/runtime.js +13 -0
- package/server/lib/permission-auto-accept/runtime.test.js +37 -1
- package/server/lib/projects/project-config.js +2 -2
- package/server/lib/realtime-proxy-terminal.test.js +150 -0
- package/server/lib/realtime-proxy.js +2 -0
- package/server/lib/routing/DOCUMENTATION.md +83 -0
- package/server/lib/routing/defaults.js +98 -0
- package/server/lib/routing/feature-flag.js +11 -0
- package/server/lib/routing/history.js +34 -0
- package/server/lib/routing/jev.js +98 -0
- package/server/lib/routing/routes.http.test.js +100 -0
- package/server/lib/routing/routes.js +81 -0
- package/server/lib/routing/runtime.js +217 -0
- package/server/lib/routing/runtime.test.js +188 -0
- package/server/lib/routing/store.js +249 -0
- package/server/lib/routing/store.test.js +96 -0
- package/server/lib/scheduled-tasks/runtime.js +2 -2
- package/server/lib/scheduled-tasks/runtime.test.js +14 -0
- package/server/lib/security/request-security.js +9 -5
- package/server/lib/security/request-security.test.js +37 -0
- package/server/lib/small-model/DOCUMENTATION.md +14 -2
- package/server/lib/small-model/call.js +37 -6
- package/server/lib/small-model/call.test.js +182 -0
- package/server/lib/terminal/DOCUMENTATION.md +21 -2
- package/server/lib/terminal/runtime.js +10 -3
- package/server/lib/terminal/runtime.test.js +22 -0
- package/server/lib/terminal/shutdown.js +106 -0
- package/server/lib/terminal/shutdown.test.js +84 -0
- package/server/lib/tts/service.test.js +78 -0
- package/server/lib/ui-auth/DOCUMENTATION.md +8 -0
- package/server/lib/ui-auth/session-cookie.js +51 -0
- package/server/lib/ui-auth/session-cookie.test.js +46 -0
- package/server/lib/ui-auth/ui-auth.js +13 -9
- package/server/lib/ui-auth/ui-auth.test.js +56 -0
- package/dist/assets/DiffView-B7YkbY-u.js +0 -4
- package/dist/assets/DirtyBranchSwitchDialog-CU0A93Zx.js +0 -1
- package/dist/assets/GitView-BLhlMYEY.js +0 -6
- package/dist/assets/GuestAttachDialog-B-fwE8r3.js +0 -3
- package/dist/assets/PierreDiffViewer-53Ghfnlr.js +0 -161
- package/dist/assets/SettingsView-n2X-jfBB.js +0 -29
- package/dist/assets/SettingsWindow-Bi8LE9XI.js +0 -1
- package/dist/assets/index-DpzTz2UH.css +0 -1
- package/dist/assets/index-Dy8xgawx.js +0 -40
- package/dist/assets/ja-DxqeAk9N.js +0 -16
- package/dist/assets/main-BOYSXfYn.js +0 -896
- package/dist/assets/main-Bjcre_GE.js +0 -2
- package/dist/assets/markdownCore-DPrwM1rU.js +0 -5
- package/dist/assets/miniChat-Dz_bPgMc.js +0 -2
- package/dist/assets/mobile-BbZPBJrK.js +0 -2
- package/dist/assets/renderElectronMiniChatApp-uNEUkeAI.js +0 -2
- package/dist/assets/renderMobileApp-BK1kFlcJ.js +0 -25
- package/dist/assets/runtimeEndpointReset-BULHvOwb.js +0 -25
- package/dist/assets/tr-cIQtYBpg.js +0 -7
- package/dist/assets/useRootScrollLock-Cwc4kSl2.js +0 -1
- package/dist/assets/zh-CN-BWvlPHY-.js +0 -16
- /package/dist/assets/{vendor-katex-k3Ppq1Ha.js → vendor-katex-CHD9BdDO.js} +0 -0
package/bin/cli.test.js
CHANGED
|
@@ -832,7 +832,7 @@ describe('CLI HTTP helpers', () => {
|
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
|
|
835
|
-
it('retries UI-authenticated API requests with the
|
|
835
|
+
it.each(['oc_ui_session', 'oc_ui_session_3000'])('retries UI-authenticated API requests with the %s cookie', async (cookieName) => {
|
|
836
836
|
await withTempOpenChamberDataDir(async () => {
|
|
837
837
|
const port = 45678;
|
|
838
838
|
fs.writeFileSync(await getInstanceFilePath(port), JSON.stringify({ port, uiPassword: 'secret' }, null, 2));
|
|
@@ -844,11 +844,11 @@ describe('CLI HTTP helpers', () => {
|
|
|
844
844
|
expect(JSON.parse(options.body)).toEqual({ password: 'secret' });
|
|
845
845
|
return {
|
|
846
846
|
ok: true,
|
|
847
|
-
headers: { get: (name) => name.toLowerCase() === 'set-cookie' ?
|
|
847
|
+
headers: { get: (name) => name.toLowerCase() === 'set-cookie' ? `${cookieName}=session-token; Path=/; HttpOnly` : null },
|
|
848
848
|
json: async () => ({ authenticated: true }),
|
|
849
849
|
};
|
|
850
850
|
}
|
|
851
|
-
if (options.headers?.Cookie ===
|
|
851
|
+
if (options.headers?.Cookie === `${cookieName}=session-token`) {
|
|
852
852
|
return createMockJsonResponse({ ok: true });
|
|
853
853
|
}
|
|
854
854
|
return {
|
|
@@ -866,6 +866,7 @@ describe('CLI HTTP helpers', () => {
|
|
|
866
866
|
|
|
867
867
|
expect(response.ok).toBe(true);
|
|
868
868
|
expect(body).toEqual({ ok: true });
|
|
869
|
+
expect(calls.at(-1).options.headers.Cookie).toBe(`${cookieName}=session-token`);
|
|
869
870
|
expect(calls.map((call) => new URL(call.url).pathname)).toEqual([
|
|
870
871
|
'/api/openchamber/tunnel/start',
|
|
871
872
|
'/auth/session',
|
|
@@ -877,7 +878,7 @@ describe('CLI HTTP helpers', () => {
|
|
|
877
878
|
});
|
|
878
879
|
});
|
|
879
880
|
|
|
880
|
-
it('
|
|
881
|
+
it.each(['oc_ui_session', 'oc_ui_session_3000'])('uses the stored password and getSetCookie for %s', async (cookieName) => {
|
|
881
882
|
await withTempOpenChamberDataDir(async () => {
|
|
882
883
|
const port = 45679;
|
|
883
884
|
fs.writeFileSync(await getInstanceFilePath(port), JSON.stringify({ port, uiPassword: 'stored-secret' }, null, 2));
|
|
@@ -887,11 +888,11 @@ describe('CLI HTTP helpers', () => {
|
|
|
887
888
|
expect(JSON.parse(options.body)).toEqual({ password: 'stored-secret' });
|
|
888
889
|
return {
|
|
889
890
|
ok: true,
|
|
890
|
-
headers: { getSetCookie: () => [
|
|
891
|
+
headers: { getSetCookie: () => [`${cookieName}=session-token; Path=/; HttpOnly`] },
|
|
891
892
|
json: async () => ({ authenticated: true }),
|
|
892
893
|
};
|
|
893
894
|
}
|
|
894
|
-
if (options.headers?.Cookie ===
|
|
895
|
+
if (options.headers?.Cookie === `${cookieName}=session-token`) {
|
|
895
896
|
return createMockJsonResponse({ ok: true });
|
|
896
897
|
}
|
|
897
898
|
return {
|
|
@@ -1336,6 +1337,28 @@ describe('lifecycle commands with unmanaged explicit ports', () => {
|
|
|
1336
1337
|
});
|
|
1337
1338
|
});
|
|
1338
1339
|
|
|
1340
|
+
it('status --json reports the address a registered server was asked to bind', async () => {
|
|
1341
|
+
await withTempOpenChamberDataDir(async () => {
|
|
1342
|
+
const server = await startMockOpenChamberServer();
|
|
1343
|
+
const child = spawnOpenChamberLikeIdleProcess();
|
|
1344
|
+
try {
|
|
1345
|
+
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
1346
|
+
fs.writeFileSync(await getPidFilePath(server.port), String(child.pid));
|
|
1347
|
+
fs.writeFileSync(await getInstanceFilePath(server.port), JSON.stringify({ port: server.port, host: '0.0.0.0', launchMode: 'daemon' }, null, 2));
|
|
1348
|
+
|
|
1349
|
+
const output = await captureStdout(() => commands.status({ json: true }));
|
|
1350
|
+
|
|
1351
|
+
// The probe answers on loopback; the bind address comes from the registry.
|
|
1352
|
+
expect(JSON.parse(output).instances).toEqual([
|
|
1353
|
+
expect.objectContaining({ runtime: 'cli', port: server.port, launchMode: 'daemon', bindHost: '0.0.0.0' }),
|
|
1354
|
+
]);
|
|
1355
|
+
} finally {
|
|
1356
|
+
child.kill('SIGKILL');
|
|
1357
|
+
await server.close();
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
});
|
|
1361
|
+
|
|
1339
1362
|
it('stop --port reaches unmanaged shutdown when the registry is empty', async () => {
|
|
1340
1363
|
await withTempOpenChamberDataDir(async () => {
|
|
1341
1364
|
const server = await startMockOpenChamberServer();
|
package/bin/lib/cli-http.js
CHANGED
|
@@ -3,6 +3,10 @@ import { readDesktopLocalClientTokenFromSettings, readDesktopLocalPortFromSettin
|
|
|
3
3
|
import { getInstanceFilePath, readInstanceOptions } from './cli-process.js';
|
|
4
4
|
|
|
5
5
|
const UI_SESSION_COOKIE_NAME = 'oc_ui_session';
|
|
6
|
+
// The server folds the request port into the cookie name (oc_ui_session_<port>)
|
|
7
|
+
// so LAN instances on different ports don't share one jar (issue #2377). Accept
|
|
8
|
+
// both the bare name and any per-port variant when extracting.
|
|
9
|
+
const UI_SESSION_COOKIE_PATTERN = new RegExp(`(?:^|,\\s*)(${UI_SESSION_COOKIE_NAME}(?:_\\d+)?=[^;]+)`);
|
|
6
10
|
|
|
7
11
|
function extractUiSessionCookie(response) {
|
|
8
12
|
const values = [];
|
|
@@ -23,7 +27,7 @@ function extractUiSessionCookie(response) {
|
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
for (const setCookie of values) {
|
|
26
|
-
const match = setCookie.match(
|
|
30
|
+
const match = setCookie.match(UI_SESSION_COOKIE_PATTERN);
|
|
27
31
|
if (match?.[1]) return match[1];
|
|
28
32
|
}
|
|
29
33
|
return null;
|
|
@@ -30,6 +30,7 @@ async function statusCommand(options = {}) {
|
|
|
30
30
|
pid: Number.isFinite(desktopInstance.pid) ? desktopInstance.pid : null,
|
|
31
31
|
launchMode: null,
|
|
32
32
|
passwordProtected: null,
|
|
33
|
+
bindHost: null,
|
|
33
34
|
}
|
|
34
35
|
: null;
|
|
35
36
|
|
|
@@ -46,6 +47,9 @@ async function statusCommand(options = {}) {
|
|
|
46
47
|
pid: instance.pid,
|
|
47
48
|
launchMode: instance.launchMode || 'daemon',
|
|
48
49
|
passwordProtected: instance.source === 'probe' ? null : passwordProtected,
|
|
50
|
+
// The address the server was asked to bind, not the one a probe
|
|
51
|
+
// answered on: a server bound to 0.0.0.0 also answers on loopback.
|
|
52
|
+
bindHost: storedOptions.host || null,
|
|
49
53
|
};
|
|
50
54
|
});
|
|
51
55
|
|
|
@@ -61,6 +65,7 @@ async function statusCommand(options = {}) {
|
|
|
61
65
|
pid: Number.isFinite(explicitDesktop.pid) ? explicitDesktop.pid : null,
|
|
62
66
|
launchMode: null,
|
|
63
67
|
passwordProtected: null,
|
|
68
|
+
bindHost: null,
|
|
64
69
|
});
|
|
65
70
|
}
|
|
66
71
|
const runningCount = instances.length;
|
package/dist/assets/{CodeMirrorCommentWidgets-C9kV-n7r.js → CodeMirrorCommentWidgets-B_vBPQYm.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./vendor-react-BUCujlKS.js";import{I as l,a as I}from"./useInlineCommentController-
|
|
1
|
+
import{j as a}from"./vendor-react-BUCujlKS.js";import{I as l,a as I}from"./useInlineCommentController-Cq4SUjsA.js";function E(g){const{drafts:x,editingDraftId:d,commentText:o,onTextChange:r,selection:n,isDragging:u,fileLabel:s,newWidgetId:f,mapDraftToRange:p,onSave:m,onCancel:c,onEdit:C,onDelete:h}=g,t=[];for(const e of x){const i=p(e);if(e.id===d){t.push({afterLine:i.end,id:`edit-${e.id}`,content:a.jsx(l,{initialText:o,onTextChange:r,fileLabel:s,lineRange:i,isEditing:!0,onSave:m,onCancel:c},`edit-${e.id}`)});continue}t.push({afterLine:i.end,id:`card-${e.id}`,content:a.jsx(I,{draft:e,onEdit:()=>C(e),onDelete:()=>h(e)},`card-${e.id}`)})}if(n&&!d&&!u){const e={...n,start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)};t.push({afterLine:e.end,id:f,content:a.jsx(l,{initialText:o,onTextChange:r,fileLabel:s,lineRange:e,isEditing:!1,onSave:m,onCancel:c},f)})}return t}export{E as b};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{R as r,f as et,j as t}from"./vendor-react-BUCujlKS.js";import{u as me,O as De,a as Ae,G as Dn}from"./index-B-2_X4DD.js";import{c as An,b as Vn,u as En,a as Ln,B as Mn,C as Tn,P as _t,h as Bn,e as In,g as Pn,i as _n,f as On}from"./patchFileDiff-DRh-AQvd.js";import{c as zn,b as Kn,i as Gn,u as Hn,a as $n,d as qn,S as Wn}from"./SubmoduleDiffSummary-hkGcvs0E.js";import{f as $e,B as ke,I as O,h as Ve,Z as Xt,af as Un,K as ae,ag as Jn,bg as Xn,J as Yn,ah as Qn,aj as Zn,z as Ot,k as es,d6 as Yt,t as He,ko as ts,aw as Ze,ke as Qt,kp as ns,ax as Zt,gG as ss,au as Qe,av as rs,c6 as en,aq as is,as as os,at as as,ap as ls}from"./useAppFontEffects-DcdrFv2Z.js";import{f as cs,d as us}from"./runtimeEndpointReset-Gqhmkm3U.js";import{P as ds}from"./PierreDiffViewer-CgLl_tp7.js";import{u as fs,v as ms,g as ps,W as hs}from"./main-BDka4W43.js";import"./vendor-scheduler-7OC5HNn7.js";import"./vendor-zod-CgAdXWZO.js";import"./vendor-vite-runtime-DD1OZmLC.js";import"./vendor-zustand-BAGL70zf.js";import"./vendor-opencode-sdk-BJ73u-bH.js";import"./VirtualizedFileDiff-BK4aU5qJ.js";import"./web-components-2vo9YsZc.js";import"./computeVirtualFileMetrics-BVTujWSX.js";import"./vendor-shiki-Bbf2GEcE.js";import"./vendor-shikijs-core-CGM_jqPK.js";import"./vendor-shikijs-types-CPSbSeK6.js";import"./vendor-shikijs-vscode-textmate-BgLrS_2D.js";import"./vendor-hast-util-to-html-BKBhbTDb.js";import"./vendor-html-void-elements-CkdplsNl.js";import"./vendor-property-information-rJCbAzvX.js";import"./vendor-zwitch-C2o2j-tx.js";import"./vendor-stringify-entities-CsH1VEn9.js";import"./vendor-character-entities-legacy-BpoLgcEt.js";import"./vendor-character-entities-html4-D7taRCQ7.js";import"./vendor-ccount-c2V3InAJ.js";import"./vendor-comma-separated-tokens-D8TqSuIK.js";import"./vendor-space-separated-tokens-DD3iYX1K.js";import"./vendor-hast-util-whitespace-D4Wp6AEg.js";import"./vendor-shikijs-engine-oniguruma-DPWuIF1G.js";import"./themeResolver-BmJyTmjJ.js";import"./vendor-pierre-theming-C6Z4M5_u.js";import"./vendor-shikijs-engine-javascript-Cme4830A.js";import"./vendor-oniguruma-to-es-DLBnFDCE.js";import"./vendor-oniguruma-parser-C0D4_9rT.js";import"./vendor-regex-BBWcyTkg.js";import"./vendor-regex-utilities-2BQyy0xI.js";import"./vendor-regex-recursion-JU4mF-dD.js";import"./vendor-shikijs-transformers-CZWsLLKm.js";import"./isDiffPlainText-D3yX_vx4.js";import"./vendor-diff-C3JhlQdm.js";import"./vendor-simplewebauthn-browser-VDA66rT_.js";import"./vendor-base-ui-CsXYnR5c.js";import"./vendor-floating-ui-utils-D6FqdtJt.js";import"./vendor-floating-ui-react-dom-DxYCWdHj.js";import"./vendor-floating-ui-dom-BTvzWks8.js";import"./vendor-floating-ui-core-PuGzNPnN.js";import"./vendor-use-sync-external-store-D6wYuSt-.js";import"./vendor-class-variance-authority-5VPnzWs2.js";import"./vendor-clsx-B-dksMZM.js";import"./vendor-dnd-kit-core-BZknOX2w.js";import"./vendor-dnd-kit-utilities-B_MdXhJC.js";import"./vendor-dnd-kit-accessibility-BHxJPORy.js";import"./vendor-dnd-kit-sortable-CsEagZ81.js";import"./vendor-framer-motion-Bq3iTZ6r.js";import"./vendor-motion-dom-DcCgeG69.js";import"./vendor-motion-utils-BGh8QBgx.js";import"./vendor-tanstack-react-virtual-ClYN8CzB.js";import"./vendor-tanstack-virtual-core-BewVQryB.js";import"./contextPanelEmbeddedChat-CirXEPJq.js";import"./vendor-sonner-DFyL3AvE.js";import"./vendor-cmdk-DgLInKvT.js";import"./vendor-radix-ui-react-dialog-B94Bt2qq.js";import"./vendor-radix-ui-primitive-Dc_FVRD7.js";import"./vendor-radix-ui-react-compose-refs-DcAh5WdT.js";import"./vendor-radix-ui-react-context-Czxm7Z62.js";import"./vendor-radix-ui-react-id-f5BLKEVw.js";import"./vendor-radix-ui-react-use-layout-effect-D_3IhJdJ.js";import"./vendor-radix-ui-react-use-controllable-state-BFT5YmkA.js";import"./vendor-radix-ui-react-dismissable-layer-D7kXcwgJ.js";import"./vendor-radix-ui-react-primitive-DhVoX9SD.js";import"./vendor-radix-ui-react-slot-BQgQOasS.js";import"./vendor-radix-ui-react-use-callback-ref-BZPnuXAC.js";import"./vendor-radix-ui-react-use-escape-keydown-oph88g-F.js";import"./vendor-radix-ui-react-focus-scope-CiaxW4dD.js";import"./vendor-radix-ui-react-portal-BMJYHWck.js";import"./vendor-radix-ui-react-presence-CNxf-uq4.js";import"./vendor-radix-ui-react-focus-guards-B6qJXYua.js";import"./vendor-react-remove-scroll-DO7dCTnK.js";import"./vendor-tslib-De9GV7Vy.js";import"./vendor-react-remove-scroll-bar-BcFYyj3E.js";import"./vendor-react-style-singleton-q6EMHnwf.js";import"./vendor-get-nonce-C-Z93AgS.js";import"./vendor-use-sidecar-zDC0RhA3.js";import"./vendor-use-callback-ref-D3RC8gqK.js";import"./vendor-aria-hidden-DvXkyWUv.js";import"./vendor-codemirror-language-BgPj_McA.js";import"./vendor-lezer-common-B3-cUCR_.js";import"./vendor-codemirror-state-C9awkmn-.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./vendor-codemirror-view-CiLROUVV.js";import"./vendor-style-mod-NZ5MEPvj.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";import"./vendor-lezer-highlight-CDMHUZ74.js";import"./vendor-codemirror-lang-javascript-Cc2ZYbgX.js";import"./vendor-lezer-javascript-D7Tj24ot.js";import"./vendor-lezer-lr-bhwg1HMg.js";import"./vendor-codemirror-autocomplete-DzPz9Wgq.js";import"./vendor-codemirror-lang-json-CMBS2tG9.js";import"./vendor-lezer-json-Iaex0UN-.js";import"./vendor-codemirror-lang-css-O0cZX78y.js";import"./vendor-lezer-css-C5xB6jxd.js";import"./vendor-codemirror-lang-html-CfgK872x.js";import"./vendor-lezer-html-C0I1p52t.js";import"./vendor-codemirror-lang-markdown-BPGOH9ye.js";import"./vendor-lezer-markdown-C6g-d6P3.js";import"./vendor-codemirror-language-data-BFm1Ju2w.js";import"./vendor-codemirror-lang-python-HahnQaAS.js";import"./vendor-lezer-python-CvuFxeZl.js";import"./vendor-codemirror-commands-B7H_j0iU.js";import"./vendor-legendapp-list-BuBPBC3R.js";import"./vendor-tailwind-merge-CPcsbTWB.js";import"./vendor-fuse.js-Dw8P0qyA.js";import"./GuestAttachDialog-DIf2U85Z.js";import"./PluginPane-B5cn-jPy.js";import"./Virtualizer-D_a8gKmg.js";import"./useInlineCommentController-Cq4SUjsA.js";import"./appThemeRegistry-DnOVbJjF.js";import"./textMateThemeFromAppTheme-BP60t9SX.js";import"./vendor-katex-CHD9BdDO.js";import"./useRootScrollLock-CSdR6Wnm.js";import"./scheduledTasksApi-CeRAIUmW.js";import"./vendor-cron-parser-CUcP7OfX.js";import"./vendor-luxon-BZ0puJYg.js";const gs=r.memo(function(e){const s=et.c(13),{index:l,staged:y,busyHunk:p,disabled:j,onAction:S}=e,{t:D}=$e();let c;s[0]!==y?(c=y?["unstage"]:["discard","stage"],s[0]=y,s[1]=c):c=s[1];const v=c;let C;s[2]===Symbol.for("react.memo_cache_sentinel")?(C={top:"var(--oc-hunk-action-offset, 0.25rem)"},s[2]=C):C=s[2];let m;s[3]!==v||s[4]!==p||s[5]!==j||s[6]!==l||s[7]!==S||s[8]!==D?(m=t.jsx("div",{className:"pointer-events-auto flex items-center gap-0.5 rounded-full border border-[var(--interactive-border)]/45 bg-[var(--surface-background)]/95 px-1 py-0.5 shadow-sm backdrop-blur-md",children:v.map(w=>{const A=D(w==="stage"?"diffView.hunk.stageTitle":w==="unstage"?"diffView.hunk.unstageTitle":"diffView.hunk.discardTitle",{index:l+1}),P=p?.index===l&&p.action===w;return t.jsx(ke,{variant:"ghost",size:"xs",className:Ve("rounded-full bg-transparent text-muted-foreground hover:bg-transparent hover:text-foreground",w==="discard"&&"text-[var(--status-error)] hover:text-[var(--status-error)]",w==="stage"&&"text-[var(--status-success)] hover:text-[var(--status-success)]"),disabled:j||p!==null,title:A,"aria-label":A,onPointerDown:xs,onClick:f=>{f.stopPropagation(),S(l,w)},children:t.jsx(O,{name:P?"loader-4":w==="stage"?"add":"arrow-go-back",className:Ve(w==="stage"?"size-4":"size-3.5",P&&"animate-spin")})},w)})}),s[3]=v,s[4]=p,s[5]=j,s[6]=l,s[7]=S,s[8]=D,s[9]=m):m=s[9];let E;return s[10]!==l||s[11]!==m?(E=t.jsx("div",{className:"pointer-events-none absolute right-3 z-20",style:C,"data-hunk-actions":l,children:m}),s[10]=l,s[11]=m,s[12]=E):E=s[12],E});function xs(o){return o.stopPropagation()}const zt=(o,e)=>{if(e.length===0)return null;let s=null,l=null;for(const p of e)p.top<=o?(!s||p.top>s.top)&&(s=p):(!l||p.top<l.top)&&(l=p);const y=s??l;return y?{path:y.path,topOffset:y.top-o}:null},ys=(o,e,s,l)=>Math.min(Math.max(0,l),Math.max(0,o+s-e)),Kt=o=>{if(!o)return null;const e=o.split(`
|
|
2
|
+
`);let s=null;for(const l of e){const y=l.match(/^@@\s*-\d+(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s*@@/);if(y){const p=Number.parseInt(y[1]??"",10);s=Number.isFinite(p)&&p>=1?p:null;continue}if(s!==null){if(l.startsWith(" ")){s+=1;continue}if(l.startsWith("+"))return s;if(l.startsWith("-"))return Math.max(1,s)}}return null},ws=1100,bs=15e3,Gt=500,Ht=300,tn=1e6,kt=3,js=o=>o<=6?o:o<=12?6:o<=25?4:2,$t={status:"loading"},vs=3,Ss=r.memo(()=>{const o=et.c(4),{t:e}=$e();let s;o[0]!==e?(s=e("diffView.binary.unavailable"),o[0]=e,o[1]=s):s=o[1];let l;return o[2]!==s?(l=t.jsx("div",{className:"rounded-lg border border-border/60 bg-background px-3 py-2",children:t.jsx("div",{className:"typography-meta text-muted-foreground",children:s})}),o[2]=s,o[3]=l):l=o[3],l}),nn={"?":{code:"?",color:"var(--status-info)",descriptionKey:"diffView.change.untracked"},A:{code:"A",color:"var(--status-success)",descriptionKey:"diffView.change.new"},D:{code:"D",color:"var(--status-error)",descriptionKey:"diffView.change.deleted"},R:{code:"R",color:"var(--status-info)",descriptionKey:"diffView.change.renamed"},C:{code:"C",color:"var(--status-info)",descriptionKey:"diffView.change.copied"},M:{code:"M",color:"var(--status-warning)",descriptionKey:"diffView.change.modified"}},ks=nn.M,Ns=o=>{const e=o.index?.trim(),s=o.working_dir?.trim();return e&&e!=="?"?e.charAt(0):s?s.charAt(0):e?.charAt(0)||s?.charAt(0)||"M"},sn=o=>{const e=Ns(o);return nn[e]??ks},Cs=o=>{const{index:e,working_dir:s}=o;return e==="A"||s==="A"||e==="?"||s==="?"},qt=o=>{const e=o.index?.trim();return!!(e&&e!=="?")},Wt=o=>!!o.working_dir?.trim()||o.index==="?",Rs=(o,e)=>ss(o,e),Ut=o=>(o||"").replace(/\\/g,"/").replace(/\/+$/,""),Jt=(o,e)=>{const s=o.split(`
|
|
3
|
+
`),l=e.split(`
|
|
4
|
+
`),y=Math.min(s.length,l.length);for(let p=0;p<y;p+=1)if(s[p]!==l[p])return p+1;return l.length>s.length?s.length+1:s.length>l.length?Math.max(1,l.length):1},Fs=o=>Array.isArray(o)?o.filter(e=>!e||typeof e!="object"?!1:typeof e.file=="string"):[],Ds=o=>o==="added"?"A":o==="deleted"?"D":"M",Nt=(o,e,s)=>_n(e)?{original:"",modified:"",isBinary:!0,patch:e,contextMode:s}:{original:"",modified:"",patch:e,fileDiff:On(o,e),contextMode:s},rn=(o,e,s)=>{const l=o??0,y=e??0;return!l&&!y?null:t.jsxs("span",{className:Ve("typography-meta flex items-center gap-1 text-xs whitespace-nowrap","flex-shrink-0",s?.className),children:[l?t.jsxs("span",{style:{color:"var(--status-success)"},children:["+",l]}):null,y?t.jsxs("span",{style:{color:"var(--status-error)"},children:["-",y]}):null]})},As=r.memo(o=>{const e=et.c(68),{scope:s,workingCount:l,stagedCount:y,turnCount:p,branchCount:j,commitCount:S,prCount:D,showCommitOption:c,showBranchOption:v,onScopeChange:C}=o,{t:m}=$e(),[E,w]=r.useState(!1),A=s==="pr"?D??0:s==="staged"?y:s==="turn"?p:s==="branch"?j??0:s==="commit"?S??0:l;let P;e[0]!==s||e[1]!==m?(P=m(s==="pr"?"session.githubIntegration.tabs.pullRequests":s==="staged"?"diffView.scope.staged":s==="turn"?"diffView.scope.lastTurn":s==="branch"?"diffView.scope.branch":s==="commit"?"commitComparison.mode":"diffView.scope.changed"),e[0]=s,e[1]=m,e[2]=P):P=e[2];const f=P;let be;e[3]!==m?(be=m("diffView.scope.selectorAria"),e[3]=m,e[4]=be):be=e[4];let Z;e[5]!==A?(Z=t.jsxs("span",{className:"diff-toolbar__scope-count",children:[": ",A]}),e[5]=A,e[6]=Z):Z=e[6];let ee;e[7]!==f||e[8]!==Z?(ee=t.jsxs("span",{className:"whitespace-nowrap",children:[f,Z]}),e[7]=f,e[8]=Z,e[9]=ee):ee=e[9];let Ne;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ne=t.jsx(O,{name:"arrow-down-s",className:"size-4 flex-shrink-0 opacity-60"}),e[10]=Ne):Ne=e[10];let $;e[11]!==be||e[12]!==ee?($=t.jsx(is,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex h-7 flex-shrink-0 items-center gap-1.5 rounded-md px-2 typography-ui-label font-semibold text-foreground outline-none hover:bg-interactive-hover focus-visible:ring-2 focus-visible:ring-ring","aria-label":be,children:[ee,Ne]})}),e[11]=be,e[12]=ee,e[13]=$):$=e[13];let x;e[14]!==C?(x=G=>{(G==="working"||G==="staged"||G==="turn"||G==="branch"||G==="commit"||G==="pr")&&(C?.(G),w(!1))},e[14]=C,e[15]=x):x=e[15];let I;e[16]!==m?(I=m("diffView.scope.changed"),e[16]=m,e[17]=I):I=e[17];let q;e[18]!==I?(q=t.jsx("span",{children:I}),e[18]=I,e[19]=q):q=e[19];let le;e[20]!==l?(le=t.jsx("span",{className:"typography-meta text-muted-foreground",children:l}),e[20]=l,e[21]=le):le=e[21];let te;e[22]!==le||e[23]!==q?(te=t.jsx(Qe,{value:"working",children:t.jsxs("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-3",children:[q,le]})}),e[22]=le,e[23]=q,e[24]=te):te=e[24];let pe;e[25]!==m?(pe=m("diffView.scope.staged"),e[25]=m,e[26]=pe):pe=e[26];let ne;e[27]!==pe?(ne=t.jsx("span",{children:pe}),e[27]=pe,e[28]=ne):ne=e[28];let he;e[29]!==y?(he=t.jsx("span",{className:"typography-meta text-muted-foreground",children:y}),e[29]=y,e[30]=he):he=e[30];let J;e[31]!==ne||e[32]!==he?(J=t.jsx(Qe,{value:"staged",children:t.jsxs("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-3",children:[ne,he]})}),e[31]=ne,e[32]=he,e[33]=J):J=e[33];let B;e[34]!==m?(B=m("diffView.scope.lastTurn"),e[34]=m,e[35]=B):B=e[35];let se;e[36]!==B?(se=t.jsx("span",{children:B}),e[36]=B,e[37]=se):se=e[37];let X;e[38]!==p?(X=t.jsx("span",{className:"typography-meta text-muted-foreground",children:p}),e[38]=p,e[39]=X):X=e[39];let z;e[40]!==se||e[41]!==X?(z=t.jsx(Qe,{value:"turn",children:t.jsxs("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-3",children:[se,X]})}),e[40]=se,e[41]=X,e[42]=z):z=e[42];let je;e[43]!==j||e[44]!==v||e[45]!==m?(je=v?t.jsx(Qe,{value:"branch",children:t.jsxs("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-3",children:[t.jsx("span",{children:m("diffView.scope.branch")}),t.jsx("span",{className:"typography-meta text-muted-foreground",children:j??"…"})]})}):null,e[43]=j,e[44]=v,e[45]=m,e[46]=je):je=e[46];let V;e[47]!==S||e[48]!==c||e[49]!==m?(V=c&&t.jsx(Qe,{value:"commit",children:t.jsxs("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-3",children:[t.jsx("span",{children:m("commitComparison.mode")}),t.jsx("span",{className:"typography-meta text-muted-foreground",children:S??"…"})]})}),e[47]=S,e[48]=c,e[49]=m,e[50]=V):V=e[50];let K;e[51]!==D||e[52]!==c||e[53]!==m?(K=c&&t.jsx(Qe,{value:"pr",children:t.jsxs("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-3",children:[t.jsx("span",{children:m("session.githubIntegration.tabs.pullRequests")}),t.jsx("span",{className:"typography-meta text-muted-foreground",children:D??"…"})]})}),e[51]=D,e[52]=c,e[53]=m,e[54]=K):K=e[54];let R;e[55]!==s||e[56]!==te||e[57]!==J||e[58]!==z||e[59]!==je||e[60]!==V||e[61]!==K||e[62]!==x?(R=t.jsx(os,{align:"start",className:"w-40",children:t.jsxs(as,{value:s,onValueChange:x,children:[te,J,z,je,V,K]})}),e[55]=s,e[56]=te,e[57]=J,e[58]=z,e[59]=je,e[60]=V,e[61]=K,e[62]=x,e[63]=R):R=e[63];let ce;return e[64]!==E||e[65]!==R||e[66]!==$?(ce=t.jsxs(ls,{open:E,onOpenChange:w,children:[$,R]}),e[64]=E,e[65]=R,e[66]=$,e[67]=ce):ce=e[67],ce}),Vs=r.memo(o=>{const e=et.c(11),{changedFiles:s,selectedFile:l,onSelectFile:y}=o,{t:p}=$e();if(s.length===0)return null;let j;if(e[0]!==s||e[1]!==y||e[2]!==l||e[3]!==p){let D;e[5]!==y||e[6]!==l||e[7]!==p?(D=c=>{const v=sn(c),C=l===c.path;return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>y(c.path),className:Ve("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors",C?"bg-interactive-selection text-interactive-selection-foreground":"text-muted-foreground hover:bg-interactive-hover hover:text-foreground"),children:[t.jsx(Zt,{filePath:c.path,className:"h-3.5 w-3.5 flex-shrink-0"}),t.jsx("span",{className:"typography-micro font-semibold w-4 text-center uppercase",style:{color:v.color},title:p(v.descriptionKey),"aria-label":p(v.descriptionKey),children:v.code}),t.jsx("span",{className:"min-w-0 flex-1 truncate typography-meta",style:{direction:"rtl",textAlign:"left",unicodeBidi:"plaintext"},title:c.path,children:c.path}),rn(c.insertions,c.deletions)]})},c.path)},e[5]=y,e[6]=l,e[7]=p,e[8]=D):D=e[8],j=s.map(D),e[0]=s,e[1]=y,e[2]=l,e[3]=p,e[4]=j}else j=e[4];let S;return e[9]!==j?(S=t.jsx(en,{outerClassName:"flex-1 min-h-0",className:"px-2 py-2",children:t.jsx("ul",{className:"flex flex-col gap-1",children:j})}),e[9]=j,e[10]=S):S=e[10],S}),Es=r.memo(o=>{const e=et.c(20),{filePath:s,diff:l,renderSideBySide:y}=o,{t:p}=$e(),j=l.original.length>0,S=l.modified.length>0,D=y?"flex flex-row gap-6 items-start justify-center":"flex flex-col gap-4 items-center",c=y?"flex flex-col items-center gap-2 flex-1 min-w-0":"flex flex-col items-center gap-2";let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={contain:"layout"},e[0]=v):v=e[0];let C;e[1]!==l.original||e[2]!==s||e[3]!==j||e[4]!==c||e[5]!==y||e[6]!==p?(C=j&&t.jsxs("div",{className:c,children:[t.jsx("span",{className:"typography-meta text-muted-foreground font-medium",children:p("diffView.image.original")}),t.jsx("img",{src:l.original,alt:p("diffView.image.originalAlt",{path:s}),className:y?"max-w-full max-h-[70vh] object-contain":"max-w-full object-contain",style:{imageRendering:"auto"}})]}),e[1]=l.original,e[2]=s,e[3]=j,e[4]=c,e[5]=y,e[6]=p,e[7]=C):C=e[7];let m;e[8]!==l.modified||e[9]!==s||e[10]!==S||e[11]!==j||e[12]!==c||e[13]!==y||e[14]!==p?(m=S&&t.jsxs("div",{className:c,children:[t.jsx("span",{className:"typography-meta text-muted-foreground font-medium",children:p(j?"diffView.image.modified":"diffView.image.new")}),t.jsx("img",{src:l.modified,alt:p("diffView.image.modifiedAlt",{path:s}),className:y?"max-w-full max-h-[70vh] object-contain":"max-w-full object-contain",style:{imageRendering:"auto"}})]}),e[8]=l.modified,e[9]=s,e[10]=S,e[11]=j,e[12]=c,e[13]=y,e[14]=p,e[15]=m):m=e[15];let E;return e[16]!==D||e[17]!==C||e[18]!==m?(E=t.jsx("div",{className:"w-full overflow-auto p-4",style:v,children:t.jsxs("div",{className:D,children:[C,m]})}),e[16]=D,e[17]=C,e[18]=m,e[19]=E):E=e[19],E}),Ls=r.memo(o=>{const e=et.c(23),{filePath:s,diff:l,staged:y,renderSideBySide:p,wrapLines:j,hunkActions:S,onExpandContextRequest:D,pendingContextExpansion:c,contextLoading:v}=o;let C;e[0]!==s?(C=rs(s)||"text",e[0]=s,e[1]=C):C=e[1];const m=C;if(l.submodule){let A;return e[2]!==l.submodule||e[3]!==y?(A=t.jsx(Wn,{state:l.submodule,staged:y}),e[2]=l.submodule,e[3]=y,e[4]=A):A=e[4],A}if(l.isBinary){let A;return e[5]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ss,{}),e[5]=A):A=e[5],A}if(Ze(s)){let A;return e[6]!==l||e[7]!==s||e[8]!==p?(A=t.jsx(Es,{filePath:s,diff:l,renderSideBySide:p}),e[6]=l,e[7]=s,e[8]=p,e[9]=A):A=e[9],A}let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E={contain:"layout"},e[10]=E):E=e[10];let w;return e[11]!==v||e[12]!==l.fileDiff||e[13]!==l.modified||e[14]!==l.original||e[15]!==s||e[16]!==S||e[17]!==m||e[18]!==D||e[19]!==c||e[20]!==p||e[21]!==j?(w=t.jsx("div",{className:"w-full",style:E,children:t.jsx(ds,{original:l.original,modified:l.modified,fileDiff:l.fileDiff,language:m,fileName:s,renderSideBySide:p,wrapLines:j,layout:"inline",hunkActions:S,onExpandContextRequest:D,pendingContextExpansion:c,contextLoading:v})}),e[11]=v,e[12]=l.fileDiff,e[13]=l.modified,e[14]=l.original,e[15]=s,e[16]=S,e[17]=m,e[18]=D,e[19]=c,e[20]=p,e[21]=j,e[22]=w):w=e[22],w}),Ms=r.memo(({visible:o=!0,directory:e,file:s,layout:l,wrapLines:y,isSelected:p,isExpanded:j,isMounted:S,onSelect:D,onExpandedChange:c,registerSectionRef:v,showOpenInEditorAction:C=!1,isOpeningInEditor:m=!1,onOpenInEditor:E,staged:w=!1,loadFullFiles:A=!1,initialDiffData:P=null,comparisonDiff:f,onRetryComparisonDiff:be,loadFullComparisonDiff:Z,readOnlyActions:ee=!1,hunkActionsEnabled:Ne=!1,contentRevision:$=0})=>{const{t:x}=$e(),{git:I}=Xt(),q=ae(r.useCallback(g=>g.directories.get(e)?.diffCache.get(s.path)??null,[e,s.path])),le=ae(g=>g.setDiff),te=ae(g=>g.fetchStatus),pe=me(g=>g.setDiffFileLayout),[ne,he]=r.useState(0),[J,B]=r.useState(null),[se,X]=r.useState(!1),[z,je]=r.useState(null),V=z!==null&&z.source===f?z.result:f,K=!!e&&!P&&(!f||!!Z),R=r.useMemo(()=>V?V.status==="error"?{kind:"error",message:V.message}:null:J,[V,J]),ce=V?V.status==="loading":se,[G,ot]=r.useState(null),Te=r.useRef(!1),[Be,tt]=r.useState(null),[at,pt]=r.useState(!1),[nt,Ie]=r.useState(null),[qe,Pe]=r.useState(null),[a,Ee]=r.useState(null),re=A||a!==null;r.useEffect(()=>{if(!a||!Z||!f||f.status!=="ready"||z?.source===f)return;let g=!1;return Z(s.path).then(L=>{if(!g){if(L.status==="error"){He.error(L.message),Ee(null);return}je({source:f,result:L})}}),()=>{g=!0}},[a,s.path,z,Z,f]);const ge=r.useRef(null),Le=r.useRef(null),_e=r.useMemo(()=>sn(s),[s]),We=l==="side-by-side",Oe=re?"full":"patch",ve=`${s.index}:${s.working_dir}:${s.insertions}:${s.deletions}`,ue=Ne&&!ee&&!P&&!V&&!Ze(s.path),Ue=JSON.stringify([Ae(),e,s.path,w,ve,ne,$]),W=Be?.scope===Ue?Be.patch:null,Ce=Be?.scope===Ue?Be.submodule:null,ie=r.useMemo(()=>V?V.status==="ready"?V.data:null:P||(w?qe:nt||(q?{original:q.original,modified:q.modified,isBinary:q.isBinary,submodule:q.submodule,contextMode:"full"}:null)),[V,q,P,nt,w,qe]),Je=ie?.contextMode===Oe,st=r.useCallback(g=>{Le.current=g,v(s.path,g)},[s.path,v]),ze=r.useCallback(g=>{c(s.path,g)},[s.path,c]),Xe=r.useCallback(()=>{D(s.path)},[s.path,D]),lt=r.useRef({fileStatusKey:ve,staged:w});r.useEffect(()=>{if(!o)return;const g=lt.current;g.fileStatusKey===ve&&g.staged===w||(lt.current={fileStatusKey:ve,staged:w},w?Pe(null):Ie(null),B(null),ge.current=null)},[ve,w,o]);const[ht,gt]=r.useState($),xe=ht===$;r.useEffect(()=>{xe||(B(null),ge.current=null)},[xe]),r.useEffect(()=>{if(!o||!j||!S||J)return;if(!e||V||P||ie&&Je&&xe&&(!ue||W!==null)){ge.current=null,X(!1);return}const g=`${e}::${s.path}::${w?"staged":"unstaged"}::${ve}::${Oe}::${ne}::${$}`;if(ge.current===g)return;ge.current=g,B(null),X(!0);let L=!1;const ye=Ae(),we=re?tn:kt,_=Ze(s.path)?I.getGitFileDiff(e,{path:s.path,staged:w}):!re&&W!==null?Promise.resolve({diff:W,submodule:Ce}):I.getGitDiff(e,{path:s.path,staged:w,contextLines:we}),Ke=ue&&re&&W===null?I.getGitDiff(e,{path:s.path,staged:w,contextLines:kt}).then(b=>b.diff):Promise.resolve(W),xt=Promise.all([_,Ke]),ut=bs;let rt;const yt=new Promise((b,de)=>{rt=setTimeout(()=>de(new Error(`Timed out after ${ut}ms`)),ut)});return Promise.race([xt,yt]).then(([b,de])=>{if(L||ye!==Ae())return;const U="diff"in b&&!re?b.diff:de;if(ue&&re&&U!==null&&/^@@\s/m.test(U)&&"diff"in b&&b.diff!==U&&!Bn(b.diff,U))throw tt(null),new Error(x("diffView.hunk.unavailable"));if(ue&&U!==null&&tt({scope:Ue,patch:U,submodule:b.submodule}),"diff"in b){const Y={...Nt(s.path,b.diff,Oe),submodule:b.submodule};w?Pe(Y):Ie(Y)}else{const Y={original:b.original??"",modified:b.modified??"",isBinary:b.isBinary,submodule:b.submodule,contextMode:"full"};w?Pe(Y):le(e,s.path,Y,ye)}gt($),X(!1)}).catch(b=>{if(!(L||ye!==Ae())){if(X(!1),b instanceof Dn){B({kind:"unavailable",reason:b.reason}),b.reason==="path_not_found"&&te(e,I,{force:!0,silent:!0});return}B({kind:"error",message:b instanceof Error?b.message:String(b)})}}).finally(()=>clearTimeout(rt)),()=>{L=!0,clearTimeout(rt),ge.current===g&&(ge.current=null)}},[W,Ce,$,ue,xe,Ue,V,Oe,ie,Je,ne,e,te,s.path,ve,I,P,j,S,re,J,le,w,x,o]);const Me=r.useCallback(()=>{ze(!j),Xe()},[ze,Xe,j]),oe=r.useCallback(()=>{B(null),tt(null),Ie(null),Pe(null),ge.current=null,he(g=>g+1)},[]),H=r.useCallback(async(g,L)=>{if(!e||!ue||ce||R||Te.current||G!==null)return;const ye=W?In(W,g):null;if(!ye){He.error(x("diffView.hunk.unavailable"));return}if(w&&L!=="unstage"||!w&&L==="unstage")return;Te.current=!0;const we=Ae();ot({index:g,action:L});try{const _=L==="stage"?I.stageGitHunk:L==="unstage"?I.unstageGitHunk:I.revertGitHunk;if(!_){He.error(x("diffView.hunk.unsupported"));return}if(await _(e,s.path,ye),we!==Ae())return;oe(),Yt.requestGitRefresh({directory:e,paths:[s.path]}),await te(e,I)}catch(_){if(we!==Ae())return;oe(),He.error(_ instanceof Error&&_.message?_.message:x("diffView.hunk.unavailable"))}finally{Te.current=!1,ot(_=>_?.index===g&&_.action===L?null:_)}},[W,ue,ce,R,e,te,s.path,I,G,oe,w,x]),Se=r.useMemo(()=>ue&&W!==null?Pn(W):[],[W,ue]),Re=r.useCallback(g=>t.jsx(gs,{index:g,staged:w,busyHunk:G,disabled:ce||!!R,onAction:H}),[R,H,G,ce,w]),ct=r.useMemo(()=>Se.length>0?{anchors:Se,render:Re}:void 0,[Se,Re]);return t.jsxs("div",{ref:st,className:"scroll-mt-9 border-b border-[var(--interactive-border)]/40 last:border-b-0",children:[t.jsx("div",{className:"sticky top-0 z-30 border-b border-[var(--interactive-border)]/35 bg-[var(--surface-elevated)]/90 backdrop-blur-md supports-[backdrop-filter]:bg-[var(--surface-elevated)]/80",children:t.jsxs("div",{role:"button",tabIndex:0,onClick:Me,onKeyDown:g=>{g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),Me())},className:Ve("cursor-pointer","group/header relative grid min-h-9 w-full min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2 overflow-hidden px-3 py-2","bg-transparent","text-muted-foreground hover:text-foreground",p?"bg-[var(--interactive-selection)]/35":null),children:[t.jsx("div",{className:"absolute inset-0 pointer-events-none group-hover/header:bg-[var(--interactive-hover)]/50"}),t.jsxs("div",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[t.jsx("span",{className:"flex size-5 items-center justify-center opacity-70 group-hover/header:opacity-100",children:j?t.jsx(O,{name:"arrow-down-s",className:"size-4"}):t.jsx(O,{name:"arrow-right-s",className:"size-4"})}),t.jsx("span",{className:"typography-micro font-semibold leading-none w-4 text-center uppercase",style:{color:_e.color},title:x(_e.descriptionKey),"aria-label":x(_e.descriptionKey),children:_e.code}),t.jsx("span",{className:"min-w-0 flex-1 overflow-hidden typography-ui-label",title:s.path,children:t.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(Zt,{filePath:s.path,className:"h-3.5 w-3.5 flex-shrink-0 align-middle"}),(()=>{const g=s.path.lastIndexOf("/");if(g===-1)return t.jsx("span",{className:"block min-w-0 truncate typography-ui-label text-foreground",style:{direction:"rtl",textAlign:"left",unicodeBidi:"plaintext"},children:s.path});const L=s.path.slice(0,g),ye=s.path.slice(g+1);return t.jsxs("span",{className:"flex min-w-0 items-baseline overflow-hidden",children:[t.jsx("span",{className:"min-w-0 truncate typography-ui-label text-muted-foreground",style:{direction:"rtl",textAlign:"left",unicodeBidi:"plaintext"},children:L}),t.jsxs("span",{className:"flex-shrink-0 typography-ui-label",children:[t.jsx("span",{className:"text-muted-foreground",children:"/"}),t.jsx("span",{className:"text-foreground",children:ye})]})]})})()]})})]}),t.jsxs("div",{className:"relative flex shrink-0 items-center justify-self-end gap-2",children:[rn(s.insertions,s.deletions),C&&E?t.jsx(ke,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 opacity-70 hover:opacity-100",title:x("diffView.actions.openFileInEditorAtChange"),onClick:g=>{g.stopPropagation(),E(s.path,ie)},disabled:m,children:m?t.jsx(O,{name:"loader-4",className:"size-3.5 animate-spin"}):t.jsx(O,{name:"edit",className:"size-3.5"})}):null,t.jsx(Qt,{mode:We?"side-by-side":"unified",onModeChange:g=>{const L=g==="side-by-side"?"side-by-side":"inline";pe(s.path,L)},className:"opacity-70"})]})]})}),j&&t.jsxs("div",{className:"relative bg-background overflow-hidden",children:[!S&&!R?t.jsx("div",{className:"h-40 border border-border/40 bg-background/40"}):null,R?.kind==="unavailable"?t.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-sm text-muted-foreground",children:[t.jsx("div",{className:"typography-ui-label font-semibold text-foreground",children:R.reason==="nested_repository"?x("diffView.unavailable.nestedRepositoryTitle"):R.reason==="untracked_directory"?x("diffView.unavailable.untrackedDirectoryTitle"):x("diffView.unavailable.missingTitle")}),t.jsx("div",{className:"typography-meta text-muted-foreground max-w-[32rem] text-center",children:R.reason==="nested_repository"?x("diffView.unavailable.nestedRepositoryDescription"):R.reason==="untracked_directory"?x("diffView.unavailable.untrackedDirectoryDescription"):x("diffView.unavailable.missingDescription")}),R.reason==="path_not_found"?t.jsx("button",{type:"button",className:"typography-ui-label text-primary hover:underline",onClick:oe,children:x("diffView.actions.retry")}):null]}):null,R?.kind==="error"?t.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-sm text-muted-foreground",children:[t.jsx("div",{className:"typography-ui-label font-semibold text-foreground",children:x("diffView.state.failedToLoadDiff")}),t.jsx("div",{className:"typography-meta text-muted-foreground max-w-[32rem] text-center",children:R.message}),t.jsx("button",{type:"button",className:"typography-ui-label text-primary hover:underline",onClick:()=>V?be?.():oe(),children:x("diffView.actions.retry")})]}):null,S&&ce&&!ie&&!R?t.jsxs("div",{className:"flex items-center justify-center gap-2 px-4 py-8 text-sm text-muted-foreground",children:[t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}),x("diffView.state.loadingDiff")]}):null,S&&ie&&!at&&s.insertions+s.deletions>Gt?t.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-sm text-muted-foreground",children:[t.jsx("div",{className:"typography-ui-label font-semibold text-foreground",children:x("diffView.state.largeDiff",{count:s.insertions+s.deletions})}),t.jsx("div",{className:"typography-meta text-muted-foreground",children:x("diffView.state.largeDiffDescription")}),t.jsx("button",{type:"button",className:"typography-ui-label text-primary hover:underline",onClick:()=>pt(!0),children:x("diffView.actions.renderAnyway")})]}):null,S&&ie&&(at||s.insertions+s.deletions<=Gt)?t.jsx(t.Fragment,{children:t.jsx(Ls,{filePath:s.path,diff:ie,staged:w,renderSideBySide:We,wrapLines:y,hunkActions:ct,onExpandContextRequest:K?Ee:void 0,pendingContextExpansion:a,contextLoading:a!==null&&ie.contextMode!=="full"&&!R})}):null]})]})}),eo=({visible:o=!0,hideStackedFileSidebar:e=!1,stackedDefaultCollapsedAll:s=!1,pinSelectedFileHeaderToTopOnNavigate:l=!1,showOpenInEditorAction:y=!1,diffScope:p="all",onDiffScopeChange:j,targetFilePath:S=null,flushContent:D=!1})=>{const{t:c}=$e(),{git:v,files:C}=Xt(),m=Un(),E=ae(n=>n.runtimeKey),{rootIsGitRepo:w,gitDirectory:A,nestedRepos:P}=Jn(m??null,{enabled:o}),f=A??m,be=me(n=>n.openContextSurface),Z=fs(n=>n.requestSource),{screenWidth:ee,isMobile:Ne}=Xn(),$=Yn(f??null),x=Qn(f??null),I=Zn(f??null),q=ae(n=>n.setActiveDirectory),le=ae(n=>n.ensureStatus),te=ae(n=>n.selectNestedRepo),pe=ae(n=>n.fetchStatus),ne=ae(n=>n.fetchBranches),he=ae(n=>n.clearDiffCache),J=ae(n=>n.setDiff),[B,se]=r.useState(null),[X,z]=r.useState(!1),[je,V]=r.useState(null),[K,R]=r.useState(()=>new Set),[ce,G]=r.useState(()=>new Set),[ot,Te]=r.useState(0),[Be,tt]=r.useState(()=>new Map),[at,pt]=r.useState(0),[nt,Ie]=r.useState(!1),[qe,Pe]=r.useState(!1),[a,Ee]=r.useState(p);r.useEffect(()=>{Ee(p)},[p]);const re=me(n=>n.pendingDiffFile),ge=me(n=>n.pendingDiffStaged),Le=me(n=>n.pendingDiffScope),_e=me(n=>n.setPendingDiffFile),We=me(n=>n.diffLayoutPreference),Oe=me(n=>n.diffFileLayout),ve=me(n=>n.setDiffFileLayout),ue=me(n=>n.diffWrapLines),Ue=me(n=>n.setDiffWrapLines),W=me(n=>n.openContextFileAtLine),Ce=Ot(n=>n.currentSessionId),ie=es(a==="turn"?Ce??"":"",m??void 0),Je=ue,st=a==="staged"?!0:a==="working"?!1:null,ze=st??X,Xe=Ne||ee<=768,lt=!!Ce&&a!=="turn"&&a!=="commit"&&a!=="pr"&&!Xe&&!De(),ht=a!=="turn"&&!Xe&&!De(),gt=!e&&!Xe&&ee>=1024,xe=r.useRef(null),Me=r.useRef(new Map),oe=r.useRef(null),H=r.useRef(null),Se=r.useRef(!1),Re=r.useRef(null),ct=r.useRef(null),g=r.useRef(null),L=r.useRef(null),ye=r.useCallback(()=>{const n=xe.current;if(!n)return null;const i=n.getBoundingClientRect().top,d=[];for(const[u,h]of Me.current)h&&d.push({path:u,top:h.getBoundingClientRect().top});return zt(i,d)},[]),we=r.useCallback(()=>{oe.current=null,Se.current=!1,V(null),H.current!==null&&(window.cancelAnimationFrame(H.current),H.current=null)},[]),_=r.useCallback(n=>{R(i=>{if(i.has(n))return i;const d=new Set(i);return d.add(n),d})},[]),Ke=r.useMemo(()=>{for(let n=ie.length-1;n>=0;n-=1){const i=ie[n];if(i.role==="user")return Fs(i.summary?.diffs)}return[]},[ie]),xt=r.useMemo(()=>{const n=new Map;for(const i of Ke)if(i.file){if(typeof i.patch=="string"){n.set(i.file,Nt(i.file,i.patch,"patch"));continue}n.set(i.file,{original:i.before??"",modified:i.after??"",contextMode:"full"})}return n},[Ke]),ut=r.useMemo(()=>x?.files?x.files.filter(Wt).length:0,[x]),rt=r.useMemo(()=>x?.files?x.files.filter(qt).length:0,[x]),yt=Ke.length,b=x?.current??null,de=An(f??null,b,o&&a==="pr"&&!De()),U=de.selectedSource,Y=Vn(f??null,b,o&&a==="commit"&&!De()),Ge=Y.selectedCommit?.hash??null;r.useEffect(()=>{(a==="commit"||a==="pr")&&De()&&(Ee("working"),j?.("working"))},[a,j]);const Ye=ae(n=>f?n.directories.get(f)?.branches??null:null),on=ae(n=>f?n.directories.get(f)?.isLoadingBranches??!1:!1),an=r.useCallback(()=>{f&&ne(f,v)},[f,ne,v]),ln=zn(f??null,o&&$!==!1,on,!!Ye,an,vs),Ct=r.useMemo(()=>{const n=x?.tracking?.trim().split("/")[0];return(n&&Ye?.defaultBranches?.[n])??Ye?.defaultBranches?.origin??null},[Ye,x?.tracking]),Rt=!De()&&Kn(b,Ct),cn=x!==null,Ft=De()||ln||Gn(b,Ct,cn,Ye!==null),un=En(n=>n.setOverride),{base:Fe,resolved:dn,revision:Dt}=Ln(f??null,b,o&&Rt&&a==="branch"),[fn,mn]=r.useState(0);r.useEffect(()=>{const n=qn(a,!Ft);n!==a&&(Ee(n),n==="working"&&j?.("working"))},[a,Ft,j]);const pn=r.useMemo(()=>a==="pr"?U:a==="commit"&&Ge?{kind:"commit",hash:Ge}:a==="branch"&&Fe&&b?{kind:"branch",baseRef:Fe,headRef:b}:null,[a,Fe,b,Ge,U]),M=Hn(f??null,pn,o&&!De(),a==="branch"?Dt:""),{fetchDiff:At}=M,Vt=a==="commit"?M.files:null,Et=a==="commit"?M.error:null,dt=a==="branch"?M.files:null,Lt=a==="branch"?M.error:null,Mt=M.files?a==="pr"?JSON.stringify([M.key,M.revision]):M.key:null,hn=r.useMemo(()=>a==="branch"||a==="commit"||a==="pr"?Array.from(K).sort().join("\0"):"",[a,K]),wt=r.useCallback(async(n,i=!1)=>{try{const d=await At(n,i?tn:kt);return{status:"ready",data:Nt(n,d.diff,i?"full":"patch")}}catch(d){return{status:"error",message:d instanceof Error?d.message:c("diffView.state.failedToLoadDiff")}}},[At,c]),gn=r.useMemo(()=>a==="branch"||a==="commit"?n=>wt(n,!0):void 0,[a,wt]),xn=$n(Mt,o?hn:"",Mt?wt:null,$t,JSON.stringify([a==="branch"?Dt:"",a==="pr"?M.revision:0,fn])),yn=dt?.length??null,N=r.useMemo(()=>{if(a==="commit"||a==="pr")return(M.files??[]).map(u=>({path:u.path,index:"",working_dir:u.status,insertions:u.insertions,deletions:u.deletions,isNew:u.status==="A"}));if(a==="branch")return(dt??[]).map(u=>({path:u.path,index:"",working_dir:u.status,insertions:0,deletions:0,isNew:u.status==="A"})).sort((u,h)=>u.path.localeCompare(h.path));if(a==="turn")return Ke.map(u=>({path:u.file??"",index:"",working_dir:Ds(u.status),insertions:u.additions??0,deletions:u.deletions??0,isNew:u.status==="added"})).filter(u=>u.path).sort((u,h)=>u.path.localeCompare(h.path));if(!x?.files)return[];const n=x.diffStats,i=a==="staged"?qt:a==="working"?Wt:()=>!0,d=u=>{const h=n?.staged?.[u],F=n?.working?.[u];return a==="staged"?{insertions:h?.insertions??0,deletions:h?.deletions??0}:a==="working"?{insertions:F?.insertions??0,deletions:F?.deletions??0}:{insertions:(h?.insertions??0)+(F?.insertions??0),deletions:(h?.deletions??0)+(F?.deletions??0)}};return x.files.filter(i).map(u=>{const h=d(u.path);return{...u,insertions:h.insertions,deletions:h.deletions,isNew:Cs(u)}}).sort((u,h)=>u.path.localeCompare(h.path))},[a,dt,M.files,Ke,x]),bt=r.useMemo(()=>N.map(n=>n.path).join("\0"),[N]);r.useEffect(()=>{const n=bt?bt.split("\0"):[],i=new Set(n),d=`${f??""}:${a}:${s?"collapsed":"default"}`,u=ct.current!==d;ct.current=d,R(h=>{if(u){const T=s?0:js(n.length);return new Set(n.slice(0,T))}let F=!1;const k=new Set;for(const T of h){if(!i.has(T)){F=!0;continue}k.add(T)}return F?k:h}),G(h=>{if(u)return new Set;let F=!1;const k=new Set;for(const T of h){if(!i.has(T)){F=!0;continue}k.add(T)}return F?k:h})},[a,bt,f,s]);const Tt=r.useCallback(()=>{if(Re.current=null,!o)return;const n=xe.current;if(!n)return;const i=n.getBoundingClientRect(),d=i.top-Ht,u=i.bottom+Ht,h={},F=[];for(const[k,T]of Me.current){if(!T)continue;const Q=T.getBoundingClientRect();F.push({path:k,top:Q.top}),K.has(k)&&(Q.bottom<d||Q.top>u||(h[k]=!0))}g.current=zt(i.top,F),G(k=>{let T=!1;const Q=new Set(k);for(const it of Object.keys(h))Q.has(it)||(Q.add(it),T=!0);return T?Q:k})},[K,o]),fe=r.useCallback(()=>{o&&(typeof window>"u"||Re.current===null&&(Re.current=window.requestAnimationFrame(Tt)))},[Tt,o]);r.useEffect(()=>{const n=xe.current;if(!(!o||!n))return fe(),n.addEventListener("scroll",fe,{passive:!0}),window.addEventListener("resize",fe),()=>{n.removeEventListener("scroll",fe),window.removeEventListener("resize",fe),Re.current!==null&&(window.cancelAnimationFrame(Re.current),Re.current=null)}},[N,K,fe,o]);const jt=r.useCallback(n=>{const i=Oe[n.path];if(i)return i;if(We==="inline")return"inline";if(We==="side-by-side")return"side-by-side";const d=ee<ws;return n.isNew||d?"inline":"side-by-side"},[Oe,We,ee]),Bt=r.useMemo(()=>N.length===0?null:N.every(n=>jt(n)==="side-by-side")?"side-by-side":"inline",[N,jt]);r.useEffect(()=>{o&&f&&(q(f),le(f,v))},[f,q,le,v,o]);const ft=JSON.stringify([E,f]),vt=r.useRef({scope:ft,paths:new Set,dirty:!1,unscoped:!1}),It=r.useRef(o);r.useEffect(()=>{const n=o&&!It.current;if(It.current=o,vt.current.scope!==ft&&(vt.current={scope:ft,paths:new Set,dirty:!1,unscoped:!1}),!f)return;const i=(u,h)=>{u.length&&(L.current=ye()??g.current,he(f,u),tt(F=>{const k=new Map(F);for(const T of u)k.set(T,(k.get(T)??0)+1);return k})),h&&pt(F=>F+1),pe(f,v,{silent:!0})},d=vt.current;return o&&(n||d.dirty)&&(i([...d.paths],d.unscoped),d.paths.clear(),d.dirty=!1,d.unscoped=!1),Yt.onGitRefreshHint(u=>{if(Ut(u.directory)!==Ut(f))return;const h=u.paths??[],F=h.length===0;if(!o){d.dirty=!0,d.unscoped||=F;for(const k of h)d.paths.add(k);return}i(h,F)})},[ye,he,f,pe,v,ft,o]),r.useLayoutEffect(()=>{const n=L.current;if(!n)return;L.current=null;const i=xe.current,d=Me.current.get(n.path);if(!i||!d)return;const u=i.getBoundingClientRect().top,h=d.getBoundingClientRect().top-u;i.scrollTop=ys(i.scrollTop,n.topOffset,h,i.scrollHeight-i.clientHeight),g.current=n},[Be]),r.useEffect(()=>{!o||a!=="all"&&!Le||re&&(Le&&Ee(Le),se(re),z(Le==="staged"||!Le&&ge),_e(null),Se.current=!0,oe.current=re,_(re),Te(n=>n+1))},[a,_,re,Le,ge,_e,o]),r.useEffect(()=>{if(a==="all")return;const n=S?.trim();n&&(se(n),z(a==="staged"),Se.current=!0,oe.current=n,_(n),Te(i=>i+1))},[a,_,S]),r.useEffect(()=>{if(!B)return;N.some(i=>i.path===B)||(se(null),z(!1))},[N,B]);const wn=r.useCallback((n,i)=>{const d=Me.current;i?d.set(n,i):d.delete(n),fe()},[fe]),bn=r.useCallback((n,i)=>{we(),R(d=>{const u=d.has(n);if(i===u)return d;const h=new Set(d);return i?h.add(n):h.delete(n),h}),i||G(d=>{if(!d.has(n))return d;const u=new Set(d);return u.delete(n),u}),fe()},[we,fe]),jn=r.useCallback(()=>{we(),R(n=>n.size>0?new Set:new Set(N.map(i=>i.path))),G(new Set),fe()},[we,N,fe]),vn=r.useCallback(async n=>{if(!Ce)return;const i=Ot.getState().getDirectoryForSession(Ce)||m||"";if(!i){He.error(c("diffView.reviewDialog.toast.noSessionDirectory"));return}Pe(!0);try{await ts({originalSessionID:Ce,directory:i,providerID:n.providerID,modelID:n.modelID,agent:n.agent||void 0,variant:n.variant||void 0,generateHandoff:n.generateHandoff,returnAfterHandoffRequest:n.generateHandoff,autoReview:n.autoReview}),Ie(!1)}catch(d){console.error("[review-flow] failed to start review flow",d),He.error(d instanceof Error?d.message:c("diffView.reviewDialog.toast.startFailed"))}finally{Pe(!1)}},[Ce,m,c]),mt=r.useCallback(n=>{const i=Me.current.get(n),d=xe.current;if(!i||!d)return!1;const u=i.getBoundingClientRect().top-d.getBoundingClientRect().top;return d.scrollTo({top:d.scrollTop+u,behavior:"auto"}),!0},[]);r.useEffect(()=>{const n=oe.current;if(!o||!n)return;let i=0;const d=20;let u=!1;const h=(k=!0)=>{u||(u=!0,oe.current=null,Se.current=!1,k&&V(null),H.current!==null&&(window.cancelAnimationFrame(H.current),H.current=null))},F=()=>{if(u){H.current=null;return}const k=oe.current;if(!k){h(),H.current=null;return}if(!mt(k)){i+=1,i<d?H.current=window.requestAnimationFrame(F):(h(),H.current=null);return}if(l&&Se.current){V(k),h(!1);return}h()};return H.current=window.requestAnimationFrame(F),()=>{u=!0,H.current!==null&&(window.cancelAnimationFrame(H.current),H.current=null)}},[l,ot,mt,o]);const Sn=r.useCallback(n=>{},[]),St=r.useCallback(n=>{we(),se(n),z(!1),Se.current=!0,oe.current=n,_(n),Te(i=>i+1),mt(n)},[we,_,mt]);r.useEffect(()=>{const n=i=>{if(!o||!i.altKey||i.metaKey||i.ctrlKey||i.shiftKey||i.key!=="ArrowDown"&&i.key!=="ArrowUp")return;const d=i.target;if(d instanceof HTMLElement&&(d.isContentEditable||d.tagName==="INPUT"||d.tagName==="TEXTAREA"||d.closest('[role="dialog"]'))||N.length===0)return;const u=i.key==="ArrowDown"?1:-1,h=B?N.findIndex(T=>T.path===B):-1,F=h===-1?u>0?0:N.length-1:h+u,k=N[F];k&&(i.preventDefault(),St(k.path))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[N,B,St,o]);const kn=r.useCallback(n=>{const i=n==="side-by-side"?"side-by-side":"inline";N.forEach(d=>{ve(d.path,i)})},[N,ve]),[Nn,Pt]=r.useState(null),Cn=r.useCallback(async(n,i)=>{if(!f||!n)return;Pt(n);const d=Ae();try{let u=null;if(i?.patch&&!i.isBinary&&!Ze(n)?u=Kt(i.patch):i&&i.contextMode==="full"&&!i.isBinary&&!Ze(n)&&(u=Jt(i.original,i.modified)),u===null)try{const Q=await v.getGitDiff(f,{path:n,staged:ze,contextLines:3});u=Kt(Q.diff)}catch{u=null}let h=i;if(u===null||!h){const Q=await v.getGitFileDiff(f,{path:n,staged:ze}),it={original:Q.original??"",modified:Q.modified??"",isBinary:Q.isBinary,submodule:Q.submodule};h=it,ze||J(f,n,it,d)}const F=u??(h.isBinary||Ze(n)?1:Jt(h.original,h.modified)),k=Rs(f,n),T=await ms(C,k,{directory:f});if(!T.ok){He.error(ps(T.reason));return}W(f,k,F,1)}finally{Pt(u=>u===n?null:u)}},[ze,f,C,v,W,J]),Rn=()=>{if(!f)return null;const n=i=>st!==null?st:X&&i===B;return t.jsxs("div",{className:Ve("flex min-w-0 flex-1 min-h-0 h-full",D?"gap-0":"gap-3 px-3 pb-3 pt-2"),children:[gt&&t.jsxs("section",{className:"hidden lg:flex w-72 flex-col rounded-xl border border-border/60 bg-background/70 overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border/40",children:[t.jsx("span",{className:"typography-ui-header font-semibold text-foreground",children:c("diffView.section.files")}),t.jsx("span",{className:"typography-meta text-muted-foreground",children:N.length})]}),t.jsx(Vs,{changedFiles:N,selectedFile:null,onSelectFile:St})]}),t.jsx("div",{className:"relative flex-1 min-w-0 min-h-0 h-full",children:t.jsx(en,{ref:xe,outerClassName:"min-h-0 h-full",className:"[overflow-anchor:none] pb-16",disableHorizontal:!0,observeMutations:!1,preventOverscroll:!0,"data-diff-virtual-root":!0,children:t.jsx("div",{className:"flex flex-col [overflow-anchor:none]","data-diff-virtual-content":!0,children:N.map(i=>t.jsx(Ms,{visible:o,directory:f,file:i,layout:jt(i),wrapLines:Je,isSelected:!1,isExpanded:K.has(i.path),isMounted:ce.has(i.path)||i.path===je,onSelect:Sn,onExpandedChange:bn,registerSectionRef:wn,showOpenInEditorAction:y&&a!=="turn",isOpeningInEditor:Nn===i.path,onOpenInEditor:(d,u)=>{Cn(d,u)},staged:n(i.path),readOnlyActions:a==="branch"||a==="commit"||a==="pr",hunkActionsEnabled:a==="all"||a==="working"||a==="staged",contentRevision:at,comparisonDiff:a==="branch"||a==="commit"||a==="pr"?xn.get(i.path)??$t:void 0,onRetryComparisonDiff:()=>mn(d=>d+1),loadFullComparisonDiff:gn,initialDiffData:a==="turn"?xt.get(i.path)??null:null},`${Ae()}:${f}:${i.path}:${Be.get(i.path)??0}`))})})})]})},Fn=()=>{if(!f)return t.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:c("diffView.state.selectSessionDirectory")});if(a!=="turn"&&I&&!x)return t.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",children:[t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}),c("diffView.state.loadingRepositoryStatus")]});if(a!=="turn"&&$===!1)return t.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:c("diffView.state.notGitRepository")});if(a==="pr"){if(!U||M.error)return t.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[t.jsx("p",{className:"typography-meta text-muted-foreground",children:M.error??de.error??(de.loading?c("session.githubPrPicker.loading.pullRequests"):c("pullRequestComparison.select"))}),(M.error||de.error)&&t.jsx(ke,{variant:"outline",size:"sm",onClick:()=>{U?M.refresh():de.refresh()},children:c("diffView.actions.retry")}),!U&&!de.loading&&t.jsx(_t,{comparison:de})]});if(!M.files)return t.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2 typography-meta text-muted-foreground",children:[t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}),c("diffView.state.loadingDiff")]})}if(a==="commit"){if(Et)return t.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[t.jsx("p",{className:"typography-meta text-muted-foreground",children:Et}),t.jsx(ke,{variant:"outline",size:"sm",onClick:()=>{M.refresh()},children:c("diffView.actions.retry")})]});if(!Ge&&!Y.loading)return t.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:Y.error??c("commitComparison.noCommits")});if(!Vt)return t.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",children:[t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}),c("diffView.state.loadingDiff")]})}if(a==="branch"){if(!dn)return t.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",children:[t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}),c("diffView.branch.resolvingBase")]});if(!Fe)return t.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center",children:[t.jsx(O,{name:"git-branch",className:"size-6 text-muted-foreground"}),t.jsx("div",{className:"typography-ui-label font-semibold text-foreground",children:c("diffView.branch.noBaseTitle")}),t.jsx("div",{className:"max-w-sm typography-micro text-muted-foreground",children:c("gitView.pr.toast.baseBranchRequired")})]});if(Lt)return t.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center",children:[t.jsx("div",{className:"typography-ui-label font-semibold text-foreground",children:c("diffView.branch.loadError")}),t.jsx("div",{className:"max-w-sm typography-micro text-muted-foreground",children:Lt}),t.jsx(ke,{variant:"outline",size:"sm",onClick:()=>{M.refresh()},children:c("diffView.actions.retry")})]});if(dt===null)return t.jsxs("div",{className:"flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground",children:[t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}),c("diffView.branch.loadingFiles")]})}return N.length===0?t.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:a==="turn"?c("diffView.state.noLastTurnChanges"):a==="pr"?c("walkthrough.blocked.emptyDiff.description"):a==="commit"?c("commitComparison.emptyDiff"):a==="branch"&&Fe?c("diffView.branch.empty",{base:us(Fe)}):c("diffView.state.cleanWorkingTree")}):Rn()};return t.jsxs("div",{className:"flex h-full flex-col overflow-hidden bg-background",children:[t.jsxs("div",{className:"@container/diff-toolbar flex min-w-0 items-center gap-2 px-3 py-2 bg-background",children:[w===!1&&Array.isArray(P)&&P.length>0?t.jsx(cs,{repositories:P,selectedRepository:A??null,onSelectRepository:n=>{m&&te(m,n)},repositoryRoot:m??void 0}):null,!Ne&&(a!=="all"?t.jsx(As,{scope:a,workingCount:ut,stagedCount:rt,turnCount:yt,branchCount:yn,commitCount:a==="commit"?Vt?.length??null:null,prCount:a==="pr"?M.files?.length??null:null,showCommitOption:!De(),showBranchOption:Rt,onScopeChange:n=>{Ee(n),j?.(n)}}):t.jsx("div",{className:"flex items-center gap-1 rounded-md px-2 py-1 text-muted-foreground shrink-0",children:t.jsx("span",{className:"typography-ui-label font-semibold text-foreground",children:I&&!x?c("diffView.state.loadingChanges"):N.length===1?c("diffView.summary.changedFilesSingle",{count:N.length}):c("diffView.summary.changedFilesPlural",{count:N.length})})})),a==="branch"&&t.jsx(Mn,{branches:Ye?.all??[],currentBranch:b,base:Fe,onSelect:n=>{f&&b&&un(f,b,n)}},JSON.stringify([f,b])),a==="commit"&&t.jsx(Tn,{commits:Y.commits,selectedHash:Ge,loading:Y.loading,error:Y.error,onSelect:Y.select,onRefresh:()=>{Y.refresh()}},JSON.stringify([f,b])),a==="pr"&&t.jsxs(t.Fragment,{children:[t.jsx(_t,{comparison:de},JSON.stringify([E,f,b])),U&&t.jsx(ke,{variant:"ghost",size:"sm",disabled:M.loading,"aria-label":c("session.githubIssuePicker.actions.refresh"),title:c("session.githubIssuePicker.actions.refresh"),onClick:()=>{M.refresh()},children:t.jsx(O,{name:"refresh",className:"size-4"})})]}),N.length>0&&t.jsxs(ke,{variant:"ghost",size:"sm",onClick:jn,className:Ve("diff-toolbar__expand-button h-7 flex-shrink-0 gap-1 px-1.5 text-muted-foreground hover:text-foreground","ml-auto"),title:K.size>0?c("diffView.actions.collapseAll"):c("diffView.actions.expandAll"),children:[t.jsx(O,{name:"expand-up-down",className:"size-4"}),t.jsx("span",{className:"diff-toolbar__expand-label typography-ui-label",children:K.size>0?c("diffView.actions.collapseAll"):c("diffView.actions.expandAll")})]}),N.length>0&<&&t.jsxs(ke,{variant:"default",size:"sm",onClick:()=>Ie(!0),disabled:qe,className:"diff-toolbar__review-button h-7 flex-shrink-0 gap-1.5 px-2","aria-label":c("diffView.actions.reviewAria"),children:[qe?t.jsx(O,{name:"loader-4",className:"size-4 animate-spin"}):t.jsx(O,{name:"search-eye",className:"size-4"}),t.jsx("span",{className:"diff-toolbar__review-label typography-ui-label",children:c("diffView.actions.review")})]}),N.length>0&&ht&&t.jsxs(ke,{variant:"outline",size:"sm",onClick:()=>{const n=f??"";Z(n,a==="pr"&&U?U:a==="commit"&&Ge?{kind:"commit",hash:Ge}:a==="branch"&&Fe&&b?{kind:"branch",baseRef:Fe,headRef:b}:{kind:"working-tree",scope:a==="staged"||a==="working"?a:"all"}),be(m??n,"walkthrough")},className:Ve("diff-toolbar__walkthrough-button h-7 flex-shrink-0 gap-1.5 px-2",hs),"aria-label":c("walkthrough.action.open"),children:[t.jsx(O,{name:"route",className:"size-4"}),t.jsx("span",{className:"diff-toolbar__walkthrough-label typography-ui-label",children:c("walkthrough.action.open")})]}),N.length>0&&t.jsx(ke,{variant:"ghost",size:"sm",onClick:()=>Ue(!ue),className:Ve("h-5 w-5 p-0 transition-opacity",Je?"text-foreground opacity-100":"text-muted-foreground opacity-60 hover:opacity-100"),title:c(Je?"diffView.actions.disableLineWrap":"diffView.actions.enableLineWrap"),children:t.jsx(O,{name:"text-wrap",className:"size-4"})}),Bt&&t.jsx(Qt,{mode:Bt==="side-by-side"?"side-by-side":"unified",onModeChange:kn})]}),t.jsx(ns,{open:nt,onOpenChange:Ie,projectDirectory:f??null,submitting:qe,onConfirm:vn}),Fn()]})};export{eo as DiffView,Ms as MultiFileDiffEntry};
|