@researai/deepscientist 1.5.9 → 1.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +112 -99
  2. package/assets/branding/connector-qq.png +0 -0
  3. package/assets/branding/connector-rokid.png +0 -0
  4. package/assets/branding/connector-weixin.png +0 -0
  5. package/assets/branding/projects.png +0 -0
  6. package/bin/ds.js +519 -63
  7. package/docs/assets/branding/projects.png +0 -0
  8. package/docs/en/00_QUICK_START.md +338 -68
  9. package/docs/en/01_SETTINGS_REFERENCE.md +14 -0
  10. package/docs/en/02_START_RESEARCH_GUIDE.md +180 -4
  11. package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +62 -179
  12. package/docs/en/09_DOCTOR.md +66 -5
  13. package/docs/en/10_WEIXIN_CONNECTOR_GUIDE.md +137 -0
  14. package/docs/en/11_LICENSE_AND_RISK.md +256 -0
  15. package/docs/en/12_GUIDED_WORKFLOW_TOUR.md +446 -0
  16. package/docs/en/13_CORE_ARCHITECTURE_GUIDE.md +297 -0
  17. package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +506 -0
  18. package/docs/en/15_CODEX_PROVIDER_SETUP.md +284 -0
  19. package/docs/en/99_ACKNOWLEDGEMENTS.md +4 -1
  20. package/docs/en/README.md +83 -0
  21. package/docs/images/lingzhu/rokid-agent-platform-create.png +0 -0
  22. package/docs/images/weixin/weixin-plugin-entry.png +0 -0
  23. package/docs/images/weixin/weixin-plugin-entry.svg +33 -0
  24. package/docs/images/weixin/weixin-qr-confirm.svg +30 -0
  25. package/docs/images/weixin/weixin-quest-media-flow.svg +44 -0
  26. package/docs/images/weixin/weixin-settings-bind.svg +57 -0
  27. package/docs/zh/00_QUICK_START.md +345 -72
  28. package/docs/zh/01_SETTINGS_REFERENCE.md +14 -0
  29. package/docs/zh/02_START_RESEARCH_GUIDE.md +181 -3
  30. package/docs/zh/04_LINGZHU_CONNECTOR_GUIDE.md +62 -193
  31. package/docs/zh/09_DOCTOR.md +68 -5
  32. package/docs/zh/10_WEIXIN_CONNECTOR_GUIDE.md +144 -0
  33. package/docs/zh/11_LICENSE_AND_RISK.md +256 -0
  34. package/docs/zh/12_GUIDED_WORKFLOW_TOUR.md +442 -0
  35. package/docs/zh/13_CORE_ARCHITECTURE_GUIDE.md +296 -0
  36. package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +506 -0
  37. package/docs/zh/15_CODEX_PROVIDER_SETUP.md +285 -0
  38. package/docs/zh/99_ACKNOWLEDGEMENTS.md +4 -1
  39. package/docs/zh/README.md +129 -0
  40. package/install.sh +0 -34
  41. package/package.json +2 -2
  42. package/pyproject.toml +1 -1
  43. package/src/deepscientist/__init__.py +1 -1
  44. package/src/deepscientist/annotations.py +343 -0
  45. package/src/deepscientist/artifact/arxiv.py +484 -37
  46. package/src/deepscientist/artifact/service.py +574 -108
  47. package/src/deepscientist/arxiv_library.py +275 -0
  48. package/src/deepscientist/bash_exec/monitor.py +7 -5
  49. package/src/deepscientist/bash_exec/service.py +93 -21
  50. package/src/deepscientist/bridges/builtins.py +2 -0
  51. package/src/deepscientist/bridges/connectors.py +447 -0
  52. package/src/deepscientist/channels/__init__.py +2 -0
  53. package/src/deepscientist/channels/builtins.py +3 -1
  54. package/src/deepscientist/channels/local.py +3 -3
  55. package/src/deepscientist/channels/qq.py +8 -8
  56. package/src/deepscientist/channels/qq_gateway.py +1 -1
  57. package/src/deepscientist/channels/relay.py +14 -8
  58. package/src/deepscientist/channels/weixin.py +59 -0
  59. package/src/deepscientist/channels/weixin_ilink.py +388 -0
  60. package/src/deepscientist/config/models.py +23 -2
  61. package/src/deepscientist/config/service.py +539 -67
  62. package/src/deepscientist/connector/__init__.py +4 -0
  63. package/src/deepscientist/connector/connector_profiles.py +481 -0
  64. package/src/deepscientist/connector/lingzhu_support.py +668 -0
  65. package/src/deepscientist/connector/qq_profiles.py +206 -0
  66. package/src/deepscientist/connector/weixin_support.py +663 -0
  67. package/src/deepscientist/connector_profiles.py +1 -374
  68. package/src/deepscientist/connector_runtime.py +2 -0
  69. package/src/deepscientist/daemon/api/handlers.py +165 -5
  70. package/src/deepscientist/daemon/api/router.py +13 -1
  71. package/src/deepscientist/daemon/app.py +1444 -67
  72. package/src/deepscientist/doctor.py +4 -5
  73. package/src/deepscientist/gitops/diff.py +120 -29
  74. package/src/deepscientist/lingzhu_support.py +1 -182
  75. package/src/deepscientist/mcp/server.py +135 -7
  76. package/src/deepscientist/prompts/builder.py +128 -11
  77. package/src/deepscientist/qq_profiles.py +1 -196
  78. package/src/deepscientist/quest/node_traces.py +23 -0
  79. package/src/deepscientist/quest/service.py +359 -74
  80. package/src/deepscientist/quest/stage_views.py +71 -5
  81. package/src/deepscientist/runners/codex.py +170 -19
  82. package/src/deepscientist/runners/runtime_overrides.py +6 -0
  83. package/src/deepscientist/shared.py +33 -14
  84. package/src/deepscientist/weixin_support.py +1 -0
  85. package/src/prompts/connectors/lingzhu.md +3 -1
  86. package/src/prompts/connectors/qq.md +2 -1
  87. package/src/prompts/connectors/weixin.md +231 -0
  88. package/src/prompts/contracts/shared_interaction.md +4 -1
  89. package/src/prompts/system.md +61 -9
  90. package/src/skills/analysis-campaign/SKILL.md +46 -6
  91. package/src/skills/analysis-campaign/references/campaign-plan-template.md +21 -8
  92. package/src/skills/baseline/SKILL.md +1 -1
  93. package/src/skills/decision/SKILL.md +1 -1
  94. package/src/skills/experiment/SKILL.md +1 -1
  95. package/src/skills/finalize/SKILL.md +1 -1
  96. package/src/skills/idea/SKILL.md +1 -1
  97. package/src/skills/intake-audit/SKILL.md +1 -1
  98. package/src/skills/rebuttal/SKILL.md +74 -1
  99. package/src/skills/rebuttal/references/response-letter-template.md +55 -11
  100. package/src/skills/review/SKILL.md +118 -1
  101. package/src/skills/review/references/experiment-todo-template.md +23 -0
  102. package/src/skills/review/references/review-report-template.md +16 -0
  103. package/src/skills/review/references/revision-log-template.md +4 -0
  104. package/src/skills/scout/SKILL.md +1 -1
  105. package/src/skills/write/SKILL.md +168 -7
  106. package/src/skills/write/references/paper-experiment-matrix-template.md +131 -0
  107. package/src/tui/package.json +1 -1
  108. package/src/ui/dist/assets/{AiManusChatView-BKZ103sn.js → AiManusChatView-CnJcXynW.js} +156 -48
  109. package/src/ui/dist/assets/{AnalysisPlugin-mTTzGAlK.js → AnalysisPlugin-DeyzPEhV.js} +1 -1
  110. package/src/ui/dist/assets/{CliPlugin-BH58n3GY.js → CliPlugin-CB1YODQn.js} +164 -9
  111. package/src/ui/dist/assets/{CodeEditorPlugin-BKGRUH7e.js → CodeEditorPlugin-B-xicq1e.js} +8 -8
  112. package/src/ui/dist/assets/{CodeViewerPlugin-BMADwFWJ.js → CodeViewerPlugin-DT54ysXa.js} +5 -5
  113. package/src/ui/dist/assets/{DocViewerPlugin-ZOnTIHLN.js → DocViewerPlugin-DQtKT-VD.js} +3 -3
  114. package/src/ui/dist/assets/{GitDiffViewerPlugin-CQ7h1Djm.js → GitDiffViewerPlugin-hqHbCfnv.js} +20 -21
  115. package/src/ui/dist/assets/{ImageViewerPlugin-GVS5MsnC.js → ImageViewerPlugin-OcVo33jV.js} +5 -5
  116. package/src/ui/dist/assets/{LabCopilotPanel-BZNv1JML.js → LabCopilotPanel-DdGwhEUV.js} +11 -11
  117. package/src/ui/dist/assets/{LabPlugin-TWcJsdQA.js → LabPlugin-Ciz1gDaX.js} +2 -1
  118. package/src/ui/dist/assets/{LatexPlugin-DIjHiR2x.js → LatexPlugin-BhmjNQRC.js} +37 -11
  119. package/src/ui/dist/assets/{MarkdownViewerPlugin-D3ooGAH0.js → MarkdownViewerPlugin-BzdVH9Bx.js} +4 -4
  120. package/src/ui/dist/assets/{MarketplacePlugin-DfVfE9hN.js → MarketplacePlugin-DmyHspXt.js} +3 -3
  121. package/src/ui/dist/assets/{NotebookEditor-DDl0_Mc0.js → NotebookEditor-BMXKrDRk.js} +1 -1
  122. package/src/ui/dist/assets/{NotebookEditor-s8JhzuX1.js → NotebookEditor-BTVYRGkm.js} +12 -12
  123. package/src/ui/dist/assets/{PdfLoader-C2Sf6SJM.js → PdfLoader-CvcjJHXv.js} +14 -7
  124. package/src/ui/dist/assets/{PdfMarkdownPlugin-CXFLoIsa.js → PdfMarkdownPlugin-DW2ej8Vk.js} +73 -6
  125. package/src/ui/dist/assets/{PdfViewerPlugin-BYTmz2fK.js → PdfViewerPlugin-CmlDxbhU.js} +103 -34
  126. package/src/ui/dist/assets/PdfViewerPlugin-DQ11QcSf.css +3627 -0
  127. package/src/ui/dist/assets/{SearchPlugin-CjWBI1O9.js → SearchPlugin-DAjQZPSv.js} +1 -1
  128. package/src/ui/dist/assets/{TextViewerPlugin-DdOBU3-S.js → TextViewerPlugin-C-nVAZb_.js} +5 -4
  129. package/src/ui/dist/assets/{VNCViewer-B8HGgLwQ.js → VNCViewer-D7-dIYon.js} +10 -10
  130. package/src/ui/dist/assets/bot-C_G4WtNI.js +21 -0
  131. package/src/ui/dist/assets/branding/logo-rokid.png +0 -0
  132. package/src/ui/dist/assets/browser-BAcuE0Xj.js +2895 -0
  133. package/src/ui/dist/assets/{code-BWAY76JP.js → code-Cd7WfiWq.js} +1 -1
  134. package/src/ui/dist/assets/{file-content-C1NwU5oQ.js → file-content-B57zsL9y.js} +1 -1
  135. package/src/ui/dist/assets/{file-diff-panel-CywslwB9.js → file-diff-panel-DVoheLFq.js} +1 -1
  136. package/src/ui/dist/assets/{file-socket-B4kzuOBQ.js → file-socket-B5kXFxZP.js} +1 -1
  137. package/src/ui/dist/assets/{image-D-NZM-6P.js → image-LLOjkMHF.js} +1 -1
  138. package/src/ui/dist/assets/{index-DGIYDuTv.css → index-BQG-1s2o.css} +40 -13
  139. package/src/ui/dist/assets/{index-DHZJ_0TI.js → index-C3r2iGrp.js} +12 -12
  140. package/src/ui/dist/assets/{index-7Chr1g9c.js → index-CLQauncb.js} +15050 -9561
  141. package/src/ui/dist/assets/index-Dxa2eYMY.js +25 -0
  142. package/src/ui/dist/assets/{index-BdM1Gqfr.js → index-hOUOWbW2.js} +2 -2
  143. package/src/ui/dist/assets/{monaco-Cb2uKKe6.js → monaco-BGGAEii3.js} +1 -1
  144. package/src/ui/dist/assets/{pdf-effect-queue-DSw_D3RV.js → pdf-effect-queue-DlEr1_y5.js} +16 -1
  145. package/src/ui/dist/assets/pdf.worker.min-yatZIOMy.mjs +21 -0
  146. package/src/ui/dist/assets/{popover-Bg72DGgT.js → popover-CWJbJuYY.js} +1 -1
  147. package/src/ui/dist/assets/{project-sync-Ce_0BglY.js → project-sync-CRJiucYO.js} +18 -77
  148. package/src/ui/dist/assets/select-CoHB7pvH.js +1690 -0
  149. package/src/ui/dist/assets/{sigma-DPaACDrh.js → sigma-D5aJWR8J.js} +1 -1
  150. package/src/ui/dist/assets/{index-CDxNdQdz.js → square-check-big-DUK_mnkS.js} +2 -13
  151. package/src/ui/dist/assets/{trash-BvTgE5__.js → trash-ChU3SEE3.js} +1 -1
  152. package/src/ui/dist/assets/{useCliAccess-CgPeMOwP.js → useCliAccess-BrJBV3tY.js} +1 -1
  153. package/src/ui/dist/assets/{useFileDiffOverlay-xPhz7P5B.js → useFileDiffOverlay-C2OQaVWc.js} +1 -1
  154. package/src/ui/dist/assets/{wrap-text-C3Un3YQr.js → wrap-text-C7Qqh-om.js} +1 -1
  155. package/src/ui/dist/assets/{zoom-out-BgxLa0Ri.js → zoom-out-rtX0FKya.js} +1 -1
  156. package/src/ui/dist/index.html +2 -2
  157. package/src/ui/dist/assets/AutoFigurePlugin-BGxN8Umr.css +0 -3056
  158. package/src/ui/dist/assets/AutoFigurePlugin-C_wWw4AP.js +0 -8149
  159. package/src/ui/dist/assets/PdfViewerPlugin-BJXtIwj_.css +0 -260
  160. package/src/ui/dist/assets/Stepper-B0Dd8CxK.js +0 -158
  161. package/src/ui/dist/assets/bibtex-CKaefIN2.js +0 -189
  162. package/src/ui/dist/assets/file-utils-H2fjA46S.js +0 -109
  163. package/src/ui/dist/assets/message-square-BzjLiXir.js +0 -16
  164. package/src/ui/dist/assets/pdfjs-DU1YE8WO.js +0 -3
  165. package/src/ui/dist/assets/tooltip-C_mA6R0w.js +0 -108
@@ -1,26 +1,25 @@
1
- import { z as createLucideIcon, aI as inferWorkspaceContentKindFromMetadata, t as BUILTIN_PLUGINS, aJ as getPluginIdFromMimeType, aK as getPluginIdFromExtension, r as reactExports, j as jsxRuntimeExports, u as useI18n, b as cn, a as useWorkspaceSurfaceStore, aL as useQuery, k as FileText, a3 as Button, g as RefreshCw, aM as buildQuestFileNodeFromDocument, N as toFilesResourcePath, aN as client } from './index-7Chr1g9c.js';
2
- import ImageViewerPlugin from './ImageViewerPlugin-GVS5MsnC.js';
3
- import MarkdownViewerPlugin from './MarkdownViewerPlugin-D3ooGAH0.js';
4
- import { N as NotebookEditor } from './NotebookEditor-s8JhzuX1.js';
5
- import PdfViewerPlugin from './PdfViewerPlugin-BYTmz2fK.js';
6
- import './image-D-NZM-6P.js';
7
- import './zoom-out-BgxLa0Ri.js';
8
- import './code-BWAY76JP.js';
9
- import './NotebookEditor-DDl0_Mc0.js';
1
+ import { w as createLucideIcon, aK as inferWorkspaceContentKindFromMetadata, v as BUILTIN_PLUGINS, aL as getPluginIdFromMimeType, aM as getPluginIdFromExtension, r as reactExports, j as jsxRuntimeExports, u as useI18n, b as cn, a as useWorkspaceSurfaceStore, aN as useQuery, k as FileText, aO as Button, g as RefreshCw, aP as buildQuestFileNodeFromDocument, W as toFilesResourcePath, aQ as client } from './index-CLQauncb.js';
2
+ import ImageViewerPlugin from './ImageViewerPlugin-OcVo33jV.js';
3
+ import MarkdownViewerPlugin from './MarkdownViewerPlugin-BzdVH9Bx.js';
4
+ import { N as NotebookEditor } from './NotebookEditor-BTVYRGkm.js';
5
+ import PdfViewerPlugin from './PdfViewerPlugin-CmlDxbhU.js';
6
+ import './image-LLOjkMHF.js';
7
+ import './zoom-out-rtX0FKya.js';
8
+ import './code-Cd7WfiWq.js';
9
+ import './NotebookEditor-BMXKrDRk.js';
10
10
  import './function-B5QZkkHC.js';
11
11
  import './yjs-DncrqiZ8.js';
12
- import './project-sync-Ce_0BglY.js';
13
- import './index-CDxNdQdz.js';
14
- import './popover-Bg72DGgT.js';
15
- import './trash-BvTgE5__.js';
16
- import './sigma-DPaACDrh.js';
17
- import './useFileDiffOverlay-xPhz7P5B.js';
18
- import './file-diff-panel-CywslwB9.js';
19
- import './file-socket-B4kzuOBQ.js';
20
- import './pdf-effect-queue-DSw_D3RV.js';
21
- import './bibtex-CKaefIN2.js';
22
- import './PdfLoader-C2Sf6SJM.js';
23
- import './message-square-BzjLiXir.js';
12
+ import './project-sync-CRJiucYO.js';
13
+ import './square-check-big-DUK_mnkS.js';
14
+ import './popover-CWJbJuYY.js';
15
+ import './trash-ChU3SEE3.js';
16
+ import './sigma-D5aJWR8J.js';
17
+ import './useFileDiffOverlay-C2OQaVWc.js';
18
+ import './file-diff-panel-DVoheLFq.js';
19
+ import './file-socket-B5kXFxZP.js';
20
+ import './pdf-effect-queue-DlEr1_y5.js';
21
+ import './PdfLoader-CvcjJHXv.js';
22
+ import './index-Dxa2eYMY.js';
24
23
 
25
24
  /**
26
25
  * @license lucide-react v0.511.0 - ISC
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-7Chr1g9c.js","assets/index-DGIYDuTv.css"])))=>i.map(i=>d[i]);
2
- import { z as createLucideIcon, r as reactExports, j as jsxRuntimeExports, b as cn, af as RotateCcw, ag as Info, Y as Download, L as LoaderCircle, _ as __vitePreload } from './index-7Chr1g9c.js';
3
- import { I as Image } from './image-D-NZM-6P.js';
4
- import { Z as ZoomOut, a as ZoomIn } from './zoom-out-BgxLa0Ri.js';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CLQauncb.js","assets/index-BQG-1s2o.css"])))=>i.map(i=>d[i]);
2
+ import { w as createLucideIcon, r as reactExports, j as jsxRuntimeExports, b as cn, ah as RotateCcw, ai as Info, a3 as Download, L as LoaderCircle, _ as __vitePreload } from './index-CLQauncb.js';
3
+ import { I as Image } from './image-LLOjkMHF.js';
4
+ import { Z as ZoomOut, a as ZoomIn } from './zoom-out-rtX0FKya.js';
5
5
 
6
6
  /**
7
7
  * @license lucide-react v0.511.0 - ISC
@@ -280,7 +280,7 @@ function ImageViewerPlugin({
280
280
  }
281
281
  const loadImageUrl = async () => {
282
282
  try {
283
- const { createFileObjectUrl } = await __vitePreload(async () => { const { createFileObjectUrl } = await import('./index-7Chr1g9c.js').then(n => n.el);return { createFileObjectUrl }},true?__vite__mapDeps([0,1]):void 0);
283
+ const { createFileObjectUrl } = await __vitePreload(async () => { const { createFileObjectUrl } = await import('./index-CLQauncb.js').then(n => n.el);return { createFileObjectUrl }},true?__vite__mapDeps([0,1]):void 0);
284
284
  objectUrl = await createFileObjectUrl(context.resourceId);
285
285
  if (cancelled) {
286
286
  URL.revokeObjectURL(objectUrl);
@@ -1,15 +1,15 @@
1
- import { z as createLucideIcon, r as reactExports, aO as reactDomExports, aP as useReducedMotion, j as jsxRuntimeExports, aQ as useQueryClient, p as useToast, u as useI18n, ay as useLabCopilotStore, aR as useLabGraphSelectionStore, aS as useChatSessionStore, aT as buildAvatarColorMap, aU as isLabWorkingStatus, aV as getLabAgentDirectSession, aW as buildAgentDescriptor, aX as resolveAgentLogo, aD as resolveAgentDisplayName, aE as resolveAgentMentionLabel, aY as AnimatePresence, aZ as motion, a3 as Button, a_ as pickAvatarFrameColor, aF as resolveQuestLabel, d as Check, b as cn, x as useAuthStore, a$ as useCopilotDockHeaderPortal, b0 as assignLabAgent, b1 as ScrollArea, L as LoaderCircle, b2 as likeLabMoment, b3 as unlikeLabMoment, b4 as commentLabMoment, b5 as Ellipsis, b6 as Plus, l as Search, b7 as Select, b8 as SelectTrigger, b9 as SelectValue, ba as SelectContent, bb as SelectItem, bc as Dialog, bd as DialogContent, be as DialogHeader, bf as DialogTitle, bg as DialogFooter, bh as getLabGroupSession, bi as getLabFriendsSession } from './index-7Chr1g9c.js';
2
- import { P as Popover, a as PopoverTrigger, b as PopoverContent } from './popover-Bg72DGgT.js';
3
- import { A as AiManusChatView, D as DEFAULT_AGENT_ID, C as ChatBox, a as applyChatEvent, u as useSSESession, b as ChatMessage, r as renderMarkdown } from './AiManusChatView-BKZ103sn.js';
4
- import './file-content-C1NwU5oQ.js';
5
- import './file-utils-H2fjA46S.js';
1
+ import { w as createLucideIcon, r as reactExports, aR as reactDomExports, aS as useReducedMotion, j as jsxRuntimeExports, aT as useQueryClient, o as useToast, u as useI18n, aA as useLabCopilotStore, aU as useLabGraphSelectionStore, aV as useChatSessionStore, aW as buildAvatarColorMap, aX as isLabWorkingStatus, aY as getLabAgentDirectSession, aZ as buildAgentDescriptor, a_ as resolveAgentLogo, aF as resolveAgentDisplayName, aG as resolveAgentMentionLabel, a$ as AnimatePresence, b0 as motion, aO as Button, b1 as pickAvatarFrameColor, aH as resolveQuestLabel, d as Check, b as cn, z as useAuthStore, b2 as useCopilotDockHeaderPortal, b3 as assignLabAgent, b4 as ScrollArea, L as LoaderCircle, b5 as likeLabMoment, b6 as unlikeLabMoment, b7 as commentLabMoment, b8 as Ellipsis, b9 as Plus, l as Search, ba as Dialog, bb as DialogContent, bc as DialogHeader, bd as DialogTitle, be as DialogFooter, bf as getLabGroupSession, bg as getLabFriendsSession } from './index-CLQauncb.js';
2
+ import { P as Popover, a as PopoverTrigger, b as PopoverContent } from './popover-CWJbJuYY.js';
3
+ import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from './select-CoHB7pvH.js';
4
+ import { A as AiManusChatView, D as DEFAULT_AGENT_ID, C as ChatBox, a as applyChatEvent, u as useSSESession, b as ChatMessage, r as renderMarkdown } from './AiManusChatView-CnJcXynW.js';
5
+ import './index-Dxa2eYMY.js';
6
+ import './file-content-B57zsL9y.js';
6
7
  import './file-jump-queue-r5XKgJEV.js';
7
- import './pdf-effect-queue-DSw_D3RV.js';
8
- import './file-diff-panel-CywslwB9.js';
9
- import './message-square-BzjLiXir.js';
10
- import './NotebookEditor-DDl0_Mc0.js';
11
- import './tooltip-C_mA6R0w.js';
12
- import './trash-BvTgE5__.js';
8
+ import './pdf-effect-queue-DlEr1_y5.js';
9
+ import './file-diff-panel-DVoheLFq.js';
10
+ import './bot-C_G4WtNI.js';
11
+ import './NotebookEditor-BMXKrDRk.js';
12
+ import './trash-ChU3SEE3.js';
13
13
 
14
14
  /**
15
15
  * @license lucide-react v0.511.0 - ISC
@@ -1,4 +1,5 @@
1
- import { z as createLucideIcon, aL as useQuery, r as reactExports, j as jsxRuntimeExports, bj as Skeleton, bk as Badge, aN as client, bl as ReactFlowProvider, u as useI18n, aD as resolveAgentDisplayName, aX as resolveAgentLogo, a_ as pickAvatarFrameColor, aU as isLabWorkingStatus, bm as normalizeLabStatus, bn as useNodesState, bo as useReactFlow, bp as index, bq as Background, b as cn, br as Handle, bs as Position, bt as CircleHelp, bu as OrbitLogoStatus, bv as Clock, bw as Moon, aG as formatRelativeTime, n as ChevronDown, aQ as useQueryClient, ay as useLabCopilotStore, aR as useLabGraphSelectionStore, bx as resolveLabCanvasSelectionSemantic, a3 as Button, g as RefreshCw, by as LabQuestGraphCanvas, bz as ArrowLeft, b1 as ScrollArea, D as Sparkles, bA as GitBranch, bB as Bot, bC as LAB_CANVAS_SEMANTIC_TONE_META, bD as getLabQuest, bE as getLabQuestSummary, bF as getLabQuestEventPayload, bG as getLabQuestNodeTrace, bH as isQuestRuntimeSurface, bI as getApiBaseUrl, bJ as redirectToLanding, bK as useCliStore, bL as useActiveTab, t as BUILTIN_PLUGINS, bM as listLabTemplates, az as listLabAgents, aA as listLabQuests, bN as getLabOverview, bO as getProject, bP as useMaxEntitlement } from './index-7Chr1g9c.js';
1
+ import { w as createLucideIcon, aN as useQuery, r as reactExports, j as jsxRuntimeExports, bh as Skeleton, bi as Badge, aQ as client, bj as ReactFlowProvider, u as useI18n, aF as resolveAgentDisplayName, a_ as resolveAgentLogo, b1 as pickAvatarFrameColor, aX as isLabWorkingStatus, bk as normalizeLabStatus, bl as useNodesState, bm as useReactFlow, bn as index, bo as Background, b as cn, bp as Handle, bq as Position, br as CircleHelp, bs as OrbitLogoStatus, bt as Clock, bu as Moon, aI as formatRelativeTime, m as ChevronDown, aT as useQueryClient, aA as useLabCopilotStore, aU as useLabGraphSelectionStore, bv as resolveLabCanvasSelectionSemantic, aO as Button, g as RefreshCw, bw as LabQuestGraphCanvas, bx as ArrowLeft, b4 as ScrollArea, N as Sparkles, by as GitBranch, bz as LAB_CANVAS_SEMANTIC_TONE_META, bA as getLabQuest, bB as getLabQuestSummary, bC as getLabQuestEventPayload, bD as getLabQuestNodeTrace, bE as isQuestRuntimeSurface, bF as getApiBaseUrl, bG as redirectToLanding, bH as useCliStore, bI as useActiveTab, v as BUILTIN_PLUGINS, bJ as listLabTemplates, aB as listLabAgents, aC as listLabQuests, bK as getLabOverview, bL as getProject, bM as useMaxEntitlement } from './index-CLQauncb.js';
2
+ import { B as Bot } from './bot-C_G4WtNI.js';
2
3
 
3
4
  /**
4
5
  * @license lucide-react v0.511.0 - ISC
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-Cb2uKKe6.js","assets/index-7Chr1g9c.js","assets/index-DGIYDuTv.css","assets/yjs-DncrqiZ8.js","assets/function-B5QZkkHC.js","assets/awareness-C0NPR2Dj.js"])))=>i.map(i=>d[i]);
2
- import { z as createLucideIcon, x as useAuthStore, u as useI18n, a as useWorkspaceSurfaceStore, r as reactExports, f as useFileTreeStore, N as toFilesResourcePath, O as checkProjectAccess, P as listFiles, K as getFileContent, _ as __vitePreload, J as updateFileContent, Q as compileLatex, U as listLatexBuilds, j as jsxRuntimeExports, b as cn, k as FileText, V as Link2, L as LoaderCircle, S as Save, W as Play, T as TriangleAlert, Y as Download, Z as getLatexBuild, $ as getLatexBuildPdfBlob, a0 as getLatexBuildLogText, h as dynamic } from './index-7Chr1g9c.js';
3
- import { P as ProjectSyncClient } from './project-sync-Ce_0BglY.js';
4
- import { c as configureMonacoLoader } from './monaco-Cb2uKKe6.js';
5
- import { P as PAGE_DIMENSIONS, a as PdfLoader, b as PDF_CMAP_URL, c as PDF_WORKER_SRC, Z as ZOOM_LEVELS, d as PdfHighlighter } from './PdfLoader-C2Sf6SJM.js';
6
- import { Z as ZoomOut, a as ZoomIn } from './zoom-out-BgxLa0Ri.js';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-BGGAEii3.js","assets/index-CLQauncb.js","assets/index-BQG-1s2o.css","assets/yjs-DncrqiZ8.js","assets/function-B5QZkkHC.js","assets/awareness-C0NPR2Dj.js"])))=>i.map(i=>d[i]);
2
+ import { w as createLucideIcon, z as useAuthStore, u as useI18n, a as useWorkspaceSurfaceStore, r as reactExports, f as useFileTreeStore, x as supportsSocketIo, W as toFilesResourcePath, Y as checkProjectAccess, Z as listFiles, V as getFileContent, _ as __vitePreload, U as updateFileContent, $ as compileLatex, a0 as listLatexBuilds, j as jsxRuntimeExports, b as cn, k as FileText, a1 as Link2, L as LoaderCircle, S as Save, a2 as Play, T as TriangleAlert, a3 as Download, a4 as getLatexBuild, a5 as getLatexBuildPdfBlob, a6 as getLatexBuildLogText, h as dynamic } from './index-CLQauncb.js';
3
+ import { P as ProjectSyncClient } from './project-sync-CRJiucYO.js';
4
+ import { c as configureMonacoLoader } from './monaco-BGGAEii3.js';
5
+ import { P as PAGE_DIMENSIONS, a as PdfLoader, b as PDF_CMAP_URL, c as PDF_WORKER_SRC, Z as ZOOM_LEVELS, d as PdfHighlighter } from './PdfLoader-CvcjJHXv.js';
6
+ import { Z as ZoomOut, a as ZoomIn } from './zoom-out-rtX0FKya.js';
7
7
 
8
8
  /**
9
9
  * @license lucide-react v0.511.0 - ISC
@@ -19,7 +19,7 @@ const __iconNode = [
19
19
  ];
20
20
  const AtSign = createLucideIcon("at-sign", __iconNode);
21
21
 
22
- const MonacoEditor = dynamic(() => __vitePreload(() => import('./monaco-Cb2uKKe6.js').then(n => n.i),true?__vite__mapDeps([0,1,2]):void 0), { });
22
+ const MonacoEditor = dynamic(() => __vitePreload(() => import('./monaco-BGGAEii3.js').then(n => n.i),true?__vite__mapDeps([0,1,2]):void 0), { });
23
23
  configureMonacoLoader();
24
24
  function useIsDarkMode() {
25
25
  const [isDark, setIsDark] = reactExports.useState(() => {
@@ -123,7 +123,7 @@ function resolveLatexFileId(files, rawPath) {
123
123
  const simpleName = files.find((file) => file.name.toLowerCase() === basename);
124
124
  return simpleName?.id ?? null;
125
125
  }
126
- function PdfSurface({ pdfDocument, scale, highlights, onPageWidth }) {
126
+ function PdfSurface({ pdfDocument, zoomFactor, highlights, onPageWidth }) {
127
127
  reactExports.useEffect(() => {
128
128
  let cancelled = false;
129
129
  pdfDocument.getPage(1).then((page) => {
@@ -139,7 +139,8 @@ function PdfSurface({ pdfDocument, scale, highlights, onPageWidth }) {
139
139
  cancelled = true;
140
140
  };
141
141
  }, [onPageWidth, pdfDocument]);
142
- const pdfScaleValue = Number.isFinite(scale) && scale > 0 ? String(scale) : "page-width";
142
+ const safeZoomFactor = Number.isFinite(zoomFactor) && zoomFactor > 0 ? zoomFactor : 1;
143
+ const pdfScaleValue = Math.abs(safeZoomFactor - 1) < 1e-3 ? "page-width" : `page-width:${safeZoomFactor}`;
143
144
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
144
145
  PdfHighlighter,
145
146
  {
@@ -219,6 +220,7 @@ function LatexPlugin({ context, tabId, setDirty, setTitle }) {
219
220
  const latexCompletionDisposablesRef = reactExports.useRef([]);
220
221
  const effectiveReadOnly = viewReadOnly || roleWritable === false;
221
222
  const socketAuthMode = "user";
223
+ const canUseRealtimeSync = supportsSocketIo();
222
224
  const isBibFile = activeFileName.toLowerCase().endsWith(".bib");
223
225
  reactExports.useEffect(() => {
224
226
  const activeFileMeta = files.find((file) => file.id === activeFileId) ?? files.find((file) => file.name === activeFileName) ?? null;
@@ -375,6 +377,30 @@ function LatexPlugin({ context, tabId, setDirty, setTitle }) {
375
377
  const ytext = ydoc.getText("content");
376
378
  yDocRef.current = ydoc;
377
379
  yTextRef.current = ytext;
380
+ if (!canUseRealtimeSync) {
381
+ const seed = await getFileContent(activeFileId);
382
+ ydoc.transact(() => {
383
+ const length = ytext.length || 0;
384
+ if (length) ytext.delete(0, length);
385
+ if (seed) ytext.insert(0, seed);
386
+ }, "ds-local-seed");
387
+ const textNow2 = ytext.toString();
388
+ setInitialText(textNow2);
389
+ lastSavedRef.current = textNow2;
390
+ setIsDirty(false);
391
+ setDirty(false);
392
+ setSyncState("ready");
393
+ cleanup = () => {
394
+ try {
395
+ bindingCleanupRef.current?.();
396
+ } finally {
397
+ bindingCleanupRef.current = null;
398
+ if (yDocRef.current === ydoc) yDocRef.current = null;
399
+ if (yTextRef.current === ytext) yTextRef.current = null;
400
+ }
401
+ };
402
+ return;
403
+ }
378
404
  const sync = new ProjectSyncClient(projectId, {
379
405
  authMode: socketAuthMode,
380
406
  docKind: "latex"
@@ -542,7 +568,7 @@ function LatexPlugin({ context, tabId, setDirty, setTitle }) {
542
568
  cancelled = true;
543
569
  cleanup?.();
544
570
  };
545
- }, [activeFileId, effectiveReadOnly, projectId, resetNonce, setDirty, socketAuthMode, t, user?.id, user?.username]);
571
+ }, [activeFileId, canUseRealtimeSync, effectiveReadOnly, projectId, resetNonce, setDirty, socketAuthMode, t, user?.id, user?.username]);
546
572
  const jumpEditorToLine = reactExports.useCallback((line) => {
547
573
  const editor = editorRef.current;
548
574
  if (!editor) return false;
@@ -1747,7 +1773,7 @@ function LatexPlugin({ context, tabId, setDirty, setTitle }) {
1747
1773
  PdfSurface,
1748
1774
  {
1749
1775
  pdfDocument,
1750
- scale: renderScale,
1776
+ zoomFactor: zoomScale,
1751
1777
  highlights: emptyHighlights,
1752
1778
  onPageWidth: handlePageWidth
1753
1779
  }
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-7Chr1g9c.js","assets/index-DGIYDuTv.css"])))=>i.map(i=>d[i]);
2
- import { u as useI18n, a as useWorkspaceSurfaceStore, r as reactExports, R as React, a1 as getQuestMarkdownContextFromFileId, c as copyToClipboard, j as jsxRuntimeExports, L as LoaderCircle, C as CircleAlert, a2 as MARKDOWN_VIEWER_STYLES, k as FileText, E as Eye, b as cn, d as Check, e as Copy, M as MarkdownRenderer, _ as __vitePreload } from './index-7Chr1g9c.js';
3
- import { C as Code } from './code-BWAY76JP.js';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CLQauncb.js","assets/index-BQG-1s2o.css"])))=>i.map(i=>d[i]);
2
+ import { u as useI18n, a as useWorkspaceSurfaceStore, r as reactExports, R as React, a7 as getQuestMarkdownContextFromFileId, c as copyToClipboard, j as jsxRuntimeExports, L as LoaderCircle, C as CircleAlert, a8 as MARKDOWN_VIEWER_STYLES, k as FileText, E as Eye, b as cn, d as Check, e as Copy, M as MarkdownRenderer, _ as __vitePreload } from './index-CLQauncb.js';
3
+ import { C as Code } from './code-Cd7WfiWq.js';
4
4
 
5
5
  function isMdxDocument(fileName) {
6
6
  if (!fileName) return false;
@@ -217,7 +217,7 @@ function MarkdownViewerPlugin({
217
217
  setLoading(false);
218
218
  return;
219
219
  }
220
- const { getFileContent } = await __vitePreload(async () => { const { getFileContent } = await import('./index-7Chr1g9c.js').then(n => n.el);return { getFileContent }},true?__vite__mapDeps([0,1]):void 0);
220
+ const { getFileContent } = await __vitePreload(async () => { const { getFileContent } = await import('./index-CLQauncb.js').then(n => n.el);return { getFileContent }},true?__vite__mapDeps([0,1]):void 0);
221
221
  const text = await getFileContent(context.resourceId);
222
222
  setContent(text);
223
223
  } catch (err) {
@@ -1,6 +1,6 @@
1
- import { z as createLucideIcon, r as reactExports, a5 as useNavigate, o as useTabsStore, a6 as useOpenFile, f as useFileTreeStore, t as BUILTIN_PLUGINS, j as jsxRuntimeExports, l as Search, D as Sparkles, a7 as Terminal, a8 as Settings, a9 as Puzzle, aa as BookOpen, k as FileText, ab as FileCode2, b as cn } from './index-7Chr1g9c.js';
2
- import { S as Sigma } from './sigma-DPaACDrh.js';
3
- import { I as Image } from './image-D-NZM-6P.js';
1
+ import { w as createLucideIcon, r as reactExports, aa as useNavigate, n as useTabsStore, ab as useOpenFile, f as useFileTreeStore, v as BUILTIN_PLUGINS, j as jsxRuntimeExports, l as Search, N as Sparkles, ac as Terminal, ad as Settings, ae as Puzzle, af as BookOpen, k as FileText, ag as FileCode2, b as cn } from './index-CLQauncb.js';
2
+ import { S as Sigma } from './sigma-D5aJWR8J.js';
3
+ import { I as Image } from './image-LLOjkMHF.js';
4
4
 
5
5
  /**
6
6
  * @license lucide-react v0.511.0 - ISC
@@ -1,4 +1,4 @@
1
- import { R as React, r as reactExports, aO as reactDomExports, e9 as ReactDOM, I as create, j as jsxRuntimeExports, ea as createSlot, ak as useId, eb as Root, ec as Portal, ed as Overlay, ee as Content, ah as composeRefs, d9 as getDefaultExportFromCjs$2, ef as clsx, eg as shimExports$1, eh as katex, ei as Slot, y as resolveApiBaseUrl, c2 as uploadFileAuto, ej as nanoid, ek as cx } from './index-7Chr1g9c.js';
1
+ import { R as React, r as reactExports, aR as reactDomExports, e8 as ReactDOM, Q as create, j as jsxRuntimeExports, e9 as createSlot, am as useId, ea as Root, eb as Portal, ec as Overlay, ed as Content, aj as composeRefs, d7 as getDefaultExportFromCjs$2, ee as clsx, ef as shimExports$1, eg as katex, eh as Slot, D as resolveApiBaseUrl, ei as uploadFileAuto, ej as nanoid, ek as cx } from './index-CLQauncb.js';
2
2
 
3
3
  // ::- Persistent data structure representing an ordered mapping from
4
4
  // strings to values, with some convenient update methods.
@@ -1,16 +1,16 @@
1
- import { z as createLucideIcon, j as jsxRuntimeExports, a3 as Button, n as ChevronDown, d as Check, b as cn, r as reactExports, bz as ArrowLeft, c8 as ArrowRight, ce as Separator, cf as ArrowUp, cg as Trash2, u as useI18n, p as useToast, K as getFileContent, L as LoaderCircle, e as Copy, C as CircleAlert, f as useFileTreeStore, a1 as getQuestMarkdownContextFromFileId, ch as rewriteQuestMarkdownForDisplay, ci as rewriteQuestMarkdownForSave, cj as uploadQuestDocumentAsset, J as updateFileContent } from './index-7Chr1g9c.js';
2
- import { P as PluginKey, a as Plugin, S as Slice, F as Fragment, T as TextSelection, A as AllSelection, N as NodeSelection, E as Extension, m as me, l as le, u as useCurrentEditor, w, b as P, f as findParentNodeClosestToPos, g as getEditorMarkdown, s as setEditorMarkdown, q, c as uploadNotebookAsset, r as resolveNotebookAssetUrl, d as defaultExtensions, J, U, I, e as T, B, O, h as S, K as K$1, G, i as ce, j as isSupportedNotebookAsset } from './NotebookEditor-DDl0_Mc0.js';
1
+ import { w as createLucideIcon, j as jsxRuntimeExports, aO as Button, m as ChevronDown, d as Check, b as cn, r as reactExports, bx as ArrowLeft, c6 as ArrowRight, c7 as Separator, c8 as ArrowUp, c9 as Trash2, u as useI18n, o as useToast, V as getFileContent, L as LoaderCircle, e as Copy, C as CircleAlert, f as useFileTreeStore, a7 as getQuestMarkdownContextFromFileId, ca as rewriteQuestMarkdownForDisplay, cb as rewriteQuestMarkdownForSave, cc as uploadQuestDocumentAsset, U as updateFileContent } from './index-CLQauncb.js';
2
+ import { P as PluginKey, a as Plugin, S as Slice, F as Fragment, T as TextSelection, A as AllSelection, N as NodeSelection, E as Extension, m as me, l as le, u as useCurrentEditor, w, b as P, f as findParentNodeClosestToPos, g as getEditorMarkdown, s as setEditorMarkdown, q, c as uploadNotebookAsset, r as resolveNotebookAssetUrl, d as defaultExtensions, J, U, I, e as T, B, O, h as S, K as K$1, G, i as ce, j as isSupportedNotebookAsset } from './NotebookEditor-BMXKrDRk.js';
3
3
  import { a4 as BIT8, ai as BIT30, ab as min, $ as max, y as unexpectedCase, n as methodUnimplemented, aj as keys, u as every, H as setIfUndefined, D as create } from './function-B5QZkkHC.js';
4
4
  import { t as toBase64, e as encodeAny, i as isBrowser, d as doc, s as snapshot, D as Doc, a as applyUpdateV2, f as findIndexSS, b as iterateDeletedStructs, c as typeListToArraySnapshot, S as Snapshot, U as UndoManager, g as createSnapshot, h as isDeleted, Y as YXmlElement, j as YXmlText, k as YText, o as oneOf, C as ContentString, l as ContentFormat, m as createDeleteSet, I as Item, n as createRelativePositionFromTypeIndex, R as RelativePosition, p as findRootTypeKey, q as createID, r as createAbsolutePositionFromRelativePosition, u as isParentOf, v as ContentType, w as encodeStateVector, x as applyUpdate, y as mergeUpdates } from './yjs-DncrqiZ8.js';
5
- import { P as ProjectSyncClient } from './project-sync-Ce_0BglY.js';
6
- import { S as SquareCheckBig } from './index-CDxNdQdz.js';
7
- import { C as Code } from './code-BWAY76JP.js';
8
- import { I as Image } from './image-D-NZM-6P.js';
9
- import { P as Popover, a as PopoverTrigger, b as PopoverContent } from './popover-Bg72DGgT.js';
10
- import { T as Trash, A as ArrowDown } from './trash-BvTgE5__.js';
11
- import { S as Sigma } from './sigma-DPaACDrh.js';
12
- import { u as useFileDiffOverlay } from './useFileDiffOverlay-xPhz7P5B.js';
13
- import { F as FileDiffPanel } from './file-diff-panel-CywslwB9.js';
5
+ import { P as ProjectSyncClient } from './project-sync-CRJiucYO.js';
6
+ import { S as SquareCheckBig } from './square-check-big-DUK_mnkS.js';
7
+ import { C as Code } from './code-Cd7WfiWq.js';
8
+ import { I as Image } from './image-LLOjkMHF.js';
9
+ import { P as Popover, a as PopoverTrigger, b as PopoverContent } from './popover-CWJbJuYY.js';
10
+ import { T as Trash, A as ArrowDown } from './trash-ChU3SEE3.js';
11
+ import { S as Sigma } from './sigma-D5aJWR8J.js';
12
+ import { u as useFileDiffOverlay } from './useFileDiffOverlay-C2OQaVWc.js';
13
+ import { F as FileDiffPanel } from './file-diff-panel-DVoheLFq.js';
14
14
 
15
15
  /**
16
16
  * @license lucide-react v0.511.0 - ISC
@@ -2889,7 +2889,7 @@ const LinkSelector = ({ open, onOpenChange }) => {
2889
2889
  },
2890
2890
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash, { className: "h-4 w-4" })
2891
2891
  }
2892
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "icon", className: "h-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "h-4 w-4" }) })
2892
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "icon", type: "submit", className: "h-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "h-4 w-4" }) })
2893
2893
  ]
2894
2894
  }
2895
2895
  ) })
@@ -1,12 +1,15 @@
1
- import { j as jsxRuntimeExports, r as reactExports, R as React$1, _ as __vitePreload, d7 as createRoot, d8 as getAugmentedNamespace, aO as reactDomExports, d9 as getDefaultExportFromCjs } from './index-7Chr1g9c.js';
1
+ import { j as jsxRuntimeExports, r as reactExports, R as React$1, _ as __vitePreload, d5 as createRoot, d6 as getAugmentedNamespace, aR as reactDomExports, d7 as getDefaultExportFromCjs } from './index-CLQauncb.js';
2
2
 
3
3
  const PAGE_DIMENSIONS = {
4
4
  /** A4 width in points */
5
5
  A4_WIDTH: 595};
6
6
  const ZOOM_LEVELS = [0.5, 0.75, 1, 1.25, 1.5, 2];
7
7
 
8
- const PDF_WORKER_SRC = "/pdf.worker.min.mjs?v=4.10.38";
9
- const PDF_CMAP_URL = "/cmaps/";
8
+ const pdfWorkerUrl = "/ui/assets/pdf.worker.min-yatZIOMy.mjs";
9
+
10
+ const PDF_WORKER_SRC = pdfWorkerUrl;
11
+ const PDF_CMAP_URL = void 0;
12
+ const PDF_CMAP_PACKED = false;
10
13
 
11
14
  function debounce(fn, waitMs) {
12
15
  let timeoutId;
@@ -25394,7 +25397,9 @@ class PdfLoader extends reactExports.Component {
25394
25397
  error: null
25395
25398
  };
25396
25399
  static defaultProps = {
25397
- workerSrc: "/pdf.worker.min.mjs"
25400
+ workerSrc: PDF_WORKER_SRC,
25401
+ cMapUrl: PDF_CMAP_URL,
25402
+ cMapPacked: PDF_CMAP_PACKED
25398
25403
  };
25399
25404
  documentRef = React$1.createRef();
25400
25405
  componentDidMount() {
@@ -25433,8 +25438,10 @@ class PdfLoader extends reactExports.Component {
25433
25438
  const document2 = {
25434
25439
  ...this.props,
25435
25440
  ownerDocument,
25436
- cMapUrl,
25437
- cMapPacked
25441
+ ...cMapUrl ? {
25442
+ cMapUrl,
25443
+ cMapPacked
25444
+ } : {}
25438
25445
  };
25439
25446
  return __webpack_exports__getDocument(document2).promise.then((pdfDocument) => {
25440
25447
  this.setState({ pdfDocument });
@@ -25458,4 +25465,4 @@ class PdfLoader extends reactExports.Component {
25458
25465
  }
25459
25466
  }
25460
25467
 
25461
- export { PAGE_DIMENSIONS as P, Rnd as R, ZOOM_LEVELS as Z, PdfLoader as a, PDF_CMAP_URL as b, PDF_WORKER_SRC as c, PdfHighlighter as d, getPageFromElement as g };
25468
+ export { PAGE_DIMENSIONS as P, Rnd as R, ZOOM_LEVELS as Z, PdfLoader as a, PDF_CMAP_URL as b, PDF_WORKER_SRC as c, PdfHighlighter as d, PDF_CMAP_PACKED as e, getPageFromElement as g };
@@ -1,6 +1,5 @@
1
- import { o as useTabsStore, a as useWorkspaceSurfaceStore, p as useToast, q as useArxivStore, r as reactExports, c as copyToClipboard, s as apiClient, t as BUILTIN_PLUGINS, j as jsxRuntimeExports, k as FileText, b as cn, g as RefreshCw, M as MarkdownRenderer } from './index-7Chr1g9c.js';
2
- import { d as defaultExtensions, s as setEditorMarkdown, U, I, r as resolveNotebookAssetUrl } from './NotebookEditor-DDl0_Mc0.js';
3
- import { g as generateBibTeX, I as InfoTriangleIcon, A as ArxivInfoModal } from './bibtex-CKaefIN2.js';
1
+ import { n as useTabsStore, a as useWorkspaceSurfaceStore, o as useToast, p as useArxivStore, r as reactExports, q as buildArxivSummaryMarkdown, s as generateBibTeX, c as copyToClipboard, t as apiClient, v as BUILTIN_PLUGINS, j as jsxRuntimeExports, k as FileText, I as InfoTriangleIcon, b as cn, M as MarkdownRenderer, A as ArxivInfoModal, g as RefreshCw } from './index-CLQauncb.js';
2
+ import { d as defaultExtensions, s as setEditorMarkdown, U, I, r as resolveNotebookAssetUrl } from './NotebookEditor-BMXKrDRk.js';
4
3
 
5
4
  function rewriteMarkdownImages(markdown, fileId) {
6
5
  if (!markdown) return markdown;
@@ -58,6 +57,8 @@ function PdfMarkdownPlugin({
58
57
  return arxivItems.find((item) => item.fileId === fileId) || null;
59
58
  }, [arxivFromContext, arxivItems, fileId]);
60
59
  const arxivError = arxivPaper ? arxivErrors[arxivPaper.arxivId] : void 0;
60
+ const isArxivPdf = Boolean(arxivPaper);
61
+ const arxivSummaryMarkdown = reactExports.useMemo(() => buildArxivSummaryMarkdown(arxivPaper), [arxivPaper]);
61
62
  const handleCopyBibtex = reactExports.useCallback(async () => {
62
63
  if (!arxivPaper) return;
63
64
  const bibtex = generateBibTeX(arxivPaper);
@@ -74,8 +75,8 @@ function PdfMarkdownPlugin({
74
75
  window.open(`https://arxiv.org/abs/${arxivPaper.arxivId}`, "_blank", "noopener,noreferrer");
75
76
  }, [arxivPaper]);
76
77
  reactExports.useEffect(() => {
77
- setTitle(fileName);
78
- }, [fileName, setTitle]);
78
+ setTitle(isArxivPdf ? `${fileName} Summary` : fileName);
79
+ }, [fileName, isArxivPdf, setTitle]);
79
80
  reactExports.useEffect(() => {
80
81
  parseRequestedRef.current = false;
81
82
  setRenderMode("novel");
@@ -134,9 +135,15 @@ function PdfMarkdownPlugin({
134
135
  setIsRetrying(false);
135
136
  }, [fileId, isRetrying, loadMarkdown, triggerParse]);
136
137
  reactExports.useEffect(() => {
138
+ if (isArxivPdf) {
139
+ setState("idle");
140
+ setMarkdown("");
141
+ setError(null);
142
+ return;
143
+ }
137
144
  if (!fileId) return;
138
145
  void loadMarkdown();
139
- }, [fileId, loadMarkdown]);
146
+ }, [fileId, isArxivPdf, loadMarkdown]);
140
147
  reactExports.useEffect(() => {
141
148
  updateWorkspaceTabState(tabId, {
142
149
  contentKind: "pdf",
@@ -189,6 +196,66 @@ function PdfMarkdownPlugin({
189
196
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Select a PDF in the file tree or import one from arXiv, then open the Markdown view to see MinerU output." })
190
197
  ] }) });
191
198
  }
199
+ if (isArxivPdf) {
200
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-full bg-background", children: [
201
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30", children: [
202
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
203
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "w-4 h-4 text-muted-foreground" }),
204
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-foreground", children: fileName }),
205
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground uppercase", children: "Summary" }),
206
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
207
+ "button",
208
+ {
209
+ type: "button",
210
+ onClick: () => setInfoOpen(true),
211
+ className: cn(
212
+ "flex h-7 w-7 items-center justify-center rounded-full",
213
+ "text-muted-foreground transition-colors",
214
+ "hover:bg-muted hover:text-foreground"
215
+ ),
216
+ title: "Paper info",
217
+ "aria-label": "Paper info",
218
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoTriangleIcon, { className: "h-4 w-4" })
219
+ }
220
+ )
221
+ ] }),
222
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
223
+ "button",
224
+ {
225
+ type: "button",
226
+ onClick: handleBackToPdf,
227
+ className: cn(
228
+ "flex items-center gap-2 px-3 py-1.5 rounded-full border transition-colors text-sm",
229
+ "bg-background hover:bg-muted/60 border-border"
230
+ ),
231
+ title: "Back to PDF view",
232
+ children: [
233
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "w-4 h-4" }),
234
+ "PDF"
235
+ ]
236
+ }
237
+ ) })
238
+ ] }),
239
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0 overflow-hidden flex justify-center px-4 py-4 bg-muted/10", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative h-full w-[min(62.5vw,100%)] max-w-[70rem]", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "notebook-editor-container relative h-full overflow-hidden rounded-2xl border border-border bg-background shadow-soft-card", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "notebook-doc-editor relative h-full w-full overflow-y-auto p-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
240
+ MarkdownRenderer,
241
+ {
242
+ content: arxivSummaryMarkdown,
243
+ className: "prose prose-lg dark:prose-invert max-w-full"
244
+ }
245
+ ) }) }) }) }),
246
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
247
+ ArxivInfoModal,
248
+ {
249
+ open: infoOpen,
250
+ onClose: () => setInfoOpen(false),
251
+ paper: arxivPaper,
252
+ errorCode: arxivError,
253
+ onCopyBibtex: arxivPaper ? handleCopyBibtex : void 0,
254
+ onOpenArxiv: arxivPaper ? handleOpenArxiv : void 0
255
+ }
256
+ )
257
+ ] });
258
+ }
192
259
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col h-full bg-background", children: [
193
260
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-4 py-2 border-b border-border bg-muted/30", children: [
194
261
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [