@drscrewdriver/dsh-better-display 0.3.3-fork.1
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/CHANGELOG.md +259 -0
- package/DESIGN.md +72 -0
- package/LICENSE +24 -0
- package/README.en.md +55 -0
- package/README.md +55 -0
- package/THIRD_PARTY_NOTICES.md +65 -0
- package/compat/harness-rc2.json +99 -0
- package/cordis.patch.yml +5 -0
- package/cordis.yml +4 -0
- package/docs/official-rendering-bridge.md +65 -0
- package/dshx.yml +5 -0
- package/lib/client.js +49292 -0
- package/lib/client.js.map +1 -0
- package/lib/dsh-better-display.js +101 -0
- package/lib/types/client/Blocks.d.ts +49 -0
- package/lib/types/client/Blocks.d.ts.map +1 -0
- package/lib/types/client/Blocks.js +143 -0
- package/lib/types/client/Blocks.js.map +1 -0
- package/lib/types/client/ChoreographedFlow.d.ts +22 -0
- package/lib/types/client/ChoreographedFlow.d.ts.map +1 -0
- package/lib/types/client/ChoreographedFlow.js +218 -0
- package/lib/types/client/ChoreographedFlow.js.map +1 -0
- package/lib/types/client/ClosedProcessSummary.d.ts +9 -0
- package/lib/types/client/ClosedProcessSummary.d.ts.map +1 -0
- package/lib/types/client/ClosedProcessSummary.js +16 -0
- package/lib/types/client/ClosedProcessSummary.js.map +1 -0
- package/lib/types/client/DiffPanel.d.ts +13 -0
- package/lib/types/client/DiffPanel.d.ts.map +1 -0
- package/lib/types/client/DiffPanel.js +115 -0
- package/lib/types/client/DiffPanel.js.map +1 -0
- package/lib/types/client/LiveFold.d.ts +10 -0
- package/lib/types/client/LiveFold.d.ts.map +1 -0
- package/lib/types/client/LiveFold.js +39 -0
- package/lib/types/client/LiveFold.js.map +1 -0
- package/lib/types/client/McpAppFrame.d.ts +32 -0
- package/lib/types/client/McpAppFrame.d.ts.map +1 -0
- package/lib/types/client/McpAppFrame.js +193 -0
- package/lib/types/client/McpAppFrame.js.map +1 -0
- package/lib/types/client/OfficialContent.d.ts +25 -0
- package/lib/types/client/OfficialContent.d.ts.map +1 -0
- package/lib/types/client/OfficialContent.js +53 -0
- package/lib/types/client/OfficialContent.js.map +1 -0
- package/lib/types/client/Reader.d.ts +3 -0
- package/lib/types/client/Reader.d.ts.map +1 -0
- package/lib/types/client/Reader.js +603 -0
- package/lib/types/client/Reader.js.map +1 -0
- package/lib/types/client/ReasoningCard.d.ts +11 -0
- package/lib/types/client/ReasoningCard.d.ts.map +1 -0
- package/lib/types/client/ReasoningCard.js +322 -0
- package/lib/types/client/ReasoningCard.js.map +1 -0
- package/lib/types/client/SettingsSection.d.ts +37 -0
- package/lib/types/client/SettingsSection.d.ts.map +1 -0
- package/lib/types/client/SettingsSection.js +63 -0
- package/lib/types/client/SettingsSection.js.map +1 -0
- package/lib/types/client/StickyLane.d.ts +8 -0
- package/lib/types/client/StickyLane.d.ts.map +1 -0
- package/lib/types/client/StickyLane.js +39 -0
- package/lib/types/client/StickyLane.js.map +1 -0
- package/lib/types/client/TimelineRail.d.ts +10 -0
- package/lib/types/client/TimelineRail.d.ts.map +1 -0
- package/lib/types/client/TimelineRail.js +168 -0
- package/lib/types/client/TimelineRail.js.map +1 -0
- package/lib/types/client/ToolActivity.d.ts +17 -0
- package/lib/types/client/ToolActivity.d.ts.map +1 -0
- package/lib/types/client/ToolActivity.js +244 -0
- package/lib/types/client/ToolActivity.js.map +1 -0
- package/lib/types/client/TurnMetrics.d.ts +11 -0
- package/lib/types/client/TurnMetrics.d.ts.map +1 -0
- package/lib/types/client/TurnMetrics.js +44 -0
- package/lib/types/client/TurnMetrics.js.map +1 -0
- package/lib/types/client/WaitClock.d.ts +16 -0
- package/lib/types/client/WaitClock.d.ts.map +1 -0
- package/lib/types/client/WaitClock.js +29 -0
- package/lib/types/client/WaitClock.js.map +1 -0
- package/lib/types/client/WaitingClock.d.ts +15 -0
- package/lib/types/client/WaitingClock.d.ts.map +1 -0
- package/lib/types/client/WaitingClock.js +30 -0
- package/lib/types/client/WaitingClock.js.map +1 -0
- package/lib/types/client/WaitingStatus.d.ts +6 -0
- package/lib/types/client/WaitingStatus.d.ts.map +1 -0
- package/lib/types/client/WaitingStatus.js +9 -0
- package/lib/types/client/WaitingStatus.js.map +1 -0
- package/lib/types/client/conversation-scroll.d.ts +19 -0
- package/lib/types/client/conversation-scroll.d.ts.map +1 -0
- package/lib/types/client/conversation-scroll.js +25 -0
- package/lib/types/client/conversation-scroll.js.map +1 -0
- package/lib/types/client/deliverables.d.ts +24 -0
- package/lib/types/client/deliverables.d.ts.map +1 -0
- package/lib/types/client/deliverables.js +104 -0
- package/lib/types/client/deliverables.js.map +1 -0
- package/lib/types/client/entry-policy.d.ts +10 -0
- package/lib/types/client/entry-policy.d.ts.map +1 -0
- package/lib/types/client/entry-policy.js +24 -0
- package/lib/types/client/entry-policy.js.map +1 -0
- package/lib/types/client/entry.d.ts +4 -0
- package/lib/types/client/entry.d.ts.map +1 -0
- package/lib/types/client/entry.js +34 -0
- package/lib/types/client/entry.js.map +1 -0
- package/lib/types/client/fold-choreography.d.ts +40 -0
- package/lib/types/client/fold-choreography.d.ts.map +1 -0
- package/lib/types/client/fold-choreography.js +48 -0
- package/lib/types/client/fold-choreography.js.map +1 -0
- package/lib/types/client/fold-intensity.d.ts +11 -0
- package/lib/types/client/fold-intensity.d.ts.map +1 -0
- package/lib/types/client/fold-intensity.js +32 -0
- package/lib/types/client/fold-intensity.js.map +1 -0
- package/lib/types/client/index.d.ts +7 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js +195 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/live-turn.d.ts +58 -0
- package/lib/types/client/live-turn.d.ts.map +1 -0
- package/lib/types/client/live-turn.js +190 -0
- package/lib/types/client/live-turn.js.map +1 -0
- package/lib/types/client/markdown/MarkdownText.d.ts +41 -0
- package/lib/types/client/markdown/MarkdownText.d.ts.map +1 -0
- package/lib/types/client/markdown/MarkdownText.js +178 -0
- package/lib/types/client/markdown/MarkdownText.js.map +1 -0
- package/lib/types/client/markdown/cjkFriendlyStrong.d.ts +9 -0
- package/lib/types/client/markdown/cjkFriendlyStrong.d.ts.map +1 -0
- package/lib/types/client/markdown/cjkFriendlyStrong.js +73 -0
- package/lib/types/client/markdown/cjkFriendlyStrong.js.map +1 -0
- package/lib/types/client/markdown/incremental.d.ts +69 -0
- package/lib/types/client/markdown/incremental.d.ts.map +1 -0
- package/lib/types/client/markdown/incremental.js +108 -0
- package/lib/types/client/markdown/incremental.js.map +1 -0
- package/lib/types/client/markdown/katex.d.ts +27 -0
- package/lib/types/client/markdown/katex.d.ts.map +1 -0
- package/lib/types/client/markdown/katex.js +88 -0
- package/lib/types/client/markdown/katex.js.map +1 -0
- package/lib/types/client/markdown/mathCompatibility.d.ts +11 -0
- package/lib/types/client/markdown/mathCompatibility.d.ts.map +1 -0
- package/lib/types/client/markdown/mathCompatibility.js +293 -0
- package/lib/types/client/markdown/mathCompatibility.js.map +1 -0
- package/lib/types/client/markdown/parse.d.ts +25 -0
- package/lib/types/client/markdown/parse.d.ts.map +1 -0
- package/lib/types/client/markdown/parse.js +42 -0
- package/lib/types/client/markdown/parse.js.map +1 -0
- package/lib/types/client/markdown/render.d.ts +121 -0
- package/lib/types/client/markdown/render.d.ts.map +1 -0
- package/lib/types/client/markdown/render.js +452 -0
- package/lib/types/client/markdown/render.js.map +1 -0
- package/lib/types/client/mcp-app.d.ts +50 -0
- package/lib/types/client/mcp-app.d.ts.map +1 -0
- package/lib/types/client/mcp-app.js +328 -0
- package/lib/types/client/mcp-app.js.map +1 -0
- package/lib/types/client/message-chrome.d.ts +19 -0
- package/lib/types/client/message-chrome.d.ts.map +1 -0
- package/lib/types/client/message-chrome.js +42 -0
- package/lib/types/client/message-chrome.js.map +1 -0
- package/lib/types/client/motion.d.ts +38 -0
- package/lib/types/client/motion.d.ts.map +1 -0
- package/lib/types/client/motion.js +453 -0
- package/lib/types/client/motion.js.map +1 -0
- package/lib/types/client/native/ContextBody.d.ts +130 -0
- package/lib/types/client/native/ContextBody.d.ts.map +1 -0
- package/lib/types/client/native/ContextBody.js +398 -0
- package/lib/types/client/native/ContextBody.js.map +1 -0
- package/lib/types/client/native/ContextInjectionRow.d.ts +35 -0
- package/lib/types/client/native/ContextInjectionRow.d.ts.map +1 -0
- package/lib/types/client/native/ContextInjectionRow.js +42 -0
- package/lib/types/client/native/ContextInjectionRow.js.map +1 -0
- package/lib/types/client/native/ReferenceIcon.d.ts +16 -0
- package/lib/types/client/native/ReferenceIcon.d.ts.map +1 -0
- package/lib/types/client/native/ReferenceIcon.js +16 -0
- package/lib/types/client/native/ReferenceIcon.js.map +1 -0
- package/lib/types/client/native/tool-call-model.d.ts +58 -0
- package/lib/types/client/native/tool-call-model.d.ts.map +1 -0
- package/lib/types/client/native/tool-call-model.js +219 -0
- package/lib/types/client/native/tool-call-model.js.map +1 -0
- package/lib/types/client/native/tool-update.d.ts +23 -0
- package/lib/types/client/native/tool-update.d.ts.map +1 -0
- package/lib/types/client/native/tool-update.js +22 -0
- package/lib/types/client/native/tool-update.js.map +1 -0
- package/lib/types/client/official-slots.d.ts +71 -0
- package/lib/types/client/official-slots.d.ts.map +1 -0
- package/lib/types/client/official-slots.js +183 -0
- package/lib/types/client/official-slots.js.map +1 -0
- package/lib/types/client/open-file.d.ts +29 -0
- package/lib/types/client/open-file.d.ts.map +1 -0
- package/lib/types/client/open-file.js +71 -0
- package/lib/types/client/open-file.js.map +1 -0
- package/lib/types/client/pending-submission.d.ts +28 -0
- package/lib/types/client/pending-submission.d.ts.map +1 -0
- package/lib/types/client/pending-submission.js +28 -0
- package/lib/types/client/pending-submission.js.map +1 -0
- package/lib/types/client/platform-media.d.ts +6 -0
- package/lib/types/client/platform-media.d.ts.map +1 -0
- package/lib/types/client/platform-media.js +18 -0
- package/lib/types/client/platform-media.js.map +1 -0
- package/lib/types/client/primitive-labels.d.ts +10 -0
- package/lib/types/client/primitive-labels.d.ts.map +1 -0
- package/lib/types/client/primitive-labels.js +38 -0
- package/lib/types/client/primitive-labels.js.map +1 -0
- package/lib/types/client/projection.d.ts +41 -0
- package/lib/types/client/projection.d.ts.map +1 -0
- package/lib/types/client/projection.js +112 -0
- package/lib/types/client/projection.js.map +1 -0
- package/lib/types/client/reasoning-follow.d.ts +10 -0
- package/lib/types/client/reasoning-follow.d.ts.map +1 -0
- package/lib/types/client/reasoning-follow.js +21 -0
- package/lib/types/client/reasoning-follow.js.map +1 -0
- package/lib/types/client/resource-address.d.ts +3 -0
- package/lib/types/client/resource-address.d.ts.map +1 -0
- package/lib/types/client/resource-address.js +33 -0
- package/lib/types/client/resource-address.js.map +1 -0
- package/lib/types/client/settings-copy.d.ts +7 -0
- package/lib/types/client/settings-copy.d.ts.map +1 -0
- package/lib/types/client/settings-copy.js +53 -0
- package/lib/types/client/settings-copy.js.map +1 -0
- package/lib/types/client/settings-slots.d.ts +23 -0
- package/lib/types/client/settings-slots.d.ts.map +1 -0
- package/lib/types/client/settings-slots.js +2 -0
- package/lib/types/client/settings-slots.js.map +1 -0
- package/lib/types/client/settings.d.ts +4 -0
- package/lib/types/client/settings.d.ts.map +1 -0
- package/lib/types/client/settings.js +60 -0
- package/lib/types/client/settings.js.map +1 -0
- package/lib/types/client/skill-status.d.ts +25 -0
- package/lib/types/client/skill-status.d.ts.map +1 -0
- package/lib/types/client/skill-status.js +44 -0
- package/lib/types/client/skill-status.js.map +1 -0
- package/lib/types/client/store.d.ts +35 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/client/store.js +37 -0
- package/lib/types/client/store.js.map +1 -0
- package/lib/types/client/stream-buffer.d.ts +37 -0
- package/lib/types/client/stream-buffer.d.ts.map +1 -0
- package/lib/types/client/stream-buffer.js +150 -0
- package/lib/types/client/stream-buffer.js.map +1 -0
- package/lib/types/client/streaming.d.ts +18 -0
- package/lib/types/client/streaming.d.ts.map +1 -0
- package/lib/types/client/streaming.js +84 -0
- package/lib/types/client/streaming.js.map +1 -0
- package/lib/types/client/timeline.d.ts +26 -0
- package/lib/types/client/timeline.d.ts.map +1 -0
- package/lib/types/client/timeline.js +48 -0
- package/lib/types/client/timeline.js.map +1 -0
- package/lib/types/client/tool-activity.d.ts +98 -0
- package/lib/types/client/tool-activity.d.ts.map +1 -0
- package/lib/types/client/tool-activity.js +301 -0
- package/lib/types/client/tool-activity.js.map +1 -0
- package/lib/types/client/types.d.ts +91 -0
- package/lib/types/client/types.d.ts.map +1 -0
- package/lib/types/client/types.js +2 -0
- package/lib/types/client/types.js.map +1 -0
- package/lib/types/client/waiting-clock.d.ts +49 -0
- package/lib/types/client/waiting-clock.d.ts.map +1 -0
- package/lib/types/client/waiting-clock.js +80 -0
- package/lib/types/client/waiting-clock.js.map +1 -0
- package/lib/types/client/word-motion.d.ts +16 -0
- package/lib/types/client/word-motion.d.ts.map +1 -0
- package/lib/types/client/word-motion.js +90 -0
- package/lib/types/client/word-motion.js.map +1 -0
- package/lib/types/client/word-timeline.d.ts +32 -0
- package/lib/types/client/word-timeline.d.ts.map +1 -0
- package/lib/types/client/word-timeline.js +119 -0
- package/lib/types/client/word-timeline.js.map +1 -0
- package/lib/types/dsh-better-display.d.ts +17 -0
- package/lib/types/dsh-better-display.d.ts.map +1 -0
- package/lib/types/dsh-better-display.js +93 -0
- package/lib/types/dsh-better-display.js.map +1 -0
- package/lib/types/skill-roots.d.ts +22 -0
- package/lib/types/skill-roots.d.ts.map +1 -0
- package/lib/types/skill-roots.js +126 -0
- package/lib/types/skill-roots.js.map +1 -0
- package/lib/types/skill-status.d.ts +36 -0
- package/lib/types/skill-status.d.ts.map +1 -0
- package/lib/types/skill-status.js +51 -0
- package/lib/types/skill-status.js.map +1 -0
- package/package.json +133 -0
- package/scripts/build-motion-fixture.mjs +26 -0
- package/scripts/check-harness-compat.mjs +71 -0
- package/scripts/link-harness-dependencies.mjs +54 -0
- package/scripts/verify-auto-fold.mjs +114 -0
- package/scripts/verify-official-bridge.mjs +121 -0
- package/scripts/verify-tool-shimmer.mjs +62 -0
- package/skills/generative-mcpapps/SKILL.md +47 -0
- package/skills/generative-mcpapps/examples/interactive_quiz.html +153 -0
- package/skills/generative-mcpapps/references/html_boilerplate.md +122 -0
- package/skills/generative-mcpapps/references/sep1865_protocol.md +54 -0
- package/src/client/Blocks.tsx +213 -0
- package/src/client/ChoreographedFlow.tsx +232 -0
- package/src/client/ClosedProcessSummary.tsx +23 -0
- package/src/client/DiffPanel.tsx +124 -0
- package/src/client/LiveFold.tsx +43 -0
- package/src/client/McpAppFrame.module.css +210 -0
- package/src/client/McpAppFrame.tsx +317 -0
- package/src/client/OfficialContent.tsx +69 -0
- package/src/client/Reader.module.css +692 -0
- package/src/client/Reader.tsx +878 -0
- package/src/client/ReasoningCard.tsx +306 -0
- package/src/client/SettingsSection.module.css +184 -0
- package/src/client/SettingsSection.tsx +194 -0
- package/src/client/StickyLane.tsx +34 -0
- package/src/client/TimelineRail.module.css +170 -0
- package/src/client/TimelineRail.tsx +262 -0
- package/src/client/ToolActivity.tsx +274 -0
- package/src/client/TurnMetrics.module.css +139 -0
- package/src/client/TurnMetrics.tsx +160 -0
- package/src/client/WaitClock.tsx +33 -0
- package/src/client/WaitingStatus.tsx +13 -0
- package/src/client/conversation-scroll.ts +28 -0
- package/src/client/deliverables.ts +122 -0
- package/src/client/entry-policy.ts +20 -0
- package/src/client/entry.tsx +40 -0
- package/src/client/fold-choreography.ts +55 -0
- package/src/client/fold-intensity.ts +36 -0
- package/src/client/index.tsx +222 -0
- package/src/client/live-turn.ts +198 -0
- package/src/client/markdown/MarkdownText.module.css +304 -0
- package/src/client/markdown/MarkdownText.tsx +195 -0
- package/src/client/markdown/cjkFriendlyStrong.ts +84 -0
- package/src/client/markdown/incremental.ts +131 -0
- package/src/client/markdown/katex.tsx +91 -0
- package/src/client/markdown/mathCompatibility.ts +350 -0
- package/src/client/markdown/parse.ts +45 -0
- package/src/client/markdown/render.tsx +647 -0
- package/src/client/markdown/upstream.json +14 -0
- package/src/client/mcp-app.ts +323 -0
- package/src/client/message-chrome.ts +47 -0
- package/src/client/motion.tsx +410 -0
- package/src/client/native/ContextBody.module.css +161 -0
- package/src/client/native/ContextBody.tsx +591 -0
- package/src/client/native/ContextInjectionRow.module.css +66 -0
- package/src/client/native/ContextInjectionRow.tsx +106 -0
- package/src/client/native/ReferenceIcon.tsx +35 -0
- package/src/client/native/tool-call-model.ts +248 -0
- package/src/client/native/tool-update.ts +32 -0
- package/src/client/native/upstream.json +41 -0
- package/src/client/official-slots.tsx +211 -0
- package/src/client/open-file.ts +94 -0
- package/src/client/pending-submission.ts +49 -0
- package/src/client/platform-media.ts +17 -0
- package/src/client/primitive-labels.ts +54 -0
- package/src/client/projection.ts +118 -0
- package/src/client/reasoning-follow.ts +28 -0
- package/src/client/settings-copy.ts +80 -0
- package/src/client/settings-slots.ts +20 -0
- package/src/client/settings.tsx +73 -0
- package/src/client/skill-status.ts +78 -0
- package/src/client/store.ts +75 -0
- package/src/client/stream-buffer.ts +136 -0
- package/src/client/streaming.tsx +70 -0
- package/src/client/style.d.ts +4 -0
- package/src/client/timeline.ts +77 -0
- package/src/client/tool-activity.ts +298 -0
- package/src/client/types.ts +89 -0
- package/src/client/waiting-clock.ts +83 -0
- package/src/client/word-motion.tsx +92 -0
- package/src/client/word-timeline.ts +113 -0
- package/src/dsh-better-display.ts +108 -0
- package/src/skill-roots.ts +138 -0
- package/src/skill-status.ts +81 -0
- package/tests/browser-auto-fold.tsx +64 -0
- package/tests/browser-closed-gap.tsx +20 -0
- package/tests/browser-motion.tsx +65 -0
- package/tests/browser-official-bridge.tsx +152 -0
- package/tests/browser-sticky-lanes.tsx +22 -0
- package/tests/browser-waiting-clock.tsx +14 -0
- package/tests/chat-flow-hook.test.ts +66 -0
- package/tests/cloud-gate.test.ts +34 -0
- package/tests/context-tool-update.test.ts +33 -0
- package/tests/conversation-scroll.test.ts +47 -0
- package/tests/deliverables.test.ts +128 -0
- package/tests/entry.test.ts +42 -0
- package/tests/fixtures/maid-composer-hide.html +31 -0
- package/tests/fold-choreography.test.ts +54 -0
- package/tests/fold-intensity.test.ts +94 -0
- package/tests/footer-precedence.test.ts +129 -0
- package/tests/history-word-regression.test.ts +16 -0
- package/tests/live-turn.test.ts +218 -0
- package/tests/mcp-apps.test.ts +157 -0
- package/tests/message-chrome.test.ts +29 -0
- package/tests/official-slots.test.ts +112 -0
- package/tests/open-file.test.ts +114 -0
- package/tests/pending-submission.test.ts +45 -0
- package/tests/platform-media.test.ts +23 -0
- package/tests/projection.test.ts +184 -0
- package/tests/reasoning-follow.test.ts +34 -0
- package/tests/settings-copy.test.ts +63 -0
- package/tests/skill-status.test.ts +137 -0
- package/tests/stock-install.test.ts +58 -0
- package/tests/stream-buffer.test.ts +102 -0
- package/tests/timeline.test.ts +59 -0
- package/tests/tool-diff.test.ts +57 -0
- package/tests/waiting-clock.test.ts +83 -0
- package/tests/word-timeline.test.ts +146 -0
- package/tsconfig.json +11 -0
- package/tsdown.config.ts +51 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure row-model derivation for tool summary rows: variant classification,
|
|
3
|
+
* one-line summary, expanded-body text, and flattened result output from the
|
|
4
|
+
* frozen call slice. Input material comes from the call ARGUMENTS; output and
|
|
5
|
+
* error material from the settled result node. A call whose render intent is
|
|
6
|
+
* a terminal card gets its expanded body from the views instead, through
|
|
7
|
+
* `terminalCardModel` in terminal-card-model.ts.
|
|
8
|
+
*/
|
|
9
|
+
// The block union's defining home is runtime (fold-product types); this
|
|
10
|
+
// contract only forwards it (type-definition authority stays with the layer
|
|
11
|
+
// that produces the values).
|
|
12
|
+
import { abbreviateHomePath } from '@deepseek-ai/dsh-util-workspace-path';
|
|
13
|
+
/** Figma row titles per variant (design literals, not translatable copy). */
|
|
14
|
+
export const VARIANT_TITLES = {
|
|
15
|
+
search: 'Search', read: 'Read', bash: 'Bash',
|
|
16
|
+
write: 'Write', edit: 'Edit', code: 'Code', others: 'Tool call',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Known tool name -> variant.
|
|
20
|
+
*
|
|
21
|
+
* `cordis_define` is deliberately absent: ui-cordis registers a keyed
|
|
22
|
+
* `tool.call.toolview` entry for it, and a keyed hit REPLACES the generic row
|
|
23
|
+
* (this table is only reached through GenericToolCard, the dispatch fallback in
|
|
24
|
+
* ToolCallTree). An entry here would be unreachable, and a second title for the
|
|
25
|
+
* same call would be a second answer to a question the card already owns.
|
|
26
|
+
*/
|
|
27
|
+
const TOOL_VARIANTS = {
|
|
28
|
+
bash: 'bash',
|
|
29
|
+
// The PowerShell twin is a shell tool: the bash row family (icon, colors)
|
|
30
|
+
// with its own title from TOOL_TITLES, not the generic `others` row.
|
|
31
|
+
pwsh: 'bash',
|
|
32
|
+
read: 'read',
|
|
33
|
+
web_fetch: 'read',
|
|
34
|
+
web_search: 'search',
|
|
35
|
+
grep: 'search',
|
|
36
|
+
glob: 'search',
|
|
37
|
+
write: 'write',
|
|
38
|
+
edit: 'edit',
|
|
39
|
+
run_code: 'code',
|
|
40
|
+
cordis_package_inspect: 'read',
|
|
41
|
+
cordis_runtime_inspect: 'read',
|
|
42
|
+
// The three run-control verbs take one package id and produce a receipt, so
|
|
43
|
+
// the generic row is the decided intent, not an unclassified default: there is
|
|
44
|
+
// no program to show (that is `cordis_define`'s card) and no file to open. The
|
|
45
|
+
// id lands in the summary slot, and the titles below name the act.
|
|
46
|
+
cordis_run: 'others',
|
|
47
|
+
cordis_stop: 'others',
|
|
48
|
+
cordis_undefine: 'others',
|
|
49
|
+
};
|
|
50
|
+
/** Tool-owned titles that refine a generic row variant without replacing it. */
|
|
51
|
+
const TOOL_TITLES = {
|
|
52
|
+
cordis_package_inspect: 'Inspect',
|
|
53
|
+
cordis_runtime_inspect: 'Inspect',
|
|
54
|
+
cordis_run: 'Run Cordis Plugin',
|
|
55
|
+
cordis_stop: 'Stop Cordis Plugin',
|
|
56
|
+
cordis_undefine: 'Remove Cordis Plugin',
|
|
57
|
+
pwsh: 'Pwsh',
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Classify a tool name into its row variant.
|
|
61
|
+
* @param toolName - wire tool name.
|
|
62
|
+
* @returns matching variant, others when unknown.
|
|
63
|
+
*/
|
|
64
|
+
export function classifyTool(toolName) {
|
|
65
|
+
return TOOL_VARIANTS[toolName] ?? 'others';
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Flatten a settled result's content blocks to display text: text blocks
|
|
69
|
+
* verbatim, other block shapes as pretty JSON. Empty content on a failed call
|
|
70
|
+
* falls back to the structured error's `name: code` line.
|
|
71
|
+
* @param node - the settled result node.
|
|
72
|
+
* @returns the flattened result text (may be empty).
|
|
73
|
+
*/
|
|
74
|
+
export function resultText(node) {
|
|
75
|
+
const parts = [];
|
|
76
|
+
for (const block of node.content) {
|
|
77
|
+
if (block.type === 'text')
|
|
78
|
+
parts.push(block.text);
|
|
79
|
+
else
|
|
80
|
+
parts.push(JSON.stringify(block, null, 2));
|
|
81
|
+
}
|
|
82
|
+
if (parts.length === 0 && node.error !== undefined) {
|
|
83
|
+
parts.push(`${node.error.name}: ${node.error.code}`);
|
|
84
|
+
}
|
|
85
|
+
return parts.join('\n');
|
|
86
|
+
}
|
|
87
|
+
function parseArgs(argsRaw) {
|
|
88
|
+
try {
|
|
89
|
+
return JSON.parse(argsRaw);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// Non-JSON args (mid-stream truncation): summary/body fall back to the raw string.
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function firstLine(text) {
|
|
97
|
+
const nl = text.indexOf('\n');
|
|
98
|
+
return nl === -1 ? text : text.slice(0, nl);
|
|
99
|
+
}
|
|
100
|
+
function pickString(args, keys) {
|
|
101
|
+
for (const key of keys) {
|
|
102
|
+
const v = args[key];
|
|
103
|
+
if (typeof v === 'string' && v !== '')
|
|
104
|
+
return v;
|
|
105
|
+
}
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
/** Summary key preference per variant (args-derived; result-derived summaries are a ledger item). */
|
|
109
|
+
const SUMMARY_KEYS = {
|
|
110
|
+
bash: ['description', 'command'],
|
|
111
|
+
read: ['path', 'file_path', 'url'],
|
|
112
|
+
search: ['query', 'pattern', 'url'],
|
|
113
|
+
write: ['path', 'file_path'],
|
|
114
|
+
edit: ['path', 'file_path'],
|
|
115
|
+
code: ['description'],
|
|
116
|
+
others: [],
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Strip the workspace root from a workspace-rooted absolute path (display only).
|
|
120
|
+
* @param text - the path to shorten.
|
|
121
|
+
* @param cwd - session workspace root; absent or empty leaves the path unchanged.
|
|
122
|
+
* @returns the path relative to the workspace root, or unchanged when it is not rooted there.
|
|
123
|
+
*/
|
|
124
|
+
export function relativizeToCwd(text, cwd) {
|
|
125
|
+
if (cwd === undefined || cwd === '')
|
|
126
|
+
return text;
|
|
127
|
+
const root = cwd.replace(/[/\\]+$/, '');
|
|
128
|
+
if (text.startsWith(`${root}/`) || text.startsWith(`${root}\\`))
|
|
129
|
+
return text.slice(root.length + 1);
|
|
130
|
+
return text;
|
|
131
|
+
}
|
|
132
|
+
function deriveSummary(variant, argsRaw) {
|
|
133
|
+
const parsed = parseArgs(argsRaw);
|
|
134
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
135
|
+
return firstLine(argsRaw);
|
|
136
|
+
const args = parsed;
|
|
137
|
+
if (variant === 'search' && Array.isArray(args.queries)) {
|
|
138
|
+
const queries = args.queries.filter((query) => typeof query === 'string' && query !== '');
|
|
139
|
+
if (queries.length > 0)
|
|
140
|
+
return queries.map(firstLine).join(', ');
|
|
141
|
+
}
|
|
142
|
+
const picked = pickString(args, SUMMARY_KEYS[variant]);
|
|
143
|
+
if (picked !== undefined)
|
|
144
|
+
return firstLine(picked);
|
|
145
|
+
for (const v of Object.values(args)) {
|
|
146
|
+
if (typeof v === 'string' && v !== '')
|
|
147
|
+
return firstLine(v);
|
|
148
|
+
}
|
|
149
|
+
return firstLine(argsRaw);
|
|
150
|
+
}
|
|
151
|
+
/** Path keys only — never `url` (web_fetch lands on the read variant). */
|
|
152
|
+
const FILE_PATH_KEYS = ['path', 'file_path'];
|
|
153
|
+
/** File-tool variants whose summary may be an openable workspace path. */
|
|
154
|
+
const FILE_PATH_VARIANTS = new Set(['read', 'write', 'edit']);
|
|
155
|
+
function deriveFilePath(variant, argsRaw) {
|
|
156
|
+
if (!FILE_PATH_VARIANTS.has(variant))
|
|
157
|
+
return undefined;
|
|
158
|
+
const parsed = parseArgs(argsRaw);
|
|
159
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
160
|
+
return undefined;
|
|
161
|
+
const picked = pickString(parsed, FILE_PATH_KEYS);
|
|
162
|
+
return picked === undefined ? undefined : firstLine(picked);
|
|
163
|
+
}
|
|
164
|
+
function deriveBody(variant, argsRaw) {
|
|
165
|
+
if (argsRaw === '')
|
|
166
|
+
return null;
|
|
167
|
+
const parsed = parseArgs(argsRaw);
|
|
168
|
+
if (parsed === undefined)
|
|
169
|
+
return argsRaw;
|
|
170
|
+
// The code row's expanded body IS the program (monospace via the row's
|
|
171
|
+
// variant styling), not the args JSON envelope around it.
|
|
172
|
+
if (variant === 'code' && typeof parsed === 'object' && parsed !== null) {
|
|
173
|
+
const code = parsed.code;
|
|
174
|
+
if (typeof code === 'string' && code !== '')
|
|
175
|
+
return code;
|
|
176
|
+
}
|
|
177
|
+
return JSON.stringify(parsed, null, 2);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Derive the full row model from a frozen call slice.
|
|
181
|
+
* @param toolName - wire tool name (dispatch-supplied; survives windowless results).
|
|
182
|
+
* @param block - RunningToolCall or ToolResultNode off the snapshot caches.
|
|
183
|
+
* @param cwd - session workspace root; workspace-rooted path summaries display relative to it.
|
|
184
|
+
* @param home - host account home; a leftover POSIX home path displays as `~`.
|
|
185
|
+
* @returns the row model.
|
|
186
|
+
*/
|
|
187
|
+
export function toolRowModel(toolName, block, cwd, home) {
|
|
188
|
+
const variant = classifyTool(toolName);
|
|
189
|
+
const done = 'kind' in block;
|
|
190
|
+
const argsRaw = (done ? block.call?.argsRaw : ('argsRaw' in block ? block.argsRaw : '')) ?? '';
|
|
191
|
+
const state = !done ? 'running'
|
|
192
|
+
: block.error?.code === 'interrupted' ? 'stopped'
|
|
193
|
+
: block.isError ? 'error' : 'ok';
|
|
194
|
+
const base = argsRaw === ''
|
|
195
|
+
? block.callId
|
|
196
|
+
: abbreviateHomePath(relativizeToCwd(deriveSummary(variant, argsRaw), cwd), home);
|
|
197
|
+
const toolTitle = TOOL_TITLES[toolName];
|
|
198
|
+
// Others keeps the static "Tool call" title (figma literal); the real tool
|
|
199
|
+
// name rides the mutable summary slot unless the tool owns a specific title.
|
|
200
|
+
const summary = variant === 'others' && toolName !== '' && toolTitle === undefined
|
|
201
|
+
? `${toolName} · ${base}`
|
|
202
|
+
: base;
|
|
203
|
+
// The empty string is "no text" for both derived result fields: a settled
|
|
204
|
+
// call with blank content has nothing to expand, and a blank first line
|
|
205
|
+
// would erase the collapsed error row's summary slot.
|
|
206
|
+
const output = done ? (resultText(block) || null) : null;
|
|
207
|
+
const errorSummary = state === 'error' && output !== null ? firstLine(output) : null;
|
|
208
|
+
return {
|
|
209
|
+
variant,
|
|
210
|
+
title: toolTitle ?? VARIANT_TITLES[variant],
|
|
211
|
+
summary,
|
|
212
|
+
filePath: deriveFilePath(variant, argsRaw),
|
|
213
|
+
body: deriveBody(variant, argsRaw),
|
|
214
|
+
output,
|
|
215
|
+
errorSummary,
|
|
216
|
+
state,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=tool-call-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-call-model.js","sourceRoot":"","sources":["../../../../src/client/native/tool-call-model.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wEAAwE;AACxE,4EAA4E;AAC5E,6BAA6B;AAC7B,OAAO,EAAE,kBAAk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CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;IACpC,MAAM,IAAI,GAAG,OAAO,KAAK,EAAE;QACzB,CAAC,CAAC,KAAK,CAAC,MAAM;QACd,CAAC,CAAC,kBAAkB,CAAC,eAAe,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,CAAA;IACnF,MAAM,SAAS,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAA;IACvC,2EAA2E;IAC3E,6EAA6E;IAC7E,MAAM,OAAO,GAAG,OAAO,KAAK,QAAQ,IAAI,QAAQ,KAAK,EAAE,IAAI,SAAS,KAAK,SAAS;QAChF,CAAC,CAAC,GAAG,QAAQ,MAAM,IAAI,EAAE;QACzB,CAAC,CAAC,IAAI,CAAA;IACR,0EAA0E;IAC1E,wEAAwE;IACxE,sDAAsD;IACtD,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACxD,MAAM,YAAY,GAAG,KAAK,KAAK,OAAO,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IACpF,OAAO;QACL,OAAO;QACP,KAAK,EAAE,SAAS,IAAI,cAAc,CAAC,OAAO,CAAC;QAC3C,OAAO;QACP,QAAQ,EAAE,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC;QAC1C,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC;QAClC,MAAM;QACN,YAAY;QACZ,KAAK;KACN,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** One developer tool-change block the 0.1.7-rc.2 context row names in place. */
|
|
2
|
+
export interface ToolChangeBlock {
|
|
3
|
+
type: 'tool-addition' | 'tool-removal';
|
|
4
|
+
toolName: string;
|
|
5
|
+
}
|
|
6
|
+
/** Names collected from a context whose every block is a tool change. */
|
|
7
|
+
export interface ToolUpdateRows {
|
|
8
|
+
added: readonly string[];
|
|
9
|
+
removed: readonly string[];
|
|
10
|
+
/** The only block, when the row is a single add or removal. */
|
|
11
|
+
single: ToolChangeBlock | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Classify a context as the rc.2 tool-update row.
|
|
15
|
+
* Mixed or empty content stays on the generic injection presentation.
|
|
16
|
+
* @param content - durable context blocks.
|
|
17
|
+
* @returns collected names, or null when any block is not a tool change.
|
|
18
|
+
*/
|
|
19
|
+
export declare function toolUpdateRows(content: readonly {
|
|
20
|
+
readonly type: string;
|
|
21
|
+
readonly toolName?: string;
|
|
22
|
+
}[]): ToolUpdateRows | null;
|
|
23
|
+
//# sourceMappingURL=tool-update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-update.d.ts","sourceRoot":"","sources":["../../../../src/client/native/tool-update.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,eAAe,GAAG,cAAc,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,+DAA+D;IAC/D,MAAM,EAAE,eAAe,GAAG,IAAI,CAAA;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,cAAc,GAAG,IAAI,CAW/H"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classify a context as the rc.2 tool-update row.
|
|
3
|
+
* Mixed or empty content stays on the generic injection presentation.
|
|
4
|
+
* @param content - durable context blocks.
|
|
5
|
+
* @returns collected names, or null when any block is not a tool change.
|
|
6
|
+
*/
|
|
7
|
+
export function toolUpdateRows(content) {
|
|
8
|
+
if (content.length === 0)
|
|
9
|
+
return null;
|
|
10
|
+
const rows = [];
|
|
11
|
+
for (const block of content) {
|
|
12
|
+
if (block.type !== 'tool-addition' && block.type !== 'tool-removal')
|
|
13
|
+
return null;
|
|
14
|
+
if (typeof block.toolName !== 'string')
|
|
15
|
+
return null;
|
|
16
|
+
rows.push({ type: block.type, toolName: block.toolName });
|
|
17
|
+
}
|
|
18
|
+
const added = rows.flatMap(row => row.type === 'tool-addition' ? [row.toolName] : []);
|
|
19
|
+
const removed = rows.flatMap(row => row.type === 'tool-removal' ? [row.toolName] : []);
|
|
20
|
+
return { added, removed, single: rows.length === 1 ? rows[0] : null };
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=tool-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-update.js","sourceRoot":"","sources":["../../../../src/client/native/tool-update.ts"],"names":[],"mappings":"AAcA;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAAyE;IACtG,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACrC,MAAM,IAAI,GAAsB,EAAE,CAAA;IAClC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc;YAAE,OAAO,IAAI,CAAA;QAChF,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAA;QACnD,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC3D,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACrF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACtF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;AACxE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { SlotEntryDef, SlotMap, SlotSpec, StoredEntry } from '@deepseek-ai/dsh-client-ui-slots';
|
|
3
|
+
/**
|
|
4
|
+
* RC2 composition adapter. Only public registry operations are used. We lend
|
|
5
|
+
* registrations a Reader-owned seat, not a second implementation of their UI.
|
|
6
|
+
* The platform still binds injection, hooks, locale, stores and boundaries.
|
|
7
|
+
* Original entries, declarations and components are never changed.
|
|
8
|
+
*
|
|
9
|
+
* Child seats have unique names because RC2 declarations have one owner. The
|
|
10
|
+
* sole component wrapper translates those names before delegating to the
|
|
11
|
+
* framework-provided renderSlot. It does not implement a slot renderer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const OFFICIAL_SLOTS: {
|
|
14
|
+
readonly actions: "conversation.chat.assistant-actions";
|
|
15
|
+
readonly tools: "tool.call.toolview";
|
|
16
|
+
readonly tail: "conversation.chat.turnTail";
|
|
17
|
+
readonly nodes: "conversation.chat.node";
|
|
18
|
+
readonly images: "conversation.message.images";
|
|
19
|
+
};
|
|
20
|
+
export type OfficialFamily = keyof typeof OFFICIAL_SLOTS;
|
|
21
|
+
export declare const OFFICIAL_SEATS: {
|
|
22
|
+
readonly actions: "dsh-better-display.official.actions/conversation.chat.assistant-actions";
|
|
23
|
+
readonly tools: "dsh-better-display.official.tools/tool.call.toolview";
|
|
24
|
+
readonly tail: "dsh-better-display.official.tail/conversation.chat.turnTail";
|
|
25
|
+
readonly nodes: "dsh-better-display.official.nodes/conversation.chat.node";
|
|
26
|
+
readonly images: "dsh-better-display.official.images/conversation.message.images";
|
|
27
|
+
};
|
|
28
|
+
export type OfficialSeat = typeof OFFICIAL_SEATS[OfficialFamily];
|
|
29
|
+
export declare const officialSeat: (family: OfficialFamily, source?: string) => string;
|
|
30
|
+
type Spec = SlotSpec<SlotEntryDef>;
|
|
31
|
+
type Registration = StoredEntry['options'] & Omit<StoredEntry, 'options' | 'component'> & {
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
/** The documented, type-erased registry inspection/registration boundary. */
|
|
35
|
+
export interface CompositionRegistry {
|
|
36
|
+
spec(key: string): Spec | undefined;
|
|
37
|
+
entriesOfSlot(key: string): readonly StoredEntry[];
|
|
38
|
+
subscribe(key: string, listener: () => void): () => void;
|
|
39
|
+
inject(key: string, effect: () => () => void): () => void;
|
|
40
|
+
register(options: Registration, component: unknown): () => void;
|
|
41
|
+
}
|
|
42
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
43
|
+
interface SlotMap {
|
|
44
|
+
'dsh-better-display.official.actions/conversation.chat.assistant-actions': SlotMap['conversation.chat.assistant-actions'];
|
|
45
|
+
'dsh-better-display.official.tools/tool.call.toolview': SlotMap['tool.call.toolview'];
|
|
46
|
+
'dsh-better-display.official.tail/conversation.chat.turnTail': SlotMap['conversation.chat.turnTail'];
|
|
47
|
+
'dsh-better-display.official.nodes/conversation.chat.node': SlotMap['conversation.chat.node'];
|
|
48
|
+
'dsh-better-display.official.images/conversation.message.images': SlotMap['conversation.message.images'];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Reader already presents produced paths with its copy/reveal actions. RC2's
|
|
53
|
+
* official tail additionally owns explicit `present` artifacts. Leave those
|
|
54
|
+
* cards, actions and state intact, and omit only the duplicate produced chips.
|
|
55
|
+
* This changes a presentation prop, never the source match or session data.
|
|
56
|
+
* Unrecognized shapes pass through intact for safe forward degradation.
|
|
57
|
+
*/
|
|
58
|
+
export declare function readerTailMatch(value: unknown, displayedPaths?: readonly string[]): unknown;
|
|
59
|
+
export declare function officialChildren(slots: Pick<CompositionRegistry, 'spec'>): {
|
|
60
|
+
[K in OfficialSeat]: SlotSpec<SlotMap[K]>;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Mirror one elected contribution set incrementally. Unrelated additions do not
|
|
64
|
+
* remount existing cards or recreate their subscriptions. A source unload/HMR
|
|
65
|
+
* disposes the corresponding subtree and closures before its replacement.
|
|
66
|
+
*/
|
|
67
|
+
export declare function mirrorOfficialSlot(slots: CompositionRegistry, source: string, target: string, namespace: string, accept?: (entry: StoredEntry) => boolean): () => void;
|
|
68
|
+
export declare function installOfficialSlots(ctx: Context): () => void;
|
|
69
|
+
export type OfficialSlotKey = typeof OFFICIAL_SLOTS[OfficialFamily] & keyof SlotMap;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=official-slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"official-slots.d.ts","sourceRoot":"","sources":["../../../src/client/official-slots.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAGrG;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AACX,MAAM,MAAM,cAAc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BAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAO3F;AAUD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG;KAAG,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAAE,CAUxH;AAqBD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAoB,GACnD,MAAM,IAAI,CA+CZ;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,IAAI,CAwB7D;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,cAAc,CAAC,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { createElement, memo, useMemo } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* RC2 composition adapter. Only public registry operations are used. We lend
|
|
4
|
+
* registrations a Reader-owned seat, not a second implementation of their UI.
|
|
5
|
+
* The platform still binds injection, hooks, locale, stores and boundaries.
|
|
6
|
+
* Original entries, declarations and components are never changed.
|
|
7
|
+
*
|
|
8
|
+
* Child seats have unique names because RC2 declarations have one owner. The
|
|
9
|
+
* sole component wrapper translates those names before delegating to the
|
|
10
|
+
* framework-provided renderSlot. It does not implement a slot renderer.
|
|
11
|
+
*/
|
|
12
|
+
export const OFFICIAL_SLOTS = {
|
|
13
|
+
actions: 'conversation.chat.assistant-actions',
|
|
14
|
+
tools: 'tool.call.toolview',
|
|
15
|
+
tail: 'conversation.chat.turnTail',
|
|
16
|
+
nodes: 'conversation.chat.node',
|
|
17
|
+
images: 'conversation.message.images',
|
|
18
|
+
};
|
|
19
|
+
export const OFFICIAL_SEATS = {
|
|
20
|
+
actions: 'dsh-better-display.official.actions/conversation.chat.assistant-actions',
|
|
21
|
+
tools: 'dsh-better-display.official.tools/tool.call.toolview',
|
|
22
|
+
tail: 'dsh-better-display.official.tail/conversation.chat.turnTail',
|
|
23
|
+
nodes: 'dsh-better-display.official.nodes/conversation.chat.node',
|
|
24
|
+
images: 'dsh-better-display.official.images/conversation.message.images',
|
|
25
|
+
};
|
|
26
|
+
export const officialSeat = (family, source = OFFICIAL_SLOTS[family]) => `dsh-better-display.official.${family}/${source}`;
|
|
27
|
+
// Existing Reader presentations own these rows. All other node kinds, including
|
|
28
|
+
// future registrations, reach the official renderer through the fallback seat.
|
|
29
|
+
const READER_NODES = new Set(['user', 'steering', 'assistant-step', 'tool-call', 'turn-tail', 'turn-process']);
|
|
30
|
+
const EXPECTED = {
|
|
31
|
+
actions: { kind: 'list', scope: 'session' },
|
|
32
|
+
tools: { kind: 'keyed', scope: 'session' },
|
|
33
|
+
tail: { kind: 'list', scope: 'session' },
|
|
34
|
+
nodes: { kind: 'keyed', scope: 'session' },
|
|
35
|
+
images: { kind: 'single', scope: 'session' },
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Reader already presents produced paths with its copy/reveal actions. RC2's
|
|
39
|
+
* official tail additionally owns explicit `present` artifacts. Leave those
|
|
40
|
+
* cards, actions and state intact, and omit only the duplicate produced chips.
|
|
41
|
+
* This changes a presentation prop, never the source match or session data.
|
|
42
|
+
* Unrecognized shapes pass through intact for safe forward degradation.
|
|
43
|
+
*/
|
|
44
|
+
export function readerTailMatch(value, displayedPaths) {
|
|
45
|
+
if (!value || typeof value !== 'object')
|
|
46
|
+
return value;
|
|
47
|
+
const match = value;
|
|
48
|
+
const displayed = new Set(displayedPaths ?? []);
|
|
49
|
+
return displayed.size > 0 && Array.isArray(match.produced) && Array.isArray(match.presented)
|
|
50
|
+
? { ...match, produced: match.produced.filter(path => !displayed.has(path)) }
|
|
51
|
+
: value;
|
|
52
|
+
}
|
|
53
|
+
function tailPresentation(component) {
|
|
54
|
+
const Original = component;
|
|
55
|
+
return memo(function ReaderTailPresentation(props) {
|
|
56
|
+
const matched = useMemo(() => readerTailMatch(props.matched, props.readerProducedPaths), [props.matched, props.readerProducedPaths]);
|
|
57
|
+
return createElement(Original, { ...props, matched });
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export function officialChildren(slots) {
|
|
61
|
+
return Object.fromEntries(Object.entries(OFFICIAL_SLOTS).map(([name, source]) => {
|
|
62
|
+
const family = name;
|
|
63
|
+
const spec = slots.spec(source);
|
|
64
|
+
if (spec && (spec.kind !== EXPECTED[family].kind || spec.scope !== EXPECTED[family].scope)) {
|
|
65
|
+
throw new Error(`Official slot contract changed: ${source} (${spec.kind}/${spec.scope})`);
|
|
66
|
+
}
|
|
67
|
+
// In particular, retain conversation.chat.node's contextual turn-data hook.
|
|
68
|
+
return [officialSeat(family), spec ?? EXPECTED[family]];
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
function translatedComponent(entry, names) {
|
|
72
|
+
if (names.size === 0)
|
|
73
|
+
return entry.component;
|
|
74
|
+
const Original = entry.component;
|
|
75
|
+
return memo(function OfficialSlotChildren(props) {
|
|
76
|
+
const renders = useMemo(() => {
|
|
77
|
+
const translate = (render) => (key, owner, options) => {
|
|
78
|
+
const seat = names.get(key);
|
|
79
|
+
if (!seat || !render)
|
|
80
|
+
throw new Error(`Undeclared official child slot: ${key}`);
|
|
81
|
+
return render(seat, owner, options);
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
renderSlot: translate(props.renderSlot),
|
|
85
|
+
...(props.renderSlotChain ? { renderSlotChain: translate(props.renderSlotChain) } : {}),
|
|
86
|
+
};
|
|
87
|
+
}, [props.renderSlot, props.renderSlotChain]);
|
|
88
|
+
return createElement(Original, { ...props, ...renders });
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Mirror one elected contribution set incrementally. Unrelated additions do not
|
|
93
|
+
* remount existing cards or recreate their subscriptions. A source unload/HMR
|
|
94
|
+
* disposes the corresponding subtree and closures before its replacement.
|
|
95
|
+
*/
|
|
96
|
+
export function mirrorOfficialSlot(slots, source, target, namespace, accept = () => true) {
|
|
97
|
+
const mounted = new Map();
|
|
98
|
+
let stopped = false;
|
|
99
|
+
const reconcile = () => {
|
|
100
|
+
if (stopped)
|
|
101
|
+
return;
|
|
102
|
+
const entries = slots.entriesOfSlot(source).filter(accept);
|
|
103
|
+
const wanted = new Set(entries);
|
|
104
|
+
for (const [entry, dispose] of mounted) {
|
|
105
|
+
if (wanted.has(entry))
|
|
106
|
+
continue;
|
|
107
|
+
dispose();
|
|
108
|
+
mounted.delete(entry);
|
|
109
|
+
}
|
|
110
|
+
for (const entry of entries) {
|
|
111
|
+
if (mounted.has(entry))
|
|
112
|
+
continue;
|
|
113
|
+
const names = new Map(Object.keys(entry.children ?? {}).map(key => [key, `${namespace}/${key}`]));
|
|
114
|
+
const children = Object.fromEntries([...names].map(([key, seat]) => [seat, entry.children[key]]));
|
|
115
|
+
const disposers = [];
|
|
116
|
+
const dispose = () => { for (const stop of disposers.splice(0).reverse())
|
|
117
|
+
stop(); };
|
|
118
|
+
try {
|
|
119
|
+
const { component: _component, options, children: _children, ...metadata } = entry;
|
|
120
|
+
const presentation = source === OFFICIAL_SLOTS.tail && entry.locale === 'deliverables'
|
|
121
|
+
? { ...entry, component: tailPresentation(entry.component) }
|
|
122
|
+
: entry;
|
|
123
|
+
disposers.push(slots.register({
|
|
124
|
+
...options, ...metadata, name: target,
|
|
125
|
+
...(names.size ? { children } : {}),
|
|
126
|
+
registrant: `dsh-better-display → ${entry.registrant ?? source}`,
|
|
127
|
+
}, translatedComponent(presentation, names)));
|
|
128
|
+
for (const [key, seat] of names) {
|
|
129
|
+
disposers.push(mirrorOfficialSlot(slots, key, seat, namespace));
|
|
130
|
+
}
|
|
131
|
+
mounted.set(entry, dispose);
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
dispose();
|
|
135
|
+
throw error;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
const unsubscribe = slots.subscribe(source, reconcile);
|
|
140
|
+
const dispose = () => {
|
|
141
|
+
stopped = true;
|
|
142
|
+
unsubscribe();
|
|
143
|
+
for (const stop of [...mounted.values()].reverse())
|
|
144
|
+
stop();
|
|
145
|
+
mounted.clear();
|
|
146
|
+
};
|
|
147
|
+
try {
|
|
148
|
+
reconcile();
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
dispose();
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
return dispose;
|
|
155
|
+
}
|
|
156
|
+
export function installOfficialSlots(ctx) {
|
|
157
|
+
// The SlotMap overloads are for statically declared keys. Aliases are a
|
|
158
|
+
// runtime composition, using exactly the public erased metadata contract.
|
|
159
|
+
const slots = ctx.slots;
|
|
160
|
+
const disposers = [];
|
|
161
|
+
try {
|
|
162
|
+
for (const [name, source] of Object.entries(OFFICIAL_SLOTS)) {
|
|
163
|
+
const family = name;
|
|
164
|
+
disposers.push(slots.inject(source, () => {
|
|
165
|
+
const spec = slots.spec(source);
|
|
166
|
+
const target = officialSeat(family);
|
|
167
|
+
const declared = slots.spec(target);
|
|
168
|
+
if (spec.kind !== declared?.kind || spec.scope !== declared.scope) {
|
|
169
|
+
throw new Error(`Official slot contract changed: ${source}`);
|
|
170
|
+
}
|
|
171
|
+
return mirrorOfficialSlot(slots, source, target, `dsh-better-display.official.${family}`, family === 'nodes' ? entry => !READER_NODES.has(entry.options.key ?? '') : undefined);
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
for (const stop of disposers.reverse())
|
|
177
|
+
stop();
|
|
178
|
+
throw error;
|
|
179
|
+
}
|
|
180
|
+
return () => { for (const stop of disposers.splice(0).reverse())
|
|
181
|
+
stop(); };
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=official-slots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"official-slots.js","sourceRoot":"","sources":["../../../src/client/official-slots.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAsC,MAAM,OAAO,CAAC;AAKzF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,qCAAqC;IAC9C,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,4BAA4B;IAClC,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,6BAA6B;CAC7B,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,yEAAyE;IAClF,KAAK,EAAE,sDAAsD;IAC7D,IAAI,EAAE,6DAA6D;IACnE,KAAK,EAAE,0DAA0D;IACjE,MAAM,EAAE,gEAAgE;CAChE,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAsB,EAAE,SAAiB,cAAc,CAAC,MAAM,CAAC,EAAE,EAAE,CAC9F,+BAA+B,MAAM,IAAI,MAAM,EAAE,CAAC;AA0BpD,gFAAgF;AAChF,+EAA+E;AAC/E,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;AAC/G,MAAM,QAAQ,GAAiC;IAC7C,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3C,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;IAC1C,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EA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AC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type DeliverableOpenMode = 'external' | 'sidebar';
|
|
2
|
+
export interface OpenModeSnapshot {
|
|
3
|
+
getSnapshot: () => {
|
|
4
|
+
deliverableOpenMode?: DeliverableOpenMode;
|
|
5
|
+
};
|
|
6
|
+
subscribe?: (fn: () => void) => () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function deliverableOpenModeOf(value: unknown): DeliverableOpenMode;
|
|
9
|
+
export declare function modeFromSnapshot(store: OpenModeSnapshot | undefined): DeliverableOpenMode;
|
|
10
|
+
/** Workspace-folder affordances stay on the OS opener, not the Sidebar switch. */
|
|
11
|
+
export declare function isFolderOpenPath(path: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Session-scoped `dsh-resource://file/session/<id>/…` address.
|
|
14
|
+
* Matches official `fileAddressFor` / `sessionFileAddress` (0.1.5).
|
|
15
|
+
*/
|
|
16
|
+
export declare function fileAddressFor(sessionId: string, cwd: string | undefined, path: string): string;
|
|
17
|
+
export declare function resolveOpenWorkspacePath(cwd: string | undefined, path: string, resolveWorkspacePath: (cwd: string | undefined, path: string) => string): string;
|
|
18
|
+
export declare function openDeliverableFile(args: {
|
|
19
|
+
path: string;
|
|
20
|
+
mode: DeliverableOpenMode;
|
|
21
|
+
sessionId: string;
|
|
22
|
+
cwd: string | undefined;
|
|
23
|
+
resolveWorkspacePath: (cwd: string | undefined, path: string) => string;
|
|
24
|
+
openExternal: (absolutePath: string) => Promise<void>;
|
|
25
|
+
openSidebar?: (address: string) => void;
|
|
26
|
+
fileAddressFor?: (sessionId: string, cwd: string | undefined, path: string) => string;
|
|
27
|
+
warn?: (message: string, extra?: unknown) => void;
|
|
28
|
+
}): Promise<'sidebar' | 'external'>;
|
|
29
|
+
//# sourceMappingURL=open-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-file.d.ts","sourceRoot":"","sources":["../../../src/client/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