@jingyi0605/codingns 0.7.3 → 0.8.0
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/README.md +6 -0
- package/bin/codingns.mjs +747 -28
- package/bin/office-mcp-server.mjs +620 -0
- package/dist/public/assets/{AdaptiveButlerPage-CgBX49t-.js → AdaptiveButlerPage-BsgVNRAa.js} +1 -1
- package/dist/public/assets/{App-tXOqoHNl.js → App-tPcbyRdS.js} +3 -3
- package/dist/public/assets/{BootstrapPage-DoRMz87R.js → BootstrapPage--MDOigQi.js} +1 -1
- package/dist/public/assets/{ConversationPage-DXR6Hp4O.js → ConversationPage-BBss5ED8.js} +6 -6
- package/dist/public/assets/{DesktopDetachPreviewPage-Cyk-ZYCk.js → DesktopDetachPreviewPage-CB8DoqwU.js} +1 -1
- package/dist/public/assets/{DesktopWindowPage-DNVNK3hs.js → DesktopWindowPage-GtIx5m8K.js} +1 -1
- package/dist/public/assets/FileContextPanel-BcM7AIT4.js +1 -0
- package/dist/public/assets/{GitSidebar-Cr3Z9OUI.js → GitSidebar-CMtkaxuI.js} +2 -2
- package/dist/public/assets/{MobileCreateSessionSheet-DMW0V6GJ.js → MobileCreateSessionSheet-CrFY41_8.js} +1 -1
- package/dist/public/assets/{MobileTopHeaderFrame-CkdnZ_MU.js → MobileTopHeaderFrame-DGVOzXyg.js} +1 -1
- package/dist/public/assets/{MobileWorkspaceSwitcherHeader-KIbqBYJN.js → MobileWorkspaceSwitcherHeader-DLkACTnQ.js} +1 -1
- package/dist/public/assets/{RelayConnectEntryPage-DIRBH3hw.js → RelayConnectEntryPage-0MPPjxtQ.js} +1 -1
- package/dist/public/assets/{ServerSettingsModal-C-9RxdWP.js → ServerSettingsModal-vgOhwus4.js} +1 -1
- package/dist/public/assets/{SessionIndexPage-bRlIydRA.js → SessionIndexPage-KK626Ra9.js} +1 -1
- package/dist/public/assets/{SettingsPage-CMEt4ua9.js → SettingsPage-B3edBJIo.js} +2 -2
- package/dist/public/assets/{TerminalManagerPanel-2bi9wVhT.js → TerminalManagerPanel-BxlhZp8c.js} +1 -1
- package/dist/public/assets/{TerminalPage-DayZz2Tf.js → TerminalPage-B6Rdhylx.js} +1 -1
- package/dist/public/assets/{TerminalRuntimeFallbackModal-DgwYcp-Y.js → TerminalRuntimeFallbackModal-BVLfrpSa.js} +1 -1
- package/dist/public/assets/{ToolFilesPage-YvnP_FXW.js → ToolFilesPage-N_gwwUjD.js} +1 -1
- package/dist/public/assets/{ToolGitPage-GMcQKtV9.js → ToolGitPage-DOcuuWM1.js} +1 -1
- package/dist/public/assets/{ToolProcessesPage-DFIQ7BCd.js → ToolProcessesPage-D-FfJ7Re.js} +1 -1
- package/dist/public/assets/{ToolsHomePage-CSilFzXR.js → ToolsHomePage-CHfPxd20.js} +1 -1
- package/dist/public/assets/{WorkbenchLandingPage-1VtToSz9.js → WorkbenchLandingPage-CTTnfovY.js} +1 -1
- package/dist/public/assets/WorkbenchLayout-CbpJg0g1.js +244 -0
- package/dist/public/assets/{WorkbenchModal-BWXYSXmC.js → WorkbenchModal-Bt_1fYmM.js} +1 -1
- package/dist/public/assets/WorkbenchShellRoute-B4XB8SwG.css +1 -0
- package/dist/public/assets/WorkbenchShellRoute-DyaMnPfS.js +1 -0
- package/dist/public/assets/{WorkspaceDebugDetailPage-Ux8_Q7la.js → WorkspaceDebugDetailPage-s7yuDIxR.js} +1 -1
- package/dist/public/assets/{WorkspaceDetailPage-B402p99m.js → WorkspaceDetailPage-Cf-gVpqK.js} +1 -1
- package/dist/public/assets/{WorkspaceHomePage-D2pob6HI.js → WorkspaceHomePage-COf6I8sT.js} +1 -1
- package/dist/public/assets/{client-runtime-manager-C5D76ewj.js → client-runtime-manager-DGdKvYzx.js} +1 -1
- package/dist/public/assets/file-tree-icon-BeHqeru9.js +590 -0
- package/dist/public/assets/index-CcaQt50x.css +1 -0
- package/dist/public/assets/index-CuzMc7q2.js +42 -0
- package/dist/public/assets/{login-direct-candidate-resolver-wXSaB0i7.js → login-direct-candidate-resolver-DEP_xCmR.js} +1 -1
- package/dist/public/assets/{model-switch-api-CPtou49j.js → model-switch-api-c6kcbBGm.js} +1 -1
- package/dist/public/assets/{preferences-service-CdaK7zA8.js → preferences-service-CV6Ih0BG.js} +1 -1
- package/dist/public/assets/{realtime-client-BjQazYsK.js → realtime-client-CRCx5xBt.js} +1 -1
- package/dist/public/assets/{relay-entry-BwE5nw0l.js → relay-entry-C751A-Sm.js} +1 -1
- package/dist/public/assets/{terminal-runtime-meta-C-Lbyx2i.js → terminal-runtime-meta-CRAVR-8G.js} +1 -1
- package/dist/public/assets/{useRegisteredDebugTemplates-BM7-c-gx.js → useRegisteredDebugTemplates-D6YtNS0r.js} +1 -1
- package/dist/public/index.html +2 -2
- package/dist/server/config/env.d.ts +3 -0
- package/dist/server/config/env.js +67 -1
- package/dist/server/config/env.js.map +1 -1
- package/dist/server/config/opencode-base-url-resolver.d.ts +3 -2
- package/dist/server/config/opencode-base-url-resolver.js +64 -24
- package/dist/server/config/opencode-base-url-resolver.js.map +1 -1
- package/dist/server/middlewares/auth-guard.js +4 -0
- package/dist/server/middlewares/auth-guard.js.map +1 -1
- package/dist/server/modules/assistant-capability/assistant-capability-controller.d.ts +168 -1
- package/dist/server/modules/assistant-capability/assistant-capability-controller.js +205 -4
- package/dist/server/modules/assistant-capability/assistant-capability-controller.js.map +1 -1
- package/dist/server/modules/assistant-capability/assistant-capability-service.d.ts +296 -2
- package/dist/server/modules/assistant-capability/assistant-capability-service.js +872 -3
- package/dist/server/modules/assistant-capability/assistant-capability-service.js.map +1 -1
- package/dist/server/modules/auth/auth-service.d.ts +21 -1
- package/dist/server/modules/auth/auth-service.js +64 -0
- package/dist/server/modules/auth/auth-service.js.map +1 -1
- package/dist/server/modules/browser-runtime/browser-profile-service.d.ts +26 -0
- package/dist/server/modules/browser-runtime/browser-profile-service.js +85 -0
- package/dist/server/modules/browser-runtime/browser-profile-service.js.map +1 -0
- package/dist/server/modules/browser-runtime/browser-runtime-controller.d.ts +69 -0
- package/dist/server/modules/browser-runtime/browser-runtime-controller.js +83 -0
- package/dist/server/modules/browser-runtime/browser-runtime-controller.js.map +1 -0
- package/dist/server/modules/browser-runtime/browser-runtime-service.d.ts +56 -0
- package/dist/server/modules/browser-runtime/browser-runtime-service.js +215 -0
- package/dist/server/modules/browser-runtime/browser-runtime-service.js.map +1 -0
- package/dist/server/modules/browser-runtime/browser-task-execution-support.d.ts +65 -0
- package/dist/server/modules/browser-runtime/browser-task-execution-support.js +432 -0
- package/dist/server/modules/browser-runtime/browser-task-execution-support.js.map +1 -0
- package/dist/server/modules/browser-runtime/browser-task-executor-registry.d.ts +7 -0
- package/dist/server/modules/browser-runtime/browser-task-executor-registry.js +21 -0
- package/dist/server/modules/browser-runtime/browser-task-executor-registry.js.map +1 -0
- package/dist/server/modules/browser-runtime/browser-task-executor.d.ts +55 -0
- package/dist/server/modules/browser-runtime/browser-task-executor.js +2 -0
- package/dist/server/modules/browser-runtime/browser-task-executor.js.map +1 -0
- package/dist/server/modules/browser-runtime/browser-task-payload.d.ts +31 -0
- package/dist/server/modules/browser-runtime/browser-task-payload.js +55 -0
- package/dist/server/modules/browser-runtime/browser-task-payload.js.map +1 -0
- package/dist/server/modules/browser-runtime/opencli-bridge-browser-executor.d.ts +19 -0
- package/dist/server/modules/browser-runtime/opencli-bridge-browser-executor.js +219 -0
- package/dist/server/modules/browser-runtime/opencli-bridge-browser-executor.js.map +1 -0
- package/dist/server/modules/browser-runtime/opencli-browser-bridge-service.d.ts +15 -0
- package/dist/server/modules/browser-runtime/opencli-browser-bridge-service.js +33 -0
- package/dist/server/modules/browser-runtime/opencli-browser-bridge-service.js.map +1 -0
- package/dist/server/modules/browser-runtime/playwright-browser-executor.d.ts +16 -0
- package/dist/server/modules/browser-runtime/playwright-browser-executor.js +272 -0
- package/dist/server/modules/browser-runtime/playwright-browser-executor.js.map +1 -0
- package/dist/server/modules/butler/butler-auth-service.js +4 -0
- package/dist/server/modules/butler/butler-auth-service.js.map +1 -1
- package/dist/server/modules/butler/butler-inbox-instruction-adapter.js +1 -0
- package/dist/server/modules/butler/butler-inbox-instruction-adapter.js.map +1 -1
- package/dist/server/modules/butler/butler-session-summary-service.d.ts +1 -0
- package/dist/server/modules/butler/butler-session-summary-service.js +5 -3
- package/dist/server/modules/butler/butler-session-summary-service.js.map +1 -1
- package/dist/server/modules/butler/butler-workspace-context.js +23 -0
- package/dist/server/modules/butler/butler-workspace-context.js.map +1 -1
- package/dist/server/modules/channels/wechat-claw-client.d.ts +51 -0
- package/dist/server/modules/channels/wechat-claw-client.js +245 -0
- package/dist/server/modules/channels/wechat-claw-client.js.map +1 -0
- package/dist/server/modules/debug-target/debug-target-service.d.ts +2 -0
- package/dist/server/modules/debug-target/debug-target-service.js +14 -0
- package/dist/server/modules/debug-target/debug-target-service.js.map +1 -1
- package/dist/server/modules/document-runtime/document-docx-fallback-renderer.py +139 -0
- package/dist/server/modules/document-runtime/document-export-executor.d.ts +50 -0
- package/dist/server/modules/document-runtime/document-export-executor.js +827 -0
- package/dist/server/modules/document-runtime/document-export-executor.js.map +1 -0
- package/dist/server/modules/document-runtime/document-runtime-controller.d.ts +127 -0
- package/dist/server/modules/document-runtime/document-runtime-controller.js +131 -0
- package/dist/server/modules/document-runtime/document-runtime-controller.js.map +1 -0
- package/dist/server/modules/document-runtime/document-runtime-service.d.ts +125 -0
- package/dist/server/modules/document-runtime/document-runtime-service.js +706 -0
- package/dist/server/modules/document-runtime/document-runtime-service.js.map +1 -0
- package/dist/server/modules/office/office-controller.d.ts +77 -0
- package/dist/server/modules/office/office-controller.js +174 -0
- package/dist/server/modules/office/office-controller.js.map +1 -0
- package/dist/server/modules/office/office-preview-link-service.d.ts +27 -0
- package/dist/server/modules/office/office-preview-link-service.js +121 -0
- package/dist/server/modules/office/office-preview-link-service.js.map +1 -0
- package/dist/server/modules/office/office-service.d.ts +67 -0
- package/dist/server/modules/office/office-service.js +359 -0
- package/dist/server/modules/office/office-service.js.map +1 -0
- package/dist/server/modules/opencli/opencli-bridge-skill-service.js +38 -14
- package/dist/server/modules/opencli/opencli-bridge-skill-service.js.map +1 -1
- package/dist/server/modules/opencli/opencli-install-discovery.d.ts +4 -0
- package/dist/server/modules/opencli/opencli-install-discovery.js +94 -0
- package/dist/server/modules/opencli/opencli-install-discovery.js.map +1 -1
- package/dist/server/modules/opencli/opencli-runtime-builder.js +29 -0
- package/dist/server/modules/opencli/opencli-runtime-builder.js.map +1 -1
- package/dist/server/modules/opencli/opencli-runtime-guard.d.ts +2 -0
- package/dist/server/modules/opencli/opencli-runtime-guard.js +5 -0
- package/dist/server/modules/opencli/opencli-runtime-guard.js.map +1 -0
- package/dist/server/modules/ops-runtime/ops-runtime-controller.d.ts +70 -0
- package/dist/server/modules/ops-runtime/ops-runtime-controller.js +83 -0
- package/dist/server/modules/ops-runtime/ops-runtime-controller.js.map +1 -0
- package/dist/server/modules/ops-runtime/ops-runtime-service.d.ts +80 -0
- package/dist/server/modules/ops-runtime/ops-runtime-service.js +327 -0
- package/dist/server/modules/ops-runtime/ops-runtime-service.js.map +1 -0
- package/dist/server/modules/ops-runtime/ssh-ops-executor.d.ts +41 -0
- package/dist/server/modules/ops-runtime/ssh-ops-executor.js +478 -0
- package/dist/server/modules/ops-runtime/ssh-ops-executor.js.map +1 -0
- package/dist/server/modules/presentation/presentation-controller.d.ts +22 -0
- package/dist/server/modules/presentation/presentation-controller.js +59 -0
- package/dist/server/modules/presentation/presentation-controller.js.map +1 -0
- package/dist/server/modules/presentation/presentation-export-task-service.d.ts +24 -0
- package/dist/server/modules/presentation/presentation-export-task-service.js +137 -0
- package/dist/server/modules/presentation/presentation-export-task-service.js.map +1 -0
- package/dist/server/modules/presentation/presentation-export-types.d.ts +12 -0
- package/dist/server/modules/presentation/presentation-export-types.js +2 -0
- package/dist/server/modules/presentation/presentation-export-types.js.map +1 -0
- package/dist/server/modules/presentation/presentation-pdf-export-service.d.ts +20 -0
- package/dist/server/modules/presentation/presentation-pdf-export-service.js +29 -0
- package/dist/server/modules/presentation/presentation-pdf-export-service.js.map +1 -0
- package/dist/server/modules/presentation/presentation-pptx-export-service.d.ts +20 -0
- package/dist/server/modules/presentation/presentation-pptx-export-service.js +64 -0
- package/dist/server/modules/presentation/presentation-pptx-export-service.js.map +1 -0
- package/dist/server/modules/presentation/presentation-renderer.d.ts +21 -0
- package/dist/server/modules/presentation/presentation-renderer.js +208 -0
- package/dist/server/modules/presentation/presentation-renderer.js.map +1 -0
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js +3 -3
- package/dist/server/modules/relay-tunnel/relay-tunnel-gateway-service.js.map +1 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.js +6 -1
- package/dist/server/modules/relay-tunnel/relay-tunnel-service.js.map +1 -1
- package/dist/server/modules/sessions/codex-app-server-helper-process.js +2 -1
- package/dist/server/modules/sessions/codex-app-server-helper-process.js.map +1 -1
- package/dist/server/modules/sessions/session-controller.d.ts +1 -0
- package/dist/server/modules/sessions/session-controller.js +59 -4
- package/dist/server/modules/sessions/session-controller.js.map +1 -1
- package/dist/server/modules/sessions/session-history-service.js +17 -5
- package/dist/server/modules/sessions/session-history-service.js.map +1 -1
- package/dist/server/modules/sessions/session-live-runtime-service.d.ts +5 -1
- package/dist/server/modules/sessions/session-live-runtime-service.js +86 -8
- package/dist/server/modules/sessions/session-live-runtime-service.js.map +1 -1
- package/dist/server/modules/sessions/session-provider-config-service.d.ts +25 -1
- package/dist/server/modules/sessions/session-provider-config-service.js +54 -5
- package/dist/server/modules/sessions/session-provider-config-service.js.map +1 -1
- package/dist/server/modules/sessions/workspace-office-mcp-config.d.ts +14 -0
- package/dist/server/modules/sessions/workspace-office-mcp-config.js +54 -0
- package/dist/server/modules/sessions/workspace-office-mcp-config.js.map +1 -0
- package/dist/server/modules/sessions/workspace-session-auth-service.d.ts +27 -0
- package/dist/server/modules/sessions/workspace-session-auth-service.js +109 -0
- package/dist/server/modules/sessions/workspace-session-auth-service.js.map +1 -0
- package/dist/server/modules/sessions/workspace-session-runtime-context-service.d.ts +50 -0
- package/dist/server/modules/sessions/workspace-session-runtime-context-service.js +332 -0
- package/dist/server/modules/sessions/workspace-session-runtime-context-service.js.map +1 -0
- package/dist/server/modules/skills/assistant-runtime-skill-catalog.js +5 -0
- package/dist/server/modules/skills/assistant-runtime-skill-catalog.js.map +1 -1
- package/dist/server/modules/skills/builtin-skills/codingns-workspace-session/SKILL.md +67 -0
- package/dist/server/modules/skills/builtin-skills/codingns-workspace-session/agents/openai.yaml +4 -0
- package/dist/server/modules/skills/builtin-skills/codingns-workspace-session/references/cli-workflow.md +133 -0
- package/dist/server/modules/skills/skill-controller.d.ts +7 -0
- package/dist/server/modules/skills/skill-controller.js +7 -0
- package/dist/server/modules/skills/skill-controller.js.map +1 -1
- package/dist/server/modules/skills/skill-manager-service.d.ts +61 -0
- package/dist/server/modules/skills/skill-manager-service.js +218 -0
- package/dist/server/modules/skills/skill-manager-service.js.map +1 -1
- package/dist/server/modules/skills/skill-name-policy.js +2 -1
- package/dist/server/modules/skills/skill-name-policy.js.map +1 -1
- package/dist/server/modules/tasks/task-helper-client.d.ts +1 -0
- package/dist/server/modules/tasks/task-helper-client.js +45 -9
- package/dist/server/modules/tasks/task-helper-client.js.map +1 -1
- package/dist/server/modules/tasks/task-types.d.ts +5 -0
- package/dist/server/modules/tasks/task-types.js +6 -1
- package/dist/server/modules/tasks/task-types.js.map +1 -1
- package/dist/server/modules/terminal/runtime/conpty-session-agent-process.js +2 -1
- package/dist/server/modules/terminal/runtime/conpty-session-agent-process.js.map +1 -1
- package/dist/server/modules/terminal/runtime/node-pty-loader.d.ts +5 -0
- package/dist/server/modules/terminal/runtime/node-pty-loader.js +68 -0
- package/dist/server/modules/terminal/runtime/node-pty-loader.js.map +1 -0
- package/dist/server/modules/terminal/runtime/pty-broker-agent-process.js +2 -1
- package/dist/server/modules/terminal/runtime/pty-broker-agent-process.js.map +1 -1
- package/dist/server/modules/terminal/runtime/pty-host-attachment-manager.js +6 -9
- package/dist/server/modules/terminal/runtime/pty-host-attachment-manager.js.map +1 -1
- package/dist/server/modules/terminal/runtime/pty-runtime-manager.js +6 -9
- package/dist/server/modules/terminal/runtime/pty-runtime-manager.js.map +1 -1
- package/dist/server/routes/assistant.d.ts +2 -1
- package/dist/server/routes/assistant.js +20 -1
- package/dist/server/routes/assistant.js.map +1 -1
- package/dist/server/routes/browser-runtime.d.ts +3 -0
- package/dist/server/routes/browser-runtime.js +14 -0
- package/dist/server/routes/browser-runtime.js.map +1 -0
- package/dist/server/routes/document-runtime.d.ts +3 -0
- package/dist/server/routes/document-runtime.js +18 -0
- package/dist/server/routes/document-runtime.js.map +1 -0
- package/dist/server/routes/office.d.ts +3 -0
- package/dist/server/routes/office.js +16 -0
- package/dist/server/routes/office.js.map +1 -0
- package/dist/server/routes/ops-runtime.d.ts +3 -0
- package/dist/server/routes/ops-runtime.js +13 -0
- package/dist/server/routes/ops-runtime.js.map +1 -0
- package/dist/server/routes/presentation.d.ts +3 -0
- package/dist/server/routes/presentation.js +5 -0
- package/dist/server/routes/presentation.js.map +1 -0
- package/dist/server/routes/skills.js +1 -0
- package/dist/server/routes/skills.js.map +1 -1
- package/dist/server/server/create-server.d.ts +36 -0
- package/dist/server/server/create-server.js +215 -4
- package/dist/server/server/create-server.js.map +1 -1
- package/dist/server/server/release-manifest-sync.d.ts +1 -0
- package/dist/server/server/release-manifest-sync.js +2 -2
- package/dist/server/server/release-manifest-sync.js.map +1 -1
- package/dist/server/server/start-host.js +1 -1
- package/dist/server/server/start-host.js.map +1 -1
- package/dist/server/storage/repositories/auth-token-repository.js +22 -6
- package/dist/server/storage/repositories/auth-token-repository.js.map +1 -1
- package/dist/server/storage/repositories/browser-profile-repository.d.ts +18 -0
- package/dist/server/storage/repositories/browser-profile-repository.js +134 -0
- package/dist/server/storage/repositories/browser-profile-repository.js.map +1 -0
- package/dist/server/storage/repositories/document-comment-repository.d.ts +10 -0
- package/dist/server/storage/repositories/document-comment-repository.js +118 -0
- package/dist/server/storage/repositories/document-comment-repository.js.map +1 -0
- package/dist/server/storage/repositories/document-repository.d.ts +16 -0
- package/dist/server/storage/repositories/document-repository.js +109 -0
- package/dist/server/storage/repositories/document-repository.js.map +1 -0
- package/dist/server/storage/repositories/document-revision-repository.d.ts +10 -0
- package/dist/server/storage/repositories/document-revision-repository.js +79 -0
- package/dist/server/storage/repositories/document-revision-repository.js.map +1 -0
- package/dist/server/storage/repositories/document-template-repository.d.ts +13 -0
- package/dist/server/storage/repositories/document-template-repository.js +244 -0
- package/dist/server/storage/repositories/document-template-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-approval-repository.d.ts +11 -0
- package/dist/server/storage/repositories/office-approval-repository.js +109 -0
- package/dist/server/storage/repositories/office-approval-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-artifact-repository.d.ts +10 -0
- package/dist/server/storage/repositories/office-artifact-repository.js +89 -0
- package/dist/server/storage/repositories/office-artifact-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-audit-event-repository.d.ts +8 -0
- package/dist/server/storage/repositories/office-audit-event-repository.js +54 -0
- package/dist/server/storage/repositories/office-audit-event-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-connector-repository.d.ts +10 -0
- package/dist/server/storage/repositories/office-connector-repository.js +97 -0
- package/dist/server/storage/repositories/office-connector-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-receipt-repository.d.ts +8 -0
- package/dist/server/storage/repositories/office-receipt-repository.js +48 -0
- package/dist/server/storage/repositories/office-receipt-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-rollback-record-repository.d.ts +8 -0
- package/dist/server/storage/repositories/office-rollback-record-repository.js +60 -0
- package/dist/server/storage/repositories/office-rollback-record-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-task-repository.d.ts +19 -0
- package/dist/server/storage/repositories/office-task-repository.js +199 -0
- package/dist/server/storage/repositories/office-task-repository.js.map +1 -0
- package/dist/server/storage/repositories/office-task-step-repository.d.ts +10 -0
- package/dist/server/storage/repositories/office-task-step-repository.js +110 -0
- package/dist/server/storage/repositories/office-task-step-repository.js.map +1 -0
- package/dist/server/storage/repositories/ops-target-repository.d.ts +16 -0
- package/dist/server/storage/repositories/ops-target-repository.js +119 -0
- package/dist/server/storage/repositories/ops-target-repository.js.map +1 -0
- package/dist/server/storage/repositories/session-binding-repository.d.ts +4 -0
- package/dist/server/storage/repositories/session-binding-repository.js +70 -69
- package/dist/server/storage/repositories/session-binding-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-changed-file-repository.d.ts +6 -0
- package/dist/server/storage/repositories/session-changed-file-repository.js +44 -43
- package/dist/server/storage/repositories/session-changed-file-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-fork-repository.d.ts +2 -0
- package/dist/server/storage/repositories/session-fork-repository.js +42 -41
- package/dist/server/storage/repositories/session-fork-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-index-repository.d.ts +5 -0
- package/dist/server/storage/repositories/session-index-repository.js +153 -152
- package/dist/server/storage/repositories/session-index-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-message-attachment-repository.d.ts +7 -0
- package/dist/server/storage/repositories/session-message-attachment-repository.js +91 -90
- package/dist/server/storage/repositories/session-message-attachment-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-message-origin-repository.d.ts +2 -0
- package/dist/server/storage/repositories/session-message-origin-repository.js +25 -24
- package/dist/server/storage/repositories/session-message-origin-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-state-repository.d.ts +2 -0
- package/dist/server/storage/repositories/session-state-repository.js +35 -34
- package/dist/server/storage/repositories/session-state-repository.js.map +1 -1
- package/dist/server/storage/repositories/session-status-snapshot-repository.d.ts +2 -0
- package/dist/server/storage/repositories/session-status-snapshot-repository.js +25 -24
- package/dist/server/storage/repositories/session-status-snapshot-repository.js.map +1 -1
- package/dist/server/storage/sqlite/client.js +123 -1
- package/dist/server/storage/sqlite/client.js.map +1 -1
- package/dist/server/storage/sqlite/schema.sql +300 -1
- package/dist/server/types/domain.d.ts +205 -1
- package/package.json +14 -7
- package/scripts/postinstall.mjs +170 -36
- package/dist/public/assets/FileContextPanel-xGTYDclT.js +0 -1
- package/dist/public/assets/WorkbenchLayout-DScHaza9.js +0 -244
- package/dist/public/assets/WorkbenchShellRoute-DN6LdrqC.js +0 -1
- package/dist/public/assets/WorkbenchShellRoute-DhQo_0vu.css +0 -1
- package/dist/public/assets/file-tree-icon-lfU9Ag77.js +0 -3
- package/dist/public/assets/index-CFYXCsyx.css +0 -1
- package/dist/public/assets/index-NGxWr8Ix.js +0 -42
- package/node_modules/@codingns/session-sync-core/dist/claude-message-utils.d.ts +0 -42
- package/node_modules/@codingns/session-sync-core/dist/claude-message-utils.js +0 -346
- package/node_modules/@codingns/session-sync-core/dist/claude-message-utils.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/codex-resume-history.d.ts +0 -1
- package/node_modules/@codingns/session-sync-core/dist/codex-resume-history.js +0 -80
- package/node_modules/@codingns/session-sync-core/dist/codex-resume-history.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/index.d.ts +0 -18
- package/node_modules/@codingns/session-sync-core/dist/index.js +0 -19
- package/node_modules/@codingns/session-sync-core/dist/index.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/kimi-message-normalizer.d.ts +0 -18
- package/node_modules/@codingns/session-sync-core/dist/kimi-message-normalizer.js +0 -659
- package/node_modules/@codingns/session-sync-core/dist/kimi-message-normalizer.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/kimi-shared.d.ts +0 -11
- package/node_modules/@codingns/session-sync-core/dist/kimi-shared.js +0 -72
- package/node_modules/@codingns/session-sync-core/dist/kimi-shared.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/patch-builder.d.ts +0 -67
- package/node_modules/@codingns/session-sync-core/dist/patch-builder.js +0 -752
- package/node_modules/@codingns/session-sync-core/dist/patch-builder.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/claude-code.d.ts +0 -48
- package/node_modules/@codingns/session-sync-core/dist/providers/claude-code.js +0 -1184
- package/node_modules/@codingns/session-sync-core/dist/providers/claude-code.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/claude-session-store.d.ts +0 -11
- package/node_modules/@codingns/session-sync-core/dist/providers/claude-session-store.js +0 -105
- package/node_modules/@codingns/session-sync-core/dist/providers/claude-session-store.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.d.ts +0 -84
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +0 -2436
- package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/gemini.d.ts +0 -47
- package/node_modules/@codingns/session-sync-core/dist/providers/gemini.js +0 -1480
- package/node_modules/@codingns/session-sync-core/dist/providers/gemini.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/kimi.d.ts +0 -33
- package/node_modules/@codingns/session-sync-core/dist/providers/kimi.js +0 -684
- package/node_modules/@codingns/session-sync-core/dist/providers/kimi.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/legna-code.d.ts +0 -9
- package/node_modules/@codingns/session-sync-core/dist/providers/legna-code.js +0 -17
- package/node_modules/@codingns/session-sync-core/dist/providers/legna-code.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode-permissions.d.ts +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode-permissions.js +0 -8
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode-permissions.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode-shared.d.ts +0 -48
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode-shared.js +0 -373
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode-shared.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode.d.ts +0 -61
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode.js +0 -1191
- package/node_modules/@codingns/session-sync-core/dist/providers/opencode.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/providers/utils.d.ts +0 -27
- package/node_modules/@codingns/session-sync-core/dist/providers/utils.js +0 -415
- package/node_modules/@codingns/session-sync-core/dist/providers/utils.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/registry.d.ts +0 -7
- package/node_modules/@codingns/session-sync-core/dist/registry.js +0 -22
- package/node_modules/@codingns/session-sync-core/dist/registry.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.d.ts +0 -24
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js +0 -329
- package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/claude-runtime.d.ts +0 -30
- package/node_modules/@codingns/session-sync-core/dist/runtime/claude-runtime.js +0 -939
- package/node_modules/@codingns/session-sync-core/dist/runtime/claude-runtime.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-permissions.d.ts +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-permissions.js +0 -16
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-permissions.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.d.ts +0 -70
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +0 -2571
- package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/gemini-runtime.d.ts +0 -21
- package/node_modules/@codingns/session-sync-core/dist/runtime/gemini-runtime.js +0 -561
- package/node_modules/@codingns/session-sync-core/dist/runtime/gemini-runtime.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/kimi-runtime.d.ts +0 -38
- package/node_modules/@codingns/session-sync-core/dist/runtime/kimi-runtime.js +0 -911
- package/node_modules/@codingns/session-sync-core/dist/runtime/kimi-runtime.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/legna-runtime.d.ts +0 -15
- package/node_modules/@codingns/session-sync-core/dist/runtime/legna-runtime.js +0 -16
- package/node_modules/@codingns/session-sync-core/dist/runtime/legna-runtime.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.d.ts +0 -37
- package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.js +0 -963
- package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/provider-runtime-service.d.ts +0 -21
- package/node_modules/@codingns/session-sync-core/dist/runtime/provider-runtime-service.js +0 -168
- package/node_modules/@codingns/session-sync-core/dist/runtime/provider-runtime-service.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/runtime/types.d.ts +0 -152
- package/node_modules/@codingns/session-sync-core/dist/runtime/types.js +0 -2
- package/node_modules/@codingns/session-sync-core/dist/runtime/types.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/services.d.ts +0 -28
- package/node_modules/@codingns/session-sync-core/dist/services.js +0 -148
- package/node_modules/@codingns/session-sync-core/dist/services.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/sqlite/node-sqlite.d.ts +0 -6
- package/node_modules/@codingns/session-sync-core/dist/sqlite/node-sqlite.js +0 -9
- package/node_modules/@codingns/session-sync-core/dist/sqlite/node-sqlite.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/dist/types.d.ts +0 -198
- package/node_modules/@codingns/session-sync-core/dist/types.js +0 -2
- package/node_modules/@codingns/session-sync-core/dist/types.js.map +0 -1
- package/node_modules/@codingns/session-sync-core/package.json +0 -33
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jingyi0605/codingns",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"codingns": "./bin/codingns.mjs"
|
|
6
|
+
"codingns": "./bin/codingns.mjs",
|
|
7
|
+
"codingns-workspace-office-mcp": "./bin/office-mcp-server.mjs"
|
|
7
8
|
},
|
|
8
9
|
"files": [
|
|
9
10
|
"bin",
|
|
10
11
|
"dist",
|
|
11
12
|
"README.md",
|
|
12
13
|
"scripts/postinstall.mjs",
|
|
13
|
-
"node_modules/@codingns/session-sync-core"
|
|
14
|
-
|
|
15
|
-
"bundleDependencies": [
|
|
16
|
-
"@codingns/session-sync-core"
|
|
14
|
+
"node_modules/@codingns/session-sync-core",
|
|
15
|
+
"vendor"
|
|
17
16
|
],
|
|
18
17
|
"engines": {
|
|
19
18
|
"node": ">=22.0.0"
|
|
@@ -24,6 +23,7 @@
|
|
|
24
23
|
},
|
|
25
24
|
"scripts": {
|
|
26
25
|
"build": "node ./scripts/build.mjs",
|
|
26
|
+
"postpack": "node ./scripts/postpack.mjs",
|
|
27
27
|
"postinstall": "node ./scripts/postinstall.mjs"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
@@ -31,13 +31,20 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@codingns/session-sync-core": "0.1.0",
|
|
34
|
+
"@jackwener/opencli": "1.7.7",
|
|
34
35
|
"@openai/codex": "0.130.0",
|
|
35
36
|
"@openai/codex-sdk": "0.130.0",
|
|
36
37
|
"better-sqlite3": "^12.8.0",
|
|
37
38
|
"chokidar": "^5.0.0",
|
|
38
39
|
"fastify": "^5.8.2",
|
|
39
40
|
"ignore": "^7.0.5",
|
|
40
|
-
"
|
|
41
|
+
"playwright-core": "^1.54.2",
|
|
42
|
+
"pptxgenjs": "^4.0.1",
|
|
43
|
+
"qrcode": "^1.5.4",
|
|
41
44
|
"ws": "^8.20.0"
|
|
45
|
+
},
|
|
46
|
+
"optionalDependencies": {
|
|
47
|
+
"@codingns/node-pty": "1.0.0-cns.1",
|
|
48
|
+
"node-pty": "^1.0.0"
|
|
42
49
|
}
|
|
43
50
|
}
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -11,6 +11,7 @@ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
|
11
11
|
const cliVersionRange = packageJson.dependencies?.["@openai/codex"];
|
|
12
12
|
const sdkVersionRange = packageJson.dependencies?.["@openai/codex-sdk"];
|
|
13
13
|
const sessionSyncCoreRange = packageJson.dependencies?.["@codingns/session-sync-core"];
|
|
14
|
+
const windowsNodePtyRange = packageJson.optionalDependencies?.["@codingns/node-pty"];
|
|
14
15
|
|
|
15
16
|
if (!sdkVersionRange) {
|
|
16
17
|
logInfo("[codingns] 未声明 @openai/codex-sdk,跳过 Codex 安装校验");
|
|
@@ -27,7 +28,11 @@ if (process.env.CODINGNS_SKIP_CODEX_POSTINSTALL === "1") {
|
|
|
27
28
|
process.exit(0);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
logInfo(`[codingns]
|
|
31
|
+
logInfo(`[codingns] 正在校验运行时依赖(${process.platform}/${process.arch})...`);
|
|
32
|
+
|
|
33
|
+
if (!verifyPtyRuntimeDependency()) {
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
31
36
|
|
|
32
37
|
if (await verifyCodexRuntime()) {
|
|
33
38
|
logInfo("[codingns] Codex 运行时依赖已就绪");
|
|
@@ -62,10 +67,34 @@ if (!(await verifyCodexRuntime())) {
|
|
|
62
67
|
|
|
63
68
|
logInfo("[codingns] Codex 运行时依赖修复完成");
|
|
64
69
|
|
|
70
|
+
function verifyPtyRuntimeDependency() {
|
|
71
|
+
const requiredPackageName = resolveRequiredPtyPackageName();
|
|
72
|
+
const packageJsonPath = resolveModuleExportFile(requiredPackageName, "package.json");
|
|
73
|
+
|
|
74
|
+
if (!packageJsonPath) {
|
|
75
|
+
if (requiredPackageName === "@codingns/node-pty") {
|
|
76
|
+
console.error(
|
|
77
|
+
`[codingns] 当前 Windows Node 22 运行时需要 ${requiredPackageName}${windowsNodePtyRange ? `@${windowsNodePtyRange}` : ""},但安装结果里没有找到它`
|
|
78
|
+
);
|
|
79
|
+
} else {
|
|
80
|
+
console.error(`[codingns] 未找到 PTY 运行时依赖:${requiredPackageName}`);
|
|
81
|
+
}
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const packageVersion = readPackageVersion(packageJsonPath);
|
|
86
|
+
const packageSummary = packageVersion
|
|
87
|
+
? `${requiredPackageName}@${packageVersion}`
|
|
88
|
+
: requiredPackageName;
|
|
89
|
+
|
|
90
|
+
logInfo(`[codingns] PTY 运行时依赖已就绪:${packageSummary}`);
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
65
94
|
async function verifyCodexRuntime() {
|
|
66
95
|
try {
|
|
67
96
|
const sdkEntryPath =
|
|
68
|
-
|
|
97
|
+
resolveModuleExportFile("@openai/codex-sdk", "dist/index.js") ??
|
|
69
98
|
findNodeModulesFile(packageRoot, ["@openai", "codex-sdk", "dist", "index.js"]);
|
|
70
99
|
|
|
71
100
|
if (!sdkEntryPath) {
|
|
@@ -94,29 +123,13 @@ async function verifyCodexRuntime() {
|
|
|
94
123
|
return false;
|
|
95
124
|
}
|
|
96
125
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
env: process.env,
|
|
100
|
-
encoding: "utf8",
|
|
101
|
-
timeout: 30_000
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
if (versionCheck.error) {
|
|
105
|
-
console.error(`[codingns] Codex CLI 启动失败:${versionCheck.error.message}`);
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (versionCheck.status !== 0) {
|
|
110
|
-
console.error(
|
|
111
|
-
`[codingns] Codex CLI 校验失败:${formatSpawnFailure(versionCheck)}`
|
|
112
|
-
);
|
|
126
|
+
if (!isExecutableFile(nativeCodexBinaryPath)) {
|
|
127
|
+
console.error(`[codingns] Codex CLI 平台二进制不可执行:${nativeCodexBinaryPath}`);
|
|
113
128
|
return false;
|
|
114
129
|
}
|
|
115
130
|
|
|
116
|
-
const versionText = versionCheck.stdout?.trim() || "unknown";
|
|
117
131
|
logInfo(`[codingns] Codex CLI 入口已就绪:${codexBinPath}`);
|
|
118
132
|
logInfo(`[codingns] Codex CLI 平台运行文件已就绪:${nativeCodexBinaryPath}`);
|
|
119
|
-
logInfo(`[codingns] Codex CLI 版本:${versionText}`);
|
|
120
133
|
return true;
|
|
121
134
|
} catch (error) {
|
|
122
135
|
const detail = error instanceof Error ? error.message : String(error);
|
|
@@ -143,9 +156,7 @@ function runNpmInstall(args) {
|
|
|
143
156
|
npm_config_location: "project"
|
|
144
157
|
};
|
|
145
158
|
delete env.npm_config_prefix;
|
|
146
|
-
delete env.npm_execpath;
|
|
147
159
|
delete env.npm_command;
|
|
148
|
-
delete env.npm_config_user_agent;
|
|
149
160
|
|
|
150
161
|
const installArgs = [
|
|
151
162
|
...args,
|
|
@@ -155,13 +166,72 @@ function runNpmInstall(args) {
|
|
|
155
166
|
"--install-strategy=nested"
|
|
156
167
|
];
|
|
157
168
|
|
|
158
|
-
const
|
|
169
|
+
const command = resolveNpmInvocation(installArgs);
|
|
170
|
+
logInfo(
|
|
171
|
+
`[codingns] 执行运行时修复命令:${command.file} ${command.args.map(formatCommandArg).join(" ")}`
|
|
172
|
+
);
|
|
159
173
|
|
|
160
|
-
|
|
174
|
+
const result = spawnSync(command.file, command.args, {
|
|
161
175
|
cwd: packageRoot,
|
|
162
176
|
env,
|
|
163
177
|
stdio: "inherit"
|
|
164
178
|
});
|
|
179
|
+
|
|
180
|
+
if (result.error) {
|
|
181
|
+
const detail = result.error instanceof Error ? result.error.message : String(result.error);
|
|
182
|
+
console.error(`[codingns] 运行时修复命令启动失败:${detail}`);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (typeof result.status === "number") {
|
|
186
|
+
logInfo(`[codingns] 运行时修复命令退出码:${result.status}`);
|
|
187
|
+
} else if (result.signal) {
|
|
188
|
+
console.error(`[codingns] 运行时修复命令被信号中断:${result.signal}`);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function resolveNpmInvocation(args) {
|
|
195
|
+
const npmExecPath = process.env.npm_execpath;
|
|
196
|
+
|
|
197
|
+
if (npmExecPath && fs.existsSync(npmExecPath)) {
|
|
198
|
+
return {
|
|
199
|
+
file: process.execPath,
|
|
200
|
+
args: [npmExecPath, ...args]
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (process.platform !== "win32") {
|
|
205
|
+
return {
|
|
206
|
+
file: "npm",
|
|
207
|
+
args
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return {
|
|
212
|
+
file: "cmd.exe",
|
|
213
|
+
args: ["/d", "/s", "/c", quoteWindowsCommand("npm", args)]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function quoteWindowsCommand(command, args) {
|
|
218
|
+
return [command, ...args].map(quoteWindowsArg).join(" ");
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function quoteWindowsArg(value) {
|
|
222
|
+
if (!value.length) {
|
|
223
|
+
return '""';
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (!/[\s"]/u.test(value)) {
|
|
227
|
+
return value;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return `"${value.replace(/"/g, '\\"')}"`;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function formatCommandArg(value) {
|
|
234
|
+
return /[\s"]/u.test(value) ? JSON.stringify(value) : value;
|
|
165
235
|
}
|
|
166
236
|
|
|
167
237
|
function logInfo(message) {
|
|
@@ -234,7 +304,11 @@ function resolveCodexNativeBinaryPath(codexBinPath) {
|
|
|
234
304
|
return localBinaryPath;
|
|
235
305
|
}
|
|
236
306
|
|
|
237
|
-
const platformPackageJsonPath =
|
|
307
|
+
const platformPackageJsonPath =
|
|
308
|
+
resolveModuleExportFile(platformPackage, "package.json") ??
|
|
309
|
+
(codexPackageRoot
|
|
310
|
+
? findNodeModulesFile(codexPackageRoot, [...platformPackage.split("/"), "package.json"])
|
|
311
|
+
: null);
|
|
238
312
|
|
|
239
313
|
if (!platformPackageJsonPath) {
|
|
240
314
|
return null;
|
|
@@ -251,17 +325,6 @@ function resolveCodexNativeBinaryPath(codexBinPath) {
|
|
|
251
325
|
return fs.existsSync(platformBinaryPath) ? platformBinaryPath : null;
|
|
252
326
|
}
|
|
253
327
|
|
|
254
|
-
function formatSpawnFailure(result) {
|
|
255
|
-
const parts = [
|
|
256
|
-
result.stderr?.trim(),
|
|
257
|
-
result.stdout?.trim(),
|
|
258
|
-
result.signal ? `signal=${result.signal}` : null,
|
|
259
|
-
typeof result.status === "number" ? `exitCode=${result.status}` : null
|
|
260
|
-
].filter(Boolean);
|
|
261
|
-
|
|
262
|
-
return parts.join("\n") || "unknown error";
|
|
263
|
-
}
|
|
264
|
-
|
|
265
328
|
function resolveCodexPlatformPackageName() {
|
|
266
329
|
switch (`${process.platform}/${process.arch}`) {
|
|
267
330
|
case "linux/x64":
|
|
@@ -281,6 +344,36 @@ function resolveCodexPlatformPackageName() {
|
|
|
281
344
|
}
|
|
282
345
|
}
|
|
283
346
|
|
|
347
|
+
function isExecutableFile(filePath) {
|
|
348
|
+
try {
|
|
349
|
+
fs.accessSync(filePath, process.platform === "win32" ? fs.constants.F_OK : fs.constants.X_OK);
|
|
350
|
+
return true;
|
|
351
|
+
} catch {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function readPackageVersion(packageJsonPath) {
|
|
357
|
+
try {
|
|
358
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
359
|
+
return typeof packageJson?.version === "string" ? packageJson.version : "";
|
|
360
|
+
} catch {
|
|
361
|
+
return "";
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function resolveRequiredPtyPackageName() {
|
|
366
|
+
if (
|
|
367
|
+
process.platform === "win32" &&
|
|
368
|
+
process.arch === "x64" &&
|
|
369
|
+
Number((process.versions.node || "").split(".")[0]) === 22
|
|
370
|
+
) {
|
|
371
|
+
return "@codingns/node-pty";
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return "node-pty";
|
|
375
|
+
}
|
|
376
|
+
|
|
284
377
|
function resolveCodexTargetTriple() {
|
|
285
378
|
switch (`${process.platform}/${process.arch}`) {
|
|
286
379
|
case "linux/x64":
|
|
@@ -330,6 +423,47 @@ function resolveModuleFile(specifier) {
|
|
|
330
423
|
}
|
|
331
424
|
}
|
|
332
425
|
|
|
426
|
+
function resolveModuleExportFile(specifier, fallbackRelativePath) {
|
|
427
|
+
const resolvedEntry = resolveModuleFile(specifier);
|
|
428
|
+
|
|
429
|
+
if (resolvedEntry) {
|
|
430
|
+
return resolvedEntry;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
try {
|
|
434
|
+
const packageJsonPath = moduleRequire.resolve(`${specifier}/package.json`);
|
|
435
|
+
return fallbackRelativePath
|
|
436
|
+
? path.join(path.dirname(packageJsonPath), fallbackRelativePath)
|
|
437
|
+
: packageJsonPath;
|
|
438
|
+
} catch (error) {
|
|
439
|
+
if (!isPackagePathNotExportedError(error)) {
|
|
440
|
+
return null;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
const manualPackagePath = findNodeModulesFile(
|
|
445
|
+
packageRoot,
|
|
446
|
+
[...specifier.split("/"), "package.json"]
|
|
447
|
+
);
|
|
448
|
+
|
|
449
|
+
if (!manualPackagePath) {
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
return fallbackRelativePath
|
|
454
|
+
? path.join(path.dirname(manualPackagePath), fallbackRelativePath)
|
|
455
|
+
: manualPackagePath;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
function isPackagePathNotExportedError(error) {
|
|
459
|
+
return Boolean(
|
|
460
|
+
error &&
|
|
461
|
+
typeof error === "object" &&
|
|
462
|
+
"code" in error &&
|
|
463
|
+
error.code === "ERR_PACKAGE_PATH_NOT_EXPORTED"
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
|
|
333
467
|
function findNodeModulesFile(startDirectory, relativeSegments) {
|
|
334
468
|
let currentDirectory = startDirectory;
|
|
335
469
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c,j as n,t as r,A as Yn}from"./index-NGxWr8Ix.js";import{f as Zn,e as Di,g as Ei}from"./App-tXOqoHNl.js";import{aq as ki,u as Mi,h as Ri,v as _i}from"./model-switch-api-CPtou49j.js";import{bl as Ti,bm as Jn,b as en,w as wt,bn as Fi,u as Ai,a7 as Me,bo as Li,bp as yt,bq as Ve,br as Bi,bs as Wi,bt as $i}from"./WorkbenchLayout-DScHaza9.js";import{W as Ln}from"./WorkbenchModal-BWXYSXmC.js";import{r as Mt,a as Rt,F as Oi}from"./file-tree-icon-lfU9Ag77.js";import"./window-BVUB8gMK.js";import"./event-DvH9tcej.js";import"./relay-entry-BwE5nw0l.js";const Hi=new Set([".ds_store","thumbs.db","ehthumbs.db","desktop.ini",".spotlight-v100",".trashes",".fseventsd","__macosx","$recycle.bin","system volume information",".apdisk",".appledouble",".temporaryitems"]),zi=["._"];function xt(t){return t.split(/[/\\]/).filter(Boolean).pop()??t}function Ui(t){const i=t.trim().toLowerCase();return i?Hi.has(i)||zi.some(l=>i.startsWith(l)):!1}function nn(t,i,l){return l?[...t]:t.filter(o=>!Ui(i(o)))}function Nt(t,i){return nn(t,l=>l.name,i)}function Vi(t,i){return i?t:Object.entries(t).reduce((l,[o,h])=>(l[o]=Nt(h,!1),l),{})}async function Zt(t,i){const[l,o]=await Promise.all([Ti(i),ki(t)]);return Ki(l.changes,o.items)}function Ki(t,i){const l=new Set(i.map(o=>Et(o.path)));return t.filter(o=>l.has(Et(o.path))||o.oldPath!==null&&l.has(Et(o.oldPath)))}function Gi(t){const i=Bn("","");for(const l of t){const o=Et(l.path),h=o.split("/").filter(Boolean);let d=i;h.forEach((b,y)=>{const C=h.slice(0,y+1).join("/");if(y===h.length-1){d.children.set(`file:${C}`,{kind:"file",name:b,path:o,change:l});return}const T=`directory:${C}`,M=d.children.get(T);if(M&&M.kind==="directory"){d=M;return}const Y=Bn(b,C);d.children.set(T,Y),d=Y})}return ei(In([...i.children.values()]))}function Qn(t,i){const l=t.oldPath?`${t.oldPath} -> ${t.path}`:t.path;return an(t)?`${l} ${i}`:l}function an(t){return t.status==="D"||t.stagedStatus==="D"||t.worktreeStatus==="D"}function Dt(t){return t.split("/").filter(Boolean).pop()??t}function Et(t){return t.replace(/\\/g,"/").replace(/^\.\//,"").trim()}function Bn(t,i){return{kind:"directory",name:t,path:i,children:new Map}}function In(t){return[...t].sort((i,l)=>i.kind!==l.kind?i.kind==="directory"?-1:1:i.name.localeCompare(l.name,"zh-CN")).map(i=>i.kind==="directory"?{kind:"directory",name:i.name,path:i.path,children:In([...i.children.values()])}:i)}function ei(t){return t.map(i=>{var b;if(i.kind!=="directory")return i;const l=ei(i.children);let o=i.name,h=i.path,d=l;for(;d.length===1&&((b=d[0])==null?void 0:b.kind)==="directory";){const y=d[0];o=`${o}/${y.name}`,h=y.path,d=y.children}return{kind:"directory",name:o,path:h,children:d}})}const Xi=450,qi=60*1e3,Wn=20,$n=16;function Yi({sessionId:t,workspaceId:i,showSystemFiles:l,selectedPath:o,refreshVersion:h,onCountChange:d,onSelectFile:b,onOpenFile:y}){const[C,T]=c.useState("tree"),[M,Y]=c.useState([]),[me,U]=c.useState(!0),[pe,be]=c.useState(!1),[V,ft]=c.useState([]),E=c.useRef(null),Tt=Jn(),{showToast:je}=Zn();c.useEffect(()=>{const m=en(gt(i,t),qi);T("tree"),Y(m??[]),U(m===null),be(!1),ft([]),E.current=null},[t,i]),c.useEffect(()=>{let m=!1;async function j(){U(!0);try{const v=await Zt(t,i);m||(Y(v),wt(gt(i,t),v))}catch(v){m||je({title:Jt(v,r("conversation.filePanelSessionLoadFailed")),tone:"error"})}finally{m||U(!1)}}return j(),()=>{m=!0}},[h,t,je,i]);async function Se(){U(!0);try{const m=await Zt(t,i);Y(m),wt(gt(i,t),m)}catch(m){je({title:Jt(m,r("conversation.filePanelSessionLoadFailed")),tone:"error"})}finally{U(!1)}}async function D(){if(R.length!==0){be(!0);try{await Fi(i,R.map(j=>j.path));const m=await Zt(t,i);Y(m),wt(gt(i,t),m),je({title:r("conversation.filePanelSessionStageSuccess"),tone:"success"})}catch(m){je({title:Jt(m,r("git.stageFailed")),tone:"error"})}finally{be(!1)}}}function F(m){ft(j=>j.includes(m)?j.filter(v=>v!==m):[...j,m])}function K(m){const j=Date.now(),v=E.current;return E.current={filePath:m,timestamp:j},(v==null?void 0:v.filePath)===m&&j-v.timestamp<=Xi}async function $(m,j){if(j&&K(m)){await y(m),E.current=null;return}j||(E.current=null),await b(m)}const ne=c.useMemo(()=>nn(M,m=>Dt(m.path),l),[M,l]),R=ne.filter(m=>!m.staged),Re=Gi(ne),ie=new Set(V);return c.useEffect(()=>{d==null||d(ne.length)},[d,ne.length]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"file-panel-session-toolbar",children:[n.jsxs("div",{className:"file-panel-view-modes",role:"tablist","aria-label":r("conversation.filePanelSessionViewLabel"),children:[n.jsx("button",{className:C==="tree"?"file-panel-view-button active":"file-panel-view-button",type:"button",role:"tab","aria-selected":C==="tree",onClick:()=>T("tree"),children:r("conversation.filePanelSessionTreeView")}),n.jsx("button",{className:C==="list"?"file-panel-view-button active":"file-panel-view-button",type:"button",role:"tab","aria-selected":C==="list",onClick:()=>T("list"),children:r("conversation.filePanelSessionListView")})]}),n.jsxs("div",{className:"file-panel-session-actions",children:[n.jsx("button",{className:"secondary-button",type:"button",onClick:()=>void Se(),disabled:me||pe,children:r("conversation.filePanelRefresh")}),n.jsx("button",{className:"primary-button",type:"button",onClick:()=>void D(),disabled:pe||R.length===0,children:r("conversation.filePanelSessionStageAll")})]})]}),n.jsxs("div",{className:"file-panel-session-summary",children:[n.jsx("span",{children:`${r("conversation.filePanelSessionSummary")} ${ne.length}`}),n.jsx("span",{children:`${r("conversation.filePanelSessionUnstagedSummary")} ${R.length}`})]}),n.jsx("div",{ref:Tt,className:"file-tree","data-scrollbar-autohide":"true",children:me?n.jsx("p",{className:"file-tree-status status-text",children:r("conversation.filePanelSessionLoading")}):ne.length===0?n.jsx("p",{className:"file-tree-status status-text",children:r("conversation.filePanelSessionEmpty")}):C==="tree"?ti({nodes:Re,depth:0,collapsedPathSet:ie,selectedPath:o,onToggleTreePath:F,onFileClick:$}):Zi({items:ne,selectedPath:o,onFileClick:$})})]})}function ti({nodes:t,depth:i,collapsedPathSet:l,selectedPath:o,onToggleTreePath:h,onFileClick:d}){return t.map(b=>{if(b.kind==="directory"){const y=!l.has(b.path);return n.jsxs("div",{className:"file-tree-node",children:[n.jsxs("button",{className:"file-tree-item",type:"button","data-kind":"directory","aria-expanded":y,style:{paddingInlineStart:`${Wn+i*$n}px`},onClick:()=>h(b.path),children:[n.jsx("span",{className:"file-tree-chevron","aria-hidden":"true",children:y?"v":">"}),n.jsx("span",{className:"file-tree-label",children:b.name})]}),y?n.jsx("div",{className:"file-tree-children",children:ti({nodes:b.children,depth:i+1,collapsedPathSet:l,selectedPath:o,onToggleTreePath:h,onFileClick:d})}):null]},`session-directory:${b.path}`)}return n.jsx("div",{className:"file-tree-node",children:n.jsxs("button",{className:"file-tree-item is-session-change",type:"button","data-active":o===b.change.path,"data-kind":"file",style:{paddingInlineStart:`${Wn+i*$n}px`},onClick:()=>void d(b.change.path,!an(b.change)),children:[n.jsx("span",{className:"file-tree-chevron is-hidden","aria-hidden":"true",children:">"}),n.jsx("span",{className:"git-tree-file-icon","data-kind":Rt(b.name),"aria-hidden":"true",children:Mt(b.name)}),n.jsxs("span",{className:"file-tree-label",children:[n.jsx("span",{className:"file-tree-name",children:b.name}),n.jsx("span",{className:"file-tree-path",children:Qn(b.change,r("conversation.filePanelSessionDeleted"))})]}),n.jsxs("span",{className:"file-session-item-meta",children:[n.jsx("span",{className:"file-session-badge","data-status":b.change.status,children:b.change.status}),n.jsx("span",{className:"file-session-badge subtle",children:b.change.staged?r("git.stagedLabel"):r("git.workingTreeLabel")})]})]})},`session-file:${b.path}`)})}function Zi({items:t,selectedPath:i,onFileClick:l}){return t.map(o=>n.jsx("div",{className:"file-session-list-item",children:n.jsxs("button",{className:"file-session-list-button",type:"button","data-active":i===o.path,onClick:()=>void l(o.path,!an(o)),children:[n.jsx("span",{className:"git-tree-file-icon","data-kind":Rt(Dt(o.path)),"aria-hidden":"true",children:Mt(Dt(o.path))}),n.jsxs("span",{className:"file-tree-label",children:[n.jsx("span",{className:"file-tree-name",children:Dt(o.path)}),n.jsx("span",{className:"file-tree-path",children:Qn(o,r("conversation.filePanelSessionDeleted"))})]}),n.jsxs("span",{className:"file-session-item-meta",children:[n.jsx("span",{className:"file-session-badge","data-status":o.status,children:o.status}),n.jsx("span",{className:"file-session-badge subtle",children:o.staged?r("git.stagedLabel"):r("git.workingTreeLabel")})]})]})},`session-list:${o.path}`))}function gt(t,i){return`file-panel.session-changes.${t}.${i}`}function Jt(t,i){return t instanceof Yn?t.message:typeof t=="object"&&t&&"message"in t?String(t.message??i):i}const g="",Ji=450,ee=8,Pt=4,Qi=176,Ii=120,ea=300*1e3,ta=60*1e3,On=1600,na=20,ia=16;function qa({className:t,sessionId:i,workspaceId:l,hideHeading:o=!1,hideTabs:h=!1,externalRevealRequest:d=null,externalWindowMode:b=!1,workbenchShellOverrides:y}){var Tn,Fn;const C=Ai(),{navigationGroups:T,subscribeFileTree:M,requestFileTreeRefresh:Y,addFileTreeSnapshotListener:me,subscribeGitSnapshot:U,requestGitRefresh:pe,addGitSnapshotListener:be}={...C,...y},[V,ft]=c.useState({}),[E,Tt]=c.useState([]),[je,Se]=c.useState([]),[D,F]=c.useState(g),[K,$]=c.useState([]),[ne,R]=c.useState(null),[Re,ie]=c.useState(!1),[m,j]=c.useState(!1),[v,dt]=c.useState(!1),[Ge,Xe]=c.useState(!1),[A,qe]=c.useState(""),[Ft,G]=c.useState(null),[ht,mt]=c.useState(!1),[we,Ye]=c.useState(null),[X,Ze]=c.useState("workspace"),[sn,_e]=c.useState(0),[rn,At]=c.useState(0),[Je,Z]=c.useState(!1),[Qe,L]=c.useState(!1),[ae,O]=c.useState(null),[ve,Te]=c.useState(null),[B,Fe]=c.useState(null),[P,Lt]=c.useState(null),[w,Ie]=c.useState(null),[Bt,Ae]=c.useState(""),[on,cn]=c.useState([]),[J,Wt]=c.useState(!1),[oi,ye]=c.useState(null),un=c.useId(),le=c.useRef({}),se=c.useRef({}),_=c.useRef([]),Q=c.useRef(g),et=c.useRef(!1),tt=c.useRef(null),ci=Jn(),fn=c.useRef(null),dn=c.useRef(null),$t=c.useRef(null),hn=c.useRef(null),mn=c.useRef(null),xe=c.useRef(0),re=c.useRef(new Map),{showToast:S}=Zn(),nt=Di(),I=Mi(e=>e.showSystemFiles),it=!!(i!=null&&i.trim()),pn=o&&nt.isMobile;c.useEffect(()=>{Me("file_panel.props",{sessionId:i,workspaceId:l,externalWindowMode:b})},[b,i,l]),c.useEffect(()=>{Q.current=D},[D]);function Ne(e){ft(a=>{const s=typeof e=="function"?e(a):e;return le.current=s,s})}function Le(e){Tt(a=>{const s=typeof e=="function"?e(a):e;return _.current=s,s})}c.useEffect(()=>{var f,p;if(Ut(),!l){Ut(),et.current=!1,le.current={},se.current={},_.current=[],Q.current=g,Ne({}),Le([]),Se([]),F(g),Xe(!1),qe(""),G(null),mt(!1),ie(!1),Wt(!1),ye(null),$([]),R(null),O(null),Te(null),Fe(null),Ie(null),Ae("");return}et.current=!0;const e=en(Kn(l),ea);Me("file_panel.workspace_snapshot",{workspaceId:l,cached:!!e,cachedRootItems:((p=(f=e==null?void 0:e.treeCache)==null?void 0:f[g])==null?void 0:p.length)??0,cachedDirectoryCount:Object.keys((e==null?void 0:e.treeCache)??{}).length});const a=Pa((e==null?void 0:e.activeDirectoryPath)??g,(e==null?void 0:e.treeCache)??{}),s=Vn((e==null?void 0:e.expandedDirectories)??[],a),u=St((e==null?void 0:e.treeCache)??{},a,s);le.current=u,se.current=Gn((e==null?void 0:e.treeRevisionByPath)??{},u),_.current=s,Q.current=a,Ne(u),Le(s),Se([]),F(a),ie(!1),j(!1),Xe(!1),qe(""),G(null),mt(!1),queueMicrotask(()=>{et.current=!1})},[l]),c.useEffect(()=>{if(!d||d.workspaceId!==l)return;const e=()=>{if(mn.current===d.requestId)return;mn.current=d.requestId,Ze("workspace"),(d.openViewer?He(d.filePath):ce(d.filePath)).catch(s=>{S({title:te(s,r("conversation.filePanelOpenFailed")),tone:"error"})})};if(et.current){queueMicrotask(e);return}e()},[d,He,ce,S,l]),c.useEffect(()=>{if(l)return me(e=>{e.workspaceId===l&&(se.current={...se.current,[e.path]:typeof e.revision=="string"?e.revision:null},Ne(a=>({...a,[e.path]:e.items})),e.path===g&&ie(!1),Se(a=>a.filter(s=>s!==e.path)),di(e.path,e.items))})},[me,l]),c.useEffect(()=>()=>{Ut()},[]),c.useEffect(()=>{l&&M(l,It(_.current,Q.current),{knownRevisionByPath:se.current})},[D,E,M,l]),c.useEffect(()=>{$([]),R(null),Ye(null),ye(null),_e(0),Z(!1),L(!1),O(null),Te(null),Fe(null),Ie(null),Ae(""),tt.current=null,xe.current+=1},[i]),c.useEffect(()=>{!it&&X==="session"&&Ze("workspace")},[X,it]),c.useEffect(()=>{h&&X!=="workspace"&&Ze("workspace")},[X,h]),c.useEffect(()=>{if(!Je&&!Qe&&!ae)return;function e(s){var x,N,fe;if(!(s.target instanceof Node))return;const u=((x=fn.current)==null?void 0:x.contains(s.target))??!1,f=((N=dn.current)==null?void 0:N.contains(s.target))??!1,p=((fe=$t.current)==null?void 0:fe.contains(s.target))??!1;!u&&!f&&!p&&(Z(!1),L(!1),O(null),Te(null))}function a(s){s.key==="Escape"&&(Z(!1),L(!1),O(null),Te(null))}return document.addEventListener("pointerdown",e),document.addEventListener("keydown",a),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",a)}},[Je,Qe,ae]),c.useLayoutEffect(()=>{if(!ae||typeof window>"u"){Te(null);return}const e=ae;function a(){const u=$t.current;if(!u)return;const f=u.getBoundingClientRect();Te(fa({x:e.positionX,y:e.positionY},{width:f.width||Qi,height:f.height||u.scrollHeight||0},{width:window.innerWidth,height:window.innerHeight}))}a();const s=window.requestAnimationFrame(a);return window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.cancelAnimationFrame(s),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[ae]),c.useEffect(()=>{if(!l)return;const e=Vn(E,D),a=St(V,D,e);wt(Kn(l),{treeCache:a,treeRevisionByPath:Gn(se.current,a),expandedDirectories:e,activeDirectoryPath:D})},[D,E,V,l]),c.useEffect(()=>{if(et.current)return;const e=St(V,D,E);ja(V,e)||Ne(e)},[D,E,V]),c.useEffect(()=>{let e=!1;const a=(l==null?void 0:l.trim())??null;async function s(f){if(!a)return;const p=Nt(le.current[g]??[],I),x=(f==null?void 0:f.silent)!==!0&&p.length===0;x&&ie(!0),Me("file_panel.load_root_tree.start",{sessionId:i,workspaceId:a,silent:(f==null?void 0:f.silent)===!0,cachedRootItems:p.length});try{const N=await zt(g,{force:!0});e||(Me("file_panel.load_root_tree.end",{sessionId:i,workspaceId:a,itemCount:N.length}),Ne(fe=>({...St(fe,Q.current,_.current),[g]:N})))}catch(N){!e&&!Xn(N)&&S({title:te(N,r("conversation.filePanelLoadFailed")),tone:"error"})}finally{!e&&x&&ie(!1)}}if(Nt(le.current[g]??[],I).length>0){const f=window.setTimeout(()=>{a&&(M(a,It(_.current,Q.current),{knownRevisionByPath:se.current}),s({silent:!0}))},1500);return()=>{e=!0,window.clearTimeout(f)}}return s(),()=>{e=!0}},[i,I,S,l]),c.useEffect(()=>{if(!l||!i){At(0);return}const e=en(Sa(l,i),ta);Me("file_panel.session_change_count.snapshot",{sessionId:i,workspaceId:l,cached:e!==null,cachedCount:e}),At(e??0)},[i,sn,l]),c.useEffect(()=>{if(!l){cn([]);return}const e=l.trim();U(e),pe(e)},[l,U,pe]),c.useEffect(()=>{if(!l)return;const e=l.trim();return be(a=>{var s;a.workspaceId===e&&cn(((s=a.status)==null?void 0:s.changes)??[])})},[be,l]);const pt=c.useMemo(()=>nn(on,e=>xt(e.path),I),[on,I]),W=c.useMemo(()=>{const e=new Map,a=new Set;for(const s of pt){const u=s.path.replace(/\\/g,"/"),f=s.worktreeStatus??s.stagedStatus??s.status;e.set(u,f);const p=u.split("/");for(let x=1;x<p.length;x++)a.add(p.slice(0,x).join("/"))}return{statusByPath:e,changedDirs:a}},[pt]),De=c.useMemo(()=>Vi(V,I),[I,V]),Ee=c.useMemo(()=>Ft===null?null:Nt(Ft,I),[Ft,I]),Be=De[g]??[],oe=Ge&&Ee!==null,bt=c.useMemo(()=>J?tn(Be,De,W.statusByPath,W.changedDirs):Be,[W.changedDirs,W.statusByPath,Be,J,De]),ui=c.useMemo(()=>oe?(Ee??[]).map(e=>z(e.path,e.kind)):ni(bt,De,E,J,W.statusByPath,W.changedDirs),[E,W.changedDirs,W.statusByPath,oe,J,Ee,De,bt]),We=((Tn=T.find(e=>e.workspace.id===l))==null?void 0:Tn.workspace)??null,k=Un(K),Ot=(k==null?void 0:k.path)??null,ge=(k==null?void 0:k.kind)==="file"?k.path:null,vt=c.useMemo(()=>new Set(K.map(e=>e.path)),[K]),at=c.useMemo(()=>jt(K),[K]),Ht=!!(We!=null&&We.path&&K.length===1&&Ot),bn=K.length===1&&(k==null?void 0:k.kind)==="file",vn=at.length>0,ke=at.length>0,lt=!!(P!=null&&P.items.length&&l),yn=!!l&&K.length===1&&k!==null,xn=!!((ge?he(ge):D)&&E.length),gn=P?P.mode==="copy"?r("conversation.filePanelClipboardCopyReady",{count:P.items.length}):r("conversation.filePanelClipboardCutReady",{count:P.items.length}):null,H=w?pa(w):null;async function Pn(e,a=!1){if(!l)return[];if(!a){const s=le.current[e];if(s)return s}e===g?ie(!0):Se(s=>kt(s,e));try{const s=await zt(e,{force:a});return Ne(u=>({...u,[e]:s})),s}catch(s){throw Xn(s)||S({title:te(s,r("conversation.filePanelLoadFailed")),tone:"error"}),s}finally{e===g?ie(!1):Se(s=>s.filter(u=>u!==e))}}async function Pe(e){if(!l)return;const a=(e==null?void 0:e.activeDirectoryPath)??Q.current,s=(e==null?void 0:e.expandedDirectories)??_.current,u=Ca(le.current,a,s);Me("file_panel.refresh_tree_cache.start",{sessionId:i,workspaceId:l,targetDirectories:u});const p=(await Promise.all(u.map(async x=>{const N=await zt(x,{force:!0});return[x,N]}))).reduce((x,[N,fe])=>(x[N]=fe,x),{});Me("file_panel.refresh_tree_cache.end",{sessionId:i,workspaceId:l,targetDirectories:u,directoryCount:Object.keys(p).length}),Ne(p)}async function zt(e,a){if(!l)return[];if(!(a!=null&&a.force)){const u=le.current[e];if(u)return u}const s=It(kt(_.current,e),e||Q.current);return M(l,s,{knownRevisionByPath:se.current}),Y(l,[e],{knownRevisionByPath:se.current}),fi(e,On,{allowCached:(a==null?void 0:a.force)!==!0})}function fi(e,a=On,s){const u=le.current[e];return(s==null?void 0:s.allowCached)!==!1&&u?Promise.resolve(u):new Promise((f,p)=>{const x=window.setTimeout(()=>{hi(e,x),p(new Error(`FILE_TREE_SNAPSHOT_TIMEOUT:${e}`))},a),N=re.current.get(e)??[];re.current.set(e,[...N,{resolve:f,reject:p,timerId:x}])})}function di(e,a){const s=re.current.get(e)??[];s.length!==0&&(re.current.delete(e),s.forEach(u=>{window.clearTimeout(u.timerId),u.resolve(a)}))}function hi(e,a){const u=(re.current.get(e)??[]).filter(f=>f.timerId!==a);if(u.length===0){re.current.delete(e);return}re.current.set(e,u)}function Ut(){for(const[e,a]of re.current.entries())a.forEach(s=>{window.clearTimeout(s.timerId),s.reject(new Error(`FILE_TREE_ABORTED:${e}`))});re.current.clear()}function $e(e){$([e]),R(e.path)}function st(e){F(e.kind==="directory"?e.path:he(e.path))}function mi(e){const a=sa(ui,ne,e);$(a),R(e.path),st(e)}function pi(e){const a=la(K,e),s=Un(a);$(a),R(e.path),s&&st(s)}function Cn(e){$e(e),st(e)}function Oe(e,a){if(a!=null&&a.shiftKey){mi(e);return}if(Ct(a)){pi(e);return}Cn(e)}async function rt(e,a=!1){const s=ut(e,a);if(!s.length){F(g);return}Le(u=>si(u,s)),F(s[s.length-1]??g);for(const u of s)try{await Pn(u)}catch{return}}async function ce(e){const a=z(e,"file");$e(a),st(a),await rt(e)}async function He(e){Ye(e),ye(null),tt.current=null,xe.current+=1,ce(e);const a=xe.current,s=e.replace(/\\/g,"/"),u=W.statusByPath.get(s);if(l&&u&&u!=="?"&&u!=="D")try{const f=await Li(l,e,!1);xe.current===a&&ye(f.content||null)}catch{xe.current===a&&ye(null)}}function jn(e){const a=Date.now(),s=tt.current;return tt.current={filePath:e,timestamp:a},(s==null?void 0:s.filePath)===e&&a-s.timestamp<=Ji}function Ce(){tt.current=null}async function bi(e,a){const s=z(e,"file");if(a!=null&&a.shiftKey||Ct(a)){Ce(),Oe(s,a);return}if(jn(e)){await He(e);return}Oe(s,a),await rt(e)}function Sn(){Xe(!1),qe(""),G(null),Ce()}async function vi(e,a){const s=z(e.path,e.kind);if(a!=null&&a.shiftKey||Ct(a)){Ce(),Oe(s,a);return}if(e.kind==="directory"){Sn(),Oe(s,a),await wn(e.path);return}if(jn(e.path)){Sn(),await He(e.path);return}await ce(e.path)}async function wn(e){if($e(z(e,"directory")),F(e),!_.current.includes(e))try{await Pn(e),Le(a=>kt(a,e))}catch{}}async function Nn(e){if($e(z(e,"directory")),F(e),_.current.includes(e)){Dn(e);return}await wn(e)}function Dn(e){Le(a=>a.filter(s=>s!==e&&!s.startsWith(`${e}/`))),F(he(e)),$([]),R(null)}async function En(){if(!l)return;const e=l;try{if(pe(e),await Pe(),ge&&await rt(ge),oe&&A.trim()){const a=await Ve(e,A.trim());G(a.items)}}catch(a){S({title:te(a,r("conversation.filePanelLoadFailed")),tone:"error"})}}async function yi(e){if(e==null||e.preventDefault(),!l||!A.trim()){G(null);return}mt(!0);try{const a=await Ve(l,A.trim());G(a.items)}catch(a){S({title:te(a,r("conversation.filePanelSearchFailed")),tone:"error"})}finally{mt(!1)}}function kn(){if(Ge){Xe(!1),qe(""),G(null);return}Xe(!0)}function q(e){L(!1),e()}function Mn(){var e;(e=hn.current)==null||e.click()}async function xi(e){var p;const a=((p=e.target.files)==null?void 0:p[0])??null;if(e.target.value="",!a||!l)return;const s=aa(a.name);if(!s){S({title:r("conversation.filePanelUploadFailed"),tone:"error"});return}const u=Hn(D,k),f=zn(u,s);dt(!0);try{const x=await ba(a);await Bi({workspaceId:l,path:f,contentBase64:x}),await Pe(),await ce(f),S({title:r("conversation.filePanelUploadSuccess",{name:s}),tone:"success"})}catch(x){S({title:te(x,r("conversation.filePanelUploadFailed")),tone:"error"})}finally{dt(!1)}}async function Vt(e=ge){if(!(!l||!e)){dt(!0);try{const a=await Wi(l,e),s=va(a.contentBase64);ya(a.fileName,new Blob([s],{type:"application/octet-stream"})),S({title:r("conversation.filePanelDownloadSuccess",{name:a.fileName}),tone:"success"})}catch(a){S({title:te(a,r("conversation.filePanelDownloadFailed")),tone:"error"})}finally{dt(!1)}}}function Rn(){const e=ge?he(ge):D;!e||!_.current.includes(e)||Dn(e)}function Kt(){Ie(null),Ae("")}function Gt(){m||Kt()}function ze(e,a=Hn(D,k)){if(!l)return;const s=a,u=s?`${s}/`:"";Z(!1),L(!1),O(null),Ie({mode:e,baseDirectory:s}),Ae(u)}function Xt(e=k){!l||!e||(Z(!1),L(!1),O(null),Ie({mode:"rename",target:e}),Ae(e.path))}async function gi(e){if(e==null||e.preventDefault(),!l||!w)return;const a=(Bt??"").trim();if(a){if(w.mode==="rename"&&Ke(w.target.path)===Ke(a)){Gt();return}j(!0);try{if(w.mode==="rename"){const s=w.target.path,u=z(a,w.target.kind),f=we?li(we,s,a):null;if(await yt({workspaceId:l,opType:"rename",srcPath:s,dstPath:a}),P&&Lt({...P,items:ma(P.items,s,a)}),Kt(),Ce(),await Pe(),w.target.kind==="directory"?(await rt(a,!0),$e(u),F(a)):await ce(a),f!==we&&(xe.current+=1,Ye(f),ye(null)),oe&&A.trim()){const p=await Ve(l,A.trim());G(p.items)}_e(p=>p+1),S({title:r("conversation.filePanelRenameSuccess",{name:xt(a)||a}),tone:"success"});return}if(await yt({workspaceId:l,opType:w.mode,dstPath:a,content:w.mode==="create_file"?"":void 0}),Kt(),await Pe(),w.mode==="create_directory"?(await rt(a,!0),$e(z(a,"directory")),F(a)):await ce(a),oe&&A.trim()){const s=await Ve(l,A.trim());G(s.items)}_e(s=>s+1)}catch(s){S({title:te(s,r("conversation.filePanelMutateFailed")),tone:"error"})}finally{j(!1)}}}function ue(e,a=at){var u;if(a.length===0)return;const s=jt(a);Lt({mode:e,items:s}),$(s),R(((u=s[s.length-1])==null?void 0:u.path)??null),S({title:e==="copy"?r("conversation.filePanelCopySelectionSuccess",{count:s.length}):r("conversation.filePanelCutSelectionSuccess",{count:s.length}),tone:"success"}),O(null)}async function ot(e=ca(k,D)){if(!l||!P||!P.items.length)return;const a=e??g,s=P.items.map(u=>({source:u,destinationPath:zn(a,xt(u.path)||u.path)}));j(!0);try{for(const p of s)P.mode==="cut"&&Ke(p.source.path)===Ke(p.destinationPath)||await yt({workspaceId:l,opType:P.mode==="copy"?"copy":"move",srcPath:p.source.path,dstPath:p.destinationPath});const u=s.map(p=>z(p.destinationPath,p.source.kind)),f=u[u.length-1]??null;if(P.mode==="cut"&&Lt(null),$(u),R((f==null?void 0:f.path)??null),f&&st(f),Ce(),await Pe({activeDirectoryPath:(f==null?void 0:f.kind)==="directory"?f.path:f?he(f.path):Q.current,expandedDirectories:_.current}),oe&&A.trim()){const p=await Ve(l,A.trim());G(p.items)}_e(p=>p+1),S({title:r("conversation.filePanelPasteSuccess",{count:u.length}),tone:"success"}),O(null)}catch(u){await Pe().catch(()=>{}),S({title:te(u,r("conversation.filePanelPasteFailed")),tone:"error"})}finally{j(!1)}}function qt(e=at){!e.length||m||(Fe(jt(e)),O(null))}async function Pi(){var a,s;if(!l||!(B!=null&&B.length))return;const e=jt(B);j(!0);try{for(const p of e)await yt({workspaceId:l,opType:"delete",srcPath:p.path});const u=ua(D,e),f=_.current.filter(p=>!e.some(x=>x.kind==="directory"&&_t(x.path,p)));if(we&&e.some(p=>_t(p.path,we))&&(xe.current+=1,Ye(null),ye(null)),Fe(null),$([]),R(null),Q.current=u,_.current=f,F(u),Le(f),Ce(),await Pe({activeDirectoryPath:u,expandedDirectories:f}),oe&&A.trim()){const p=await Ve(l,A.trim());G(p.items)}_e(p=>p+1),S({title:e.length===1?r("conversation.filePanelDeleteSuccess",{name:xt(((a=e[0])==null?void 0:a.path)??"")||((s=e[0])==null?void 0:s.path)||""}):r("conversation.filePanelDeleteSelectionSuccess",{count:e.length}),tone:"success"})}catch(u){S({title:te(u,r("conversation.filePanelMutateFailed")),tone:"error"})}finally{j(!1)}}async function Ue(e,a=k){const s=(We==null?void 0:We.path)??"",u=(a==null?void 0:a.path)??null;if(u===null||!s){Z(!1);return}try{const f=ha(s),p=e==="absolute"?da(s,u,f):Ke(u,f);await xa(p,nt),S({title:e==="absolute"?r("conversation.filePanelCopyAbsolutePathSuccess"):r("conversation.filePanelCopyRelativePathSuccess"),tone:"success"})}catch(f){S({title:f instanceof Error?f.message:r("conversation.filePanelCopyPathFailed"),tone:"error"})}finally{Z(!1),O(null)}}function Ci(e,a,s){return[{id:`open-${e.path}`,label:e.kind==="directory"?E.includes(e.path)?r("conversation.filePanelCollapseDirectory"):r("conversation.filePanelExpandDirectory"):r("conversation.filePanelOpenFile"),onSelect:()=>{if(e.kind==="directory"){Nn(e.path);return}He(e.path)}},{id:`download-${e.path}`,label:r("conversation.filePanelDownload"),disabled:e.kind!=="file"||v,onSelect:()=>{Vt(e.kind==="file"?e.path:null)}},{id:`create-file-${e.path}`,label:r("conversation.filePanelNewFile"),disabled:!l||m||v,onSelect:()=>{ze("create_file",s)}},{id:`create-directory-${e.path}`,label:r("conversation.filePanelNewDirectory"),disabled:!l||m||v,onSelect:()=>{ze("create_directory",s)}},{id:`rename-${e.path}`,label:r("conversation.filePanelRenameMove"),disabled:a.length!==1||m||v,onSelect:()=>Xt(e)},{id:`copy-${e.path}`,label:r("conversation.filePanelCopy"),disabled:a.length===0,onSelect:()=>ue("copy",a)},{id:`cut-${e.path}`,label:r("conversation.filePanelCut"),disabled:a.length===0,onSelect:()=>ue("cut",a)},{id:`paste-${e.path}`,label:r("conversation.filePanelPaste"),disabled:!lt,onSelect:()=>{ot(s)}},{id:`copy-relative-${e.path}`,label:r("conversation.filePanelCopyRelativePath"),onSelect:()=>{Ue("relative",e)}},{id:`copy-absolute-${e.path}`,label:r("conversation.filePanelCopyAbsolutePath"),onSelect:()=>{Ue("absolute",e)}},{id:`delete-${e.path}`,label:r("conversation.filePanelDelete"),disabled:a.length===0||m||v,onSelect:()=>qt(a)}]}async function _n(e,a){if(nt.isMobile)return;e.preventDefault();const s=z(a.path,a.kind),u=vt.has(s.path)?at:[s],f=s.kind==="directory"?s.path:he(s.path);vt.has(s.path)||Cn(s);const p=Ci(s,u,f);if(nt.isDesktop){await $i(p);return}nt.isWeb&&(Z(!1),L(!1),O({positionX:e.clientX,positionY:e.clientY,items:p}))}c.useEffect(()=>{if(X!=="workspace")return;function e(a){if(!ra(a)||a.altKey||a.shiftKey||oa(a.target))return;const s=a.key.toLowerCase();if(s==="c"&&ke){a.preventDefault(),ue("copy");return}if(s==="x"&&ke){a.preventDefault(),ue("cut");return}s==="v"&<&&(a.preventDefault(),ot())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[X,ke,lt,ue,ot]);function Yt(e,a){return n.jsx(n.Fragment,{children:e.map(s=>{const u=z(s.path,s.kind),f=s.kind==="directory",p=f&&E.includes(s.path),x=f&&je.includes(s.path),N=De[s.path]??[],fe=J?tn(N,De,W.statusByPath,W.changedDirs):N,Si=vt.has(s.path),wi=Ot===s.path,ct=W.statusByPath.get(s.path.replace(/\\/g,"/")),An=f&&W.changedDirs.has(s.path.replace(/\\/g,"/")),Ni=(P==null?void 0:P.mode)==="cut"&&P.items.some(de=>de.path===s.path);return n.jsxs("div",{className:"file-tree-node",children:[n.jsxs("button",{className:"file-tree-item",type:"button","data-active":wi,"data-selected":Si,"data-cut-pending":Ni||void 0,"data-kind":s.kind,"aria-expanded":f?p:void 0,style:{paddingInlineStart:`${na+a*ia}px`},onClick:de=>{if(f){if(de.shiftKey||Ct(de)){Ce(),Oe(u,de);return}Ce(),Oe(u,de),Nn(s.path);return}bi(s.path,de)},onContextMenu:de=>{_n(de,s)},children:[n.jsx("span",{className:`file-tree-chevron${f?"":" is-hidden"}`,"aria-hidden":"true",children:p?"v":">"}),f?null:n.jsx("span",{className:"git-tree-file-icon","data-kind":Rt(s.name),"aria-hidden":"true",children:Mt(s.name)}),n.jsx("span",{className:"file-tree-label","data-status":ct??void 0,"data-has-changes":An||void 0,children:s.name}),!f&&ct?n.jsx("span",{className:"git-status-badge","data-status":ct,"aria-label":ct,children:ct}):null,f&&An?n.jsx("span",{className:"file-tree-dir-badge","aria-hidden":"true"}):null,x?n.jsx("span",{className:"file-tree-meta",children:r("common.loading")}):null]}),f&&p?n.jsx("div",{className:"file-tree-children",children:x&&!N.length?n.jsx("p",{className:"file-tree-empty",children:r("common.loading")}):fe.length?Yt(fe,a+1):n.jsx("p",{className:"file-tree-empty",children:r("conversation.filePanelEmptyDirectory")})}):null]},`${s.kind}-${s.path}`)})})}function ji(e){return n.jsx(n.Fragment,{children:e.map(a=>{const s=a.kind==="directory",u=vt.has(a.path),f=Ot===a.path;return n.jsx("div",{className:"file-tree-node",children:n.jsxs("button",{className:"file-tree-item is-search-result",type:"button","data-active":f,"data-selected":u,"data-kind":a.kind,onClick:p=>{vi(a,p)},onContextMenu:p=>{_n(p,a)},children:[n.jsx("span",{className:"file-tree-chevron is-hidden","aria-hidden":"true",children:">"}),s?null:n.jsx("span",{className:"git-tree-file-icon","data-kind":Rt(a.name),"aria-hidden":"true",children:Mt(a.name)}),n.jsxs("span",{className:"file-tree-label",children:[n.jsx("span",{className:"file-tree-name",children:a.name}),n.jsx("span",{className:"file-tree-path",children:a.path})]})]})},`search-${a.kind}-${a.path}`)})})}return n.jsx("section",{className:["conversation-panel","surface-card","file-panel",t].filter(Boolean).join(" "),"data-testid":"file-context-panel",children:l?n.jsxs(n.Fragment,{children:[n.jsx(Oi,{workspaceId:l,filePath:we,open:we!==null,onClose:()=>{xe.current+=1,Ye(null),ye(null)},onSaved:async e=>{await Pe(),await ce(e),_e(a=>a+1)},diffContent:oi}),o?null:n.jsx("div",{className:"file-panel-heading-row",children:n.jsx("h2",{className:"file-panel-heading",children:r("conversation.filePanelTitle")})}),h?null:n.jsxs("div",{className:"file-panel-tabs",role:"tablist","aria-label":r("conversation.filePanelTitle"),children:[n.jsx("button",{className:X==="workspace"?"file-panel-tab active":"file-panel-tab",type:"button",role:"tab","aria-selected":X==="workspace",onClick:()=>Ze("workspace"),children:r("conversation.filePanelWorkspaceTab")}),n.jsxs("button",{className:X==="session"?"file-panel-tab active":"file-panel-tab",type:"button",role:"tab","aria-selected":X==="session",onClick:()=>{it&&Ze("session")},disabled:!it,children:[r("conversation.filePanelSessionTab"),n.jsx("span",{className:"file-panel-tab-badge","aria-label":`${r("conversation.filePanelSessionTab")} ${rn}`,children:rn})]})]}),X==="workspace"?n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:hn,"data-testid":"file-panel-upload-input",type:"file",hidden:!0,onChange:e=>void xi(e)}),pn?n.jsx("div",{className:"file-panel-toolbar file-panel-toolbar-mobile","aria-label":r("conversation.filePanelTitle"),children:n.jsxs("div",{className:"file-mobile-action-shell",ref:dn,children:[n.jsxs("button",{className:"secondary-button file-mobile-action-trigger",type:"button","aria-label":r("conversation.filePanelActionsMenu"),"aria-haspopup":"menu","aria-expanded":Qe,"data-active":Qe,onClick:()=>{Z(!1),L(e=>!e)},children:[n.jsx("span",{children:r("conversation.filePanelActionsMenu")}),n.jsx(Ba,{})]}),Qe?n.jsxs("div",{className:"file-mobile-action-menu",role:"menu","aria-label":r("conversation.filePanelActionsMenu"),children:[n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>ue("copy")),disabled:!ke,children:r("conversation.filePanelCopy")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>ue("cut")),disabled:!ke,children:r("conversation.filePanelCut")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>ot()),disabled:!lt||m||v,children:r("conversation.filePanelPaste")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>{L(!1),kn()},children:Ge?r("conversation.filePanelHideSearch"):r("conversation.filePanelShowSearch")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>{L(!1),Wt(e=>!e)},disabled:pt.length===0,children:J?r("conversation.filePanelShowAll"):r("conversation.filePanelFilterChanges")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(En),disabled:Re||m||ht,children:r("conversation.filePanelRefresh")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>{L(!1),Rn()},disabled:!xn,children:r("conversation.filePanelCollapseCurrent")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>{L(!1),Mn()},disabled:m||v,children:r("conversation.filePanelUpload")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(Vt),disabled:!bn||v,children:r("conversation.filePanelDownload")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(Xt),disabled:!yn||m||v,children:r("conversation.filePanelRenameMove")}),n.jsx("button",{className:"file-mobile-action-menu-item danger",type:"button",role:"menuitem",onClick:()=>q(qt),disabled:!vn||m||v,children:r("conversation.filePanelDelete")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>ze("create_file")),disabled:m||v,children:r("conversation.filePanelNewFile")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>ze("create_directory")),disabled:m||v,children:r("conversation.filePanelNewDirectory")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>Ue("absolute")),disabled:!Ht,children:r("conversation.filePanelCopyAbsolutePath")}),n.jsx("button",{className:"file-mobile-action-menu-item",type:"button",role:"menuitem",onClick:()=>q(()=>Ue("relative")),disabled:!Ht,children:r("conversation.filePanelCopyRelativePath")})]}):null]})}):n.jsxs("div",{className:"file-panel-toolbar","aria-label":r("conversation.filePanelTitle"),children:[n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelCopy"),"aria-label":r("conversation.filePanelCopy"),onClick:()=>ue("copy"),disabled:!ke,children:n.jsx(Ea,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelCut"),"aria-label":r("conversation.filePanelCut"),onClick:()=>ue("cut"),disabled:!ke,children:n.jsx(ka,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelPaste"),"aria-label":r("conversation.filePanelPaste"),onClick:()=>void ot(),disabled:!lt||m||v,children:n.jsx(Ma,{})}),n.jsxs("div",{className:"file-toolbar-menu-shell",ref:fn,children:[n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelCopyPath"),"aria-label":r("conversation.filePanelCopyPath"),"aria-haspopup":"menu","aria-expanded":Je,"data-active":Je,onClick:()=>{L(!1),Z(e=>!e)},disabled:!Ht,children:n.jsx(Da,{})}),Je?n.jsxs("div",{className:"file-toolbar-menu",role:"menu",children:[n.jsx("button",{className:"file-toolbar-menu-item",type:"button",role:"menuitem",onClick:()=>void Ue("absolute"),children:r("conversation.filePanelCopyAbsolutePath")}),n.jsx("button",{className:"file-toolbar-menu-item",type:"button",role:"menuitem",onClick:()=>void Ue("relative"),children:r("conversation.filePanelCopyRelativePath")})]}):null]}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelCollapseCurrent"),"aria-label":r("conversation.filePanelCollapseCurrent"),onClick:Rn,disabled:!xn,children:n.jsx(wa,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelRefresh"),"aria-label":r("conversation.filePanelRefresh"),onClick:()=>void En(),disabled:Re||m||ht,children:n.jsx(Na,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelSearchButton"),"aria-label":r("conversation.filePanelSearchButton"),"data-active":Ge,onClick:kn,disabled:Re,children:n.jsx(qn,{})}),pt.length>0?n.jsx("button",{className:"file-toolbar-button",type:"button",title:J?r("conversation.filePanelShowAll"):r("conversation.filePanelFilterChanges"),"aria-label":J?r("conversation.filePanelShowAll"):r("conversation.filePanelFilterChanges"),"data-active":J,onClick:()=>Wt(e=>!e),children:n.jsx(Wa,{})}):null,n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelUpload"),"aria-label":r("conversation.filePanelUpload"),onClick:Mn,disabled:m||v,children:n.jsx(_a,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelDownload"),"aria-label":r("conversation.filePanelDownload"),onClick:()=>void Vt(),disabled:!bn||v,children:n.jsx(Ta,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelRenameMove"),"aria-label":r("conversation.filePanelRenameMove"),onClick:()=>Xt(),disabled:!yn||m||v,children:n.jsx(La,{})}),n.jsx("button",{className:"file-toolbar-button danger",type:"button",title:r("conversation.filePanelDelete"),"aria-label":r("conversation.filePanelDelete"),onClick:()=>qt(),disabled:!vn||m||v,children:n.jsx(Fa,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelNewFile"),"aria-label":r("conversation.filePanelNewFile"),onClick:()=>void ze("create_file"),disabled:m||v,children:n.jsx(Ra,{})}),n.jsx("button",{className:"file-toolbar-button",type:"button",title:r("conversation.filePanelNewDirectory"),"aria-label":r("conversation.filePanelNewDirectory"),onClick:()=>void ze("create_directory"),disabled:m||v,children:n.jsx(Aa,{})})]}),ae&&typeof document<"u"?Ei.createPortal(n.jsx("div",{className:"file-web-context-menu",ref:$t,role:"menu","aria-label":r("conversation.filePanelActionsMenu"),style:{left:`${(ve==null?void 0:ve.left)??Math.max(8,ae.positionX)}px`,top:`${(ve==null?void 0:ve.top)??Math.max(8,ae.positionY)}px`,maxHeight:ve?`${ve.maxHeight}px`:void 0},children:ae.items.map(e=>n.jsx("button",{className:["file-web-context-menu-item",e.label===r("conversation.filePanelDelete")?"danger":""].filter(Boolean).join(" "),type:"button",role:"menuitem",disabled:e.disabled,onClick:()=>{O(null),e.onSelect()},children:e.label},e.id))}),document.body):null,gn?n.jsx("p",{className:"file-panel-clipboard-status","data-mode":P==null?void 0:P.mode,children:gn}):null,Ge?n.jsxs("form",{className:"file-toolbar-search",onSubmit:e=>void yi(e),children:[n.jsx("input",{value:A,onChange:e=>qe(e.target.value),placeholder:r("conversation.filePanelSearchPlaceholder")}),pn?n.jsx("button",{className:"secondary-button file-mobile-search-submit",type:"submit","aria-label":r("conversation.filePanelSearchButton"),disabled:ht,children:r("conversation.filePanelSearchButton")}):n.jsx("button",{className:"file-toolbar-button",type:"submit",title:r("conversation.filePanelSearchButton"),"aria-label":r("conversation.filePanelSearchButton"),disabled:ht,children:n.jsx(qn,{})})]}):null,n.jsx("div",{ref:ci,className:"file-tree","data-search-mode":oe,"data-scrollbar-autohide":"true",children:Re&&Be.length===0?n.jsx("p",{className:"file-tree-status status-text",children:r("common.loading")}):oe?Ee!=null&&Ee.length?ji(Ee):n.jsx("p",{className:"file-tree-status status-text",children:r("conversation.filePanelSearchEmpty")}):J?bt.length?Yt(bt,0):n.jsx("p",{className:"file-tree-status status-text",children:r("conversation.filePanelNoChanges")}):Be.length?Yt(Be,0):n.jsx("p",{className:"file-tree-status status-text",children:r("conversation.filePanelEmptyDirectory")})}),n.jsx(Ln,{open:w!==null,title:(H==null?void 0:H.title)??"",description:H==null?void 0:H.description,onClose:Gt,children:n.jsxs("form",{className:"workbench-rename-form",onSubmit:e=>void gi(e),children:[n.jsx(Ri,{label:r("conversation.filePanelPathFieldLabel"),htmlFor:un,description:(w==null?void 0:w.mode)==="rename"?w.target.path:(w==null?void 0:w.baseDirectory)||void 0,children:n.jsx("input",{id:un,type:"text",value:Bt??"",placeholder:r("conversation.filePanelPathFieldPlaceholder"),autoFocus:!0,onChange:e=>Ae(e.target.value)})}),n.jsxs(_i,{children:[n.jsx("button",{type:"button",className:"secondary-button",disabled:m,onClick:Gt,children:r("common.cancel")}),n.jsx("button",{type:"submit",className:"primary-button",disabled:m||!(Bt??"").trim(),children:m?(H==null?void 0:H.pendingLabel)??r("common.loading"):(H==null?void 0:H.submitLabel)??r("common.save")})]})]})}),n.jsxs(Ln,{open:B!==null,title:r("conversation.filePanelDeleteConfirmTitle"),description:r("conversation.filePanelDeleteConfirmDescription"),onClose:()=>{m||Fe(null)},children:[n.jsx("p",{className:"workbench-section-empty",children:B!=null&&B.length?B.length===1?((Fn=B[0])==null?void 0:Fn.kind)==="directory"?r("conversation.filePanelDeleteDirectoryConfirm",{path:B[0].path}):r("conversation.filePanelDeleteFileConfirm",{path:B[0].path}):r("conversation.filePanelDeleteSelectionConfirm",{count:B.length}):""}),n.jsxs("div",{className:"workbench-modal-actions",children:[n.jsx("button",{type:"button",className:"secondary-button",disabled:m,onClick:()=>Fe(null),children:r("common.cancel")}),n.jsx("button",{type:"button",className:"secondary-button workbench-danger-button",disabled:m,onClick:()=>{Pi()},children:m?r("conversation.filePanelDeleting"):r("conversation.filePanelDelete")})]})]})]}):it&&i?n.jsx(Yi,{sessionId:i,workspaceId:l,showSystemFiles:I,selectedPath:ge,refreshVersion:sn,onCountChange:At,onSelectFile:ce,onOpenFile:He}):n.jsx("section",{className:"file-panel-section",children:n.jsx("p",{className:"status-text",children:r("conversation.filePanelSessionNoSession")})})]}):n.jsx("section",{className:"file-panel-section",children:n.jsx("p",{className:"status-text",children:r("conversation.filePanelNoWorkspace")})})})}function he(t){return t.includes("/")?t.split("/").slice(0,-1).join("/"):g}function ut(t,i=!1){const l=t.split("/").filter(Boolean),o=i?l.length:l.length-1,h=[];for(let d=0;d<o;d+=1)h.push(l.slice(0,d+1).join("/"));return h}function Hn(t,i){return t||((i==null?void 0:i.kind)==="directory"?i.path:i!=null&&i.path?he(i.path):g)}function zn(t,i){return t?`${t}/${i}`:i}function aa(t){var i;return((i=t.split(/[/\\]/).pop())==null?void 0:i.trim())??""}function z(t,i){return{path:t,kind:i}}function Un(t){return t[t.length-1]??null}function la(t,i){return t.findIndex(o=>o.path===i.path)>=0?t.filter(o=>o.path!==i.path):[...t,i]}function sa(t,i,l){const o=t.findIndex(y=>y.path===l.path);if(o<0)return[l];const h=i?t.findIndex(y=>y.path===i):o;if(h<0)return[l];const d=Math.min(h,o),b=Math.max(h,o);return t.slice(d,b+1)}function Ct(t){return!!(t!=null&&t.ctrlKey||t!=null&&t.metaKey)}function ra(t){return t.ctrlKey||t.metaKey}function oa(t){if(!(t instanceof HTMLElement))return!1;const i=t.tagName.toLowerCase();return i==="input"||i==="textarea"||i==="select"||t.isContentEditable}function jt(t){const i=[...new Map(t.map(o=>[o.path,o])).values()].sort((o,h)=>o.path.localeCompare(h.path)),l=[];for(const o of i)l.some(h=>h.kind==="directory"&&_t(h.path,o.path))||l.push(o);return l}function ca(t,i){return(t==null?void 0:t.kind)==="directory"?t.path:t!=null&&t.path?he(t.path):i}function ua(t,i){let l=t;for(;l&&i.some(o=>o.kind==="directory"&&_t(o.path,l));)l=he(l);return l}function ni(t,i,l,o,h,d){const b=[];for(const y of t){if(b.push(z(y.path,y.kind)),y.kind!=="directory"||!l.includes(y.path))continue;const C=i[y.path]??[],T=o?tn(C,i,h,d):C;b.push(...ni(T,i,l,o,h,d))}return b}function fa(t,i,l){const o=Math.max(0,l.width),h=Math.max(0,l.height),d=Math.max(0,h-ee*2),b=Math.max(0,o-ee*2),y=Math.min(Math.max(i.width,0),b),C=Math.max(0,h-t.y-Pt-ee),T=Math.max(0,t.y-Pt-ee),M=C<i.height&&T>C,me=Qt(Math.max(M?T:C,Ii),0,d),U=Math.min(Math.max(i.height,0),me),pe=M?t.y-Pt-U:t.y+Pt,be=Math.max(ee,h-ee-U),V=Math.max(ee,o-ee-y);return{top:Qt(pe,ee,be),left:Qt(t.x,ee,V),maxHeight:Math.max(0,me)}}function Qt(t,i,l){return!Number.isFinite(t)||l<i?i:Math.min(Math.max(t,i),l)}function Ke(t,i="posix"){return t?ii(t,i):"."}function da(t,i,l){const o=ii(t,l),h=Ke(i,l).replace(/^\.[/\\]?/,"");if(!h)return o;const d=ai(l),b=h.replace(/^[/\\]+/,"");return b?o.endsWith("/")||o.endsWith("\\")?`${o}${b}`:`${o}${d}${b}`:o}function ha(t){return/^[a-zA-Z]:[\\/]/.test(t)||t.includes("\\")?"windows":"posix"}function ii(t,i){return t&&(ai(i)==="\\"?t.replace(/\//g,"\\"):t.replace(/\\/g,"/"))}function ai(t){return t==="windows"?"\\":"/"}function _t(t,i){return i===t||i.startsWith(`${t}/`)}function li(t,i,l){return t===i?l:t.startsWith(`${i}/`)?`${l}${t.slice(i.length)}`:t}function ma(t,i,l){return t.map(o=>({...o,path:li(o.path,i,l)}))}function pa(t){return t.mode==="create_file"?{title:r("conversation.filePanelNewFile"),description:r("conversation.filePanelCreateFileDescription"),submitLabel:r("conversation.filePanelCreateFileSubmit"),pendingLabel:r("conversation.filePanelCreatingFile")}:t.mode==="create_directory"?{title:r("conversation.filePanelNewDirectory"),description:r("conversation.filePanelCreateDirectoryDescription"),submitLabel:r("conversation.filePanelCreateDirectorySubmit"),pendingLabel:r("conversation.filePanelCreatingDirectory")}:{title:r("conversation.filePanelRenameMove"),description:r("conversation.filePanelRenameDescription"),submitLabel:r("conversation.filePanelRenameSubmit"),pendingLabel:r("conversation.filePanelRenaming")}}async function ba(t){const i=await t.arrayBuffer(),l=new Uint8Array(i),o=32768;let h="";for(let d=0;d<l.length;d+=o){const b=l.subarray(d,d+o);h+=String.fromCharCode(...b)}return btoa(h)}function va(t){const i=atob(t),l=new Uint8Array(i.length);for(let o=0;o<i.length;o+=1)l[o]=i.charCodeAt(o);return l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength)}function ya(t,i){if(typeof document>"u")throw new Error(r("conversation.filePanelDownloadFailed"));const l=window.URL.createObjectURL(i),o=document.createElement("a");o.href=l,o.download=t,document.body.append(o),o.click(),o.remove(),window.URL.revokeObjectURL(l)}async function xa(t,i){var l;if(!(i.isDesktop&&(await i.bridge.writeClipboardText(t)).ok)){if(typeof navigator<"u"&&((l=navigator.clipboard)!=null&&l.writeText))try{await navigator.clipboard.writeText(t);return}catch{}if(!ga(t))throw new Error(r("conversation.filePanelCopyPathFailed"))}}function ga(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const i=document.createElement("textarea");i.value=t,i.setAttribute("readonly","true"),i.style.position="fixed",i.style.top="-9999px",i.style.left="-9999px",i.style.opacity="0",document.body.appendChild(i),i.focus(),i.select();try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(i)}}function Pa(t,i){return t&&ut(t,!0).every(h=>h in i)?t:g}function Vn(t,i){if(!i)return[];const l=ut(i,!0);return t.filter(o=>l.includes(o))}function St(t,i,l){const o=ln(i,l);return Object.entries(t).reduce((h,[d,b])=>(o.has(d)&&(h[d]=b),h),{})}function Ca(t,i,l){const h=[...ln(i,l)].filter(d=>d===g||d in t);return h.length?h:[g]}function ln(t,i){const l=new Set([g]),o=si(i,ut(t,!0));for(const h of o){l.add(h);for(const d of ut(h,!0))l.add(d)}return l}function ja(t,i){const l=Object.keys(t),o=Object.keys(i);return l.length!==o.length?!1:l.every(h=>t[h]===i[h])}function kt(t,i){return t.includes(i)?t:[...t,i]}function si(t,i){return i.reduce((l,o)=>kt(l,o),t)}function Kn(t){return`file-panel.workspace-tree.${t}`}function Sa(t,i){return`file-panel.session-change-count.${t}.${i}`}function Gn(t,i){return Object.fromEntries(Object.keys(i).map(l=>[l,t[l]??null]))}function It(t,i){return[...ln(i,t)]}function te(t,i){return t instanceof Yn?t.message:i}function Xn(t){return t instanceof Error&&(t.message.startsWith("FILE_TREE_SNAPSHOT_TIMEOUT:")||t.message.startsWith("FILE_TREE_ABORTED:"))}function wa(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M2.5 4.5h11v2h-11zM2.5 7.5h7v2h-7zM2.5 10.5h4v2h-4z",fill:"currentColor"})})}function Na(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M12.8 5.2A5.5 5.5 0 1 0 13.5 8h-1.8A3.7 3.7 0 1 1 10.6 5l-1.4 1.4h4V2l-1.4 1.4z",fill:"currentColor"})})}function qn(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M11.2 10.1l3 3-1.1 1.1-3-3a5 5 0 1 1 1.1-1.1zM6.8 10.3a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z",fill:"currentColor"})})}function Da(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M3.5 4.3h5.2v1.4H4.9v5.4H3.5zm3.8-2.1h5.2v9.5H7.3z",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M5.7 10.8h4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function Ea(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M5 2.5h7.5v9H5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M3.5 5H2.4V13.5H10V12.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function ka(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M4.2 4.2a1.4 1.4 0 1 1 0 2.8 1.4 1.4 0 0 1 0-2.8zm0 5.4a1.4 1.4 0 1 1 0 2.8 1.4 1.4 0 0 1 0-2.8zm1-3.2 6.6 5.6M5.2 9.6l6.6-5.6",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})})}function Ma(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M4 3.5h8v10H4zM6 2.2h4v2H6z",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M6 7.2h4M6 9.6h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function Ra(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M4 1.5h5l3 3v10H4z",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M9 1.5v3h3",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M8 6.5v5M5.5 9h5",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function _a(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M3 11.5v2h10v-2",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M8 2.5v8",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"m5.5 5 2.5-2.5L10.5 5",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ta(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M3 11.5v2h10v-2",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M8 2.5v8",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"m5.5 8.5 2.5 2.5 2.5-2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Fa(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M3.5 4.5h9M6.2 2.5h3.6l.6 1.4H13v1.2H3V3.9h2.6zM5.2 5.7v6.1m2.8-6.1v6.1m2.8-6.1v6.1M4.4 13.5h7.2",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Aa(){return n.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[n.jsx("path",{d:"M1.8 4.5h4l1.2 1.3h7.2v6.7H1.8z",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),n.jsx("path",{d:"M8.5 7.2v4M6.5 9.2h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function La(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M3.2 11.9h2.2l5.9-5.9-2.2-2.2-5.9 5.9zM8.3 3.8l2.2 2.2M2.8 13.2h10.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ba(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"m4 6 4 4 4-4",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function Wa(){return n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M1.5 2h13l-5 6v5l-3 1.5V8z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function tn(t,i,l,o){const h=[];for(const d of t){const b=d.path.replace(/\\/g,"/");d.kind==="file"?l.has(b)&&h.push(d):ri(b,i,l,o)&&h.push(d)}return h}function ri(t,i,l,o,h){const d=h??new Set;if(d.has(t))return!1;d.add(t);const b=i[t];if(!b)return o.has(t);for(const y of b){const C=y.path.replace(/\\/g,"/");if(y.kind==="file"){if(l.has(C))return!0}else if(ri(C,i,l,o,d))return!0}return!1}export{qa as FileContextPanel};
|