@researai/deepscientist 1.5.17 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +309 -130
- package/AISB/catalog/aisb.b1.agentic_coding.yaml +244 -0
- package/AISB/catalog/aisb.b10.climate_earth.yaml +235 -0
- package/AISB/catalog/aisb.b11.model_efficiency.yaml +231 -0
- package/AISB/catalog/aisb.b12.embodied_ai.yaml +238 -0
- package/AISB/catalog/aisb.b2.agent_systems.yaml +229 -0
- package/AISB/catalog/aisb.b3.self_evolving_rl.yaml +237 -0
- package/AISB/catalog/aisb.b4.lm_reasoning.yaml +240 -0
- package/AISB/catalog/aisb.b5.math_proof.yaml +235 -0
- package/AISB/catalog/aisb.b6.research_process.yaml +243 -0
- package/AISB/catalog/aisb.b7.multimodal_fusion.yaml +232 -0
- package/AISB/catalog/aisb.b8.lifesci_drug.yaml +275 -0
- package/AISB/catalog/aisb.b9.material_science.yaml +237 -0
- package/AISB/catalog/aisb.t3.001_savvy.yaml +159 -0
- package/AISB/catalog/aisb.t3.001_savvy.zh.yaml +121 -0
- package/AISB/catalog/aisb.t3.002_pinet.yaml +189 -0
- package/AISB/catalog/aisb.t3.002_pinet.zh.yaml +130 -0
- package/AISB/catalog/aisb.t3.004_decentralattn.yaml +184 -0
- package/AISB/catalog/aisb.t3.004_decentralattn.zh.yaml +153 -0
- package/AISB/catalog/aisb.t3.005_tsae.yaml +193 -0
- package/AISB/catalog/aisb.t3.005_tsae.zh.yaml +139 -0
- package/AISB/catalog/aisb.t3.006_physense.yaml +194 -0
- package/AISB/catalog/aisb.t3.006_physense.zh.yaml +118 -0
- package/AISB/catalog/aisb.t3.007_reasoningiqa.yaml +169 -0
- package/AISB/catalog/aisb.t3.007_reasoningiqa.zh.yaml +133 -0
- package/AISB/catalog/aisb.t3.008_meanflows.yaml +188 -0
- package/AISB/catalog/aisb.t3.008_meanflows.zh.yaml +140 -0
- package/AISB/catalog/aisb.t3.009_scoremissing.yaml +179 -0
- package/AISB/catalog/aisb.t3.009_scoremissing.zh.yaml +119 -0
- package/AISB/catalog/aisb.t3.010_suitabilityfilter.yaml +221 -0
- package/AISB/catalog/aisb.t3.010_suitabilityfilter.zh.yaml +141 -0
- package/AISB/catalog/aisb.t3.011_osd.yaml +206 -0
- package/AISB/catalog/aisb.t3.011_osd.zh.yaml +163 -0
- package/AISB/catalog/aisb.t3.012_efficientqat.yaml +206 -0
- package/AISB/catalog/aisb.t3.012_efficientqat.zh.yaml +159 -0
- package/AISB/catalog/aisb.t3.013_appl.yaml +152 -0
- package/AISB/catalog/aisb.t3.013_appl.zh.yaml +126 -0
- package/AISB/catalog/aisb.t3.014_piguard.yaml +207 -0
- package/AISB/catalog/aisb.t3.014_piguard.zh.yaml +164 -0
- package/AISB/catalog/aisb.t3.015_frspec.yaml +209 -0
- package/AISB/catalog/aisb.t3.015_frspec.zh.yaml +163 -0
- package/AISB/catalog/aisb.t3.016_mathfusion.yaml +166 -0
- package/AISB/catalog/aisb.t3.016_mathfusion.zh.yaml +145 -0
- package/AISB/catalog/aisb.t3.017_multimodalglp.yaml +171 -0
- package/AISB/catalog/aisb.t3.017_multimodalglp.zh.yaml +122 -0
- package/AISB/catalog/aisb.t3.018_cotsynth.yaml +206 -0
- package/AISB/catalog/aisb.t3.018_cotsynth.zh.yaml +162 -0
- package/AISB/catalog/aisb.t3.019_dyscaleut.yaml +211 -0
- package/AISB/catalog/aisb.t3.019_dyscaleut.zh.yaml +148 -0
- package/AISB/catalog/aisb.t3.020_aristotle.yaml +173 -0
- package/AISB/catalog/aisb.t3.020_aristotle.zh.yaml +119 -0
- package/AISB/catalog/aisb.t3.021_tokenrecycling.yaml +160 -0
- package/AISB/catalog/aisb.t3.021_tokenrecycling.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.022_chainofreasoning.yaml +204 -0
- package/AISB/catalog/aisb.t3.022_chainofreasoning.zh.yaml +161 -0
- package/AISB/catalog/aisb.t3.023_guidedembed.yaml +211 -0
- package/AISB/catalog/aisb.t3.023_guidedembed.zh.yaml +189 -0
- package/AISB/catalog/aisb.t3.024_outputcentric.yaml +148 -0
- package/AISB/catalog/aisb.t3.024_outputcentric.zh.yaml +131 -0
- package/AISB/catalog/aisb.t3.025_deeper.yaml +143 -0
- package/AISB/catalog/aisb.t3.025_deeper.zh.yaml +116 -0
- package/AISB/catalog/aisb.t3.026_gartkg.yaml +195 -0
- package/AISB/catalog/aisb.t3.026_gartkg.zh.yaml +127 -0
- package/AISB/catalog/aisb.t3.027_citeeval.yaml +182 -0
- package/AISB/catalog/aisb.t3.027_citeeval.zh.yaml +135 -0
- package/AISB/catalog/aisb.t3.028_sbam.yaml +206 -0
- package/AISB/catalog/aisb.t3.028_sbam.zh.yaml +166 -0
- package/AISB/catalog/aisb.t3.029_cdqgeoembed.yaml +224 -0
- package/AISB/catalog/aisb.t3.029_cdqgeoembed.zh.yaml +142 -0
- package/AISB/catalog/aisb.t3.030_processrm.yaml +211 -0
- package/AISB/catalog/aisb.t3.030_processrm.zh.yaml +166 -0
- package/AISB/catalog/aisb.t3.031_circuitstability.yaml +172 -0
- package/AISB/catalog/aisb.t3.031_circuitstability.zh.yaml +134 -0
- package/AISB/catalog/aisb.t3.032_ptsolver.yaml +169 -0
- package/AISB/catalog/aisb.t3.032_ptsolver.zh.yaml +135 -0
- package/AISB/catalog/aisb.t3.033_gcse.yaml +144 -0
- package/AISB/catalog/aisb.t3.033_gcse.zh.yaml +126 -0
- package/AISB/catalog/aisb.t3.034_ensemblewm.yaml +183 -0
- package/AISB/catalog/aisb.t3.034_ensemblewm.zh.yaml +146 -0
- package/AISB/catalog/aisb.t3.035_moralvalueswa.yaml +207 -0
- package/AISB/catalog/aisb.t3.035_moralvalueswa.zh.yaml +165 -0
- package/AISB/catalog/aisb.t3.036_weakstrongpref.yaml +210 -0
- package/AISB/catalog/aisb.t3.036_weakstrongpref.zh.yaml +194 -0
- package/AISB/catalog/aisb.t3.037_dementiamask.yaml +172 -0
- package/AISB/catalog/aisb.t3.037_dementiamask.zh.yaml +132 -0
- package/AISB/catalog/aisb.t3.038_tinysam.yaml +284 -0
- package/AISB/catalog/aisb.t3.038_tinysam.zh.yaml +240 -0
- package/AISB/catalog/aisb.t3.039_calf.yaml +224 -0
- package/AISB/catalog/aisb.t3.039_calf.zh.yaml +194 -0
- package/AISB/catalog/aisb.t3.040_graniteguardian.yaml +199 -0
- package/AISB/catalog/aisb.t3.040_graniteguardian.zh.yaml +174 -0
- package/AISB/catalog/aisb.t3.041_amdm.yaml +149 -0
- package/AISB/catalog/aisb.t3.041_amdm.zh.yaml +137 -0
- package/AISB/catalog/aisb.t3.042_xpatch.yaml +216 -0
- package/AISB/catalog/aisb.t3.042_xpatch.zh.yaml +182 -0
- package/AISB/catalog/aisb.t3.043_vhm.yaml +268 -0
- package/AISB/catalog/aisb.t3.043_vhm.zh.yaml +193 -0
- package/AISB/catalog/aisb.t3.044_rgvi.yaml +224 -0
- package/AISB/catalog/aisb.t3.044_rgvi.zh.yaml +176 -0
- package/AISB/catalog/aisb.t3.045_pslstm.yaml +203 -0
- package/AISB/catalog/aisb.t3.045_pslstm.zh.yaml +179 -0
- package/AISB/catalog/aisb.t3.046_nonstatts.yaml +208 -0
- package/AISB/catalog/aisb.t3.046_nonstatts.zh.yaml +194 -0
- package/AISB/catalog/aisb.t3.047_timepfn.yaml +156 -0
- package/AISB/catalog/aisb.t3.047_timepfn.zh.yaml +124 -0
- package/AISB/catalog/aisb.t3.048_proxyspex.yaml +148 -0
- package/AISB/catalog/aisb.t3.048_proxyspex.zh.yaml +125 -0
- package/AISB/catalog/aisb.t3.049_hogwildinference.yaml +183 -0
- package/AISB/catalog/aisb.t3.049_hogwildinference.zh.yaml +138 -0
- package/AISB/catalog/aisb.t3.050_causalpfn.yaml +214 -0
- package/AISB/catalog/aisb.t3.050_causalpfn.zh.yaml +190 -0
- package/AISB/catalog/aisb.t3.051_flashtp.yaml +169 -0
- package/AISB/catalog/aisb.t3.051_flashtp.zh.yaml +124 -0
- package/AISB/catalog/aisb.t3.052_nsdiff.yaml +155 -0
- package/AISB/catalog/aisb.t3.052_nsdiff.zh.yaml +138 -0
- package/AISB/catalog/aisb.t3.053_k2vae.yaml +158 -0
- package/AISB/catalog/aisb.t3.053_k2vae.zh.yaml +132 -0
- package/AISB/catalog/aisb.t3.054_timebase.yaml +178 -0
- package/AISB/catalog/aisb.t3.054_timebase.zh.yaml +158 -0
- package/AISB/catalog/aisb.t3.055_csbrain.yaml +238 -0
- package/AISB/catalog/aisb.t3.055_csbrain.zh.yaml +184 -0
- package/AISB/catalog/aisb.t3.056_infosam.yaml +224 -0
- package/AISB/catalog/aisb.t3.056_infosam.zh.yaml +189 -0
- package/AISB/catalog/aisb.t3.057_mdreid.yaml +129 -0
- package/AISB/catalog/aisb.t3.057_mdreid.zh.yaml +117 -0
- package/AISB/catalog/aisb.t3.058_mindglitch.yaml +171 -0
- package/AISB/catalog/aisb.t3.058_mindglitch.zh.yaml +145 -0
- package/AISB/catalog/aisb.t3.059_selfsupervised.yaml +154 -0
- package/AISB/catalog/aisb.t3.059_selfsupervised.zh.yaml +125 -0
- package/AISB/catalog/aisb.t3.060_iaggad.yaml +121 -0
- package/AISB/catalog/aisb.t3.060_iaggad.zh.yaml +100 -0
- package/AISB/catalog/aisb.t3.061_hsgkn.yaml +136 -0
- package/AISB/catalog/aisb.t3.061_hsgkn.zh.yaml +113 -0
- package/AISB/catalog/aisb.t3.062_visionts.yaml +237 -0
- package/AISB/catalog/aisb.t3.062_visionts.zh.yaml +216 -0
- package/AISB/catalog/aisb.t3.063_tsrag.yaml +162 -0
- package/AISB/catalog/aisb.t3.063_tsrag.zh.yaml +138 -0
- package/AISB/catalog/aisb.t3.064_pir.yaml +221 -0
- package/AISB/catalog/aisb.t3.064_pir.zh.yaml +197 -0
- package/AISB/catalog/aisb.t3.065_proteinbinding.yaml +234 -0
- package/AISB/catalog/aisb.t3.065_proteinbinding.zh.yaml +167 -0
- package/AISB/catalog/aisb.t3.066_tropicalattention.yaml +267 -0
- package/AISB/catalog/aisb.t3.066_tropicalattention.zh.yaml +229 -0
- package/AISB/catalog/aisb.t3.067_kanad.yaml +193 -0
- package/AISB/catalog/aisb.t3.067_kanad.zh.yaml +167 -0
- package/AISB/catalog/aisb.t3.068_sempo.yaml +187 -0
- package/AISB/catalog/aisb.t3.068_sempo.zh.yaml +148 -0
- package/AISB/catalog/aisb.t3.069_treehfd.yaml +129 -0
- package/AISB/catalog/aisb.t3.069_treehfd.zh.yaml +111 -0
- package/AISB/catalog/aisb.t3.070_certifiedunlearning.yaml +224 -0
- package/AISB/catalog/aisb.t3.070_certifiedunlearning.zh.yaml +171 -0
- package/AISB/catalog/aisb.t3.071_neuralmjd.yaml +142 -0
- package/AISB/catalog/aisb.t3.071_neuralmjd.zh.yaml +120 -0
- package/AISB/catalog/aisb.t3.072_fedgmt.yaml +181 -0
- package/AISB/catalog/aisb.t3.072_fedgmt.zh.yaml +158 -0
- package/AISB/catalog/aisb.t3.073_rld.yaml +161 -0
- package/AISB/catalog/aisb.t3.073_rld.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.074_lsvi.yaml +163 -0
- package/AISB/catalog/aisb.t3.074_lsvi.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.075_treeslicedentropy.yaml +201 -0
- package/AISB/catalog/aisb.t3.075_treeslicedentropy.zh.yaml +148 -0
- package/AISB/catalog/aisb.t3.076_aanet.yaml +169 -0
- package/AISB/catalog/aisb.t3.076_aanet.zh.yaml +129 -0
- package/AISB/catalog/aisb.t3.077_cmnn.yaml +199 -0
- package/AISB/catalog/aisb.t3.077_cmnn.zh.yaml +165 -0
- package/AISB/catalog/aisb.t3.078_conformalanomaly.yaml +146 -0
- package/AISB/catalog/aisb.t3.078_conformalanomaly.zh.yaml +117 -0
- package/AISB/catalog/aisb.t3.079_dpfkmeans.yaml +131 -0
- package/AISB/catalog/aisb.t3.079_dpfkmeans.zh.yaml +104 -0
- package/AISB/catalog/aisb.t3.080_latentscorereweight.yaml +169 -0
- package/AISB/catalog/aisb.t3.080_latentscorereweight.zh.yaml +123 -0
- package/AISB/catalog/aisb.t3.081_qmamba.yaml +150 -0
- package/AISB/catalog/aisb.t3.081_qmamba.zh.yaml +117 -0
- package/AISB/catalog/aisb.t3.082_onlinellmrouting.yaml +160 -0
- package/AISB/catalog/aisb.t3.082_onlinellmrouting.zh.yaml +133 -0
- package/AISB/catalog/aisb.t3.083_starformer.yaml +178 -0
- package/AISB/catalog/aisb.t3.083_starformer.zh.yaml +140 -0
- package/AISB/catalog/aisb.t3.084_ift.yaml +139 -0
- package/AISB/catalog/aisb.t3.084_ift.zh.yaml +111 -0
- package/AISB/catalog/aisb.t3.085_neuralsurv.yaml +183 -0
- package/AISB/catalog/aisb.t3.085_neuralsurv.zh.yaml +143 -0
- package/AISB/catalog/aisb.t3.086_stella.yaml +197 -0
- package/AISB/catalog/aisb.t3.086_stella.zh.yaml +142 -0
- package/AISB/catalog/aisb.t3.087_moses.yaml +167 -0
- package/AISB/catalog/aisb.t3.087_moses.zh.yaml +132 -0
- package/AISB/catalog/aisb.t3.088_channelnorm.yaml +140 -0
- package/AISB/catalog/aisb.t3.088_channelnorm.zh.yaml +109 -0
- package/AISB/catalog/aisb.t3.089_causalvelocity.yaml +730 -0
- package/AISB/catalog/aisb.t3.089_causalvelocity.zh.yaml +668 -0
- package/AISB/catalog/aisb.t3.090_rstib.yaml +144 -0
- package/AISB/catalog/aisb.t3.090_rstib.zh.yaml +109 -0
- package/AISB/catalog/aisb.t3.091_timeawarecausal.yaml +132 -0
- package/AISB/catalog/aisb.t3.091_timeawarecausal.zh.yaml +107 -0
- package/AISB/catalog/aisb.t3.092_kmeanslocalopt.yaml +138 -0
- package/AISB/catalog/aisb.t3.092_kmeanslocalopt.zh.yaml +110 -0
- package/AISB/catalog/aisb.t3.093_fedwmsam.yaml +134 -0
- package/AISB/catalog/aisb.t3.093_fedwmsam.zh.yaml +106 -0
- package/AISB/catalog/aisb.t3.094_boundre.yaml +147 -0
- package/AISB/catalog/aisb.t3.094_boundre.zh.yaml +114 -0
- package/AISB/catalog/aisb.t3.095_fastfeaturecp.yaml +153 -0
- package/AISB/catalog/aisb.t3.095_fastfeaturecp.zh.yaml +118 -0
- package/AISB/catalog/aisb.t3.096_m3svm.yaml +189 -0
- package/AISB/catalog/aisb.t3.096_m3svm.zh.yaml +149 -0
- package/AISB/catalog/aisb.t3.097_wassersteintl.yaml +212 -0
- package/AISB/catalog/aisb.t3.097_wassersteintl.zh.yaml +169 -0
- package/AISB/catalog/aisb.t3.098_xmahalanobis.yaml +171 -0
- package/AISB/catalog/aisb.t3.098_xmahalanobis.zh.yaml +127 -0
- package/AISB/catalog/aisb.t3.099_ollalanding.yaml +248 -0
- package/AISB/catalog/aisb.t3.099_ollalanding.zh.yaml +182 -0
- package/AISB/catalog/aisb.t3.100_invmissingdata.yaml +179 -0
- package/AISB/catalog/aisb.t3.100_invmissingdata.zh.yaml +150 -0
- package/AISB/catalog/aisb.t3.101_acia.yaml +164 -0
- package/AISB/catalog/aisb.t3.101_acia.zh.yaml +109 -0
- package/AISB/catalog/aisb.t3.102_stochasticff.yaml +178 -0
- package/AISB/catalog/aisb.t3.102_stochasticff.zh.yaml +130 -0
- package/AISB/catalog/aisb.t3.103_qdcp.yaml +150 -0
- package/AISB/catalog/aisb.t3.103_qdcp.zh.yaml +116 -0
- package/AISB/catalog/aisb.t3.104_balancedactiveinf.yaml +137 -0
- package/AISB/catalog/aisb.t3.104_balancedactiveinf.zh.yaml +104 -0
- package/AISB/catalog/aisb.t3.105_binaryclasseval.yaml +161 -0
- package/AISB/catalog/aisb.t3.105_binaryclasseval.zh.yaml +130 -0
- package/AISB/image/001_aisb.t3.001_savvy.jpg +0 -0
- package/AISB/image/002_aisb.t3.002_pinet.jpg +0 -0
- package/AISB/image/003_aisb.t3.003_dmsqd.jpg +0 -0
- package/AISB/image/004_aisb.t3.004_decentralattn.jpg +0 -0
- package/AISB/image/005_aisb.t3.005_tsae.jpg +0 -0
- package/AISB/image/006_aisb.t3.006_physense.jpg +0 -0
- package/AISB/image/007_aisb.t3.007_reasoningiqa.jpg +0 -0
- package/AISB/image/008_aisb.t3.008_meanflows.jpg +0 -0
- package/AISB/image/009_aisb.t3.009_scoremissing.jpg +0 -0
- package/AISB/image/010_aisb.t3.010_suitabilityfilter.jpg +0 -0
- package/AISB/image/011_aisb.t3.011_osd.jpg +0 -0
- package/AISB/image/012_aisb.t3.012_efficientqat.jpg +0 -0
- package/AISB/image/013_aisb.t3.013_appl.jpg +0 -0
- package/AISB/image/014_aisb.t3.014_piguard.jpg +0 -0
- package/AISB/image/015_aisb.t3.015_frspec.jpg +0 -0
- package/AISB/image/016_aisb.t3.016_mathfusion.jpg +0 -0
- package/AISB/image/017_aisb.t3.017_multimodalglp.jpg +0 -0
- package/AISB/image/018_aisb.t3.018_cotsynth.jpg +0 -0
- package/AISB/image/019_aisb.t3.019_dyscaleut.jpg +0 -0
- package/AISB/image/020_aisb.t3.020_aristotle.jpg +0 -0
- package/AISB/image/021_aisb.t3.021_tokenrecycling.jpg +0 -0
- package/AISB/image/022_aisb.t3.022_chainofreasoning.jpg +0 -0
- package/AISB/image/023_aisb.t3.023_guidedembed.jpg +0 -0
- package/AISB/image/024_aisb.t3.024_outputcentric.jpg +0 -0
- package/AISB/image/025_aisb.t3.025_deeper.jpg +0 -0
- package/AISB/image/026_aisb.t3.026_gartkg.jpg +0 -0
- package/AISB/image/027_aisb.t3.027_citeeval.jpg +0 -0
- package/AISB/image/028_aisb.t3.028_sbam.jpg +0 -0
- package/AISB/image/029_aisb.t3.029_cdqgeoembed.jpg +0 -0
- package/AISB/image/030_aisb.t3.030_processrm.jpg +0 -0
- package/AISB/image/031_aisb.t3.031_circuitstability.jpg +0 -0
- package/AISB/image/032_aisb.t3.032_ptsolver.jpg +0 -0
- package/AISB/image/033_aisb.t3.033_gcse.jpg +0 -0
- package/AISB/image/034_aisb.t3.034_ensemblewm.jpg +0 -0
- package/AISB/image/035_aisb.t3.035_moralvalueswa.jpg +0 -0
- package/AISB/image/036_aisb.t3.036_weakstrongpref.jpg +0 -0
- package/AISB/image/037_aisb.t3.037_dementiamask.jpg +0 -0
- package/AISB/image/038_aisb.t3.038_tinysam.jpg +0 -0
- package/AISB/image/039_aisb.t3.039_calf.jpg +0 -0
- package/AISB/image/040_aisb.t3.040_graniteguardian.jpg +0 -0
- package/AISB/image/041_aisb.t3.041_amdm.jpg +0 -0
- package/AISB/image/042_aisb.t3.042_xpatch.jpg +0 -0
- package/AISB/image/043_aisb.t3.043_vhm.jpg +0 -0
- package/AISB/image/044_aisb.t3.044_rgvi.jpg +0 -0
- package/AISB/image/045_aisb.t3.045_pslstm.jpg +0 -0
- package/AISB/image/046_aisb.t3.046_nonstatts.jpg +0 -0
- package/AISB/image/047_aisb.t3.047_timepfn.jpg +0 -0
- package/AISB/image/048_aisb.t3.048_proxyspex.jpg +0 -0
- package/AISB/image/049_aisb.t3.049_hogwildinference.jpg +0 -0
- package/AISB/image/050_aisb.t3.050_causalpfn.jpg +0 -0
- package/AISB/image/051_aisb.t3.051_flashtp.jpg +0 -0
- package/AISB/image/052_aisb.t3.052_nsdiff.jpg +0 -0
- package/AISB/image/053_aisb.t3.053_k2vae.jpg +0 -0
- package/AISB/image/054_aisb.t3.054_timebase.jpg +0 -0
- package/AISB/image/055_aisb.t3.055_csbrain.jpg +0 -0
- package/AISB/image/056_aisb.t3.056_infosam.jpg +0 -0
- package/AISB/image/057_aisb.t3.057_mdreid.jpg +0 -0
- package/AISB/image/058_aisb.t3.058_mindglitch.jpg +0 -0
- package/AISB/image/059_aisb.t3.059_selfsupervised.jpg +0 -0
- package/AISB/image/060_aisb.t3.060_iaggad.jpg +0 -0
- package/AISB/image/061_aisb.t3.061_hsgkn.jpg +0 -0
- package/AISB/image/062_aisb.t3.062_visionts.jpg +0 -0
- package/AISB/image/063_aisb.t3.063_tsrag.jpg +0 -0
- package/AISB/image/064_aisb.t3.064_pir.jpg +0 -0
- package/AISB/image/065_aisb.t3.065_proteinbinding.jpg +0 -0
- package/AISB/image/066_aisb.t3.066_tropicalattention.jpg +0 -0
- package/AISB/image/067_aisb.t3.067_kanad.jpg +0 -0
- package/AISB/image/068_aisb.t3.068_sempo.jpg +0 -0
- package/AISB/image/069_aisb.t3.069_treehfd.jpg +0 -0
- package/AISB/image/070_aisb.t3.070_certifiedunlearning.jpg +0 -0
- package/AISB/image/071_aisb.t3.071_neuralmjd.jpg +0 -0
- package/AISB/image/072_aisb.t3.072_fedgmt.jpg +0 -0
- package/AISB/image/073_aisb.t3.073_rld.jpg +0 -0
- package/AISB/image/074_aisb.t3.074_lsvi.jpg +0 -0
- package/AISB/image/075_aisb.t3.075_treeslicedentropy.jpg +0 -0
- package/AISB/image/076_aisb.t3.076_aanet.jpg +0 -0
- package/AISB/image/077_aisb.t3.077_cmnn.jpg +0 -0
- package/AISB/image/078_aisb.t3.078_conformalanomaly.jpg +0 -0
- package/AISB/image/079_aisb.t3.079_dpfkmeans.jpg +0 -0
- package/AISB/image/080_aisb.t3.080_latentscorereweight.jpg +0 -0
- package/AISB/image/081_aisb.t3.081_qmamba.jpg +0 -0
- package/AISB/image/082_aisb.t3.082_onlinellmrouting.jpg +0 -0
- package/AISB/image/083_aisb.t3.083_starformer.jpg +0 -0
- package/AISB/image/084_aisb.t3.084_ift.jpg +0 -0
- package/AISB/image/085_aisb.t3.085_neuralsurv.jpg +0 -0
- package/AISB/image/086_aisb.t3.086_stella.jpg +0 -0
- package/AISB/image/087_aisb.t3.087_moses.jpg +0 -0
- package/AISB/image/088_aisb.t3.088_channelnorm.jpg +0 -0
- package/AISB/image/089_aisb.t3.089_causalvelocity.jpg +0 -0
- package/AISB/image/090_aisb.t3.090_rstib.jpg +0 -0
- package/AISB/image/091_aisb.t3.091_timeawarecausal.jpg +0 -0
- package/AISB/image/092_aisb.t3.092_kmeanslocalopt.jpg +0 -0
- package/AISB/image/093_aisb.t3.093_fedwmsam.jpg +0 -0
- package/AISB/image/094_aisb.t3.094_boundre.jpg +0 -0
- package/AISB/image/095_aisb.t3.095_fastfeaturecp.jpg +0 -0
- package/AISB/image/096_aisb.t3.096_m3svm.jpg +0 -0
- package/AISB/image/097_aisb.t3.097_wassersteintl.jpg +0 -0
- package/AISB/image/098_aisb.t3.098_xmahalanobis.jpg +0 -0
- package/AISB/image/099_aisb.t3.099_ollalanding.jpg +0 -0
- package/AISB/image/100_aisb.t3.100_invmissingdata.jpg +0 -0
- package/AISB/image/101_aisb.t3.101_acia.jpg +0 -0
- package/AISB/image/102_aisb.t3.102_stochasticff.jpg +0 -0
- package/AISB/image/103_aisb.t3.103_qdcp.jpg +0 -0
- package/AISB/image/104_aisb.t3.104_balancedactiveinf.jpg +0 -0
- package/AISB/image/105_aisb.t3.105_binaryclasseval.jpg +0 -0
- package/AISB/image/106_aisb.t1.reasoning_lite.jpg +0 -0
- package/AISB/image/107_aisb.t2.paper_audit.jpg +0 -0
- package/AISB/image/108_aisb.t3.multi_gpu_search.jpg +0 -0
- package/AISB/image/109_aisb.t3.tdc_admet.jpg +0 -0
- package/AISB/image/aisb.b1.agentic_coding.svg +16 -0
- package/AISB/image/aisb.b10.climate_earth.svg +16 -0
- package/AISB/image/aisb.b11.model_efficiency.svg +16 -0
- package/AISB/image/aisb.b12.embodied_ai.svg +16 -0
- package/AISB/image/aisb.b2.agent_systems.svg +16 -0
- package/AISB/image/aisb.b3.self_evolving_rl.svg +16 -0
- package/AISB/image/aisb.b4.lm_reasoning.svg +16 -0
- package/AISB/image/aisb.b5.math_proof.svg +16 -0
- package/AISB/image/aisb.b6.research_process.svg +16 -0
- package/AISB/image/aisb.b7.multimodal_fusion.svg +16 -0
- package/AISB/image/aisb.b8.lifesci_drug.svg +16 -0
- package/AISB/image/aisb.b9.material_science.svg +16 -0
- package/README.md +132 -11
- package/bin/ds.js +376 -49
- package/docs/en/00_QUICK_START.md +135 -18
- package/docs/en/01_SETTINGS_REFERENCE.md +468 -96
- package/docs/en/02_START_RESEARCH_GUIDE.md +26 -5
- package/docs/en/03_QQ_CONNECTOR_GUIDE.md +14 -3
- package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +2 -0
- package/docs/en/05_TUI_GUIDE.md +171 -2
- package/docs/en/07_MEMORY_AND_MCP.md +38 -2
- package/docs/en/09_DOCTOR.md +64 -4
- package/docs/en/10_WEIXIN_CONNECTOR_GUIDE.md +38 -1
- package/docs/en/11_LICENSE_AND_RISK.md +4 -0
- package/docs/en/12_GUIDED_WORKFLOW_TOUR.md +15 -0
- package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +9 -0
- package/docs/en/15_CODEX_PROVIDER_SETUP.md +622 -187
- package/docs/en/16_TELEGRAM_CONNECTOR_GUIDE.md +14 -0
- package/docs/en/17_WHATSAPP_CONNECTOR_GUIDE.md +14 -0
- package/docs/en/18_FEISHU_CONNECTOR_GUIDE.md +14 -0
- package/docs/en/21_LOCAL_MODEL_BACKENDS_GUIDE.md +105 -2
- package/docs/en/22_BENCHSTORE_YAML_REFERENCE.md +469 -0
- package/docs/en/23_BENCHSTORE_GITHUB_RELEASES_SPEC.md +316 -0
- package/docs/en/24_CLAUDE_CODE_PROVIDER_SETUP.md +469 -0
- package/docs/en/25_OPENCODE_PROVIDER_SETUP.md +653 -0
- package/docs/en/26_CITATION_AND_ATTRIBUTION.md +119 -0
- package/docs/en/27_KIMI_CODE_PROVIDER_SETUP.md +180 -0
- package/docs/en/28_DISCORD_CONNECTOR_GUIDE.md +61 -0
- package/docs/en/29_SLACK_CONNECTOR_GUIDE.md +60 -0
- package/docs/en/30_SETTINGS_CONTROL_CENTER_GUIDE.md +371 -0
- package/docs/en/{19_LOCAL_BROWSER_AUTH.md → 31_LOCAL_BROWSER_AUTH.md} +1 -1
- package/docs/en/32_WINDOWS_WSL2_DEPLOYMENT_GUIDE.md +273 -0
- package/docs/en/33_WORKSPACE_EXPLORER_QA.md +121 -0
- package/docs/en/91_DEVELOPMENT.md +29 -0
- package/docs/en/99_ACKNOWLEDGEMENTS.md +24 -19
- package/docs/en/README.md +44 -7
- package/docs/images/admin/admin-connectors-health-en.png +0 -0
- package/docs/images/admin/admin-controllers-en.png +0 -0
- package/docs/images/admin/admin-diagnostics-en.png +0 -0
- package/docs/images/admin/admin-errors-en.png +0 -0
- package/docs/images/admin/admin-issues-en.png +0 -0
- package/docs/images/admin/admin-logs-en.png +0 -0
- package/docs/images/admin/admin-quest-detail-en.png +0 -0
- package/docs/images/admin/admin-quests-en.png +0 -0
- package/docs/images/admin/admin-repairs-en.png +0 -0
- package/docs/images/admin/admin-runtime-en.png +0 -0
- package/docs/images/admin/admin-search-en.png +0 -0
- package/docs/images/admin/admin-stats-en.png +0 -0
- package/docs/images/admin/admin-summary-en.png +0 -0
- package/docs/images/connectors/connector-discord-en.png +0 -0
- package/docs/images/connectors/connector-feishu-en.png +0 -0
- package/docs/images/connectors/connector-lingzhu-en.png +0 -0
- package/docs/images/connectors/connector-qq-en.png +0 -0
- package/docs/images/connectors/connector-slack-en.png +0 -0
- package/docs/images/connectors/connector-telegram-en.png +0 -0
- package/docs/images/connectors/connector-weixin-en.png +0 -0
- package/docs/images/connectors/connector-whatsapp-en.png +0 -0
- package/docs/images/settings/settings-baselines-en.png +0 -0
- package/docs/images/settings/settings-config-en.png +0 -0
- package/docs/images/settings/settings-connectors-overview-en.png +0 -0
- package/docs/images/settings/settings-deepxiv-en.png +0 -0
- package/docs/images/settings/settings-mcp-servers-en.png +0 -0
- package/docs/images/settings/settings-plugins-en.png +0 -0
- package/docs/images/settings/settings-runners-en.png +0 -0
- package/docs/zh/00_QUICK_START.md +92 -17
- package/docs/zh/01_SETTINGS_REFERENCE.md +219 -98
- package/docs/zh/02_START_RESEARCH_GUIDE.md +26 -5
- package/docs/zh/05_TUI_GUIDE.md +171 -2
- package/docs/zh/07_MEMORY_AND_MCP.md +29 -2
- package/docs/zh/09_DOCTOR.md +39 -4
- package/docs/zh/10_WEIXIN_CONNECTOR_GUIDE.md +24 -1
- package/docs/zh/11_LICENSE_AND_RISK.md +4 -0
- package/docs/zh/12_GUIDED_WORKFLOW_TOUR.md +15 -0
- package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +9 -0
- package/docs/zh/15_CODEX_PROVIDER_SETUP.md +550 -188
- package/docs/zh/21_LOCAL_MODEL_BACKENDS_GUIDE.md +105 -2
- package/docs/zh/22_BENCHSTORE_YAML_REFERENCE.md +459 -0
- package/docs/zh/23_BENCHSTORE_GITHUB_RELEASES_SPEC.md +287 -0
- package/docs/zh/23_CLAUDE_RUNNER_GUIDE.md +103 -0
- package/docs/zh/24_CLAUDE_CODE_PROVIDER_SETUP.md +460 -0
- package/docs/zh/25_OPENCODE_PROVIDER_SETUP.md +660 -0
- package/docs/zh/26_CITATION_AND_ATTRIBUTION.md +102 -0
- package/docs/zh/27_KIMI_CODE_PROVIDER_SETUP.md +51 -0
- package/docs/zh/{19_LOCAL_BROWSER_AUTH.md → 31_LOCAL_BROWSER_AUTH.md} +1 -1
- package/docs/zh/32_WINDOWS_WSL2_DEPLOYMENT_GUIDE.md +264 -0
- package/docs/zh/33_WORKSPACE_EXPLORER_QA.md +127 -0
- package/docs/zh/99_ACKNOWLEDGEMENTS.md +23 -19
- package/docs/zh/README.md +29 -7
- package/install.sh +122 -16
- package/package.json +4 -1
- package/pyproject.toml +2 -1
- package/src/deepscientist/__init__.py +1 -1
- package/src/deepscientist/acp/envelope.py +13 -0
- package/src/deepscientist/admin/__init__.py +3 -0
- package/src/deepscientist/admin/charts.py +681 -0
- package/src/deepscientist/admin/logs.py +119 -0
- package/src/deepscientist/admin/repairs.py +217 -0
- package/src/deepscientist/admin/service.py +1310 -0
- package/src/deepscientist/admin/system_info.py +700 -0
- package/src/deepscientist/admin/tasks.py +465 -0
- package/src/deepscientist/admin/tool_metrics.py +600 -0
- package/src/deepscientist/artifact/guidance.py +8 -4
- package/src/deepscientist/artifact/schemas.py +115 -0
- package/src/deepscientist/artifact/service.py +4268 -260
- package/src/deepscientist/bash_exec/monitor.py +30 -3
- package/src/deepscientist/bash_exec/service.py +134 -1
- package/src/deepscientist/benchstore/__init__.py +4 -0
- package/src/deepscientist/benchstore/prompt_builder.py +224 -0
- package/src/deepscientist/benchstore/service.py +1716 -0
- package/src/deepscientist/channels/weixin_ilink.py +8 -1
- package/src/deepscientist/cli.py +92 -17
- package/src/deepscientist/codex_cli_compat.py +2 -2
- package/src/deepscientist/config/models.py +82 -11
- package/src/deepscientist/config/service.py +927 -91
- package/src/deepscientist/connector/weixin_support.py +48 -17
- package/src/deepscientist/daemon/api/handlers.py +697 -210
- package/src/deepscientist/daemon/api/router.py +76 -1
- package/src/deepscientist/daemon/app.py +1054 -51
- package/src/deepscientist/diagnostics/runner_failures.py +147 -0
- package/src/deepscientist/doctor.py +212 -65
- package/src/deepscientist/evidence_packets.py +590 -0
- package/src/deepscientist/home.py +52 -4
- package/src/deepscientist/kimi_cli_compat.py +50 -0
- package/src/deepscientist/latex_runtime.py +2 -2
- package/src/deepscientist/mcp/context.py +2 -0
- package/src/deepscientist/mcp/schemas.py +114 -0
- package/src/deepscientist/mcp/server.py +1566 -126
- package/src/deepscientist/memory/service.py +203 -16
- package/src/deepscientist/process_control.py +8 -1
- package/src/deepscientist/prompts/builder.py +836 -92
- package/src/deepscientist/quest/__init__.py +2 -2
- package/src/deepscientist/quest/layout.py +12 -1
- package/src/deepscientist/quest/node_traces.py +10 -0
- package/src/deepscientist/quest/service.py +1430 -139
- package/src/deepscientist/quest/stage_views.py +1 -1
- package/src/deepscientist/runners/__init__.py +18 -0
- package/src/deepscientist/runners/base.py +89 -1
- package/src/deepscientist/runners/builtins.py +13 -1
- package/src/deepscientist/runners/claude.py +391 -0
- package/src/deepscientist/runners/codex.py +421 -21
- package/src/deepscientist/runners/codex_telemetry.py +127 -0
- package/src/deepscientist/runners/kimi.py +334 -0
- package/src/deepscientist/runners/metadata.py +68 -0
- package/src/deepscientist/runners/opencode.py +414 -0
- package/src/deepscientist/runners/runtime_overrides.py +100 -0
- package/src/deepscientist/runners/simple_cli.py +538 -0
- package/src/deepscientist/runtime_storage.py +303 -0
- package/src/deepscientist/shared.py +61 -16
- package/src/deepscientist/skills/installer.py +37 -0
- package/src/deepscientist/skills/registry.py +2 -0
- package/src/deepscientist/tinytex.py +2 -2
- package/src/deepscientist/tui.py +10 -3
- package/src/prompts/benchstore/system.md +77 -0
- package/src/prompts/connectors/qq.md +33 -2
- package/src/prompts/connectors/weixin.md +208 -23
- package/src/prompts/contracts/admin_ops.md +74 -0
- package/src/prompts/contracts/admin_ops_knowledge.md +138 -0
- package/src/prompts/contracts/shared_interaction.md +5 -11
- package/src/prompts/start_setup/system.md +422 -0
- package/src/prompts/system.md +409 -315
- package/src/prompts/system_copilot.md +88 -12
- package/src/skills/analysis-campaign/SKILL.md +239 -578
- package/src/skills/analysis-campaign/references/artifact-flow-examples.md +102 -0
- package/src/skills/analysis-campaign/references/boundary-cases.md +98 -0
- package/src/skills/analysis-campaign/references/campaign-checklist-template.md +39 -24
- package/src/skills/analysis-campaign/references/campaign-design.md +26 -10
- package/src/skills/analysis-campaign/references/campaign-plan-template.md +53 -54
- package/src/skills/analysis-campaign/references/operational-guidance.md +97 -0
- package/src/skills/analysis-campaign/references/writing-facing-slice-examples.md +10 -20
- package/src/skills/baseline/SKILL.md +183 -461
- package/src/skills/baseline/references/artifact-flow-examples.md +106 -0
- package/src/skills/baseline/references/artifact-payload-examples.md +1 -1
- package/src/skills/baseline/references/baseline-checklist-template.md +27 -35
- package/src/skills/baseline/references/baseline-plan-template.md +37 -76
- package/src/skills/baseline/references/boundary-cases.md +86 -0
- package/src/skills/baseline/references/codebase-audit-checklist.md +2 -6
- package/src/skills/baseline/references/comparability-contract.md +7 -12
- package/src/skills/baseline/references/operational-guidance.md +56 -0
- package/src/skills/baseline/references/route-selection.md +5 -25
- package/src/skills/decision/SKILL.md +113 -306
- package/src/skills/decision/references/checkpoint-memory-template.md +47 -0
- package/src/skills/decision/references/operational-guidance.md +94 -0
- package/src/skills/decision/references/research-route-criteria.md +7 -8
- package/src/skills/decision/references/strategic-decision-template.md +13 -26
- package/src/skills/experiment/SKILL.md +132 -670
- package/src/skills/experiment/references/execution-playbook.md +374 -0
- package/src/skills/experiment/references/main-experiment-checklist-template.md +26 -2
- package/src/skills/experiment/references/main-experiment-plan-template.md +28 -17
- package/src/skills/experiment/references/operational-guidance.md +108 -0
- package/src/skills/finalize/SKILL.md +62 -0
- package/src/skills/finalize/references/checkpoint-memory-template.md +49 -0
- package/src/skills/finalize/references/resume-packet-template.md +7 -0
- package/src/skills/idea/SKILL.md +228 -15
- package/src/skills/idea/references/controlled-brainstorming-playbook.md +78 -0
- package/src/skills/idea/references/current-board-packet-template.md +61 -0
- package/src/skills/idea/references/high-value-idea-sourcing.md +119 -0
- package/src/skills/idea/references/idea-generation-playbook.md +21 -0
- package/src/skills/idea/references/idea-thinking-flow.md +6 -0
- package/src/skills/idea/references/literature-survey-template.md +3 -0
- package/src/skills/idea/references/objective-contract-template.md +54 -0
- package/src/skills/idea/references/outline-seeding-example.md +56 -0
- package/src/skills/idea/references/pre-idea-draft-template.md +105 -0
- package/src/skills/idea/references/related-work-playbook.md +75 -2
- package/src/skills/idea/references/research-history-playbook.md +114 -0
- package/src/skills/idea/references/selection-gate.md +58 -6
- package/src/skills/intake-audit/SKILL.md +43 -2
- package/src/skills/intake-audit/references/state-audit-template.md +10 -0
- package/src/skills/nature-data/SKILL.md +128 -0
- package/src/skills/nature-data/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-data/agents/openai.yaml +4 -0
- package/src/skills/nature-data/references/chinese-author-alignment.md +84 -0
- package/src/skills/nature-data/references/fair-metadata-checklist.md +105 -0
- package/src/skills/nature-data/references/policy-principles.md +103 -0
- package/src/skills/nature-data/references/repository-and-identifiers.md +96 -0
- package/src/skills/nature-data/references/source-basis.md +54 -0
- package/src/skills/nature-data/references/statement-patterns.md +153 -0
- package/src/skills/nature-figure/SKILL.md +197 -0
- package/src/skills/nature-figure/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-figure/agents/openai.yaml +4 -0
- package/src/skills/nature-figure/evals/evals.json +37 -0
- package/src/skills/nature-figure/references/api.md +428 -0
- package/src/skills/nature-figure/references/backend-selection.md +100 -0
- package/src/skills/nature-figure/references/chart-types.md +281 -0
- package/src/skills/nature-figure/references/common-patterns.md +349 -0
- package/src/skills/nature-figure/references/design-theory.md +436 -0
- package/src/skills/nature-figure/references/figure-contract.md +93 -0
- package/src/skills/nature-figure/references/nature-2026-observations.md +112 -0
- package/src/skills/nature-figure/references/qa-contract.md +119 -0
- package/src/skills/nature-figure/references/r-template-index.md +66 -0
- package/src/skills/nature-figure/references/r-workflow.md +161 -0
- package/src/skills/nature-figure/references/tutorials.md +250 -0
- package/src/skills/nature-paper2ppt/SKILL.md +507 -0
- package/src/skills/nature-paper2ppt/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-paper2ppt/agents/openai.yaml +4 -0
- package/src/skills/nature-polishing/SKILL.md +385 -0
- package/src/skills/nature-polishing/UPSTREAM_LICENSE.txt +21 -0
- package/src/skills/nature-polishing/agents/openai.yaml +4 -0
- package/src/skills/nature-polishing/references/phrasebank-playbook.md +162 -0
- package/src/skills/nature-polishing/references/section-moves.md +240 -0
- package/src/skills/nature-polishing/references/style-guardrails.md +94 -0
- package/src/skills/nature-polishing/references/writing-strategy.md +148 -0
- package/src/skills/optimize/SKILL.md +177 -1568
- package/src/skills/optimize/references/brief-shaping-playbook.md +95 -0
- package/src/skills/optimize/references/candidate-board-template.md +13 -0
- package/src/skills/optimize/references/candidate-ranking-template.md +51 -0
- package/src/skills/optimize/references/codegen-route-playbook.md +50 -0
- package/src/skills/optimize/references/debug-response-template.md +29 -0
- package/src/skills/optimize/references/frontier-review-template.md +32 -0
- package/src/skills/optimize/references/fusion-playbook.md +36 -0
- package/src/skills/optimize/references/method-brief-template.md +73 -0
- package/src/skills/optimize/references/operational-guidance.md +621 -0
- package/src/skills/optimize/references/optimization-memory-template.md +30 -0
- package/src/skills/optimize/references/optimize-checklist-template.md +18 -0
- package/src/skills/optimize/references/plateau-response-playbook.md +28 -0
- package/src/skills/optimize/references/prompt-patterns.md +49 -0
- package/src/skills/paper-outline/SKILL.md +227 -0
- package/src/skills/paper-outline/references/outline-patterns.md +87 -0
- package/src/skills/paper-plot/SKILL.md +79 -0
- package/src/skills/paper-plot/agents/openai.yaml +4 -0
- package/src/skills/paper-plot/references/bar_grouped_hatch.md +96 -0
- package/src/skills/paper-plot/references/bar_paired_delta.md +72 -0
- package/src/skills/paper-plot/references/line_confidence_band.md +75 -0
- package/src/skills/paper-plot/references/line_loss_with_inset.md +65 -0
- package/src/skills/paper-plot/references/line_training_curve.md +44 -0
- package/src/skills/paper-plot/references/radar_dual_series.md +59 -0
- package/src/skills/paper-plot/references/scatter_broken_axis.md +59 -0
- package/src/skills/paper-plot/references/scatter_tsne_cluster.md +72 -0
- package/src/skills/paper-plot/scripts/bar_memevolve.py +109 -0
- package/src/skills/paper-plot/scripts/bar_spice.py +166 -0
- package/src/skills/paper-plot/scripts/line_aime.py +94 -0
- package/src/skills/paper-plot/scripts/line_loss_inset.py +157 -0
- package/src/skills/paper-plot/scripts/line_selfdistill.py +168 -0
- package/src/skills/paper-plot/scripts/radar_dora.py +151 -0
- package/src/skills/paper-plot/scripts/scatter_break.py +169 -0
- package/src/skills/paper-plot/scripts/scatter_tsne.py +133 -0
- package/src/skills/rebuttal/SKILL.md +9 -0
- package/src/skills/references/tool-usage-by-stage.md +438 -0
- package/src/skills/review/SKILL.md +105 -7
- package/src/skills/science/PROVENANCE.md +44 -0
- package/src/skills/science/SKILL.md +137 -0
- package/src/skills/science/references/artifact-science-tool.md +110 -0
- package/src/skills/science/references/claim-type-discipline.md +56 -0
- package/src/skills/science/references/domain-index.md +422 -0
- package/src/skills/science/references/hpc-via-bash-exec.md +42 -0
- package/src/skills/science/references/package-check-playbook.md +64 -0
- package/src/skills/science/references/package-index.min.json +3616 -0
- package/src/skills/science/references/packages/abinit.md +80 -0
- package/src/skills/science/references/packages/acts.md +73 -0
- package/src/skills/science/references/packages/aiida-core.md +80 -0
- package/src/skills/science/references/packages/alamode.md +80 -0
- package/src/skills/science/references/packages/amuse.md +88 -0
- package/src/skills/science/references/packages/anndata.md +88 -0
- package/src/skills/science/references/packages/arbor.md +80 -0
- package/src/skills/science/references/packages/arc.md +73 -0
- package/src/skills/science/references/packages/astropy.md +88 -0
- package/src/skills/science/references/packages/astroquery.md +88 -0
- package/src/skills/science/references/packages/atomate2.md +80 -0
- package/src/skills/science/references/packages/atomsmltr.md +73 -0
- package/src/skills/science/references/packages/awkward.md +73 -0
- package/src/skills/science/references/packages/batman.md +88 -0
- package/src/skills/science/references/packages/biopython.md +88 -0
- package/src/skills/science/references/packages/bloqade.md +73 -0
- package/src/skills/science/references/packages/brian2.md +73 -0
- package/src/skills/science/references/packages/bullet3.md +73 -0
- package/src/skills/science/references/packages/calculix.md +80 -0
- package/src/skills/science/references/packages/cantera.md +73 -0
- package/src/skills/science/references/packages/cavity-md-ipi.md +80 -0
- package/src/skills/science/references/packages/ccdproc.md +88 -0
- package/src/skills/science/references/packages/celerite2.md +88 -0
- package/src/skills/science/references/packages/cellrank.md +73 -0
- package/src/skills/science/references/packages/cesm.md +80 -0
- package/src/skills/science/references/packages/chemicals.md +73 -0
- package/src/skills/science/references/packages/chempy.md +73 -0
- package/src/skills/science/references/packages/cirq.md +73 -0
- package/src/skills/science/references/packages/coffea.md +73 -0
- package/src/skills/science/references/packages/cp2k.md +88 -0
- package/src/skills/science/references/packages/custodian.md +80 -0
- package/src/skills/science/references/packages/dart.md +73 -0
- package/src/skills/science/references/packages/datamol.md +88 -0
- package/src/skills/science/references/packages/dd4hep.md +73 -0
- package/src/skills/science/references/packages/dealii.md +80 -0
- package/src/skills/science/references/packages/deepchem.md +88 -0
- package/src/skills/science/references/packages/delphes.md +73 -0
- package/src/skills/science/references/packages/devito.md +80 -0
- package/src/skills/science/references/packages/dftb.md +88 -0
- package/src/skills/science/references/packages/dftd4.md +88 -0
- package/src/skills/science/references/packages/dftk-jl.md +80 -0
- package/src/skills/science/references/packages/dolfinx.md +80 -0
- package/src/skills/science/references/packages/drake.md +73 -0
- package/src/skills/science/references/packages/dumux.md +73 -0
- package/src/skills/science/references/packages/elk.md +80 -0
- package/src/skills/science/references/packages/elmerfem.md +80 -0
- package/src/skills/science/references/packages/enzo-e.md +88 -0
- package/src/skills/science/references/packages/espresso.md +80 -0
- package/src/skills/science/references/packages/exoplanet.md +88 -0
- package/src/skills/science/references/packages/fairroot.md +73 -0
- package/src/skills/science/references/packages/fbpic.md +80 -0
- package/src/skills/science/references/packages/fdtdbath-meep.md +80 -0
- package/src/skills/science/references/packages/geant4.md +73 -0
- package/src/skills/science/references/packages/geosx.md +80 -0
- package/src/skills/science/references/packages/gprmax.md +80 -0
- package/src/skills/science/references/packages/gromacs.md +80 -0
- package/src/skills/science/references/packages/gwaslab.md +73 -0
- package/src/skills/science/references/packages/gz-sim.md +73 -0
- package/src/skills/science/references/packages/hail.md +88 -0
- package/src/skills/science/references/packages/hiphive.md +80 -0
- package/src/skills/science/references/packages/hoomd-blue.md +80 -0
- package/src/skills/science/references/packages/itensor.md +73 -0
- package/src/skills/science/references/packages/itensors-jl.md +73 -0
- package/src/skills/science/references/packages/jdftx.md +73 -0
- package/src/skills/science/references/packages/jobflow.md +80 -0
- package/src/skills/science/references/packages/kadanoffbaym-jl.md +73 -0
- package/src/skills/science/references/packages/kite.md +80 -0
- package/src/skills/science/references/packages/kratos.md +80 -0
- package/src/skills/science/references/packages/kwant.md +73 -0
- package/src/skills/science/references/packages/lammps.md +80 -0
- package/src/skills/science/references/packages/lightkurve.md +88 -0
- package/src/skills/science/references/packages/limix.md +73 -0
- package/src/skills/science/references/packages/maxwelllink.md +80 -0
- package/src/skills/science/references/packages/mcdc.md +73 -0
- package/src/skills/science/references/packages/meep.md +80 -0
- package/src/skills/science/references/packages/mfem.md +80 -0
- package/src/skills/science/references/packages/mitgcm.md +73 -0
- package/src/skills/science/references/packages/modflow6.md +73 -0
- package/src/skills/science/references/packages/molecool.md +73 -0
- package/src/skills/science/references/packages/mom6.md +73 -0
- package/src/skills/science/references/packages/moose.md +80 -0
- package/src/skills/science/references/packages/mpas-model.md +73 -0
- package/src/skills/science/references/packages/mujoco.md +73 -0
- package/src/skills/science/references/packages/mumax3.md +73 -0
- package/src/skills/science/references/packages/nekrs.md +80 -0
- package/src/skills/science/references/packages/nessi.md +73 -0
- package/src/skills/science/references/packages/nest-simulator.md +73 -0
- package/src/skills/science/references/packages/netket.md +73 -0
- package/src/skills/science/references/packages/neuron.md +73 -0
- package/src/skills/science/references/packages/nextflow.md +88 -0
- package/src/skills/science/references/packages/nwchem.md +88 -0
- package/src/skills/science/references/packages/openbabel.md +88 -0
- package/src/skills/science/references/packages/openems.md +80 -0
- package/src/skills/science/references/packages/openff-toolkit.md +88 -0
- package/src/skills/science/references/packages/openfoam-dev.md +80 -0
- package/src/skills/science/references/packages/openmc.md +73 -0
- package/src/skills/science/references/packages/openmm.md +80 -0
- package/src/skills/science/references/packages/openmoc.md +73 -0
- package/src/skills/science/references/packages/openmx.md +80 -0
- package/src/skills/science/references/packages/opensees.md +80 -0
- package/src/skills/science/references/packages/opensn.md +80 -0
- package/src/skills/science/references/packages/opm-simulators.md +73 -0
- package/src/skills/science/references/packages/oqupy.md +73 -0
- package/src/skills/science/references/packages/packmol.md +80 -0
- package/src/skills/science/references/packages/palabos.md +80 -0
- package/src/skills/science/references/packages/parflow.md +80 -0
- package/src/skills/science/references/packages/pennylane.md +88 -0
- package/src/skills/science/references/packages/perceval.md +73 -0
- package/src/skills/science/references/packages/phono3py.md +73 -0
- package/src/skills/science/references/packages/phonopy.md +73 -0
- package/src/skills/science/references/packages/photutils.md +88 -0
- package/src/skills/science/references/packages/picongpu.md +80 -0
- package/src/skills/science/references/packages/plink-ng.md +88 -0
- package/src/skills/science/references/packages/precice.md +73 -0
- package/src/skills/science/references/packages/psc.md +80 -0
- package/src/skills/science/references/packages/psi4.md +88 -0
- package/src/skills/science/references/packages/pybinding.md +73 -0
- package/src/skills/science/references/packages/pyfr.md +80 -0
- package/src/skills/science/references/packages/pyhf.md +73 -0
- package/src/skills/science/references/packages/pyiron_base.md +80 -0
- package/src/skills/science/references/packages/pylcp.md +73 -0
- package/src/skills/science/references/packages/pylith.md +80 -0
- package/src/skills/science/references/packages/pynbody.md +88 -0
- package/src/skills/science/references/packages/pysam.md +88 -0
- package/src/skills/science/references/packages/pyscf.md +88 -0
- package/src/skills/science/references/packages/q-e.md +73 -0
- package/src/skills/science/references/packages/qibo.md +73 -0
- package/src/skills/science/references/packages/qiskit.md +73 -0
- package/src/skills/science/references/packages/quantica-jl.md +73 -0
- package/src/skills/science/references/packages/quantumoptics-jl.md +73 -0
- package/src/skills/science/references/packages/quimb.md +73 -0
- package/src/skills/science/references/packages/qulacs.md +73 -0
- package/src/skills/science/references/packages/qutip.md +73 -0
- package/src/skills/science/references/packages/rdkit.md +88 -0
- package/src/skills/science/references/packages/rmg-py.md +73 -0
- package/src/skills/science/references/packages/root.md +73 -0
- package/src/skills/science/references/packages/scanpy.md +88 -0
- package/src/skills/science/references/packages/scikit-allel.md +88 -0
- package/src/skills/science/references/packages/scikit-bio.md +88 -0
- package/src/skills/science/references/packages/scqubits.md +73 -0
- package/src/skills/science/references/packages/scuff-em.md +80 -0
- package/src/skills/science/references/packages/scvi-tools.md +73 -0
- package/src/skills/science/references/packages/seissol.md +73 -0
- package/src/skills/science/references/packages/sfepy.md +80 -0
- package/src/skills/science/references/packages/sisl.md +73 -0
- package/src/skills/science/references/packages/smilei.md +80 -0
- package/src/skills/science/references/packages/snakemake.md +88 -0
- package/src/skills/science/references/packages/specfem3d-globe.md +80 -0
- package/src/skills/science/references/packages/specutils.md +88 -0
- package/src/skills/science/references/packages/spglib.md +80 -0
- package/src/skills/science/references/packages/squidpy.md +88 -0
- package/src/skills/science/references/packages/starry.md +88 -0
- package/src/skills/science/references/packages/strawberryfields.md +73 -0
- package/src/skills/science/references/packages/su2.md +80 -0
- package/src/skills/science/references/packages/sunny-jl.md +73 -0
- package/src/skills/science/references/packages/sw4.md +73 -0
- package/src/skills/science/references/packages/swift.md +88 -0
- package/src/skills/science/references/packages/tdnegf.md +73 -0
- package/src/skills/science/references/packages/tenpy.md +73 -0
- package/src/skills/science/references/packages/thermo.md +73 -0
- package/src/skills/science/references/packages/tkwant.md +73 -0
- package/src/skills/science/references/packages/tvb-root.md +73 -0
- package/src/skills/science/references/packages/uproot5.md +73 -0
- package/src/skills/science/references/packages/vampire.md +80 -0
- package/src/skills/science/references/packages/wannier_tools.md +73 -0
- package/src/skills/science/references/packages/warpx.md +80 -0
- package/src/skills/science/references/packages/wrf.md +73 -0
- package/src/skills/science/references/packages/xtb.md +88 -0
- package/src/skills/science/references/packages/yt.md +73 -0
- package/src/skills/science/references/science-task-brief-template.md +71 -0
- package/src/skills/scout/SKILL.md +83 -425
- package/src/skills/scout/references/literature-scout-template.md +5 -24
- package/src/skills/scout/references/operational-guidance.md +191 -0
- package/src/skills/scout/references/paper-triage-playbook.md +11 -35
- package/src/skills/write/SKILL.md +744 -1246
- package/src/skills/write/references/experiments_analysis_patterns.md +129 -0
- package/src/skills/write/references/oral_package_patterns.md +252 -0
- package/src/skills/write/references/oral_writing_principles.md +291 -0
- package/src/skills/write/references/section_rewrite_checklist.md +234 -0
- package/src/tui/dist/app/AppContainer.js +1314 -27
- package/src/tui/dist/components/Composer.js +26 -1
- package/src/tui/dist/components/ConfigScreen.js +2 -1
- package/src/tui/dist/components/InputPrompt.js +25 -9
- package/src/tui/dist/components/MainContent.js +18 -3
- package/src/tui/dist/components/QuestScreen.js +3 -2
- package/src/tui/dist/components/UtilityScreen.js +37 -0
- package/src/tui/dist/hooks/useSafeInput.js +10 -0
- package/src/tui/dist/index.js +13 -1
- package/src/tui/dist/layouts/DefaultAppLayout.js +11 -8
- package/src/tui/dist/lib/api.js +89 -1
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/{AnalysisPlugin-BCKAfjba.js → AnalysisPlugin-CA94NGmI.js} +1 -1
- package/src/ui/dist/assets/CliPlugin-DHBzphZU.js +79 -0
- package/src/ui/dist/assets/CodeEditorPlugin-BOFwD2rn.js +2 -0
- package/src/ui/dist/assets/{CodeViewerPlugin-CbaFRrUU.js → CodeViewerPlugin-CqDpgjik.js} +4 -4
- package/src/ui/dist/assets/{DocViewerPlugin-DAjLVeQD.js → DocViewerPlugin-UDBgt8-4.js} +3 -3
- package/src/ui/dist/assets/GitCommitViewerPlugin-BmHtZ0bZ.js +6 -0
- package/src/ui/dist/assets/{GitDiffViewerPlugin-CQACjoAA.js → GitDiffViewerPlugin-CAxjNorQ.js} +2 -2
- package/src/ui/dist/assets/{GitSnapshotViewer-0r4nLPke.js → GitSnapshotViewer-CweA6VON.js} +2 -2
- package/src/ui/dist/assets/{ImageViewerPlugin-nBOmI2v_.js → ImageViewerPlugin-C8wHGvGN.js} +5 -5
- package/src/ui/dist/assets/LabPlugin-COyyLUol.js +32 -0
- package/src/ui/dist/assets/{LatexPlugin-ZwtV8pIp.js → LatexPlugin-BQjAaA5J.js} +4 -4
- package/src/ui/dist/assets/{MarkdownViewerPlugin-DKqVfKyW.js → MarkdownViewerPlugin-Dy1NE2dI.js} +3 -3
- package/src/ui/dist/assets/{MarketplacePlugin-BwxStZ9D.js → MarketplacePlugin-DMIZtEJ2.js} +2 -2
- package/src/ui/dist/assets/NotebookEditor-CFHMq_Qt.js +91 -0
- package/src/ui/dist/assets/{NotebookEditor-DB9N_T9q.js → NotebookEditor-WFyd8Ybt.js} +3 -3
- package/src/ui/dist/assets/{PdfLoader-eWBONbQP.js → PdfLoader-CLE5u5TS.js} +3 -3
- package/src/ui/dist/assets/{PdfMarkdownPlugin-D22YOZL3.js → PdfMarkdownPlugin-_iNK_H83.js} +1 -1
- package/src/ui/dist/assets/PdfViewerPlugin-DgWsbInT.js +22 -0
- package/src/ui/dist/assets/SearchPlugin-DrZmn5iw.js +11 -0
- package/src/ui/dist/assets/{TextViewerPlugin-C5xqeeUH.js → TextViewerPlugin-D1-T3aC7.js} +4 -4
- package/src/ui/dist/assets/branding/runner-claude.svg +107 -0
- package/src/ui/dist/assets/branding/runner-codex.svg +10 -0
- package/src/ui/dist/assets/branding/runner-kimi.svg +14 -0
- package/src/ui/dist/assets/branding/runner-opencode.svg +7 -0
- package/src/ui/dist/assets/cli-store-CoZ-x5Ip.js +1 -0
- package/src/ui/dist/assets/{code-WlFHE7z_.js → code-DbsmSd3Y.js} +1 -1
- package/src/ui/dist/assets/file-diff-panel-DsvyRz47.js +1 -0
- package/src/ui/dist/assets/{wrap-text-BC-Hltpd.js → file-jump-queue-DeQBikaw.js} +3 -3
- package/src/ui/dist/assets/{file-socket-CfQPKQKj.js → file-socket-DA5XIx88.js} +1 -1
- package/src/ui/dist/assets/fonts/ds-fonts.css +50 -4
- package/src/ui/dist/assets/images/deepxiv/register-guide.png +0 -0
- package/src/ui/dist/assets/index-39vY9LmZ.js +1 -0
- package/src/ui/dist/assets/{index-CwNu1aH4.js → index-BsO46tJA.js} +1 -1
- package/src/ui/dist/assets/index-CHzJ2xtB.js +3530 -0
- package/src/ui/dist/assets/index-DH-zxoZ3.css +33 -0
- package/src/ui/dist/assets/{plugin-notebook-HbW2K-1c.js → plugin-notebook-JRhysCqj.js} +2 -2
- package/src/ui/dist/assets/{project-sync-C9IdzdZW.js → project-sync-DPmWKmKD.js} +1 -1
- package/src/ui/dist/assets/{zoom-out-E_gaeAxL.js → zoom-out-DAukFWen.js} +3 -3
- package/src/ui/dist/index.html +3 -3
- package/src/skills/analysis-campaign/references/artifact-orchestration.md +0 -58
- package/src/skills/baseline/references/memory-playbook.md +0 -40
- package/src/skills/baseline/references/publishable-baseline-package.md +0 -30
- package/src/skills/write/references/outline-evidence-contract-example.md +0 -107
- package/src/skills/write/references/paper-experiment-matrix-template.md +0 -131
- package/src/skills/write/references/paper-section-playbook.md +0 -64
- package/src/skills/write/references/reviewer-first-writing.md +0 -64
- package/src/skills/write/references/revision-checklist.md +0 -70
- package/src/skills/write/references/section-contracts.md +0 -82
- package/src/skills/write/references/sentence-level-proofing.md +0 -49
- package/src/ui/dist/assets/AiManusChatView-Bv-Z8YpU.js +0 -204
- package/src/ui/dist/assets/CliPlugin-BCKcpc35.js +0 -109
- package/src/ui/dist/assets/CodeEditorPlugin-DbOfSJ8K.js +0 -2
- package/src/ui/dist/assets/GitCommitViewerPlugin-CIUqbUDO.js +0 -1
- package/src/ui/dist/assets/LabCopilotPanel-BHxOxF4z.js +0 -14
- package/src/ui/dist/assets/LabPlugin-BKoZGs95.js +0 -22
- package/src/ui/dist/assets/NotebookEditor-BEQhaQbt.js +0 -81
- package/src/ui/dist/assets/PdfViewerPlugin-c-RK9DLM.js +0 -17
- package/src/ui/dist/assets/SearchPlugin-CxF9ytAx.js +0 -16
- package/src/ui/dist/assets/VNCViewer-BoLGLnHz.js +0 -11
- package/src/ui/dist/assets/bot-DREQOxzP.js +0 -6
- package/src/ui/dist/assets/chevron-up-C9Qpx4DE.js +0 -6
- package/src/ui/dist/assets/file-content-BZMz3RYp.js +0 -1
- package/src/ui/dist/assets/file-diff-panel-CQhw0jS2.js +0 -1
- package/src/ui/dist/assets/file-jump-queue-DA-SdG__.js +0 -1
- package/src/ui/dist/assets/git-commit-horizontal-DxZ8DCZh.js +0 -6
- package/src/ui/dist/assets/image-Bgl4VIyx.js +0 -6
- package/src/ui/dist/assets/index-BpV6lusQ.css +0 -33
- package/src/ui/dist/assets/index-CBNVuWcP.js +0 -2496
- package/src/ui/dist/assets/index-DrUnlf6K.js +0 -1
- package/src/ui/dist/assets/index-NW-h8VzN.js +0 -1
- package/src/ui/dist/assets/pdf-effect-queue-J8OnM0jE.js +0 -6
- package/src/ui/dist/assets/popover-CLc0pPP8.js +0 -1
- package/src/ui/dist/assets/select-Cs2PmzwL.js +0 -11
- package/src/ui/dist/assets/sigma-ClKcHAXm.js +0 -6
- package/src/ui/dist/assets/trash-DwpbFr3w.js +0 -11
- package/src/ui/dist/assets/useCliAccess-NQ8m0Let.js +0 -1
- package/src/ui/dist/assets/useFileDiffOverlay-FuhcnKiw.js +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CHzJ2xtB.js","assets/plugin-monaco-C8UgLomw.js","assets/plugin-terminal-MXFIPun8.js","assets/plugin-notebook-JRhysCqj.js","assets/index-DH-zxoZ3.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as gt,u as ne,j as n,a0 as Ln,I as Hn,b as M,f as $n,S as Bn,X as Zt,g as Un,h as Vn,D as qn,o as ce,aW as Jt,a5 as Qn,be as ot,bf as zn,a6 as pe,bg as ct,bh as lt,bi as dt,bj as ut,bk as ft,bl as Kn,aT as ht,bm as Yt,aa as Wn,bn as Gn,bo as Xn,i as Zn,J as Jn,a as rt,k as Yn,l as Ht,q as eo,n as to,c as no,K as $t,B as Bt,bp as oo,bq as ro,_ as Ut,A as so,br as io,z as en,T as ao,bs as co,bt as st,bu as lo}from"./index-CHzJ2xtB.js";import{r as c}from"./plugin-monaco-C8UgLomw.js";import{a as uo}from"./file-socket-DA5XIx88.js";import{Z as W,R as fo,g as mo,a as po,e as go,b as ho,c as bo,d as xo}from"./PdfLoader-CLE5u5TS.js";import{Z as yo,a as vo}from"./zoom-out-DAukFWen.js";import{S as tn}from"./index-BsO46tJA.js";import"./plugin-notebook-JRhysCqj.js";import"./plugin-terminal-MXFIPun8.js";import"./plugin-pdf-CR8hgQBV.js";/**
|
|
3
|
+
* @license lucide-react v0.511.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const wo=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],_o=gt("message-square",wo);/**
|
|
8
|
+
* @license lucide-react v0.511.0 - ISC
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the ISC license.
|
|
11
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/const ko=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],No=gt("panel-right",ko);/**
|
|
13
|
+
* @license lucide-react v0.511.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/const jo=[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]],nn=gt("sticky-note",jo),Vt=new Map,it=[],Xe=new Set,So=200;function Ro(e){const o=Vt.get(e);return!o||o.length===0?[]:(Vt.delete(e),o)}function Eo(e){return e?Xe.has(e):!1}function Io(e){if(!(!e||Xe.has(e))&&(Xe.add(e),it.push(e),it.length>So)){const o=it.shift();o&&Xe.delete(o)}}const Co=c.memo(function({scale:o,onScaleChange:r}){const{t:i}=ne("pdf_viewer"),m=()=>{const d=W.findIndex(v=>v>=o);d>0&&r(W[d-1])},h=()=>{const d=W.findIndex(v=>v>=o);d<W.length-1&&r(W[d+1])},s=d=>{r(parseFloat(d.target.value))};return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:m,disabled:o<=W[0],className:M("p-1.5 rounded hover:bg-muted transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:i("zoom_out"),children:n.jsx(yo,{className:"w-4 h-4"})}),n.jsx("select",{value:o,onChange:s,className:M("w-20 px-2 py-1 text-sm rounded","bg-muted/50 border border-border","focus:outline-none focus:ring-2 focus:ring-primary/50"),children:W.map(d=>n.jsxs("option",{value:d,children:[Math.round(d*100),"%"]},d))}),n.jsx("button",{onClick:h,disabled:o>=W[W.length-1],className:M("p-1.5 rounded hover:bg-muted transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:i("zoom_in"),children:n.jsx(vo,{className:"w-4 h-4"})})]})}),Ao=c.memo(function({currentPage:o,totalPages:r,onPageChange:i}){const{t:m}=ne("pdf_viewer"),[h,s]=c.useState(String(o)),d=c.useRef(null);c.useEffect(()=>{s(String(o))},[o]);const v=()=>{o>1&&i(o-1)},g=()=>{o<r&&i(o+1)},f=R=>{s(R.target.value)},x=()=>{const R=parseInt(h,10);!isNaN(R)&&R>=1&&R<=r?i(R):s(String(o))},j=R=>{R.key==="Enter"?(x(),d.current?.blur()):R.key==="Escape"&&(s(String(o)),d.current?.blur())};return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:v,disabled:o<=1,className:M("p-1.5 rounded hover:bg-muted transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:m("previous_page"),children:n.jsx(Un,{className:"w-4 h-4"})}),n.jsxs("div",{className:"flex items-center gap-1 text-sm whitespace-nowrap",children:[n.jsx("input",{ref:d,type:"text",value:h,onChange:f,onBlur:x,onKeyDown:j,className:M("w-12 px-2 py-1 text-center rounded","bg-muted/50 border border-border","focus:outline-none focus:ring-2 focus:ring-primary/50")}),n.jsxs("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground",children:["/ ",r]})]}),n.jsx("button",{onClick:g,disabled:o>=r,className:M("p-1.5 rounded hover:bg-muted transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:m("next_page"),children:n.jsx(Vn,{className:"w-4 h-4"})})]})}),To=c.memo(function({value:o,onChange:r,placeholder:i}){const{t:m}=ne("pdf_viewer"),h=c.useRef(null),s=()=>{r(""),h.current?.focus()};return n.jsxs("div",{className:"relative flex items-center",children:[n.jsx(Bn,{className:"absolute left-2 w-4 h-4 text-muted-foreground pointer-events-none"}),n.jsx("input",{ref:h,type:"text",value:o,onChange:d=>r(d.target.value),placeholder:i||m("search_placeholder"),className:M("w-48 pl-8 pr-8 py-1.5 text-sm rounded","bg-muted/50 border border-border","placeholder:text-muted-foreground/60","focus:outline-none focus:ring-2 focus:ring-primary/50")}),o&&n.jsx("button",{onClick:s,className:"absolute right-2 p-0.5 rounded hover:bg-muted/80 transition-colors",children:n.jsx(Zt,{className:"w-3 h-3 text-muted-foreground"})})]})});function qt(){return n.jsx("div",{className:"w-px h-6 bg-border mx-2"})}const Mo=c.memo(function({scale:o,onScaleChange:r,currentPage:i,totalPages:m,onPageChange:h,sidebarVisible:s,onSidebarToggle:d,searchQuery:v="",onSearchChange:g,onDownload:f,onInfo:x,infoDisabled:j=!1,markdownActive:R,onMarkdownToggle:P,markdownLabel:D,markdownTitle:S,reviewOpinionActive:C,onReviewOpinionToggle:k,reviewOpinionLabel:I,reviewOpinionTitle:u}){const{t:y}=ne("pdf_viewer"),a=!!R,p=typeof P=="function",_=D?.trim()||y("markdown"),A=S?.trim()||y("open_markdown"),E=!!C,b=typeof k=="function",H=I?.trim()||y("review_opinion"),U=u?.trim()||y("open_review_opinion"),F=typeof x=="function",G=!!(g||f||F);return n.jsxs("div",{className:M("flex flex-wrap items-center gap-3 px-4 py-2","bg-muted/30 border-b border-border"),children:[n.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[g?n.jsx(To,{value:v,onChange:g,placeholder:y("search_pdf_placeholder")}):null,f?n.jsx("button",{onClick:f,className:"p-1.5 rounded hover:bg-muted transition-colors",title:y("download_pdf"),children:n.jsx(Ln,{className:"w-4 h-4"})}):null,F?n.jsx("button",{onClick:x,disabled:j,className:M("p-1.5 rounded transition-colors","hover:bg-muted",j&&"opacity-50 cursor-not-allowed"),title:y("paper_info"),"aria-label":y("paper_info"),children:n.jsx(Hn,{className:"h-4 w-4"})}):null,G?n.jsx(qt,{}):null,n.jsx(Co,{scale:o,onScaleChange:r}),n.jsx(qt,{}),n.jsx(Ao,{currentPage:i,totalPages:m,onPageChange:h})]}),n.jsxs("div",{className:"ml-auto flex items-center justify-end gap-2",children:[p?n.jsxs("button",{type:"button",onClick:P,className:M("flex items-center gap-2 px-3 py-1.5 rounded-full border transition-colors text-sm","bg-background hover:bg-muted/60 border-border",a&&"bg-primary/10 text-primary border-primary/20"),title:A,children:[n.jsx($n,{className:"w-4 h-4"}),_]}):null,b?n.jsxs("button",{type:"button",onClick:k,className:M("flex items-center gap-2 px-3 py-1.5 rounded-full border transition-colors text-sm","bg-background hover:bg-muted/60 border-border",E&&"bg-primary/10 text-primary border-primary/20"),title:U,children:[n.jsx(_o,{className:"w-4 h-4"}),H]}):null,n.jsxs("button",{type:"button",onClick:d,className:M("flex items-center gap-2 px-3 py-1.5 rounded-full border transition-colors text-sm","bg-background hover:bg-muted/60 border-border",s&&"bg-primary/10 text-primary border-primary/20"),title:y(s?"hide_annotations":"show_annotations"),children:[n.jsx(No,{className:"w-4 h-4"}),y(s?"hide":"show")]})]})]})}),Qt={scale:1,fitMode:"custom",currentPage:1,totalPages:0,scrollTop:0,searchQuery:"",searchResults:[],currentSearchIndex:-1,sidebarVisible:!1,selectedAnnotationId:null},on=qn((e,o)=>({...Qt,setScale:r=>{const i=Math.max(W[0],Math.min(W[W.length-1],r));e({scale:i,fitMode:"custom"})},setFitMode:r=>{e({fitMode:r})},setCurrentPage:r=>{const{totalPages:i}=o(),m=Math.max(1,Math.min(r,i||1));e({currentPage:m})},setTotalPages:r=>{e({totalPages:r})},setScrollTop:r=>{e({scrollTop:r})},scrollToPage:r=>{const{totalPages:i,setCurrentPage:m}=o(),h=Math.max(1,Math.min(r,i||1));m(h)},setSearchQuery:r=>{e({searchQuery:r,currentSearchIndex:-1})},setSearchResults:r=>{e({searchResults:r,currentSearchIndex:r.length>0?0:-1})},nextSearchResult:()=>{const{searchResults:r,currentSearchIndex:i}=o();if(r.length===0)return;const m=(i+1)%r.length;e({currentSearchIndex:m})},prevSearchResult:()=>{const{searchResults:r,currentSearchIndex:i}=o();if(r.length===0)return;const m=i<=0?r.length-1:i-1;e({currentSearchIndex:m})},toggleSidebar:()=>{e(r=>({sidebarVisible:!r.sidebarVisible}))},selectAnnotation:r=>{e({selectedAnnotationId:r})},scrollToAnnotation:r=>{e({selectedAnnotationId:r})},reset:()=>{e(Qt)}}));function me(e){const o=e.position?{...e.position,boundingRect:{...e.position.boundingRect,width:e.position.boundingRect?.width??100,height:e.position.boundingRect?.height??100},rects:Array.isArray(e.position.rects)?e.position.rects.map(i=>({...i,width:i?.width??100,height:i?.height??100})):[]}:void 0,r=e.content;return{id:String(e.id),position:o,content:r,comment:String(e.comment??""),kind:e.kind==="question"||e.kind==="task"?e.kind:"note",color:String(e.color??"#F1E9D0"),tags:Array.isArray(e.tags)?e.tags.map(String):[],createdBy:String(e.created_by??e.createdBy??""),author:e.author?{id:String(e.author.id),handle:String(e.author.handle??"user"),color:String(e.author.color??"#F1E9D0")}:null,createdAt:String(e.created_at??e.createdAt??new Date().toISOString()),updatedAt:String(e.updated_at??e.updatedAt??new Date().toISOString()),fileId:String(e.file_id??e.fileId??""),projectId:String(e.project_id??e.projectId??"")}}function Do(e){return{file_id:e.fileId,position:e.position,content:e.content,comment:e.comment??"",kind:e.kind??"note",color:e.color,tags:e.tags??[]}}function Po(e){return{comment:e.comment,kind:e.kind,position:e.position,content:e.content,color:e.color,tags:e.tags}}const _e={list:e=>`/api/v1/annotations/file/${e}`,create:()=>"/api/v1/annotations/",get:e=>`/api/v1/annotations/${e}`,update:e=>`/api/v1/annotations/${e}`,delete:e=>`/api/v1/annotations/${e}`,search:e=>`/api/v1/annotations/project/${e}`},ze={async listAnnotations(e){const o=await ce.get(_e.list(e));return Array.isArray(o.data)?o.data.map(me):(o.data.items||[]).map(me)},async createAnnotation(e){const o=await ce.post(_e.create(),Do(e));return me(o.data)},async getAnnotation(e){const o=await ce.get(_e.get(e));return me(o.data)},async updateAnnotation(e,o){const r=await ce.patch(_e.update(e),Po(o));return me(r.data)},async deleteAnnotation(e){await ce.delete(_e.delete(e))},async searchAnnotations(e,o,r){const i=new URLSearchParams;o&&i.set("q",o),r?.color&&i.set("color",r.color),r?.tag&&i.set("tag",r.tag),r?.page&&i.set("page",String(r.page)),r?.limit&&i.set("limit",String(r.limit));const m=`${_e.search(e)}${i.toString()?`?${i.toString()}`:""}`,h=await ce.get(m);return Array.isArray(h.data)?h.data.map(me):(h.data.items||[]).map(me)}},le={all:["annotations"],lists:()=>[...le.all,"list"],list:e=>[...le.lists(),e],details:()=>[...le.all,"detail"],detail:e=>[...le.details(),e]};function Fo(e){const o=Jt(),r=le.list(e),{data:i=[],isLoading:m,error:h,refetch:s,isFetching:d}=Qn({queryKey:r,queryFn:()=>ze.listAnnotations(e),staleTime:30*1e3,enabled:!!e}),v=ot({mutationFn:u=>ze.createAnnotation(u),onSuccess:u=>{o.setQueryData(r,(y=[])=>[u,...y.filter(a=>a.id!==u.id)])},onSettled:()=>o.invalidateQueries({queryKey:r})}),g=ot({mutationFn:({id:u,updates:y})=>ze.updateAnnotation(u,y),onMutate:async({id:u,updates:y})=>{await o.cancelQueries({queryKey:r});const a=o.getQueryData(r);return o.setQueryData(r,(p=[])=>p.map(_=>_.id===u?{..._,...y,updatedAt:new Date().toISOString()}:_)),{previousAnnotations:a}},onError:(u,y,a)=>{a?.previousAnnotations&&o.setQueryData(r,a.previousAnnotations)},onSuccess:u=>{o.setQueryData(r,(y=[])=>y.map(a=>a.id===u.id?u:a))},onSettled:()=>{o.invalidateQueries({queryKey:r})}}),f=ot({mutationFn:u=>ze.deleteAnnotation(u),onMutate:async u=>{await o.cancelQueries({queryKey:r});const y=o.getQueryData(r);return o.setQueryData(r,(a=[])=>a.filter(p=>p.id!==u)),{previousAnnotations:y}},onError:(u,y,a)=>{a?.previousAnnotations&&o.setQueryData(r,a.previousAnnotations)},onSettled:()=>{o.invalidateQueries({queryKey:r})}});return{annotations:i,isLoading:m,isFetching:d,error:h,createAnnotation:async u=>v.mutateAsync(u),updateAnnotation:async(u,y)=>g.mutateAsync({id:u,updates:y}),deleteAnnotation:async u=>f.mutateAsync(u),refreshAnnotations:()=>s(),getAnnotationById:u=>i.find(y=>y.id===u),getAnnotationsByPage:u=>i.filter(y=>y.position.pageNumber===u),getAnnotationsByTag:u=>i.filter(y=>y.tags.includes(u)),getAnnotationsByColor:u=>i.filter(y=>y.color===u),getAllTags:()=>{const u=new Set;return i.forEach(y=>y.tags.forEach(a=>u.add(a))),Array.from(u).sort()},isCreating:v.isPending,isUpdating:g.isPending,isDeleting:f.isPending,createError:v.error,updateError:g.error,deleteError:f.error}}const Oo="_tip_14ms1_1",Lo="_tipNote_14ms1_38",Ho="_tipQuestion_14ms1_42",$o="_tipTask_14ms1_46",Ke={tip:Oo,tipNote:Lo,tipQuestion:Ho,tipTask:$o};function Bo({onConfirm:e,onCancel:o,onOpen:r,onUpdate:i,onAskCopilot:m,authorColor:h,authorHandle:s,showAuthorHandle:d,onToggleAuthorHandle:v}){const{t:g}=ne("pdf_viewer"),[f,x]=c.useState("note"),[j,R]=c.useState("");c.useEffect(()=>{r(),i?.()},[]),c.useEffect(()=>{i?.()},[f,i]);const P=c.useMemo(()=>{switch(f){case"question":return g("type_question");case"task":return g("type_task");default:return g("add_note_optional")}},[f,g]),D=()=>{e({text:j.trim(),emoji:f})};return n.jsxs(zn,{className:M("w-80 border border-border bg-popover text-popover-foreground shadow-soft-lg","backdrop-blur supports-[backdrop-filter]:bg-popover/95",Ke.tip,f==="note"&&Ke.tipNote,f==="question"&&Ke.tipQuestion,f==="task"&&Ke.tipTask),children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b",children:[n.jsx("div",{className:"flex items-center gap-2 text-sm font-medium",children:n.jsx("span",{className:"text-muted-foreground",children:g("add_annotation")})}),n.jsx(pe,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,"aria-label":g("close"),children:n.jsx(Zt,{className:"h-4 w-4"})})]}),n.jsxs("div",{className:"px-3 py-3 space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs(ct,{children:[n.jsx(lt,{asChild:!0,children:n.jsxs("button",{type:"button",className:"flex items-center gap-2 rounded-md px-2 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/40 transition-colors",title:s||g("author"),children:[n.jsx("span",{className:"h-2 w-2 rounded-full border border-border",style:{backgroundColor:h||"#F1E9D0"}}),d?n.jsx("span",{className:"text-[11px]",children:s||"user"}):n.jsx("span",{className:"text-[11px]",children:g("author")})]})}),n.jsxs(dt,{align:"start",children:[n.jsx(ut,{children:g("author")}),n.jsx(ft,{disabled:!0,children:s||"user"}),v?n.jsx(ft,{onSelect:S=>{S.preventDefault(),v()},children:g(d?"hide_name":"show_name")}):null]})]})}),n.jsx(Kn,{value:f,onValueChange:x,size:"sm",ariaLabel:g("type_label"),items:[{value:"note",label:g("type_note"),icon:n.jsx(nn,{className:"h-4 w-4"})},{value:"question",label:"Q",icon:n.jsx(ht,{className:"h-4 w-4"})},{value:"task",label:g("type_task"),icon:n.jsx(tn,{className:"h-4 w-4"})}],className:"w-full justify-between"}),n.jsx(Yt,{autoFocus:!0,value:j,onChange:S=>R(S.target.value),placeholder:P,className:"min-h-[92px] resize-none",onKeyDown:S=>{if(S.key==="Escape"){S.preventDefault(),o?.();return}(S.metaKey||S.ctrlKey)&&S.key==="Enter"&&(S.preventDefault(),D())}}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("p",{className:"text-xs text-muted-foreground",children:g("save_shortcut")}),n.jsxs("div",{className:"flex items-center gap-2",children:[m?n.jsx(pe,{type:"button",variant:"outline",onClick:m,className:"h-8",children:g("ask_copilot")}):null,n.jsx(pe,{type:"button",onClick:D,className:"h-8",children:g("save")})]})]})]})]})}const Uo="_highlight_dilkk_1",Vo="_parts_dilkk_12",qo="_part_dilkk_12",Qo="_partFocused_dilkk_30",zo="_scrolledTo_dilkk_38",Ko="_partNote_dilkk_77",Wo="_partQuestion_dilkk_82",Go="_partTask_dilkk_88",Xo="_hintChip_dilkk_94",Zo="_hintChipFocused_dilkk_139",Jo="_hintPrimaryLine_dilkk_146",Yo="_hintSecondaryLine_dilkk_159",K={highlight:Uo,parts:Vo,part:qo,partFocused:Qo,scrolledTo:zo,partNote:Ko,partQuestion:Wo,partTask:Go,hintChip:Xo,hintChipFocused:Zo,hintPrimaryLine:Jo,hintSecondaryLine:Yo};function er(e){return Math.max(0,Math.min(1,e))}function tr(e){const o=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;const r=Number.parseInt(o[1],16);return{r:r>>16&255,g:r>>8&255,b:r&255}}function nr(e,o){const r=tr(e),i=er(o);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${i})`:`rgba(241, 233, 208, ${i})`}function or({position:e,onClick:o,onMouseOver:r,onMouseOut:i,comment:m,color:h,isScrolledTo:s,hidden:d=!1,emphasized:v=!1,onHoverStart:g,onHoverEnd:f,showOverlayHint:x=!1,overlayHintText:j="View details",overlayHintTitle:R,overlayHintBorderColor:P,overlayHintTextColor:D,overlayHintBackgroundColor:S,overlayHintOffsetY:C=0,overlayHintTopPx:k,overlayHintLeftPx:I,overlayHintWidthPx:u,overlayHintPageHeightPx:y,onOverlayHintClick:a}){if(d)return null;const{rects:p}=e,_=String(j||"").trim()||"Annotation",[A,E]=_.split(`
|
|
18
|
+
`).filter(Boolean),b=m?.emoji==="question"||m?.emoji==="task"?m.emoji:"note",H=b==="question"?K.partQuestion:b==="task"?K.partTask:K.partNote,U=b==="question"?.1:b==="task"?.08:.14,F=p[0],G=F?Math.max(0,Number(F.top||0)+Number(F.height||0)*.5-9):0,se=88,X=typeof k=="number"&&Number.isFinite(k),Z=X?Math.max(0,k):Math.max(0,G+C),z=X||!(typeof y=="number"&&Number.isFinite(y))?Z:Math.max(0,Math.min(Z,y-se));return n.jsxs("div",{className:`Highlight ${K.highlight} ${s?K.scrolledTo:""}`,children:[n.jsx("div",{className:`Highlight__parts ${K.parts}`,children:p.map((J,ge)=>n.jsx("div",{onMouseOver:()=>{r?.(),g?.()},onMouseOut:()=>{i?.(),f?.()},onClick:o,"data-ds-highlight-target":"true",style:{...J,backgroundColor:nr(h||"#F1E9D0",U)},className:M("Highlight__part",K.part,H,v?K.partFocused:null)},ge))}),x&&F?n.jsxs("button",{type:"button","data-ds-overlay-hint":"true",onClick:J=>{if(J.preventDefault(),J.stopPropagation(),a){a();return}o?.()},onMouseEnter:()=>g?.(),onMouseLeave:()=>f?.(),className:M(K.hintChip,v?K.hintChipFocused:null),style:{top:z,...typeof I=="number"&&Number.isFinite(I)?{left:I}:{},...typeof u=="number"&&Number.isFinite(u)?{width:u,maxWidth:u}:{},...P?{borderColor:P}:{},...D?{color:D}:{},...S?{background:S}:{}},"aria-label":R||_,children:[n.jsx("div",{className:K.hintPrimaryLine,children:A||_}),E?n.jsx("div",{className:K.hintSecondaryLine,children:E}):null]}):null]})}const rr="_areaHighlight_7ldrr_1",sr="_part_7ldrr_8",ir="_scrolledTo_7ldrr_20",ar="_focused_7ldrr_28",We={areaHighlight:rr,part:sr,scrolledTo:ir,focused:ar};function cr({highlight:e,onChange:o,isScrolledTo:r,onSelect:i,hidden:m=!1,emphasized:h=!1,onHoverStart:s,onHoverEnd:d,...v}){return m?null:n.jsx("div",{className:`${We.areaHighlight} ${r?We.scrolledTo:""} ${h?We.focused:""}`,children:n.jsx(fo,{className:We.part,"data-ds-highlight-target":"true",onDragStop:(g,f)=>{const x={...e.position.boundingRect,top:f.y,left:f.x};o(x)},onResizeStop:(g,f,x,j,R)=>{const P={top:R.y,left:R.x,width:x.offsetWidth,height:x.offsetHeight,pageNumber:mo(x)?.number||-1};o(P)},position:{x:e.position.boundingRect.left,y:e.position.boundingRect.top},size:{width:e.position.boundingRect.width,height:e.position.boundingRect.height},onClick:g=>{g.stopPropagation(),g.preventDefault(),i?.()},onMouseEnter:()=>s?.(),onMouseLeave:()=>d?.(),...v})})}function te(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){const o=Number(e);if(Number.isFinite(o))return o}return null}function L(e){if(typeof e!="string")return null;const o=e.trim();return o.length>0?o:null}function lr(e){if(!e)return null;const o=e.trim().toLowerCase();return o?o==="evidence"?"suggestion":o==="issue"||o==="suggestion"||o==="verification"?o:o==="needs_verification"||o==="needs verification"||o==="verify"||o==="uncertain"?"verification":null:null}function Ge(e,o){if(!e||typeof e!="object")return null;const r=e,i=te(r.x1),m=te(r.y1),h=te(r.x2),s=te(r.y2);if(i===null||m===null||h===null||s===null)return null;const d=te(r.width),v=te(r.height),g=d&&d>0?d:100,f=v&&v>0?v:100,x=te(r.pageNumber),j=x&&x>0?Math.trunc(x):o;return{x1:Math.min(i,h),y1:Math.min(m,s),x2:Math.max(i,h),y2:Math.max(m,s),width:g,height:f,...j?{pageNumber:j}:{}}}function dr(e){const o=L(e.annotation_id)||L(e.annotationId)||L(e.id);if(!o)return null;const r=te(e.page_number)||te(e.pageNumber)||te(e.position?.pageNumber),i=r&&r>0?Math.trunc(r):null;if(!i)return null;const h=(Array.isArray(e.rects)?e.rects:[]).map(k=>Ge(k,i)).filter(k=>!!k),s=Ge(e.bounding_rect,i)||Ge(e.boundingRect,i)||Ge(e.position?.boundingRect,i)||null,d=h.length?h.reduce((k,I)=>({x1:Math.min(k.x1,I.x1),y1:Math.min(k.y1,I.y1),x2:Math.max(k.x2,I.x2),y2:Math.max(k.y2,I.y2),width:k.width||I.width||100,height:k.height||I.height||100,pageNumber:i}),{...h[0],pageNumber:i}):null,v=s||d;if(!v)return null;const g=L(e.color)||"#F1E9D0",f=lr(L(e.object_type)),x=L(e.severity),j=L(e.review_item_id),R=L(e.display_text)||L(e.content_text)||L(e.content?.text)||"",P=L(e.comment)||L(e.comment_data?.text)||R,D=L(e.summary)||L(e.content?.summary)||L(e.comment_data?.summary)||null,S=Array.isArray(e.tags)?e.tags.map(k=>L(k)).filter(k=>!!k):[],C=new Set(S.map(k=>k.toLowerCase()));return C.add("review_annotation"),f&&(f==="issue"||f==="suggestion"||f==="verification")&&C.add(`review_object:${f}`),x&&C.add(`severity:${x.toLowerCase()}`),j&&C.add(`review_item:${j}`),{id:o,position:{pageNumber:i,rects:h.length?h:[v],boundingRect:v},content:{text:R},comment:{text:P,emoji:"note"},color:g,tags:Array.from(C),previewSummary:D,author:null}}function Me(e){return e==="question"||e==="task"?e:"note"}const ur={note:{label:"Note",dotClass:"bg-amber-400",iconClass:"text-amber-600",Icon:nn},question:{label:"Q",dotClass:"bg-indigo-400",iconClass:"text-indigo-600",Icon:ht},task:{label:"Task",dotClass:"bg-emerald-400",iconClass:"text-emerald-600",Icon:tn}},fr={issue:{label:"Issue",dotClass:"bg-rose-500",iconClass:"text-rose-600",Icon:ao},suggestion:{label:"Suggestion",dotClass:"bg-emerald-500",iconClass:"text-emerald-600",Icon:en},verification:{label:"Needs Verification",dotClass:"bg-amber-500",iconClass:"text-amber-600",Icon:ht}};function mt(e){let o=!1;for(const r of e||[]){const i=String(r||"").trim().toLowerCase();if(i==="review_annotation"){o=!0;continue}if(i==="review_object:issue")return"issue";if(i==="review_object:suggestion")return"suggestion";if(i==="review_object:verification"||i==="review_object:needs_verification")return"verification";if(i==="review_object:evidence")return"suggestion"}if(!o)return null;for(const r of e||[]){const i=String(r||"").trim().toLowerCase();if(i==="ds_kind:question")return"issue";if(i==="ds_kind:note"||i==="ds_kind:task")return"suggestion"}return null}function pt(e){for(const o of e||[]){const r=String(o||"").trim().toLowerCase();if(r==="ds_kind:question")return"question";if(r==="ds_kind:task")return"task";if(r==="ds_kind:note")return"note"}return null}function rn(e){for(const o of e||[]){const r=String(o||"").trim();if(!r||!r.toLowerCase().startsWith("review_item:"))continue;const i=r.slice(12).trim();if(i)return i}return null}function sn(e){const o=Me(e.comment?.emoji||pt(e.tags)||void 0),r=mt(e.tags);return r?{kind:o,reviewObjectType:r,...fr[r]}:{kind:o,reviewObjectType:null,...ur[o]}}function mr(e,o){return o(e==="question"?"type_question":e==="task"?"type_task":"type_note")}function pr(e,o){return o(e==="issue"?"review_type_issue":e==="verification"?"review_type_verification":"review_type_suggestion")}function an(e,o){return e.reviewObjectType?pr(e.reviewObjectType,o):mr(e.kind,o)}function gr(e){return{borderColor:"rgba(140, 118, 72, 0.95)",textColor:"rgba(15, 15, 15, 0.96)",backgroundColor:"rgba(255, 255, 255, 0.98)"}}function cn(e,o){const r=String(e||"").normalize("NFKC").replace(/\uFFFD/g," ").replace(/\s+/g," ").trim();if(!r||o<=0)return"";const i=r.split(" ");return i.length<=o?r:`${i.slice(0,o).join(" ")}…`}const zt="__DS_ANNOTATION_MD_CODE_BLOCK__",Kt="__DS_ANNOTATION_MD_INLINE_CODE__",hr=/(^|\n)(```|~~~)[\s\S]*?\n\2[^\n]*($|\n)/g,br=/`[^`\n]*`/g,xr=/\\\[([\s\S]+?)\\\]/g,yr=/\\\((.+?)\\\)/g;function Wt(e,o,r){const i=[];return{text:e.replace(o,h=>{const s=i.length;return i.push(h),`${r}${s}__`}),segments:i}}function Gt(e,o,r){let i=e;return o.forEach((m,h)=>{i=i.replace(`${r}${h}__`,m)}),i}function vr(e){if(!e)return e;const{text:o,segments:r}=Wt(e,hr,zt),{text:i,segments:m}=Wt(o,br,Kt);let h=i;h=h.replace(xr,(d,v)=>{const g=String(v||"").trim();return g?`$$
|
|
19
|
+
${g}
|
|
20
|
+
$$`:""}),h=h.replace(yr,(d,v)=>{const g=String(v||"").trim();return g?`$${g}$`:""});const s=Gt(h,m,Kt);return Gt(s,r,zt)}const wr=[".md",".markdown",".mdx"];function _r(e){const o=e.toLowerCase();return wr.some(r=>o.endsWith(r))}function Xt(e){return String(e||"").replace(/[\u2010-\u2015]/g,"-").replace(/\s+/g," ").trim()}function kr(e,o){const r=Xt(e),i=Xt(o);if(!r||!i||i.length<12)return null;const m=r.indexOf(i);if(m>=0){const f=Math.max(0,m-160),x=Math.min(r.length,m+i.length+160);return r.slice(f,x).trim()}const h=i.split(" ").filter(Boolean).slice(0,8);if(h.length<3)return null;const s=h.map(f=>f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*?"),d=r.match(new RegExp(s,"i"));if(!d||typeof d.index!="number")return null;const v=Math.max(0,d.index-160),g=Math.min(r.length,d.index+d[0].length+160);return r.slice(v,g).trim()}function at(){const{t:e}=ne("pdf_viewer");return n.jsx("div",{className:"flex h-full items-center justify-center bg-muted/20",children:n.jsxs("div",{className:"flex flex-col items-center gap-3 text-muted-foreground",children:[n.jsx("div",{className:"h-8 w-8 rounded-full border-2 border-primary/60 border-t-transparent animate-spin"}),n.jsx("span",{className:"text-sm",children:e("loading_pdf")})]})})}function Nr({highlight:e,selected:o,followed:r,flash:i,onSelect:m,onDelete:h,onUpdateKind:s,onUpdateComment:d,readOnly:v,registerItemRef:g}){const{t:f}=ne("pdf_viewer"),x=sn(e),j=x.kind,R=an(x,f),D=rn(e.tags)||String(e.id||"").slice(0,8),S=D.length>10?`${D.slice(0,10)}…`:D,C=e.author?.color||e.color||"#F1E9D0",k=e.author?.handle||"user",I=e.tags?.some(b=>b.toLowerCase()==="ai"),u=e.content?.text?String(e.content.text).trim():e.content?.image?f("area_highlight"):"",y=e.content?.text?cn(u,20):u,a=c.useRef(null),[p,_]=c.useState(!1),[A,E]=c.useState(e.comment?.text||"");return c.useEffect(()=>{p||E(e.comment?.text||"")},[e.comment?.text,p]),c.useEffect(()=>{i&&a.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},[i]),c.useEffect(()=>{o&&a.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},[o]),n.jsxs("div",{ref:b=>{a.current=b,g?.(e.id,b)},className:M("group relative p-3 rounded-lg border transition-all cursor-pointer",o?"border-primary bg-primary/5":r?"border-border bg-muted/30 hover:bg-muted/45":"border-border/60 hover:bg-muted/40",i?"ring-2 ring-primary/30 bg-primary/10 shadow-soft-card":null),onClick:m,children:[n.jsx("span",{className:M("absolute left-2 top-2 h-2 w-2 rounded-full",x.dotClass),"aria-hidden":!0}),n.jsxs(ct,{children:[n.jsx(lt,{asChild:!0,children:n.jsx("button",{type:"button",className:"absolute right-2 top-2 h-5 w-5 rounded-md border border-border bg-background/70 backdrop-blur flex items-center justify-center shadow-soft-sm",onClick:b=>b.stopPropagation(),title:k,children:n.jsx("span",{className:"h-2.5 w-2.5 rounded-full border border-border",style:{backgroundColor:C}})})}),n.jsxs(dt,{align:"end",children:[n.jsx(ut,{children:f("author")}),n.jsx(ft,{disabled:!0,children:k})]})]}),n.jsxs("div",{className:"flex items-start gap-3",children:[v?n.jsx("div",{className:M("mt-0.5 h-8 w-8 rounded-lg border border-border bg-background","flex items-center justify-center flex-shrink-0 shadow-soft-sm"),title:f("type_label"),children:n.jsx(x.Icon,{className:M("h-4 w-4",x.iconClass)})}):n.jsxs(ct,{children:[n.jsx(lt,{asChild:!0,children:n.jsx("button",{type:"button",className:M("mt-0.5 h-8 w-8 rounded-lg border border-border bg-background","flex items-center justify-center flex-shrink-0 shadow-soft-sm"),title:f("change_type"),onClick:b=>b.stopPropagation(),children:n.jsx(x.Icon,{className:M("h-4 w-4",x.iconClass)})})}),n.jsxs(dt,{align:"start",children:[n.jsx(ut,{children:f("type_label")}),n.jsxs(co,{value:j,onValueChange:b=>s(Me(b)),children:[n.jsx(st,{value:"note",children:f("type_note")}),n.jsx(st,{value:"question",children:f("type_question")}),n.jsx(st,{value:"task",children:f("type_task")})]})]})]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[11px] font-medium text-foreground/90",children:R}),I?n.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border bg-muted/40 px-2 py-0.5 text-[9px] uppercase tracking-wide text-foreground/70",children:[n.jsx(en,{className:"h-3 w-3"}),"AI"]}):null,typeof e.position?.pageNumber=="number"?n.jsx("span",{className:"text-[9px] text-muted-foreground/70",children:f("page",{page:e.position.pageNumber})}):null,S?n.jsxs("span",{className:"text-[9px] text-muted-foreground/60",title:`ID ${D}`,children:["ID ",S]}):null]}),p?n.jsx(Yt,{value:A,onChange:b=>E(b.target.value),onClick:b=>b.stopPropagation(),className:"mt-2 min-h-[84px] text-[11px] leading-5",placeholder:f("add_comment_placeholder")}):n.jsx("div",{className:"mt-1 rounded-md border border-border/60 bg-background/70 px-2.5 py-2",children:e.comment?.text?.trim()?n.jsx(lo,{content:vr(e.comment.text),rewriteDocsImages:!1,rewriteDocsLinks:!1,className:M("review-annotation-markdown text-[11px] leading-5 text-foreground/85 break-words","[&_p]:my-1 [&_ul]:my-1 [&_ol]:my-1 [&_li]:my-0.5","[&_pre]:my-1 [&_pre]:max-w-full [&_pre]:overflow-x-auto","[&_pre]:whitespace-pre-wrap [&_code]:break-words","[&_.katex]:[word-break:normal] [&_.katex]:[overflow-wrap:normal]","[&_.katex]:whitespace-nowrap [&_.katex-display]:whitespace-normal","[&_.katex-display]:my-1 [&_.katex-display]:overflow-x-auto","[&_.katex-display]:overflow-y-hidden")}):n.jsx("p",{className:"review-annotation-text-fallback text-[11px] text-foreground/80 whitespace-pre-wrap break-words",children:f("no_comment_yet")})}),n.jsxs("div",{className:"mt-2 flex items-start justify-between gap-2",children:[n.jsx("p",{className:"review-annotation-text-fallback text-[9px] text-muted-foreground/60 whitespace-pre-wrap break-words",title:u||void 0,children:y}),v?n.jsx("div",{className:"text-[9px] text-muted-foreground",children:f("read_only")}):n.jsxs("div",{className:"flex items-center gap-1",children:[p?n.jsxs(n.Fragment,{children:[n.jsx(pe,{type:"button",variant:"secondary",size:"sm",className:"h-7 px-2 text-[10px]",onClick:b=>{b.stopPropagation(),_(!1),E(e.comment?.text||"")},children:"Cancel"}),n.jsx(pe,{type:"button",size:"sm",className:"h-7 px-2 text-[10px]",onClick:b=>{b.stopPropagation(),d(A.trim()),_(!1)},children:"Save"})]}):n.jsx(pe,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2 text-[10px]",onClick:b=>{b.stopPropagation(),_(!0)},children:"Edit"}),n.jsx(pe,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2 text-[10px] text-muted-foreground hover:text-foreground",onClick:b=>{b.stopPropagation(),h()},children:f("delete")})]})]})]})]})]})}function jr({highlights:e,selectedId:o,currentPage:r,flashId:i,onSelect:m,onDelete:h,onUpdateKind:s,onUpdateComment:d,showOverlayHints:v,readOnly:g}){const{t:f}=ne("pdf_viewer"),[x,j]=c.useState("all"),R=c.useRef(new Map),P=c.useRef(o),D=c.useRef(!1),S=c.useCallback((a,p)=>{const _=Number(a.position?.pageNumber||0),A=Number(p.position?.pageNumber||0),E=Number.isFinite(_)&&_>0?_:Number.MAX_SAFE_INTEGER,b=Number.isFinite(A)&&A>0?A:Number.MAX_SAFE_INTEGER;if(E!==b)return E-b;const H=Number(a.position?.boundingRect?.y1??a.position?.rects?.[0]?.y1??Number.MAX_SAFE_INTEGER),U=Number(p.position?.boundingRect?.y1??p.position?.rects?.[0]?.y1??Number.MAX_SAFE_INTEGER),F=Number.isFinite(H)?H:Number.MAX_SAFE_INTEGER,G=Number.isFinite(U)?U:Number.MAX_SAFE_INTEGER;if(F!==G)return F-G;const se=Number(a.position?.boundingRect?.x1??a.position?.rects?.[0]?.x1??Number.MAX_SAFE_INTEGER),X=Number(p.position?.boundingRect?.x1??p.position?.rects?.[0]?.x1??Number.MAX_SAFE_INTEGER),Z=Number.isFinite(se)?se:Number.MAX_SAFE_INTEGER,z=Number.isFinite(X)?X:Number.MAX_SAFE_INTEGER;return Z!==z?Z-z:a.id.localeCompare(p.id)},[]),C=c.useMemo(()=>{const a={all:e.length,issue:0,suggestion:0,verification:0,note:0,question:0,task:0};for(const p of e){const _=mt(p.tags);if(_){a[_]+=1;continue}const A=Me(p.comment?.emoji||pt(p.tags)||void 0);a[A]+=1}return a},[e]),k=c.useMemo(()=>{const a=[{key:"all",label:f("filter_all"),count:C.all}],p=[{key:"issue",label:f("review_type_issue"),count:C.issue},{key:"suggestion",label:f("review_type_suggestion"),count:C.suggestion},{key:"verification",label:f("review_type_verification"),count:C.verification}],_=[{key:"note",label:f("type_note"),count:C.note},{key:"question",label:f("type_question"),count:C.question},{key:"task",label:f("type_task"),count:C.task}],A=p.some(b=>b.count>0),E=_.some(b=>b.count>0);return A&&a.push(...p.filter(b=>b.count>0)),E&&a.push(..._.filter(b=>b.count>0)),a},[C,f]);c.useEffect(()=>{x!=="all"&&(k.some(a=>a.key===x)||j("all"))},[k,x]),c.useEffect(()=>{P.current&&!o&&(D.current=!0),P.current=o},[o]);const I=c.useMemo(()=>[...e.filter(p=>{if(x==="all")return!0;const _=mt(p.tags);return x==="issue"||x==="suggestion"||x==="verification"?_===x:_?!1:Me(p.comment?.emoji||pt(p.tags)||void 0)===x})].sort(S),[e,x,S]),u=c.useMemo(()=>{if(o||I.length===0)return null;const a=I.map(E=>({id:E.id,page:Number(E.position?.pageNumber||0)})).filter(E=>Number.isFinite(E.page)&&E.page>0);if(a.length===0)return null;const p=a.find(E=>E.page===r);if(p)return p.id;let _=a[0],A=Math.abs(a[0].page-r);for(let E=1;E<a.length;E+=1){const b=a[E],H=Math.abs(b.page-r);if(H<A){_=b,A=H;continue}H===A&&b.page<_.page&&(_=b)}return _.id},[r,I,o]);c.useEffect(()=>{if(!u)return;if(D.current){D.current=!1;return}const a=R.current.get(u);a&&a.scrollIntoView({block:"nearest",behavior:"smooth"})},[u]);const y=c.useCallback((a,p)=>{if(a){if(!p){R.current.delete(a);return}R.current.set(a,p)}},[]);return e.length===0?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[n.jsx("div",{className:"text-4xl mb-2 opacity-30",children:"📝"}),n.jsx("p",{className:"text-xs text-muted-foreground",children:f("no_annotations")}),n.jsx("p",{className:"text-[11px] text-muted-foreground/60 mt-1",children:f(g?"read_only_annotation_desc":"select_text_to_highlight")})]}):n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"p-3 border-b space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("h3",{className:"font-medium text-xs",children:[f("annotations")," (",I.length,"/",e.length,")"]}),n.jsx("span",{className:M("inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium tracking-wide",v?"border-black/10 bg-white text-foreground/70":"border-border bg-background text-muted-foreground"),title:f("all_markers_shown"),children:f("markers_on")})]}),n.jsx("div",{className:"flex items-center gap-1",children:k.map(a=>{const p=x===a.key;return n.jsxs("button",{type:"button",onClick:()=>j(a.key),className:M("inline-flex min-w-0 flex-1 items-center justify-center rounded-md border px-2 py-1 text-[10px] transition-colors",p?"border-primary/40 bg-primary/10 text-foreground":"border-border/70 bg-background text-muted-foreground hover:text-foreground"),title:f("filter_annotations_title",{label:a.label}),children:[a.label," (",a.count,")"]},a.key)})})]}),I.length===0?n.jsx("div",{className:"flex flex-1 items-center justify-center px-4 text-center text-xs text-muted-foreground",children:"No annotations for current filter."}):n.jsx("div",{className:"flex-1 overflow-auto p-2 space-y-2",children:I.map(a=>n.jsx(Nr,{highlight:a,selected:o===a.id,followed:!!(u&&u===a.id),flash:!!(i&&i===a.id),onSelect:()=>m(a.id),onDelete:()=>h(a.id),onUpdateKind:p=>s(a.id,p),onUpdateComment:p=>d(a.id,p),readOnly:g,registerItemRef:y},a.id))})]})}function Sr({pdfDocument:e,scale:o,highlights:r,selectedId:i,onSelect:m,onAdd:h,onUpdate:s,onScrollRef:d,onPageChange:v,pdfHighlighterRef:g,authorColor:f,authorHandle:x,showOverlayHints:j,tipPlacementMode:R,readOnly:P,onAskCopilot:D}){const{t:S}=ne("pdf_viewer"),{setTotalPages:C}=on(),[k,I]=c.useState(null),u=o===1?"page-width":`page-width:${o}`,y=k||i||null;return c.useEffect(()=>{C(e.numPages)},[e.numPages,C]),n.jsx(xo,{ref:g,pdfDocument:e,pdfScaleValue:u,tipPlacementMode:R,onPageChange:v,enableAreaSelection:a=>P?!1:a.altKey,onScrollChange:()=>{},scrollRef:d,highlights:r,onSelectionFinished:(a,p,_,A)=>P?null:n.jsx(Bo,{onOpen:A,onCancel:_,onConfirm:E=>{h({content:p,position:a,comment:E}),_()},onAskCopilot:()=>{D?.(p,a),_()},authorColor:f,authorHandle:x,showAuthorHandle:!1}),highlightTransform:(a,p,_,A,E,b,H,U)=>{const F=!!a.__dsGhost,G=a.__dsGhostOpacity??1,se=a.__dsGhostMode,X=!a.content?.image,Z=sn({comment:a.comment,tags:a.tags}),z=String(an(Z,S)||S("annotation_label")),J=rn(a.tags),ge=L(a.previewSummary),he=J?`#${J} · ${z}`:`P${a.position.pageNumber} · ${z}`,ie=ge||cn(a.comment?.text||"",8),ke=J?ie?`${he}
|
|
21
|
+
${ie}`:he:ie?`${he}
|
|
22
|
+
${ie}`:he,Ne=`${z} · ${S("page",{page:a.position.pageNumber})} · ${S("open_details_hint")}`,de=gr(),be=y===a.id,je=!!(y&&!be),Se=X?n.jsx(or,{isScrolledTo:H||a.id===i,position:a.position,comment:a.comment,color:a.color,hidden:je,emphasized:be,onHoverStart:F?void 0:()=>I(a.id),onHoverEnd:F?void 0:()=>I(Y=>Y===a.id?null:Y),onClick:F?void 0:()=>m(a.id,{allowToggleClose:!1,skipAutoScroll:!0}),showOverlayHint:!F&&j&&!je,overlayHintText:ke,overlayHintTitle:Ne,overlayHintBorderColor:de.borderColor,overlayHintTextColor:de.textColor,overlayHintBackgroundColor:de.backgroundColor,overlayHintTopPx:U.overlayHintTopById?.[a.id],overlayHintLeftPx:U.overlayHintLeftPx,overlayHintWidthPx:U.overlayHintWidthPx,overlayHintPageHeightPx:U.height,onOverlayHintClick:F?void 0:()=>{m(a.id,{skipAutoScroll:!0})}}):n.jsx(cr,{isScrolledTo:H||a.id===i,highlight:a,hidden:je,emphasized:be,onHoverStart:F?void 0:()=>I(a.id),onHoverEnd:F?void 0:()=>I(Y=>Y===a.id?null:Y),onSelect:F?void 0:()=>m(a.id,{allowToggleClose:!1,skipAutoScroll:!0}),onChange:Y=>{P||s(a.id,{boundingRect:E(Y)},{image:b(Y)})}});return F?n.jsx("div",{className:M("pointer-events-none",se==="annotate"?"ds-pdf-ghost-annotate":"ds-pdf-ghost-guide"),style:{opacity:G,transition:"opacity 0.8s ease"},children:Se},`ghost-${p}`):Se}})}function Or({context:e,tabId:o,setDirty:r,setTitle:i}){const{t:m}=ne("pdf_viewer"),h=e.resourceId??(typeof e.customData?.fileId=="string"?e.customData.fileId:null),s=h?String(h):"",d=Wn(s),v=typeof e.customData?.reviewRouteId=="string"?e.customData.reviewRouteId.trim():"",g=typeof e.customData?.rebuttalRouteId=="string"?e.customData.rebuttalRouteId.trim():"",f=v.length>0,x=g.length>0,j=f||x,P=(f?v:g).startsWith("shared-"),D=P?.8:1,S=x?P?"ds:rebuttal:pdf:annotation-sidebar-width:shared:v1":"ds:rebuttal:pdf:annotation-sidebar-width:v1":P?"ds:review:pdf:annotation-sidebar-width:shared:v1":"ds:review:pdf:annotation-sidebar-width:v4",C=Math.round(336*D),k=Math.round(816*D),I=Math.round(673*D),u=!!(typeof e.customData?.readOnlyMode=="boolean"&&e.customData.readOnlyMode),y=c.useMemo(()=>{if(!u)return[];const t=e.customData?.readOnlyAnnotations;return Array.isArray(t)?t.map(l=>dr(l)).filter(l=>!!l):[]},[e.customData?.readOnlyAnnotations,u]),a=c.useRef(!1),p=e.resourceName||"Untitled.pdf",_=typeof e.customData?.externalPdfUrl=="string"?e.customData.externalPdfUrl.trim():"",A=_.length>0,E=(ce.defaults.baseURL||"").replace(/\/$/,""),b=Gn(s),H=c.useMemo(()=>s&&b?Xn(s):null,[s,b]),U=c.useMemo(()=>(typeof e.customData?.projectId=="string"?e.customData.projectId.trim():"")||null,[e.customData]),[F,G]=c.useState(null),[se,X]=c.useState(!1),[Z,z]=c.useState(null),[J,ge]=c.useState(null),[he,ie]=c.useState(!1),[ke,Ne]=c.useState(null),de=A?_:d?F||"":b?J||"":s?`${E}/api/v1/files/${s}/content`:"https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf",be=typeof window<"u"?localStorage.getItem("ds_access_token"):null,je=be&&(A||!d&&!b&&s)?{Authorization:`Bearer ${be}`}:void 0,{scale:Se,setScale:Y,currentPage:De,setCurrentPage:ue,totalPages:ln,sidebarVisible:B,toggleSidebar:V,selectedAnnotationId:ae,selectAnnotation:oe}=on(),Pe=Zn(t=>t.updateTabPlugin),bt=Jn(t=>t.findNode),xt=rt(t=>t.updateTabState),yt=rt(t=>t.addReference),Ze=rt(t=>t.updateReference),Fe=typeof e.customData?.onOpenMarkdownView=="function"?e.customData.onOpenMarkdownView:null,vt=typeof e.customData?.onOpenReviewOpinionView=="function"?e.customData.onOpenReviewOpinionView:null,dn=!!(typeof e.customData?.reviewOpinionAvailable=="boolean"&&e.customData.reviewOpinionAvailable),un=(typeof e.customData?.reviewViewMode=="string"?e.customData.reviewViewMode:"")==="ai_review",fn=typeof e.customData?.reviewOpinionLabel=="string"?e.customData.reviewOpinionLabel:void 0,mn=typeof e.customData?.reviewOpinionTitle=="string"?e.customData.reviewOpinionTitle:void 0,Re=Jt(),{addToast:wt}=Yn(),Je=Ht(t=>t.items),pn=Ht(t=>t.errors),Oe=c.useMemo(()=>e.customData?.arxiv??null,[e.customData]),q=!!Oe||!!(s&&Je.some(t=>t.fileId===s)),gn=d||!s||u?"":s,{annotations:Le,createAnnotation:_t,updateAnnotation:xe,deleteAnnotation:kt}=Fo(gn),He=eo(t=>t.user),[fe,Nt]=c.useState(null),[hn,bn]=c.useState("#F1E9D0"),[xn,jt]=c.useState(!1),St=c.useRef({}),Ye=c.useRef({}),Rt=!0,[Et,et]=c.useState([]),Ee=c.useRef(new Map),Ie=c.useRef(null),[yn,It]=c.useState(null),[ye,vn]=c.useState(()=>{if(typeof window>"u")return I;const t=window.localStorage.getItem(S),l=t?Number(t):NaN;return Number.isFinite(l)?Math.max(C,Math.min(k,l)):I}),Ct=c.useRef(ye),Ce=c.useRef(null),At=c.useRef(B),Tt=c.useRef(V),tt=c.useRef(()=>{}),ve=c.useRef(null),Mt=c.useRef(null),we=c.useRef(!1),nt=_r(p);c.useEffect(()=>{Ct.current=ye},[ye]),c.useEffect(()=>{!j||typeof window>"u"||window.localStorage.setItem(S,String(ye))},[S,j,ye]);const Dt=c.useCallback(t=>{const l=typeof window<"u"?Math.max(C,Math.min(k,Math.floor(window.innerWidth*.75))):k;return Math.max(C,Math.min(l,t))},[k,C]),wn=c.useCallback(t=>{if(!j||t.button!==0)return;t.preventDefault(),t.stopPropagation();const l=t.clientX,N=Ct.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const w=O=>{const Q=l-O.clientX;vn(Dt(N+Q))},T=()=>{document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",T)},[Dt,j]),$=c.useMemo(()=>Oe||s&&Je.find(t=>t.fileId===s)||null,[Oe,Je,s]),_n=$?pn[$.arxivId]:void 0,kn=!!(s&&!d&&(!q||$?.overview?.trim()||$?.abstract?.trim())),Nn=m(q?"summary":"markdown"),jn=m(q?"open_summary":"open_markdown");c.useEffect(()=>{At.current=B},[B]),c.useEffect(()=>{Tt.current=V},[V]);const Sn=c.useCallback(async()=>{if(!$)return;const t=to($),l=await no(t);wt({type:l?"success":"error",title:m(l?"toast_bibtex_copied_title":"toast_copy_failed_title"),description:l?$.title||$.arxivId:m("try_again"),duration:1800})},[wt,$,m]),Rn=c.useCallback(()=>{$?.arxivId&&window.open(`https://arxiv.org/abs/${$.arxivId}`,"_blank","noopener,noreferrer")},[$]),Pt=c.useCallback(()=>{const t=String(e.resourcePath||"").trim();if(t.startsWith("/FILES"))return t;if(s){const l=bt(s);if(l?.path)return $t(l.path)}if(t)return $t(t)},[e.resourcePath,s,bt]),$e=c.useCallback(async()=>{if(!s||d||q)return null;const t=St.current[s];if(t)return t;const l=Ye.current[s];if(l)return l;const N=ce.get(`/api/v1/pdf/markdown/${s}`,{responseType:"text",transformResponse:[w=>w]}).then(w=>{const T=typeof w.data=="string"?w.data:String(w.data||"");return T?(St.current[s]=T,T):null}).finally(()=>{delete Ye.current[s]});return Ye.current[s]=N,N},[s,q,d]),Ft=c.useCallback(async(t,l)=>{if(!(!s||d||q))try{const N=await $e(),w=kr(N||"",l);Ze(t,{markdownExcerpt:w||void 0,excerptStatus:w?"ready":"error"})}catch{Ze(t,{excerptStatus:"error"})}},[s,q,d,$e,Ze]);c.useEffect(()=>{!s||d||q||$e().catch(()=>{})},[s,q,d,$e]);const En=c.useCallback((t,l)=>{const N=String(t?.text||"").trim();if(!N)return;const w=typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`pdf-ref-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,T=l.boundingRect?[{left:l.boundingRect.x1,top:l.boundingRect.y1,width:l.boundingRect.width,height:l.boundingRect.height,pageNumber:l.boundingRect.pageNumber}]:[];yt({id:w,kind:"pdf_text",tabId:o,fileId:s||void 0,resourceId:s||void 0,resourcePath:Pt(),resourceName:p,pageNumber:l.pageNumber,selectedText:N,markdownExcerpt:void 0,excerptStatus:s&&!d&&!q?"loading":"idle",rects:l.rects?.map(O=>({left:O.x1,top:O.y1,width:O.width,height:O.height,pageNumber:O.pageNumber}))||T,createdAt:new Date().toISOString()}),window.dispatchEvent(new CustomEvent("ds:copilot:focus",{detail:{focus:!0}})),s&&!d&&!q&&Ft(w,N)},[yt,Ft,s,p,q,d,Pt,o]);c.useEffect(()=>{nt&&Pe(o,Bt.NOTEBOOK,{...e,resourceId:s,resourceName:p,mimeType:e.mimeType??"text/markdown",customData:{...e.customData||{},docKind:"markdown"}})},[e,s,p,nt,o,Pe]),c.useEffect(()=>{i(p)},[p,i]),c.useEffect(()=>{r(!1)},[r]),c.useEffect(()=>{xt(o,{contentKind:"pdf",documentMode:"pdf",pageNumber:De,isReadOnly:u})},[De,u,o,xt]),c.useEffect(()=>{const t=U||H;if(t){Nt(t);return}!s||d||oo(s).then(l=>{l?.project_id&&Nt(String(l.project_id))}).catch(()=>{})},[s,A,d,U,H]),c.useEffect(()=>{if(!s||!d){G(null),X(!1),z(null);return}let t=!1,l=null;return X(!0),z(null),(async()=>{try{const{createFileObjectUrl:w}=await Ut(async()=>{const{createFileObjectUrl:T}=await import("./index-CHzJ2xtB.js").then(O=>O.d8);return{createFileObjectUrl:T}},__vite__mapDeps([0,1,2,3,4]));if(l=await w(s),t){URL.revokeObjectURL(l);return}G(l)}catch{t||z("Failed to load PDF from CLI server.")}finally{t||X(!1)}})(),()=>{t=!0,l&&URL.revokeObjectURL(l)}},[s,d]),c.useEffect(()=>{if(!s||!b||d){ge(null),ie(!1),Ne(null);return}let t=!1,l=null;return ie(!0),Ne(null),(async()=>{try{if(l=await io(s),t){URL.revokeObjectURL(l);return}ge(l)}catch{t||Ne("Failed to load PDF document.")}finally{t||ie(!1)}})(),()=>{t=!0,l&&URL.revokeObjectURL(l)}},[s,d,b]),c.useEffect(()=>{if(!fe)return;const t=He?.id;t&&ro(fe).then(l=>{const N=l.find(w=>w.user_id===t);N?.annotation_color&&bn(String(N.annotation_color))}).catch(()=>{})},[fe,He?.id]),c.useEffect(()=>{if(!fe||!s||d||u)return;const{socket:t,release:l}=uo();Mt.current={socket:t,release:l};const N=async()=>{if(!we.current&&t.connected)try{we.current=!0,await t.emitWithAck("file:join",{projectId:fe,fileId:s,clientVersion:"1.0.0"})}catch{we.current=!1}},w=()=>void N(),T=()=>{we.current=!1},O=Q=>{if(Q?.fileId&&String(Q.fileId)!==String(s))return;Re.invalidateQueries({queryKey:le.list(s)});const Qe=typeof Q?.annotationId=="string"&&Q.annotationId.trim()?Q.annotationId.trim():null;Qe&&(Ie.current=Qe,At.current||Tt.current?.())};return t.on("connect",w),t.on("disconnect",T),t.on("annotation:created",O),t.on("annotation:updated",O),t.on("annotation:deleted",O),t.connected&&N(),()=>{try{t.off("connect",w),t.off("disconnect",T),t.off("annotation:created",O),t.off("annotation:updated",O),t.off("annotation:deleted",O),we.current&&t.emit("file:leave",{projectId:fe,fileId:s})}finally{we.current=!1,Mt.current=null,l()}}},[fe,s,d,u]);const re=c.useMemo(()=>u?y:Le.map(t=>({id:t.id,position:t.position,content:t.content,comment:{text:t.comment||"",emoji:t.kind},color:t.color,author:t.author??null,tags:t.tags,previewSummary:typeof t.content?.summary=="string"&&String(t.content.summary||"").trim()||null})),[Le,u,y]),In=c.useMemo(()=>[...re,...Et],[re,Et]);c.useEffect(()=>{const t=Ie.current;if(!t)return;const l=re.find(N=>N.id===t);l&&(oe(l.id),ue(l.position.pageNumber),tt.current(l),Ie.current=null,It(l.id),Ce.current&&clearTimeout(Ce.current),Ce.current=setTimeout(()=>It(null),2200))},[re,oe,ue]),c.useEffect(()=>{const t=ve.current;return()=>{t?.setPinnedTipForHighlight(null),Ce.current&&clearTimeout(Ce.current)}},[]),c.useEffect(()=>{if(!u){a.current=!1;return}a.current||re.length!==0&&(a.current=!0,B||V())},[re.length,u,B,V]);const Ae=c.useCallback(t=>{ue(t),ve.current?.scrollToPage(t)},[ue]),Ot=c.useCallback(t=>{const l=`ai-ghost-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,N=t.rects.map(ee=>({...ee,width:ee.width??100,height:ee.height??100,pageNumber:ee.pageNumber??t.page})),w={...t.boundingRect,width:t.boundingRect.width??100,height:t.boundingRect.height??100,pageNumber:t.boundingRect.pageNumber??t.page},T={id:l,position:{boundingRect:w,rects:N,pageNumber:t.page},content:{text:t.text||""},comment:{text:"",emoji:"note"},color:t.color||"#3F5A6B",__dsGhost:!0,__dsGhostOpacity:1,__dsGhostMode:t.mode||"guide"};et(ee=>[...ee,T]);const O=t.durationMs??3e3,Q=setTimeout(()=>{et(ee=>ee.map(Te=>Te.id===l?{...Te,__dsGhostOpacity:0}:Te))},O),Qe=setTimeout(()=>{et(ee=>ee.filter(Te=>Te.id!==l)),Ee.current.delete(l),Ee.current.delete(`${l}:fade`)},O+800);Ee.current.set(l,Qe),Ee.current.set(`${l}:fade`,Q)},[]);c.useEffect(()=>{const t=Ee.current;return()=>{t.forEach(l=>clearTimeout(l)),t.clear()}},[]);const Be=c.useCallback(t=>{const l=typeof t?.__dsEffectId=="string"?t.__dsEffectId:null;return l?Eo(l)?!0:(Io(l),!1):!1},[]),Ue=c.useCallback(t=>{!t||t.fileId!==s||Be(t)||(Re.invalidateQueries({queryKey:le.list(s)}),t.page&&Ae(t.page),t.rects&&t.boundingRect&&Ot({page:t.page||1,rects:t.rects,boundingRect:t.boundingRect,color:t.color,mode:t.mode||"guide",durationMs:t.durationMs,text:t.text}),t.annotationId&&(Ie.current=t.annotationId),(t.annotationId||t.__dsEffectId)&&!B&&V())},[Ot,s,Re,Ae,B,V,Be]),Ve=c.useCallback(t=>{!t||t.fileId!==s||Be(t)||(Re.invalidateQueries({queryKey:le.list(s)}),t.page&&Ae(t.page),t.annotationId&&(Ie.current=t.annotationId,B||V()))},[s,Re,Ae,B,V,Be]),qe=c.useCallback(()=>{if(!s)return;const t=Ro(s);t.length!==0&&t.forEach(l=>{l.name==="pdf:jump"?Ue(l.data):Ve(l.data)})},[Ve,Ue,s]);c.useEffect(()=>{s&&qe()},[s,qe]),c.useEffect(()=>{if(typeof window>"u"||!s)return;const t=w=>{const T=w.detail;Ue(T)},l=w=>{const T=w.detail;Ve(T)},N=w=>{const T=w.detail;!T||T.fileId!==s||qe()};return window.addEventListener("pdf:navigate",t),window.addEventListener("pdf:annotation_created",l),window.addEventListener("ds:pdf:queue",N),()=>{window.removeEventListener("pdf:navigate",t),window.removeEventListener("pdf:annotation_created",l),window.removeEventListener("ds:pdf:queue",N)}},[Ve,Ue,s,qe]);const Cn=c.useCallback(async t=>{if(!(u||d||!s))try{const l=Me(t.comment?.emoji);(await _t({fileId:s,position:t.position,content:t.content,comment:t.comment?.text||"",kind:l,tags:[]}))?.id&&!B&&V()}catch(l){console.warn("[PdfViewerPlugin] Failed to create annotation:",l)}},[_t,s,d,u,B,V]),An=c.useCallback(async(t,l,N)=>{if(!(u||d||!s))try{const w=Le.find(Q=>Q.id===t);if(!w)return;const T={...w.position,...l,boundingRect:{...w.position.boundingRect,...l.boundingRect}},O={...w.content,...N};await xe(t,{position:T,content:O})}catch(w){console.warn("[PdfViewerPlugin] Failed to update annotation position/content:",w)}},[Le,s,d,u,xe]),Lt=c.useCallback((t,l)=>{const N=re.find(Q=>Q.id===t);if(!N)return;const w=l?.allowToggleClose!==!1,T=l?.skipAutoScroll===!0;if(w&&ae===t){oe(null),ve.current?.setPinnedTipForHighlight(null);return}B||V(),oe(t),ve.current?.setPinnedTipForHighlight(null),T||(ue(N.position.pageNumber),tt.current(N))},[re,ae,B,oe,ue,V]),Tn=c.useCallback(t=>{const l=t.target;l&&(l.closest("[data-ds-highlight-target='true']")||l.closest("[data-ds-overlay-hint='true']")||ae&&(oe(null),ve.current?.setPinnedTipForHighlight(null)))},[ae,oe]),Mn=c.useCallback(async t=>{if(!(u||d||!s))try{await kt(t),ae===t&&oe(null)}catch(l){console.warn("[PdfViewerPlugin] Failed to delete annotation:",l)}},[kt,s,d,u,ae,oe]),Dn=c.useCallback(async(t,l)=>{if(!(u||d||!s))try{await xe(t,{kind:l})}catch(N){console.warn("[PdfViewerPlugin] Failed to update annotation kind:",N)}},[s,d,u,xe]),Pn=c.useCallback(async(t,l)=>{if(!(u||d||!s))try{await xe(t,{comment:l})}catch(N){console.warn("[PdfViewerPlugin] Failed to update annotation comment:",N)}},[s,d,u,xe]),Fn=c.useCallback(()=>{if(!s){window.open(de,"_blank");return}(async()=>{const{downloadFileById:t}=await Ut(async()=>{const{downloadFileById:l}=await import("./index-CHzJ2xtB.js").then(N=>N.d8);return{downloadFileById:l}},__vite__mapDeps([0,1,2,3,4]));await t(s,p)})()},[s,p,de]),On=c.useCallback(()=>{if(Fe){Fe();return}!s||d||Pe(o,Bt.PDF_MARKDOWN,{...e,customData:{...e.customData||{},pdfView:q?"summary":"markdown"}})},[e,s,q,d,Fe,o,Pe]);return nt?n.jsx("div",{className:"flex h-full items-center justify-center bg-muted/20",children:n.jsx("div",{className:"text-sm text-muted-foreground",children:"Switching to Markdown editor..."})}):d&&(se||Z)&&!F?n.jsx("div",{className:"h-full flex items-center justify-center bg-background",children:Z?n.jsx("div",{className:"text-sm text-muted-foreground",children:Z}):n.jsx(at,{})}):b&&(he||ke)&&!J?n.jsx("div",{className:"h-full flex items-center justify-center bg-background",children:ke?n.jsx("div",{className:"text-sm text-muted-foreground",children:ke}):n.jsx(at,{})}):n.jsxs("div",{className:"h-full flex flex-col bg-background",children:[n.jsx(Mo,{scale:Se,onScaleChange:Y,currentPage:De,totalPages:ln,onPageChange:Ae,sidebarVisible:B,onSidebarToggle:V,onDownload:Fn,onInfo:$?()=>jt(!0):void 0,onMarkdownToggle:Fe||kn?On:void 0,markdownLabel:Nn,markdownTitle:jn,reviewOpinionActive:un,onReviewOpinionToggle:dn&&vt?vt:void 0,reviewOpinionLabel:fn,reviewOpinionTitle:mn}),n.jsxs("div",{className:"flex-1 flex overflow-hidden bg-muted/10",children:[n.jsx("div",{className:"flex-1 overflow-hidden flex",children:n.jsx("div",{className:"relative h-full w-full",children:n.jsx("div",{className:"relative h-full overflow-hidden border border-border bg-background shadow-soft-card",onPointerDown:Tn,children:n.jsx(po,{url:de,httpHeaders:je,workerSrc:bo,cMapUrl:ho,cMapPacked:go,beforeLoad:n.jsx(at,{}),children:t=>n.jsx(Sr,{pdfDocument:t,scale:Se,highlights:In,selectedId:ae,onSelect:Lt,onAdd:Cn,onUpdate:An,onScrollRef:l=>{tt.current=l},onPageChange:l=>ue(l),pdfHighlighterRef:ve,authorColor:hn,authorHandle:(He?.email?He.email.split("@",1)[0]:"")||"user",showOverlayHints:Rt,tipPlacementMode:j?"right":"auto",readOnly:u,onAskCopilot:En})})})})}),B&&n.jsxs("div",{className:M("relative border-l bg-background/60 backdrop-blur flex-shrink-0",j?"":"w-72"),style:j?{width:ye}:void 0,children:[j?n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m("resize_annotation_sidebar"),tabIndex:0,className:"group absolute inset-y-0 left-0 z-20 w-3 -translate-x-1/2 cursor-ew-resize touch-none",onPointerDown:wn,children:n.jsx("span",{className:"pointer-events-none absolute top-1/2 left-1/2 h-16 w-[2px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-black/20 opacity-0 transition-opacity group-hover:opacity-100"})}):null,n.jsx(jr,{highlights:re,selectedId:ae,currentPage:De,flashId:yn,onSelect:Lt,onDelete:Mn,onUpdateKind:Dn,onUpdateComment:Pn,showOverlayHints:Rt,readOnly:u})]})]}),n.jsx(so,{open:xn,onClose:()=>jt(!1),paper:$,errorCode:_n,onCopyBibtex:$?Sn:void 0,onOpenArxiv:$?Rn:void 0})]})}function Lr(){console.debug("[PdfViewerPlugin] Activated")}function Hr(){console.debug("[PdfViewerPlugin] Deactivated")}export{Or as default,Lr as onPdfViewerActivate,Hr as onPdfViewerDeactivate};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{t as Ae,u as Ke,J as I,i as le,ap as Ge,ae as Je,aq as We,ar as Xe,as as Ye,at as Ze,B as ke,au as Ce,av as Le,aw as Qe,ax as es,j as s,S as Ee,X as ss,b as ts,ay as as,az as ns}from"./index-CHzJ2xtB.js";import{r as n}from"./plugin-monaco-C8UgLomw.js";import"./plugin-notebook-JRhysCqj.js";import"./plugin-terminal-MXFIPun8.js";/**
|
|
2
|
+
* @license lucide-react v0.511.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const rs=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Te=Ae("map",rs);/**
|
|
7
|
+
* @license lucide-react v0.511.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const cs=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ls=Ae("user",cs),$e="ds:lab:focus";function is(h){const w=h.customData?.projectId;return typeof w=="string"?w:null}function ds(h){return!!h.customData?.readOnly}function fs({context:h,setTitle:w}){const{t:a}=Ke("search");n.useEffect(()=>w(a("title")),[w,a]);const c=is(h),ie=ds(h),Me=typeof h.customData?.query=="string"?h.customData.query:"",Re=I(e=>e.nodes),k=I(e=>e.findNode),H=I(e=>e.findNodeByPath),de=I(e=>e.projectId),Fe=I(e=>e.isLoading),M=I(e=>e.loadFiles),ue=le(e=>e.openTab),oe=le(e=>e.setActiveTab),he=le(e=>e.tabs),me=Ge(e=>e.activeQuestId),{openFileInTab:fe}=Je(),pe=n.useRef(null),[p,ve]=n.useState(Me),[be,R]=n.useState([]),[xe,F]=n.useState(!1),[U,K]=n.useState(null),[De,D]=n.useState(!1),[j,Be]=n.useState("all"),C=n.useRef(0),[je,G]=n.useState([]),[B,J]=n.useState([]),[W,ye]=n.useState(!1),[L,X]=n.useState(null),[Y,N]=n.useState([]),[Pe,q]=n.useState(null),[ze,g]=n.useState(!1),[Z,_e]=n.useState(!1),[Ne,S]=n.useState(null),ee=n.useRef(0),se=n.useRef(new Set);n.useEffect(()=>{pe.current?.focus()},[]),n.useEffect(()=>{c&&de!==c&&M(c)},[c,de,M]),n.useEffect(()=>{if(!c){G([]),J([]),X(null);return}let e=!0;return ye(!0),X(null),Promise.all([We(c),Xe(c)]).then(([t,r])=>{e&&(G(t.items??[]),J(r.items??[]))}).catch(()=>{e&&(X("Lab search is unavailable right now."),G([]),J([]))}).finally(()=>{e&&ye(!1)}),()=>{e=!1}},[c]);const qe=n.useCallback(e=>{const r=e.trim().replace(/^\/+/,"");return r||""},[]),o=n.useMemo(()=>{const e=p.trim();if(!e)return{questId:null,queryText:"",types:void 0};const t=/(\w+):(".*?"|\S+)/g;let r=null;const i=new Set,l=[];let d=e.replace(t,(O,He,Ue)=>{const ce=String(He).toLowerCase(),_=String(Ue||"").replace(/^"|"$/g,"");return ce==="quest"?(r=_||r,""):ce==="event"?(i.add("event"),_&&l.push(_),""):ce==="branch"?(i.add("branch"),_&&l.push(_),""):(_&&l.push(_),"")});d=d.replace(t,"").trim(),d&&l.push(d);const b=l.join(" ").trim(),f=typeof h.customData?.questId=="string"?h.customData.questId:null;return{questId:r||f||me||null,queryText:b,types:i.size?Array.from(i).join(","):void 0}},[me,h.customData?.questId,p]);n.useEffect(()=>{const e=p.trim();if(!c||e.length===0){R([]),D(!1),K(null),F(!1);return}const t=C.current+1;C.current=t,F(!0),K(null);const r=setTimeout(()=>{const i=qe(e);if(!i){R([]),D(!1),F(!1);return}(async()=>{try{const l=await Ye(c,{pattern:i,include_folders:!1,limit:50,sort_by:"updated_at",sort_order:"desc"});if(C.current!==t)return;R(l.items??[]),D(!!l.truncated)}catch{if(C.current!==t)return;K("Search failed. Please try again."),R([]),D(!1)}finally{C.current===t&&F(!1)}})()},200);return()=>{clearTimeout(r)}},[qe,c,p]);const te=n.useCallback(async(e,t)=>{if(c&&o.questId&&o.queryText.trim()){_e(!0),S(null);try{const r=await Ze(c,o.questId,{query:o.queryText,types:o.types,limit:20,cursor:e??void 0}),i=r.items??[],l=r.next_cursor??null,d=!!(r.has_more||l);t||(se.current=new Set),N(b=>{const f=t?[...b]:[];return i.forEach(x=>{const O=x.item_type==="event"?`event:${x.event?.event_id??""}`:`branch:${x.branch?.node_id??""}`;!O||se.current.has(O)||(se.current.add(O),f.push(x))}),f}),q(l),g(d)}catch{S("Quest search is unavailable right now."),N([]),q(null),g(!1)}finally{_e(!1)}}},[c,o]);n.useEffect(()=>{if(!c||j==="files"){N([]),q(null),g(!1),S(null);return}if(!p.trim()){N([]),q(null),g(!1),S(null);return}if(!o.questId){N([]),q(null),g(!1),S("Add quest:<id> to search quest graph.");return}if(!o.queryText.trim()){N([]),q(null),g(!1),S("Add search terms after quest:<id>.");return}const t=ee.current+1;ee.current=t;const r=setTimeout(()=>{ee.current===t&&te(null,!1).catch(()=>{})},200);return()=>clearTimeout(r)},[te,c,p,o,j]);const ae=n.useCallback(async e=>{if(!c)return;let t=k(e.id)||H(e.path);if(t||(await M(c,{force:!0}),t=k(e.id)||H(e.path)),!t||t.type!=="file"&&t.type!=="notebook")return;await fe(t,{customData:{projectId:c}})},[k,H,M,fe,c]),v=n.useCallback((e,t,r,i)=>{if(!c)return;const l={projectId:c,focusType:e,focusId:t,branch:r??null,eventId:i??null},d=window;d.__dsLabPendingFocus=l;const b=he.find(f=>f.pluginId!==ke.LAB||f.context.type!=="custom"?!1:f.context.customData?.projectId===c);if(b){oe(b.id),window.dispatchEvent(new CustomEvent($e,{detail:l}));return}ue({pluginId:ke.LAB,context:{type:"custom",customData:{projectId:c,readOnly:ie}},title:"Home"}),window.requestAnimationFrame(()=>{window.dispatchEvent(new CustomEvent($e,{detail:l}))})},[ue,c,ie,oe,he]),ne=!!c,ge=p.trim(),y=ge.toLowerCase(),Q=n.useMemo(()=>be.map(e=>{const t=k(e.id);return{item:e,node:t??void 0,name:t?.name??e.name,type:t?.type??e.type,mimeType:t?.mimeType??e.mime_type,path:t?.path??e.path??"—"}}),[be,k,Re]),Se=n.useMemo(()=>new Map(B.map(e=>[e.quest_id,e])),[B]),m=n.useCallback(e=>!y||!e?!1:e.toLowerCase().includes(y),[y]),E=n.useMemo(()=>y?je.filter(e=>{const t=Ce(e),r=Le(e);return m(t)||m(r)||m(e.agent_id)||m(e.template_id)}).map(e=>{const t=Ce(e),r=Le(e),i=e.active_quest_id?Se.get(e.active_quest_id):null,l=e.status?.trim()?e.status:i?`Quest: ${Qe(i)}`:"Idle";return{kind:"agent",id:e.instance_id,title:t,subtitle:`${r} · ${l}`,accent:e.avatar_frame_color??void 0,agent:e}}).slice(0,20):[],[je,m,y,Se]),T=n.useMemo(()=>y?B.filter(e=>{const t=e.tags??[];return m(e.title)||m(e.description)||m(e.quest_id)||t.some(r=>m(r))}).map(e=>{const t=Qe(e),r=e.description?.trim()||"Quest pipeline";return{kind:"quest",id:e.quest_id,title:t,subtitle:r,meta:e.tags?.join(", "),accent:"#4d7c84",quest:e}}).slice(0,20):[],[B,m,y]),$=n.useMemo(()=>!Y.length||!o.questId?[]:Y.map(e=>{if(e.item_type==="event"){const d=e.event??null,b=d?.event_type||"Event",f=d?.reply_to_pi||d?.payload_summary||"Quest event",x=`${d?.branch_name||"main"} · ${es(d?.created_at)}`;return{id:d?.event_id||`${b}-${x}`,kind:"quest-event",questId:o.questId,title:b,subtitle:f,meta:x,event:d,branch:null}}const t=e.branch??null,r=t?.branch_name||"Branch",i=t?.idea_id?`Idea ${t.idea_id}`:t?.status||"Quest branch",l=t?.verdict?`Verdict: ${t.verdict}`:null;return{id:t?.node_id||`${r}-${i}`,kind:"quest-branch",questId:o.questId,title:r,subtitle:i,meta:l||void 0,event:null,branch:t}}),[o.questId,Y]),Ie=j!=="lab",we=j!=="files",P=E.length,z=T.length,V=$.length,re=P+z+V,A=Q.length,Ve=we&&re>0||Ie&&A>0,u=n.useMemo(()=>j==="lab"?$[0]??E[0]??T[0]??null:j==="files"?Q[0]??null:$[0]??E[0]??T[0]??Q[0]??null,[E,Q,T,$,j]),Oe=n.useCallback(()=>{if(u){if("item"in u){ae(u.item);return}if("kind"in u)switch(u.kind){case"quest-event":v("quest-event",u.questId,u.event?.branch_name,u.event?.event_id);return;case"quest-branch":v("quest-branch",u.questId,u.branch?.branch_name,null);return;case"agent":u.agent&&v("agent",u.agent.instance_id);return;case"quest":u.quest&&v("quest",u.quest.quest_id);return;default:return}}},[v,ae,u]);return s.jsx("div",{className:"ds-search-surface",children:s.jsxs("div",{className:"ds-search-shell",children:[s.jsxs("div",{className:"ds-search-header",children:[s.jsxs("div",{children:[s.jsx("div",{className:"ds-search-kicker",children:a("kicker")}),s.jsx("h1",{className:"ds-search-title",children:a("title")}),s.jsx("p",{className:"ds-search-subtitle",children:a("subtitle")})]}),s.jsxs("div",{className:"ds-search-shortcut",children:[s.jsx("span",{children:a("shortcut")}),s.jsx("kbd",{children:"⌘K"})]})]}),s.jsxs("div",{className:ts("ds-search-field",!ne&&"opacity-60"),children:[s.jsx(Ee,{className:"h-4 w-4 text-[#6f5c46]"}),s.jsx("input",{ref:pe,value:p,onChange:e=>ve(e.target.value),onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),Oe())},placeholder:a(ne?Fe?"placeholder_indexing":"placeholder_default":"placeholder_disabled"),className:"ds-search-input",disabled:!ne}),p?s.jsx("button",{type:"button",onClick:()=>ve(""),className:"ds-search-clear","aria-label":a("clear_search"),children:s.jsx(ss,{className:"h-4 w-4"})}):null]}),s.jsx("div",{className:"ds-search-scope",children:[{id:"all",label:a("scope_all"),count:A+re},{id:"files",label:a("scope_files"),count:A},{id:"lab",label:a("scope_lab"),count:re}].map(e=>s.jsxs("button",{type:"button",className:"ds-search-chip","data-active":j===e.id,onClick:()=>Be(e.id),children:[e.label,s.jsx("span",{children:e.count})]},e.id))}),s.jsx("div",{className:"ds-search-panel",children:ge.length===0?s.jsxs("div",{className:"ds-search-empty",children:[s.jsx("h3",{children:a("try_title")}),s.jsxs("ul",{className:"space-y-1 list-disc pl-5",children:[s.jsx("li",{children:a("try_goals")}),s.jsx("li",{children:a("try_agents")}),s.jsx("li",{children:a("try_paths")})]}),s.jsxs("div",{className:"ds-search-hint",children:[s.jsx(as,{className:"h-3.5 w-3.5"}),a("press_enter_hint")]})]}):s.jsxs("div",{children:[we?s.jsxs("div",{children:[s.jsx("div",{className:"ds-search-section",style:{"--ds-delay":"0s"},children:s.jsxs("div",{className:"ds-search-section-title",children:[s.jsx("span",{children:a("section_agents")}),s.jsx("span",{className:"ds-search-section-meta",children:a("results_count",{count:P})})]})}),W&&P===0?s.jsx("div",{className:"ds-search-status",children:a("loading_lab_agents")}):L?s.jsx("div",{className:"ds-search-status",children:L}):P===0?s.jsx("div",{className:"ds-search-status",children:a("no_agents")}):s.jsx("div",{className:"ds-search-result-list",children:E.map((e,t)=>s.jsxs("button",{type:"button",className:"ds-search-result",style:{"--ds-search-accent":e.accent??"#c2a15c","--ds-delay":`${t*.04}s`},onClick:()=>{e.agent&&v("agent",e.agent.instance_id)},children:[s.jsx("span",{className:"ds-search-result-mark",children:s.jsx(ls,{className:"h-4 w-4"})}),s.jsxs("div",{className:"ds-search-result-body",children:[s.jsx("div",{className:"ds-search-result-title",children:e.title}),s.jsx("div",{className:"ds-search-result-subtitle",children:e.subtitle})]}),s.jsx("span",{className:"ds-search-badge",children:a("badge_agent")})]},e.id))}),s.jsx("div",{className:"ds-search-section",style:{"--ds-delay":"0.04s"},children:s.jsxs("div",{className:"ds-search-section-title",children:[s.jsx("span",{children:a("section_quest_graph")}),s.jsx("span",{className:"ds-search-section-meta",children:a("results_count",{count:V})})]})}),Z&&V===0?s.jsx("div",{className:"ds-search-status",children:a("searching_quest_graph")}):Ne?s.jsx("div",{className:"ds-search-status",children:Ne}):V===0?s.jsx("div",{className:"ds-search-status",children:a("no_quest_graph")}):s.jsxs("div",{className:"ds-search-result-list",children:[$.map((e,t)=>s.jsxs("button",{type:"button",className:"ds-search-result",style:{"--ds-search-accent":"#a67c52","--ds-delay":`${t*.04}s`},onClick:()=>{if(e.kind==="quest-event"){v("quest-event",e.questId,e.event?.branch_name,e.event?.event_id);return}v("quest-branch",e.questId,e.branch?.branch_name,null)},children:[s.jsx("span",{className:"ds-search-result-mark",children:e.kind==="quest-event"?s.jsx(Ee,{className:"h-4 w-4"}):s.jsx(Te,{className:"h-4 w-4"})}),s.jsxs("div",{className:"ds-search-result-body",children:[s.jsx("div",{className:"ds-search-result-title",children:e.title}),s.jsx("div",{className:"ds-search-result-subtitle",children:e.subtitle}),e.meta?s.jsx("div",{className:"ds-search-result-meta",children:e.meta}):null]}),s.jsx("span",{className:"ds-search-badge",children:e.kind==="quest-event"?a("badge_event"):a("badge_branch")})]},e.id)),ze?s.jsx("button",{type:"button",className:"ds-search-load",onClick:()=>te(Pe,!0),disabled:Z,children:a(Z?"loading_more":"load_more")}):null]}),s.jsx("div",{className:"ds-search-section",style:{"--ds-delay":"0.04s"},children:s.jsxs("div",{className:"ds-search-section-title",children:[s.jsx("span",{children:a("section_quests")}),s.jsx("span",{className:"ds-search-section-meta",children:a("results_count",{count:z})})]})}),W&&z===0?s.jsx("div",{className:"ds-search-status",children:a("loading_quests")}):L?s.jsx("div",{className:"ds-search-status",children:L}):z===0?s.jsx("div",{className:"ds-search-status",children:a("no_quests")}):s.jsx("div",{className:"ds-search-result-list",children:T.map((e,t)=>s.jsxs("button",{type:"button",className:"ds-search-result",style:{"--ds-search-accent":e.accent??"#4d7c84","--ds-delay":`${t*.04}s`},onClick:()=>{e.quest&&v("quest",e.quest.quest_id)},children:[s.jsx("span",{className:"ds-search-result-mark",children:s.jsx(Te,{className:"h-4 w-4"})}),s.jsxs("div",{className:"ds-search-result-body",children:[s.jsx("div",{className:"ds-search-result-title",children:e.title}),s.jsx("div",{className:"ds-search-result-subtitle",children:e.subtitle}),e.meta?s.jsx("div",{className:"ds-search-result-meta",children:e.meta}):null]}),s.jsx("span",{className:"ds-search-badge",children:a("badge_quest")})]},e.id))})]}):null,Ie?s.jsxs("div",{children:[s.jsx("div",{className:"ds-search-section",style:{"--ds-delay":"0.08s"},children:s.jsxs("div",{className:"ds-search-section-title",children:[s.jsx("span",{children:a("section_files")}),s.jsx("span",{className:"ds-search-section-meta",children:a("results_count",{count:A})})]})}),U?s.jsx("div",{className:"ds-search-status",children:U}):xe?s.jsx("div",{className:"ds-search-status",children:a("searching_files")}):A===0?s.jsx("div",{className:"ds-search-status",children:a("no_files")}):s.jsxs("div",{className:"ds-search-result-list",children:[Q.map((e,t)=>s.jsxs("button",{type:"button",className:"ds-search-result",style:{"--ds-delay":`${t*.03}s`},onClick:()=>void ae(e.item),children:[s.jsx("span",{className:"ds-search-result-mark",children:s.jsx(ns,{type:e.type,mimeType:e.mimeType,name:e.name,className:"h-4 w-4"})}),s.jsxs("div",{className:"ds-search-result-body",children:[s.jsx("div",{className:"ds-search-result-title",children:e.name}),s.jsx("div",{className:"ds-search-result-subtitle",children:e.path})]}),s.jsx("span",{className:"ds-search-badge",children:a("badge_file")})]},e.item.id)),De?s.jsx("div",{className:"ds-search-status",children:a("truncated")}):null]})]}):null,!Ve&&!xe&&!W&&!U&&!L?s.jsx("div",{className:"ds-search-status",children:a("no_results")}):null]})})]})})}export{fs as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{c as te,j as e,L as se,T as R,
|
|
3
|
-
`),[h]),W=
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CHzJ2xtB.js","assets/plugin-monaco-C8UgLomw.js","assets/plugin-terminal-MXFIPun8.js","assets/plugin-notebook-JRhysCqj.js","assets/index-DH-zxoZ3.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as te,j as e,L as se,T as R,f as ne,S as z,b,d as re,e as oe,g as ae,h as ie,X as H,_ as le}from"./index-CHzJ2xtB.js";import{r as n}from"./plugin-monaco-C8UgLomw.js";import{H as ce,W as de,c as ue}from"./file-jump-queue-DeQBikaw.js";import"./plugin-notebook-JRhysCqj.js";import"./plugin-terminal-MXFIPun8.js";const he=1024*1024,k=1e4;function be({context:l,tabId:y,setDirty:v,setTitle:N}){const[h,u]=n.useState(""),[d,C]=n.useState(!0),[O,P]=n.useState(null),[Q,A]=n.useState(!1),[L,q]=n.useState(!0),[S,J]=n.useState(!0),[p,B]=n.useState(0),[X,I]=n.useState(!1),[m,E]=n.useState(!1),[f,F]=n.useState(""),[g,T]=n.useState(0),[o,V]=n.useState([]),[D,K]=n.useState(null),w=n.useRef(null),x=l.resourceId,M=l.resourceName||l.resourcePath||"Untitled";n.useEffect(()=>{N(M)},[M,N]),n.useEffect(()=>{(async()=>{C(!0),P(null),I(!1);try{if(!l.resourceId){u(G),B(G.length),C(!1);return}const{getFileContent:t}=await le(async()=>{const{getFileContent:a}=await import("./index-CHzJ2xtB.js").then(i=>i.d8);return{getFileContent:a}},__vite__mapDeps([0,1,2,3,4])),r=await t(l.resourceId);u(r),B(r.length),r.length>he&&I(!0)}catch(t){P(t instanceof Error?t.message:"Failed to load file")}finally{C(!1)}})()},[l.resourceId]);const c=n.useMemo(()=>h.split(`
|
|
3
|
+
`),[h]),W=n.useMemo(()=>c.length>k?c.slice(0,k):c,[c]),Y=c.length>k,_=n.useCallback(s=>{if(!x||s.fileId!==x)return;const t=s.lineStart??s.line??s.lineEnd;if(!t)return;const r=s.lineEnd??s.line??s.lineStart??t,a=Math.max(1,c.length),i=Math.min(Math.max(t,1),a),ee=Math.min(Math.max(r,i),a);K({start:i,end:ee});const $=document.getElementById(`line-${i-1}`);$&&$.scrollIntoView({behavior:"smooth",block:"center"}),w.current&&window.clearTimeout(w.current),w.current=window.setTimeout(()=>{K(null)},2500)},[x,c.length]);n.useEffect(()=>{if(!x)return;const s=()=>{ue(x).forEach(i=>_(i.data))};s();const t=a=>{const i=a.detail;_(i)},r=a=>{const i=a.detail;!i||i.fileId!==x||s()};return window.addEventListener("ds:file:jump",t),window.addEventListener("ds:file:queue",r),()=>{window.removeEventListener("ds:file:jump",t),window.removeEventListener("ds:file:queue",r),w.current&&(window.clearTimeout(w.current),w.current=null)}},[_,x]),n.useEffect(()=>{if(!f.trim()){V([]),T(0);return}const s=f.toLowerCase(),t=[];c.forEach((r,a)=>{r.toLowerCase().includes(s)&&t.push(a)}),V(t),T(0)},[f,c]);const j=n.useCallback(s=>{if(o.length===0)return;let t=g;s==="next"?t=(g+1)%o.length:t=(g-1+o.length)%o.length,T(t);const r=document.getElementById(`line-${o[t]}`);r&&r.scrollIntoView({behavior:"smooth",block:"center"})},[g,o]),Z=n.useCallback(async()=>{await te(h)&&(A(!0),setTimeout(()=>A(!1),2e3))},[h]),U=n.useMemo(()=>p<1024?`${p} B`:p<1024*1024?`${(p/1024).toFixed(1)} KB`:`${(p/(1024*1024)).toFixed(1)} MB`,[p]);return n.useEffect(()=>{const s=t=>{(t.ctrlKey||t.metaKey)&&t.key==="f"&&(t.preventDefault(),E(!0)),t.key==="Escape"&&m&&(E(!1),F("")),m&&(t.key==="F3"||t.key==="Enter"&&!t.shiftKey)&&(t.preventDefault(),j("next")),m&&(t.key==="F3"&&t.shiftKey||t.key==="Enter"&&t.shiftKey)&&(t.preventDefault(),j("prev"))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[m,j]),d?e.jsx("div",{className:"flex items-center justify-center h-full bg-background",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 text-muted-foreground",children:[e.jsx(se,{className:"w-8 h-8 animate-spin"}),e.jsx("span",{children:"Loading file..."})]})}):O?e.jsx("div",{className:"flex items-center justify-center h-full bg-background",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 text-destructive",children:[e.jsx(R,{className:"w-8 h-8"}),e.jsx("span",{children:O}),e.jsx("button",{className:"px-4 py-2 text-sm bg-destructive/10 hover:bg-destructive/20 rounded-lg transition-colors",onClick:()=>window.location.reload(),children:"Retry"})]})}):e.jsxs("div",{className:"flex flex-col h-full bg-background text-foreground",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ne,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm text-foreground",children:M}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[c.length," ",c.length===1?"line":"lines"," | ",U]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>E(!m),className:b("p-2 rounded hover:bg-accent transition-colors",m?"text-primary bg-accent":"text-muted-foreground"),title:"Search (Ctrl+F)",children:e.jsx(z,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>q(!L),className:b("p-2 rounded hover:bg-accent transition-colors",L?"text-primary":"text-muted-foreground"),title:"Toggle line numbers",children:e.jsx(ce,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>J(!S),className:b("p-2 rounded hover:bg-accent transition-colors",S?"text-primary":"text-muted-foreground"),title:"Toggle word wrap",children:e.jsx(de,{className:"w-4 h-4"})}),e.jsx("button",{onClick:Z,className:"p-2 rounded hover:bg-accent transition-colors text-muted-foreground hover:text-foreground",title:"Copy to clipboard",children:Q?e.jsx(re,{className:"w-4 h-4 text-green-500"}):e.jsx(oe,{className:"w-4 h-4"})})]})]}),m&&e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/20",children:[e.jsx(z,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("input",{type:"text",value:f,onChange:s=>F(s.target.value),placeholder:"Search...",className:"flex-1 bg-transparent border-none outline-none text-sm placeholder:text-muted-foreground",autoFocus:!0}),o.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground flex-shrink-0",children:[g+1," of ",o.length]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx("button",{onClick:()=>j("prev"),disabled:o.length===0,className:"p-1 rounded hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx(ae,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>j("next"),disabled:o.length===0,className:"p-1 rounded hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:e.jsx(ie,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>{E(!1),F("")},className:"p-1 rounded hover:bg-accent",children:e.jsx(H,{className:"w-4 h-4"})})]})]}),X&&e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-yellow-500/10 border-b border-yellow-500/30 text-yellow-600 dark:text-yellow-400",children:[e.jsx(R,{className:"w-4 h-4 flex-shrink-0"}),e.jsxs("span",{className:"text-sm",children:["Large file (",U,"). Performance may be affected."]}),e.jsx("button",{onClick:()=>I(!1),className:"ml-auto p-1 hover:bg-yellow-500/20 rounded",children:e.jsx(H,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("div",{className:"flex min-h-full",children:[L&&e.jsx("div",{className:"flex-shrink-0 py-4 pr-4 text-right bg-muted/20 border-r border-border select-none sticky left-0",children:W.map((s,t)=>e.jsx("div",{id:`line-num-${t}`,className:b("px-4 text-xs leading-6 font-mono",o.includes(t)&&o[g]===t?"text-primary font-bold":o.includes(t)?"text-primary/60":"text-muted-foreground"),children:t+1},t))}),e.jsxs("pre",{className:b("flex-1 py-4 px-4 font-mono text-sm leading-6 overflow-x-auto",S&&"whitespace-pre-wrap break-all"),children:[W.map((s,t)=>{const r=o.length>0&&o[g]===t,a=f.trim()&&s.toLowerCase().includes(f.toLowerCase()),i=D&&t+1>=D.start&&t+1<=D.end;return e.jsx("div",{id:`line-${t}`,className:b("min-h-[1.5rem]",i&&"ds-citation-line-highlight",r&&"bg-primary/20",a&&!r&&"bg-primary/10"),children:a?me(s,f):s||" "},t)}),Y&&e.jsxs("div",{className:"py-4 text-center text-muted-foreground border-t border-border mt-4",children:[e.jsx(R,{className:"w-4 h-4 inline-block mr-2"}),"File truncated. Showing first ",k.toLocaleString()," ","of ",c.length.toLocaleString()," lines."]})]})]})})]})}function me(l,y){if(!y.trim())return l;const v=[],N=l.toLowerCase(),h=y.toLowerCase();let u=0,d=N.indexOf(h);for(;d!==-1;)d>u&&v.push(l.slice(u,d)),v.push(e.jsx("mark",{className:"bg-yellow-300 dark:bg-yellow-500/50 text-foreground px-0.5 rounded",children:l.slice(d,d+y.length)},d)),u=d+y.length,d=N.indexOf(h,u);return u<l.length&&v.push(l.slice(u)),v}const G=`DeepScientist - Text Viewer Demo
|
|
4
4
|
================================
|
|
5
5
|
|
|
6
6
|
This is a demonstration of the Text Viewer plugin.
|
|
@@ -51,4 +51,4 @@ that don't have a specialized viewer, such as:
|
|
|
51
51
|
|
|
52
52
|
The viewer prioritizes readability and performance,
|
|
53
53
|
even for large files with thousands of lines.
|
|
54
|
-
`;export{
|
|
54
|
+
`;export{be as default};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
+
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
+
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="1040.000000pt" height="1040.000000pt" viewBox="0 0 1040.000000 1040.000000"
|
|
6
|
+
preserveAspectRatio="xMidYMid meet">
|
|
7
|
+
<metadata>
|
|
8
|
+
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
|
9
|
+
</metadata>
|
|
10
|
+
<g transform="translate(0.000000,1040.000000) scale(0.100000,-0.100000)"
|
|
11
|
+
fill="#000000" stroke="none">
|
|
12
|
+
<path d="M2865 8788 c-21 -51 -38 -98 -39 -104 -1 -7 -7 -18 -13 -25 -5 -8
|
|
13
|
+
-14 -27 -18 -44 -10 -37 -10 -35 -22 -65 -41 -98 -63 -155 -63 -167 0 -7 -3
|
|
14
|
+
-13 -8 -13 -4 0 -16 -27 -26 -60 -11 -33 -22 -60 -26 -60 -4 0 -7 -6 -7 -12 0
|
|
15
|
+
-12 -142 -378 -163 -423 -5 -11 -43 -105 -84 -210 -144 -371 -208 -530 -222
|
|
16
|
+
-559 -8 -16 -14 -33 -14 -38 0 -5 -10 -30 -21 -56 -12 -25 -22 -51 -24 -57 -2
|
|
17
|
+
-10 -6 -21 -38 -97 -8 -20 -13 -38 -11 -41 3 -2 -2 -10 -11 -17 -8 -7 -15 -21
|
|
18
|
+
-15 -31 0 -11 -4 -27 -9 -37 -20 -35 -61 -135 -61 -146 0 -6 -6 -22 -13 -36
|
|
19
|
+
-7 -14 -24 -54 -37 -90 -13 -36 -30 -76 -37 -90 -7 -14 -13 -30 -13 -36 0 -5
|
|
20
|
+
-9 -29 -20 -52 -11 -22 -20 -47 -20 -55 0 -7 -5 -18 -11 -24 -6 -6 -12 -17
|
|
21
|
+
-13 -24 -2 -8 -7 -23 -11 -34 -4 -11 -73 -184 -152 -385 -79 -201 -164 -414
|
|
22
|
+
-189 -475 -25 -60 -47 -117 -49 -125 -1 -8 -10 -31 -18 -50 -40 -90 -87 -213
|
|
23
|
+
-87 -226 0 -8 -4 -14 -10 -14 -5 0 -10 -9 -10 -19 0 -11 -5 -23 -10 -26 -6 -4
|
|
24
|
+
-8 -11 -4 -16 3 -5 1 -15 -4 -22 -5 -7 -41 -93 -80 -192 -39 -99 -77 -193 -83
|
|
25
|
+
-210 -7 -16 -13 -32 -14 -35 -1 -3 -5 -14 -10 -25 -48 -116 -135 -342 -135
|
|
26
|
+
-352 0 -7 -5 -13 -12 -13 -6 0 -8 -3 -5 -7 4 -3 3 -11 -2 -17 -5 -6 -14 -29
|
|
27
|
+
-21 -51 -7 -22 -20 -56 -28 -75 -9 -19 -16 -37 -17 -40 -1 -3 -5 -14 -10 -25
|
|
28
|
+
-4 -11 -44 -110 -87 -220 -43 -110 -82 -209 -87 -220 -5 -11 -19 -47 -31 -80
|
|
29
|
+
-13 -33 -29 -73 -36 -90 -18 -42 -58 -149 -59 -157 0 -4 -6 -13 -12 -19 -7 -7
|
|
30
|
+
-13 -21 -13 -31 0 -10 -4 -26 -10 -36 -5 -9 -53 -127 -106 -262 -53 -135 -100
|
|
31
|
+
-254 -105 -265 -4 -11 -27 -67 -49 -125 -23 -58 -47 -118 -54 -135 -8 -16 -22
|
|
32
|
+
-52 -31 -80 -10 -27 -23 -56 -28 -62 -5 -7 -6 -13 -3 -13 4 0 0 -12 -8 -27 -8
|
|
33
|
+
-16 -31 -71 -51 -123 -21 -52 -46 -116 -56 -142 l-19 -48 813 0 812 0 35 93
|
|
34
|
+
c19 50 35 94 35 97 1 3 9 22 18 44 9 21 17 41 17 43 0 5 44 119 64 168 7 17
|
|
35
|
+
30 75 51 130 21 55 43 114 50 130 6 17 18 46 25 65 6 19 16 44 21 55 11 26
|
|
36
|
+
139 357 143 370 2 6 8 24 15 40 6 17 19 50 28 75 9 25 21 51 26 58 5 6 7 12 4
|
|
37
|
+
12 -3 0 10 35 28 78 l34 77 1517 0 1517 0 74 -190 c40 -104 76 -197 79 -205 3
|
|
38
|
+
-8 19 -51 36 -95 16 -44 34 -89 39 -100 4 -11 31 -81 59 -155 28 -74 57 -151
|
|
39
|
+
65 -170 25 -60 38 -95 39 -102 1 -3 4 -10 9 -14 4 -4 7 -14 7 -21 0 -8 11 -39
|
|
40
|
+
25 -69 14 -30 25 -58 25 -62 0 -8 68 -185 95 -247 7 -16 18 -47 25 -67 l12
|
|
41
|
+
-38 810 0 810 0 -6 26 c-4 14 -15 45 -25 68 -10 22 -42 102 -71 176 -29 74
|
|
42
|
+
-58 149 -65 165 -7 17 -43 107 -79 200 -37 94 -70 179 -75 190 -5 11 -13 31
|
|
43
|
+
-19 45 -6 14 -56 142 -112 285 -56 143 -106 269 -111 280 -4 11 -18 45 -29 75
|
|
44
|
+
-12 30 -28 70 -37 89 -8 18 -16 39 -18 45 -1 6 -10 29 -19 50 -10 22 -19 48
|
|
45
|
+
-21 58 -2 10 -7 24 -12 31 -4 6 -8 14 -9 17 0 3 -4 14 -9 25 -4 11 -18 45 -30
|
|
46
|
+
75 -12 30 -26 64 -30 75 -5 11 -9 22 -10 25 -1 3 -5 14 -10 25 -67 166 -135
|
|
47
|
+
342 -135 352 0 7 -4 13 -8 13 -5 0 -9 6 -9 13 -1 12 -50 141 -79 204 -8 17
|
|
48
|
+
-14 33 -14 36 0 2 -6 20 -14 38 -8 19 -14 36 -14 39 -1 3 -15 39 -32 80 -42
|
|
49
|
+
102 -48 116 -61 143 -5 13 -11 29 -13 37 -2 8 -8 26 -13 40 -6 14 -36 90 -68
|
|
50
|
+
170 -31 80 -60 154 -65 165 -23 51 -65 157 -92 229 -16 44 -35 94 -43 111 -8
|
|
51
|
+
16 -27 64 -43 105 -16 41 -33 84 -37 95 -5 11 -9 22 -10 25 -6 16 -18 48 -26
|
|
52
|
+
65 -4 11 -22 56 -39 100 -17 44 -35 90 -40 103 -14 31 -24 56 -58 142 -16 41
|
|
53
|
+
-33 84 -37 95 -5 11 -9 22 -10 25 -1 3 -7 18 -13 33 -7 16 -12 34 -12 41 0 6
|
|
54
|
+
-4 16 -8 22 -5 5 -15 25 -22 44 -7 19 -20 51 -28 70 -8 19 -18 44 -22 55 -5
|
|
55
|
+
11 -50 126 -100 255 -108 276 -102 262 -129 322 -12 26 -21 52 -21 58 0 6 -4
|
|
56
|
+
18 -9 28 -15 29 -29 63 -61 147 -17 44 -35 90 -40 103 -6 12 -14 32 -19 45
|
|
57
|
+
-17 43 -40 103 -85 218 -26 64 -46 121 -46 127 0 6 -3 12 -7 14 -5 2 -16 24
|
|
58
|
+
-25 51 -10 26 -26 68 -35 95 -10 26 -22 50 -28 54 -5 4 -7 8 -3 8 4 0 -5 28
|
|
59
|
+
-18 63 -23 58 -30 75 -54 130 -5 12 -44 110 -85 217 -42 107 -82 209 -89 225
|
|
60
|
+
-7 17 -51 126 -97 243 l-83 212 -832 0 -832 0 -37 -92z m910 -1869 c4 -13 13
|
|
61
|
+
-37 20 -54 7 -16 35 -88 63 -160 27 -71 53 -139 57 -150 5 -11 9 -22 10 -25 9
|
|
62
|
+
-26 47 -125 58 -150 6 -14 11 -27 12 -30 1 -3 5 -12 8 -20 3 -8 29 -76 57
|
|
63
|
+
-150 28 -74 57 -148 64 -165 8 -16 19 -48 26 -70 7 -22 16 -44 20 -50 5 -5 8
|
|
64
|
+
-12 9 -15 0 -8 12 -43 27 -77 8 -17 14 -34 14 -38 0 -4 6 -21 14 -38 8 -18 42
|
|
65
|
+
-106 76 -197 34 -91 70 -183 80 -205 9 -22 23 -57 30 -79 7 -21 30 -82 52
|
|
66
|
+
-135 22 -53 41 -103 43 -111 2 -8 22 -62 45 -120 23 -58 50 -130 61 -160 11
|
|
67
|
+
-30 24 -59 29 -64 6 -6 10 -19 10 -29 0 -10 7 -31 15 -45 22 -42 47 -125 38
|
|
68
|
+
-131 -4 -3 -450 -4 -989 -1 l-982 5 24 60 c12 33 47 123 77 200 30 77 57 149
|
|
69
|
+
62 160 4 11 9 25 10 30 3 11 60 157 74 190 5 11 24 58 41 105 18 47 39 100 47
|
|
70
|
+
119 8 18 16 39 17 45 4 22 48 131 58 143 6 7 8 13 4 13 -4 0 0 13 9 30 8 16
|
|
71
|
+
15 32 15 35 0 3 7 21 15 41 8 20 15 38 15 40 0 1 5 15 12 31 6 15 12 30 13 33
|
|
72
|
+
5 20 20 61 35 95 9 22 33 83 53 135 20 52 56 147 81 210 95 244 300 780 322
|
|
73
|
+
840 5 14 32 -36 49 -91z"/>
|
|
74
|
+
<path d="M5910 8866 c0 -8 4 -17 9 -20 4 -3 14 -26 21 -51 7 -25 17 -45 21
|
|
75
|
+
-45 5 0 9 -9 9 -20 0 -11 4 -28 9 -38 5 -9 17 -37 27 -62 10 -25 25 -63 34
|
|
76
|
+
-85 39 -91 94 -241 92 -247 -1 -5 2 -8 8 -8 6 0 10 -6 10 -13 0 -12 18 -59 63
|
|
77
|
+
-167 5 -14 11 -29 13 -35 1 -5 34 -89 74 -185 39 -96 73 -182 75 -190 2 -8 9
|
|
78
|
+
-28 16 -45 7 -16 13 -32 14 -35 1 -3 6 -16 13 -30 6 -14 49 -124 97 -245 47
|
|
79
|
+
-121 94 -240 104 -265 11 -25 36 -88 56 -140 54 -140 64 -166 83 -210 9 -22
|
|
80
|
+
118 -298 219 -555 20 -49 41 -103 48 -120 7 -16 25 -61 40 -100 14 -38 30 -79
|
|
81
|
+
35 -90 5 -11 19 -45 30 -75 12 -30 27 -66 33 -80 6 -14 11 -27 11 -30 1 -6 21
|
|
82
|
+
-56 44 -110 49 -118 92 -235 92 -247 0 -7 5 -13 10 -13 6 0 10 -6 10 -12 0
|
|
83
|
+
-13 49 -144 76 -203 7 -16 25 -61 40 -100 14 -38 29 -74 32 -80 4 -5 7 -17 9
|
|
84
|
+
-25 1 -8 6 -23 12 -35 6 -11 74 -182 151 -380 78 -198 150 -379 161 -402 10
|
|
85
|
+
-24 19 -46 19 -51 0 -5 9 -27 20 -50 11 -22 20 -48 20 -56 0 -8 4 -17 9 -20 5
|
|
86
|
+
-3 12 -18 16 -33 3 -16 13 -41 20 -58 8 -16 43 -104 79 -195 35 -91 125 -319
|
|
87
|
+
200 -508 75 -189 136 -345 136 -348 0 -2 9 -23 19 -47 10 -23 26 -62 36 -87
|
|
88
|
+
20 -53 43 -108 56 -132 5 -10 9 -24 9 -31 0 -7 11 -37 25 -65 14 -29 25 -55
|
|
89
|
+
25 -59 0 -8 37 -101 66 -170 8 -17 14 -33 14 -36 0 -2 8 -22 17 -43 9 -22 17
|
|
90
|
+
-41 18 -44 1 -3 5 -14 10 -25 59 -146 175 -447 175 -455 0 -7 276 -10 800 -10
|
|
91
|
+
l800 0 -19 48 c-10 26 -40 101 -66 167 -26 66 -55 138 -65 160 -9 22 -23 57
|
|
92
|
+
-30 78 -7 22 -18 51 -26 65 -8 15 -14 31 -14 35 0 5 -6 23 -14 40 -22 49 -107
|
|
93
|
+
261 -109 272 -4 16 -87 228 -98 247 -4 9 -32 77 -60 150 -28 73 -56 144 -61
|
|
94
|
+
158 -6 14 -12 30 -13 35 -2 6 -12 32 -24 57 -11 25 -28 68 -37 94 -9 27 -24
|
|
95
|
+
67 -34 89 -18 40 -32 76 -34 85 -3 12 -250 630 -267 667 -10 24 -19 49 -19 57
|
|
96
|
+
0 8 -4 18 -10 21 -5 3 -10 13 -10 21 0 8 -9 33 -19 57 -11 23 -40 94 -64 157
|
|
97
|
+
-116 296 -179 457 -187 475 -14 32 -59 145 -203 510 -73 187 -137 349 -142
|
|
98
|
+
360 -5 11 -9 22 -10 25 -1 3 -6 16 -12 30 -6 14 -19 45 -28 70 -9 25 -21 54
|
|
99
|
+
-25 65 -28 65 -161 403 -165 415 -2 8 -11 33 -21 55 -10 22 -18 42 -19 45 0 5
|
|
100
|
+
-120 309 -135 345 -5 11 -19 45 -30 75 -34 86 -37 93 -54 132 -9 20 -16 38
|
|
101
|
+
-16 41 0 3 -4 16 -9 29 -5 13 -9 25 -8 28 0 3 -10 23 -22 45 -11 22 -21 43
|
|
102
|
+
-21 47 0 5 -46 122 -101 261 -56 138 -108 270 -116 291 -8 22 -17 45 -21 50
|
|
103
|
+
-3 6 -7 18 -9 26 -1 8 -7 26 -14 40 -17 36 -25 55 -59 145 -17 44 -35 89 -40
|
|
104
|
+
100 -4 11 -38 97 -75 190 -89 229 -155 396 -165 420 -5 11 -18 43 -28 70 -11
|
|
105
|
+
28 -32 80 -47 118 l-27 67 -794 0 c-685 0 -794 -2 -794 -14z"/>
|
|
106
|
+
</g>
|
|
107
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="560" height="555" viewBox="0 81.9395 560 554.8375" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M414.688 359.358C414.688 319.91 446.996 287.603 486.444 287.603C525.891 287.603 558.199 319.91 558.199 359.358C558.199 398.805 525.891 431.113 486.444 431.113C446.996 431.113 414.688 398.805 414.688 359.358Z" stroke="black" stroke-opacity="0.12" stroke-width="1.59259"/>
|
|
3
|
+
<path d="M2.38867 359.358C2.38867 319.91 34.696 287.603 74.1439 287.603C113.592 287.603 145.899 319.91 145.899 359.358C145.899 398.805 113.592 431.113 74.1439 431.113C34.696 431.113 2.38867 398.805 2.38867 359.358Z" stroke="black" stroke-opacity="0.12" stroke-width="1.59259"/>
|
|
4
|
+
<path d="M208.539 154.491C208.539 115.043 240.846 82.7354 280.293 82.7354C319.742 82.7354 352.049 115.043 352.049 154.491C352.049 193.938 319.742 226.246 280.293 226.246C240.846 226.246 208.539 193.938 208.539 154.491Z" stroke="black" stroke-opacity="0.12" stroke-width="1.59259"/>
|
|
5
|
+
<path d="M208.539 564.406C208.539 524.958 240.846 492.65 280.293 492.65C319.742 492.65 352.049 524.958 352.049 564.406C352.049 603.855 319.742 636.162 280.293 636.162C240.846 636.162 208.539 603.855 208.539 564.406Z" stroke="black" stroke-opacity="0.12" stroke-width="1.59259"/>
|
|
6
|
+
<path d="M413.892 81.9395V636.777M146.694 81.9395V636.777" stroke="black" stroke-opacity="0.12" stroke-width="1.59259" stroke-miterlimit="10"/>
|
|
7
|
+
<path d="M558.995 227.042H1.59277M1.59277 491.674H558.995" stroke="black" stroke-opacity="0.12" stroke-width="1.59259" stroke-miterlimit="10"/>
|
|
8
|
+
<path d="M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z" fill="black"/>
|
|
9
|
+
<path d="M558.995 81.9395H1.59277V636.777H558.995V81.9395Z" stroke="black" stroke-opacity="0.12" stroke-width="1.59259" stroke-miterlimit="10"/>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="128" height="128" rx="28" fill="url(#bg)"/>
|
|
3
|
+
<path d="M34 28H46V58.5L76.5 28H93L61.5 60L95 100H78L52.5 69L46 75.5V100H34V28Z" fill="#06253F"/>
|
|
4
|
+
<circle cx="94" cy="34" r="10" fill="#F8FAFC" fill-opacity="0.86"/>
|
|
5
|
+
<path d="M91.5 29.5H96.5V38.5H91.5V29.5Z" fill="#0E7490"/>
|
|
6
|
+
<path d="M89 34H99V38H89V34Z" fill="#0E7490"/>
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="bg" x1="12" y1="14" x2="112" y2="118" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop stop-color="#38BDF8"/>
|
|
10
|
+
<stop offset="0.55" stop-color="#67E8F9"/>
|
|
11
|
+
<stop offset="1" stop-color="#D9F99D"/>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
</defs>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512"><svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="512" height="512" fill="#131010"></rect>
|
|
3
|
+
<path d="M320 224V352H192V224H320Z" fill="#5A5858"></path>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M384 416H128V96H384V416ZM320 160H192V352H320V160Z" fill="white"></path>
|
|
5
|
+
</svg><style>@media (prefers-color-scheme: light) { :root { filter: none; } }
|
|
6
|
+
@media (prefers-color-scheme: dark) { :root { filter: none; } }
|
|
7
|
+
</style></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as l,G as d,H as v}from"./index-CHzJ2xtB.js";var c=(r=>(r.DISCONNECTED="disconnected",r.CONNECTING="connecting",r.AUTHENTICATING="authenticating",r.CONNECTED="connected",r.RECONNECTING="reconnecting",r.SUSPENDED="suspended",r.FAILED="failed",r))(c||{});const u=l((r,n)=>({projectId:null,servers:[],activeServerId:null,isLoading:!1,error:null,connectionStatus:{state:c.DISCONNECTED,metrics:{totalConnections:0,successfulConnections:0,failedConnections:0,reconnectionAttempts:0,averageReconnectTime:0,messagesBuffered:0,messagesDropped:0}},sessionsByServer:{},notifications:[],telemetryByServer:{},setProjectId:e=>r({projectId:e}),loadServers:async e=>{r({isLoading:!0,error:null,projectId:e});try{const s=await v(e);r({servers:s,isLoading:!1}),!n().activeServerId&&s.length>0&&r({activeServerId:s[0].id})}catch(s){console.error("[CLI] Failed to load servers:",s),r({error:"Failed to load servers",isLoading:!1})}},refreshServers:async()=>{const e=n().projectId;e&&await n().loadServers(e)},setActiveServer:e=>r({activeServerId:e}),updateServerStatus:(e,s,i)=>r(a=>({servers:a.servers.map(t=>t.id===e?{...t,status:s,last_seen_at:i??t.last_seen_at}:t)})),updateServerName:async(e,s,i)=>{const a=await d(e,s,{name:i});r(t=>({servers:t.servers.map(o=>o.id===s?a:o)}))},setConnectionStatus:e=>r({connectionStatus:e}),setSessions:(e,s)=>r(i=>({sessionsByServer:{...i.sessionsByServer,[e]:s}})),addNotification:e=>r(s=>({notifications:[e,...s.notifications].slice(0,50)})),markNotificationRead:e=>r(s=>({notifications:s.notifications.map(i=>i.id===e?{...i,read:!0}:i)})),clearNotifications:()=>r({notifications:[]}),pushTelemetryPoint:(e,s)=>r(i=>{const t=[...i.telemetryByServer[e]??[],s].slice(-600);return{telemetryByServer:{...i.telemetryByServer,[e]:t}}}),setTelemetrySeries:(e,s)=>r(i=>({telemetryByServer:{...i.telemetryByServer,[e]:s}}))}));export{c as C,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a}from"./plugin-monaco-C8UgLomw.js";import{j as t,X as I,b as u}from"./index-CHzJ2xtB.js";function W(e,s){return!(s.projectId&&e.projectId&&s.projectId!==e.projectId||s.fileId&&e.fileId&&s.fileId!==e.fileId||s.filePath&&e.filePath&&s.filePath!==e.filePath)}function k({fileId:e,filePath:s,projectId:n,ttlMs:i=6e3}){const[f,l]=a.useState(null);return a.useEffect(()=>{const d=c=>{const r=c.detail;r?.diff&&W(r,{fileId:e||void 0,filePath:s||void 0,projectId:n||void 0})&&l({...r})};return window.addEventListener("ds:file:diff",d),()=>window.removeEventListener("ds:file:diff",d)},[e,s,n]),a.useEffect(()=>{const d=()=>{f&&l(null)};return window.addEventListener("ds:tool:call",d),()=>window.removeEventListener("ds:tool:call",d)},[f]),a.useEffect(()=>{if(!f)return;const d=window.setTimeout(()=>l(null),i);return()=>window.clearTimeout(d)},[f,i]),{diffEvent:f,clearDiff:()=>l(null)}}const L={create:"Created",update:"Updated",delete:"Deleted"};function b(e){const s=e.startsWith("@@"),n=e.startsWith("+")&&!e.startsWith("+++"),i=e.startsWith("-")&&!e.startsWith("---"),f=!s&&!n&&!i,l=s?"@@":n?"+":i?"-":" ",d=s?e.slice(2).trimStart():e.slice(1);return{isHunk:s,isAdd:n,isDel:i,isContext:f,prefix:l,text:d}}function A(e){let s=0,n=0;return e.forEach(i=>{i.startsWith("+")&&!i.startsWith("+++")&&(s+=1),i.startsWith("-")&&!i.startsWith("---")&&(n+=1)}),{added:s,removed:n}}function F({diff:e,changeType:s,title:n,subtitle:i,compact:f,showHeader:l=!0,onClose:d,className:c}){const r=a.useMemo(()=>A(e.lines),[e.lines]),m=e.added??r.added,h=e.removed??r.removed,x=s?L[s]??"Updated":"Updated";return t.jsxs("div",{className:u("ds-file-diff-panel",f&&"is-compact",c),children:[l?t.jsxs("div",{className:"ds-file-diff-header",children:[t.jsxs("div",{className:"ds-file-diff-header-text",children:[t.jsx("div",{className:"ds-file-diff-title",children:n??"AI Change"}),t.jsxs("div",{className:"ds-file-diff-subtitle",children:[t.jsx("span",{className:"ds-file-diff-tag",children:x}),t.jsxs("span",{className:"ds-file-diff-meta",children:["+",m]}),t.jsxs("span",{className:"ds-file-diff-meta",children:["-",h]}),i?t.jsx("span",{className:"ds-file-diff-muted",children:i}):null]})]}),d?t.jsx("button",{type:"button",className:"ds-file-diff-close",onClick:d,"aria-label":"Dismiss diff",children:t.jsx(I,{size:14})}):null]}):null,t.jsx("div",{className:"ds-file-diff-body",children:e.lines.map((p,v)=>{const{isHunk:j,isAdd:N,isDel:E,isContext:w,prefix:o,text:D}=b(p);return t.jsxs("div",{className:u("ds-file-diff-line",j&&"is-hunk",N&&"is-add",E&&"is-del",w&&"is-context"),children:[t.jsx("span",{className:"ds-file-diff-prefix",children:o}),t.jsx("span",{className:"ds-file-diff-text",children:D})]},`${o}-${v}`)})}),e.truncated?t.jsx("div",{className:"ds-file-diff-footer",children:"Diff truncated. Open file for full details."}):null]})}export{F,k as u};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as c}from"./index-CHzJ2xtB.js";/**
|
|
2
2
|
* @license lucide-react v0.511.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const y=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],c
|
|
6
|
+
*/const y=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],a=c("hash",y);/**
|
|
7
7
|
* @license lucide-react v0.511.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const
|
|
11
|
+
*/const o=[["path",{d:"m16 16-2 2 2 2",key:"kkc6pm"}],["path",{d:"M3 12h15a3 3 0 1 1 0 6h-4",key:"1cl7v7"}],["path",{d:"M3 18h7",key:"sq21v6"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],p=c("wrap-text",o),n=new Map;function h(t){const e=n.get(t);return!e||e.length===0?[]:(n.delete(t),e)}export{a as H,p as W,h as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as r,p as a,q as i,r as u}from"./index-CHzJ2xtB.js";const k=u,n=new Map;function f(){const e={connected:!1,connect:()=>e,disconnect:()=>e,on:()=>e,off:()=>e,emit:()=>!0,emitWithAck:async()=>({data:void 0})};return e}function p(){if(!r())return{socket:f(),release:()=>{}};const e=k();let t=n.get(e);return t||(t={socket:a(e,{path:"/ws/socket.io",autoConnect:!1,transports:["websocket","polling"],auth:c=>{const s=i.getState().accessToken||(typeof window<"u"?window.localStorage.getItem("ds_access_token"):null);c({token:s})}}),refCount:0},n.set(e,t)),t.refCount+=1,t.socket.connected||t.socket.connect(),{socket:t.socket,release:()=>{const o=n.get(e);o&&(o.refCount-=1,o.refCount<=0&&(o.socket.disconnect(),n.delete(e)))}}}export{p as a};
|
|
@@ -49,15 +49,61 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
:root {
|
|
52
|
-
--font-sans:
|
|
53
|
-
|
|
52
|
+
--font-sans:
|
|
53
|
+
'DS-SourceSans3',
|
|
54
|
+
'DS-Inter',
|
|
55
|
+
'Inter',
|
|
56
|
+
'PingFang SC',
|
|
57
|
+
'Hiragino Sans GB',
|
|
58
|
+
'Microsoft YaHei',
|
|
59
|
+
'Noto Sans CJK SC',
|
|
60
|
+
'Source Han Sans SC',
|
|
61
|
+
'Noto Sans',
|
|
62
|
+
-apple-system,
|
|
63
|
+
BlinkMacSystemFont,
|
|
64
|
+
'Segoe UI',
|
|
65
|
+
sans-serif;
|
|
66
|
+
--font-reading:
|
|
67
|
+
'DS-Inter',
|
|
68
|
+
'DS-SourceSans3',
|
|
69
|
+
'Inter',
|
|
70
|
+
'PingFang SC',
|
|
71
|
+
'Hiragino Sans GB',
|
|
72
|
+
'Microsoft YaHei',
|
|
73
|
+
'Noto Sans CJK SC',
|
|
74
|
+
'Source Han Sans SC',
|
|
75
|
+
'Noto Sans',
|
|
76
|
+
sans-serif;
|
|
54
77
|
--font-title: 'DS-Project', 'DS-Satoshi', 'DS-Inter', 'Inter', serif;
|
|
55
78
|
--font-soft: 'DS-NunitoSans', 'DS-SourceSans3', 'DS-Inter', sans-serif;
|
|
56
79
|
}
|
|
57
80
|
|
|
58
81
|
.font-project {
|
|
59
|
-
--font-sans:
|
|
60
|
-
|
|
82
|
+
--font-sans:
|
|
83
|
+
'DS-SourceSans3',
|
|
84
|
+
'DS-Inter',
|
|
85
|
+
'Inter',
|
|
86
|
+
'PingFang SC',
|
|
87
|
+
'Hiragino Sans GB',
|
|
88
|
+
'Microsoft YaHei',
|
|
89
|
+
'Noto Sans CJK SC',
|
|
90
|
+
'Source Han Sans SC',
|
|
91
|
+
'Noto Sans',
|
|
92
|
+
-apple-system,
|
|
93
|
+
BlinkMacSystemFont,
|
|
94
|
+
'Segoe UI',
|
|
95
|
+
sans-serif;
|
|
96
|
+
--font-reading:
|
|
97
|
+
'DS-Inter',
|
|
98
|
+
'DS-SourceSans3',
|
|
99
|
+
'Inter',
|
|
100
|
+
'PingFang SC',
|
|
101
|
+
'Hiragino Sans GB',
|
|
102
|
+
'Microsoft YaHei',
|
|
103
|
+
'Noto Sans CJK SC',
|
|
104
|
+
'Source Han Sans SC',
|
|
105
|
+
'Noto Sans',
|
|
106
|
+
sans-serif;
|
|
61
107
|
--font-title: 'DS-Project', 'DS-Satoshi', 'DS-Inter', 'Inter', serif;
|
|
62
108
|
--font-soft: 'DS-NunitoSans', 'DS-SourceSans3', 'DS-Inter', sans-serif;
|
|
63
109
|
--ds-font-family: var(--font-sans);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as u,N as k,N as f,a as v,N as y}from"./NotebookEditor-CFHMq_Qt.js";import"./index-CHzJ2xtB.js";import"./plugin-monaco-C8UgLomw.js";import"./plugin-terminal-MXFIPun8.js";import"./plugin-notebook-JRhysCqj.js";import"./NotebookEditor-WFyd8Ybt.js";import"./project-sync-DPmWKmKD.js";import"./index-BsO46tJA.js";import"./code-DbsmSd3Y.js";import"./file-diff-panel-DsvyRz47.js";const c={id:"@ds/plugin-notebook",name:"Notebook Editor",description:"Novel-based rich text editor with real-time collaboration",version:"1.0.0",type:"builtin",author:"DeepScientist Team",icon:"BookOpen",frontend:{entry:"./NotebookEditor",renderMode:"react",fileAssociations:[{extensions:[".ds",".notebook",".dsnb"],mimeTypes:["application/x-blocksuite-notebook"],priority:100},{extensions:[".md",".markdown"],mimeTypes:["text/markdown","text/x-markdown"],priority:95}],multiInstance:!0},backend:{entry:"app.plugins.builtin.notebook_tools",tools:[]},permissions:{frontend:["notebook:read","notebook:write","file:read","file:upload"],backend:["database:read","database:write","file:read","file:write"]},contributes:{tabIcon:"file-text",tabTitle:{dynamic:"resourceName"},toolbar:[{id:"notebook-export",title:"Export",icon:"Download",command:"notebook.export",position:"right"}],contextMenus:[{id:"duplicate-block",title:"Duplicate Block",command:"notebook.duplicateBlock",context:"editor",group:"edit",order:1},{id:"delete-block",title:"Delete Block",command:"notebook.deleteBlock",context:"editor",group:"edit",order:2}]},configSchema:{type:"object",properties:{defaultFontFamily:{type:"string",default:"Inter",description:"Default font family"},autoSaveInterval:{type:"number",default:3e3,minimum:1e3,maximum:3e4,description:"Auto-save interval in milliseconds"},enableCollaboration:{type:"boolean",default:!0,description:"Enable real-time collaboration"},showBlockHandles:{type:"boolean",default:!0,description:"Show block drag handles on hover"}}},defaultConfig:{defaultFontFamily:"Inter",autoSaveInterval:3e3,enableCollaboration:!0,showBlockHandles:!0},lifecycle:{activationEvents:["onFileType:notebook","onCommand:newNotebook"],onActivate:"activate",onDeactivate:"deactivate"}};function s(){console.log("[NotebookPlugin] Activated")}function b(){console.log("[NotebookPlugin] Deactivated")}export{u as EditorLoading,k as NotebookEditor,f as NotebookEditorComponent,v as NotebookToolbar,s as activate,b as deactivate,y as default,c as notebookManifest,c as notebookPluginManifest};
|