@av-pi-studio/web-client 0.0.112 → 0.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{BinaryFallbackViewer-D5r7plgZ.js → BinaryFallbackViewer-Bkpz8WV_.js} +1 -1
- package/dist/web/assets/{ChatPanel-C49fPd0n.css → ChatPanel-DtQ_LR4Y.css} +1 -1
- package/dist/web/assets/ChatPanel-kbXAj_zX.js +9 -0
- package/dist/web/assets/{CodeView-5RNJ09Tq.js → CodeView-BGmM4Xdz.js} +1 -1
- package/dist/web/assets/FilePanel-_4YNsvO0.js +1 -0
- package/dist/web/assets/{HtmlViewer-BlKWR-Co.js → HtmlViewer-DFstCiC5.js} +1 -1
- package/dist/web/assets/{ImageViewer-WUyWuvmO.js → ImageViewer-BQxrdTlE.js} +1 -1
- package/dist/web/assets/{MarkdownFileViewer-x8oYHLfO.js → MarkdownFileViewer-BGovxRT6.js} +1 -1
- package/dist/web/assets/{ModelProvidersPanel-8rYw0JNb.js → ModelProvidersPanel-DfQW9oP8.js} +1 -1
- package/dist/web/assets/{MoleculeViewerPanel-so-MAWGY.js → MoleculeViewerPanel-u97-c07_.js} +1 -1
- package/dist/web/assets/PdfViewer-BXC1UMNj.js +1 -0
- package/dist/web/assets/PdfViewer-DoOGVn5M.css +1 -0
- package/dist/web/assets/{SettingsDialog-DOPPV_tl.js → SettingsDialog-CINzuD1W.js} +1 -1
- package/dist/web/assets/{SkillsPanel-CFFz1ek7.js → SkillsPanel-Mfgze4oy.js} +1 -1
- package/dist/web/assets/{TerminalPanel-DK6Y6-qM.js → TerminalPanel-CyyoVOMa.js} +1 -1
- package/dist/web/assets/{TextViewer-DiGdbUYg.js → TextViewer-C6Lp03uL.js} +1 -1
- package/dist/web/assets/{VideoViewer-WavuJAEr.js → VideoViewer-hV_glBDT.js} +1 -1
- package/dist/web/assets/ViewersPanel-ZyLSqRdr.js +1 -0
- package/dist/web/assets/{href-resolution-B3tyV0vA.js → href-resolution-DWAlGpSI.js} +1 -1
- package/dist/web/assets/index-DjUHduQf.js +19 -0
- package/dist/web/assets/{markdown-f4n98WCB.js → markdown-ZgA079Q9.js} +4 -4
- package/dist/web/assets/pdf.worker.min-ypFJvUNP.js +53 -0
- package/dist/web/assets/{use-file-download-DCt9_GXp.js → use-file-download-Bc8Kby2g.js} +1 -1
- package/dist/web/assets/{use-file-watch-bihMWgMU.js → use-file-watch-hu9dEdvA.js} +1 -1
- package/dist/web/assets/{use-provider-auth-list-CF2agvn7.js → use-provider-auth-list-BDqjbQx-.js} +1 -1
- package/dist/web/assets/{vendor-icons-CWFUB81y.js → vendor-icons-Dq3K7TC5.js} +83 -63
- package/dist/web/assets/vendor-pdfjs-BrYGnqfM.js +55 -0
- package/dist/web/index.html +2 -2
- package/dist/web/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/dist/web/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/web/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/dist/web/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/LICENSE +36 -0
- package/dist/web/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/Roman.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/V.bcmap +0 -0
- package/dist/web/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/web/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/dist/web/pdfjs/iccs/LICENSE +116 -0
- package/dist/web/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/web/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/web/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/web/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/web/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/web/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/web/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/web/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/web/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/web/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/web/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/web/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/web/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/web/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/web/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
- package/dist/web/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/web/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/dist/web/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/package.json +9 -3
- package/dist/web/assets/ChatPanel-Da3UDslj.js +0 -8
- package/dist/web/assets/FilePanel-ckHGSH_-.js +0 -1
- package/dist/web/assets/ViewersPanel-CcGCSDlE.js +0 -1
- package/dist/web/assets/index-BR7IITFz.js +0 -19
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@av-pi-studio/web-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.114",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"!dist/**/*.map",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@av-pi-studio/client": "^0.0.
|
|
20
|
-
"@av-pi-studio/protocol": "^0.0.
|
|
19
|
+
"@av-pi-studio/client": "^0.0.114",
|
|
20
|
+
"@av-pi-studio/protocol": "^0.0.114",
|
|
21
21
|
"@codemirror/language": "^6.12.4",
|
|
22
22
|
"@codemirror/language-data": "^6.5.2",
|
|
23
23
|
"@codemirror/state": "^6.7.1",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"katex": "^0.18.4",
|
|
48
48
|
"lucide-react": "^0.475.0",
|
|
49
49
|
"mermaid": "^11.16.1",
|
|
50
|
+
"pdfjs-dist": "^6.4.299",
|
|
50
51
|
"qrcode": "^1.5.4",
|
|
51
52
|
"react": "^19.2.7",
|
|
52
53
|
"react-dom": "^19.2.7",
|
|
@@ -59,5 +60,10 @@
|
|
|
59
60
|
"vite": "^6.4.3",
|
|
60
61
|
"zod": "^3.23.0",
|
|
61
62
|
"zustand": "^5.0.14"
|
|
63
|
+
},
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/avatsaev/pi-studio.git",
|
|
67
|
+
"directory": "packages/web-client"
|
|
62
68
|
}
|
|
63
69
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{r as p,j as t}from"./vendor-react-DQUAl2K8.js";import{a as Pt,b as Ft,m as Kt,u as Te}from"./vendor-query-i7fr__Xm.js";import{J as Ce,K as O,M as zt,u as X,N as Ht,I as H,O as $t,Q as Wt,B as L,p as Ut,R as at,S as oe,G as Gt,D as Vt,q as Yt,U as rt,o as Jt,n as Qt,W as Xt,X as Zt,Y as en,m as tn,Z as nn,E as sn,_ as ge,r as Be,$ as qe,a0 as on,a1 as me,h as an,a2 as rn,a3 as pe,a4 as cn,a5 as ln,H as dn,P as Qe}from"./index-BR7IITFz.js";import{L as un,G as mn,S as fn,b as hn,P as pn,E as gn,c as it,d as xe,e as Ee,B as _n,f as ct,C as lt,A as xn,g as vn,h as kn,U as jn,i as dt,j as yn,k as bn,l as Nn,m as Sn,n as Xe,o as Cn,N as wn,p as Dn}from"./vendor-icons-CWFUB81y.js";import{u as Tn}from"./use-provider-auth-list-CF2agvn7.js";import{N as w}from"./vendor-DaF96HbP.js";import{S as ut,M as Re,r as Bn}from"./markdown-f4n98WCB.js";import{D as qn,p as En}from"./DiffView-D1TsZBGe.js";import{R as Ae,T as Le,I as mt}from"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";import"./vendor-highlight-Ddi_n-Jh.js";import"./vendor-markdown-DJUOT8ep.js";import"./href-resolution-B3tyV0vA.js";function ft(e,s){if(s.trim()==="")return e;const n=s.toLowerCase();return e.filter(o=>o.label.toLowerCase().includes(n)||o.description!==void 0&&o.description.toLowerCase().includes(n))}const Rn={shell:it,read:gn,edit:pn,write:hn,search:fn,fetch:mn,task:un};function An(e){return Rn[e.kind]??it}function ht(e){switch(e.kind){case"read":case"write":case"edit":return e.path??null;default:return null}}function Ln(e){return e.kind==="write"||e.kind==="edit"||e.kind==="shell"}function In(e){const s=[];if(e.kind==="edit"&&e.diff)s.push({kind:"diff",patch:e.diff});else{const n=Ce(e);n&&s.push({kind:"code",text:n})}return e.output&&s.push({kind:"code",text:e.output}),s}const Ze={shell:{label:"SHELL",token:"statusInfo"},read:{label:"READ",token:"statusInfo"},write:{label:"WRITE",token:"statusSuccess"},edit:{label:"EDIT",token:"statusWarning"},search:{label:"SEARCH",token:"statusInfo"},fetch:{label:"FETCH",token:"statusInfo"},task:{label:"TASK",token:"foregroundMuted"}};function On(e){return Ze[e.kind]??Ze.task}function Mn(e){if(!e)return{added:0,removed:0};let s=0,n=0;for(const o of e.split(`
|
|
2
|
-
`))o.startsWith("+++")||o.startsWith("---")||(o.startsWith("+")?s++:o.startsWith("-")&&n++);return{added:s,removed:n}}function Pn(e){return e?(e.endsWith(`
|
|
3
|
-
`)?e.slice(0,-1):e).split(`
|
|
4
|
-
`).length:0}const Fn=500;let ye;function Kn(e,s,n,o){clearTimeout(ye),ye=setTimeout(()=>{ye=void 0,e.invalidateQueries({queryKey:["file"]}),e.invalidateQueries({queryKey:["explorer"]}),s&&n&&s.connection.request("checkout_refresh_request",{cwd:n}).catch(()=>{})},Fn)}function zn({sessionId:e,event:s,timestamp:n,client:o,queryClient:r}){const a=O.getState();switch(a.applyStreamEvent(e,s,n),s.kind){case"turn_started":a.setStatus(e,"running");break;case"turn_completed":a.setStatus(e,"idle");break;case"turn_failed":a.setStatus(e,"error");break;case"turn_canceled":a.setStatus(e,"idle");break;case"compaction":s.phase==="completed"&&s.estimatedTokensAfter!==void 0&&zt(e,s.estimatedTokensAfter);break;case"tool_call":{if(s.status==="completed"&&Ln(s.tool)){const c=a.sessions[e],l=(c==null?void 0:c.cwd)||null;Kn(r,o,l,ht(s.tool))}break}}}function Hn(e){const s=X(r=>r.client),n=O(r=>{var a;return((a=r.sessions[e])==null?void 0:a.agentId)??null}),o=Pt();p.useEffect(()=>!s||!n?void 0:s.agent(n).timeline.subscribe((a,c)=>{const l=typeof c.timestamp=="number"?new Date(c.timestamp).toISOString():c.timestamp;zn({sessionId:e,event:a,timestamp:l,client:s,queryClient:o})}),[s,n,e,o])}const pt=64;function be(e){return e.clientHeight>0}function $n(e,s,n,o=pt){switch(s.kind){case"scroll":return be(n)?n.scrollHeight-n.scrollTop-n.clientHeight<=o?{pinned:!0,stick:!1}:{pinned:s.gesture?!1:e,stick:!1}:{pinned:e,stick:!1};case"tail":return{pinned:e,stick:e&&be(n)};case"shown":return{pinned:e,stick:e};case"pin":return{pinned:!0,stick:be(n)}}}function Wn(e){const s=e[e.length-1];return(s==null?void 0:s.kind)==="user"?s.id:null}const Un="_shellRow_1kabp_2",Gn="_rail_1kabp_10",Vn="_disc_1kabp_18",Yn="_connector_1kabp_28",Jn="_content_1kabp_2",Qn="_metaLine_1kabp_40",Xn="_metaTime_1kabp_52",Zn="_forkButton_1kabp_66",z={shellRow:Un,rail:Gn,disc:Vn,connector:Yn,content:Jn,metaLine:Qn,metaTime:Xn,forkButton:Zn};function U({disc:e,discClassName:s,connector:n,meta:o,metaTrailing:r,className:a,children:c}){return t.jsxs("div",{className:z.shellRow,children:[t.jsxs("div",{className:z.rail,children:[t.jsx("span",{className:w(z.disc,s),children:e}),n&&t.jsx("span",{className:z.connector})]}),t.jsxs("div",{className:w(z.content,a),children:[o&&t.jsxs("div",{className:z.metaLine,children:[o,r]}),c]})]})}function et(e){return typeof e=="number"?e:Date.parse(e)}function es(e,s){const n=et(e.entry.createdAt),o=et(s.entry.createdAt);return n!==o?n-o:e.entry.requestId<s.entry.requestId?-1:e.entry.requestId>s.entry.requestId?1:0}function ts(e,s){return[...e.map(o=>({kind:"pending",entry:o})),...s.map(o=>({kind:"resolved",entry:o}))].toSorted(es)}function ns(e){return e.entry.requestId}function gt(e){return e.receivedAt===void 0}const ss=4;function os(e,s){let n=0;const o=e.map(l=>l.kind!=="pending"?{item:l,collapsed:!1}:(n++,{item:l,collapsed:!s&&n>ss})),r=o.filter(l=>l.collapsed).length,a=o.findIndex(l=>l.collapsed),c=[];return o.forEach((l,m)=>{m===a&&c.push({kind:"more",count:r}),c.push({kind:"card",item:l.item,collapsed:l.collapsed})}),c}function as(e,s){if(e.timeoutMs===void 0)return{show:!1,fraction:0,approximate:!1};const n=Ht(e,s)??0;return{show:!0,fraction:Math.max(0,Math.min(1,n/e.timeoutMs)),approximate:e.receivedAt===void 0}}function _t(e){return e==="editor"}const rs="Esc again to dismiss — the extension gets an empty answer";function is(e,s){return s?{kind:"warning",text:rs}:{kind:"keys",segments:[{key:_t(e)?"⇧↵":"↵",label:"submit"},{key:"Esc",label:"dismiss"}]}}function cs(e){return e?{armed:!1,resolve:!0}:{armed:!0,resolve:!1}}const ls=5,ds=40,us=6;function ms(e){return{mode:e.length>=ls||e.some(n=>n.length>ds)?"stack":"row",scrolls:e.length>us}}function we(e){const s=e.split(`
|
|
5
|
-
`),n=[];let o=!1;for(const r of s)if(r===""){if(o)continue;o=!0,n.push("")}else o=!1,n.push(r);return n}function fs(e,s){return{title:we(e),...s!==void 0?{message:we(s)}:{}}}const hs="_askDisc_ffqf1_5",ps="_card_ffqf1_9",gs="_cardInert_ffqf1_41",_s="_askDiscInert_ffqf1_47",xs="_reconnectingNote_ffqf1_52",vs="_reconnectingDot_ffqf1_61",ks="_deadlineBar_ffqf1_71",js="_deadlineApproximate_ffqf1_80",ys="_header_ffqf1_85",bs="_askBadge_ffqf1_16",Ns="_methodName_ffqf1_101",Ss="_title_ffqf1_107",Cs="_titleEmphasised_ffqf1_115",ws="_message_ffqf1_119",Ds="_emptyOptionsNote_ffqf1_127",Ts="_controls_ffqf1_133",Bs="_controlsStack_ffqf1_141",qs="_controlsScroll_ffqf1_148",Es="_optionButton_ffqf1_153",Rs="_field_ffqf1_161",As="_editorField_ffqf1_168",Ls="_rawPayload_ffqf1_176",Is="_resolvedCard_ffqf1_190",Os="_askBadgeNeutral_ffqf1_204",Ms="_resolvedMethodName_ffqf1_209",Ps="_outcome_ffqf1_218",Fs="_outcomeSuccess_ffqf1_229",Ks="_outcomeText_ffqf1_233",zs="_hint_ffqf1_255",Hs="_hintKey_ffqf1_270",$s="_hintSep_ffqf1_278",Ws="_recoveredChip_ffqf1_285",Us="_collapsedPendingCard_ffqf1_297",Gs="_moreRow_ffqf1_303",g={askDisc:hs,card:ps,cardInert:gs,askDiscInert:_s,reconnectingNote:xs,reconnectingDot:vs,deadlineBar:ks,deadlineApproximate:js,header:ys,askBadge:bs,methodName:Ns,title:Ss,titleEmphasised:Cs,message:ws,emptyOptionsNote:Ds,controls:Ts,controlsStack:Bs,controlsScroll:qs,optionButton:Es,field:Rs,editorField:As,rawPayload:Ls,resolvedCard:Is,askBadgeNeutral:Os,resolvedMethodName:Ms,outcome:Ps,outcomeSuccess:Fs,outcomeText:Ks,hint:zs,hintKey:Hs,hintSep:$s,recoveredChip:Ws,collapsedPendingCard:Us,moreRow:Gs},Vs=250,Ys=320;function te(e,s){const n=e[s];return typeof n=="string"?n:void 0}function Js(e,s){const n=e[s];return Array.isArray(n)?n.filter(o=>typeof o=="string"):[]}function Qs({item:e,connector:s,collapsed:n=!1,autoFocus:o=!1,sessionTitle:r}){return e.kind==="resolved"?t.jsx(eo,{entry:e.entry,connector:s}):n?t.jsx(Xs,{entry:e.entry,connector:s}):t.jsx(no,{entry:e.entry,connector:s,autoFocus:o,sessionTitle:r})}function xt(){return t.jsx("span",{className:g.recoveredChip,children:"still waiting"})}function Xs({entry:e,connector:s}){return t.jsx(U,{disc:t.jsx(H,{icon:xe,size:"xs",color:"var(--pi-color-statusWarning)"}),discClassName:g.askDisc,connector:s,children:t.jsxs("div",{className:w(g.resolvedCard,g.collapsedPendingCard),children:[t.jsx("span",{className:g.askBadge,children:"ASK"}),t.jsx("span",{className:g.resolvedMethodName,children:e.method}),gt(e)&&t.jsx(xt,{})]})})}function Zs({count:e,connector:s,onExpand:n}){return t.jsx(U,{disc:t.jsx(H,{icon:xe,size:"xs",color:"var(--pi-color-foregroundMuted)"}),discClassName:g.askDiscInert,connector:s,children:t.jsxs("button",{type:"button",className:g.moreRow,onClick:n,children:[e," more waiting"]})})}function eo({entry:e,connector:s}){const n=$t(e);return t.jsx(U,{disc:t.jsx(H,{icon:xe,size:"xs",color:"var(--pi-color-foregroundMuted)"}),discClassName:g.askDiscInert,connector:s,children:t.jsxs("div",{className:g.resolvedCard,children:[t.jsx("span",{className:w(g.askBadge,g.askBadgeNeutral),children:"ASK"}),t.jsx("span",{className:g.resolvedMethodName,children:e.method}),t.jsxs("span",{className:w(g.outcome,n.tone==="success"&&g.outcomeSuccess),children:[n.glyph==="check"&&t.jsx(Ee,{size:11,"aria-hidden":!0}),t.jsx("span",{className:w(n.truncate&&g.outcomeText),children:n.text})]})]})})}function Z(e,s){return e.answerable?e.submitting?s?{loading:!0,style:{opacity:1}}:{disabled:!0}:{}:{disabled:!0,style:{opacity:1}}}function to({hint:e}){return e.kind==="warning"?t.jsx("p",{className:g.hint,children:e.text}):t.jsx("p",{className:g.hint,children:e.segments.map((s,n)=>t.jsxs(p.Fragment,{children:[n>0&&t.jsx("span",{className:g.hintSep,children:"·"}),t.jsx("span",{className:g.hintKey,children:s.key}),s.label]},s.label))})}function no({entry:e,connector:s,autoFocus:n=!1,sessionTitle:o}){const[r,a]=p.useState(()=>Date.now()),c=as(e,r),[l,m]=p.useState(!1),d=p.useRef(null),h=p.useRef(null),u=p.useRef(null);p.useEffect(()=>{if(!c.show)return;const y=setInterval(()=>a(Date.now()),Vs);return()=>clearInterval(y)},[e.requestId,e.timeoutMs,c.show]),p.useEffect(()=>{var C,M;if(!n||!e.answerable)return;const y=document.activeElement;(y instanceof HTMLTextAreaElement||y instanceof HTMLInputElement)&&y.value.length>0&&!((C=d.current)!=null&&C.contains(y))||(M=h.current)==null||M.focus()},[n,e.answerable]);function x(y){var v,C;e.answerable&&(y.target.closest("button, input, textarea, a, select")||(v=d.current)!=null&&v.contains(document.activeElement)||(C=d.current)==null||C.focus())}function D(y){Wt(e.requestId,y)}function K(y){var C;if(y.key!=="Escape"||!e.answerable)return;y.preventDefault(),y.stopPropagation();const v=cs(l);if(m(v.armed),!v.resolve){(C=u.current)==null||C.focus();return}u.current?u.current.click():D({cancelled:!0})}function $(y){y.currentTarget.contains(y.relatedTarget)||m(!1)}return t.jsxs(U,{disc:t.jsx(H,{icon:xe,size:"xs",color:e.answerable?"var(--pi-color-statusWarning)":"var(--pi-color-foregroundMuted)"}),discClassName:e.answerable?g.askDisc:g.askDiscInert,connector:s,children:[t.jsxs("div",{ref:d,className:w(g.card,!e.answerable&&g.cardInert),role:"group","aria-label":`Question in ${o}`,tabIndex:-1,onKeyDown:K,onMouseDown:x,onBlur:$,children:[c.show&&t.jsx("div",{className:w(g.deadlineBar,c.approximate&&g.deadlineApproximate),style:{width:`${c.fraction*100}%`}}),t.jsxs("div",{className:g.header,children:[t.jsx("span",{className:w(g.askBadge,!e.answerable&&g.askBadgeNeutral),"aria-hidden":"true",children:"ASK"}),t.jsx("span",{className:g.methodName,children:e.method}),gt(e)&&t.jsx(xt,{})]}),t.jsx(so,{entry:e,onSubmit:D,primaryRef:h,dismissRef:u})]}),t.jsx(to,{hint:is(e.method,l)}),!e.answerable&&t.jsxs("p",{className:g.reconnectingNote,children:[t.jsx("span",{className:g.reconnectingDot}),"Reconnecting — you can answer again in a moment"]})]})}function so({entry:e,onSubmit:s,primaryRef:n,dismissRef:o}){const{method:r,payload:a}=e;return r==="select"?t.jsx(oo,{entry:e,payload:a,onSubmit:s,primaryRef:n,dismissRef:o}):r==="confirm"?t.jsx(ao,{entry:e,payload:a,onSubmit:s,primaryRef:n,dismissRef:o}):r==="input"?t.jsx(ro,{entry:e,payload:a,onSubmit:s,primaryRef:n}):r==="editor"?t.jsx(io,{entry:e,payload:a,onSubmit:s,primaryRef:n,dismissRef:o}):t.jsx(co,{entry:e,method:r,payload:a,onSubmit:s,primaryRef:n,dismissRef:o})}function _e({text:e}){return t.jsx("div",{className:g.title,children:we(e).join(`
|
|
6
|
-
`)})}function oo({entry:e,payload:s,onSubmit:n,primaryRef:o,dismissRef:r}){const a=te(s,"title")??"",c=Js(s,"options"),[l,m]=p.useState(null);if(c.length===0){const h=Z(e,l===0);return t.jsxs(t.Fragment,{children:[t.jsx(_e,{text:a}),t.jsx("p",{className:g.emptyOptionsNote,children:"The extension offered no options."}),t.jsx("div",{className:g.controls,children:t.jsx(L,{ref:u=>{o.current=u,r.current=u},size:"xs",variant:"secondary",onClick:()=>{m(0),n({cancelled:!0})},...h,children:"Cancel"})})]})}const d=ms(c);return t.jsxs(t.Fragment,{children:[t.jsx(_e,{text:a}),t.jsx("div",{className:w(g.controls,d.mode==="stack"&&g.controlsStack,d.scrolls&&g.controlsScroll),children:c.map((h,u)=>t.jsx(L,{ref:u===0?x=>{o.current=x}:void 0,size:"xs",variant:"secondary",className:g.optionButton,onClick:()=>{m(u),n({value:h})},...Z(e,l===u),children:h},u))})]})}function ao({entry:e,payload:s,onSubmit:n,primaryRef:o,dismissRef:r}){const a=te(s,"title")??"",c=te(s,"message"),l=fs(a,c),[m,d]=p.useState(null);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:w(g.title,l.message&&g.titleEmphasised),children:l.title.join(`
|
|
7
|
-
`)}),l.message&&t.jsx("div",{className:g.message,children:l.message.join(`
|
|
8
|
-
`)}),t.jsxs("div",{className:g.controls,children:[t.jsx(L,{ref:h=>{o.current=h},size:"xs",variant:"default",onClick:()=>{d("yes"),n({confirmed:!0})},...Z(e,m==="yes"),children:"Yes"}),t.jsx(L,{ref:h=>{r.current=h},size:"xs",variant:"secondary",onClick:()=>{d("no"),n({confirmed:!1})},...Z(e,m==="no"),children:"No"})]})]})}function ro({entry:e,payload:s,onSubmit:n,primaryRef:o}){const r=te(s,"title")??"",a=te(s,"placeholder"),[c,l]=p.useState(""),m=Z(e,e.submitting===!0),d=m.disabled===!0||m.loading===!0;return t.jsxs(t.Fragment,{children:[t.jsx(_e,{text:r}),t.jsxs("div",{className:g.controls,children:[t.jsx(Ut,{ref:h=>{o.current=h},className:g.field,value:c,placeholder:a,disabled:d,onChange:h=>l(h.target.value),onKeyDown:h=>{h.key!=="Enter"||d||(h.preventDefault(),h.stopPropagation(),n({value:c}))}}),t.jsx(L,{size:"xs",variant:"default",onClick:()=>n({value:c}),...m,children:"Submit"})]})]})}function io({entry:e,payload:s,onSubmit:n,primaryRef:o,dismissRef:r}){const a=te(s,"title")??"",c=te(s,"prefill")??"",[l,m]=p.useState(c),[d,h]=p.useState(null);return t.jsxs(t.Fragment,{children:[t.jsx(_e,{text:a}),t.jsx(at,{ref:u=>{o.current=u},className:g.editorField,rows:3,value:l,disabled:!e.answerable||e.submitting,onChange:u=>{m(u.target.value);const x=u.target;x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,Ys)}px`},onKeyDown:u=>{u.key!=="Enter"||u.shiftKey!==_t(e.method)||(u.preventDefault(),u.stopPropagation(),h("submit"),n({value:l}))}}),t.jsxs("div",{className:g.controls,children:[t.jsx(L,{size:"xs",variant:"default",onClick:()=>{h("submit"),n({value:l})},...Z(e,d==="submit"),children:"Submit"}),t.jsx(L,{ref:u=>{r.current=u},size:"xs",variant:"secondary",onClick:()=>{h("cancel"),n({cancelled:!0})},...Z(e,d==="cancel"),children:"Cancel"})]})]})}function co({entry:e,method:s,payload:n,onSubmit:o,primaryRef:r,dismissRef:a}){const c={method:s,...n},l=Z(e,e.submitting===!0);return t.jsxs(t.Fragment,{children:[t.jsx("p",{className:g.title,children:"This extension asked something this version of Pi-Studio can't display."}),t.jsx("pre",{className:g.rawPayload,children:JSON.stringify(c,null,2)}),t.jsx("div",{className:g.controls,children:t.jsx(L,{ref:m=>{r.current=m,a.current=m},size:"xs",variant:"secondary",onClick:()=>o({cancelled:!0}),...l,children:"Cancel"})})]})}function tt(e){if(e===void 0)return null;const s=typeof e=="number"?e:Date.parse(e);return Number.isNaN(s)?null:s}function lo(e,s,n,o){if(s.length===0)return e.map(n);const r=[];let a=0;const c=l=>{for(;a<e.length;){const m=e[a];if(m===void 0)break;if(l!==null){const d=tt(m.timestamp);if(d!==null&&d>l)break}r.push(n(m)),a++}};for(const l of s){if(l.kind==="more"){r.push(o(l));continue}c(tt(l.item.entry.createdAt)),r.push(o(l))}for(;a<e.length;a++){const l=e[a];l!==void 0&&r.push(n(l))}return r}function uo(e,s){return!e||s===void 0?!1:s.every(n=>n.configured===!1)}const mo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nt(e){return String(e).padStart(2,"0")}function Ie(e){if(!e)return;const s=new Date(e);if(!Number.isNaN(s.getTime()))return`${mo[s.getMonth()]} ${s.getDate()}, ${nt(s.getHours())}:${nt(s.getMinutes())}`}const fo="_queuedBadge_12qdc_8",ho="_finalChip_12qdc_20",po="_userDisc_12qdc_30",go="_userAligned_12qdc_34",_o="_userPendingRow_12qdc_40",xo="_userBubble_12qdc_44",vo="_userBubbleFailed_12qdc_58",ko="_userImages_12qdc_63",jo="_userImage_12qdc_63",yo="_imageDialog_12qdc_79",bo="_imageDialogPreview_12qdc_83",No="_assistantDisc_12qdc_93",So="_assistantBody_12qdc_97",Co="_reasoningDisc_12qdc_108",wo="_reasoningBody_12qdc_112",Do="_toolDisc_12qdc_123",To="_toolCardBody_12qdc_127",Bo="_toolCardBodyRunning_12qdc_134",qo="_toolCardBodyCompleted_12qdc_138",Eo="_toolCardBodyError_12qdc_142",Ro="_toolHeader_12qdc_146",Ao="_toolHeaderRunning_12qdc_172",Lo="_toolChevron_12qdc_182",Io="_toolChevronOpen_12qdc_188",Oo="_kindBadge_12qdc_192",Mo="_toolPath_12qdc_204",Po="_toolTrailing_12qdc_213",Fo="_toolStatusRunning_12qdc_221",Ko="_toolStatusSuccess_12qdc_228",zo="_toolStatusError_12qdc_232",Ho="_toolStatusUnknown_12qdc_236",$o="_toolDiffAdded_12qdc_240",Wo="_toolDiffRemoved_12qdc_244",Uo="_toolOpenButton_12qdc_248",Go="_toolBody_12qdc_266",Vo="_toolCode_12qdc_272",Yo="_toolOutputStrip_12qdc_283",Jo="_toolDiffPreview_12qdc_293",Qo="_toolDiffPreviewLine_12qdc_301",Xo="_toolDiffPreviewAdd_12qdc_305",Zo="_toolDiffPreviewDel_12qdc_310",ea="_toolDiffPreviewMore_12qdc_315",ta="_errorDisc_12qdc_322",na="_errorCard_12qdc_326",sa="_errorLead_12qdc_335",oa="_systemRow_12qdc_342",aa="_compactionRow_12qdc_351",ra="_compactionRowFailed_12qdc_357",ia="_compactionDivider_12qdc_361",ca="_compactionRule_12qdc_367",la="_compactionLabel_12qdc_373",da="_compactionText_12qdc_380",ua="_compactionToggle_12qdc_386",ma="_compactionSummary_12qdc_403",f={queuedBadge:fo,finalChip:ho,userDisc:po,userAligned:go,userPendingRow:_o,userBubble:xo,userBubbleFailed:vo,userImages:ko,userImage:jo,imageDialog:yo,imageDialogPreview:bo,assistantDisc:No,assistantBody:So,reasoningDisc:Co,reasoningBody:wo,toolDisc:Do,toolCardBody:To,toolCardBodyRunning:Bo,toolCardBodyCompleted:qo,toolCardBodyError:Eo,toolHeader:Ro,toolHeaderRunning:Ao,toolChevron:Lo,toolChevronOpen:Io,kindBadge:Oo,toolPath:Mo,toolTrailing:Po,toolStatusRunning:Fo,toolStatusSuccess:Ko,toolStatusError:zo,toolStatusUnknown:Ho,toolDiffAdded:$o,toolDiffRemoved:Wo,toolOpenButton:Uo,toolBody:Go,toolCode:Vo,toolOutputStrip:Yo,toolDiffPreview:Jo,toolDiffPreviewLine:Qo,toolDiffPreviewAdd:Xo,toolDiffPreviewDel:Zo,toolDiffPreviewMore:ea,errorDisc:ta,errorCard:na,errorLead:sa,systemRow:oa,compactionRow:aa,compactionRowFailed:ra,compactionDivider:ia,compactionRule:ca,compactionLabel:la,compactionText:da,compactionToggle:ua,compactionSummary:ma};function fa({row:e,assetBase:s=null,owningPaneId:n=null,workspaceCwd:o=null,connector:r}){const a=Ie(e.timestamp);return t.jsx(U,{disc:t.jsx(H,{icon:_n,size:"xs",color:"var(--pi-color-accentForeground)"}),discClassName:f.assistantDisc,connector:r,meta:t.jsxs(t.Fragment,{children:["Assistant",a&&t.jsxs("span",{className:z.metaTime,children:[" · ",a]})]}),children:t.jsx("div",{className:f.assistantBody,children:e.streaming?t.jsx(ut,{text:e.text,assetBase:s,owningPaneId:n,workspaceCwd:o}):t.jsx(Re,{text:e.text,assetBase:s,owningPaneId:n,workspaceCwd:o})})})}function ha({row:e,owningPaneId:s=null,workspaceCwd:n=null,connector:o}){const r=Ie(e.timestamp);return t.jsx(U,{disc:t.jsx(H,{icon:ct,size:"xs",color:"var(--pi-color-foregroundMuted)"}),discClassName:f.reasoningDisc,connector:o,meta:t.jsxs(t.Fragment,{children:["Reasoning",r&&t.jsxs("span",{className:z.metaTime,children:[" · ",r]})]}),metaTrailing:!e.streaming&&t.jsx("span",{className:f.finalChip,children:"final"}),children:t.jsx("div",{className:f.reasoningBody,children:e.streaming?t.jsx(ut,{text:e.text,owningPaneId:s,workspaceCwd:n}):t.jsx(Re,{text:e.text,owningPaneId:s,workspaceCwd:n})})})}function pa(e){const s=En(e).filter(o=>o.kind==="add"||o.kind==="del"),n=s[0];return n?{text:n.text,kind:n.kind,moreCount:s.length-1}:null}function ga(e){return e.status==="completed"?t.jsx("span",{className:f.toolStatusSuccess,children:"✓ completed"}):e.status==="error"?t.jsx("span",{className:f.toolStatusError,children:e.statusText||"error"}):e.statusText&&e.statusText!=="running"?t.jsx("span",{className:f.toolStatusUnknown,children:e.statusText}):t.jsxs("span",{className:f.toolStatusRunning,children:[t.jsx(oe,{size:"xs",color:"var(--pi-color-accentBright)"}),"running"]})}function _a({row:e,assetBase:s=null,owningPaneId:n=null,workspaceCwd:o=null,connector:r}){const[a,c]=p.useState(!1),l=On(e.tool),m=In(e.tool),d=m.length>0,h=Pn(e.tool.output),u=e.tool.kind==="edit"||e.tool.kind==="write"?ht(e.tool):null,x=e.tool.kind==="edit"?Mn(e.tool.diff):null,D=e.tool.kind==="edit"&&e.tool.diff&&!a?pa(e.tool.diff):null;function K(){d&&c(v=>!v)}function $(v){v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),K())}function y(v){if(v.stopPropagation(),!u)return;const C=Bn(s,n,o);Gt(u,C.workspaceCwd,C.targetPaneId)}return t.jsx(U,{disc:t.jsx(H,{icon:An(e.tool),size:"xs",color:"var(--pi-color-foregroundMuted)"}),discClassName:f.toolDisc,connector:r,children:t.jsxs("div",{className:w(f.toolCardBody,e.status==="running"&&f.toolCardBodyRunning,e.status==="completed"&&f.toolCardBodyCompleted,e.status==="error"&&f.toolCardBodyError),children:[t.jsxs("div",{role:"button",tabIndex:d?0:-1,"aria-expanded":d?a:void 0,"aria-disabled":!d,className:w(f.toolHeader,e.status==="running"&&f.toolHeaderRunning),onClick:K,onKeyDown:$,children:[d&&t.jsx(lt,{size:12,className:w(f.toolChevron,a&&f.toolChevronOpen)}),t.jsx("span",{className:f.kindBadge,style:{"--kindToken":`var(--pi-color-${l.token})`},children:l.label}),t.jsx("span",{className:f.toolPath,title:Ce(e.tool),children:Ce(e.tool)}),t.jsxs("span",{className:f.toolTrailing,children:[x&&(x.added>0||x.removed>0)&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:f.toolDiffAdded,children:["+",x.added]}),t.jsxs("span",{className:f.toolDiffRemoved,children:["−",x.removed]})]}),ga(e),u&&t.jsxs("button",{type:"button",className:f.toolOpenButton,onClick:y,onKeyDown:v=>v.stopPropagation(),children:["Open",t.jsx(xn,{size:10})]})]})]}),h>0&&t.jsxs("div",{className:f.toolOutputStrip,children:["output · ",h," lines"]}),D&&t.jsxs("div",{className:f.toolDiffPreview,children:[t.jsx("div",{className:w(f.toolDiffPreviewLine,D.kind==="add"?f.toolDiffPreviewAdd:f.toolDiffPreviewDel),children:D.text}),D.moreCount>0&&t.jsxs("div",{className:f.toolDiffPreviewMore,children:["… ",D.moreCount," more lines"]})]}),a&&d&&t.jsx("div",{className:f.toolBody,children:m.map((v,C)=>v.kind==="diff"?t.jsx(qn,{patch:v.patch},C):t.jsx("pre",{className:f.toolCode,children:v.text},C))})]})})}const xa="Fork from here",va="Fork conversation from this message";function ka({row:e,connector:s,onFork:n}){const[o,r]=p.useState(null),a=Ie(e.timestamp);return t.jsxs(U,{disc:t.jsx(H,{icon:jn,size:"xs",color:"var(--pi-color-successForeground)"}),discClassName:f.userDisc,connector:s,className:w(f.userAligned,e.pending&&f.userPendingRow),meta:t.jsxs(t.Fragment,{children:["You",a&&t.jsxs("span",{className:z.metaTime,children:[" · ",a]}),e.failed&&" · failed to send"]}),metaTrailing:t.jsxs(t.Fragment,{children:[e.queued&&!e.failed&&t.jsxs("span",{className:f.queuedBadge,children:[t.jsx(vn,{size:9}),"queued"]}),n&&t.jsx(Yt,{className:z.forkButton,hoverBase:"var(--pi-color-surface3)",title:xa,"aria-label":va,onClick:n,children:t.jsx(kn,{size:13,strokeWidth:1.8,"aria-hidden":"true"})})]}),children:[t.jsx("span",{className:w(f.userBubble,e.failed&&f.userBubbleFailed),children:e.text}),e.images&&e.images.length>0&&t.jsx("div",{className:f.userImages,children:e.images.map((c,l)=>{const m=`data:${c.mimeType??"image/png"};base64,${c.data??""}`;return t.jsx("img",{className:f.userImage,src:m,alt:"",role:"button",tabIndex:0,onClick:()=>r(m),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&r(m)}},l)})}),t.jsx(Vt,{open:o!==null,onOpenChange:c=>{c||r(null)},title:"Image",width:"auto",bare:!0,className:f.imageDialog,children:o&&t.jsx("img",{className:f.imageDialogPreview,src:o,alt:""})})]})}function ja({row:e,connector:s}){return t.jsx(U,{disc:t.jsx(H,{icon:dt,size:"xs",color:"var(--pi-color-destructive)"}),discClassName:f.errorDisc,connector:s,children:t.jsxs("div",{className:f.errorCard,children:[t.jsx("span",{className:f.errorLead,children:"Error"})," · ",e.text]})})}function ya({row:e}){return t.jsx("div",{className:f.systemRow,children:e.text})}function ba({row:e,assetBase:s=null,owningPaneId:n=null,workspaceCwd:o=null}){const[r,a]=p.useState(!1),c=rt(e),l=e.phase==="completed"&&!!e.summary,m=t.jsx("span",{className:f.compactionText,children:c});return t.jsxs("div",{className:w(f.compactionRow,e.phase==="failed"&&f.compactionRowFailed),children:[t.jsxs("div",{className:f.compactionDivider,children:[t.jsx("span",{className:f.compactionRule,"aria-hidden":"true"}),t.jsxs("span",{className:f.compactionLabel,children:[e.phase==="started"&&t.jsx(oe,{size:"xs","aria-label":"Compacting context"}),e.phase==="failed"&&t.jsx(H,{icon:dt,size:"xs",color:"var(--pi-color-statusDanger)"}),l?t.jsxs("button",{type:"button",className:f.compactionToggle,"aria-expanded":r,onClick:()=>a(d=>!d),children:[t.jsx(lt,{size:12,className:w(f.toolChevron,r&&f.toolChevronOpen)}),m]}):m]}),t.jsx("span",{className:f.compactionRule,"aria-hidden":"true"})]}),l&&r&&t.jsx("div",{className:f.compactionSummary,children:t.jsx(Re,{text:e.summary,assetBase:s,owningPaneId:n,workspaceCwd:o})})]})}const Na=500;function Sa(e,s){const n=p.useRef(!0),[o,r]=p.useState(!0),a=p.useRef(0),c=p.useCallback(d=>{const h=s.current,u=h?{scrollTop:h.scrollTop,scrollHeight:h.scrollHeight,clientHeight:h.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0},x=$n(n.current,d,u);x.pinned!==n.current&&(n.current=x.pinned,r(x.pinned)),x.stick&&e.options.count>0&&e.scrollToEnd({behavior:"auto"})},[s,e]);p.useEffect(()=>{const d=s.current;if(!d)return;const h=()=>{a.current=performance.now()},u=()=>{c({kind:"scroll",gesture:performance.now()-a.current<Na})};d.addEventListener("scroll",u,{passive:!0}),d.addEventListener("wheel",h,{passive:!0}),d.addEventListener("touchmove",h,{passive:!0}),d.addEventListener("pointerdown",h,{passive:!0}),d.addEventListener("keydown",h,{passive:!0});const x=new ResizeObserver(()=>{d.clientHeight>0&&c({kind:"shown"})});return x.observe(d),()=>{x.disconnect(),d.removeEventListener("scroll",u),d.removeEventListener("wheel",h),d.removeEventListener("touchmove",h),d.removeEventListener("pointerdown",h),d.removeEventListener("keydown",h)}},[c,s]);const l=p.useCallback(()=>c({kind:"tail"}),[c]),m=p.useCallback(()=>c({kind:"pin"}),[c]);return{pinned:o,followTail:l,pinToBottom:m}}const Ca="_root_1xg4h_6",wa="_viewport_1xg4h_13",Da="_inner_1xg4h_20",Ta="_rowWrap_1xg4h_25",Ba="_empty_1xg4h_35",qa="_nudge_1xg4h_47",Ea="_jumpToLatest_1xg4h_56",ee={root:Ca,viewport:wa,inner:Da,rowWrap:Ta,empty:Ba,nudge:qa,jumpToLatest:Ea},Ra=160;function Aa(e){return e.kind==="ask"?`ask:${ns(e.item)}`:e.kind==="ask-more"?"ask-more":e.row.id}function La(e,s,n,o,r,a){switch(e.kind){case"user":{const c=a.ordinalByRowId.get(e.id),l=c!==void 0?()=>a.onForkFromRow(c):null;return t.jsx(ka,{row:e,connector:!s,onFork:l})}case"assistant":return t.jsx(fa,{row:e,assetBase:n,owningPaneId:o,workspaceCwd:r,connector:!s});case"reasoning":return t.jsx(ha,{row:e,owningPaneId:o,workspaceCwd:r,connector:!s});case"tool":return t.jsx(_a,{row:e,assetBase:n,owningPaneId:o,workspaceCwd:r,connector:!s});case"error":return t.jsx(ja,{row:e,connector:!s});case"system":return t.jsx(ya,{row:e});case"compaction":return t.jsx(ba,{row:e,assetBase:n,owningPaneId:o,workspaceCwd:r})}}function Ia(e,s,n,o,r,a,c,l,m){return e.kind==="ask"?t.jsx(Qs,{item:e.item,collapsed:e.collapsed,connector:!s,autoFocus:e.item.kind==="pending"&&e.item.entry.requestId===c,sessionTitle:l}):e.kind==="ask-more"?t.jsx(Zs,{count:e.count,connector:!s,onExpand:a}):La(e.row,s,n,o,r,m)}function Oa({session:e,owningPaneId:s,workspaceCwd:n}){var N,B;const o=e.timeline.rows,r=e.status==="running",a=Jt(),c=Qt(e.cwd,a),l=p.useRef(null),m=Xt(e),d=Zt(e.agentId??""),h=en(e.agentId??""),[u,x]=p.useState(!1),D=O(b=>b.activeSessionId===e.id),K=tn(b=>{var T;return((T=b.layouts[n])==null?void 0:T.focusedPaneId)===s}),$=D&&K?((N=d[0])==null?void 0:N.requestId)??null:null,y=p.useMemo(()=>{const b=os(ts(d,h),u);return lo(o,b,T=>({kind:"row",row:T}),T=>T.kind==="more"?{kind:"ask-more",count:T.count}:{kind:"ask",item:T.item,collapsed:T.collapsed})},[o,d,h,u]),v=X(b=>b.status==="open"),C=X(b=>b.serverInfo),M=!!((B=C==null?void 0:C.features)!=null&&B.providerAuth),G=nn(b=>b.openSettings),{data:W}=Tn(o.length===0&&v&&M),V=uo(M,W),I=Ft({count:y.length,getScrollElement:()=>l.current,estimateSize:()=>Ra,overscan:8,getItemKey:b=>{const T=y[b];return T?Aa(T):b},measureElement:(b,T,J)=>{if(b.offsetParent!==null)return Kt(b,T,J);const re=J.indexFromElement(b),fe=J.options.getItemKey(re);return J.itemSizeCache.get(fe)??J.options.estimateSize(re)},anchorTo:"end",scrollEndThreshold:pt}),{pinned:ae,followTail:R,pinToBottom:Y}=Sa(I,l),P=Wn(o);return p.useEffect(()=>{R()},[y.length,R]),p.useEffect(()=>{P!==null&&Y()},[P,Y]),t.jsxs("div",{className:ee.root,children:[t.jsx("div",{className:ee.viewport,ref:l,children:y.length===0?!r&&(V?t.jsxs(sn,{className:ee.nudge,children:[t.jsx("span",{children:"No messages yet — connect a model provider to get started."}),t.jsx(L,{size:"xs",variant:"secondary",onClick:()=>G(),children:"Connect a model provider"})]}):t.jsx("div",{className:ee.empty,children:"No messages yet — say something to start."})):t.jsx("div",{className:ee.inner,style:{height:I.getTotalSize()},children:I.getVirtualItems().map(b=>{const T=y[b.index];return T?t.jsx("div",{ref:I.measureElement,"data-index":b.index,className:ee.rowWrap,style:{transform:`translateY(${b.start}px)`},children:Ia(T,b.index===y.length-1,c,s,n,()=>x(!0),$,e.title,m)},b.key):null})})}),!ae&&y.length>0&&t.jsx("button",{type:"button",className:ee.jumpToLatest,onClick:Y,title:"Jump to latest","aria-label":"Jump to latest",children:t.jsx(yn,{size:16,"aria-hidden":"true"})})]})}function Ma(e,s=!0){const n=X(o=>o.client);return Te({queryKey:Be.agentCommands(e),queryFn:async()=>{if(!n)throw new Error("not connected");const o=await ge(n,e),{commands:r}=await n.agent(o).listCommands();return r},enabled:!!n&&!!e&&s})}function vt(e,s,n=!0){const o=X(r=>r.client);return Te({queryKey:Be.providerModels(e,s),queryFn:async()=>{if(!o)throw new Error("not connected");return(await o.providers.listModels(e,s?{agentId:s}:void 0)).models},enabled:!!o&&!!e&&n})}function Pa(e,s,n=!0){const o=X(r=>r.client);return Te({queryKey:Be.thinkingLevels(e??"",s),queryFn:async()=>{if(!o||!e)throw new Error("not connected");return(await o.agent(e).listThinkingLevels()).levels},enabled:!!o&&!!e&&n,retry:!1})}const Fa="_strip_nzfk5_4",Ka="_thumb_nzfk5_11",za="_remove_nzfk5_28",Ne={strip:Fa,thumb:Ka,remove:za};function Ha({images:e,onRemove:s}){return e.length===0?null:t.jsx("div",{className:Ne.strip,children:e.map((n,o)=>t.jsxs("div",{className:Ne.thumb,children:[t.jsx("img",{src:n.thumbUrl,alt:""}),t.jsx("button",{type:"button",className:Ne.remove,title:"Remove",onClick:()=>s(o),children:"×"})]},o))})}function $a(e){const{promise:s,resolve:n,reject:o}=Promise.withResolvers(),r=new FileReader;return r.onload=()=>{const a=r.result;if(typeof a!="string"){o(new Error("Unexpected FileReader result"));return}const c=a.indexOf(","),l=c>=0?a.slice(c+1):a;n({mimeType:e.type,data:l,thumbUrl:a})},r.onerror=()=>o(r.error??new Error("Failed to read file")),r.readAsDataURL(e),s}function Wa(e,s,n){return e?n:s}const De=[{name:"compact",description:"Manually compact the session context",source:"builtin"}];function kt(e){var o;const s=/^\/([^\s]+)(?:\s+([\s\S]*))?$/.exec(e.trim());if((s==null?void 0:s[1])!=="compact")return null;const n=(o=s[2])==null?void 0:o.trim();return{name:"compact",args:n||void 0}}function Oe(e){if(!e.startsWith("/"))return null;const s=/^\/(\S*)/.exec(e),n=(s==null?void 0:s[1])??"",o=1+n.length,r=/\S/.test(e.slice(o));return{name:n,end:o,hasArgs:r}}function Ua(e){return/^\/\S*$/.test(e)}function Ga(e,s){let n=0;const o=De.map(a=>({value:a.name,label:`/${a.name}`,description:a.description,kind:a.source,disabled:s.builtinsDisabled===!0})),r=new Set(De.map(a=>a.name));for(const a of e)if(!r.has(a.name)){if(s.running&&a.source==="extension"){n+=1;continue}o.push({value:a.name,label:`/${a.name}`,description:a.description,kind:a.source})}return{options:o,hiddenExtensionCount:n}}function Va(e,s,n){return n<=0?0:(e+s+n)%n}function Ya(e,s){const n=Oe(e);return n?n.hasArgs?`/${s}${e.slice(n.end)}`:`/${s} `:`/${s} ${e}`}function Ja(e,s){const n=Oe(e);return!n||!s.includes(n.name)?null:{end:n.end}}function jt({running:e,compacting:s,hasAgent:n}){return n&&!e&&!s}function Qa(e,s){return!e.ok&&e.reason!=="canceled"&&s===""}function Xa(e){const s=e.text.trim().length>0||e.hasImages;return!e.hasClient||!s||e.busy||e.compacting?!1:kt(e.text)!==null?jt(e):!0}const Za="_picker_11hqs_4",er="_search_11hqs_10",tr="_searchWrap_11hqs_28",nr="_searchSpinner_11hqs_37",sr="_list_11hqs_45",or="_item_11hqs_50",ar="_itemActive_11hqs_67",rr="_checkSlot_11hqs_71",ir="_label_11hqs_80",cr="_modelId_11hqs_86",lr="_state_11hqs_93",dr="_stateError_11hqs_102",ur="_commandContent_11hqs_112",mr="_commandList_11hqs_115",fr="_commandItem_11hqs_120",hr="_commandItemHeader_11hqs_152",pr="_commandKindBadge_11hqs_166",gr="_commandKindExtension_11hqs_185",_r="_commandKindPrompt_11hqs_190",xr="_commandKindSkill_11hqs_195",vr="_commandDescription_11hqs_200",kr="_commandItemDisabled_11hqs_214",k={picker:Za,search:er,searchWrap:tr,searchSpinner:nr,list:sr,item:or,itemActive:ar,checkSlot:rr,label:ir,modelId:cr,state:lr,stateError:dr,commandContent:ur,commandList:mr,commandItem:fr,commandItemHeader:hr,commandKindBadge:pr,commandKindExtension:gr,commandKindPrompt:_r,commandKindSkill:xr,commandDescription:vr,commandItemDisabled:kr},jr={onOpenAutoFocus:e=>e.preventDefault()};function yr(e){switch(e){case"extension":return k.commandKindExtension;case"prompt":return k.commandKindPrompt;case"skill":return k.commandKindSkill;default:return}}function br({open:e,onOpenChange:s,options:n,highlightedIndex:o,onSelect:r,isLoading:a,isError:c,errorMessage:l,hiddenExtensionCount:m,renderTrigger:d}){const h=p.useRef(null);return p.useEffect(()=>{var u,x;e&&((x=(u=h.current)==null?void 0:u.querySelector('[aria-selected="true"]'))==null||x.scrollIntoView({block:"nearest"}))},[e,o]),t.jsxs(Ae,{open:e,onOpenChange:s,modal:!1,children:[t.jsx(Le,{asChild:!0,children:d()}),t.jsxs(qe,{className:w(k.picker,k.commandContent),side:"top",sideOffset:4,...jr,onCloseAutoFocus:u=>u.preventDefault(),children:[a&&t.jsx("div",{className:k.state,children:t.jsx(oe,{size:"sm"})}),!a&&c&&t.jsx("div",{className:k.stateError,children:l??"Failed to load commands"}),!a&&!c&&n.length===0&&t.jsx("div",{className:k.state,children:"No commands found"}),!a&&!c&&n.length>0&&t.jsx("div",{ref:h,className:w(k.list,k.commandList),children:n.map((u,x)=>t.jsxs("div",{role:"option","aria-selected":x===o,"aria-disabled":u.disabled||void 0,className:w(k.item,k.commandItem,x===o&&k.itemActive,u.disabled&&k.commandItemDisabled),title:u.description,onMouseDown:D=>{D.preventDefault(),u.disabled||r(u.value)},children:[t.jsxs("div",{className:k.commandItemHeader,children:[t.jsx("span",{className:k.label,children:u.label}),u.kind&&t.jsx("span",{className:w(k.commandKindBadge,yr(u.kind)),children:u.kind})]}),u.description&&t.jsx("div",{className:k.commandDescription,children:u.description})]},u.value))}),!a&&!c&&m>0&&t.jsxs("div",{className:k.state,children:[m," extension command(s) unavailable while the agent is running"]})]})]})}function Nr(e,s={}){const n=new Map;for(const m of e){const d=m.group??"",h=n.get(d);h?h.push(m):n.set(d,[m])}const o=n.get("");n.delete("");const r=[...n.keys()],{priorityGroup:a,ungroupedLabel:c}=s;a!==void 0&&n.has(a)&&(r.splice(r.indexOf(a),1),r.unshift(a));const l=r.map(m=>({key:m,label:m,options:n.get(m)??[]}));return o&&l.push({key:"",label:c,options:o}),l}function Sr(e,s,n){if(!s)return e;const o=e.filter(a=>a.id===s),r=(n===void 0?void 0:o.find(a=>a.provider===n))??o[0];return r?[r,...e.filter(a=>a!==r)]:e}function Cr(e){const s=new Set;return e.filter(n=>{const o=`${n.provider??""}/${n.id}`;return s.has(o)?!1:(s.add(o),!0)})}function wr({currentModel:e,currentModelProvider:s,provider:n,agentId:o,onSelect:r,renderTrigger:a}){const[c,l]=p.useState(!1),[m,d]=p.useState(""),h=p.useRef(null),u=p.useRef(null),{data:x,isLoading:D,isFetching:K,isError:$,error:y,refetch:v}=vt(n,o,c||e!==void 0),C=x??[];p.useEffect(()=>{c&&d("")},[c]),p.useEffect(()=>{c&&v({cancelRefetch:!1})},[c,v]);const G=Cr(Sr(C,e,s)).map(N=>({value:N.id,label:N.label??N.id,description:N.id,group:N.provider})),W=G[0],V=(W==null?void 0:W.value)===e?W:void 0,I=Nr(ft(G,m),{priorityGroup:s,ungroupedLabel:"Other"}),ae=I.length>1,R=y instanceof Error?y.message:"Failed to load models";function Y(N){var B;if(N.stopPropagation(),N.key==="Escape"&&l(!1),N.key==="ArrowDown"){const b=(B=u.current)==null?void 0:B.querySelector('[role="menuitem"]');b&&(N.preventDefault(),b.focus())}}const P={onOpenAutoFocus:N=>{var B;N.preventDefault(),(B=h.current)==null||B.focus()}};return t.jsxs(Ae,{open:c,onOpenChange:l,modal:!1,children:[t.jsx(Le,{asChild:!0,children:a(e,V==null?void 0:V.label)}),t.jsxs(qe,{minWidth:240,align:"end",sideOffset:6,className:k.picker,...P,children:[t.jsxs("div",{className:k.searchWrap,children:[t.jsx("input",{ref:h,className:k.search,placeholder:"Search models…",value:m,onChange:N=>d(N.target.value),onKeyDown:Y}),K&&!D&&t.jsx(oe,{size:"xs",color:"var(--pi-color-foregroundMuted)",className:k.searchSpinner,"aria-label":"Refreshing models"})]}),D&&t.jsx("div",{className:k.state,children:t.jsx(oe,{size:"sm"})}),!D&&$&&x===void 0&&t.jsx("div",{className:k.stateError,children:R}),!D&&x!==void 0&&I.length===0&&t.jsx("div",{className:k.state,children:"No models found"}),!D&&x!==void 0&&I.length>0&&t.jsx("div",{ref:u,className:k.list,children:I.map(N=>t.jsx(on,{label:ae?N.label:void 0,children:N.options.map(B=>t.jsxs(mt,{className:k.item,onSelect:()=>r(B.value,B.group),children:[t.jsx("span",{className:k.checkSlot,"aria-hidden":!0,children:B===V&&t.jsx(Ee,{size:14})}),t.jsx("span",{className:k.label,children:B.label}),t.jsxs("span",{className:k.modelId,children:["(",B.value,")"]})]},`${B.group??""}/${B.value}`))},N.key))})]})]})}function Dr({currentLevel:e,levels:s,open:n,onOpenChange:o,onSelect:r,renderTrigger:a}){return t.jsxs(Ae,{open:n,onOpenChange:o,modal:!1,children:[t.jsx(Le,{asChild:!0,children:a(e)}),t.jsx(qe,{minWidth:140,align:"end",side:"top",sideOffset:6,className:k.picker,children:s.length===0?t.jsx("div",{className:k.state,children:"Loading levels…"}):t.jsx("div",{className:k.list,children:s.map(c=>t.jsxs(mt,{className:k.item,onSelect:()=>r(c),children:[t.jsx("span",{className:k.checkSlot,"aria-hidden":!0,children:c===e&&t.jsx(Ee,{size:14})}),t.jsx("span",{className:k.label,children:c})]},c))})})]})}const st=["off","minimal","low","medium","high","xhigh","max"];function Tr(e,s){if(!e)return st;const n=s==null?void 0:s.find(o=>o.id===e);return n!=null&&n.thinkingLevels&&n.thinkingLevels.length>0?n.thinkingLevels:st}const Br="_composer_ivj95_4",qr="_card_ivj95_13",Er="_flash_ivj95_27",Rr="_note_ivj95_41",Ar="_inlineError_ivj95_48",Lr="_compacting_ivj95_56",Ir="_textarea_ivj95_57",Or="_compactStatus_ivj95_66",Mr="_compactStatusText_ivj95_75",Pr="_compactCancel_ivj95_81",Fr="_textareaWrap_ivj95_122",Kr="_highlightLayer_ivj95_110",zr="_commandMark_ivj95_145",Hr="_hiddenFileInput_ivj95_170",$r="_toolbar_ivj95_176",Wr="_toolbarRight_ivj95_183",Ur="_toolBtn_ivj95_191",Gr="_roundBtn_ivj95_197",Vr="_modelBtn_ivj95_202",Yr="_modelLabel_ivj95_232",Jr="_modelId_ivj95_230",Qr="_modelChevron_ivj95_250",S={composer:Br,card:qr,flash:Er,note:Rr,inlineError:Ar,compacting:Lr,textarea:Ir,compactStatus:Or,compactStatusText:Mr,compactCancel:Pr,textareaWrap:Fr,highlightLayer:Kr,commandMark:zr,hiddenFileInput:Hr,toolbar:$r,toolbarRight:Wr,toolBtn:Ur,roundBtn:Gr,modelBtn:Vr,modelLabel:Yr,modelId:Jr,modelChevron:Qr},Xr=160;function se(e){e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,Xr)}px`}function Zr(e){return typeof e=="object"&&e!==null&&"ok"in e&&e.ok===!1}function ei(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ti({sessionId:e}){var Ye;const s=X(i=>i.client),n=O(i=>i.sessions[e]),o=O(i=>i.addOptimisticUserMessage),r=O(i=>i.markUserMessageFailed),a=O(i=>i.setCwd),c=O(i=>i.setModel),l=O(i=>i.setThinkingLevel),m=X(i=>i.serverInfo),[d,h]=p.useState(!1),u=!!((Ye=m==null?void 0:m.features)!=null&&Ye.thinkingLevels),{data:x}=Pa(n==null?void 0:n.agentId,n==null?void 0:n.model,d&&!!(n!=null&&n.agentId)&&((n==null?void 0:n.userMessageCount)??0)>0),{data:D}=vt("pi",n==null?void 0:n.agentId),K=Tr(n==null?void 0:n.model,D),$=x!==void 0&&x.length>0?x:K,y=u&&!(x!==void 0&&x.length===0),v=me(i=>i.drafts[e]??""),C=me(i=>i.setDraft),[M,G]=p.useState([]),[W,V]=p.useState(!1),[I,ae]=p.useState(!1),R=p.useRef(null),Y=p.useRef(null),[P,N]=p.useState(!1),[B,b]=p.useState(0),T=an(ln.chat(e)),J=me(i=>i.pendingFeedback[e]),[re,fe]=p.useState(null),[ve,ie]=p.useState(null),[yt,Me]=p.useState(!1),ce=p.useRef(null),le=p.useRef(null);p.useEffect(()=>{if(!T||J===void 0)return;const i=me.getState().consumeFeedback(e);if(!i)return;fe(i.copy==="filled"?"Your message was filled in":"Your draft was replaced"),ce.current!==null&&window.clearTimeout(ce.current),ce.current=window.setTimeout(()=>fe(null),4e3);const _=R.current;_&&_.setSelectionRange(_.value.length,_.value.length),i.flash&&(Me(!0),le.current!==null&&window.clearTimeout(le.current),le.current=window.setTimeout(()=>Me(!1),ei()?1e3:400))},[T,J,e]),p.useEffect(()=>()=>{ce.current!==null&&window.clearTimeout(ce.current),le.current!==null&&window.clearTimeout(le.current)},[]);const F=(n==null?void 0:n.status)==="running",E=rn(e),ke=pe(i=>i.lastErrorBySession[e]),bt=pe(i=>i.compactSession),je=pe(i=>i.cancelCompaction),Nt=pe(i=>i.clearError),Pe=!!(n!=null&&n.agentId),St=Wa(F,W,I),Fe=Xa({hasClient:!!s,busy:St,compacting:E,running:F,hasAgent:Pe,text:v,hasImages:M.length>0}),{data:Ke=[],isLoading:Ct,isError:wt,error:ze}=Ma(e,P),{options:He,hiddenExtensionCount:Dt}=Ga(Ke,{running:F,builtinsDisabled:!jt({running:F,compacting:E,hasAgent:Pe})}),$e=Oe(v),he=$e?ft(He,$e.name):He,Tt=[...De,...Ke].map(i=>i.name),ne=Ja(v,Tt),We=E?cn((n==null?void 0:n.timeline.rows)??[]):void 0,Bt=We?rt(We):"Compacting context…";async function Ue(i){if(i.type.startsWith("image/"))try{const _=await $a(i);G(j=>[...j,_])}catch{}}function qt(i){for(const _ of i.target.files??[])Ue(_);i.target.value=""}function Et(i){if(!E){for(const _ of i.clipboardData.items)if(_.type.startsWith("image/")){i.preventDefault();const j=_.getAsFile();j&&Ue(j)}}}function Rt(i){G(_=>_.filter((j,q)=>q!==i))}function At(i){const _=i.target.value;C(e,_),se(i.target),ke&&Nt(e),ve&&ie(null);const j=Ua(_);j!==P&&N(j),j&&b(0)}function Lt(i){if(E){i.key==="Escape"&&(i.preventDefault(),je(e));return}if(!P&&ne&&i.key==="Backspace"){const _=i.currentTarget,j=_.selectionStart;if(j!==null&&j===_.selectionEnd){const q=ne.end+(v[ne.end]===" "?1:0);if(j>0&&j<=q){i.preventDefault();const A=v.slice(q);C(e,A),_.setSelectionRange(0,0),se(_);return}}}if(P&&he.length>0){if(i.key==="ArrowDown"||i.key==="ArrowUp"){i.preventDefault(),b(_=>Va(_,i.key==="ArrowDown"?1:-1,he.length));return}if(i.key==="Enter"&&!i.shiftKey||i.key==="Tab"){i.preventDefault();const _=he[B];_&&!_.disabled&&Ge(_.value);return}}if(P&&i.key==="Escape"){i.preventDefault(),N(!1);return}i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),Ve(F?"steer":"send"))}function Ge(i){const _=Ya(v,i);C(e,_),N(!1),b(0);const j=R.current;j&&(j.focus(),j.setSelectionRange(_.length,_.length),se(j))}async function Ve(i){if(!s||!n||(i==="steer"?I:W)||i==="steer"&&!n.agentId)return;const _=v.trim();if(!_&&M.length===0||!Fe)return;const j=kt(_);if(j){N(!1),C(e,""),R.current&&se(R.current);const Q=await bt(e,j.args);Qa(Q,me.getState().drafts[e]??"")&&(C(e,v),R.current&&se(R.current));return}C(e,""),N(!1),R.current&&se(R.current);const q=M;G([]);const A=_||"Describe this image",de=q.length>0?q.map(Q=>({mimeType:Q.mimeType,data:Q.data})):void 0,ue=dn();o(e,ue,A,de,i==="steer");const Je=i==="steer"?ae:V;Je(!0);try{if(i==="steer"){const Q=await s.agent(n.agentId).steer(A,{clientMessageId:ue,images:de});Zr(Q)&&r(e,ue)}else{n.agentId||a(e,n.cwd||"~");const Q=await ge(s,e);await s.agent(Q).send(A,{clientMessageId:ue,images:de})}}catch{r(e,ue)}finally{Je(!1)}}function It(){n!=null&&n.agentId&&(E?je(e):s==null||s.agent(n.agentId).interrupt())}function Ot(i,_){const j={model:n==null?void 0:n.model,provider:n==null?void 0:n.modelProvider};c(e,i,_),ie(null),!(!s||!_)&&(async()=>{const q=await ge(s,e);await s.agent(q).setModel(_,i)})().catch(q=>{const A=O.getState().sessions[e];(A==null?void 0:A.model)===i&&A.modelProvider===_&&c(e,j.model,j.provider);const de=q instanceof Error?q.message:String(q);ie(`Couldn't switch model: ${de}`)})}function Mt(i){const _=n==null?void 0:n.thinkingLevel;l(e,i),ie(null),s&&(async()=>{const j=await ge(s,e),q=await s.agent(j).setThinking(i);l(e,q.level)})().catch(j=>{var A;((A=O.getState().sessions[e])==null?void 0:A.thinkingLevel)===i&&l(e,_);const q=j instanceof Error?j.message:String(j);ie(`Couldn't set thinking level: ${q}`)})}return t.jsxs("div",{className:S.composer,children:[t.jsxs("div",{className:w(S.card,yt&&S.flash,E&&S.compacting),children:[t.jsxs("div",{className:S.textareaWrap,children:[t.jsx("div",{className:S.highlightLayer,"aria-hidden":!0,children:ne?t.jsxs(t.Fragment,{children:[t.jsx("mark",{className:S.commandMark,children:v.slice(0,ne.end)}),v.slice(ne.end)]}):v}),t.jsx(at,{ref:R,className:S.textarea,rows:1,value:v,readOnly:E,placeholder:E?"Compacting context… esc cancel":F?"Steer the running turn… ⏎ steer · ⇧⏎ newline":"Ask anything… ⏎ send · ⇧⏎ newline · / commands",onChange:At,onKeyDown:Lt,onPaste:Et,"data-session-id":e})]}),t.jsx(Ha,{images:M,onRemove:Rt}),t.jsxs("div",{className:S.toolbar,children:[t.jsx(L,{className:S.toolBtn,variant:"ghost",size:"sm",iconOnly:!0,title:"Attach image","aria-label":"Attach image",disabled:E,onClick:()=>{var i;return(i=Y.current)==null?void 0:i.click()},children:t.jsx(bn,{size:16})}),t.jsx(br,{open:P&&!E,onOpenChange:N,options:he,highlightedIndex:B,onSelect:Ge,isLoading:Ct,isError:wt,errorMessage:ze instanceof Error?ze.message:void 0,hiddenExtensionCount:Dt,renderTrigger:()=>t.jsx(L,{className:S.toolBtn,variant:"ghost",size:"sm",iconOnly:!0,disabled:E,title:"Slash commands","aria-label":"Slash commands",children:t.jsx(Nn,{size:16})})}),t.jsxs("div",{className:S.toolbarRight,children:[t.jsx(wr,{currentModel:n==null?void 0:n.model,currentModelProvider:n==null?void 0:n.modelProvider,provider:"pi",agentId:n==null?void 0:n.agentId,onSelect:Ot,renderTrigger:(i,_)=>{const j=_!==void 0&&_!==i;return t.jsxs("button",{type:"button",className:S.modelBtn,disabled:!s,title:i?`Model: ${_??i}${j?` (${i})`:""}`:"Select model",children:[t.jsx(Sn,{size:14,"aria-hidden":"true"}),t.jsx("span",{className:S.modelLabel,children:_??i??"Model"}),j&&t.jsxs("span",{className:S.modelId,children:["(",i,")"]}),t.jsx(Xe,{size:13,className:S.modelChevron,"aria-hidden":"true"})]})}}),y&&t.jsx(Dr,{currentLevel:n==null?void 0:n.thinkingLevel,levels:$,open:d,onOpenChange:h,onSelect:Mt,renderTrigger:i=>t.jsxs("button",{type:"button",className:S.modelBtn,disabled:!s,title:i?`Thinking: ${i}`:"Thinking level",children:[t.jsx(ct,{size:14,"aria-hidden":"true"}),t.jsx("span",{className:S.modelLabel,children:i??"Thinking"}),t.jsx(Xe,{size:13,className:S.modelChevron,"aria-hidden":"true"})]})}),(F||E)&&t.jsx(L,{className:S.roundBtn,variant:"destructive",size:"sm",iconOnly:!0,title:E?"Cancel the compaction":"Stop the running turn","aria-label":"Stop",onClick:It,children:t.jsx(Cn,{size:14})}),t.jsx(L,{className:S.roundBtn,size:"sm",iconOnly:!0,disabled:!Fe,title:F?"Steer the running turn":"Send","aria-label":F?"Steer":"Send",onClick:()=>void Ve(F?"steer":"send"),children:F?t.jsx(wn,{size:16}):t.jsx(Dn,{size:18})})]})]})]}),t.jsx("div",{role:"status",children:E&&t.jsxs("div",{className:S.compactStatus,children:[t.jsx(oe,{size:"xs","aria-label":"Compacting"}),t.jsx("span",{className:S.compactStatusText,children:Bt}),t.jsx("button",{type:"button",className:S.compactCancel,title:"Cancel the compaction (Esc)",onClick:()=>void je(e),children:"Cancel"})]})}),re!==null&&t.jsx("div",{className:S.note,children:re}),ke&&t.jsx("div",{role:"alert",className:S.inlineError,children:ke}),ve&&t.jsx("div",{role:"alert",className:S.inlineError,children:ve}),t.jsx("input",{ref:Y,className:S.hiddenFileInput,type:"file",accept:"image/*",multiple:!0,onChange:qt})]})}const ni="_track_oxvl6_2",si="_sweep_oxvl6_24",oi="_visuallyHidden_oxvl6_64",Se={track:ni,sweep:si,visuallyHidden:oi};function ai({running:e}){return e?t.jsxs("div",{className:Se.track,role:"progressbar","aria-label":"Turn in progress",children:[t.jsx("div",{className:Se.sweep,"aria-hidden":"true"}),t.jsx("span",{className:Se.visuallyHidden,role:"status","aria-live":"polite",children:"Agent is working…"})]}):null}const ri="_panel_1tq06_1",ii="_empty_1tq06_5",ot={panel:ri,empty:ii};function ji({tab:e,owningPaneId:s}){const{sessionId:n}=e.data,o=O(r=>r.sessions[n]);return Hn(n),o?t.jsxs(Qe,{className:ot.panel,children:[t.jsx(ai,{running:o.status==="running"}),t.jsx(Oa,{session:o,owningPaneId:s,workspaceCwd:e.workspaceCwd}),t.jsx(ti,{sessionId:o.id})]}):t.jsx(Qe,{children:t.jsx("div",{className:ot.empty,children:"Session not found."})})}export{ji as ChatPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,j as s}from"./vendor-react-DQUAl2K8.js";import{N as v}from"./vendor-DaF96HbP.js";import{u as j,r as d,L as w,a as E,e as D,V as K,P as N,B as x,E as l,S as y}from"./index-BR7IITFz.js";import{u as k,a as q}from"./vendor-query-i7fr__Xm.js";import{u as z}from"./use-file-watch-bihMWgMU.js";import{D as S}from"./DiffView-D1TsZBGe.js";import"./vendor-icons-CWFUB81y.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";function b(e,t,r,i=!0){const a=j(n=>n.client);return k({queryKey:d.fileDiff(e,t,r),queryFn:async()=>{if(!a)throw new Error("not connected");return{patch:(await a.connection.request("file_diff_request",{path:e,cwd:t,staged:r})).patch??""}},enabled:!!a&&!!e&&!!t&&i})}function B(e,t,r){const i=q(),a=w.has(r)?E(e,t):null,{changedAt:n}=z(a);u.useEffect(()=>{n!==null&&(i.invalidateQueries({queryKey:d.fileRead(e)}),i.invalidateQueries({queryKey:d.fileDownload(e)}),i.invalidateQueries({queryKey:d.fileDiffByPath(e)}))},[n,e,i])}const C="_header_10rse_1",F="_path_10rse_11",V="_size_10rse_18",L="_viewToggle_10rse_23",P="_body_10rse_28",c={header:C,path:F,size:V,viewToggle:L,body:P};function g(e){return"path"in e}function Q(e){return"staged"in e}function J({tab:e}){var m;const t=e.kind==="diff",r=e.data,i=g(r)?r.path:"",a=g(r)&&Q(r)?r.staged:!1,[n,h]=u.useState(t?"diff":"file"),f=e.workspaceCwd||"~",p=D(i);B(i,f,p);const o=b(i,f,a,n==="diff"),_=K[p];return s.jsxs(N,{children:[s.jsxs("div",{className:c.header,children:[s.jsx("span",{className:c.path,children:i}),s.jsx("span",{className:c.size,children:n==="diff"?a?"staged":"unstaged":null}),s.jsxs("div",{className:c.viewToggle,children:[s.jsx(x,{size:"xs",variant:n==="file"?"default":"ghost",onClick:()=>h("file"),children:"File"}),s.jsx(x,{size:"xs",variant:n==="diff"?"default":"ghost",onClick:()=>h("diff"),children:"Diff"})]})]}),s.jsx("div",{className:v(c.body,"file-body"),children:n==="file"?s.jsx(u.Suspense,{fallback:s.jsxs(l,{children:[s.jsx(y,{size:"sm"})," Loading..."]}),children:s.jsx(_,{path:i,workspaceCwd:f})}):o.isLoading?s.jsxs(l,{children:[s.jsx(y,{size:"sm"})," Loading diff..."]}):o.isError?s.jsxs(l,{children:["Error: ",o.error instanceof Error?o.error.message:"unknown error"]}):(m=o.data)!=null&&m.patch?s.jsx(S,{patch:o.data.patch}):s.jsx(l,{style:{padding:"var(--pi-spacing-30)"},children:"No changes (file matches HEAD)"})})]})}export{J as FilePanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./vendor-react-DQUAl2K8.js";import{S as a}from"./Switch-1I6AMAC7.js";import{b as n}from"./index-BR7IITFz.js";import"./vendor-DaF96HbP.js";import"./vendor-query-i7fr__Xm.js";import"./vendor-icons-CWFUB81y.js";import"./vendor-overlays-3MkedLFU.js";import"./vendor-dnd-CayJj8TC.js";const c="_list_x2x5z_1",l="_row_x2x5z_7",m="_rowMain_x2x5z_17",d="_name_x2x5z_24",x="_description_x2x5z_29",p="_note_x2x5z_34",i={list:c,row:l,rowMain:m,name:d,description:x,note:p};function z(){const o=n(e=>e.capable),r=n(e=>e.isViewerEnabled("molviewer")),t=n(e=>e.setEnabled);return s.jsxs("div",{className:i.list,children:[s.jsxs("div",{className:i.row,children:[s.jsxs("div",{className:i.rowMain,children:[s.jsx("span",{className:i.name,children:"Molecule Viewer"}),s.jsx("span",{className:i.description,children:"Open molecular structure files (.cif, .pdb, .xyz, and similar) in the 3D viewer instead of as plain text."})]}),s.jsx(a,{checked:r,disabled:!o,onCheckedChange:e=>void t("molviewer",e),"aria-label":"Molecule Viewer"})]}),!o&&s.jsx("p",{className:i.note,children:"Requires a newer daemon."})]})}export{z as ViewersPanel};
|