chatlab-cli 0.37.1 → 0.37.3

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.
Files changed (153) hide show
  1. package/dist/{chat-command-YAFRLHMQ.mjs → chat-command-RQC44FPF.mjs} +53 -13
  2. package/dist/chat-command-RQC44FPF.mjs.map +1 -0
  3. package/dist/{chunk-FPVRSXQ4.mjs → chunk-4FAEB4C2.mjs} +12 -12
  4. package/dist/{chunk-MMTEGUQA.mjs → chunk-5OA4QI3Q.mjs} +3 -3
  5. package/dist/{chunk-UP6JIV3S.mjs → chunk-E2ZFGNZQ.mjs} +16 -12
  6. package/dist/chunk-E2ZFGNZQ.mjs.map +1 -0
  7. package/dist/{chunk-JWJREWVN.mjs → chunk-E6IRRNBQ.mjs} +27 -3
  8. package/dist/chunk-E6IRRNBQ.mjs.map +1 -0
  9. package/dist/{chunk-PDQV4RUA.mjs → chunk-GDKQKHJT.mjs} +2 -2
  10. package/dist/{chunk-GKCIRKOH.mjs → chunk-HJWBFHNR.mjs} +4 -4
  11. package/dist/{chunk-73TJ2S7W.mjs → chunk-IDDTW5JN.mjs} +313 -24
  12. package/dist/chunk-IDDTW5JN.mjs.map +1 -0
  13. package/dist/{chunk-2PY4XCH3.mjs → chunk-IMJVOODY.mjs} +2 -2
  14. package/dist/{chunk-ARIBCH47.mjs → chunk-LUENE6L7.mjs} +25 -15
  15. package/dist/chunk-LUENE6L7.mjs.map +1 -0
  16. package/dist/{chunk-WDLO7OLX.mjs → chunk-O57SQSCO.mjs} +2 -2
  17. package/dist/{chunk-N4SB6QZV.mjs → chunk-ZGXXAPLX.mjs} +2 -2
  18. package/dist/{chunk-OTYNMDDL.mjs → chunk-ZOHSWBD2.mjs} +2237 -1977
  19. package/dist/chunk-ZOHSWBD2.mjs.map +1 -0
  20. package/dist/cli.mjs +9 -9
  21. package/dist/contacts-worker.mjs +2 -2
  22. package/dist/global-insight-worker.mjs +1 -1
  23. package/dist/{http-LPFPVTBC.mjs → http-QJDZKDNJ.mjs} +12 -12
  24. package/dist/{import-T4WX2ZJL.mjs → import-XK6YM26A.mjs} +7 -7
  25. package/dist/index.mjs +12 -12
  26. package/dist/{mcp-SMF3NWIN.mjs → mcp-DMGZFSYN.mjs} +24 -17
  27. package/dist/mcp-DMGZFSYN.mjs.map +1 -0
  28. package/dist/people-relationships-worker.mjs +2 -2
  29. package/dist/semantic-index-worker.mjs +1 -1
  30. package/dist/{src-EGLLMTAU.mjs → src-4AHJUFCW.mjs} +6 -6
  31. package/dist/{stream-import-2BXJTTCE.mjs → stream-import-7VQVT5ST.mjs} +7 -7
  32. package/dist/{worker-runtime-RDLSPXFT.mjs → worker-runtime-PQBAV75N.mjs} +5 -5
  33. package/dist-cli-web/assets/{AISettingsTab-CEhrXlYR.js → AISettingsTab-qS3XKnvh.js} +1 -1
  34. package/dist-cli-web/assets/{AboutTab-Bbu0SsMM.js → AboutTab-K-i40dPv.js} +1 -1
  35. package/dist-cli-web/assets/{Alert-510jTN3l.js → Alert-GSvA5B7J.js} +1 -1
  36. package/dist-cli-web/assets/{ApiSettingsTab-Bi1GRMN4.js → ApiSettingsTab-DIVGTR3g.js} +1 -1
  37. package/dist-cli-web/assets/{BatchManageTab-DhnqMCSM.js → BatchManageTab-CJhwvYWV.js} +1 -1
  38. package/dist-cli-web/assets/{BufferResource-CKZxnACp.js → BufferResource-Cjm0m7sF.js} +1 -1
  39. package/dist-cli-web/assets/{CanvasRenderer-BeK5POBy.js → CanvasRenderer-C-fmrahh.js} +1 -1
  40. package/dist-cli-web/assets/{CardDecoration-RuBA3N2j.js → CardDecoration-Cz54ZPyh.js} +1 -1
  41. package/dist-cli-web/assets/{ChatRecordDrawer-BY_-lIEj.js → ChatRecordDrawer-Cst8zTUv.js} +1 -1
  42. package/dist-cli-web/assets/{ChatRecordWorkspace-7prKd-Tq.js → ChatRecordWorkspace-DKVKaimw.js} +1 -1
  43. package/dist-cli-web/assets/{Checkbox-_eH64bb0.js → Checkbox-CrlY3jiJ.js} +1 -1
  44. package/dist-cli-web/assets/{DataDirCleanupNotice-BHaXwlfr.js → DataDirCleanupNotice-Cjqiub4e.js} +1 -1
  45. package/dist-cli-web/assets/{DatePicker.vue_vue_type_script_setup_true_lang-D9Ul_GYz.js → DatePicker.vue_vue_type_script_setup_true_lang-BYY2UmPA.js} +1 -1
  46. package/dist-cli-web/assets/{DebugToolsPanel-ByKItGrS.js → DebugToolsPanel-I00RV_Lr.js} +1 -1
  47. package/dist-cli-web/assets/{EChart.vue_vue_type_script_setup_true_lang-DubnuUXI.js → EChart.vue_vue_type_script_setup_true_lang-CRTZh9kh.js} +1 -1
  48. package/dist-cli-web/assets/{EChartBar.vue_vue_type_script_setup_true_lang-DKNCZuFm.js → EChartBar.vue_vue_type_script_setup_true_lang-DjDFhnN9.js} +1 -1
  49. package/dist-cli-web/assets/{EChartLine.vue_vue_type_script_setup_true_lang-Fl7xAOSR.js → EChartLine.vue_vue_type_script_setup_true_lang-BLqlW9E4.js} +1 -1
  50. package/dist-cli-web/assets/{EChartWordcloud-C6XM4KOX.js → EChartWordcloud-ChKJM8bU.js} +1 -1
  51. package/dist-cli-web/assets/{FileDropZone.vue_vue_type_script_setup_true_lang-DYDdRSNE.js → FileDropZone.vue_vue_type_script_setup_true_lang-CsRmQhVQ.js} +1 -1
  52. package/dist-cli-web/assets/{Filter-CByj_rCR.js → Filter-Duzxgudo.js} +1 -1
  53. package/dist-cli-web/assets/{GlobalTaskBar-BdELjzrs.js → GlobalTaskBar-DL0IJxlt.js} +1 -1
  54. package/dist-cli-web/assets/{GroupRelationshipGalaxyView-CnzPEgUS.js → GroupRelationshipGalaxyView-BZrB2o2g.js} +1 -1
  55. package/dist-cli-web/assets/{Label-DCIcxkhU.js → Label-CaVKlQnJ.js} +1 -1
  56. package/dist-cli-web/assets/{LoadingState.vue_vue_type_script_setup_true_lang-BBcCt_Qm.js → LoadingState.vue_vue_type_script_setup_true_lang-uF54r-dT.js} +1 -1
  57. package/dist-cli-web/assets/{MessageExportModal-DNU16Bs8.js → MessageExportModal-JpurBsUW.js} +1 -1
  58. package/dist-cli-web/assets/{PageHeader-CKeZjNNR.js → PageHeader-BciykZ_-.js} +1 -1
  59. package/dist-cli-web/assets/{PageTabs.vue_vue_type_script_setup_true_lang-C8M3wNNH.js → PageTabs.vue_vue_type_script_setup_true_lang-2Xe2iUFO.js} +1 -1
  60. package/dist-cli-web/assets/{RelationshipGalaxyCanvas-CDhljGyJ.js → RelationshipGalaxyCanvas-BO5-MowG.js} +3 -3
  61. package/dist-cli-web/assets/{RelationshipGalaxyThreeCanvas-BP8fsvvf.js → RelationshipGalaxyThreeCanvas-Dp4CcWU5.js} +1 -1
  62. package/dist-cli-web/assets/{RenderTargetSystem-D76QrDT_.js → RenderTargetSystem-CfuoUG_y.js} +1 -1
  63. package/dist-cli-web/assets/{RovingFocusItem-BJMUQ5DJ.js → RovingFocusItem-FpYwYEP_.js} +1 -1
  64. package/dist-cli-web/assets/{ScreenCaptureModal-DkX4z-M1.js → ScreenCaptureModal-cElYPaSj.js} +1 -1
  65. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-pVQMbTsj.js +1 -0
  66. package/dist-cli-web/assets/{Select-B5oJc5y1.js → Select-H8Fz6RkU.js} +1 -1
  67. package/dist-cli-web/assets/{SettingsModal-BO-QKQ2h.js → SettingsModal-52Fw4fVW.js} +2 -2
  68. package/dist-cli-web/assets/{StorageTab-CPPXXaRm.js → StorageTab-BnugE5BO.js} +1 -1
  69. package/dist-cli-web/assets/{Switch-CDk3LZ4_.js → Switch-K4aqYC4Y.js} +1 -1
  70. package/dist-cli-web/assets/{Tabs-DqWTBV8x.js → Tabs-BXjD45rO.js} +1 -1
  71. package/dist-cli-web/assets/{Tabs-BMq9wODW.js → Tabs-DJ5p8gb6.js} +1 -1
  72. package/dist-cli-web/assets/{ThemeCard.vue_vue_type_script_setup_true_lang-D2outEOV.js → ThemeCard.vue_vue_type_script_setup_true_lang-BLmTpx4f.js} +1 -1
  73. package/dist-cli-web/assets/{TimeSelect.vue_vue_type_script_setup_true_lang-BcflxP_U.js → TimeSelect.vue_vue_type_script_setup_true_lang-geQAlopO.js} +1 -1
  74. package/dist-cli-web/assets/{VisuallyHiddenInput-BAFpkxMI.js → VisuallyHiddenInput-J2KEIQBX.js} +1 -1
  75. package/dist-cli-web/assets/{WebGLRenderer-DjCPvR_O.js → WebGLRenderer-BDFzRniS.js} +1 -1
  76. package/dist-cli-web/assets/{WebGPURenderer-C2B_u03z.js → WebGPURenderer-BKYZyUCZ.js} +1 -1
  77. package/dist-cli-web/assets/aiChat-CdJzpNYW.js +8 -0
  78. package/dist-cli-web/assets/{base-F6s0vTrr.js → base-129JztT1.js} +1 -1
  79. package/dist-cli-web/assets/{browserAll-DiUAZg4L.js → browserAll-CZNZDK1i.js} +1 -1
  80. package/dist-cli-web/assets/{chatMessages-Bd33SSXI.js → chatMessages-zmzHCUCy.js} +3 -3
  81. package/dist-cli-web/assets/{cli-web-DoibEdj2.js → cli-web-_WGCg-ZY.js} +1 -1
  82. package/dist-cli-web/assets/{fetch-CXM-cjDS.js → fetch-B7Tdp7Uo.js} +1 -1
  83. package/dist-cli-web/assets/{fetch-DBpDMy29.js → fetch-BBdyPNj3.js} +1 -1
  84. package/dist-cli-web/assets/{fetch-B_YFABxI.js → fetch-Bafz8jLM.js} +1 -1
  85. package/dist-cli-web/assets/{fetch-CxVcHNid.js → fetch-C4W6tD-D.js} +1 -1
  86. package/dist-cli-web/assets/{fetch-BeX69kpS.js → fetch-DOsmgros.js} +1 -1
  87. package/dist-cli-web/assets/{fetch-CRocA-4C.js → fetch-DTPDtL38.js} +1 -1
  88. package/dist-cli-web/assets/{fetch-CXqeAbnY.js → fetch-DaeoNUip.js} +1 -1
  89. package/dist-cli-web/assets/{fetch-7lUvXbhU.js → fetch-DgHdAlO7.js} +1 -1
  90. package/dist-cli-web/assets/{fetch-DKBBS9Op.js → fetch-Di4QpfqL.js} +1 -1
  91. package/dist-cli-web/assets/{fetch-4nh1LaVF.js → fetch-Dw33HaVP.js} +11 -13
  92. package/dist-cli-web/assets/{fetch-BEaW1j5H.js → fetch-IP6i-mtr.js} +1 -1
  93. package/dist-cli-web/assets/{fetch-epFXmPIQ.js → fetch-sbr95ipd.js} +1 -1
  94. package/dist-cli-web/assets/{host-CtSqR_Zm.js → host-CMnAiJSx.js} +1 -1
  95. package/dist-cli-web/assets/{host-C4rU8pKA.js → host-CuuNLUWx.js} +1 -1
  96. package/dist-cli-web/assets/{index-ekvsNmfe.js → index-BBYtZa7g.js} +1 -1
  97. package/dist-cli-web/assets/{index-mXe1LssU.js → index-BOXh7X5Y.js} +1 -1
  98. package/dist-cli-web/assets/index-BepItDCQ.js +64 -0
  99. package/dist-cli-web/assets/{index-4DVZ2g0M.js → index-BmGA3geF.js} +1 -1
  100. package/dist-cli-web/assets/{index-BvMAw3Zd.js → index-C-u3l4Uh.js} +1 -1
  101. package/dist-cli-web/assets/{index-D8cHMqV-.js → index-CN9WMxb3.js} +2 -2
  102. package/dist-cli-web/assets/{index-BFH1j_R9.js → index-Chh0gCp7.js} +1 -1
  103. package/dist-cli-web/assets/index-DRFMz0cs.css +1 -0
  104. package/dist-cli-web/assets/{index-BgelKQTW.css → index-DbP9vQhR.css} +1 -1
  105. package/dist-cli-web/assets/index-DgCXdbsG.js +2 -0
  106. package/dist-cli-web/assets/{index-CuCQ1d9f.js → index-DhRaZS6z.js} +1 -1
  107. package/dist-cli-web/assets/{index-_m1mf1jm.js → index-Dz4yfeg6.js} +1 -1
  108. package/dist-cli-web/assets/{index-mbLXPIyC.js → index-EtteazuD.js} +1 -1
  109. package/dist-cli-web/assets/index-GNMlsoVH.js +137 -0
  110. package/dist-cli-web/assets/{index-B1oj9KDv.js → index-bQ9oj54q.js} +4 -4
  111. package/dist-cli-web/assets/{index-DlHuILT_.js → index-fsLAooCi.js} +1 -1
  112. package/dist-cli-web/assets/{people-page-header-BbYSSpsO.js → people-page-header-CKXRSnpl.js} +1 -1
  113. package/dist-cli-web/assets/{prompt-C-ofJ7t_.js → prompt-DNxAd1Bj.js} +1 -1
  114. package/dist-cli-web/assets/{semantic-index-config-builder-D3TYVYC-.js → semantic-index-config-builder-CQ27G4TK.js} +1 -1
  115. package/dist-cli-web/assets/{service-CppETV4a.js → service-BwbGKwDn.js} +1 -1
  116. package/dist-cli-web/assets/service-DQjyjQZx.js +1 -0
  117. package/dist-cli-web/assets/service-Dtve_40X.js +1 -0
  118. package/dist-cli-web/assets/useFormControl-CNmp_2bd.js +1 -0
  119. package/dist-cli-web/assets/{ActionToolsPanel.vue_vue_type_script_setup_true_lang-IB1yZxCE.js → useInsightTabAnalytics-DaU_ADbQ.js} +8 -8
  120. package/dist-cli-web/assets/{useTable-Clk7ecq-.js → useTable-BYXxnZMd.js} +1 -1
  121. package/dist-cli-web/assets/{useToast-B5LaA6c-.js → useToast-DPkgv34s.js} +1 -1
  122. package/dist-cli-web/assets/{webworkerAll-CyA4b4LT.js → webworkerAll-Um4PrCaA.js} +1 -1
  123. package/dist-cli-web/index.html +1 -1
  124. package/package.json +1 -1
  125. package/dist/chat-command-YAFRLHMQ.mjs.map +0 -1
  126. package/dist/chunk-73TJ2S7W.mjs.map +0 -1
  127. package/dist/chunk-ARIBCH47.mjs.map +0 -1
  128. package/dist/chunk-JWJREWVN.mjs.map +0 -1
  129. package/dist/chunk-OTYNMDDL.mjs.map +0 -1
  130. package/dist/chunk-UP6JIV3S.mjs.map +0 -1
  131. package/dist/mcp-SMF3NWIN.mjs.map +0 -1
  132. package/dist-cli-web/assets/SectionTabs.vue_vue_type_script_setup_true_lang-qFhJO5B0.js +0 -1
  133. package/dist-cli-web/assets/aiChat--CR4g2M7.js +0 -8
  134. package/dist-cli-web/assets/index-CIIyg_o9.css +0 -1
  135. package/dist-cli-web/assets/index-CaYtkONV.js +0 -64
  136. package/dist-cli-web/assets/index-D3Hyjv4e.js +0 -137
  137. package/dist-cli-web/assets/index-R4LqAnx9.js +0 -2
  138. package/dist-cli-web/assets/service-BYOUkk7V.js +0 -1
  139. package/dist-cli-web/assets/service-tEx-5LUL.js +0 -1
  140. package/dist-cli-web/assets/useFormControl-CrWi_6Hn.js +0 -1
  141. /package/dist/{chunk-FPVRSXQ4.mjs.map → chunk-4FAEB4C2.mjs.map} +0 -0
  142. /package/dist/{chunk-MMTEGUQA.mjs.map → chunk-5OA4QI3Q.mjs.map} +0 -0
  143. /package/dist/{chunk-PDQV4RUA.mjs.map → chunk-GDKQKHJT.mjs.map} +0 -0
  144. /package/dist/{chunk-GKCIRKOH.mjs.map → chunk-HJWBFHNR.mjs.map} +0 -0
  145. /package/dist/{chunk-2PY4XCH3.mjs.map → chunk-IMJVOODY.mjs.map} +0 -0
  146. /package/dist/{chunk-WDLO7OLX.mjs.map → chunk-O57SQSCO.mjs.map} +0 -0
  147. /package/dist/{chunk-N4SB6QZV.mjs.map → chunk-ZGXXAPLX.mjs.map} +0 -0
  148. /package/dist/{http-LPFPVTBC.mjs.map → http-QJDZKDNJ.mjs.map} +0 -0
  149. /package/dist/{import-T4WX2ZJL.mjs.map → import-XK6YM26A.mjs.map} +0 -0
  150. /package/dist/{src-EGLLMTAU.mjs.map → src-4AHJUFCW.mjs.map} +0 -0
  151. /package/dist/{stream-import-2BXJTTCE.mjs.map → stream-import-7VQVT5ST.mjs.map} +0 -0
  152. /package/dist/{worker-runtime-RDLSPXFT.mjs.map → worker-runtime-PQBAV75N.mjs.map} +0 -0
  153. /package/dist-cli-web/assets/{ActionToolsPanel-DDNXXH8v.css → useInsightTabAnalytics-DDNXXH8v.css} +0 -0
@@ -1 +1 @@
1
- import{d as $,o as A,c as C,a as I,m as R,r as j,b as g,e as E}from"./index-B1oj9KDv.js";const L=["multiple","accept"],T=$({__name:"FileDropZone",props:{multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},accept:{default:()=>["*"]},directory:{type:Boolean,default:!1}},emits:["files","directory-drop"],setup(c,{expose:y,emit:v}){const a=c,u=v,f=g(!1),d=g(null),D=E(()=>a.accept.includes("*")?"*":a.accept.join(","));function p(){a.disabled||d.value?.click()}function w(e){const t=e.target;!t.files||t.files.length===0||(m(Array.from(t.files)),t.value="")}function b(e){e.preventDefault(),e.stopPropagation(),!a.disabled&&(f.value=!0)}function P(e){e.preventDefault(),e.stopPropagation(),!a.disabled&&(f.value=!0)}function F(e){e.preventDefault(),e.stopPropagation(),f.value=!1}async function k(e){if(e.preventDefault(),e.stopPropagation(),f.value=!1,a.disabled)return;const t=e.dataTransfer;if(!t)return;const i=t.items;if(i?.length===1){const o=i[0].webkitGetAsEntry?.();if(o?.isDirectory){await B(o,t.files);return}}if(t.files.length===0)return;let n=Array.from(t.files);a.multiple||(n=[n[0]]),a.accept.includes("*")||(n=n.filter(o=>{const l="."+o.name.split(".").pop()?.toLowerCase();return a.accept.some(r=>r.toLowerCase()===l)})),n.length>0&&m(n)}async function B(e,t){if(t.length>0)try{const n=window.electron?.webUtils?.getPathForFile?.(t[0]);if(n){const o=n.includes("\\")?"\\":"/",l=n.split(o),r=l.lastIndexOf(e.name);if(r!==-1){const s=l.slice(0,r+1).join(o);u("directory-drop",{files:[],dirPath:s});return}}}catch{}const i=await h(e,e.name);i.length>0&&u("directory-drop",{files:i,dirPath:null})}async function h(e,t){const i=e.createReader(),n=[],o=()=>new Promise((r,s)=>i.readEntries(r,s));let l;do{l=await o();for(const r of l)if(r.isFile){const s=await new Promise((x,O)=>{r.file(x,O)});Object.defineProperty(s,"webkitRelativePath",{value:`${t}/${r.name}`,writable:!1}),n.push(s)}else if(r.isDirectory){const s=await h(r,`${t}/${r.name}`);n.push(...s)}}while(l.length>0);return n}function m(e){const t=[];for(const i of e)try{const n=window.electron?.webUtils?.getPathForFile?.(i);n&&t.push(n)}catch{}u("files",{files:e,paths:t})}return y({openFileDialog:p}),(e,t)=>(A(),C("div",{onDragenter:b,onDragover:P,onDragleave:F,onDrop:k},[I("input",R({ref_key:"fileInputRef",ref:d,type:"file",multiple:c.multiple,accept:c.directory?void 0:D.value,class:"hidden"},c.directory?{webkitdirectory:"",directory:""}:{},{onChange:w}),null,16,L),j(e.$slots,"default",{isDragOver:f.value,openFileDialog:p,disabled:c.disabled})],32))}});export{T as _};
1
+ import{d as $,o as A,c as C,a as I,m as R,r as j,b as g,e as E}from"./index-bQ9oj54q.js";const L=["multiple","accept"],T=$({__name:"FileDropZone",props:{multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},accept:{default:()=>["*"]},directory:{type:Boolean,default:!1}},emits:["files","directory-drop"],setup(c,{expose:y,emit:v}){const a=c,u=v,f=g(!1),d=g(null),D=E(()=>a.accept.includes("*")?"*":a.accept.join(","));function p(){a.disabled||d.value?.click()}function w(e){const t=e.target;!t.files||t.files.length===0||(m(Array.from(t.files)),t.value="")}function b(e){e.preventDefault(),e.stopPropagation(),!a.disabled&&(f.value=!0)}function P(e){e.preventDefault(),e.stopPropagation(),!a.disabled&&(f.value=!0)}function F(e){e.preventDefault(),e.stopPropagation(),f.value=!1}async function k(e){if(e.preventDefault(),e.stopPropagation(),f.value=!1,a.disabled)return;const t=e.dataTransfer;if(!t)return;const i=t.items;if(i?.length===1){const o=i[0].webkitGetAsEntry?.();if(o?.isDirectory){await B(o,t.files);return}}if(t.files.length===0)return;let n=Array.from(t.files);a.multiple||(n=[n[0]]),a.accept.includes("*")||(n=n.filter(o=>{const l="."+o.name.split(".").pop()?.toLowerCase();return a.accept.some(r=>r.toLowerCase()===l)})),n.length>0&&m(n)}async function B(e,t){if(t.length>0)try{const n=window.electron?.webUtils?.getPathForFile?.(t[0]);if(n){const o=n.includes("\\")?"\\":"/",l=n.split(o),r=l.lastIndexOf(e.name);if(r!==-1){const s=l.slice(0,r+1).join(o);u("directory-drop",{files:[],dirPath:s});return}}}catch{}const i=await h(e,e.name);i.length>0&&u("directory-drop",{files:i,dirPath:null})}async function h(e,t){const i=e.createReader(),n=[],o=()=>new Promise((r,s)=>i.readEntries(r,s));let l;do{l=await o();for(const r of l)if(r.isFile){const s=await new Promise((x,O)=>{r.file(x,O)});Object.defineProperty(s,"webkitRelativePath",{value:`${t}/${r.name}`,writable:!1}),n.push(s)}else if(r.isDirectory){const s=await h(r,`${t}/${r.name}`);n.push(...s)}}while(l.length>0);return n}function m(e){const t=[];for(const i of e)try{const n=window.electron?.webUtils?.getPathForFile?.(i);n&&t.push(n)}catch{}u("files",{files:e,paths:t})}return y({openFileDialog:p}),(e,t)=>(A(),C("div",{onDragenter:b,onDragover:P,onDragleave:F,onDrop:k},[I("input",R({ref_key:"fileInputRef",ref:d,type:"file",multiple:c.multiple,accept:c.directory?void 0:D.value,class:"hidden"},c.directory?{webkitdirectory:"",directory:""}:{},{onChange:w}),null,16,L),j(e.$slots,"default",{isDragOver:f.value,openFileDialog:p,disabled:c.disabled})],32))}});export{T as _};
@@ -1 +1 @@
1
- import{S as n,a as u,G as o,b as f}from"./RelationshipGalaxyCanvas-CDhljGyJ.js";const s=class i extends n{constructor(e){e={...i.defaultOptions,...e},super(e),this.enabled=!0,this._state=u.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,t,a,r){e.applyFilter(this,t,a,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:a,...r}=e;let l,d;return t&&(l=o.from(t)),a&&(d=f.from(a)),new i({gpuProgram:l,glProgram:d,...r})}};s.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let b=s;export{b as F};
1
+ import{S as n,a as u,G as o,b as f}from"./RelationshipGalaxyCanvas-BO5-MowG.js";const s=class i extends n{constructor(e){e={...i.defaultOptions,...e},super(e),this.enabled=!0,this._state=u.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,t,a,r){e.applyFilter(this,t,a,r)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:a,...r}=e;let l,d;return t&&(l=o.from(t)),a&&(d=f.from(a)),new i({gpuProgram:l,glProgram:d,...r})}};s.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let b=s;export{b as F};
@@ -1 +1 @@
1
- import{d as _,a6 as g,aD as v,ay as f,aA as k,o as c,f as b,w as x,c as I,a as s,g as o,z as y,a7 as C,p as w,l as T,aE as S,e as l,ah as A}from"./index-B1oj9KDv.js";import{u as B}from"./aiChat--CR4g2M7.js";import"./vendor-snapdom--nZvo8Sg.js";import"./prompt-C-ofJ7t_.js";import"./chatlabSiteLocale-CrCNb8QP.js";const N={key:0,class:"pointer-events-auto fixed right-4 bottom-[88px] z-40"},q=["title"],R={class:"flex h-6.5 w-6.5 shrink-0 items-center justify-center rounded-full bg-white text-primary-600 shadow-[0_2px_8px_rgba(255,255,255,0.28)]"},O={class:"text-[11px] font-medium text-white"},V=_({__name:"GlobalTaskBar",setup($){const{t:r}=g(),e=v(),n=f(),t=B(),{activeTask:a}=k(t),d=l(()=>t.getActiveTaskState()),p=l(()=>{if(!a.value)return!1;if(a.value.kind==="global")return e.name!=="global-ai"||e.query.aiChatId!==a.value.aiChatId;const i=a.value.chatType==="group"?"group-chat":"private-chat";return e.name===i&&String(e.params.id??"")===a.value.sessionId&&e.query.tab==="ai-chat"?(d.value?.currentAIChatId??null)!==(a.value.aiChatId??null):!0});async function h(){if(a.value){if(t.focusActiveTaskAIChat(),a.value.kind==="global"){await n.push({name:"global-ai",query:{aiChatId:a.value.aiChatId??void 0}});return}await n.push({name:a.value.chatType==="group"?"group-chat":"private-chat",params:{id:a.value.sessionId},query:{tab:"ai-chat"}})}}return(i,m)=>{const u=C;return c(),b(S,{name:"task-bar-fade"},{default:x(()=>[p.value?(c(),I("div",N,[s("button",{class:"group flex h-9 items-center gap-1.5 overflow-hidden rounded-full bg-primary-500 px-2 shadow-[0_10px_24px_rgba(15,23,42,0.12)] transition-all hover:-translate-y-0.5 hover:bg-primary-600 hover:shadow-[0_16px_32px_rgba(15,23,42,0.16)] dark:bg-primary-500 dark:hover:bg-primary-400",title:`${o(r)("ai.chat.backgroundTask.return")} · ${o(a)?.sessionName??""}`,onClick:h},[s("div",R,[y(u,{name:"i-heroicons-sparkles",class:"h-3 w-3 animate-pulse"})]),s("span",O,w(o(r)("ai.chat.backgroundTask.runningShort")),1)],8,q)])):T("",!0)]),_:1})}}}),j=A(V,[["__scopeId","data-v-a0a15422"]]);export{j as default};
1
+ import{d as _,a6 as g,aD as v,ay as f,aA as k,o as c,f as b,w as x,c as I,a as s,g as o,z as y,a7 as C,p as w,l as T,aE as S,e as l,ah as A}from"./index-bQ9oj54q.js";import{u as B}from"./aiChat-CdJzpNYW.js";import"./vendor-snapdom--nZvo8Sg.js";import"./prompt-DNxAd1Bj.js";import"./chatlabSiteLocale-CrCNb8QP.js";const N={key:0,class:"pointer-events-auto fixed right-4 bottom-[88px] z-40"},q=["title"],R={class:"flex h-6.5 w-6.5 shrink-0 items-center justify-center rounded-full bg-white text-primary-600 shadow-[0_2px_8px_rgba(255,255,255,0.28)]"},O={class:"text-[11px] font-medium text-white"},V=_({__name:"GlobalTaskBar",setup($){const{t:r}=g(),e=v(),n=f(),t=B(),{activeTask:a}=k(t),d=l(()=>t.getActiveTaskState()),p=l(()=>{if(!a.value)return!1;if(a.value.kind==="global")return e.name!=="global-ai"||e.query.aiChatId!==a.value.aiChatId;const i=a.value.chatType==="group"?"group-chat":"private-chat";return e.name===i&&String(e.params.id??"")===a.value.sessionId&&e.query.tab==="ai-chat"?(d.value?.currentAIChatId??null)!==(a.value.aiChatId??null):!0});async function h(){if(a.value){if(t.focusActiveTaskAIChat(),a.value.kind==="global"){await n.push({name:"global-ai",query:{aiChatId:a.value.aiChatId??void 0}});return}await n.push({name:a.value.chatType==="group"?"group-chat":"private-chat",params:{id:a.value.sessionId},query:{tab:"ai-chat"}})}}return(i,m)=>{const u=C;return c(),b(S,{name:"task-bar-fade"},{default:x(()=>[p.value?(c(),I("div",N,[s("button",{class:"group flex h-9 items-center gap-1.5 overflow-hidden rounded-full bg-primary-500 px-2 shadow-[0_10px_24px_rgba(15,23,42,0.12)] transition-all hover:-translate-y-0.5 hover:bg-primary-600 hover:shadow-[0_16px_32px_rgba(15,23,42,0.16)] dark:bg-primary-500 dark:hover:bg-primary-400",title:`${o(r)("ai.chat.backgroundTask.return")} · ${o(a)?.sessionName??""}`,onClick:h},[s("div",R,[y(u,{name:"i-heroicons-sparkles",class:"h-3 w-3 animate-pulse"})]),s("span",O,w(o(r)("ai.chat.backgroundTask.runningShort")),1)],8,q)])):T("",!0)]),_:1})}}}),j=A(V,[["__scopeId","data-v-a0a15422"]]);export{j as default};
@@ -1 +1 @@
1
- import{d as te,a6 as ae,L as se,K as oe,x as le,al as ie,o as r,c as p,f as T,g as o,a as e,z as v,a7 as ne,p as t,w as B,a9 as U,a8 as re,F as $,l as I,aN as z,j as ce,b as f,e as y,a5 as ue,C as L}from"./index-B1oj9KDv.js";import{_ as K}from"./LoadingState.vue_vue_type_script_setup_true_lang-BBcCt_Qm.js";import de from"./RelationshipGalaxyThreeCanvas-BP8fsvvf.js";import"./vendor-snapdom--nZvo8Sg.js";import"./relationship-galaxy-connections-Cg4G5yYE.js";import"./relationship-galaxy-viewport-Cwfa51ER.js";function he(d){return d.hasError?{content:"error",showLoadingOverlay:!1}:d.webglUnavailable?{content:"webgl-unavailable",showLoadingOverlay:!1}:d.hasGraph?{content:"canvas",showLoadingOverlay:d.isLoading}:d.isLoading?{content:"loading",showLoadingOverlay:!1}:{content:"empty",showLoadingOverlay:!1}}function me(d,c,s=10){if(!d||!c)return[];const G=new Map(d.members.map(l=>[l.key,l]));return d.edges.flatMap(l=>{if(l.sourceKey!==c&&l.targetKey!==c)return[];const i=l.sourceKey===c?l.targetKey:l.sourceKey,h=G.get(i);return h?[{member:h,edge:l}]:[]}).sort((l,i)=>i.edge.weight-l.edge.weight||(i.edge.lastInteractionTs??0)-(l.edge.lastInteractionTs??0)||l.member.rank-i.member.rank||l.member.key.localeCompare(i.member.key)).slice(0,Math.max(0,s))}const pe={class:"dark relative h-full min-h-[420px] w-full overflow-hidden bg-[#03050c] text-white"},xe={key:1,class:"flex h-full items-center justify-center px-6 text-center"},ve={class:"max-w-sm"},fe={class:"mt-3 text-base font-semibold"},we={class:"mt-1 line-clamp-2 text-sm text-white/50"},_e={key:2,class:"flex h-full items-center justify-center px-6 text-center"},ye={class:"max-w-sm"},be={class:"mt-3 text-base font-semibold"},ge={class:"mt-1 text-sm leading-6 text-white/50"},ke={key:3,class:"flex h-full items-center justify-center px-6 text-center"},Ge={class:"max-w-sm"},Re={class:"mt-3 text-base font-semibold"},Ce={class:"mt-1 text-sm leading-6 text-white/50"},Ie={key:2,class:"absolute inset-x-3 bottom-3 z-20 flex max-h-[72vh] flex-col overflow-hidden rounded-2xl border border-white/8 bg-[#070a12]/84 text-white shadow-overlay backdrop-blur-2xl md:inset-x-auto md:bottom-4 md:right-4 md:top-4 md:max-h-none md:w-[360px]"},Le={class:"flex min-h-0 flex-1 flex-col gap-4 px-4 pb-4 pt-5"},Ne={class:"flex shrink-0 items-center gap-3 pr-8"},Fe={class:"min-w-0 flex-1"},Ve={class:"flex items-center gap-2"},De={class:"truncate text-base font-semibold"},Se={class:"rounded-full bg-white/8 px-2 py-0.5 font-mono text-[10px] text-white/55"},Te={class:"mt-0.5 truncate text-xs text-white/40"},je={class:"grid shrink-0 grid-cols-3 rounded-xl border border-white/8 bg-white/3 p-1"},Ee={class:"min-w-0 px-2 py-1.5"},Me={class:"text-[9px] uppercase tracking-wider text-white/35"},Oe={class:"mt-1 font-mono text-sm font-semibold"},Be={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},Ue={class:"text-[9px] uppercase tracking-wider text-white/35"},$e={class:"mt-1 font-mono text-sm font-semibold text-sky-200"},ze={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},Ke={class:"text-[9px] uppercase tracking-wider text-white/35"},qe={class:"mt-1 truncate text-xs font-semibold"},Pe={class:"shrink-0 border-t border-white/7 pt-3"},Qe={class:"mb-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-white/40"},We={class:"grid grid-cols-3"},Ae={class:"px-2.5 py-1 text-violet-100"},He={class:"text-[10px] text-violet-100/50"},Je={class:"mt-0.5 font-mono text-sm font-semibold"},Xe={class:"border-l border-white/6 px-2.5 py-1 text-sky-100"},Ye={class:"text-[10px] text-sky-100/50"},Ze={class:"mt-0.5 font-mono text-sm font-semibold"},et={class:"border-l border-white/6 px-2.5 py-1 text-amber-100"},tt={class:"text-[10px] text-amber-100/50"},at={class:"mt-0.5 font-mono text-sm font-semibold"},st={class:"flex min-h-0 flex-1 flex-col border-t border-white/7 pt-3"},ot={class:"mb-2 flex items-center justify-between"},lt={class:"text-[10px] font-semibold uppercase tracking-[0.16em] text-white/40"},it={class:"font-mono text-[10px] text-white/30"},nt={key:0,class:"min-h-0 flex-1 space-y-1 overflow-y-auto pr-1 scrollbar-thin"},rt=["onClick"],ct={class:"min-w-0 flex-1"},ut={class:"truncate text-xs font-semibold text-white/85 group-hover:text-white"},dt={class:"mt-0.5 truncate text-[10px] text-white/35"},ht={class:"shrink-0 font-mono text-xs font-semibold text-sky-200/80"},mt={key:1,class:"py-5 text-center text-xs text-white/35"},bt=te({__name:"GroupRelationshipGalaxyView",props:{sessionId:{},timeFilter:{}},setup(d){const c=d,{t:s,locale:G}=ae(),l=se(),i=f(null),h=f(null),u=f(null),N=f(!1),R=f(""),F=f(!1),j=f(!1),w=f(null);let g=0,C=null;const n=y(()=>u.value?h.value?.members.find(a=>a.key===u.value)??null:null),V=y(()=>me(h.value,u.value)),q=y(()=>(h.value?.graph.nodes.length??0)>0),_=y(()=>he({isLoading:N.value,hasGraph:q.value,hasError:!!R.value,webglUnavailable:F.value})),P=y(()=>n.value&&j.value?392:0),Q=y(()=>new Intl.NumberFormat(G.value,{maximumFractionDigits:1,notation:"compact"})),W=y(()=>new Intl.DateTimeFormat(G.value,{year:"numeric",month:"short",day:"numeric"}));async function E(){if(!c.sessionId)return;const a=++g;N.value=!0,R.value="",F.value=!1,u.value=null,w.value=null;try{const x=await l.getGroupRelationshipGalaxy(c.sessionId,c.timeFilter);if(a!==g)return;h.value=x}catch(x){if(a!==g)return;const b=x instanceof Error?x.message:String(x);R.value=b,h.value=null,ue(`Group relationship galaxy load failed: ${b}`,x instanceof Error?x.stack:void 0)}finally{a===g&&(N.value=!1)}}async function A(a){M(),u.value=a.key,await L(),i.value?.focusNode(a.key)}async function H(a){M(),u.value=a.key,await L(),i.value?.focusNode(a.key)}async function J(){if(!u.value)return;const a=w.value;w.value=null,u.value=null,await L(),(!a||i.value?.restoreView(a)!==!0)&&i.value?.fitView()}async function X(){w.value=null,u.value=null,await L(),i.value?.fitView()}function Y(){F.value=!0,u.value=null,w.value=null}function M(){u.value||w.value||(w.value=i.value?.captureView()??null)}function D(){j.value=C?.matches??!1}function O(a){return(a.displayName||a.platformId||"?").slice(0,1)}function k(a){return Q.value.format(a)}function Z(a){return`${Math.round(a*100)}`}function ee(a){return a?W.value.format(new Date(a*1e3)):"—"}return oe(()=>[c.sessionId,c.timeFilter?.startTs,c.timeFilter?.endTs,c.timeFilter?.memberId],()=>{E()},{immediate:!0}),le(()=>{typeof window>"u"||(C=window.matchMedia("(min-width: 768px)"),D(),C.addEventListener("change",D))}),ie(()=>{g++,C?.removeEventListener("change",D)}),(a,x)=>{const b=ne,S=re;return r(),p("div",pe,[_.value.content==="loading"?(r(),T(o(K),{key:0,variant:"page",text:o(s)("views.groupRelationshipGalaxy.loading")},null,8,["text"])):_.value.content==="error"?(r(),p("div",xe,[e("div",ve,[v(b,{name:"i-lucide-circle-alert",class:"mx-auto h-10 w-10 text-rose-300"}),e("h3",fe,t(o(s)("views.groupRelationshipGalaxy.loadFailed")),1),e("p",we,t(R.value),1),v(S,{class:"mt-4",color:"neutral",variant:"soft",icon:"i-lucide-refresh-cw",onClick:E},{default:B(()=>[U(t(o(s)("common.retry")),1)]),_:1})])])):_.value.content==="webgl-unavailable"?(r(),p("div",_e,[e("div",ye,[v(b,{name:"i-lucide-orbit",class:"mx-auto h-11 w-11 text-amber-200/80"}),e("h3",be,t(o(s)("views.groupRelationshipGalaxy.webglUnavailable")),1),e("p",ge,t(o(s)("views.groupRelationshipGalaxy.webglUnavailableDescription")),1)])])):_.value.content==="empty"?(r(),p("div",ke,[e("div",Ge,[v(b,{name:"i-lucide-sparkles",class:"mx-auto h-11 w-11 text-sky-200/70"}),e("h3",Re,t(o(s)("views.groupRelationshipGalaxy.emptyTitle")),1),e("p",Ce,t(o(s)("views.groupRelationshipGalaxy.emptyDescription")),1)])])):_.value.content==="canvas"&&h.value?(r(),p($,{key:4},[v(de,{ref_key:"canvasRef",ref:i,graph:h.value.graph,"selected-key":u.value,"safe-inset-right":P.value,label:o(s)("views.groupRelationshipGalaxy.canvasLabel"),onFallback:Y,onSelectNode:A},null,8,["graph","selected-key","safe-inset-right","label"]),_.value.showLoadingOverlay?(r(),T(o(K),{key:0,variant:"overlay",text:o(s)("views.groupRelationshipGalaxy.loading")},null,8,["text"])):I("",!0),_.value.showLoadingOverlay?I("",!0):(r(),T(S,{key:1,icon:"i-lucide-scan",color:"neutral",variant:"soft",size:"xs",class:"absolute left-4 top-4 z-20 rounded-xl border border-white/8 bg-[#070a12]/78 text-white/75 shadow-overlay backdrop-blur-xl hover:bg-white/10 hover:text-white","aria-label":o(s)("views.groupRelationshipGalaxy.resetView"),onClick:X},{default:B(()=>[U(t(o(s)("views.groupRelationshipGalaxy.resetView")),1)]),_:1},8,["aria-label"])),n.value?(r(),p("aside",Ie,[v(S,{icon:"i-lucide-x",color:"neutral",variant:"ghost",size:"xs",class:"absolute right-2.5 top-2.5 z-10 text-white/60 hover:bg-white/8 hover:text-white","aria-label":o(s)("views.groupRelationshipGalaxy.closeDetail"),onClick:J},null,8,["aria-label"]),e("div",Le,[e("header",Ne,[v(z,{src:n.value.avatar,alt:n.value.displayName,text:O(n.value),"root-class":"h-11 w-11 shrink-0 overflow-hidden rounded-xl border border-white/10","image-class":"h-11 w-11 rounded-xl object-cover","fallback-class":"flex h-11 w-11 items-center justify-center rounded-xl bg-sky-400/12 text-sm font-bold text-sky-200"},null,8,["src","alt","text"]),e("div",Fe,[e("div",Ve,[e("h3",De,t(n.value.displayName),1),e("span",Se," #"+t(n.value.rank),1)]),e("p",Te,t(n.value.platformId),1)])]),e("section",je,[e("div",Ee,[e("p",Me,t(o(s)("views.groupRelationshipGalaxy.messageCount")),1),e("p",Oe,t(k(n.value.messageCount)),1)]),e("div",Be,[e("p",Ue,t(o(s)("views.groupRelationshipGalaxy.relationshipScore")),1),e("p",$e,t(Z(n.value.relationshipScore)),1)]),e("div",ze,[e("p",Ke,t(o(s)("views.groupRelationshipGalaxy.lastInteraction")),1),e("p",qe,t(ee(n.value.lastInteractionTs)),1)])]),e("section",Pe,[e("h4",Qe,t(o(s)("views.groupRelationshipGalaxy.signalComposition")),1),e("div",We,[e("div",Ae,[e("p",He,t(o(s)("views.groupRelationshipGalaxy.replies")),1),e("p",Je,t(k(n.value.replyInteractionCount)),1)]),e("div",Xe,[e("p",Ye,t(o(s)("views.groupRelationshipGalaxy.mentions")),1),e("p",Ze,t(k(n.value.mentionInteractionCount)),1)]),e("div",et,[e("p",tt,t(o(s)("views.groupRelationshipGalaxy.proximity")),1),e("p",at,t(k(n.value.coOccurrenceCount)),1)])])]),e("section",st,[e("div",ot,[e("h4",lt,t(o(s)("views.groupRelationshipGalaxy.strongConnections")),1),e("span",it,t(V.value.length),1)]),V.value.length?(r(),p("div",nt,[(r(!0),p($,null,ce(V.value,m=>(r(),p("button",{key:m.edge.id,type:"button",class:"group flex w-full items-center gap-2.5 rounded-xl border border-transparent px-2 py-2 text-left transition-colors hover:border-white/6 hover:bg-white/5",onClick:pt=>H(m.member)},[v(z,{src:m.member.avatar,alt:m.member.displayName,text:O(m.member),"root-class":"h-7 w-7 shrink-0 overflow-hidden rounded-lg border border-white/8","image-class":"h-7 w-7 rounded-lg object-cover","fallback-class":"flex h-7 w-7 items-center justify-center rounded-lg bg-white/6 text-[10px] font-semibold text-white/65"},null,8,["src","alt","text"]),e("div",ct,[e("p",ut,t(m.member.displayName),1),e("p",dt,t(o(s)("views.groupRelationshipGalaxy.connectionSignals",{replies:m.edge.replyInteractionCount,mentions:m.edge.mentionInteractionCount,proximity:m.edge.coOccurrenceCount})),1)]),e("span",ht,t(k(m.edge.weight)),1)],8,rt))),128))])):(r(),p("p",mt,t(o(s)("views.groupRelationshipGalaxy.noConnections")),1))])])])):I("",!0)],64)):I("",!0)])}}});export{bt as default};
1
+ import{d as te,a6 as ae,L as se,K as oe,x as le,al as ie,o as r,c as p,f as T,g as o,a as e,z as v,a7 as ne,p as t,w as B,a9 as U,a8 as re,F as $,l as I,aN as z,j as ce,b as f,e as y,a5 as ue,C as L}from"./index-bQ9oj54q.js";import{_ as K}from"./LoadingState.vue_vue_type_script_setup_true_lang-uF54r-dT.js";import de from"./RelationshipGalaxyThreeCanvas-Dp4CcWU5.js";import"./vendor-snapdom--nZvo8Sg.js";import"./relationship-galaxy-connections-Cg4G5yYE.js";import"./relationship-galaxy-viewport-Cwfa51ER.js";function he(d){return d.hasError?{content:"error",showLoadingOverlay:!1}:d.webglUnavailable?{content:"webgl-unavailable",showLoadingOverlay:!1}:d.hasGraph?{content:"canvas",showLoadingOverlay:d.isLoading}:d.isLoading?{content:"loading",showLoadingOverlay:!1}:{content:"empty",showLoadingOverlay:!1}}function me(d,c,s=10){if(!d||!c)return[];const G=new Map(d.members.map(l=>[l.key,l]));return d.edges.flatMap(l=>{if(l.sourceKey!==c&&l.targetKey!==c)return[];const i=l.sourceKey===c?l.targetKey:l.sourceKey,h=G.get(i);return h?[{member:h,edge:l}]:[]}).sort((l,i)=>i.edge.weight-l.edge.weight||(i.edge.lastInteractionTs??0)-(l.edge.lastInteractionTs??0)||l.member.rank-i.member.rank||l.member.key.localeCompare(i.member.key)).slice(0,Math.max(0,s))}const pe={class:"dark relative h-full min-h-[420px] w-full overflow-hidden bg-[#03050c] text-white"},xe={key:1,class:"flex h-full items-center justify-center px-6 text-center"},ve={class:"max-w-sm"},fe={class:"mt-3 text-base font-semibold"},we={class:"mt-1 line-clamp-2 text-sm text-white/50"},_e={key:2,class:"flex h-full items-center justify-center px-6 text-center"},ye={class:"max-w-sm"},be={class:"mt-3 text-base font-semibold"},ge={class:"mt-1 text-sm leading-6 text-white/50"},ke={key:3,class:"flex h-full items-center justify-center px-6 text-center"},Ge={class:"max-w-sm"},Re={class:"mt-3 text-base font-semibold"},Ce={class:"mt-1 text-sm leading-6 text-white/50"},Ie={key:2,class:"absolute inset-x-3 bottom-3 z-20 flex max-h-[72vh] flex-col overflow-hidden rounded-2xl border border-white/8 bg-[#070a12]/84 text-white shadow-overlay backdrop-blur-2xl md:inset-x-auto md:bottom-4 md:right-4 md:top-4 md:max-h-none md:w-[360px]"},Le={class:"flex min-h-0 flex-1 flex-col gap-4 px-4 pb-4 pt-5"},Ne={class:"flex shrink-0 items-center gap-3 pr-8"},Fe={class:"min-w-0 flex-1"},Ve={class:"flex items-center gap-2"},De={class:"truncate text-base font-semibold"},Se={class:"rounded-full bg-white/8 px-2 py-0.5 font-mono text-[10px] text-white/55"},Te={class:"mt-0.5 truncate text-xs text-white/40"},je={class:"grid shrink-0 grid-cols-3 rounded-xl border border-white/8 bg-white/3 p-1"},Ee={class:"min-w-0 px-2 py-1.5"},Me={class:"text-[9px] uppercase tracking-wider text-white/35"},Oe={class:"mt-1 font-mono text-sm font-semibold"},Be={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},Ue={class:"text-[9px] uppercase tracking-wider text-white/35"},$e={class:"mt-1 font-mono text-sm font-semibold text-sky-200"},ze={class:"min-w-0 border-l border-white/6 px-2 py-1.5"},Ke={class:"text-[9px] uppercase tracking-wider text-white/35"},qe={class:"mt-1 truncate text-xs font-semibold"},Pe={class:"shrink-0 border-t border-white/7 pt-3"},Qe={class:"mb-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-white/40"},We={class:"grid grid-cols-3"},Ae={class:"px-2.5 py-1 text-violet-100"},He={class:"text-[10px] text-violet-100/50"},Je={class:"mt-0.5 font-mono text-sm font-semibold"},Xe={class:"border-l border-white/6 px-2.5 py-1 text-sky-100"},Ye={class:"text-[10px] text-sky-100/50"},Ze={class:"mt-0.5 font-mono text-sm font-semibold"},et={class:"border-l border-white/6 px-2.5 py-1 text-amber-100"},tt={class:"text-[10px] text-amber-100/50"},at={class:"mt-0.5 font-mono text-sm font-semibold"},st={class:"flex min-h-0 flex-1 flex-col border-t border-white/7 pt-3"},ot={class:"mb-2 flex items-center justify-between"},lt={class:"text-[10px] font-semibold uppercase tracking-[0.16em] text-white/40"},it={class:"font-mono text-[10px] text-white/30"},nt={key:0,class:"min-h-0 flex-1 space-y-1 overflow-y-auto pr-1 scrollbar-thin"},rt=["onClick"],ct={class:"min-w-0 flex-1"},ut={class:"truncate text-xs font-semibold text-white/85 group-hover:text-white"},dt={class:"mt-0.5 truncate text-[10px] text-white/35"},ht={class:"shrink-0 font-mono text-xs font-semibold text-sky-200/80"},mt={key:1,class:"py-5 text-center text-xs text-white/35"},bt=te({__name:"GroupRelationshipGalaxyView",props:{sessionId:{},timeFilter:{}},setup(d){const c=d,{t:s,locale:G}=ae(),l=se(),i=f(null),h=f(null),u=f(null),N=f(!1),R=f(""),F=f(!1),j=f(!1),w=f(null);let g=0,C=null;const n=y(()=>u.value?h.value?.members.find(a=>a.key===u.value)??null:null),V=y(()=>me(h.value,u.value)),q=y(()=>(h.value?.graph.nodes.length??0)>0),_=y(()=>he({isLoading:N.value,hasGraph:q.value,hasError:!!R.value,webglUnavailable:F.value})),P=y(()=>n.value&&j.value?392:0),Q=y(()=>new Intl.NumberFormat(G.value,{maximumFractionDigits:1,notation:"compact"})),W=y(()=>new Intl.DateTimeFormat(G.value,{year:"numeric",month:"short",day:"numeric"}));async function E(){if(!c.sessionId)return;const a=++g;N.value=!0,R.value="",F.value=!1,u.value=null,w.value=null;try{const x=await l.getGroupRelationshipGalaxy(c.sessionId,c.timeFilter);if(a!==g)return;h.value=x}catch(x){if(a!==g)return;const b=x instanceof Error?x.message:String(x);R.value=b,h.value=null,ue(`Group relationship galaxy load failed: ${b}`,x instanceof Error?x.stack:void 0)}finally{a===g&&(N.value=!1)}}async function A(a){M(),u.value=a.key,await L(),i.value?.focusNode(a.key)}async function H(a){M(),u.value=a.key,await L(),i.value?.focusNode(a.key)}async function J(){if(!u.value)return;const a=w.value;w.value=null,u.value=null,await L(),(!a||i.value?.restoreView(a)!==!0)&&i.value?.fitView()}async function X(){w.value=null,u.value=null,await L(),i.value?.fitView()}function Y(){F.value=!0,u.value=null,w.value=null}function M(){u.value||w.value||(w.value=i.value?.captureView()??null)}function D(){j.value=C?.matches??!1}function O(a){return(a.displayName||a.platformId||"?").slice(0,1)}function k(a){return Q.value.format(a)}function Z(a){return`${Math.round(a*100)}`}function ee(a){return a?W.value.format(new Date(a*1e3)):"—"}return oe(()=>[c.sessionId,c.timeFilter?.startTs,c.timeFilter?.endTs,c.timeFilter?.memberId],()=>{E()},{immediate:!0}),le(()=>{typeof window>"u"||(C=window.matchMedia("(min-width: 768px)"),D(),C.addEventListener("change",D))}),ie(()=>{g++,C?.removeEventListener("change",D)}),(a,x)=>{const b=ne,S=re;return r(),p("div",pe,[_.value.content==="loading"?(r(),T(o(K),{key:0,variant:"page",text:o(s)("views.groupRelationshipGalaxy.loading")},null,8,["text"])):_.value.content==="error"?(r(),p("div",xe,[e("div",ve,[v(b,{name:"i-lucide-circle-alert",class:"mx-auto h-10 w-10 text-rose-300"}),e("h3",fe,t(o(s)("views.groupRelationshipGalaxy.loadFailed")),1),e("p",we,t(R.value),1),v(S,{class:"mt-4",color:"neutral",variant:"soft",icon:"i-lucide-refresh-cw",onClick:E},{default:B(()=>[U(t(o(s)("common.retry")),1)]),_:1})])])):_.value.content==="webgl-unavailable"?(r(),p("div",_e,[e("div",ye,[v(b,{name:"i-lucide-orbit",class:"mx-auto h-11 w-11 text-amber-200/80"}),e("h3",be,t(o(s)("views.groupRelationshipGalaxy.webglUnavailable")),1),e("p",ge,t(o(s)("views.groupRelationshipGalaxy.webglUnavailableDescription")),1)])])):_.value.content==="empty"?(r(),p("div",ke,[e("div",Ge,[v(b,{name:"i-lucide-sparkles",class:"mx-auto h-11 w-11 text-sky-200/70"}),e("h3",Re,t(o(s)("views.groupRelationshipGalaxy.emptyTitle")),1),e("p",Ce,t(o(s)("views.groupRelationshipGalaxy.emptyDescription")),1)])])):_.value.content==="canvas"&&h.value?(r(),p($,{key:4},[v(de,{ref_key:"canvasRef",ref:i,graph:h.value.graph,"selected-key":u.value,"safe-inset-right":P.value,label:o(s)("views.groupRelationshipGalaxy.canvasLabel"),onFallback:Y,onSelectNode:A},null,8,["graph","selected-key","safe-inset-right","label"]),_.value.showLoadingOverlay?(r(),T(o(K),{key:0,variant:"overlay",text:o(s)("views.groupRelationshipGalaxy.loading")},null,8,["text"])):I("",!0),_.value.showLoadingOverlay?I("",!0):(r(),T(S,{key:1,icon:"i-lucide-scan",color:"neutral",variant:"soft",size:"xs",class:"absolute left-4 top-4 z-20 rounded-xl border border-white/8 bg-[#070a12]/78 text-white/75 shadow-overlay backdrop-blur-xl hover:bg-white/10 hover:text-white","aria-label":o(s)("views.groupRelationshipGalaxy.resetView"),onClick:X},{default:B(()=>[U(t(o(s)("views.groupRelationshipGalaxy.resetView")),1)]),_:1},8,["aria-label"])),n.value?(r(),p("aside",Ie,[v(S,{icon:"i-lucide-x",color:"neutral",variant:"ghost",size:"xs",class:"absolute right-2.5 top-2.5 z-10 text-white/60 hover:bg-white/8 hover:text-white","aria-label":o(s)("views.groupRelationshipGalaxy.closeDetail"),onClick:J},null,8,["aria-label"]),e("div",Le,[e("header",Ne,[v(z,{src:n.value.avatar,alt:n.value.displayName,text:O(n.value),"root-class":"h-11 w-11 shrink-0 overflow-hidden rounded-xl border border-white/10","image-class":"h-11 w-11 rounded-xl object-cover","fallback-class":"flex h-11 w-11 items-center justify-center rounded-xl bg-sky-400/12 text-sm font-bold text-sky-200"},null,8,["src","alt","text"]),e("div",Fe,[e("div",Ve,[e("h3",De,t(n.value.displayName),1),e("span",Se," #"+t(n.value.rank),1)]),e("p",Te,t(n.value.platformId),1)])]),e("section",je,[e("div",Ee,[e("p",Me,t(o(s)("views.groupRelationshipGalaxy.messageCount")),1),e("p",Oe,t(k(n.value.messageCount)),1)]),e("div",Be,[e("p",Ue,t(o(s)("views.groupRelationshipGalaxy.relationshipScore")),1),e("p",$e,t(Z(n.value.relationshipScore)),1)]),e("div",ze,[e("p",Ke,t(o(s)("views.groupRelationshipGalaxy.lastInteraction")),1),e("p",qe,t(ee(n.value.lastInteractionTs)),1)])]),e("section",Pe,[e("h4",Qe,t(o(s)("views.groupRelationshipGalaxy.signalComposition")),1),e("div",We,[e("div",Ae,[e("p",He,t(o(s)("views.groupRelationshipGalaxy.replies")),1),e("p",Je,t(k(n.value.replyInteractionCount)),1)]),e("div",Xe,[e("p",Ye,t(o(s)("views.groupRelationshipGalaxy.mentions")),1),e("p",Ze,t(k(n.value.mentionInteractionCount)),1)]),e("div",et,[e("p",tt,t(o(s)("views.groupRelationshipGalaxy.proximity")),1),e("p",at,t(k(n.value.coOccurrenceCount)),1)])])]),e("section",st,[e("div",ot,[e("h4",lt,t(o(s)("views.groupRelationshipGalaxy.strongConnections")),1),e("span",it,t(V.value.length),1)]),V.value.length?(r(),p("div",nt,[(r(!0),p($,null,ce(V.value,m=>(r(),p("button",{key:m.edge.id,type:"button",class:"group flex w-full items-center gap-2.5 rounded-xl border border-transparent px-2 py-2 text-left transition-colors hover:border-white/6 hover:bg-white/5",onClick:pt=>H(m.member)},[v(z,{src:m.member.avatar,alt:m.member.displayName,text:O(m.member),"root-class":"h-7 w-7 shrink-0 overflow-hidden rounded-lg border border-white/8","image-class":"h-7 w-7 rounded-lg object-cover","fallback-class":"flex h-7 w-7 items-center justify-center rounded-lg bg-white/6 text-[10px] font-semibold text-white/65"},null,8,["src","alt","text"]),e("div",ct,[e("p",ut,t(m.member.displayName),1),e("p",dt,t(o(s)("views.groupRelationshipGalaxy.connectionSignals",{replies:m.edge.replyInteractionCount,mentions:m.edge.mentionInteractionCount,proximity:m.edge.coOccurrenceCount})),1)]),e("span",ht,t(k(m.edge.weight)),1)],8,rt))),128))])):(r(),p("p",mt,t(o(s)("views.groupRelationshipGalaxy.noConnections")),1))])])])):I("",!0)],64)):I("",!0)])}}});export{bt as default};
@@ -1 +1 @@
1
- import{d as l,u as o,o as u,f as p,w as d,r as f,m as n,g as i,P as _}from"./index-B1oj9KDv.js";var m=l({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(r){const t=r;return o(),(s,a)=>(u(),p(i(_),n(t,{onMousedown:a[0]||(a[0]=e=>{!e.defaultPrevented&&e.detail>1&&e.preventDefault()})}),{default:d(()=>[f(s.$slots,"default")]),_:3},16))}}),b=m;export{b as L};
1
+ import{d as l,u as o,o as u,f as p,w as d,r as f,m as n,g as i,P as _}from"./index-bQ9oj54q.js";var m=l({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(r){const t=r;return o(),(s,a)=>(u(),p(i(_),n(t,{onMousedown:a[0]||(a[0]=e=>{!e.defaultPrevented&&e.detail>1&&e.preventDefault()})}),{default:d(()=>[f(s.$slots,"default")]),_:3},16))}}),b=m;export{b as L};
@@ -1 +1 @@
1
- import{K as f,al as p,E as _,ah as m,o as n,c,a as o,d as h,n as y,f as l,_ as x,p as v,l as d,e as r,b as w}from"./index-B1oj9KDv.js";const k=Symbol("insight-view-loading-coordinator");function b(t){let e=null;function a(){e?.(),e=null}return{sync(s){if(s){!e&&t&&(e=t.register());return}a()},dispose:a}}function L(t){const e=_(k,null),a=b(e);return f(t,s=>a.sync(s),{immediate:!0,flush:"sync"}),p(a.dispose),e}const B={},C={class:"loading-dots",viewBox:"0 0 35 14",width:"35",height:"14","aria-hidden":"true",focusable:"false"};function $(t,e){return n(),c("svg",C,[...e[0]||(e[0]=[o("circle",{class:"loading-dots__dot fill-primary-500",cx:"6",cy:"8",r:"2.5"},null,-1),o("circle",{class:"loading-dots__dot fill-primary-500",cx:"17.5",cy:"8",r:"2.5"},null,-1),o("circle",{class:"loading-dots__dot fill-primary-500",cx:"29",cy:"8",r:"2.5"},null,-1)])])}const V=m(B,[["render",$],["__scopeId","data-v-f220c7d0"]]),I={class:"flex flex-col items-center justify-center text-center"},j={key:2,class:"mt-2 text-sm text-gray-500"},D=h({__name:"LoadingState",props:{text:{},height:{},variant:{default:"inline"}},setup(t){const e=t,a=r(()=>{const i="flex items-center justify-center";switch(e.variant){case"page":return`${i} h-full w-full`;case"overlay":return`${i} absolute inset-0 z-10 cursor-wait bg-page-bg dark:bg-page-dark`;default:return`${i} ${e.height||"py-8"}`}}),s=L(w(!0)),u=r(()=>s!==null&&(s.suppress?.value??!0)),g=r(()=>e.variant==="page"||e.variant==="overlay");return(i,z)=>u.value?d("",!0):(n(),c("div",{key:0,class:y(a.value),role:"status","aria-live":"polite"},[o("div",I,[g.value?(n(),l(V,{key:0})):(n(),l(x,{key:1,name:"i-heroicons-arrow-path",size:"xl",class:"animate-spin text-pink-500"})),t.text?(n(),c("p",j,v(t.text),1)):d("",!0)])],2))}});export{V as L,D as _,k as i,L as u};
1
+ import{K as f,al as p,E as _,ah as m,o as n,c,a as o,d as h,n as y,f as l,_ as x,p as v,l as d,e as r,b as w}from"./index-bQ9oj54q.js";const k=Symbol("insight-view-loading-coordinator");function b(t){let e=null;function a(){e?.(),e=null}return{sync(s){if(s){!e&&t&&(e=t.register());return}a()},dispose:a}}function L(t){const e=_(k,null),a=b(e);return f(t,s=>a.sync(s),{immediate:!0,flush:"sync"}),p(a.dispose),e}const B={},C={class:"loading-dots",viewBox:"0 0 35 14",width:"35",height:"14","aria-hidden":"true",focusable:"false"};function $(t,e){return n(),c("svg",C,[...e[0]||(e[0]=[o("circle",{class:"loading-dots__dot fill-primary-500",cx:"6",cy:"8",r:"2.5"},null,-1),o("circle",{class:"loading-dots__dot fill-primary-500",cx:"17.5",cy:"8",r:"2.5"},null,-1),o("circle",{class:"loading-dots__dot fill-primary-500",cx:"29",cy:"8",r:"2.5"},null,-1)])])}const V=m(B,[["render",$],["__scopeId","data-v-f220c7d0"]]),I={class:"flex flex-col items-center justify-center text-center"},j={key:2,class:"mt-2 text-sm text-gray-500"},D=h({__name:"LoadingState",props:{text:{},height:{},variant:{default:"inline"}},setup(t){const e=t,a=r(()=>{const i="flex items-center justify-center";switch(e.variant){case"page":return`${i} h-full w-full`;case"overlay":return`${i} absolute inset-0 z-10 cursor-wait bg-page-bg dark:bg-page-dark`;default:return`${i} ${e.height||"py-8"}`}}),s=L(w(!0)),u=r(()=>s!==null&&(s.suppress?.value??!0)),g=r(()=>e.variant==="page"||e.variant==="overlay");return(i,z)=>u.value?d("",!0):(n(),c("div",{key:0,class:y(a.value),role:"status","aria-live":"polite"},[o("div",I,[g.value?(n(),l(V,{key:0})):(n(),l(x,{key:1,name:"i-heroicons-arrow-path",size:"xl",class:"animate-spin text-pink-500"})),t.text?(n(),c("p",j,v(t.text),1)):d("",!0)])],2))}});export{V as L,D as _,k as i,L as u};
@@ -1 +1 @@
1
- import{d as z,a6 as j,a0 as I,K as F,o as T,c as M,a,p,g as k,z as v,aK as $,aL as D,l as L,e as C,b as f,ap as O,f as K,w as E,a8 as A,O as Y,a9 as P,aM as G,aF as U,aa as H}from"./index-B1oj9KDv.js";import{u as J}from"./useToast-B5LaA6c-.js";import{T as B}from"./Tabs-DqWTBV8x.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Tabs-BMq9wODW.js";import"./RovingFocusItem-BJMUQ5DJ.js";const W={class:"space-y-4 p-4"},X={class:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300"},q={key:0,class:"mt-2 flex items-center gap-2"},Q={class:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300"},Z=z({__name:"ConditionPanel",props:{timeRange:{default:null},timeRangeModifiers:{},exportFormat:{default:"txt"},exportFormatModifiers:{}},emits:["update:timeRange","update:exportFormat"],setup(w){const{t:x}=j(),d=I(w,"timeRange"),h=I(w,"exportFormat"),i=C(()=>[{label:"TXT",value:"txt"},{label:"ChatLab JSON",value:"json"},{label:"Markdown",value:"markdown"}]),u=f("all"),c=f(""),l=f(""),y=[{id:"all",label:"analysis.filter.allTime"},{id:"today",label:"analysis.filter.today"},{id:"week",label:"analysis.filter.lastWeek"},{id:"month",label:"analysis.filter.lastMonth"},{id:"3months",label:"analysis.filter.last3Months"},{id:"year",label:"analysis.filter.lastYear"},{id:"custom",label:"analysis.filter.customTime"}],g=C(()=>y.map(e=>({label:x(e.label),value:e.id})));F(u,()=>{m()});function m(){const e=Math.floor(Date.now()/1e3),t=new Date;t.setHours(0,0,0,0);const n=Math.floor(t.getTime()/1e3);switch(u.value){case"all":d.value=null;break;case"today":d.value={start:n,end:e};break;case"week":d.value={start:e-10080*60,end:e};break;case"month":d.value={start:e-720*60*60,end:e};break;case"3months":d.value={start:e-2160*60*60,end:e};break;case"year":d.value={start:e-365*24*60*60,end:e};break;case"custom":if(c.value&&l.value){const _=new Date(c.value).getTime()/1e3,S=new Date(l.value).getTime()/1e3+86399;d.value={start:_,end:S}}break}}return(e,t)=>(T(),M("div",W,[a("div",null,[a("label",X,p(k(x)("analysis.filter.timeRange")),1),v(B,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=n=>u.value=n),items:g.value,size:"sm"},null,8,["modelValue","items"]),u.value==="custom"?(T(),M("div",q,[$(a("input",{"onUpdate:modelValue":t[1]||(t[1]=n=>c.value=n),type:"date",class:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm dark:border-gray-600 dark:bg-gray-800",onChange:m},null,544),[[D,c.value]]),t[4]||(t[4]=a("span",{class:"text-gray-500"},"~",-1)),$(a("input",{"onUpdate:modelValue":t[2]||(t[2]=n=>l.value=n),type:"date",class:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm dark:border-gray-600 dark:bg-gray-800",onChange:m},null,544),[[D,l.value]])])):L("",!0)]),a("div",null,[a("label",Q,p(k(x)("analysis.messageExport.format")),1),v(B,{modelValue:h.value,"onUpdate:modelValue":t[3]||(t[3]=n=>h.value=n),items:i.value,size:"sm"},null,8,["modelValue","items"])])]))}}),ee={class:"flex flex-col overflow-hidden bg-white dark:bg-page-dark"},te={class:"flex items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},ae={class:"text-lg font-semibold text-gray-900 dark:text-white"},se={class:"flex flex-col gap-3 border-t border-gray-200 px-5 py-4 dark:border-gray-700"},oe={key:0,class:"w-full"},le={class:"mb-1 flex items-center justify-between text-sm text-gray-600 dark:text-gray-400"},ne={class:"h-2 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700"},re={class:"flex items-center justify-end gap-3"},N="chatlab-export-format",fe=z({__name:"MessageExportModal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(w,{emit:x}){const d=w,h=x,{t:i}=j(),u=J(),c=O(),l=C({get:()=>d.modelValue,set:s=>h("update:modelValue",s)}),y=f(null),g=f(localStorage.getItem(N)||"txt");F(g,s=>localStorage.setItem(N,s));const m=f(!1),e=f(null);let t=null;function n(){t=U().onExportProgress(s=>{e.value={percentage:s.percentage,message:s.message},(s.stage==="done"||s.stage==="error")&&(e.value=null)})}function _(){t&&(t(),t=null),e.value=null}async function S(){const s=c.currentSessionId;if(!s)return;const b=c.currentSession?.name||"unknown";let V="";m.value=!0,e.value={percentage:0,message:i("analysis.filter.exportPreparing")},n();try{const o=G(y.value),R=await U().exportFilterResultToFile({sessionId:s,sessionName:b,outputDir:V,format:g.value,timeFilter:o?{startTs:o.start,endTs:o.end}:void 0});R.success?(u.success(i("analysis.filter.exportSuccess"),{description:R.filePath}),l.value=!1):u.fail(i("analysis.filter.exportFailed"),{description:R.error||i("common.error.unknown")})}catch(o){console.error("Export failed:",o),u.fail(i("analysis.filter.exportFailed"),{description:String(o)})}finally{_(),m.value=!1}}return F(l,s=>{s||_()}),(s,r)=>{const b=A,V=H;return T(),K(V,{open:l.value,"onUpdate:open":r[4]||(r[4]=o=>l.value=o),ui:{content:"sm:max-w-md"}},{content:E(()=>[a("div",ee,[a("div",te,[a("h2",ae,p(k(i)("analysis.messageExport.title")),1),v(b,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:r[0]||(r[0]=o=>l.value=!1)})]),v(Z,{"time-range":y.value,"onUpdate:timeRange":r[1]||(r[1]=o=>y.value=o),"export-format":g.value,"onUpdate:exportFormat":r[2]||(r[2]=o=>g.value=o)},null,8,["time-range","export-format"]),a("div",se,[m.value&&e.value?(T(),M("div",oe,[a("div",le,[a("span",null,p(e.value.message),1),a("span",null,p(e.value.percentage)+"%",1)]),a("div",ne,[a("div",{class:"h-full bg-primary-500 transition-all duration-300",style:Y({width:`${e.value.percentage}%`})},null,4)])])):L("",!0),a("div",re,[v(b,{variant:"ghost",onClick:r[3]||(r[3]=o=>l.value=!1)},{default:E(()=>[P(p(k(i)("common.cancel")),1)]),_:1}),v(b,{color:"primary",icon:"i-heroicons-document-arrow-down",loading:m.value,disabled:m.value,onClick:S},{default:E(()=>[P(p(k(i)("common.export")),1)]),_:1},8,["loading","disabled"])])])])]),_:1},8,["open"])}}});export{fe as default};
1
+ import{d as z,a6 as j,a0 as I,K as F,o as T,c as M,a,p,g as k,z as v,aK as $,aL as D,l as L,e as C,b as f,ap as O,f as K,w as E,a8 as A,O as Y,a9 as P,aM as G,aF as U,aa as H}from"./index-bQ9oj54q.js";import{u as J}from"./useToast-DPkgv34s.js";import{T as B}from"./Tabs-BXjD45rO.js";import"./vendor-snapdom--nZvo8Sg.js";import"./Tabs-DJ5p8gb6.js";import"./RovingFocusItem-FpYwYEP_.js";const W={class:"space-y-4 p-4"},X={class:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300"},q={key:0,class:"mt-2 flex items-center gap-2"},Q={class:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300"},Z=z({__name:"ConditionPanel",props:{timeRange:{default:null},timeRangeModifiers:{},exportFormat:{default:"txt"},exportFormatModifiers:{}},emits:["update:timeRange","update:exportFormat"],setup(w){const{t:x}=j(),d=I(w,"timeRange"),h=I(w,"exportFormat"),i=C(()=>[{label:"TXT",value:"txt"},{label:"ChatLab JSON",value:"json"},{label:"Markdown",value:"markdown"}]),u=f("all"),c=f(""),l=f(""),y=[{id:"all",label:"analysis.filter.allTime"},{id:"today",label:"analysis.filter.today"},{id:"week",label:"analysis.filter.lastWeek"},{id:"month",label:"analysis.filter.lastMonth"},{id:"3months",label:"analysis.filter.last3Months"},{id:"year",label:"analysis.filter.lastYear"},{id:"custom",label:"analysis.filter.customTime"}],g=C(()=>y.map(e=>({label:x(e.label),value:e.id})));F(u,()=>{m()});function m(){const e=Math.floor(Date.now()/1e3),t=new Date;t.setHours(0,0,0,0);const n=Math.floor(t.getTime()/1e3);switch(u.value){case"all":d.value=null;break;case"today":d.value={start:n,end:e};break;case"week":d.value={start:e-10080*60,end:e};break;case"month":d.value={start:e-720*60*60,end:e};break;case"3months":d.value={start:e-2160*60*60,end:e};break;case"year":d.value={start:e-365*24*60*60,end:e};break;case"custom":if(c.value&&l.value){const _=new Date(c.value).getTime()/1e3,S=new Date(l.value).getTime()/1e3+86399;d.value={start:_,end:S}}break}}return(e,t)=>(T(),M("div",W,[a("div",null,[a("label",X,p(k(x)("analysis.filter.timeRange")),1),v(B,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=n=>u.value=n),items:g.value,size:"sm"},null,8,["modelValue","items"]),u.value==="custom"?(T(),M("div",q,[$(a("input",{"onUpdate:modelValue":t[1]||(t[1]=n=>c.value=n),type:"date",class:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm dark:border-gray-600 dark:bg-gray-800",onChange:m},null,544),[[D,c.value]]),t[4]||(t[4]=a("span",{class:"text-gray-500"},"~",-1)),$(a("input",{"onUpdate:modelValue":t[2]||(t[2]=n=>l.value=n),type:"date",class:"flex-1 rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm dark:border-gray-600 dark:bg-gray-800",onChange:m},null,544),[[D,l.value]])])):L("",!0)]),a("div",null,[a("label",Q,p(k(x)("analysis.messageExport.format")),1),v(B,{modelValue:h.value,"onUpdate:modelValue":t[3]||(t[3]=n=>h.value=n),items:i.value,size:"sm"},null,8,["modelValue","items"])])]))}}),ee={class:"flex flex-col overflow-hidden bg-white dark:bg-page-dark"},te={class:"flex items-center justify-between border-b border-gray-200 px-5 py-3 dark:border-gray-700"},ae={class:"text-lg font-semibold text-gray-900 dark:text-white"},se={class:"flex flex-col gap-3 border-t border-gray-200 px-5 py-4 dark:border-gray-700"},oe={key:0,class:"w-full"},le={class:"mb-1 flex items-center justify-between text-sm text-gray-600 dark:text-gray-400"},ne={class:"h-2 w-full overflow-hidden rounded-full bg-gray-200 dark:bg-gray-700"},re={class:"flex items-center justify-end gap-3"},N="chatlab-export-format",fe=z({__name:"MessageExportModal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(w,{emit:x}){const d=w,h=x,{t:i}=j(),u=J(),c=O(),l=C({get:()=>d.modelValue,set:s=>h("update:modelValue",s)}),y=f(null),g=f(localStorage.getItem(N)||"txt");F(g,s=>localStorage.setItem(N,s));const m=f(!1),e=f(null);let t=null;function n(){t=U().onExportProgress(s=>{e.value={percentage:s.percentage,message:s.message},(s.stage==="done"||s.stage==="error")&&(e.value=null)})}function _(){t&&(t(),t=null),e.value=null}async function S(){const s=c.currentSessionId;if(!s)return;const b=c.currentSession?.name||"unknown";let V="";m.value=!0,e.value={percentage:0,message:i("analysis.filter.exportPreparing")},n();try{const o=G(y.value),R=await U().exportFilterResultToFile({sessionId:s,sessionName:b,outputDir:V,format:g.value,timeFilter:o?{startTs:o.start,endTs:o.end}:void 0});R.success?(u.success(i("analysis.filter.exportSuccess"),{description:R.filePath}),l.value=!1):u.fail(i("analysis.filter.exportFailed"),{description:R.error||i("common.error.unknown")})}catch(o){console.error("Export failed:",o),u.fail(i("analysis.filter.exportFailed"),{description:String(o)})}finally{_(),m.value=!1}}return F(l,s=>{s||_()}),(s,r)=>{const b=A,V=H;return T(),K(V,{open:l.value,"onUpdate:open":r[4]||(r[4]=o=>l.value=o),ui:{content:"sm:max-w-md"}},{content:E(()=>[a("div",ee,[a("div",te,[a("h2",ae,p(k(i)("analysis.messageExport.title")),1),v(b,{variant:"ghost",icon:"i-heroicons-x-mark",size:"sm",onClick:r[0]||(r[0]=o=>l.value=!1)})]),v(Z,{"time-range":y.value,"onUpdate:timeRange":r[1]||(r[1]=o=>y.value=o),"export-format":g.value,"onUpdate:exportFormat":r[2]||(r[2]=o=>g.value=o)},null,8,["time-range","export-format"]),a("div",se,[m.value&&e.value?(T(),M("div",oe,[a("div",le,[a("span",null,p(e.value.message),1),a("span",null,p(e.value.percentage)+"%",1)]),a("div",ne,[a("div",{class:"h-full bg-primary-500 transition-all duration-300",style:Y({width:`${e.value.percentage}%`})},null,4)])])):L("",!0),a("div",re,[v(b,{variant:"ghost",onClick:r[3]||(r[3]=o=>l.value=!1)},{default:E(()=>[P(p(k(i)("common.cancel")),1)]),_:1}),v(b,{color:"primary",icon:"i-heroicons-document-arrow-down",loading:m.value,disabled:m.value,onClick:S},{default:E(()=>[P(p(k(i)("common.export")),1)]),_:1},8,["loading","disabled"])])])])]),_:1},8,["open"])}}});export{fe as default};
@@ -1 +1 @@
1
- import{d as p,o,c as i,n as a,g as u,aC as x,l as c,a as s,z as f,a7 as g,p as l,r as d,ah as v}from"./index-B1oj9KDv.js";const h={key:0,class:"titlebar-drag-cover"},y={class:"flex items-center justify-between"},b=["src","alt"],w={class:"group/title flex items-baseline gap-2"},z={class:"header-actions relative z-[40] flex items-center gap-2"},k=p({__name:"PageHeader",props:{title:{},description:{},icon:{},iconClass:{},avatar:{},size:{default:"default"},bordered:{type:Boolean,default:!0}},setup(e){const t=e;return(r,n)=>{const m=g;return o(),i("div",{class:a(["relative px-6",[t.bordered?"border-b border-gray-200/50 dark:border-gray-800/50":"",t.size==="compact"?"pb-1.5":"pb-2"]])},[u(x)?(o(),i("div",h)):c("",!0),s("div",y,[s("div",{class:a(["flex items-center",t.size==="compact"?"gap-2.5":"gap-3"])},[e.avatar?(o(),i("img",{key:0,src:e.avatar,alt:e.title,class:a(["object-cover",t.size==="compact"?"h-6 w-6 rounded-md":"h-10 w-10 rounded-xl"])},null,10,b)):e.icon?(o(),i("div",{key:1,class:a(["flex items-center justify-center",[e.iconClass,t.size==="compact"?"h-6 w-6 rounded-md":"h-10 w-10 rounded-xl"]])},[f(m,{name:e.icon,class:a(["text-white",t.size==="compact"?"h-3 w-3":"h-5 w-5"])},null,8,["name","class"])],2)):c("",!0),s("div",w,[s("h1",{class:a(["font-semibold text-gray-900 dark:text-white",t.size==="compact"?"text-base":"text-lg"])},l(e.title),3),e.description?(o(),i("p",{key:0,class:a(["pointer-events-none whitespace-nowrap text-gray-500 opacity-0 transition-opacity duration-200 group-hover/title:opacity-100 dark:text-gray-400",t.size==="compact"?"text-[11px]":"text-xs"])},l(e.description),3)):c("",!0)])],2),n[0]||(n[0]=s("div",{class:"flex-1 self-stretch mx-4",style:{"-webkit-app-region":"drag"}},null,-1)),s("div",z,[d(r.$slots,"actions",{},void 0,!0)])]),d(r.$slots,"default",{},void 0,!0)],2)}}}),B=v(k,[["__scopeId","data-v-6c9238f0"]]);export{B as P};
1
+ import{d as p,o,c as i,n as a,g as u,aC as x,l as c,a as s,z as f,a7 as g,p as l,r as d,ah as v}from"./index-bQ9oj54q.js";const h={key:0,class:"titlebar-drag-cover"},y={class:"flex items-center justify-between"},b=["src","alt"],w={class:"group/title flex items-baseline gap-2"},z={class:"header-actions relative z-[40] flex items-center gap-2"},k=p({__name:"PageHeader",props:{title:{},description:{},icon:{},iconClass:{},avatar:{},size:{default:"default"},bordered:{type:Boolean,default:!0}},setup(e){const t=e;return(r,n)=>{const m=g;return o(),i("div",{class:a(["relative px-6",[t.bordered?"border-b border-gray-200/50 dark:border-gray-800/50":"",t.size==="compact"?"pb-1.5":"pb-2"]])},[u(x)?(o(),i("div",h)):c("",!0),s("div",y,[s("div",{class:a(["flex items-center",t.size==="compact"?"gap-2.5":"gap-3"])},[e.avatar?(o(),i("img",{key:0,src:e.avatar,alt:e.title,class:a(["object-cover",t.size==="compact"?"h-6 w-6 rounded-md":"h-10 w-10 rounded-xl"])},null,10,b)):e.icon?(o(),i("div",{key:1,class:a(["flex items-center justify-center",[e.iconClass,t.size==="compact"?"h-6 w-6 rounded-md":"h-10 w-10 rounded-xl"]])},[f(m,{name:e.icon,class:a(["text-white",t.size==="compact"?"h-3 w-3":"h-5 w-5"])},null,8,["name","class"])],2)):c("",!0),s("div",w,[s("h1",{class:a(["font-semibold text-gray-900 dark:text-white",t.size==="compact"?"text-base":"text-lg"])},l(e.title),3),e.description?(o(),i("p",{key:0,class:a(["pointer-events-none whitespace-nowrap text-gray-500 opacity-0 transition-opacity duration-200 group-hover/title:opacity-100 dark:text-gray-400",t.size==="compact"?"text-[11px]":"text-xs"])},l(e.description),3)):c("",!0)])],2),n[0]||(n[0]=s("div",{class:"flex-1 self-stretch mx-4",style:{"-webkit-app-region":"drag"}},null,-1)),s("div",z,[d(r.$slots,"actions",{},void 0,!0)])]),d(r.$slots,"default",{},void 0,!0)],2)}}}),B=v(k,[["__scopeId","data-v-6c9238f0"]]);export{B as P};
@@ -1 +1 @@
1
- import{d as p,o as s,c as r,a as o,F as f,j as g,f as n,k as x,g as i,R as h,n as y,w as k,_ as b,l as d,p as w,r as v}from"./index-B1oj9KDv.js";const _={class:"flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-3"},V=["aria-label"],C={class:"flex w-max items-center gap-0.5"},B={key:0,class:"ml-auto flex max-w-full shrink-0 flex-wrap items-center justify-end"},z=p({__name:"PageTabs",props:{modelValue:{},items:{},ariaLabel:{default:void 0}},emits:["update:modelValue","change"],setup(t,{emit:c}){const u=t,l=c;function m(a){a.to||a.id===u.modelValue||(l("update:modelValue",a.id),l("change",a.id))}return(a,L)=>(s(),r("div",_,[o("nav",{class:"max-w-full shrink-0 overflow-x-auto scrollbar-hide","aria-label":t.ariaLabel},[o("div",C,[(s(!0),r(f,null,g(t.items,e=>(s(),n(x(e.to?i(h):"button"),{key:e.id,to:e.to,type:e.to?void 0:"button",class:y(["flex shrink-0 items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs font-semibold whitespace-nowrap transition-colors",t.modelValue===e.id?"bg-primary-500 text-white dark:bg-primary-900/30 dark:text-primary-400":"text-gray-600 hover:bg-primary-50 dark:text-gray-400 dark:hover:bg-primary-900/20"]),"aria-pressed":e.to?void 0:t.modelValue===e.id,onClick:$=>m(e)},{default:k(()=>[e.icon?(s(),n(i(b),{key:0,name:e.icon,size:"sm"},null,8,["name"])):d("",!0),o("span",null,w(e.label),1)]),_:2},1032,["to","type","class","aria-pressed","onClick"]))),128))])],8,V),a.$slots.right?(s(),r("div",B,[v(a.$slots,"right")])):d("",!0)]))}});export{z as _};
1
+ import{d as p,o as s,c as r,a as o,F as f,j as g,f as n,k as x,g as i,R as h,n as y,w as k,_ as b,l as d,p as w,r as v}from"./index-bQ9oj54q.js";const _={class:"flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-3"},V=["aria-label"],C={class:"flex w-max items-center gap-0.5"},B={key:0,class:"ml-auto flex max-w-full shrink-0 flex-wrap items-center justify-end"},z=p({__name:"PageTabs",props:{modelValue:{},items:{},ariaLabel:{default:void 0}},emits:["update:modelValue","change"],setup(t,{emit:c}){const u=t,l=c;function m(a){a.to||a.id===u.modelValue||(l("update:modelValue",a.id),l("change",a.id))}return(a,L)=>(s(),r("div",_,[o("nav",{class:"max-w-full shrink-0 overflow-x-auto scrollbar-hide","aria-label":t.ariaLabel},[o("div",C,[(s(!0),r(f,null,g(t.items,e=>(s(),n(x(e.to?i(h):"button"),{key:e.id,to:e.to,type:e.to?void 0:"button",class:y(["flex shrink-0 items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs font-semibold whitespace-nowrap transition-colors",t.modelValue===e.id?"bg-primary-500 text-white dark:bg-primary-900/30 dark:text-primary-400":"text-gray-600 hover:bg-primary-50 dark:text-gray-400 dark:hover:bg-primary-900/20"]),"aria-pressed":e.to?void 0:t.modelValue===e.id,onClick:$=>m(e)},{default:k(()=>[e.icon?(s(),n(i(b),{key:0,name:e.icon,size:"sm"},null,8,["name"])):d("",!0),o("span",null,w(e.label),1)]),_:2},1032,["to","type","class","aria-pressed","onClick"]))),128))])],8,V),a.$slots.right?(s(),r("div",B,[v(a.$slots,"right")])):d("",!0)]))}});export{z as _};