@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.
- package/README.md +112 -99
- package/assets/branding/connector-qq.png +0 -0
- package/assets/branding/connector-rokid.png +0 -0
- package/assets/branding/connector-weixin.png +0 -0
- package/assets/branding/projects.png +0 -0
- package/bin/ds.js +519 -63
- package/docs/assets/branding/projects.png +0 -0
- package/docs/en/00_QUICK_START.md +338 -68
- package/docs/en/01_SETTINGS_REFERENCE.md +14 -0
- package/docs/en/02_START_RESEARCH_GUIDE.md +180 -4
- package/docs/en/04_LINGZHU_CONNECTOR_GUIDE.md +62 -179
- package/docs/en/09_DOCTOR.md +66 -5
- package/docs/en/10_WEIXIN_CONNECTOR_GUIDE.md +137 -0
- package/docs/en/11_LICENSE_AND_RISK.md +256 -0
- package/docs/en/12_GUIDED_WORKFLOW_TOUR.md +446 -0
- package/docs/en/13_CORE_ARCHITECTURE_GUIDE.md +297 -0
- package/docs/en/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +506 -0
- package/docs/en/15_CODEX_PROVIDER_SETUP.md +284 -0
- package/docs/en/99_ACKNOWLEDGEMENTS.md +4 -1
- package/docs/en/README.md +83 -0
- package/docs/images/lingzhu/rokid-agent-platform-create.png +0 -0
- package/docs/images/weixin/weixin-plugin-entry.png +0 -0
- package/docs/images/weixin/weixin-plugin-entry.svg +33 -0
- package/docs/images/weixin/weixin-qr-confirm.svg +30 -0
- package/docs/images/weixin/weixin-quest-media-flow.svg +44 -0
- package/docs/images/weixin/weixin-settings-bind.svg +57 -0
- package/docs/zh/00_QUICK_START.md +345 -72
- package/docs/zh/01_SETTINGS_REFERENCE.md +14 -0
- package/docs/zh/02_START_RESEARCH_GUIDE.md +181 -3
- package/docs/zh/04_LINGZHU_CONNECTOR_GUIDE.md +62 -193
- package/docs/zh/09_DOCTOR.md +68 -5
- package/docs/zh/10_WEIXIN_CONNECTOR_GUIDE.md +144 -0
- package/docs/zh/11_LICENSE_AND_RISK.md +256 -0
- package/docs/zh/12_GUIDED_WORKFLOW_TOUR.md +442 -0
- package/docs/zh/13_CORE_ARCHITECTURE_GUIDE.md +296 -0
- package/docs/zh/14_PROMPT_SKILLS_AND_MCP_GUIDE.md +506 -0
- package/docs/zh/15_CODEX_PROVIDER_SETUP.md +285 -0
- package/docs/zh/99_ACKNOWLEDGEMENTS.md +4 -1
- package/docs/zh/README.md +129 -0
- package/install.sh +0 -34
- package/package.json +2 -2
- package/pyproject.toml +1 -1
- package/src/deepscientist/__init__.py +1 -1
- package/src/deepscientist/annotations.py +343 -0
- package/src/deepscientist/artifact/arxiv.py +484 -37
- package/src/deepscientist/artifact/service.py +574 -108
- package/src/deepscientist/arxiv_library.py +275 -0
- package/src/deepscientist/bash_exec/monitor.py +7 -5
- package/src/deepscientist/bash_exec/service.py +93 -21
- package/src/deepscientist/bridges/builtins.py +2 -0
- package/src/deepscientist/bridges/connectors.py +447 -0
- package/src/deepscientist/channels/__init__.py +2 -0
- package/src/deepscientist/channels/builtins.py +3 -1
- package/src/deepscientist/channels/local.py +3 -3
- package/src/deepscientist/channels/qq.py +8 -8
- package/src/deepscientist/channels/qq_gateway.py +1 -1
- package/src/deepscientist/channels/relay.py +14 -8
- package/src/deepscientist/channels/weixin.py +59 -0
- package/src/deepscientist/channels/weixin_ilink.py +388 -0
- package/src/deepscientist/config/models.py +23 -2
- package/src/deepscientist/config/service.py +539 -67
- package/src/deepscientist/connector/__init__.py +4 -0
- package/src/deepscientist/connector/connector_profiles.py +481 -0
- package/src/deepscientist/connector/lingzhu_support.py +668 -0
- package/src/deepscientist/connector/qq_profiles.py +206 -0
- package/src/deepscientist/connector/weixin_support.py +663 -0
- package/src/deepscientist/connector_profiles.py +1 -374
- package/src/deepscientist/connector_runtime.py +2 -0
- package/src/deepscientist/daemon/api/handlers.py +165 -5
- package/src/deepscientist/daemon/api/router.py +13 -1
- package/src/deepscientist/daemon/app.py +1444 -67
- package/src/deepscientist/doctor.py +4 -5
- package/src/deepscientist/gitops/diff.py +120 -29
- package/src/deepscientist/lingzhu_support.py +1 -182
- package/src/deepscientist/mcp/server.py +135 -7
- package/src/deepscientist/prompts/builder.py +128 -11
- package/src/deepscientist/qq_profiles.py +1 -196
- package/src/deepscientist/quest/node_traces.py +23 -0
- package/src/deepscientist/quest/service.py +359 -74
- package/src/deepscientist/quest/stage_views.py +71 -5
- package/src/deepscientist/runners/codex.py +170 -19
- package/src/deepscientist/runners/runtime_overrides.py +6 -0
- package/src/deepscientist/shared.py +33 -14
- package/src/deepscientist/weixin_support.py +1 -0
- package/src/prompts/connectors/lingzhu.md +3 -1
- package/src/prompts/connectors/qq.md +2 -1
- package/src/prompts/connectors/weixin.md +231 -0
- package/src/prompts/contracts/shared_interaction.md +4 -1
- package/src/prompts/system.md +61 -9
- package/src/skills/analysis-campaign/SKILL.md +46 -6
- package/src/skills/analysis-campaign/references/campaign-plan-template.md +21 -8
- package/src/skills/baseline/SKILL.md +1 -1
- package/src/skills/decision/SKILL.md +1 -1
- package/src/skills/experiment/SKILL.md +1 -1
- package/src/skills/finalize/SKILL.md +1 -1
- package/src/skills/idea/SKILL.md +1 -1
- package/src/skills/intake-audit/SKILL.md +1 -1
- package/src/skills/rebuttal/SKILL.md +74 -1
- package/src/skills/rebuttal/references/response-letter-template.md +55 -11
- package/src/skills/review/SKILL.md +118 -1
- package/src/skills/review/references/experiment-todo-template.md +23 -0
- package/src/skills/review/references/review-report-template.md +16 -0
- package/src/skills/review/references/revision-log-template.md +4 -0
- package/src/skills/scout/SKILL.md +1 -1
- package/src/skills/write/SKILL.md +168 -7
- package/src/skills/write/references/paper-experiment-matrix-template.md +131 -0
- package/src/tui/package.json +1 -1
- package/src/ui/dist/assets/{AiManusChatView-BKZ103sn.js → AiManusChatView-CnJcXynW.js} +156 -48
- package/src/ui/dist/assets/{AnalysisPlugin-mTTzGAlK.js → AnalysisPlugin-DeyzPEhV.js} +1 -1
- package/src/ui/dist/assets/{CliPlugin-BH58n3GY.js → CliPlugin-CB1YODQn.js} +164 -9
- package/src/ui/dist/assets/{CodeEditorPlugin-BKGRUH7e.js → CodeEditorPlugin-B-xicq1e.js} +8 -8
- package/src/ui/dist/assets/{CodeViewerPlugin-BMADwFWJ.js → CodeViewerPlugin-DT54ysXa.js} +5 -5
- package/src/ui/dist/assets/{DocViewerPlugin-ZOnTIHLN.js → DocViewerPlugin-DQtKT-VD.js} +3 -3
- package/src/ui/dist/assets/{GitDiffViewerPlugin-CQ7h1Djm.js → GitDiffViewerPlugin-hqHbCfnv.js} +20 -21
- package/src/ui/dist/assets/{ImageViewerPlugin-GVS5MsnC.js → ImageViewerPlugin-OcVo33jV.js} +5 -5
- package/src/ui/dist/assets/{LabCopilotPanel-BZNv1JML.js → LabCopilotPanel-DdGwhEUV.js} +11 -11
- package/src/ui/dist/assets/{LabPlugin-TWcJsdQA.js → LabPlugin-Ciz1gDaX.js} +2 -1
- package/src/ui/dist/assets/{LatexPlugin-DIjHiR2x.js → LatexPlugin-BhmjNQRC.js} +37 -11
- package/src/ui/dist/assets/{MarkdownViewerPlugin-D3ooGAH0.js → MarkdownViewerPlugin-BzdVH9Bx.js} +4 -4
- package/src/ui/dist/assets/{MarketplacePlugin-DfVfE9hN.js → MarketplacePlugin-DmyHspXt.js} +3 -3
- package/src/ui/dist/assets/{NotebookEditor-DDl0_Mc0.js → NotebookEditor-BMXKrDRk.js} +1 -1
- package/src/ui/dist/assets/{NotebookEditor-s8JhzuX1.js → NotebookEditor-BTVYRGkm.js} +12 -12
- package/src/ui/dist/assets/{PdfLoader-C2Sf6SJM.js → PdfLoader-CvcjJHXv.js} +14 -7
- package/src/ui/dist/assets/{PdfMarkdownPlugin-CXFLoIsa.js → PdfMarkdownPlugin-DW2ej8Vk.js} +73 -6
- package/src/ui/dist/assets/{PdfViewerPlugin-BYTmz2fK.js → PdfViewerPlugin-CmlDxbhU.js} +103 -34
- package/src/ui/dist/assets/PdfViewerPlugin-DQ11QcSf.css +3627 -0
- package/src/ui/dist/assets/{SearchPlugin-CjWBI1O9.js → SearchPlugin-DAjQZPSv.js} +1 -1
- package/src/ui/dist/assets/{TextViewerPlugin-DdOBU3-S.js → TextViewerPlugin-C-nVAZb_.js} +5 -4
- package/src/ui/dist/assets/{VNCViewer-B8HGgLwQ.js → VNCViewer-D7-dIYon.js} +10 -10
- package/src/ui/dist/assets/bot-C_G4WtNI.js +21 -0
- package/src/ui/dist/assets/branding/logo-rokid.png +0 -0
- package/src/ui/dist/assets/browser-BAcuE0Xj.js +2895 -0
- package/src/ui/dist/assets/{code-BWAY76JP.js → code-Cd7WfiWq.js} +1 -1
- package/src/ui/dist/assets/{file-content-C1NwU5oQ.js → file-content-B57zsL9y.js} +1 -1
- package/src/ui/dist/assets/{file-diff-panel-CywslwB9.js → file-diff-panel-DVoheLFq.js} +1 -1
- package/src/ui/dist/assets/{file-socket-B4kzuOBQ.js → file-socket-B5kXFxZP.js} +1 -1
- package/src/ui/dist/assets/{image-D-NZM-6P.js → image-LLOjkMHF.js} +1 -1
- package/src/ui/dist/assets/{index-DGIYDuTv.css → index-BQG-1s2o.css} +40 -13
- package/src/ui/dist/assets/{index-DHZJ_0TI.js → index-C3r2iGrp.js} +12 -12
- package/src/ui/dist/assets/{index-7Chr1g9c.js → index-CLQauncb.js} +15050 -9561
- package/src/ui/dist/assets/index-Dxa2eYMY.js +25 -0
- package/src/ui/dist/assets/{index-BdM1Gqfr.js → index-hOUOWbW2.js} +2 -2
- package/src/ui/dist/assets/{monaco-Cb2uKKe6.js → monaco-BGGAEii3.js} +1 -1
- package/src/ui/dist/assets/{pdf-effect-queue-DSw_D3RV.js → pdf-effect-queue-DlEr1_y5.js} +16 -1
- package/src/ui/dist/assets/pdf.worker.min-yatZIOMy.mjs +21 -0
- package/src/ui/dist/assets/{popover-Bg72DGgT.js → popover-CWJbJuYY.js} +1 -1
- package/src/ui/dist/assets/{project-sync-Ce_0BglY.js → project-sync-CRJiucYO.js} +18 -77
- package/src/ui/dist/assets/select-CoHB7pvH.js +1690 -0
- package/src/ui/dist/assets/{sigma-DPaACDrh.js → sigma-D5aJWR8J.js} +1 -1
- package/src/ui/dist/assets/{index-CDxNdQdz.js → square-check-big-DUK_mnkS.js} +2 -13
- package/src/ui/dist/assets/{trash-BvTgE5__.js → trash-ChU3SEE3.js} +1 -1
- package/src/ui/dist/assets/{useCliAccess-CgPeMOwP.js → useCliAccess-BrJBV3tY.js} +1 -1
- package/src/ui/dist/assets/{useFileDiffOverlay-xPhz7P5B.js → useFileDiffOverlay-C2OQaVWc.js} +1 -1
- package/src/ui/dist/assets/{wrap-text-C3Un3YQr.js → wrap-text-C7Qqh-om.js} +1 -1
- package/src/ui/dist/assets/{zoom-out-BgxLa0Ri.js → zoom-out-rtX0FKya.js} +1 -1
- package/src/ui/dist/index.html +2 -2
- package/src/ui/dist/assets/AutoFigurePlugin-BGxN8Umr.css +0 -3056
- package/src/ui/dist/assets/AutoFigurePlugin-C_wWw4AP.js +0 -8149
- package/src/ui/dist/assets/PdfViewerPlugin-BJXtIwj_.css +0 -260
- package/src/ui/dist/assets/Stepper-B0Dd8CxK.js +0 -158
- package/src/ui/dist/assets/bibtex-CKaefIN2.js +0 -189
- package/src/ui/dist/assets/file-utils-H2fjA46S.js +0 -109
- package/src/ui/dist/assets/message-square-BzjLiXir.js +0 -16
- package/src/ui/dist/assets/pdfjs-DU1YE8WO.js +0 -3
- package/src/ui/dist/assets/tooltip-C_mA6R0w.js +0 -108
package/src/ui/dist/assets/{GitDiffViewerPlugin-CQ7h1Djm.js → GitDiffViewerPlugin-hqHbCfnv.js}
RENAMED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import ImageViewerPlugin from './ImageViewerPlugin-
|
|
3
|
-
import MarkdownViewerPlugin from './MarkdownViewerPlugin-
|
|
4
|
-
import { N as NotebookEditor } from './NotebookEditor-
|
|
5
|
-
import PdfViewerPlugin from './PdfViewerPlugin-
|
|
6
|
-
import './image-
|
|
7
|
-
import './zoom-out-
|
|
8
|
-
import './code-
|
|
9
|
-
import './NotebookEditor-
|
|
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-
|
|
13
|
-
import './
|
|
14
|
-
import './popover-
|
|
15
|
-
import './trash-
|
|
16
|
-
import './sigma-
|
|
17
|
-
import './useFileDiffOverlay-
|
|
18
|
-
import './file-diff-panel-
|
|
19
|
-
import './file-socket-
|
|
20
|
-
import './pdf-effect-queue-
|
|
21
|
-
import './
|
|
22
|
-
import './
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { I as Image } from './image-
|
|
4
|
-
import { Z as ZoomOut, a as ZoomIn } from './zoom-out-
|
|
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-
|
|
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 {
|
|
2
|
-
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from './popover-
|
|
3
|
-
import {
|
|
4
|
-
import './
|
|
5
|
-
import './
|
|
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-
|
|
8
|
-
import './file-diff-panel-
|
|
9
|
-
import './
|
|
10
|
-
import './NotebookEditor-
|
|
11
|
-
import './
|
|
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 {
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { P as ProjectSyncClient } from './project-sync-
|
|
4
|
-
import { c as configureMonacoLoader } from './monaco-
|
|
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-
|
|
6
|
-
import { Z as ZoomOut, a as ZoomIn } from './zoom-out-
|
|
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-
|
|
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,
|
|
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
|
|
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
|
-
|
|
1776
|
+
zoomFactor: zoomScale,
|
|
1751
1777
|
highlights: emptyHighlights,
|
|
1752
1778
|
onPageWidth: handlePageWidth
|
|
1753
1779
|
}
|
package/src/ui/dist/assets/{MarkdownViewerPlugin-D3ooGAH0.js → MarkdownViewerPlugin-BzdVH9Bx.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import { u as useI18n, a as useWorkspaceSurfaceStore, r as reactExports, R as React,
|
|
3
|
-
import { C as Code } from './code-
|
|
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-
|
|
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 {
|
|
2
|
-
import { S as Sigma } from './sigma-
|
|
3
|
-
import { I as Image } from './image-
|
|
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,
|
|
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 {
|
|
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-
|
|
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-
|
|
6
|
-
import { S as SquareCheckBig } from './
|
|
7
|
-
import { C as Code } from './code-
|
|
8
|
-
import { I as Image } from './image-
|
|
9
|
-
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from './popover-
|
|
10
|
-
import { T as Trash, A as ArrowDown } from './trash-
|
|
11
|
-
import { S as Sigma } from './sigma-
|
|
12
|
-
import { u as useFileDiffOverlay } from './useFileDiffOverlay-
|
|
13
|
-
import { F as FileDiffPanel } from './file-diff-panel-
|
|
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,
|
|
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
|
|
9
|
-
|
|
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:
|
|
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
|
-
|
|
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 {
|
|
2
|
-
import { d as defaultExtensions, s as setEditorMarkdown, U, I, r as resolveNotebookAssetUrl } from './NotebookEditor-
|
|
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: [
|