auto-coder-web 0.1.105__tar.gz → 0.1.107__tar.gz
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.
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/PKG-INFO +2 -2
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/commit_router.py +1 -3
- auto_coder_web-0.1.107/src/auto_coder_web/version.py +1 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/main.js +1 -1
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web.egg-info/PKG-INFO +2 -2
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web.egg-info/requires.txt +1 -1
- auto_coder_web-0.1.105/src/auto_coder_web/version.py +0 -1
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/README.md +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/setup.cfg +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/setup.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/__init__.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/agentic_message_parser/__init__.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/agentic_message_parser/message_parser.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/agentic_message_parser/tool_parsers.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/auto_coder_runner_wrapper.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/__init__.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/active_context_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/auto_coder_conf_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/chat_list_manager.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/chat_list_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/chat_session_manager.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/compiler_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/completions_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/file_group_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/file_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/filecacher.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/model_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/expert_routers/__init__.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/expert_routers/history_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/file_manager.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/init_project.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/json_file_storage.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/lang.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/proxy.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/__init__.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/auto_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/chat_panels_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/chat_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/code_editor_tabs_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/coding_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/config_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/direct_chat_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/editable_preview_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/file_command_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/index_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/mcp_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/rag_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/rules_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/settings_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/todo_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/upload_router.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/terminal.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/types.py +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/HistoryPanel-gJupyfFp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/_basePickBy-CCSZj2pA.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/_baseUniq-BTllNErT.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/abap-BrgZPUOV.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/apex-DyP6w7ZV.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/arc-BXjHXofo.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/architectureDiagram-IEHRJDOE-DmIqWpdi.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/azcli-BaLxmfj-.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/bat-CFOPXBzS.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/bicep-BfEKNvv3.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/blockDiagram-JOT3LUYC-DtACHz1R.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/c4Diagram-VJAJSXHY-D3eQI0f_.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/cameligo-BFG1Mk7z.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/channel-C4EINljX.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/chunk-4BMEZGHF-Ckc43zxH.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/chunk-A2AXSNBT-CJ57iCVC.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/chunk-AEK57VVT-o_ViTLZT.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/chunk-D6G4REZN-2ayrGi-2.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/chunk-RZ5BOZE2-csKhWZPs.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/chunk-XZIHB7SX-G4BVkcV4.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/classDiagram-GIVACNV2-DP0khH1f.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/classDiagram-v2-COTLJTTW-DP0khH1f.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/clojure-DTECt2xU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/clone-Bg4iLekk.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/codicon-DCmgc-ay.ttf +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/coffee-CDGzqUPQ.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/cpp-CLLBncYj.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/csharp-dUCx_-0o.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/csp-5Rap-vPy.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/css-D3h14YRZ.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/cssMode-BPyr8lmu.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/cypher-DrQuvNYM.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/cytoscape.esm-BY7v1xhs.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/dagre-OKDRZEBW-CCuMXe_S.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/dart-CFKIUWau.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/diagram-SSKATNLV-Bp-uorEf.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/diagram-VNBRO52H-CKQFD3a_.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/dockerfile-Zznr-cwX.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/ecl-Ce3n6wWz.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/elixir-deUWdS0T.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/erDiagram-Q7BY3M3F-9eI0zHpI.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/flow9-i9-g7ZhI.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/flowDiagram-4HSFHLVR-3RcC2Ccp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/freemarker2-BU5Z-fJI.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/fsharp-CzKuDChf.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/ganttDiagram-APWFNJXF-D2cSA1Cd.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/gitGraphDiagram-7IBYFJ6S-D_9htwjS.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/go-Cphgjts3.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/graph-cCt1e4eU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/graphql-Cg7bfA9N.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/handlebars-mkin9J8g.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/hcl-0cvrggvQ.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/html-DtBbZIcO.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/htmlMode-RbI6rOrZ.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/infoDiagram-PH2N3AL5-BYP4b-4i.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/ini-Drc7WvVn.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/init-Gi6I4Gst.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/java-B_fMsGYe.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/javascript-f2lALfl-.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/journeyDiagram-U35MCT3I-B89eezTp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/jsonMode-D_iny90a.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/julia-Bqgm2twL.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/kanban-definition-NDS4AKOZ-DXZ3QE3M.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/katex-ChWnQ-fc.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/kotlin-BSkB5QuD.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/layout-DEspB-Nn.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/less-BsTHnhdd.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/lexon-YWi4-JPR.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/linear-DvyAnBDb.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/liquid-BLUt9KkL.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/lua-nf6ki56Z.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/m3-Cpb6xl2v.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/main-BPF_xhU6.css +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/markdown-DSZPf7rp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/mdx-CiikeQLk.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/mindmap-definition-ALO5MXBD-BK4Kd7cQ.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/mips-B_c3zf-v.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/msdax-rUNN04Wq.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/mysql-DDwshQtU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/objective-c-B5zXfXm9.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/ordinal-Cboi1Yqb.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/pascal-CXOwvkN_.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/pascaligo-Bc-ZgV77.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/perl-CwNk8-XU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/pgsql-tGk8EFnU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/php-CpIb_Oan.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/pieDiagram-IB7DONF6-UuIn9g8t.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/pla-B03wrqEc.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/postiats-BKlk5iyT.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/powerquery-Bhzvs7bI.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/powershell-Dd3NCNK9.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/protobuf-COyEY5Pt.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/pug-BaJupSGV.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/python-BQGAmGD2.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/qsharp-DXyYeYxl.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/quadrantDiagram-7GDLP6J5-DdkeEcG5.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/r-CdQndTaG.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/radar-MK3ICKWK-Bzl6RmHe.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/razor-CMmYJAVf.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/redis-CVwtpugi.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/redshift-25W9uPmb.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/requirementDiagram-KVF5MWMF-DYvXHPCT.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/restructuredtext-DfzH4Xui.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/ruby-Cp1zYvxS.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/rust-D5C2fndG.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/sankeyDiagram-QLVOVGJD-C3fiDKw0.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/sb-CDntyWJ8.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/scala-BoFRg7Ot.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/scheme-Bio4gycK.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/scss-4Ik7cdeQ.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/sequenceDiagram-X6HHIX6F-CifpUH-p.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/shell-CX-rkNHf.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/solidity-Tw7wswEv.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/sophia-C5WLch3f.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/sparql-DHaeiCBh.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/sql-CCSDG5nI.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/st-pnP8ivHi.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/stateDiagram-DGXRK772-x-pqGGcU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/stateDiagram-v2-YXO3MK2T-BhO6ozG8.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/swift-DwJ7jVG9.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/systemverilog-B9Xyijhd.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/tcl-DnHyzjbg.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/timeline-definition-BDJGKUSR-BmbgmEKE.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/tsMode-LqKHR7gR.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/twig-CPajHgWi.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/typescript-KnQ9Sglt.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/typespec-D-MeaMDU.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/vb-DgyLZaXg.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/wgsl-BIv9DU6q.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/xml-G2dyiWZM.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/xychartDiagram-VJFVF3MP-DnV9OlaB.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/yaml-D_70BM1U.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/bridge.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/favicon.ico +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/index.html +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/logo192.png +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/logo512.png +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/manifest.json +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/base/worker/workerMain.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/abap/abap.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/apex/apex.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/azcli/azcli.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/bat/bat.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/bicep/bicep.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/cameligo/cameligo.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/clojure/clojure.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/coffee/coffee.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/cpp/cpp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/csharp/csharp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/csp/csp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/css/css.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/cypher/cypher.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/dart/dart.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/ecl/ecl.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/elixir/elixir.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/flow9/flow9.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/freemarker2/freemarker2.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/go/go.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/graphql/graphql.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/hcl/hcl.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/html/html.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/ini/ini.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/java/java.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/javascript/javascript.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/julia/julia.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/less/less.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/lexon/lexon.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/liquid/liquid.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/lua/lua.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/m3/m3.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/markdown/markdown.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/mdx/mdx.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/mips/mips.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/msdax/msdax.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/mysql/mysql.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/objective-c/objective-c.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/pascal/pascal.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/pascaligo/pascaligo.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/perl/perl.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/pgsql/pgsql.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/php/php.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/pla/pla.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/postiats/postiats.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/powershell/powershell.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/protobuf/protobuf.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/pug/pug.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/python/python.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/qsharp/qsharp.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/r/r.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/razor/razor.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/redis/redis.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/redshift/redshift.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/ruby/ruby.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/rust/rust.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/sb/sb.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/scala/scala.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/scheme/scheme.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/scss/scss.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/shell/shell.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/solidity/solidity.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/sophia/sophia.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/sparql/sparql.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/sql/sql.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/st/st.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/swift/swift.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/systemverilog/systemverilog.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/tcl/tcl.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/twig/twig.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/typescript/typescript.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/typespec/typespec.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/vb/vb.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/wgsl/wgsl.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/xml/xml.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/basic-languages/yaml/yaml.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/editor/editor.main.css +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/editor/editor.main.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/css/cssMode.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/css/cssWorker.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/html/htmlMode.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/html/htmlWorker.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/json/jsonMode.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/json/jsonWorker.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/typescript/tsMode.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/language/typescript/tsWorker.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/loader.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.de.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.es.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.fr.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.it.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.ja.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.ko.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.ru.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.zh-cn.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/monaco-editor/min/vs/nls.messages.zh-tw.js +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/robots.txt +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/sounds/ding-dong.wav +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/sounds/gentle-notification.wav +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/sounds/soft-chime.wav +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web.egg-info/SOURCES.txt +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web.egg-info/dependency_links.txt +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web.egg-info/entry_points.txt +0 -0
- {auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web.egg-info/top_level.txt +0 -0
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: auto_coder_web
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.107
|
4
4
|
Summary: auto-coder.web: A Python Project
|
5
5
|
Author: allwefantasy
|
6
6
|
Classifier: Programming Language :: Python :: 3.10
|
7
7
|
Classifier: Programming Language :: Python :: 3.11
|
8
8
|
Classifier: Programming Language :: Python :: 3.12
|
9
9
|
Description-Content-Type: text/markdown
|
10
|
-
Requires-Dist: auto-coder>=0.1.
|
10
|
+
Requires-Dist: auto-coder>=0.1.375
|
11
11
|
Requires-Dist: aiofiles
|
12
12
|
Requires-Dist: psutil
|
13
13
|
Requires-Dist: watchdog
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/commit_router.py
RENAMED
@@ -412,7 +412,7 @@ def get_file_status_from_diff(diff_item) -> str:
|
|
412
412
|
diff_item: Git diff对象
|
413
413
|
|
414
414
|
Returns:
|
415
|
-
文件状态: added(新增), deleted(删除), renamed(重命名)
|
415
|
+
文件状态: added(新增), deleted(删除), renamed(重命名) 或 modified(修改)
|
416
416
|
"""
|
417
417
|
if diff_item.new_file:
|
418
418
|
return "added"
|
@@ -420,8 +420,6 @@ def get_file_status_from_diff(diff_item) -> str:
|
|
420
420
|
return "deleted"
|
421
421
|
elif diff_item.renamed:
|
422
422
|
return "renamed"
|
423
|
-
elif diff_item.copied:
|
424
|
-
return "copied"
|
425
423
|
else:
|
426
424
|
return "modified"
|
427
425
|
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.107"
|
@@ -1536,7 +1536,7 @@ ${e.toString()}`}}class F7{constructor(e=new jI,t=!1,i,r=wkn){this._services=e,t
|
|
1536
1536
|
border: 1px solid rgba(73, 156, 255, 0.4);
|
1537
1537
|
}
|
1538
1538
|
`,AHn=({isMaximized:n,onEditorDidMount:e,defaultValue:t="",onToggleMaximize:i,onMentionClick:r,panelId:s,isActive:o=!0})=>{const a=ke.useRef(null),l=ke.useRef(null),c=ke.useRef([]),u=ke.useRef([]);ke.useCallback(p=>{Bn.publish(Mn.CHAT.SEND_MESSAGE,new tH(p,s))},[s]);const d=ke.useCallback(()=>{if(!a.current)return;const p=c.current.map(A=>({range:A.range,options:{inlineClassName:"monaco-mention",hoverMessage:{value:`**${A.type==="file"?"文件":"符号"}**: ${A.path}`},stickiness:Urt.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges}}));u.current=a.current.deltaDecorations(u.current,p),c.current.forEach((A,v)=>{A.decorationId=u.current[v]}),Bn.publish(Mn.EDITOR.MENTIONS_CHANGED,new eon(c.current.map(A=>({type:A.type,text:A.text,path:A.path,item:A.item})),s))},[s]),h=ke.useCallback(()=>{if(!a.current)return;const p=a.current.getModel(),A=c.current.filter(v=>{const _=p.getValueInRange(v.range);return _.startsWith("@")&&_.includes(v.text)});c.current=A,d()},[d]),f=ke.useCallback((p,A,v,_,y)=>{const w={id:`mention-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,range:p,type:A,text:v,path:_,item:y};return c.current.push(w),d(),w},[d]);ke.useEffect(()=>{const p=document.createElement("style");p.textContent=mHn,document.head.appendChild(p);const A=Bn.subscribe(Mn.EDITOR.FOCUS,()=>{a.current&&a.current.focus()}),v=w=>{w.preventDefault(),w.stopPropagation(),l.current&&l.current.classList.add("drag-over")},_=w=>{w.preventDefault(),w.stopPropagation(),l.current&&l.current.classList.remove("drag-over")},y=async w=>{if(w.preventDefault(),w.stopPropagation(),l.current&&l.current.classList.remove("drag-over"),w.dataTransfer&&w.dataTransfer.files.length>0){const E=w.dataTransfer.files[0];E.type.startsWith("image/")&&await g(E)}},C=async w=>{var E;if(!(document.activeElement!==l.current&&!((E=l.current)!=null&&E.contains(document.activeElement)))&&w.clipboardData&&w.clipboardData.items){const k=w.clipboardData.items;for(let I=0;I<k.length;I++)if(k[I].type.indexOf("image")!==-1){w.preventDefault();const T=k[I].getAsFile();if(T){await g(T);break}}}};return l.current&&(l.current.addEventListener("dragover",v),l.current.addEventListener("dragleave",_),l.current.addEventListener("drop",y)),document.addEventListener("paste",C),()=>{document.head.removeChild(p),A(),l.current&&(l.current.removeEventListener("dragover",v),l.current.removeEventListener("dragleave",_),l.current.removeEventListener("drop",y)),document.removeEventListener("paste",C)}},[]),ke.useEffect(()=>{const p=v=>{!o||v.panelId&&v.panelId!==s||Bn.publish(Mn.FILE_GROUP_SELECT.FOCUS,new non(s))},A=Bn.subscribe(Mn.HOTKEY.FOCUS_FILE_GROUP,p);return()=>{A()}},[o,s]),ke.useEffect(()=>{const p=v=>{!o||v.panelId&&v.panelId!==s||Bn.publish(Mn.CHAT.NEW_CHAT,new uBe(s))},A=Bn.subscribe(Mn.HOTKEY.NEW_CHAT,p);return()=>{A()}},[o,s]);const g=async p=>{try{const A=a.current;if(A){const v=A.getPosition(),_=A.executeEdits("",[{range:new TD(v.lineNumber,v.column,v.lineNumber,v.column),text:"![上传中...]() ",forceMoveMarkers:!0}]),y=await ihn(p);if(y.success){const C=A.getPosition(),E=A.getModel().getValue(),k=E.indexOf("![上传中...]()");if(k!==-1){let I=1,T=1;for(let D=0;D<k;D++)E[D]===`
|
1539
|
-
`?(I++,T=1):T++;A.executeEdits("",[{range:new TD(I,T,I,T+11),text:`<_image_>${y.path}</_image_>`,forceMoveMarkers:!0}])}else A.executeEdits("",[{range:new TD(C.lineNumber,C.column,C.lineNumber,C.column),text:`<_image_>${y.path}</_image_>`,forceMoveMarkers:!0}])}else console.error("Image upload failed:",y)}}catch(A){console.error("Image upload failed:",A);const v=a.current;if(v){const _=v.getPosition();v.executeEdits("",[{range:new TD(_.lineNumber,_.column,_.lineNumber,_.column),text:" [图片上传失败] ",forceMoveMarkers:!0}])}}},m=(p,A)=>{a.current=p;const v=_=>{if(navigator.platform.indexOf("Mac")===0?_.metaKey:_.ctrlKey)switch(_.code){case"Enter":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.CHAT.SEND_MESSAGE,new tH("",s)),!1;case"Period":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.UI.TOGGLE_WRITE_MODE,new ron(s||"main")),!1;case"KeyI":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.HOTKEY.FOCUS_FILE_GROUP,new PA(s||"main")),!1;case"KeyL":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.UI.TOGGLE_INPUT_FULLSCREEN,new ton(s||"main")),!1;case"Slash":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.CHAT.NEW_CHAT,new uBe(s||"main")),!1}return!0};p.onKeyDown(v),p.addAction({id:"upload-image",label:"Upload Image",contextMenuGroupId:"navigation",contextMenuOrder:1.5,run:()=>{const _=document.createElement("input");_.type="file",_.accept="image/*",_.onchange=y=>{const C=y.target.files[0];C&&g(C)},_.click()}}),e(p,A),p.onDidPaste(()=>{setTimeout(()=>{const _=navigator.clipboard&&navigator.clipboard.read?navigator.clipboard.read().catch(()=>null):null;_&&_.then(y=>{if(y){for(const C of y)if(C.types&&C.types.some(w=>w.startsWith("image/"))){const w=C.types.find(E=>E.startsWith("image/"));w&&C.getType(w).then(E=>{const k=new File([E],"pasted-image.png",{type:w});g(k)}).catch(E=>console.error("获取图片失败:",E))}}}).catch(y=>console.error("读取剪贴板失败:",y))},0)}),A.editor.registerCommand("editor.acceptedCompletion",function(..._){const y=a.current;if(!y)return null;const[,...C]=_;let w,E,k,I;if(C.length>=3)w=C[0],E=C[1],k=C[2],I=C[3]||{};else return console.warn("Insufficient arguments for mention completion"),null;const T=y.getPosition(),O=y.getModel().getLineContent(T.lineNumber);let R=T.column-1;for(;R>0&&O.charAt(R-1)!=="@";)R--;const M=new A.Range(T.lineNumber,R,T.lineNumber,T.column);return f(M,k,w,E,I),null}),p.onMouseDown(_=>{if(_.target.type===A.editor.MouseTargetType.CONTENT_TEXT){const y=_.target.position;for(const C of c.current)if(C.range.containsPosition(y)){r&&r(C.type,C.text,C.item);break}}}),p.onDidChangeModelContent(()=>{h()}),H$e||(A.languages.registerCompletionItemProvider("markdown",{triggerCharacters:["@"],provideCompletionItems:async(_,y)=>{const w=_.getLineContent(y.lineNumber).substring(0,y.column-1),E=w.lastIndexOf("@");let k="";E!==-1&&(k=w.substring(E+1)),console.log("提取的查询:",k,"原始文本:",w);const[I,T]=await Promise.all([fetch(`/api/completions/files?name=${encodeURIComponent(k)}`),fetch(`/api/completions/symbols?name=${encodeURIComponent(k)}`)]),[D,O]=await Promise.all([I.json(),T.json()]),R=D.completions.map(F=>{const j={...F,mentionType:"file"};return{label:F.name,kind:A.languages.CompletionItemKind.File,insertText:F.name,detail:"文件",documentation:`路径: ${F.location||F.path}`,command:{id:"editor.acceptedCompletion",title:"选择完成",arguments:[F.name,F.path,"file",j]},insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),M=O.completions.map(F=>{const j={...F,mentionType:"symbol"};return{label:`${F.name}(${F.path})`,kind:A.languages.CompletionItemKind.Function,insertText:`${F.name}(${F.path})`,detail:"符号",documentation:`位置: ${F.path}`,command:{id:"editor.acceptedCompletion",title:"选择完成",arguments:[F.name,F.path,"symbol",j]},insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),P=new Map;return[...R,...M].forEach(F=>{const j=`${F.label}-${F.detail}`;P.has(j)||P.set(j,F)}),{suggestions:Array.from(P.values()),incomplete:!0}}}),H$e=!0,console.log("Completion provider registered successfully"))};return S.jsx("div",{className:"w-full relative h-full flex flex-col",children:S.jsx("div",{ref:l,className:`editor-container w-full border border-gray-700 rounded-md overflow-hidden ${n?"h-full flex-grow":"h-[80px]"}`,style:{width:"100%"},children:S.jsx(_h,{height:"100%",defaultLanguage:"markdown",defaultValue:t,theme:"vs-dark",onMount:m,loading:S.jsx("div",{className:"flex items-center justify-center h-full",children:"加载编辑器中..."}),beforeMount:p=>{window.MonacoEnvironment={getWorkerUrl:(A,v)=>"/monaco-editor/min/vs/base/worker/workerMain.js"}},options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on",lineNumbers:"off",folding:!1,contextmenu:!1,fontFamily:"monospace",fontSize:14,lineHeight:1.5,padding:{top:8,bottom:8},suggestOnTriggerCharacters:!0,quickSuggestions:!1,acceptSuggestionOnEnter:"smart",overviewRulerLanes:0,overviewRulerBorder:!1,fixedOverflowWidgets:!0,quickSuggestionsDelay:100,tabCompletion:"off",find:{addExtraSpaceOnTop:!1},links:!1,readOnly:!1,suggest:{insertMode:"replace",snippetsPreventQuickSuggestions:!0}}})})})};class Fat extends US.EventEmitter{constructor(e){super(),this.eventSource=null,this.streamEvents=new Map,this.lastEventType=null,this.messageId=0,this.currentStreamMessageId=null,this.isStreamingActive=!1,this.eventFileId=null,this.panelId=e}async executeCommand(e){try{const t=await fetch("/api/chat-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e,panel_id:this.panelId})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const i=await t.json();return this.eventFileId=i.event_file_id,this.startEventStream(),{event_file_id:i.event_file_id}}catch(t){throw console.error("Error executing chat command:",t),t}}startEventStream(){if(this.closeEventStream(),!this.eventFileId){console.error("No event file ID available");return}this.eventSource=new EventSource(`/api/chat-command/events?event_file_id=${this.eventFileId}`),this.eventSource.onmessage=e=>{try{const t=JSON.parse(e.data);this.handleEvent(t)}catch(t){console.error("Error parsing event data:",t)}},this.eventSource.onerror=e=>{console.error("EventSource error:",e),this.closeEventStream()}}handleEvent(e){console.log("ChatService: Received event:",e.event_type);let t;const i=Date.now(),r=Kk();switch(e.event_type==="STREAM"?this.lastEventType!=="STREAM"?(t=`chat-${r}-${i}-${this.messageId++}`,this.currentStreamMessageId=t):t=this.currentStreamMessageId||`chat-${r}-${i}-${this.messageId++}`:(t=`chat-${r}-${i}-${this.messageId++}`,this.lastEventType==="STREAM"&&this.currentStreamMessageId&&this.finalizeStreamMessage(this.currentStreamMessageId),this.currentStreamMessageId=null),e.event_type){case"STREAM":this.handleStreamEvent(e,t);break;case"RESULT":this.handleResultEvent(e,t);break;case"ASK_USER":this.handleAskUserEvent(e,t);break;case"USER_RESPONSE":this.handleUserResponseEvent(e,t);break;case"ERROR":this.handleErrorEvent(e,t);break;case"COMPLETION":this.handleCompletionEvent(e,t);break;default:console.warn("Unknown event type:",e.event_type)}this.lastEventType=e.event_type}handleStreamEvent(e,t){const i=e.content;this.isStreamingActive=!0;let r=this.streamEvents.get(t);if(r)r.content+=i.content,r.isThinking=i.is_thinking,r.isStreaming=!0,i.state==="complete"?(r.isStreaming=!1,this.streamEvents.delete(t),console.log("ChatService: Emitting existing message:",r.type,r.id),this.emit("message",r),this.isStreamingActive=!1):(this.streamEvents.set(t,r),console.log("ChatService: Emitting existing message:",r.type,r.id),this.emit("message",r));else{const s={id:t,type:e.event_type,content:i.content,contentType:i.content_type,isThinking:i.is_thinking,isStreaming:!0,eventId:e.event_id,language:i.language,metadata:e.metadata};i.state!=="complete"?this.streamEvents.set(t,s):(s.isStreaming=!1,this.isStreamingActive=!1),console.log("ChatService: Emitting message:",s.type,s.id),this.emit("message",s)}}handleResultEvent(e,t){const i=e.content;let r,s=i.content_type,o={...i.metadata,...e.metadata};typeof i.content=="string"?r=i.content:this.isTokenStatContent(i.content)?(s="token_stat",r=JSON.stringify(i.content),o={...o,model_name:i.content.model_name,elapsed_time:i.content.elapsed_time,first_token_time:i.content.first_token_time,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost,speed:i.content.speed}):this.isSummaryContent(i.content)?(s="summary",r=i.content.summary):this.isIndexBuildStartContent(i.content)?(s="index_build_start",r=`Processing files: ${i.content.file_number}/${i.content.total_files}`,o={...o,file_number:i.content.file_number,total_files:i.content.total_files}):this.isIndexBuildEndContent(i.content)?(s="index_build_end",r=`Index build completed: Updated ${i.content.updated_files} files, Removed ${i.content.removed_files} files`,o={...o,updated_files:i.content.updated_files,removed_files:i.content.removed_files,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost}):this.isCommandPrepareStatContent(i.content)?(s="command_prepare_stat",r=`Command: ${i.content.command}`,o={...o,command:i.content.command,parameters:i.content.parameters}):this.isCommandExecuteStatContent(i.content)?(s="command_execute_stat",r=i.content.content,o={...o,command:i.content.command}):this.isContextUsedContent(i.content)?(s="context_used",r=i.content.description,o={...o,files:i.content.files}):r=JSON.stringify(i.content);const a={id:t,type:e.event_type,content:r,contentType:s,metadata:o,eventId:e.event_id};this.emit("message",a)}isTokenStatContent(e){return e&&typeof e.model_name=="string"&&typeof e.elapsed_time=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isCommandPrepareStatContent(e){return e&&typeof e.command=="string"&&typeof e.parameters=="object"}isSummaryContent(e){return e&&typeof e.summary=="string"}isCommandExecuteStatContent(e){return e&&typeof e.command=="string"&&typeof e.content=="string"}isIndexBuildStartContent(e){return e&&typeof e.file_number=="number"&&typeof e.total_files=="number"}isIndexBuildEndContent(e){return e&&typeof e.updated_files=="number"&&typeof e.removed_files=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isContextUsedContent(e){return e&&Array.isArray(e.files)&&typeof e.title=="string"&&typeof e.description=="string"}handleAskUserEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.prompt,options:i.options,responseRequired:i.required,eventId:e.event_id};this.emit("message",r)}handleUserResponseEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.response,isUser:!0,eventId:e.event_id,responseTo:e.response_to};this.emit("message",r)}handleErrorEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.error_message,metadata:i.details,eventId:e.event_id};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!0)},300)}handleCompletionEvent(e,t){const i=e.content,r=i.result&&typeof i.result=="object"&&"summary"in i.result?i.result.summary:null,s={id:t,type:e.event_type,content:r||i.success_message,eventId:e.event_id,metadata:{success_code:i.success_code,completion_time:i.completion_time,details:i.details,result:i.result}};this.emit("message",s),setTimeout(()=>{this.emit("taskComplete",!1)},300)}finalizeStreamMessage(e){const t=this.streamEvents.get(e);t&&(t.isStreaming=!1,console.log("ChatService: Emitting message:",t.type,t.id),this.emit("message",t),this.streamEvents.delete(e))}closeEventStream(){this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.streamEvents.forEach((e,t)=>{this.finalizeStreamMessage(t)}),this.streamEvents.clear(),this.lastEventType=null,this.currentStreamMessageId=null,this.isStreamingActive=!1}async respondToEvent(e,t){if(!this.eventFileId)throw new Error("No event file ID available");try{const i=await fetch("/api/chat-command/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:e,event_file_id:this.eventFileId,response:t})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`)}catch(i){throw console.error("Error sending response:",i),i}}async saveTaskHistory(e,t,i="completed"){if(!this.eventFileId){console.warn("No event file ID available, cannot save task history");return}try{const r=t.filter(o=>!(o.type==="SYSTEM"||!o.content||o.contentType==="token_stat")),s=await fetch("/api/chat-command/save-history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,event_file_id:this.eventFileId,messages:r,status:i,timestamp:Date.now()})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`)}catch(r){console.error("Error saving task history:",r)}}async cancelTask(){if(!this.eventFileId){console.warn("No event file ID available, cannot cancel task");return}try{const e=await fetch("/api/chat-command/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_file_id:this.eventFileId})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);this.closeEventStream()}catch(e){throw console.error("Error cancelling task:",e),e}}}const vHn=new Fat;class $at extends US.EventEmitter{constructor(e){super(),this.eventSource=null,this.streamEvents=new Map,this.lastEventType=null,this.messageId=0,this.currentStreamMessageId=null,this.isStreamingActive=!1,this.eventFileId=null,this.panelId=e}async executeCommand(e){try{const t=await fetch("/api/coding-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e,panel_id:this.panelId})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const i=await t.json();return this.eventFileId=i.event_file_id,this.startEventStream(),{event_file_id:i.event_file_id}}catch(t){throw console.error("Error executing coding command:",t),t}}startEventStream(){if(this.closeEventStream(),!this.eventFileId){console.error("No event file ID available");return}this.eventSource=new EventSource(`/api/coding-command/events?event_file_id=${this.eventFileId}`),this.eventSource.onmessage=e=>{try{const t=JSON.parse(e.data);this.handleEvent(t)}catch(t){console.error("Error parsing event data:",t)}},this.eventSource.onerror=e=>{console.error("EventSource error:",e),this.closeEventStream()}}handleEvent(e){let t;const i=Date.now(),r=Kk();switch(e.event_type==="STREAM"?this.lastEventType!=="STREAM"?(t=`coding-${r}-${i}-${this.messageId++}`,this.currentStreamMessageId=t):t=this.currentStreamMessageId||`coding-${r}-${i}-${this.messageId++}`:(t=`coding-${r}-${i}-${this.messageId++}`,this.lastEventType==="STREAM"&&this.currentStreamMessageId&&this.finalizeStreamMessage(this.currentStreamMessageId),this.currentStreamMessageId=null),e.event_type){case"STREAM":this.handleStreamEvent(e,t);break;case"RESULT":this.handleResultEvent(e,t);break;case"ASK_USER":this.handleAskUserEvent(e,t);break;case"USER_RESPONSE":this.handleUserResponseEvent(e,t);break;case"ERROR":this.handleErrorEvent(e,t);break;case"COMPLETION":this.handleCompletionEvent(e,t);break;default:console.warn("Unknown event type:",e.event_type)}this.lastEventType=e.event_type}handleStreamEvent(e,t){const i=e.content;this.isStreamingActive=!0;let r=this.streamEvents.get(t);if(r)r.content+=i.content,r.isThinking=i.is_thinking,r.isStreaming=!0,i.state==="complete"?(r.isStreaming=!1,this.streamEvents.delete(t),this.emit("message",r),this.isStreamingActive=!1):(this.streamEvents.set(t,r),this.emit("message",r));else{const s={id:t,type:e.event_type,content:i.content,contentType:i.content_type,isThinking:i.is_thinking,isStreaming:!0,eventId:e.event_id,language:i.language,metadata:e.metadata};i.state!=="complete"?this.streamEvents.set(t,s):(s.isStreaming=!1,this.isStreamingActive=!1),this.emit("message",s)}}handleResultEvent(e,t){const i=e.content;console.log("原始消息",e);let r,s=i.content_type,o={...i.metadata,...e.metadata};typeof i.content=="string"?r=i.content:this.isTokenStatContent(i.content)?(s="token_stat",r=JSON.stringify(i.content),o={...o,model_name:i.content.model_name,elapsed_time:i.content.elapsed_time,first_token_time:i.content.first_token_time,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost,speed:i.content.speed}):this.isSummaryContent(i.content)?(s="summary",r=i.content.summary):this.isIndexBuildStartContent(i.content)?(s="index_build_start",r=`Processing files: ${i.content.file_number}/${i.content.total_files}`,o={...o,file_number:i.content.file_number,total_files:i.content.total_files}):this.isIndexBuildEndContent(i.content)?(s="index_build_end",r=`Index build completed: Updated ${i.content.updated_files} files, Removed ${i.content.removed_files} files`,o={...o,updated_files:i.content.updated_files,removed_files:i.content.removed_files,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost}):this.isCommandPrepareStatContent(i.content)?(s="command_prepare_stat",r=`Command: ${i.content.command}`,o={...o,command:i.content.command,parameters:i.content.parameters}):this.isCommandExecuteStatContent(i.content)?(s="command_execute_stat",r=i.content.content,o={...o,command:i.content.command}):this.isContextUsedContent(i.content)?(s="context_used",r=i.content.description,o={...o,files:i.content.files}):r=JSON.stringify(i.content);const a={id:t,type:e.event_type,content:r,contentType:s,metadata:o,eventId:e.event_id};console.log("处理过后的",a),this.emit("message",a)}isTokenStatContent(e){return e&&typeof e.model_name=="string"&&typeof e.elapsed_time=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isCommandPrepareStatContent(e){return e&&typeof e.command=="string"&&typeof e.parameters=="object"}isSummaryContent(e){return e&&typeof e.summary=="string"}isCommandExecuteStatContent(e){return e&&typeof e.command=="string"&&typeof e.content=="string"}isIndexBuildStartContent(e){return e&&typeof e.file_number=="number"&&typeof e.total_files=="number"}isIndexBuildEndContent(e){return e&&typeof e.updated_files=="number"&&typeof e.removed_files=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isContextUsedContent(e){return e&&Array.isArray(e.files)&&typeof e.title=="string"&&typeof e.description=="string"}handleAskUserEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.prompt,options:i.options,responseRequired:i.required,eventId:e.event_id};this.emit("message",r)}handleUserResponseEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.response,isUser:!0,eventId:e.event_id,responseTo:e.response_to};this.emit("message",r)}handleErrorEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.error_message,metadata:i.details,eventId:e.event_id};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!0),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!1,event_file_id:this.eventFileId})},300)}handleCompletionEvent(e,t){const i=e.content,r=i.result&&typeof i.result=="object"&&"summary"in i.result?i.result.summary:null,s={id:t,type:e.event_type,content:r||i.success_message,eventId:e.event_id,metadata:{success_code:i.success_code,completion_time:i.completion_time,details:i.details,result:i.result,isWrite:!0}};this.emit("message",s),setTimeout(()=>{this.emit("taskComplete",!1),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!0,event_file_id:this.eventFileId})},300)}finalizeStreamMessage(e){const t=this.streamEvents.get(e);t&&(t.isStreaming=!1,this.emit("message",t),this.streamEvents.delete(e))}closeEventStream(){this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.streamEvents.forEach((e,t)=>{this.finalizeStreamMessage(t)}),this.streamEvents.clear(),this.lastEventType=null,this.currentStreamMessageId=null,this.isStreamingActive=!1}async respondToEvent(e,t){if(!this.eventFileId)throw new Error("No event file ID available");try{const i=await fetch("/api/coding-command/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:e,event_file_id:this.eventFileId,response:t})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`)}catch(i){throw console.error("Error sending response:",i),i}}async saveTaskHistory(e,t,i="completed"){if(!this.eventFileId){console.warn("No event file ID available, cannot save task history");return}try{const r=t.filter(o=>!(o.type==="SYSTEM"||!o.content||o.contentType==="token_stat")),s=await fetch("/api/coding-command/save-history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,event_file_id:this.eventFileId,messages:r,status:i,timestamp:Date.now()})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`)}catch(r){console.error("Error saving task history:",r)}}async cancelTask(){if(!this.eventFileId){console.warn("No event file ID available, cannot cancel task");return}try{const e=await fetch("/api/coding-command/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_file_id:this.eventFileId})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);this.closeEventStream()}catch(e){throw console.error("Error cancelling task:",e),e}}}const bHn=new $at;class Hat extends US.EventEmitter{constructor(e){super(),this.eventSource=null,this.streamEvents=new Map,this.lastEventType=null,this.messageId=0,this.currentStreamMessageId=null,this.isStreamingActive=!1,this.eventFileId=null,this.panelId=e}async executeCommand(e,t=!1){try{const i=await fetch("/api/auto-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e,include_conversation_history:t,panel_id:this.panelId})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();return this.eventFileId=r.event_file_id,this.startEventStream(),{event_file_id:r.event_file_id}}catch(i){throw console.error("Error executing command:",i),i}}startEventStream(){if(this.closeEventStream(),!this.eventFileId){console.error("No event file ID available");return}this.eventSource=new EventSource(`/api/auto-command/events?event_file_id=${this.eventFileId}`),this.eventSource.onmessage=e=>{try{const t=JSON.parse(e.data);this.handleEvent(t)}catch(t){console.error("Error parsing event data:",t)}},this.eventSource.onerror=e=>{console.error("EventSource error:",e),this.closeEventStream()}}handleEvent(e){let t;const i=Kk(),r=Date.now();switch(e.event_type==="STREAM"?this.lastEventType!=="STREAM"?(t=`agentic-${i}-${r}-${this.messageId++}`,this.currentStreamMessageId=t):t=this.currentStreamMessageId||`agentic-${i}-${r}-${this.messageId++}`:(t=`agentic-${i}-${r}-${this.messageId++}`,this.lastEventType==="STREAM"&&this.currentStreamMessageId&&this.finalizeStreamMessage(this.currentStreamMessageId),this.currentStreamMessageId=null),e.event_type){case"STREAM":this.handleStreamEvent(e,t);break;case"RESULT":this.handleResultEvent(e,t);break;case"ASK_USER":this.handleAskUserEvent(e,t);break;case"USER_RESPONSE":this.handleUserResponseEvent(e,t);break;case"ERROR":this.handleErrorEvent(e,t);break;case"COMPLETION":this.handleCompletionEvent(e,t);break;default:console.warn("Unknown event type:",e.event_type)}this.lastEventType=e.event_type}handleStreamEvent(e,t){const i=e.content;this.isStreamingActive=!0;let r=this.streamEvents.get(t);if(r)r.content+=i.content,r.isThinking=i.is_thinking,r.isStreaming=!0,i.state==="complete"?(r.isStreaming=!1,this.streamEvents.delete(t),this.emit("message",r),this.isStreamingActive=!1):(this.streamEvents.set(t,r),this.emit("message",r));else{const s={id:t,type:e.event_type,content:i.content,contentType:i.content_type,isThinking:i.is_thinking,isStreaming:!0,eventId:e.event_id,language:i.language,metadata:e.metadata};i.state!=="complete"?this.streamEvents.set(t,s):(s.isStreaming=!1,this.isStreamingActive=!1),this.emit("message",s)}}handleResultEvent(e,t){const i=e.content;let r,s=i.content_type,o={...i.metadata,...e.metadata};typeof i.content=="string"?r=i.content:this.isTokenStatContent(i.content)?(s="token_stat",r=JSON.stringify(i.content),o={...o,model_name:i.content.model_name,elapsed_time:i.content.elapsed_time,first_token_time:i.content.first_token_time,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost,speed:i.content.speed}):this.isSummaryContent(i.content)?(s="summary",r=i.content.summary):this.isIndexBuildStartContent(i.content)?(s="index_build_start",r=`Processing files: ${i.content.file_number}/${i.content.total_files}`,o={...o,file_number:i.content.file_number,total_files:i.content.total_files}):this.isIndexBuildEndContent(i.content)?(s="index_build_end",r=`Index build completed: Updated ${i.content.updated_files} files, Removed ${i.content.removed_files} files`,o={...o,updated_files:i.content.updated_files,removed_files:i.content.removed_files,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost}):this.isCommandPrepareStatContent(i.content)?(s="command_prepare_stat",r=`Command: ${i.content.command}`,o={...o,command:i.content.command,parameters:i.content.parameters}):this.isCommandExecuteStatContent(i.content)?(s="command_execute_stat",r=i.content.content,o={...o,command:i.content.command}):this.isContextUsedContent(i.content)?(s="context_used",r=i.content.description,o={...o,files:i.content.files}):r=JSON.stringify(i.content);const a={id:t,type:e.event_type,content:r,contentType:s,metadata:o,eventId:e.event_id};this.emit("message",a)}isTokenStatContent(e){return e&&typeof e.model_name=="string"&&typeof e.elapsed_time=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isCommandPrepareStatContent(e){return e&&typeof e.command=="string"&&typeof e.parameters=="object"}isSummaryContent(e){return e&&typeof e.summary=="string"}isCommandExecuteStatContent(e){return e&&typeof e.command=="string"&&typeof e.content=="string"}isIndexBuildStartContent(e){return e&&typeof e.file_number=="number"&&typeof e.total_files=="number"}isIndexBuildEndContent(e){return e&&typeof e.updated_files=="number"&&typeof e.removed_files=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isContextUsedContent(e){return e&&Array.isArray(e.files)&&typeof e.title=="string"&&typeof e.description=="string"}handleAskUserEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.prompt,options:i.options,responseRequired:i.required,eventId:e.event_id};this.emit("message",r)}handleUserResponseEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.response,isUser:!0,eventId:e.event_id,responseTo:e.response_to};this.emit("message",r)}handleErrorEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.error_message,metadata:i.details,eventId:e.event_id};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!0),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!0,event_file_id:this.eventFileId})},300)}handleCompletionEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.success_message,eventId:e.event_id,metadata:{success_code:i.success_code,completion_time:i.completion_time,details:i.details,result:i.result}};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!1),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!0,event_file_id:this.eventFileId})},1e3)}finalizeStreamMessage(e){const t=this.streamEvents.get(e);t&&(t.isStreaming=!1,t.isThinking=!1,this.streamEvents.delete(e),this.emit("message",t))}closeEventStream(){this.eventSource&&(this.eventSource.close(),this.eventSource=null),Array.from(this.streamEvents.keys()).forEach(e=>{this.finalizeStreamMessage(e)}),this.streamEvents.clear(),this.lastEventType=null,this.currentStreamMessageId=null,this.isStreamingActive=!1}async sendUserResponse(e,t){if(!this.eventFileId)throw new Error("No event file ID available");try{const i=await fetch("/api/auto-command/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:e,event_file_id:this.eventFileId,response:t})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`)}catch(i){throw console.error("Error sending user response:",i),i}}async cancelTask(){if(!this.eventFileId){console.warn("No event file ID available to cancel task.");return}console.log(`AgenticEditService: Cancelling task with event_file_id: ${this.eventFileId}`);try{const e=await fetch("/api/auto-command/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_file_id:this.eventFileId})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);console.log(`AgenticEditService: Task cancellation request sent for event_file_id: ${this.eventFileId}`),this.closeEventStream()}catch(e){console.error("Error cancelling agentic edit task:",e)}}}new Hat;class Uat extends US.EventEmitter{constructor(){super(),this.config={human_as_model:!1,extra_conf:{},available_keys:[]},this.fetchConfig(),this.fetchConfigKeys()}getConfig(){return{...this.config}}async fetchConfig(){try{const e=await fetch("/api/conf");if(!e.ok)throw new Error("Failed to fetch configuration");const t=await e.json(),{human_as_model:i,skip_build_index:r,project_type:s,...o}=t.conf;return this.config={...this.config,human_as_model:i==="true",skip_build_index:r==="true",project_type:s,extra_conf:this.convertToStringValues(o)},this.emit("configUpdated",this.config),this.config}catch(e){return console.error("Error fetching config:",e),this.emit("error","Failed to fetch configuration"),null}}convertToStringValues(e){const t={};for(const i in e)t[i]=String(e[i]);return t}async fetchConfigKeys(){try{const e=await fetch("/api/conf/keys");if(!e.ok)throw new Error("Failed to fetch configuration keys");const t=await e.json();return this.config={...this.config,available_keys:t.keys},this.emit("configKeysUpdated",this.config.available_keys),this.config.available_keys}catch(e){return console.error("Error fetching configuration keys:",e),this.emit("error","Failed to fetch configuration keys"),null}}async updateConfig(e,t){try{if(!(await fetch("/api/conf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:String(t)})})).ok)throw new Error("Failed to update configuration");return e==="human_as_model"||e==="skip_build_index"?this.config={...this.config,[e]:!!t}:e==="project_type"?this.config={...this.config,project_type:String(t)}:this.config={...this.config,extra_conf:{...this.config.extra_conf,[e]:String(t)}},this.emit("configUpdated",this.config),!0}catch(i){return console.error("Error updating config:",i),this.emit("error",`Failed to update configuration key: ${e}`),!1}}async reloadConfig(){await this.fetchConfig(),await this.fetchConfigKeys()}}new Uat;class Wat extends US.EventEmitter{constructor(){super(),this.defaultChatName=""}async fetchChatLists(){try{return(await(await fetch("/api/chat-lists")).json()).chat_lists||[]}catch(e){return console.error("Error fetching chat lists:",e),this.emit("error","获取聊天列表失败"),[]}}async getCurrentSessionName(e){try{const t=e?`/api/chat-session/name?panel_id=${encodeURIComponent(e)}`:"/api/chat-session/name",i=await fetch(t);if(!i.ok)throw new Error("Failed to fetch current session name");const r=await i.json();return e?r.session_name?{sessionName:r.session_name,panelId:e}:null:r.session_name||null}catch(t){return console.error("Error getting current session name:",t),null}}async setCurrentSessionName(e,t){if(!e.trim())return!1;try{if(!(await fetch("/api/chat-session/name",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_name:e,panel_id:t||""})})).ok)throw new Error("Failed to set current session name");return!0}catch(i){return console.error("Error setting current session name:",i),this.emit("error","设置当前会话名称失败"),!1}}async saveChatList(e,t=[],i,r){if(!e.trim())return this.emit("error","请输入聊天列表名称"),!1;try{const s={name:e,messages:t};if(r!==void 0&&(s.metadata=r),!(await fetch("/api/chat-lists/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok)throw new Error("Failed to save chat list");return await this.setCurrentSessionName(e,i),this.emit("chatListSaved",{name:e,panelId:i}),!0}catch(s){return console.error("Error saving chat list:",s),this.emit("error","保存聊天列表失败"),!1}}async loadChatList(e,t){try{const r=await(await fetch(`/api/chat-lists/${e}`)).json(),s=r.messages.map(o=>"role"in o?{id:o.id||Date.now().toString(),type:o.role==="user"?"USER_RESPONSE":"RESULT",content:o.content,contentType:o.contentType||"markdown",language:o.language,metadata:o.metadata,isUser:o.role==="user",isStreaming:!1,isThinking:!1}:{...o,isStreaming:!1,isThinking:!1,type:o.type||(o.isUser?"USER_RESPONSE":"RESULT"),contentType:o.contentType||"markdown"});return this.emit("chatListLoaded",{name:e,messages:s,metadata:r.metadata,panelId:t}),{messages:s,metadata:r.metadata}}catch(i){return console.error("Error loading chat list:",i),this.emit("error","加载聊天列表失败"),{messages:[],metadata:void 0}}}getChatTitle(e){if(e.length>0){const t=e.find(i=>i.isUser||i.type==="USER_RESPONSE");if(t&&t.content)return t.content.substring(0,4)}return"新聊天"}async deleteChatList(e){try{if(!(await fetch(`/api/chat-lists/${e}`,{method:"DELETE"})).ok)throw new Error("Failed to delete chat list");return this.emit("chatListDeleted",{name:e}),!0}catch(t){return console.error("Error deleting chat list:",t),this.emit("error","删除聊天列表失败"),!1}}async renameChatList(e,t,i){try{if(!t.trim())return this.emit("error","聊天名称不能为空"),!1;const r=await fetch("/api/chat-lists/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({old_name:e,new_name:t})});if(!r.ok){const s=await r.json();throw new Error(s.detail||"Failed to rename chat list")}return this.emit("chatListRenamed",{oldName:e,newName:t,panelId:i}),!0}catch(r){return console.error("Error renaming chat list:",r),this.emit("error",`重命名聊天失败: ${r.message||"未知错误"}`),!1}}async createNewChat(e){const i=`chat_${new Date().toISOString().replace(/[:.]/g,"-")}`;try{if(!await this.saveChatList(i,[],e))throw new Error("Failed to save new chat");return await this.setCurrentSessionName(i,e),this.emit("newChatCreated",{name:i,panelId:e}),i}catch(r){return console.error("Error creating new chat directly:",r),this.emit("error","创建新聊天失败"),null}}}new Wat;class jat extends US.EventEmitter{constructor(){super()}async fetchFileGroups(){try{return(await(await fetch("/api/file-groups")).json()).groups||[]}catch(e){return console.error("Error fetching file groups:",e),this.emit("error","获取文件组失败"),[]}}async switchFileGroups(e,t){try{const i=await fetch("/api/file-groups/switch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({group_names:e,file_paths:t})});if(!i.ok)throw new Error("Failed to switch file groups");const r=await i.json();return this.emit("fileGroupsSwitched",{groupNames:e,filePaths:t}),{success:!0,totalTokens:r.total_tokens,message:r.message}}catch(i){return console.error("Error switching file groups:",i),this.emit("error","切换文件组失败"),{success:!1,totalTokens:0,message:"切换文件组失败"}}}async createFileGroup(e,t=""){try{const i=await fetch("/api/file-groups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,description:t})});if(!i.ok)throw new Error("Failed to create file group");const r=await i.json();return this.emit("fileGroupCreated",{name:e,description:t}),{success:!0,message:r.message}}catch(i){return console.error("Error creating file group:",i),this.emit("error","创建文件组失败"),{success:!1,message:"创建文件组失败"}}}async deleteFileGroup(e){try{const t=await fetch(`/api/file-groups/${e}`,{method:"DELETE"});if(!t.ok)throw new Error("Failed to delete file group");const i=await t.json();return this.emit("fileGroupDeleted",{name:e}),{success:!0,message:i.message}}catch(t){return console.error("Error deleting file group:",t),this.emit("error","删除文件组失败"),{success:!1,message:"删除文件组失败"}}}async addFilesToGroup(e,t){try{const i=await fetch(`/api/file-groups/${e}/files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:t})});if(!i.ok)throw new Error("Failed to add files to group");const r=await i.json();return this.emit("filesAddedToGroup",{groupName:e,files:t}),{success:!0,message:r.message}}catch(i){return console.error("Error adding files to group:",i),this.emit("error","向文件组添加文件失败"),{success:!1,message:"向文件组添加文件失败"}}}async removeFilesFromGroup(e,t){try{const i=await fetch(`/api/file-groups/${e}/files`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:t})});if(!i.ok)throw new Error("Failed to remove files from group");const r=await i.json();return this.emit("filesRemovedFromGroup",{groupName:e,files:t}),{success:!0,message:r.message}}catch(i){return console.error("Error removing files from group:",i),this.emit("error","从文件组移除文件失败"),{success:!1,message:"从文件组移除文件失败"}}}async clearCurrentFiles(){try{const e=await fetch("/api/file-groups/clear",{method:"POST"});if(!e.ok)throw new Error("Failed to clear current files");const t=await e.json();return this.emit("currentFilesCleared"),{success:!0,message:t.message}}catch(e){return console.error("Error clearing current files:",e),this.emit("error","清空当前文件上下文失败"),{success:!1,message:"清空当前文件上下文失败"}}}async autoCreateGroups(e={fileSizeLimit:100,skipDiff:!1,groupNumLimit:10}){try{const t=await fetch("/api/file-groups/auto",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_size_limit:e.fileSizeLimit,skip_diff:e.skipDiff,group_num_limit:e.groupNumLimit})});if(!t.ok)throw new Error("Failed to auto create file groups");const i=await t.json();return this.emit("fileGroupsAutoCreated",i.groups),{success:!0,groups:i.groups||[],message:i.message}}catch(t){return console.error("Error auto creating file groups:",t),this.emit("error","自动创建文件组失败"),{success:!1,groups:[],message:"自动创建文件组失败"}}}}new jat;const f0=class f0{static getChatService(e){return this.chatServices.has(e)||this.chatServices.set(e,new Fat(e)),this.chatServices.get(e)}static getCodingService(e){return this.codingServices.has(e)||this.codingServices.set(e,new $at(e)),this.codingServices.get(e)}static getAgenticEditService(e){return this.agenticEditServices.has(e)||this.agenticEditServices.set(e,new Hat(e)),this.agenticEditServices.get(e)}static getAutoCoderConfService(e){return this.autoCoderConfServices.has(e)||this.autoCoderConfServices.set(e,new Uat),this.autoCoderConfServices.get(e)}static getChatListService(e){return this.chatListServices.has(e)||this.chatListServices.set(e,new Wat),this.chatListServices.get(e)}static getFileGroupService(e){return this.fileGroupServices.has(e)||this.fileGroupServices.set(e,new jat),this.fileGroupServices.get(e)}};f0.chatServices=new Map,f0.codingServices=new Map,f0.agenticEditServices=new Map,f0.autoCoderConfServices=new Map,f0.chatListServices=new Map,f0.fileGroupServices=new Map;let iv=f0;const _Hn=({fileGroups:n,selectedGroups:e,setSelectedGroups:t,fetchFileGroups:i,panelId:r=""})=>{const s=iv.getFileGroupService(r),[o,a]=b.useState([]),[l,c]=b.useState([]),[u,d]=b.useState(""),[h,f]=b.useState(!1),[g,m]=b.useState([]),[p,A]=b.useState(0),v=b.useRef(null),_=b.useRef(new Set);b.useEffect(()=>{const M=()=>{v.current&&(v.current.focus(),_t.info(J("focusInput"),1))},P=Bn.subscribe(Mn.FILE_GROUP_SELECT.FOCUS,M);return()=>{P()}},[]),b.useEffect(()=>{const M=F=>{console.log(F);const j=F;if(j.length>0){const W=j.map(K=>({path:K.path,display:K.text}));m(W),_.current=new Set(W.map(K=>K.path));const H=W.map(K=>K.path),$=[...l];let U=!1;H.forEach(K=>{$.includes(K)||($.push(K),U=!0)}),U&&T(e,$)}},P=Bn.subscribe(Mn.EDITOR.MENTIONS_CHANGED,M);return()=>{P()}},[e,l]);const y=b.useCallback((M,P=40)=>{const F=M.substring(0,M.lastIndexOf("/"));return F.length>P?"..."+F.slice(-P):F},[]),[C,w]=b.useState([]),[E,k]=b.useState(-1);b.useEffect(()=>{const M=Bn.subscribe(Mn.EDITOR.TABS_CHANGED,P=>{console.log(J("editorTabsChanged"),P),w(P)});return()=>M()},[]);const I=async M=>{if(M.length<2){a([]);return}try{const F=await(await fetch(`/api/completions/files?name=${encodeURIComponent(M)}`)).json();a(F.completions||[])}catch(P){console.error(J("errorFetchingCompletions"),P)}},T=(M,P)=>{const F=Array.from(new Set(M)),j=Array.from(new Set(P));t(F),c(j),s.switchFileGroups(F,j).then(W=>{W.totalTokens!==void 0&&A(W.totalTokens),Bn.publish(Mn.FILE_GROUP_SELECT.SELECTION_UPDATED,new son(F,j,r)),console.log("Published file group selection updated event",F,j)}).catch(W=>{console.error(J("errorUpdatingSelection"),W)})},D=M=>{if(!h)return;const P=o.length+(C.length>0&&u.length<2?C.length:0)+(g.length>0&&u.length<2?g.length:0)+n.length;switch(M.key){case"ArrowDown":if(M.preventDefault(),M.stopPropagation(),P===0)return;k(F=>{const j=F>=P-1?0:F+1;return console.log(`移动到下一个选项: ${j}`),j});break;case"ArrowUp":if(M.preventDefault(),M.stopPropagation(),P===0)return;k(F=>{const j=F<=0?P-1:F-1;return console.log(`移动到上一个选项: ${j}`),j});break;case"Enter":E>=0&&(M.preventDefault(),M.stopPropagation(),O(E),console.log(`选中选项: ${E}`));break;case"Tab":E>=0&&(M.preventDefault(),M.stopPropagation(),O(E),console.log(`选中选项: ${E}`));break;case"Escape":M.preventDefault(),M.stopPropagation(),f(!1),d(""),k(-1),console.log("关闭下拉菜单");break}},O=M=>{let P=M,F="";if(o.length>0&&P<o.length?F=o[P].path:(P-=o.length,C.length>0&&u.length<2&&P<C.length?F=C[P].path:(P-=C.length>0&&u.length<2?C.length:0,g.length>0&&u.length<2&&P<g.length?F=g[P].path:(P-=g.length>0&&u.length<2?g.length:0,P<n.length&&(F=n[P].name)))),F){if(n.some(W=>W.name===F)){const W=[...e];W.includes(F)||W.push(F),T(W,l)}else{const W=[...l];W.includes(F)||W.push(F),T(e,W)}if(f(!1),d(""),k(-1),v.current)try{v.current.focus(),v.current.clearInput&&v.current.clearInput(),setTimeout(()=>{if(v.current&&v.current.selector){const W=v.current.selector.querySelector(".ant-select-selection-search-input");W&&(W.value="",W.focus())}},50)}catch(W){console.error("Error clearing search box:",W)}}},R=M=>M.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return S.jsxs("div",{className:"px-1 w-full",onKeyDown:D,children:[S.jsx("div",{className:"h-[1px] bg-gray-700/50 my-0.5 w-full"}),S.jsx("div",{className:"flex items-center justify-between w-full mb-1",children:S.jsxs("span",{className:"text-xs text-gray-400 flex items-center",children:[S.jsx("span",{className:"mr-1",children:"Tokens:"}),S.jsx("span",{className:"font-medium text-green-400",children:R(p)})]})}),S.jsxs("div",{className:"flex items-center gap-1 w-full",children:[S.jsxs(Di,{ref:v,mode:"multiple",style:{width:"100%",background:"#1f2937",borderColor:"#374151",color:"#e5e7eb",minHeight:"28px",height:"auto",fontSize:"12px",flex:"1 1 auto"},maxTagCount:20,maxTagTextLength:30,maxTagPlaceholder:M=>J("moreFiles",{count:String(M.length)}),placeholder:J("fileGroupSelectPlaceholder"),value:[...e,...l],onFocus:()=>{i(),f(!0),k(-1)},onBlur:M=>{const P=M.relatedTarget;P&&(P.classList.contains("ant-select-item")||P.closest(".ant-select-dropdown"))||setTimeout(()=>{f(!1),k(-1),d("")},100)},open:h,onSearch:M=>{d(M),I(M),k(-1)},onDropdownVisibleChange:M=>{f(M),M?setTimeout(()=>{if(v.current&&v.current.selector){const P=v.current.selector.querySelector(".ant-select-selection-search-input");P&&P.focus()}},10):(k(-1),d(""),setTimeout(()=>{if(v.current&&v.current.selector){const P=v.current.selector.querySelector(".ant-select-selection-search-input");P&&(P.value="",P.focus())}},10))},onChange:M=>{const P=M.filter(j=>n.some(W=>W.name===j)),F=M.filter(j=>!n.some(W=>W.name===j));T(P,F)},listItemHeight:28,listHeight:320,menuItemSelectedIcon:null,filterOption:(M,P)=>{if(!P)return!1;const F=typeof P.label=="string"?P.label:"",j=typeof P.value=="string"?P.value:"";return F.toLowerCase().includes(M.toLowerCase())||j.toLowerCase().includes(M.toLowerCase())},optionFilterProp:"label",className:"custom-select multi-line-select keyboard-navigation-select",popupClassName:"dark-dropdown-menu keyboard-navigation-dropdown",dropdownStyle:{backgroundColor:"#1f2937",borderColor:"#374151",fontSize:"12px"},showSearch:!0,tabIndex:0,autoClearSearchValue:!0,getPopupContainer:()=>document.body,tagRender:M=>{const{label:P,value:F,closable:j,onClose:W}=M,H=n.some(U=>U.name===F);let $=null;return F&&(H?$=F:F.includes("/")?$=F.split("/").pop():F.includes("\\")?$=F.split("\\").pop():$=F),S.jsxs("span",{className:`inline-flex items-center m-0.5 px-1 py-0.5 rounded text-xs ${H?"bg-blue-700 text-blue-100":"bg-gray-700 text-gray-200"}`,style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:"1.2"},title:F,children:[H?S.jsxs("span",{className:"flex items-center",children:[S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),S.jsx("span",{children:P})]}):S.jsxs("span",{className:"flex items-center",children:[S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),S.jsx("span",{children:$})]}),j&&S.jsx("span",{className:"cursor-pointer text-gray-400 hover:text-gray-200 ml-0.5",onClick:W,children:"×"})]})},dropdownRender:M=>S.jsx("div",{className:"keyboard-navigation-menu",children:M}),onKeyDown:M=>{(M.metaKey||M.ctrlKey)&&M.key==="i"?(M.preventDefault(),M.stopPropagation(),Bn.publish(Mn.EDITOR.FOCUS)):M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),f(!1))},children:[o.length>0&&S.jsx(Di.OptGroup,{label:J("searchResults"),children:o.map((M,P)=>S.jsx(Di.Option,{value:M.path,label:M.display,className:`file-option ${E===P?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",title:M.path,children:[S.jsxs("span",{className:"text-gray-200 text-xs",children:[M.display," (",y(M.path),")"]}),S.jsx("span",{className:"text-gray-400 text-[10px]",children:J("fileType")})]})},M.path))}),C.length>0&&u.length<2&&S.jsx(Di.OptGroup,{label:S.jsxs("div",{className:"flex justify-between items-center",children:[S.jsx("span",{children:J("openedFiles")}),S.jsx("button",{className:"text-xs text-blue-400 hover:text-blue-300 px-1 py-0 rounded",onClick:M=>{M.stopPropagation();const P=C.map(j=>j.path);if(P.every(j=>l.includes(j))){const j=l.filter(W=>!P.includes(W));T(e,j)}else{const j=[...l.filter(W=>!P.includes(W)),...P];T(e,j)}},children:S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-check-square",children:[S.jsx("polyline",{points:"9 11 12 14 22 4"}),S.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})})]}),children:C.map((M,P)=>{const F=M.label||M.path.split("/").pop()||M.path,j=o.length+P;return S.jsx(Di.Option,{value:M.path,label:F,className:`file-option ${E===j?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",title:M.path,children:[S.jsxs("span",{className:`text-xs ${M.isSelected?"text-white font-medium":"text-gray-200"}`,children:[F," (",y(M.path),")"]}),S.jsx("span",{className:`text-[10px] ${M.isSelected?"text-green-400":"text-green-600/70"}`,children:J(M.isSelected?"fileStatusActive":"fileStatusOpened")})]})},`opened-${M.path}`)})}),n.map((M,P)=>{const F=o.length+(C.length>0&&u.length<2?C.length:0)+(g.length>0&&u.length<2?g.length:0)+P;return S.jsx(Di.Option,{value:M.name,label:M.name,className:`file-option ${E===F?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",children:[S.jsx("span",{className:"text-gray-200 text-xs",children:M.name}),S.jsx("span",{className:"text-gray-400 text-[10px]",children:J("fileCount",{count:String(M.files.length)})})]})},M.name)}),g.length>0&&u.length<2&&S.jsx(Di.OptGroup,{label:J("mentionedFiles"),children:g.map((M,P)=>{const F=o.length+(C.length>0&&u.length<2?C.length:0)+P;return S.jsx(Di.Option,{value:M.path,label:M.display,className:`file-option ${E===F?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",title:M.path,children:[S.jsxs("span",{className:"text-gray-200 text-xs",children:[M.display," (",y(M.path,20),")"]}),S.jsx("span",{className:"text-blue-400 text-[10px]",children:J("mentionedFileStatus")})]})},`mention-${M.path}`)})})]}),S.jsx(xje,{className:"text-gray-400 hover:text-gray-200 cursor-pointer text-sm",onClick:async()=>{try{(await s.clearCurrentFiles()).success&&(t([]),c([]),i())}catch(M){console.error(J("clearFailed"),M)}},title:J("clearContext")})]})]})};function zat(n,e){return function(){return n.apply(e,arguments)}}const{toString:yHn}=Object.prototype,{getPrototypeOf:pCe}=Object,{iterator:WK,toStringTag:Vat}=Symbol,jK=(n=>e=>{const t=yHn.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),xp=n=>(n=n.toLowerCase(),e=>jK(e)===n),zK=n=>e=>typeof e===n,{isArray:JI}=Array,BB=zK("undefined");function CHn(n){return n!==null&&!BB(n)&&n.constructor!==null&&!BB(n.constructor)&&Fd(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Kat=xp("ArrayBuffer");function wHn(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Kat(n.buffer),e}const SHn=zK("string"),Fd=zK("function"),Gat=zK("number"),VK=n=>n!==null&&typeof n=="object",xHn=n=>n===!0||n===!1,O$=n=>{if(jK(n)!=="object")return!1;const e=pCe(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Vat in n)&&!(WK in n)},EHn=xp("Date"),kHn=xp("File"),LHn=xp("Blob"),IHn=xp("FileList"),THn=n=>VK(n)&&Fd(n.pipe),NHn=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Fd(n.append)&&((e=jK(n))==="formdata"||e==="object"&&Fd(n.toString)&&n.toString()==="[object FormData]"))},DHn=xp("URLSearchParams"),[RHn,MHn,OHn,BHn]=["ReadableStream","Request","Response","Headers"].map(xp),PHn=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bP(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),JI(n))for(i=0,r=n.length;i<r;i++)e.call(null,n[i],i,n);else{const s=t?Object.getOwnPropertyNames(n):Object.keys(n),o=s.length;let a;for(i=0;i<o;i++)a=s[i],e.call(null,n[a],a,n)}}function qat(n,e){e=e.toLowerCase();const t=Object.keys(n);let i=t.length,r;for(;i-- >0;)if(r=t[i],e===r.toLowerCase())return r;return null}const d1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qat=n=>!BB(n)&&n!==d1;function eme(){const{caseless:n}=Qat(this)&&this||{},e={},t=(i,r)=>{const s=n&&qat(e,r)||r;O$(e[s])&&O$(i)?e[s]=eme(e[s],i):O$(i)?e[s]=eme({},i):JI(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&bP(arguments[i],t);return e}const FHn=(n,e,t,{allOwnKeys:i}={})=>(bP(e,(r,s)=>{t&&Fd(r)?n[s]=zat(r,t):n[s]=r},{allOwnKeys:i}),n),$Hn=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),HHn=(n,e,t,i)=>{n.prototype=Object.create(e.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},UHn=(n,e,t,i)=>{let r,s,o;const a={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)o=r[s],(!i||i(o,n,e))&&!a[o]&&(e[o]=n[o],a[o]=!0);n=t!==!1&&pCe(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},WHn=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const i=n.indexOf(e,t);return i!==-1&&i===t},jHn=n=>{if(!n)return null;if(JI(n))return n;let e=n.length;if(!Gat(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},zHn=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&pCe(Uint8Array)),VHn=(n,e)=>{const i=(n&&n[WK]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(n,s[0],s[1])}},KHn=(n,e)=>{let t;const i=[];for(;(t=n.exec(e))!==null;)i.push(t);return i},GHn=xp("HTMLFormElement"),qHn=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,r){return i.toUpperCase()+r}),U$e=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),QHn=xp("RegExp"),Yat=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),i={};bP(t,(r,s)=>{let o;(o=e(r,s,n))!==!1&&(i[s]=o||r)}),Object.defineProperties(n,i)},YHn=n=>{Yat(n,(e,t)=>{if(Fd(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=n[t];if(Fd(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},XHn=(n,e)=>{const t={},i=r=>{r.forEach(s=>{t[s]=!0})};return JI(n)?i(n):i(String(n).split(e)),t},ZHn=()=>{},JHn=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function e7n(n){return!!(n&&Fd(n.append)&&n[Vat]==="FormData"&&n[WK])}const t7n=n=>{const e=new Array(10),t=(i,r)=>{if(VK(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=JI(i)?[]:{};return bP(i,(o,a)=>{const l=t(o,r+1);!BB(l)&&(s[a]=l)}),e[r]=void 0,s}}return i};return t(n,0)},n7n=xp("AsyncFunction"),i7n=n=>n&&(VK(n)||Fd(n))&&Fd(n.then)&&Fd(n.catch),Xat=((n,e)=>n?setImmediate:e?((t,i)=>(d1.addEventListener("message",({source:r,data:s})=>{r===d1&&s===t&&i.length&&i.shift()()},!1),r=>{i.push(r),d1.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Fd(d1.postMessage)),r7n=typeof queueMicrotask<"u"?queueMicrotask.bind(d1):typeof process<"u"&&process.nextTick||Xat,s7n=n=>n!=null&&Fd(n[WK]),Bt={isArray:JI,isArrayBuffer:Kat,isBuffer:CHn,isFormData:NHn,isArrayBufferView:wHn,isString:SHn,isNumber:Gat,isBoolean:xHn,isObject:VK,isPlainObject:O$,isReadableStream:RHn,isRequest:MHn,isResponse:OHn,isHeaders:BHn,isUndefined:BB,isDate:EHn,isFile:kHn,isBlob:LHn,isRegExp:QHn,isFunction:Fd,isStream:THn,isURLSearchParams:DHn,isTypedArray:zHn,isFileList:IHn,forEach:bP,merge:eme,extend:FHn,trim:PHn,stripBOM:$Hn,inherits:HHn,toFlatObject:UHn,kindOf:jK,kindOfTest:xp,endsWith:WHn,toArray:jHn,forEachEntry:VHn,matchAll:KHn,isHTMLForm:GHn,hasOwnProperty:U$e,hasOwnProp:U$e,reduceDescriptors:Yat,freezeMethods:YHn,toObjectSet:XHn,toCamelCase:qHn,noop:ZHn,toFiniteNumber:JHn,findKey:qat,global:d1,isContextDefined:Qat,isSpecCompliantForm:e7n,toJSONObject:t7n,isAsyncFn:n7n,isThenable:i7n,setImmediate:Xat,asap:r7n,isIterable:s7n};function Ir(n,e,t,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}Bt.inherits(Ir,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Bt.toJSONObject(this.config),code:this.code,status:this.status}}});const Zat=Ir.prototype,Jat={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Jat[n]={value:n}});Object.defineProperties(Ir,Jat);Object.defineProperty(Zat,"isAxiosError",{value:!0});Ir.from=(n,e,t,i,r,s)=>{const o=Object.create(Zat);return Bt.toFlatObject(n,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ir.call(o,n.message,e,t,i,r),o.cause=n,o.name=n.name,s&&Object.assign(o,s),o};const o7n=null;function tme(n){return Bt.isPlainObject(n)||Bt.isArray(n)}function elt(n){return Bt.endsWith(n,"[]")?n.slice(0,-2):n}function W$e(n,e,t){return n?n.concat(e).map(function(r,s){return r=elt(r),!t&&s?"["+r+"]":r}).join(t?".":""):e}function a7n(n){return Bt.isArray(n)&&!n.some(tme)}const l7n=Bt.toFlatObject(Bt,{},null,function(e){return/^is[A-Z]/.test(e)});function KK(n,e,t){if(!Bt.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Bt.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!Bt.isUndefined(p[m])});const i=t.metaTokens,r=t.visitor||u,s=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&Bt.isSpecCompliantForm(e);if(!Bt.isFunction(r))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(Bt.isDate(g))return g.toISOString();if(!l&&Bt.isBlob(g))throw new Ir("Blob is not supported. Use a Buffer instead.");return Bt.isArrayBuffer(g)||Bt.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,m,p){let A=g;if(g&&!p&&typeof g=="object"){if(Bt.endsWith(m,"{}"))m=i?m:m.slice(0,-2),g=JSON.stringify(g);else if(Bt.isArray(g)&&a7n(g)||(Bt.isFileList(g)||Bt.endsWith(m,"[]"))&&(A=Bt.toArray(g)))return m=elt(m),A.forEach(function(_,y){!(Bt.isUndefined(_)||_===null)&&e.append(o===!0?W$e([m],y,s):o===null?m:m+"[]",c(_))}),!1}return tme(g)?!0:(e.append(W$e(p,m,s),c(g)),!1)}const d=[],h=Object.assign(l7n,{defaultVisitor:u,convertValue:c,isVisitable:tme});function f(g,m){if(!Bt.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),Bt.forEach(g,function(A,v){(!(Bt.isUndefined(A)||A===null)&&r.call(e,A,Bt.isString(v)?v.trim():v,m,h))===!0&&f(A,m?m.concat(v):[v])}),d.pop()}}if(!Bt.isObject(n))throw new TypeError("data must be an object");return f(n),e}function j$e(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function mCe(n,e){this._pairs=[],n&&KK(n,this,e)}const tlt=mCe.prototype;tlt.append=function(e,t){this._pairs.push([e,t])};tlt.toString=function(e){const t=e?function(i){return e.call(this,i,j$e)}:j$e;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function c7n(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nlt(n,e,t){if(!e)return n;const i=t&&t.encode||c7n;Bt.isFunction(t)&&(t={serialize:t});const r=t&&t.serialize;let s;if(r?s=r(e,t):s=Bt.isURLSearchParams(e)?e.toString():new mCe(e,t).toString(i),s){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}class z$e{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Bt.forEach(this.handlers,function(i){i!==null&&e(i)})}}const ilt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},u7n=typeof URLSearchParams<"u"?URLSearchParams:mCe,d7n=typeof FormData<"u"?FormData:null,h7n=typeof Blob<"u"?Blob:null,f7n={isBrowser:!0,classes:{URLSearchParams:u7n,FormData:d7n,Blob:h7n},protocols:["http","https","file","blob","url","data"]},ACe=typeof window<"u"&&typeof document<"u",nme=typeof navigator=="object"&&navigator||void 0,g7n=ACe&&(!nme||["ReactNative","NativeScript","NS"].indexOf(nme.product)<0),p7n=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",m7n=ACe&&window.location.href||"http://localhost",A7n=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ACe,hasStandardBrowserEnv:g7n,hasStandardBrowserWebWorkerEnv:p7n,navigator:nme,origin:m7n},Symbol.toStringTag,{value:"Module"})),Uc={...A7n,...f7n};function v7n(n,e){return KK(n,new Uc.classes.URLSearchParams,Object.assign({visitor:function(t,i,r,s){return Uc.isNode&&Bt.isBuffer(t)?(this.append(i,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function b7n(n){return Bt.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _7n(n){const e={},t=Object.keys(n);let i;const r=t.length;let s;for(i=0;i<r;i++)s=t[i],e[s]=n[s];return e}function rlt(n){function e(t,i,r,s){let o=t[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=t.length;return o=!o&&Bt.isArray(r)?r.length:o,l?(Bt.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!a):((!r[o]||!Bt.isObject(r[o]))&&(r[o]=[]),e(t,i,r[o],s)&&Bt.isArray(r[o])&&(r[o]=_7n(r[o])),!a)}if(Bt.isFormData(n)&&Bt.isFunction(n.entries)){const t={};return Bt.forEachEntry(n,(i,r)=>{e(b7n(i),r,t,0)}),t}return null}function y7n(n,e,t){if(Bt.isString(n))try{return(e||JSON.parse)(n),Bt.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(n)}const _P={transitional:ilt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,s=Bt.isObject(e);if(s&&Bt.isHTMLForm(e)&&(e=new FormData(e)),Bt.isFormData(e))return r?JSON.stringify(rlt(e)):e;if(Bt.isArrayBuffer(e)||Bt.isBuffer(e)||Bt.isStream(e)||Bt.isFile(e)||Bt.isBlob(e)||Bt.isReadableStream(e))return e;if(Bt.isArrayBufferView(e))return e.buffer;if(Bt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return v7n(e,this.formSerializer).toString();if((a=Bt.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return KK(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),y7n(e)):e}],transformResponse:[function(e){const t=this.transitional||_P.transitional,i=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Bt.isResponse(e)||Bt.isReadableStream(e))return e;if(e&&Bt.isString(e)&&(i&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ir.from(a,Ir.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Uc.classes.FormData,Blob:Uc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Bt.forEach(["delete","get","head","post","put","patch"],n=>{_P.headers[n]={}});const C7n=Bt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w7n=n=>{const e={};let t,i,r;return n&&n.split(`
|
1539
|
+
`?(I++,T=1):T++;A.executeEdits("",[{range:new TD(I,T,I,T+11),text:`<_image_>${y.path}</_image_>`,forceMoveMarkers:!0}])}else A.executeEdits("",[{range:new TD(C.lineNumber,C.column,C.lineNumber,C.column),text:`<_image_>${y.path}</_image_>`,forceMoveMarkers:!0}])}else console.error("Image upload failed:",y)}}catch(A){console.error("Image upload failed:",A);const v=a.current;if(v){const _=v.getPosition();v.executeEdits("",[{range:new TD(_.lineNumber,_.column,_.lineNumber,_.column),text:" [图片上传失败] ",forceMoveMarkers:!0}])}}},m=(p,A)=>{a.current=p;const v=_=>{if(navigator.platform.indexOf("Mac")===0?_.metaKey:_.ctrlKey)switch(_.code){case"Enter":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.CHAT.SEND_MESSAGE,new tH("",s)),!1;case"Period":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.UI.TOGGLE_WRITE_MODE,new ron(s||"main")),!1;case"KeyI":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.HOTKEY.FOCUS_FILE_GROUP,new PA(s||"main")),!1;case"KeyL":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.UI.TOGGLE_INPUT_FULLSCREEN,new ton(s||"main")),!1;case"Slash":return _.preventDefault(),_.stopPropagation(),Bn.publish(Mn.CHAT.NEW_CHAT,new uBe(s||"main")),!1}return!0};p.onKeyDown(v),p.addAction({id:"upload-image",label:"Upload Image",contextMenuGroupId:"navigation",contextMenuOrder:1.5,run:()=>{const _=document.createElement("input");_.type="file",_.accept="image/*",_.onchange=y=>{const C=y.target.files[0];C&&g(C)},_.click()}}),e(p,A),p.onDidPaste(()=>{setTimeout(()=>{const _=navigator.clipboard&&navigator.clipboard.read?navigator.clipboard.read().catch(()=>null):null;_&&_.then(y=>{if(y){for(const C of y)if(C.types&&C.types.some(w=>w.startsWith("image/"))){const w=C.types.find(E=>E.startsWith("image/"));w&&C.getType(w).then(E=>{const k=new File([E],"pasted-image.png",{type:w});g(k)}).catch(E=>console.error("获取图片失败:",E))}}}).catch(y=>console.error("读取剪贴板失败:",y))},0)}),A.editor.registerCommand("editor.acceptedCompletion",function(..._){const y=a.current;if(!y)return null;const[,...C]=_;let w,E,k,I;if(C.length>=3)w=C[0],E=C[1],k=C[2],I=C[3]||{};else return console.warn("Insufficient arguments for mention completion"),null;const T=y.getPosition(),O=y.getModel().getLineContent(T.lineNumber);let R=T.column-1;for(;R>0&&O.charAt(R-1)!=="@";)R--;const M=new A.Range(T.lineNumber,R,T.lineNumber,T.column);return f(M,k,w,E,I),null}),p.onMouseDown(_=>{if(_.target.type===A.editor.MouseTargetType.CONTENT_TEXT){const y=_.target.position;for(const C of c.current)if(C.range.containsPosition(y)){r&&r(C.type,C.text,C.item);break}}}),p.onDidChangeModelContent(()=>{h()}),H$e||(A.languages.registerCompletionItemProvider("markdown",{triggerCharacters:["@"],provideCompletionItems:async(_,y)=>{const w=_.getLineContent(y.lineNumber).substring(0,y.column-1),E=w.lastIndexOf("@");let k="";E!==-1&&(k=w.substring(E+1)),console.log("提取的查询:",k,"原始文本:",w);const[I,T]=await Promise.all([fetch(`/api/completions/files?name=${encodeURIComponent(k)}`),fetch(`/api/completions/symbols?name=${encodeURIComponent(k)}`)]),[D,O]=await Promise.all([I.json(),T.json()]),R=D.completions.map(F=>{const j={...F,mentionType:"file"};return{label:F.name,kind:A.languages.CompletionItemKind.File,insertText:F.name,detail:"文件",documentation:`路径: ${F.location||F.path}`,command:{id:"editor.acceptedCompletion",title:"选择完成",arguments:[F.name,F.path,"file",j]},insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),M=O.completions.map(F=>{const j={...F,mentionType:"symbol"};return{label:`${F.name}(${F.path})`,kind:A.languages.CompletionItemKind.Function,insertText:`${F.name}(${F.path})`,detail:"符号",documentation:`位置: ${F.path}`,command:{id:"editor.acceptedCompletion",title:"选择完成",arguments:[F.name,F.path,"symbol",j]},insertTextRules:A.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),P=new Map;return[...R,...M].forEach(F=>{const j=`${F.label}-${F.detail}`;P.has(j)||P.set(j,F)}),{suggestions:Array.from(P.values()),incomplete:!0}}}),H$e=!0,console.log("Completion provider registered successfully"))};return S.jsx("div",{className:"w-full relative h-full flex flex-col",children:S.jsx("div",{ref:l,className:`editor-container w-full border border-gray-700 rounded-md overflow-hidden ${n?"h-full flex-grow":"h-[80px]"}`,style:{width:"100%"},children:S.jsx(_h,{height:"100%",defaultLanguage:"markdown",defaultValue:t,theme:"vs-dark",onMount:m,loading:S.jsx("div",{className:"flex items-center justify-center h-full",children:"加载编辑器中..."}),beforeMount:p=>{window.MonacoEnvironment={getWorkerUrl:(A,v)=>"/monaco-editor/min/vs/base/worker/workerMain.js"}},options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"on",lineNumbers:"off",folding:!1,contextmenu:!1,fontFamily:"monospace",fontSize:14,lineHeight:1.5,padding:{top:8,bottom:8},suggestOnTriggerCharacters:!0,quickSuggestions:!1,acceptSuggestionOnEnter:"smart",overviewRulerLanes:0,overviewRulerBorder:!1,fixedOverflowWidgets:!0,quickSuggestionsDelay:100,tabCompletion:"off",find:{addExtraSpaceOnTop:!1},links:!1,readOnly:!1,suggest:{insertMode:"replace",snippetsPreventQuickSuggestions:!0}}})})})};class Fat extends US.EventEmitter{constructor(e){super(),this.eventSource=null,this.streamEvents=new Map,this.lastEventType=null,this.messageId=0,this.currentStreamMessageId=null,this.isStreamingActive=!1,this.eventFileId=null,this.panelId=e}async executeCommand(e){try{const t=await fetch("/api/chat-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e,panel_id:this.panelId})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const i=await t.json();return this.eventFileId=i.event_file_id,this.startEventStream(),{event_file_id:i.event_file_id}}catch(t){throw console.error("Error executing chat command:",t),t}}startEventStream(){if(this.closeEventStream(),!this.eventFileId){console.error("No event file ID available");return}this.eventSource=new EventSource(`/api/chat-command/events?event_file_id=${this.eventFileId}`),this.eventSource.onmessage=e=>{try{const t=JSON.parse(e.data);this.handleEvent(t)}catch(t){console.error("Error parsing event data:",t)}},this.eventSource.onerror=e=>{console.error("EventSource error:",e),this.closeEventStream()}}handleEvent(e){console.log("ChatService: Received event:",e.event_type);let t;const i=Date.now(),r=Kk();switch(e.event_type==="STREAM"?this.lastEventType!=="STREAM"?(t=`chat-${r}-${i}-${this.messageId++}`,this.currentStreamMessageId=t):t=this.currentStreamMessageId||`chat-${r}-${i}-${this.messageId++}`:(t=`chat-${r}-${i}-${this.messageId++}`,this.lastEventType==="STREAM"&&this.currentStreamMessageId&&this.finalizeStreamMessage(this.currentStreamMessageId),this.currentStreamMessageId=null),e.event_type){case"STREAM":this.handleStreamEvent(e,t);break;case"RESULT":this.handleResultEvent(e,t);break;case"ASK_USER":this.handleAskUserEvent(e,t);break;case"USER_RESPONSE":this.handleUserResponseEvent(e,t);break;case"ERROR":this.handleErrorEvent(e,t);break;case"COMPLETION":this.handleCompletionEvent(e,t);break;default:console.warn("Unknown event type:",e.event_type)}this.lastEventType=e.event_type}handleStreamEvent(e,t){const i=e.content;this.isStreamingActive=!0;let r=this.streamEvents.get(t);if(r)r.content+=i.content,r.isThinking=i.is_thinking,r.isStreaming=!0,i.state==="complete"?(r.isStreaming=!1,this.streamEvents.delete(t),console.log("ChatService: Emitting existing message:",r.type,r.id),this.emit("message",r),this.isStreamingActive=!1):(this.streamEvents.set(t,r),console.log("ChatService: Emitting existing message:",r.type,r.id),this.emit("message",r));else{const s={id:t,type:e.event_type,content:i.content,contentType:i.content_type,isThinking:i.is_thinking,isStreaming:!0,eventId:e.event_id,language:i.language,metadata:e.metadata};i.state!=="complete"?this.streamEvents.set(t,s):(s.isStreaming=!1,this.isStreamingActive=!1),console.log("ChatService: Emitting message:",s.type,s.id),this.emit("message",s)}}handleResultEvent(e,t){const i=e.content;let r,s=i.content_type,o={...i.metadata,...e.metadata};typeof i.content=="string"?r=i.content:this.isTokenStatContent(i.content)?(s="token_stat",r=JSON.stringify(i.content),o={...o,model_name:i.content.model_name,elapsed_time:i.content.elapsed_time,first_token_time:i.content.first_token_time,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost,speed:i.content.speed}):this.isSummaryContent(i.content)?(s="summary",r=i.content.summary):this.isIndexBuildStartContent(i.content)?(s="index_build_start",r=`Processing files: ${i.content.file_number}/${i.content.total_files}`,o={...o,file_number:i.content.file_number,total_files:i.content.total_files}):this.isIndexBuildEndContent(i.content)?(s="index_build_end",r=`Index build completed: Updated ${i.content.updated_files} files, Removed ${i.content.removed_files} files`,o={...o,updated_files:i.content.updated_files,removed_files:i.content.removed_files,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost}):this.isCommandPrepareStatContent(i.content)?(s="command_prepare_stat",r=`Command: ${i.content.command}`,o={...o,command:i.content.command,parameters:i.content.parameters}):this.isCommandExecuteStatContent(i.content)?(s="command_execute_stat",r=i.content.content,o={...o,command:i.content.command}):this.isContextUsedContent(i.content)?(s="context_used",r=i.content.description,o={...o,files:i.content.files}):r=JSON.stringify(i.content);const a={id:t,type:e.event_type,content:r,contentType:s,metadata:o,eventId:e.event_id};this.emit("message",a)}isTokenStatContent(e){return e&&typeof e.model_name=="string"&&typeof e.elapsed_time=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isCommandPrepareStatContent(e){return e&&typeof e.command=="string"&&typeof e.parameters=="object"}isSummaryContent(e){return e&&typeof e.summary=="string"}isCommandExecuteStatContent(e){return e&&typeof e.command=="string"&&typeof e.content=="string"}isIndexBuildStartContent(e){return e&&typeof e.file_number=="number"&&typeof e.total_files=="number"}isIndexBuildEndContent(e){return e&&typeof e.updated_files=="number"&&typeof e.removed_files=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isContextUsedContent(e){return e&&Array.isArray(e.files)&&typeof e.title=="string"&&typeof e.description=="string"}handleAskUserEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.prompt,options:i.options,responseRequired:i.required,eventId:e.event_id};this.emit("message",r)}handleUserResponseEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.response,isUser:!0,eventId:e.event_id,responseTo:e.response_to};this.emit("message",r)}handleErrorEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.error_message,metadata:i.details,eventId:e.event_id};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!0)},300)}handleCompletionEvent(e,t){const i=e.content,r=i.result&&typeof i.result=="object"&&"summary"in i.result?i.result.summary:null,s={id:t,type:e.event_type,content:r||i.success_message,eventId:e.event_id,metadata:{success_code:i.success_code,completion_time:i.completion_time,details:i.details,result:i.result}};this.emit("message",s),setTimeout(()=>{this.emit("taskComplete",!1)},300)}finalizeStreamMessage(e){const t=this.streamEvents.get(e);t&&(t.isStreaming=!1,console.log("ChatService: Emitting message:",t.type,t.id),this.emit("message",t),this.streamEvents.delete(e))}closeEventStream(){this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.streamEvents.forEach((e,t)=>{this.finalizeStreamMessage(t)}),this.streamEvents.clear(),this.lastEventType=null,this.currentStreamMessageId=null,this.isStreamingActive=!1}async respondToEvent(e,t){if(!this.eventFileId)throw new Error("No event file ID available");try{const i=await fetch("/api/chat-command/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:e,event_file_id:this.eventFileId,response:t})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`)}catch(i){throw console.error("Error sending response:",i),i}}async saveTaskHistory(e,t,i="completed"){if(!this.eventFileId){console.warn("No event file ID available, cannot save task history");return}try{const r=t.filter(o=>!(o.type==="SYSTEM"||!o.content||o.contentType==="token_stat")),s=await fetch("/api/chat-command/save-history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,event_file_id:this.eventFileId,messages:r,status:i,timestamp:Date.now()})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`)}catch(r){console.error("Error saving task history:",r)}}async cancelTask(){if(!this.eventFileId){console.warn("No event file ID available, cannot cancel task");return}try{const e=await fetch("/api/chat-command/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_file_id:this.eventFileId})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);this.closeEventStream()}catch(e){throw console.error("Error cancelling task:",e),e}}}const vHn=new Fat;class $at extends US.EventEmitter{constructor(e){super(),this.eventSource=null,this.streamEvents=new Map,this.lastEventType=null,this.messageId=0,this.currentStreamMessageId=null,this.isStreamingActive=!1,this.eventFileId=null,this.panelId=e}async executeCommand(e){try{const t=await fetch("/api/coding-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e,panel_id:this.panelId})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const i=await t.json();return this.eventFileId=i.event_file_id,this.startEventStream(),{event_file_id:i.event_file_id}}catch(t){throw console.error("Error executing coding command:",t),t}}startEventStream(){if(this.closeEventStream(),!this.eventFileId){console.error("No event file ID available");return}this.eventSource=new EventSource(`/api/coding-command/events?event_file_id=${this.eventFileId}`),this.eventSource.onmessage=e=>{try{const t=JSON.parse(e.data);this.handleEvent(t)}catch(t){console.error("Error parsing event data:",t)}},this.eventSource.onerror=e=>{console.error("EventSource error:",e),this.closeEventStream()}}handleEvent(e){let t;const i=Date.now(),r=Kk();switch(e.event_type==="STREAM"?this.lastEventType!=="STREAM"?(t=`coding-${r}-${i}-${this.messageId++}`,this.currentStreamMessageId=t):t=this.currentStreamMessageId||`coding-${r}-${i}-${this.messageId++}`:(t=`coding-${r}-${i}-${this.messageId++}`,this.lastEventType==="STREAM"&&this.currentStreamMessageId&&this.finalizeStreamMessage(this.currentStreamMessageId),this.currentStreamMessageId=null),e.event_type){case"STREAM":this.handleStreamEvent(e,t);break;case"RESULT":this.handleResultEvent(e,t);break;case"ASK_USER":this.handleAskUserEvent(e,t);break;case"USER_RESPONSE":this.handleUserResponseEvent(e,t);break;case"ERROR":this.handleErrorEvent(e,t);break;case"COMPLETION":this.handleCompletionEvent(e,t);break;default:console.warn("Unknown event type:",e.event_type)}this.lastEventType=e.event_type}handleStreamEvent(e,t){const i=e.content;this.isStreamingActive=!0;let r=this.streamEvents.get(t);if(r)r.content+=i.content,r.isThinking=i.is_thinking,r.isStreaming=!0,i.state==="complete"?(r.isStreaming=!1,this.streamEvents.delete(t),this.emit("message",r),this.isStreamingActive=!1):(this.streamEvents.set(t,r),this.emit("message",r));else{const s={id:t,type:e.event_type,content:i.content,contentType:i.content_type,isThinking:i.is_thinking,isStreaming:!0,eventId:e.event_id,language:i.language,metadata:e.metadata};i.state!=="complete"?this.streamEvents.set(t,s):(s.isStreaming=!1,this.isStreamingActive=!1),this.emit("message",s)}}handleResultEvent(e,t){const i=e.content;console.log("原始消息",e);let r,s=i.content_type,o={...i.metadata,...e.metadata};typeof i.content=="string"?r=i.content:this.isTokenStatContent(i.content)?(s="token_stat",r=JSON.stringify(i.content),o={...o,model_name:i.content.model_name,elapsed_time:i.content.elapsed_time,first_token_time:i.content.first_token_time,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost,speed:i.content.speed}):this.isSummaryContent(i.content)?(s="summary",r=i.content.summary):this.isIndexBuildStartContent(i.content)?(s="index_build_start",r=`Processing files: ${i.content.file_number}/${i.content.total_files}`,o={...o,file_number:i.content.file_number,total_files:i.content.total_files}):this.isIndexBuildEndContent(i.content)?(s="index_build_end",r=`Index build completed: Updated ${i.content.updated_files} files, Removed ${i.content.removed_files} files`,o={...o,updated_files:i.content.updated_files,removed_files:i.content.removed_files,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost}):this.isCommandPrepareStatContent(i.content)?(s="command_prepare_stat",r=`Command: ${i.content.command}`,o={...o,command:i.content.command,parameters:i.content.parameters}):this.isCommandExecuteStatContent(i.content)?(s="command_execute_stat",r=i.content.content,o={...o,command:i.content.command}):this.isContextUsedContent(i.content)?(s="context_used",r=i.content.description,o={...o,files:i.content.files}):r=JSON.stringify(i.content);const a={id:t,type:e.event_type,content:r,contentType:s,metadata:o,eventId:e.event_id};console.log("处理过后的",a),this.emit("message",a)}isTokenStatContent(e){return e&&typeof e.model_name=="string"&&typeof e.elapsed_time=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isCommandPrepareStatContent(e){return e&&typeof e.command=="string"&&typeof e.parameters=="object"}isSummaryContent(e){return e&&typeof e.summary=="string"}isCommandExecuteStatContent(e){return e&&typeof e.command=="string"&&typeof e.content=="string"}isIndexBuildStartContent(e){return e&&typeof e.file_number=="number"&&typeof e.total_files=="number"}isIndexBuildEndContent(e){return e&&typeof e.updated_files=="number"&&typeof e.removed_files=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isContextUsedContent(e){return e&&Array.isArray(e.files)&&typeof e.title=="string"&&typeof e.description=="string"}handleAskUserEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.prompt,options:i.options,responseRequired:i.required,eventId:e.event_id};this.emit("message",r)}handleUserResponseEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.response,isUser:!0,eventId:e.event_id,responseTo:e.response_to};this.emit("message",r)}handleErrorEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.error_message,metadata:i.details,eventId:e.event_id};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!0),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!1,event_file_id:this.eventFileId})},300)}handleCompletionEvent(e,t){const i=e.content,r=i.result&&typeof i.result=="object"&&"summary"in i.result?i.result.summary:null,s={id:t,type:e.event_type,content:r||i.success_message,eventId:e.event_id,metadata:{success_code:i.success_code,completion_time:i.completion_time,details:i.details,result:i.result,isWrite:!0}};this.emit("message",s),setTimeout(()=>{this.emit("taskComplete",!1),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!0,event_file_id:this.eventFileId})},300)}finalizeStreamMessage(e){const t=this.streamEvents.get(e);t&&(t.isStreaming=!1,this.emit("message",t),this.streamEvents.delete(e))}closeEventStream(){this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.streamEvents.forEach((e,t)=>{this.finalizeStreamMessage(t)}),this.streamEvents.clear(),this.lastEventType=null,this.currentStreamMessageId=null,this.isStreamingActive=!1}async respondToEvent(e,t){if(!this.eventFileId)throw new Error("No event file ID available");try{const i=await fetch("/api/coding-command/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:e,event_file_id:this.eventFileId,response:t})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`)}catch(i){throw console.error("Error sending response:",i),i}}async saveTaskHistory(e,t,i="completed"){if(!this.eventFileId){console.warn("No event file ID available, cannot save task history");return}try{const r=t.filter(o=>!(o.type==="SYSTEM"||!o.content||o.contentType==="token_stat")),s=await fetch("/api/coding-command/save-history",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,event_file_id:this.eventFileId,messages:r,status:i,timestamp:Date.now()})});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`)}catch(r){console.error("Error saving task history:",r)}}async cancelTask(){if(!this.eventFileId){console.warn("No event file ID available, cannot cancel task");return}try{const e=await fetch("/api/coding-command/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_file_id:this.eventFileId})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);this.closeEventStream()}catch(e){throw console.error("Error cancelling task:",e),e}}}const bHn=new $at;class Hat extends US.EventEmitter{constructor(e){super(),this.eventSource=null,this.streamEvents=new Map,this.lastEventType=null,this.messageId=0,this.currentStreamMessageId=null,this.isStreamingActive=!1,this.eventFileId=null,this.panelId=e}async executeCommand(e,t=!1){try{const i=await fetch("/api/auto-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e,include_conversation_history:t,panel_id:this.panelId})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const r=await i.json();return this.eventFileId=r.event_file_id,this.startEventStream(),{event_file_id:r.event_file_id}}catch(i){throw console.error("Error executing command:",i),i}}startEventStream(){if(this.closeEventStream(),!this.eventFileId){console.error("No event file ID available");return}this.eventSource=new EventSource(`/api/auto-command/events?event_file_id=${this.eventFileId}`),this.eventSource.onmessage=e=>{try{const t=JSON.parse(e.data);this.handleEvent(t)}catch(t){console.error("Error parsing event data:",t)}},this.eventSource.onerror=e=>{console.error("EventSource error:",e),this.closeEventStream()}}handleEvent(e){let t;const i=Kk(),r=Date.now();switch(e.event_type==="STREAM"?this.lastEventType!=="STREAM"?(t=`agentic-${i}-${r}-${this.messageId++}`,this.currentStreamMessageId=t):t=this.currentStreamMessageId||`agentic-${i}-${r}-${this.messageId++}`:(t=`agentic-${i}-${r}-${this.messageId++}`,this.lastEventType==="STREAM"&&this.currentStreamMessageId&&this.finalizeStreamMessage(this.currentStreamMessageId),this.currentStreamMessageId=null),e.event_type){case"STREAM":this.handleStreamEvent(e,t);break;case"RESULT":this.handleResultEvent(e,t);break;case"ASK_USER":this.handleAskUserEvent(e,t);break;case"USER_RESPONSE":this.handleUserResponseEvent(e,t);break;case"ERROR":this.handleErrorEvent(e,t);break;case"COMPLETION":this.handleCompletionEvent(e,t);break;default:console.warn("Unknown event type:",e.event_type)}this.lastEventType=e.event_type}handleStreamEvent(e,t){const i=e.content;this.isStreamingActive=!0;let r=this.streamEvents.get(t);if(r)r.content+=i.content,r.isThinking=i.is_thinking,r.isStreaming=!0,i.state==="complete"?(r.isStreaming=!1,this.streamEvents.delete(t),this.emit("message",r),this.isStreamingActive=!1):(this.streamEvents.set(t,r),this.emit("message",r));else{const s={id:t,type:e.event_type,content:i.content,contentType:i.content_type,isThinking:i.is_thinking,isStreaming:!0,eventId:e.event_id,language:i.language,metadata:e.metadata};i.state!=="complete"?this.streamEvents.set(t,s):(s.isStreaming=!1,this.isStreamingActive=!1),this.emit("message",s)}}handleResultEvent(e,t){const i=e.content;let r,s=i.content_type,o={...i.metadata,...e.metadata};typeof i.content=="string"?r=i.content:this.isTokenStatContent(i.content)?(s="token_stat",r=JSON.stringify(i.content),o={...o,model_name:i.content.model_name,elapsed_time:i.content.elapsed_time,first_token_time:i.content.first_token_time,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost,speed:i.content.speed}):this.isSummaryContent(i.content)?(s="summary",r=i.content.summary):this.isIndexBuildStartContent(i.content)?(s="index_build_start",r=`Processing files: ${i.content.file_number}/${i.content.total_files}`,o={...o,file_number:i.content.file_number,total_files:i.content.total_files}):this.isIndexBuildEndContent(i.content)?(s="index_build_end",r=`Index build completed: Updated ${i.content.updated_files} files, Removed ${i.content.removed_files} files`,o={...o,updated_files:i.content.updated_files,removed_files:i.content.removed_files,input_tokens:i.content.input_tokens,output_tokens:i.content.output_tokens,input_cost:i.content.input_cost,output_cost:i.content.output_cost}):this.isCommandPrepareStatContent(i.content)?(s="command_prepare_stat",r=`Command: ${i.content.command}`,o={...o,command:i.content.command,parameters:i.content.parameters}):this.isCommandExecuteStatContent(i.content)?(s="command_execute_stat",r=i.content.content,o={...o,command:i.content.command}):this.isContextUsedContent(i.content)?(s="context_used",r=i.content.description,o={...o,files:i.content.files}):r=JSON.stringify(i.content);const a={id:t,type:e.event_type,content:r,contentType:s,metadata:o,eventId:e.event_id};this.emit("message",a)}isTokenStatContent(e){return e&&typeof e.model_name=="string"&&typeof e.elapsed_time=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isCommandPrepareStatContent(e){return e&&typeof e.command=="string"&&typeof e.parameters=="object"}isSummaryContent(e){return e&&typeof e.summary=="string"}isCommandExecuteStatContent(e){return e&&typeof e.command=="string"&&typeof e.content=="string"}isIndexBuildStartContent(e){return e&&typeof e.file_number=="number"&&typeof e.total_files=="number"}isIndexBuildEndContent(e){return e&&typeof e.updated_files=="number"&&typeof e.removed_files=="number"&&typeof e.input_tokens=="number"&&typeof e.output_tokens=="number"}isContextUsedContent(e){return e&&Array.isArray(e.files)&&typeof e.title=="string"&&typeof e.description=="string"}handleAskUserEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.prompt,options:i.options,responseRequired:i.required,eventId:e.event_id};this.emit("message",r)}handleUserResponseEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.response,isUser:!0,eventId:e.event_id,responseTo:e.response_to};this.emit("message",r)}handleErrorEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.error_message,metadata:i.details,eventId:e.event_id};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!0),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!0,event_file_id:this.eventFileId})},300)}handleCompletionEvent(e,t){const i=e.content,r={id:t,type:e.event_type,content:i.success_message,eventId:e.event_id,metadata:{success_code:i.success_code,completion_time:i.completion_time,details:i.details,result:i.result}};this.emit("message",r),setTimeout(()=>{this.emit("taskComplete",!1),Bn.publish(Mn.CODING.TASK_COMPLETE,{success:!0,event_file_id:this.eventFileId})},1e3)}finalizeStreamMessage(e){const t=this.streamEvents.get(e);t&&(t.isStreaming=!1,t.isThinking=!1,this.streamEvents.delete(e),this.emit("message",t))}closeEventStream(){this.eventSource&&(this.eventSource.close(),this.eventSource=null),Array.from(this.streamEvents.keys()).forEach(e=>{this.finalizeStreamMessage(e)}),this.streamEvents.clear(),this.lastEventType=null,this.currentStreamMessageId=null,this.isStreamingActive=!1}async sendUserResponse(e,t){if(!this.eventFileId)throw new Error("No event file ID available");try{const i=await fetch("/api/auto-command/response",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_id:e,event_file_id:this.eventFileId,response:t})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`)}catch(i){throw console.error("Error sending user response:",i),i}}async cancelTask(){if(!this.eventFileId){console.warn("No event file ID available to cancel task.");return}console.log(`AgenticEditService: Cancelling task with event_file_id: ${this.eventFileId}`);try{const e=await fetch("/api/auto-command/cancel",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_file_id:this.eventFileId})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);console.log(`AgenticEditService: Task cancellation request sent for event_file_id: ${this.eventFileId}`),this.closeEventStream()}catch(e){console.error("Error cancelling agentic edit task:",e)}}}new Hat;class Uat extends US.EventEmitter{constructor(){super(),this.config={human_as_model:!1,extra_conf:{},available_keys:[]},this.fetchConfig(),this.fetchConfigKeys()}getConfig(){return{...this.config}}async fetchConfig(){try{const e=await fetch("/api/conf");if(!e.ok)throw new Error("Failed to fetch configuration");const t=await e.json(),{human_as_model:i,skip_build_index:r,project_type:s,...o}=t.conf;return this.config={...this.config,human_as_model:i==="true",skip_build_index:r==="true",project_type:s,extra_conf:this.convertToStringValues(o)},this.emit("configUpdated",this.config),this.config}catch(e){return console.error("Error fetching config:",e),this.emit("error","Failed to fetch configuration"),null}}convertToStringValues(e){const t={};for(const i in e)t[i]=String(e[i]);return t}async fetchConfigKeys(){try{const e=await fetch("/api/conf/keys");if(!e.ok)throw new Error("Failed to fetch configuration keys");const t=await e.json();return this.config={...this.config,available_keys:t.keys},this.emit("configKeysUpdated",this.config.available_keys),this.config.available_keys}catch(e){return console.error("Error fetching configuration keys:",e),this.emit("error","Failed to fetch configuration keys"),null}}async updateConfig(e,t){try{if(!(await fetch("/api/conf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:String(t)})})).ok)throw new Error("Failed to update configuration");return e==="human_as_model"||e==="skip_build_index"?this.config={...this.config,[e]:!!t}:e==="project_type"?this.config={...this.config,project_type:String(t)}:this.config={...this.config,extra_conf:{...this.config.extra_conf,[e]:String(t)}},this.emit("configUpdated",this.config),!0}catch(i){return console.error("Error updating config:",i),this.emit("error",`Failed to update configuration key: ${e}`),!1}}async reloadConfig(){await this.fetchConfig(),await this.fetchConfigKeys()}}new Uat;class Wat extends US.EventEmitter{constructor(){super(),this.defaultChatName=""}async fetchChatLists(){try{return(await(await fetch("/api/chat-lists")).json()).chat_lists||[]}catch(e){return console.error("Error fetching chat lists:",e),this.emit("error","获取聊天列表失败"),[]}}async getCurrentSessionName(e){try{const t=e?`/api/chat-session/name?panel_id=${encodeURIComponent(e)}`:"/api/chat-session/name",i=await fetch(t);if(!i.ok)throw new Error("Failed to fetch current session name");const r=await i.json();return e?r.session_name?{sessionName:r.session_name,panelId:e}:null:r.session_name||null}catch(t){return console.error("Error getting current session name:",t),null}}async setCurrentSessionName(e,t){if(!e.trim())return!1;try{if(!(await fetch("/api/chat-session/name",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_name:e,panel_id:t||""})})).ok)throw new Error("Failed to set current session name");return!0}catch(i){return console.error("Error setting current session name:",i),this.emit("error","设置当前会话名称失败"),!1}}async saveChatList(e,t=[],i,r){if(!e.trim())return this.emit("error","请输入聊天列表名称"),!1;try{const s={name:e,messages:t};if(r!==void 0&&(s.metadata=r),!(await fetch("/api/chat-lists/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok)throw new Error("Failed to save chat list");return await this.setCurrentSessionName(e,i),this.emit("chatListSaved",{name:e,panelId:i}),!0}catch(s){return console.error("Error saving chat list:",s),this.emit("error","保存聊天列表失败"),!1}}async loadChatList(e,t){try{const r=await(await fetch(`/api/chat-lists/${e}`)).json(),s=r.messages.map(o=>"role"in o?{id:o.id||Date.now().toString(),type:o.role==="user"?"USER_RESPONSE":"RESULT",content:o.content,contentType:o.contentType||"markdown",language:o.language,metadata:o.metadata,isUser:o.role==="user",isStreaming:!1,isThinking:!1}:{...o,isStreaming:!1,isThinking:!1,type:o.type||(o.isUser?"USER_RESPONSE":"RESULT"),contentType:o.contentType||"markdown"});return this.emit("chatListLoaded",{name:e,messages:s,metadata:r.metadata,panelId:t}),{messages:s,metadata:r.metadata}}catch(i){return console.error("Error loading chat list:",i),this.emit("error","加载聊天列表失败"),{messages:[],metadata:void 0}}}getChatTitle(e){if(e.length>0){const t=e.find(i=>i.isUser||i.type==="USER_RESPONSE");if(t&&t.content)return t.content.substring(0,4)}return"新聊天"}async deleteChatList(e){try{if(!(await fetch(`/api/chat-lists/${e}`,{method:"DELETE"})).ok)throw new Error("Failed to delete chat list");return this.emit("chatListDeleted",{name:e}),!0}catch(t){return console.error("Error deleting chat list:",t),this.emit("error","删除聊天列表失败"),!1}}async renameChatList(e,t,i){try{if(!t.trim())return this.emit("error","聊天名称不能为空"),!1;const r=await fetch("/api/chat-lists/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({old_name:e,new_name:t})});if(!r.ok){const s=await r.json();throw new Error(s.detail||"Failed to rename chat list")}return this.emit("chatListRenamed",{oldName:e,newName:t,panelId:i}),!0}catch(r){return console.error("Error renaming chat list:",r),this.emit("error",`重命名聊天失败: ${r.message||"未知错误"}`),!1}}async createNewChat(e){const i=`chat_${new Date().toISOString().replace(/[:.]/g,"-")}`;try{if(!await this.saveChatList(i,[],e))throw new Error("Failed to save new chat");return await this.setCurrentSessionName(i,e),this.emit("newChatCreated",{name:i,panelId:e}),i}catch(r){return console.error("Error creating new chat directly:",r),this.emit("error","创建新聊天失败"),null}}}new Wat;class jat extends US.EventEmitter{constructor(){super()}async fetchFileGroups(){try{return(await(await fetch("/api/file-groups")).json()).groups||[]}catch(e){return console.error("Error fetching file groups:",e),this.emit("error","获取文件组失败"),[]}}async switchFileGroups(e,t){try{const i=await fetch("/api/file-groups/switch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({group_names:e,file_paths:t})});if(!i.ok)throw new Error("Failed to switch file groups");const r=await i.json();return this.emit("fileGroupsSwitched",{groupNames:e,filePaths:t}),{success:!0,totalTokens:r.total_tokens,message:r.message}}catch(i){return console.error("Error switching file groups:",i),this.emit("error","切换文件组失败"),{success:!1,totalTokens:0,message:"切换文件组失败"}}}async createFileGroup(e,t=""){try{const i=await fetch("/api/file-groups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,description:t})});if(!i.ok)throw new Error("Failed to create file group");const r=await i.json();return this.emit("fileGroupCreated",{name:e,description:t}),{success:!0,message:r.message}}catch(i){return console.error("Error creating file group:",i),this.emit("error","创建文件组失败"),{success:!1,message:"创建文件组失败"}}}async deleteFileGroup(e){try{const t=await fetch(`/api/file-groups/${e}`,{method:"DELETE"});if(!t.ok)throw new Error("Failed to delete file group");const i=await t.json();return this.emit("fileGroupDeleted",{name:e}),{success:!0,message:i.message}}catch(t){return console.error("Error deleting file group:",t),this.emit("error","删除文件组失败"),{success:!1,message:"删除文件组失败"}}}async addFilesToGroup(e,t){try{const i=await fetch(`/api/file-groups/${e}/files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:t})});if(!i.ok)throw new Error("Failed to add files to group");const r=await i.json();return this.emit("filesAddedToGroup",{groupName:e,files:t}),{success:!0,message:r.message}}catch(i){return console.error("Error adding files to group:",i),this.emit("error","向文件组添加文件失败"),{success:!1,message:"向文件组添加文件失败"}}}async removeFilesFromGroup(e,t){try{const i=await fetch(`/api/file-groups/${e}/files`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:t})});if(!i.ok)throw new Error("Failed to remove files from group");const r=await i.json();return this.emit("filesRemovedFromGroup",{groupName:e,files:t}),{success:!0,message:r.message}}catch(i){return console.error("Error removing files from group:",i),this.emit("error","从文件组移除文件失败"),{success:!1,message:"从文件组移除文件失败"}}}async clearCurrentFiles(){try{const e=await fetch("/api/file-groups/clear",{method:"POST"});if(!e.ok)throw new Error("Failed to clear current files");const t=await e.json();return this.emit("currentFilesCleared"),{success:!0,message:t.message}}catch(e){return console.error("Error clearing current files:",e),this.emit("error","清空当前文件上下文失败"),{success:!1,message:"清空当前文件上下文失败"}}}async autoCreateGroups(e={fileSizeLimit:100,skipDiff:!1,groupNumLimit:10}){try{const t=await fetch("/api/file-groups/auto",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_size_limit:e.fileSizeLimit,skip_diff:e.skipDiff,group_num_limit:e.groupNumLimit})});if(!t.ok)throw new Error("Failed to auto create file groups");const i=await t.json();return this.emit("fileGroupsAutoCreated",i.groups),{success:!0,groups:i.groups||[],message:i.message}}catch(t){return console.error("Error auto creating file groups:",t),this.emit("error","自动创建文件组失败"),{success:!1,groups:[],message:"自动创建文件组失败"}}}}new jat;const f0=class f0{static getChatService(e){if(this.chatServices.has(e))try{const i=this.chatServices.get(e);i&&i.closeEventStream()}catch(i){console.error(`Error closing event stream for chat service panel ${e}:`,i)}const t=new Fat(e);return this.chatServices.set(e,t),t}static getCodingService(e){if(this.codingServices.has(e))try{const i=this.codingServices.get(e);i&&i.closeEventStream()}catch(i){console.error(`Error closing event stream for coding service panel ${e}:`,i)}const t=new $at(e);return this.codingServices.set(e,t),t}static getAgenticEditService(e){if(this.agenticEditServices.has(e))try{const i=this.agenticEditServices.get(e);i&&i.closeEventStream()}catch(i){console.error(`Error closing event stream for panel ${e}:`,i)}const t=new Hat(e);return this.agenticEditServices.set(e,t),t}static getAutoCoderConfService(e){const t=new Uat;return this.autoCoderConfServices.set(e,t),t}static getChatListService(e){const t=new Wat;return this.chatListServices.set(e,t),t}static getFileGroupService(e){const t=new jat;return this.fileGroupServices.set(e,t),t}};f0.chatServices=new Map,f0.codingServices=new Map,f0.agenticEditServices=new Map,f0.autoCoderConfServices=new Map,f0.chatListServices=new Map,f0.fileGroupServices=new Map;let iv=f0;const _Hn=({fileGroups:n,selectedGroups:e,setSelectedGroups:t,fetchFileGroups:i,panelId:r=""})=>{const s=iv.getFileGroupService(r),[o,a]=b.useState([]),[l,c]=b.useState([]),[u,d]=b.useState(""),[h,f]=b.useState(!1),[g,m]=b.useState([]),[p,A]=b.useState(0),v=b.useRef(null),_=b.useRef(new Set);b.useEffect(()=>{const M=()=>{v.current&&(v.current.focus(),_t.info(J("focusInput"),1))},P=Bn.subscribe(Mn.FILE_GROUP_SELECT.FOCUS,M);return()=>{P()}},[]),b.useEffect(()=>{const M=F=>{console.log(F);const j=F;if(j.length>0){const W=j.map(K=>({path:K.path,display:K.text}));m(W),_.current=new Set(W.map(K=>K.path));const H=W.map(K=>K.path),$=[...l];let U=!1;H.forEach(K=>{$.includes(K)||($.push(K),U=!0)}),U&&T(e,$)}},P=Bn.subscribe(Mn.EDITOR.MENTIONS_CHANGED,M);return()=>{P()}},[e,l]);const y=b.useCallback((M,P=40)=>{const F=M.substring(0,M.lastIndexOf("/"));return F.length>P?"..."+F.slice(-P):F},[]),[C,w]=b.useState([]),[E,k]=b.useState(-1);b.useEffect(()=>{const M=Bn.subscribe(Mn.EDITOR.TABS_CHANGED,P=>{console.log(J("editorTabsChanged"),P),w(P)});return()=>M()},[]);const I=async M=>{if(M.length<2){a([]);return}try{const F=await(await fetch(`/api/completions/files?name=${encodeURIComponent(M)}`)).json();a(F.completions||[])}catch(P){console.error(J("errorFetchingCompletions"),P)}},T=(M,P)=>{const F=Array.from(new Set(M)),j=Array.from(new Set(P));t(F),c(j),s.switchFileGroups(F,j).then(W=>{W.totalTokens!==void 0&&A(W.totalTokens),Bn.publish(Mn.FILE_GROUP_SELECT.SELECTION_UPDATED,new son(F,j,r)),console.log("Published file group selection updated event",F,j)}).catch(W=>{console.error(J("errorUpdatingSelection"),W)})},D=M=>{if(!h)return;const P=o.length+(C.length>0&&u.length<2?C.length:0)+(g.length>0&&u.length<2?g.length:0)+n.length;switch(M.key){case"ArrowDown":if(M.preventDefault(),M.stopPropagation(),P===0)return;k(F=>{const j=F>=P-1?0:F+1;return console.log(`移动到下一个选项: ${j}`),j});break;case"ArrowUp":if(M.preventDefault(),M.stopPropagation(),P===0)return;k(F=>{const j=F<=0?P-1:F-1;return console.log(`移动到上一个选项: ${j}`),j});break;case"Enter":E>=0&&(M.preventDefault(),M.stopPropagation(),O(E),console.log(`选中选项: ${E}`));break;case"Tab":E>=0&&(M.preventDefault(),M.stopPropagation(),O(E),console.log(`选中选项: ${E}`));break;case"Escape":M.preventDefault(),M.stopPropagation(),f(!1),d(""),k(-1),console.log("关闭下拉菜单");break}},O=M=>{let P=M,F="";if(o.length>0&&P<o.length?F=o[P].path:(P-=o.length,C.length>0&&u.length<2&&P<C.length?F=C[P].path:(P-=C.length>0&&u.length<2?C.length:0,g.length>0&&u.length<2&&P<g.length?F=g[P].path:(P-=g.length>0&&u.length<2?g.length:0,P<n.length&&(F=n[P].name)))),F){if(n.some(W=>W.name===F)){const W=[...e];W.includes(F)||W.push(F),T(W,l)}else{const W=[...l];W.includes(F)||W.push(F),T(e,W)}if(f(!1),d(""),k(-1),v.current)try{v.current.focus(),v.current.clearInput&&v.current.clearInput(),setTimeout(()=>{if(v.current&&v.current.selector){const W=v.current.selector.querySelector(".ant-select-selection-search-input");W&&(W.value="",W.focus())}},50)}catch(W){console.error("Error clearing search box:",W)}}},R=M=>M.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return S.jsxs("div",{className:"px-1 w-full",onKeyDown:D,children:[S.jsx("div",{className:"h-[1px] bg-gray-700/50 my-0.5 w-full"}),S.jsx("div",{className:"flex items-center justify-between w-full mb-1",children:S.jsxs("span",{className:"text-xs text-gray-400 flex items-center",children:[S.jsx("span",{className:"mr-1",children:"Tokens:"}),S.jsx("span",{className:"font-medium text-green-400",children:R(p)})]})}),S.jsxs("div",{className:"flex items-center gap-1 w-full",children:[S.jsxs(Di,{ref:v,mode:"multiple",style:{width:"100%",background:"#1f2937",borderColor:"#374151",color:"#e5e7eb",minHeight:"28px",height:"auto",fontSize:"12px",flex:"1 1 auto"},maxTagCount:20,maxTagTextLength:30,maxTagPlaceholder:M=>J("moreFiles",{count:String(M.length)}),placeholder:J("fileGroupSelectPlaceholder"),value:[...e,...l],onFocus:()=>{i(),f(!0),k(-1)},onBlur:M=>{const P=M.relatedTarget;P&&(P.classList.contains("ant-select-item")||P.closest(".ant-select-dropdown"))||setTimeout(()=>{f(!1),k(-1),d("")},100)},open:h,onSearch:M=>{d(M),I(M),k(-1)},onDropdownVisibleChange:M=>{f(M),M?setTimeout(()=>{if(v.current&&v.current.selector){const P=v.current.selector.querySelector(".ant-select-selection-search-input");P&&P.focus()}},10):(k(-1),d(""),setTimeout(()=>{if(v.current&&v.current.selector){const P=v.current.selector.querySelector(".ant-select-selection-search-input");P&&(P.value="",P.focus())}},10))},onChange:M=>{const P=M.filter(j=>n.some(W=>W.name===j)),F=M.filter(j=>!n.some(W=>W.name===j));T(P,F)},listItemHeight:28,listHeight:320,menuItemSelectedIcon:null,filterOption:(M,P)=>{if(!P)return!1;const F=typeof P.label=="string"?P.label:"",j=typeof P.value=="string"?P.value:"";return F.toLowerCase().includes(M.toLowerCase())||j.toLowerCase().includes(M.toLowerCase())},optionFilterProp:"label",className:"custom-select multi-line-select keyboard-navigation-select",popupClassName:"dark-dropdown-menu keyboard-navigation-dropdown",dropdownStyle:{backgroundColor:"#1f2937",borderColor:"#374151",fontSize:"12px"},showSearch:!0,tabIndex:0,autoClearSearchValue:!0,getPopupContainer:()=>document.body,tagRender:M=>{const{label:P,value:F,closable:j,onClose:W}=M,H=n.some(U=>U.name===F);let $=null;return F&&(H?$=F:F.includes("/")?$=F.split("/").pop():F.includes("\\")?$=F.split("\\").pop():$=F),S.jsxs("span",{className:`inline-flex items-center m-0.5 px-1 py-0.5 rounded text-xs ${H?"bg-blue-700 text-blue-100":"bg-gray-700 text-gray-200"}`,style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:"1.2"},title:F,children:[H?S.jsxs("span",{className:"flex items-center",children:[S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),S.jsx("span",{children:P})]}):S.jsxs("span",{className:"flex items-center",children:[S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),S.jsx("span",{children:$})]}),j&&S.jsx("span",{className:"cursor-pointer text-gray-400 hover:text-gray-200 ml-0.5",onClick:W,children:"×"})]})},dropdownRender:M=>S.jsx("div",{className:"keyboard-navigation-menu",children:M}),onKeyDown:M=>{(M.metaKey||M.ctrlKey)&&M.key==="i"?(M.preventDefault(),M.stopPropagation(),Bn.publish(Mn.EDITOR.FOCUS)):M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),f(!1))},children:[o.length>0&&S.jsx(Di.OptGroup,{label:J("searchResults"),children:o.map((M,P)=>S.jsx(Di.Option,{value:M.path,label:M.display,className:`file-option ${E===P?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",title:M.path,children:[S.jsxs("span",{className:"text-gray-200 text-xs",children:[M.display," (",y(M.path),")"]}),S.jsx("span",{className:"text-gray-400 text-[10px]",children:J("fileType")})]})},M.path))}),C.length>0&&u.length<2&&S.jsx(Di.OptGroup,{label:S.jsxs("div",{className:"flex justify-between items-center",children:[S.jsx("span",{children:J("openedFiles")}),S.jsx("button",{className:"text-xs text-blue-400 hover:text-blue-300 px-1 py-0 rounded",onClick:M=>{M.stopPropagation();const P=C.map(j=>j.path);if(P.every(j=>l.includes(j))){const j=l.filter(W=>!P.includes(W));T(e,j)}else{const j=[...l.filter(W=>!P.includes(W)),...P];T(e,j)}},children:S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-check-square",children:[S.jsx("polyline",{points:"9 11 12 14 22 4"}),S.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})})]}),children:C.map((M,P)=>{const F=M.label||M.path.split("/").pop()||M.path,j=o.length+P;return S.jsx(Di.Option,{value:M.path,label:F,className:`file-option ${E===j?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",title:M.path,children:[S.jsxs("span",{className:`text-xs ${M.isSelected?"text-white font-medium":"text-gray-200"}`,children:[F," (",y(M.path),")"]}),S.jsx("span",{className:`text-[10px] ${M.isSelected?"text-green-400":"text-green-600/70"}`,children:J(M.isSelected?"fileStatusActive":"fileStatusOpened")})]})},`opened-${M.path}`)})}),n.map((M,P)=>{const F=o.length+(C.length>0&&u.length<2?C.length:0)+(g.length>0&&u.length<2?g.length:0)+P;return S.jsx(Di.Option,{value:M.name,label:M.name,className:`file-option ${E===F?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",children:[S.jsx("span",{className:"text-gray-200 text-xs",children:M.name}),S.jsx("span",{className:"text-gray-400 text-[10px]",children:J("fileCount",{count:String(M.files.length)})})]})},M.name)}),g.length>0&&u.length<2&&S.jsx(Di.OptGroup,{label:J("mentionedFiles"),children:g.map((M,P)=>{const F=o.length+(C.length>0&&u.length<2?C.length:0)+P;return S.jsx(Di.Option,{value:M.path,label:M.display,className:`file-option ${E===F?"keyboard-focused-option":""}`,children:S.jsxs("div",{className:"flex justify-between items-center",title:M.path,children:[S.jsxs("span",{className:"text-gray-200 text-xs",children:[M.display," (",y(M.path,20),")"]}),S.jsx("span",{className:"text-blue-400 text-[10px]",children:J("mentionedFileStatus")})]})},`mention-${M.path}`)})})]}),S.jsx(xje,{className:"text-gray-400 hover:text-gray-200 cursor-pointer text-sm",onClick:async()=>{try{(await s.clearCurrentFiles()).success&&(t([]),c([]),i())}catch(M){console.error(J("clearFailed"),M)}},title:J("clearContext")})]})]})};function zat(n,e){return function(){return n.apply(e,arguments)}}const{toString:yHn}=Object.prototype,{getPrototypeOf:pCe}=Object,{iterator:WK,toStringTag:Vat}=Symbol,jK=(n=>e=>{const t=yHn.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),xp=n=>(n=n.toLowerCase(),e=>jK(e)===n),zK=n=>e=>typeof e===n,{isArray:JI}=Array,BB=zK("undefined");function CHn(n){return n!==null&&!BB(n)&&n.constructor!==null&&!BB(n.constructor)&&Fd(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Kat=xp("ArrayBuffer");function wHn(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Kat(n.buffer),e}const SHn=zK("string"),Fd=zK("function"),Gat=zK("number"),VK=n=>n!==null&&typeof n=="object",xHn=n=>n===!0||n===!1,O$=n=>{if(jK(n)!=="object")return!1;const e=pCe(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Vat in n)&&!(WK in n)},EHn=xp("Date"),kHn=xp("File"),LHn=xp("Blob"),IHn=xp("FileList"),THn=n=>VK(n)&&Fd(n.pipe),NHn=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Fd(n.append)&&((e=jK(n))==="formdata"||e==="object"&&Fd(n.toString)&&n.toString()==="[object FormData]"))},DHn=xp("URLSearchParams"),[RHn,MHn,OHn,BHn]=["ReadableStream","Request","Response","Headers"].map(xp),PHn=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bP(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),JI(n))for(i=0,r=n.length;i<r;i++)e.call(null,n[i],i,n);else{const s=t?Object.getOwnPropertyNames(n):Object.keys(n),o=s.length;let a;for(i=0;i<o;i++)a=s[i],e.call(null,n[a],a,n)}}function qat(n,e){e=e.toLowerCase();const t=Object.keys(n);let i=t.length,r;for(;i-- >0;)if(r=t[i],e===r.toLowerCase())return r;return null}const d1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qat=n=>!BB(n)&&n!==d1;function eme(){const{caseless:n}=Qat(this)&&this||{},e={},t=(i,r)=>{const s=n&&qat(e,r)||r;O$(e[s])&&O$(i)?e[s]=eme(e[s],i):O$(i)?e[s]=eme({},i):JI(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&bP(arguments[i],t);return e}const FHn=(n,e,t,{allOwnKeys:i}={})=>(bP(e,(r,s)=>{t&&Fd(r)?n[s]=zat(r,t):n[s]=r},{allOwnKeys:i}),n),$Hn=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),HHn=(n,e,t,i)=>{n.prototype=Object.create(e.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},UHn=(n,e,t,i)=>{let r,s,o;const a={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)o=r[s],(!i||i(o,n,e))&&!a[o]&&(e[o]=n[o],a[o]=!0);n=t!==!1&&pCe(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},WHn=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const i=n.indexOf(e,t);return i!==-1&&i===t},jHn=n=>{if(!n)return null;if(JI(n))return n;let e=n.length;if(!Gat(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},zHn=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&pCe(Uint8Array)),VHn=(n,e)=>{const i=(n&&n[WK]).call(n);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(n,s[0],s[1])}},KHn=(n,e)=>{let t;const i=[];for(;(t=n.exec(e))!==null;)i.push(t);return i},GHn=xp("HTMLFormElement"),qHn=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,r){return i.toUpperCase()+r}),U$e=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),QHn=xp("RegExp"),Yat=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),i={};bP(t,(r,s)=>{let o;(o=e(r,s,n))!==!1&&(i[s]=o||r)}),Object.defineProperties(n,i)},YHn=n=>{Yat(n,(e,t)=>{if(Fd(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=n[t];if(Fd(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},XHn=(n,e)=>{const t={},i=r=>{r.forEach(s=>{t[s]=!0})};return JI(n)?i(n):i(String(n).split(e)),t},ZHn=()=>{},JHn=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function e7n(n){return!!(n&&Fd(n.append)&&n[Vat]==="FormData"&&n[WK])}const t7n=n=>{const e=new Array(10),t=(i,r)=>{if(VK(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=JI(i)?[]:{};return bP(i,(o,a)=>{const l=t(o,r+1);!BB(l)&&(s[a]=l)}),e[r]=void 0,s}}return i};return t(n,0)},n7n=xp("AsyncFunction"),i7n=n=>n&&(VK(n)||Fd(n))&&Fd(n.then)&&Fd(n.catch),Xat=((n,e)=>n?setImmediate:e?((t,i)=>(d1.addEventListener("message",({source:r,data:s})=>{r===d1&&s===t&&i.length&&i.shift()()},!1),r=>{i.push(r),d1.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Fd(d1.postMessage)),r7n=typeof queueMicrotask<"u"?queueMicrotask.bind(d1):typeof process<"u"&&process.nextTick||Xat,s7n=n=>n!=null&&Fd(n[WK]),Bt={isArray:JI,isArrayBuffer:Kat,isBuffer:CHn,isFormData:NHn,isArrayBufferView:wHn,isString:SHn,isNumber:Gat,isBoolean:xHn,isObject:VK,isPlainObject:O$,isReadableStream:RHn,isRequest:MHn,isResponse:OHn,isHeaders:BHn,isUndefined:BB,isDate:EHn,isFile:kHn,isBlob:LHn,isRegExp:QHn,isFunction:Fd,isStream:THn,isURLSearchParams:DHn,isTypedArray:zHn,isFileList:IHn,forEach:bP,merge:eme,extend:FHn,trim:PHn,stripBOM:$Hn,inherits:HHn,toFlatObject:UHn,kindOf:jK,kindOfTest:xp,endsWith:WHn,toArray:jHn,forEachEntry:VHn,matchAll:KHn,isHTMLForm:GHn,hasOwnProperty:U$e,hasOwnProp:U$e,reduceDescriptors:Yat,freezeMethods:YHn,toObjectSet:XHn,toCamelCase:qHn,noop:ZHn,toFiniteNumber:JHn,findKey:qat,global:d1,isContextDefined:Qat,isSpecCompliantForm:e7n,toJSONObject:t7n,isAsyncFn:n7n,isThenable:i7n,setImmediate:Xat,asap:r7n,isIterable:s7n};function Ir(n,e,t,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}Bt.inherits(Ir,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Bt.toJSONObject(this.config),code:this.code,status:this.status}}});const Zat=Ir.prototype,Jat={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Jat[n]={value:n}});Object.defineProperties(Ir,Jat);Object.defineProperty(Zat,"isAxiosError",{value:!0});Ir.from=(n,e,t,i,r,s)=>{const o=Object.create(Zat);return Bt.toFlatObject(n,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Ir.call(o,n.message,e,t,i,r),o.cause=n,o.name=n.name,s&&Object.assign(o,s),o};const o7n=null;function tme(n){return Bt.isPlainObject(n)||Bt.isArray(n)}function elt(n){return Bt.endsWith(n,"[]")?n.slice(0,-2):n}function W$e(n,e,t){return n?n.concat(e).map(function(r,s){return r=elt(r),!t&&s?"["+r+"]":r}).join(t?".":""):e}function a7n(n){return Bt.isArray(n)&&!n.some(tme)}const l7n=Bt.toFlatObject(Bt,{},null,function(e){return/^is[A-Z]/.test(e)});function KK(n,e,t){if(!Bt.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Bt.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!Bt.isUndefined(p[m])});const i=t.metaTokens,r=t.visitor||u,s=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&Bt.isSpecCompliantForm(e);if(!Bt.isFunction(r))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(Bt.isDate(g))return g.toISOString();if(!l&&Bt.isBlob(g))throw new Ir("Blob is not supported. Use a Buffer instead.");return Bt.isArrayBuffer(g)||Bt.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,m,p){let A=g;if(g&&!p&&typeof g=="object"){if(Bt.endsWith(m,"{}"))m=i?m:m.slice(0,-2),g=JSON.stringify(g);else if(Bt.isArray(g)&&a7n(g)||(Bt.isFileList(g)||Bt.endsWith(m,"[]"))&&(A=Bt.toArray(g)))return m=elt(m),A.forEach(function(_,y){!(Bt.isUndefined(_)||_===null)&&e.append(o===!0?W$e([m],y,s):o===null?m:m+"[]",c(_))}),!1}return tme(g)?!0:(e.append(W$e(p,m,s),c(g)),!1)}const d=[],h=Object.assign(l7n,{defaultVisitor:u,convertValue:c,isVisitable:tme});function f(g,m){if(!Bt.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),Bt.forEach(g,function(A,v){(!(Bt.isUndefined(A)||A===null)&&r.call(e,A,Bt.isString(v)?v.trim():v,m,h))===!0&&f(A,m?m.concat(v):[v])}),d.pop()}}if(!Bt.isObject(n))throw new TypeError("data must be an object");return f(n),e}function j$e(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function mCe(n,e){this._pairs=[],n&&KK(n,this,e)}const tlt=mCe.prototype;tlt.append=function(e,t){this._pairs.push([e,t])};tlt.toString=function(e){const t=e?function(i){return e.call(this,i,j$e)}:j$e;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function c7n(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nlt(n,e,t){if(!e)return n;const i=t&&t.encode||c7n;Bt.isFunction(t)&&(t={serialize:t});const r=t&&t.serialize;let s;if(r?s=r(e,t):s=Bt.isURLSearchParams(e)?e.toString():new mCe(e,t).toString(i),s){const o=n.indexOf("#");o!==-1&&(n=n.slice(0,o)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}class z$e{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Bt.forEach(this.handlers,function(i){i!==null&&e(i)})}}const ilt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},u7n=typeof URLSearchParams<"u"?URLSearchParams:mCe,d7n=typeof FormData<"u"?FormData:null,h7n=typeof Blob<"u"?Blob:null,f7n={isBrowser:!0,classes:{URLSearchParams:u7n,FormData:d7n,Blob:h7n},protocols:["http","https","file","blob","url","data"]},ACe=typeof window<"u"&&typeof document<"u",nme=typeof navigator=="object"&&navigator||void 0,g7n=ACe&&(!nme||["ReactNative","NativeScript","NS"].indexOf(nme.product)<0),p7n=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",m7n=ACe&&window.location.href||"http://localhost",A7n=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ACe,hasStandardBrowserEnv:g7n,hasStandardBrowserWebWorkerEnv:p7n,navigator:nme,origin:m7n},Symbol.toStringTag,{value:"Module"})),Uc={...A7n,...f7n};function v7n(n,e){return KK(n,new Uc.classes.URLSearchParams,Object.assign({visitor:function(t,i,r,s){return Uc.isNode&&Bt.isBuffer(t)?(this.append(i,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function b7n(n){return Bt.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function _7n(n){const e={},t=Object.keys(n);let i;const r=t.length;let s;for(i=0;i<r;i++)s=t[i],e[s]=n[s];return e}function rlt(n){function e(t,i,r,s){let o=t[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=t.length;return o=!o&&Bt.isArray(r)?r.length:o,l?(Bt.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!a):((!r[o]||!Bt.isObject(r[o]))&&(r[o]=[]),e(t,i,r[o],s)&&Bt.isArray(r[o])&&(r[o]=_7n(r[o])),!a)}if(Bt.isFormData(n)&&Bt.isFunction(n.entries)){const t={};return Bt.forEachEntry(n,(i,r)=>{e(b7n(i),r,t,0)}),t}return null}function y7n(n,e,t){if(Bt.isString(n))try{return(e||JSON.parse)(n),Bt.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(n)}const _P={transitional:ilt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,s=Bt.isObject(e);if(s&&Bt.isHTMLForm(e)&&(e=new FormData(e)),Bt.isFormData(e))return r?JSON.stringify(rlt(e)):e;if(Bt.isArrayBuffer(e)||Bt.isBuffer(e)||Bt.isStream(e)||Bt.isFile(e)||Bt.isBlob(e)||Bt.isReadableStream(e))return e;if(Bt.isArrayBufferView(e))return e.buffer;if(Bt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return v7n(e,this.formSerializer).toString();if((a=Bt.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return KK(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),y7n(e)):e}],transformResponse:[function(e){const t=this.transitional||_P.transitional,i=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Bt.isResponse(e)||Bt.isReadableStream(e))return e;if(e&&Bt.isString(e)&&(i&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Ir.from(a,Ir.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Uc.classes.FormData,Blob:Uc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Bt.forEach(["delete","get","head","post","put","patch"],n=>{_P.headers[n]={}});const C7n=Bt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w7n=n=>{const e={};let t,i,r;return n&&n.split(`
|
1540
1540
|
`).forEach(function(o){r=o.indexOf(":"),t=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!t||e[t]&&C7n[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},V$e=Symbol("internals");function jN(n){return n&&String(n).trim().toLowerCase()}function B$(n){return n===!1||n==null?n:Bt.isArray(n)?n.map(B$):String(n)}function S7n(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(n);)e[i[1]]=i[2];return e}const x7n=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function rse(n,e,t,i,r){if(Bt.isFunction(i))return i.call(this,e,t);if(r&&(e=t),!!Bt.isString(e)){if(Bt.isString(i))return e.indexOf(i)!==-1;if(Bt.isRegExp(i))return i.test(e)}}function E7n(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function k7n(n,e){const t=Bt.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+t,{value:function(r,s,o){return this[i].call(this,e,r,s,o)},configurable:!0})})}let $d=class{constructor(e){e&&this.set(e)}set(e,t,i){const r=this;function s(a,l,c){const u=jN(l);if(!u)throw new Error("header name must be a non-empty string");const d=Bt.findKey(r,u);(!d||r[d]===void 0||c===!0||c===void 0&&r[d]!==!1)&&(r[d||l]=B$(a))}const o=(a,l)=>Bt.forEach(a,(c,u)=>s(c,u,l));if(Bt.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Bt.isString(e)&&(e=e.trim())&&!x7n(e))o(w7n(e),t);else if(Bt.isObject(e)&&Bt.isIterable(e)){let a={},l,c;for(const u of e){if(!Bt.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?Bt.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(a,t)}else e!=null&&s(t,e,i);return this}get(e,t){if(e=jN(e),e){const i=Bt.findKey(this,e);if(i){const r=this[i];if(!t)return r;if(t===!0)return S7n(r);if(Bt.isFunction(t))return t.call(this,r,i);if(Bt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=jN(e),e){const i=Bt.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||rse(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let r=!1;function s(o){if(o=jN(o),o){const a=Bt.findKey(i,o);a&&(!t||rse(i,i[a],a,t))&&(delete i[a],r=!0)}}return Bt.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let i=t.length,r=!1;for(;i--;){const s=t[i];(!e||rse(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const t=this,i={};return Bt.forEach(this,(r,s)=>{const o=Bt.findKey(i,s);if(o){t[o]=B$(r),delete t[s];return}const a=e?E7n(s):String(s).trim();a!==s&&delete t[s],t[a]=B$(r),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Bt.forEach(this,(i,r)=>{i!=null&&i!==!1&&(t[r]=e&&Bt.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
1541
1541
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[V$e]=this[V$e]={accessors:{}}).accessors,r=this.prototype;function s(o){const a=jN(o);i[a]||(k7n(r,o),i[a]=!0)}return Bt.isArray(e)?e.forEach(s):s(e),this}};$d.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Bt.reduceDescriptors($d.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(i){this[t]=i}}});Bt.freezeMethods($d);function sse(n,e){const t=this||_P,i=e||t,r=$d.from(i.headers);let s=i.data;return Bt.forEach(n,function(a){s=a.call(t,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function slt(n){return!!(n&&n.__CANCEL__)}function eT(n,e,t){Ir.call(this,n??"canceled",Ir.ERR_CANCELED,e,t),this.name="CanceledError"}Bt.inherits(eT,Ir,{__CANCEL__:!0});function olt(n,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?n(t):e(new Ir("Request failed with status code "+t.status,[Ir.ERR_BAD_REQUEST,Ir.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function L7n(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function I7n(n,e){n=n||10;const t=new Array(n),i=new Array(n);let r=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=i[s];o||(o=c),t[r]=l,i[r]=c;let d=s,h=0;for(;d!==r;)h+=t[d++],d=d%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),c-o<e)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function T7n(n,e){let t=0,i=1e3/e,r,s;const o=(c,u=Date.now())=>{t=u,r=null,s&&(clearTimeout(s),s=null),n.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-t;d>=i?o(c,u):(r=c,s||(s=setTimeout(()=>{s=null,o(r)},i-d)))},()=>r&&o(r)]}const fU=(n,e,t=3)=>{let i=0;const r=I7n(50,250);return T7n(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-i,c=r(l),u=o<=a;i=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(d)},t)},K$e=(n,e)=>{const t=n!=null;return[i=>e[0]({lengthComputable:t,total:n,loaded:i}),e[1]]},G$e=n=>(...e)=>Bt.asap(()=>n(...e)),N7n=Uc.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Uc.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Uc.origin),Uc.navigator&&/(msie|trident)/i.test(Uc.navigator.userAgent)):()=>!0,D7n=Uc.hasStandardBrowserEnv?{write(n,e,t,i,r,s){const o=[n+"="+encodeURIComponent(e)];Bt.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),Bt.isString(i)&&o.push("path="+i),Bt.isString(r)&&o.push("domain="+r),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(n){const e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function R7n(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function M7n(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function alt(n,e,t){let i=!R7n(e);return n&&(i||t==!1)?M7n(n,e):e}const q$e=n=>n instanceof $d?{...n}:n;function ES(n,e){e=e||{};const t={};function i(c,u,d,h){return Bt.isPlainObject(c)&&Bt.isPlainObject(u)?Bt.merge.call({caseless:h},c,u):Bt.isPlainObject(u)?Bt.merge({},u):Bt.isArray(u)?u.slice():u}function r(c,u,d,h){if(Bt.isUndefined(u)){if(!Bt.isUndefined(c))return i(void 0,c,d,h)}else return i(c,u,d,h)}function s(c,u){if(!Bt.isUndefined(u))return i(void 0,u)}function o(c,u){if(Bt.isUndefined(u)){if(!Bt.isUndefined(c))return i(void 0,c)}else return i(void 0,u)}function a(c,u,d){if(d in e)return i(c,u);if(d in n)return i(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>r(q$e(c),q$e(u),d,!0)};return Bt.forEach(Object.keys(Object.assign({},n,e)),function(u){const d=l[u]||r,h=d(n[u],e[u],u);Bt.isUndefined(h)&&d!==a||(t[u]=h)}),t}const llt=n=>{const e=ES({},n);let{data:t,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=$d.from(o),e.url=nlt(alt(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(Bt.isFormData(t)){if(Uc.hasStandardBrowserEnv||Uc.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Uc.hasStandardBrowserEnv&&(i&&Bt.isFunction(i)&&(i=i(e)),i||i!==!1&&N7n(e.url))){const c=r&&s&&D7n.read(s);c&&o.set(r,c)}return e},O7n=typeof XMLHttpRequest<"u",B7n=O7n&&function(n){return new Promise(function(t,i){const r=llt(n);let s=r.data;const o=$d.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=r,u,d,h,f,g;function m(){f&&f(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout;function A(){if(!p)return;const _=$d.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:_,config:n,request:p};olt(function(E){t(E),m()},function(E){i(E),m()},C),p=null}"onloadend"in p?p.onloadend=A:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(A)},p.onabort=function(){p&&(i(new Ir("Request aborted",Ir.ECONNABORTED,n,p)),p=null)},p.onerror=function(){i(new Ir("Network Error",Ir.ERR_NETWORK,n,p)),p=null},p.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||ilt;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),i(new Ir(y,C.clarifyTimeoutError?Ir.ETIMEDOUT:Ir.ECONNABORTED,n,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&Bt.forEach(o.toJSON(),function(y,C){p.setRequestHeader(C,y)}),Bt.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),a&&a!=="json"&&(p.responseType=r.responseType),c&&([h,g]=fU(c,!0),p.addEventListener("progress",h)),l&&p.upload&&([d,f]=fU(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",f)),(r.cancelToken||r.signal)&&(u=_=>{p&&(i(!_||_.type?new eT(null,n,p):_),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const v=L7n(r.url);if(v&&Uc.protocols.indexOf(v)===-1){i(new Ir("Unsupported protocol "+v+":",Ir.ERR_BAD_REQUEST,n));return}p.send(s||null)})},P7n=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let i=new AbortController,r;const s=function(c){if(!r){r=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof Ir?u:new eT(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,s(new Ir(`timeout ${e} of ms exceeded`,Ir.ETIMEDOUT))},e);const a=()=>{n&&(o&&clearTimeout(o),o=null,n.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),n=null)};n.forEach(c=>c.addEventListener("abort",s));const{signal:l}=i;return l.unsubscribe=()=>Bt.asap(a),l}},F7n=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let i=0,r;for(;i<t;)r=i+e,yield n.slice(i,r),i=r},$7n=async function*(n,e){for await(const t of H7n(n))yield*F7n(t,e)},H7n=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},Q$e=(n,e,t,i)=>{const r=$7n(n,e);let s=0,o,a=l=>{o||(o=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await r.next();if(c){a(),l.close();return}let d=u.byteLength;if(t){let h=s+=d;t(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},GK=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",clt=GK&&typeof ReadableStream=="function",U7n=GK&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),ult=(n,...e)=>{try{return!!n(...e)}catch{return!1}},W7n=clt&&ult(()=>{let n=!1;const e=new Request(Uc.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),Y$e=64*1024,ime=clt&&ult(()=>Bt.isReadableStream(new Response("").body)),gU={stream:ime&&(n=>n.body)};GK&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!gU[e]&&(gU[e]=Bt.isFunction(n[e])?t=>t[e]():(t,i)=>{throw new Ir(`Response type '${e}' is not supported`,Ir.ERR_NOT_SUPPORT,i)})})})(new Response);const j7n=async n=>{if(n==null)return 0;if(Bt.isBlob(n))return n.size;if(Bt.isSpecCompliantForm(n))return(await new Request(Uc.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Bt.isArrayBufferView(n)||Bt.isArrayBuffer(n))return n.byteLength;if(Bt.isURLSearchParams(n)&&(n=n+""),Bt.isString(n))return(await U7n(n)).byteLength},z7n=async(n,e)=>{const t=Bt.toFiniteNumber(n.getContentLength());return t??j7n(e)},V7n=GK&&(async n=>{let{url:e,method:t,data:i,signal:r,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:h}=llt(n);c=c?(c+"").toLowerCase():"text";let f=P7n([r,s&&s.toAbortSignal()],o),g;const m=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let p;try{if(l&&W7n&&t!=="get"&&t!=="head"&&(p=await z7n(u,i))!==0){let C=new Request(e,{method:"POST",body:i,duplex:"half"}),w;if(Bt.isFormData(i)&&(w=C.headers.get("content-type"))&&u.setContentType(w),C.body){const[E,k]=K$e(p,fU(G$e(l)));i=Q$e(C.body,Y$e,E,k)}}Bt.isString(d)||(d=d?"include":"omit");const A="credentials"in Request.prototype;g=new Request(e,{...h,signal:f,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:i,duplex:"half",credentials:A?d:void 0});let v=await fetch(g);const _=ime&&(c==="stream"||c==="response");if(ime&&(a||_&&m)){const C={};["status","statusText","headers"].forEach(I=>{C[I]=v[I]});const w=Bt.toFiniteNumber(v.headers.get("content-length")),[E,k]=a&&K$e(w,fU(G$e(a),!0))||[];v=new Response(Q$e(v.body,Y$e,E,()=>{k&&k(),m&&m()}),C)}c=c||"text";let y=await gU[Bt.findKey(gU,c)||"text"](v,n);return!_&&m&&m(),await new Promise((C,w)=>{olt(C,w,{data:y,headers:$d.from(v.headers),status:v.status,statusText:v.statusText,config:n,request:g})})}catch(A){throw m&&m(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new Ir("Network Error",Ir.ERR_NETWORK,n,g),{cause:A.cause||A}):Ir.from(A,A&&A.code,n,g)}}),rme={http:o7n,xhr:B7n,fetch:V7n};Bt.forEach(rme,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const X$e=n=>`- ${n}`,K7n=n=>Bt.isFunction(n)||n===null||n===!1,dlt={getAdapter:n=>{n=Bt.isArray(n)?n:[n];const{length:e}=n;let t,i;const r={};for(let s=0;s<e;s++){t=n[s];let o;if(i=t,!K7n(t)&&(i=rme[(o=String(t)).toLowerCase()],i===void 0))throw new Ir(`Unknown adapter '${o}'`);if(i)break;r[o||"#"+s]=i}if(!i){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
|
1542
1542
|
`+s.map(X$e).join(`
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: auto_coder_web
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.107
|
4
4
|
Summary: auto-coder.web: A Python Project
|
5
5
|
Author: allwefantasy
|
6
6
|
Classifier: Programming Language :: Python :: 3.10
|
7
7
|
Classifier: Programming Language :: Python :: 3.11
|
8
8
|
Classifier: Programming Language :: Python :: 3.12
|
9
9
|
Description-Content-Type: text/markdown
|
10
|
-
Requires-Dist: auto-coder>=0.1.
|
10
|
+
Requires-Dist: auto-coder>=0.1.375
|
11
11
|
Requires-Dist: aiofiles
|
12
12
|
Requires-Dist: psutil
|
13
13
|
Requires-Dist: watchdog
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.1.105"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/auto_coder_runner_wrapper.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/file_router.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/filecacher.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/common_router/model_router.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/expert_routers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/chat_panels_router.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/coding_router.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/config_router.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/direct_chat_router.py
RENAMED
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/file_command_router.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/index_router.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/rules_router.py
RENAMED
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/settings_router.py
RENAMED
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/routers/upload_router.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{auto_coder_web-0.1.105 → auto_coder_web-0.1.107}/src/auto_coder_web/web/assets/abap-BrgZPUOV.js
RENAMED
File without changes
|