@1agh/maude 1.10.0 → 2.0.0-rc.2
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/apps/hub/src/project-transactions/baseline.mjs +276 -0
- package/apps/hub/src/project-transactions/kernel.mjs +1756 -0
- package/apps/hub/src/project-transactions/lanes.mjs +287 -0
- package/apps/hub/src/project-transactions/runs-core.mjs +639 -0
- package/apps/hub/src/project-transactions/store-core.mjs +831 -0
- package/apps/studio/access/closure.ts +1075 -0
- package/apps/studio/access/filters.ts +1193 -0
- package/apps/studio/access/frame.ts +365 -0
- package/apps/studio/access/known-canvases.ts +82 -0
- package/apps/studio/access/request.ts +637 -0
- package/apps/studio/access/roles.ts +187 -0
- package/apps/studio/access/scope.ts +407 -0
- package/apps/studio/access/share-map.ts +434 -0
- package/apps/studio/acp/adapter-stderr.ts +22 -0
- package/apps/studio/acp/agent-path.ts +39 -0
- package/apps/studio/acp/ask-queue.ts +238 -0
- package/apps/studio/acp/audience.ts +615 -0
- package/apps/studio/acp/bootstrap-brief.ts +32 -15
- package/apps/studio/acp/bridge.ts +890 -114
- package/apps/studio/acp/chat-search.ts +195 -0
- package/apps/studio/acp/connected-fact.ts +83 -0
- package/apps/studio/acp/design-write-verb.ts +71 -0
- package/apps/studio/acp/env.ts +86 -0
- package/apps/studio/acp/index.ts +808 -58
- package/apps/studio/acp/login-state.ts +15 -1
- package/apps/studio/acp/may-scope.ts +771 -0
- package/apps/studio/acp/plugin-bootstrap.ts +90 -5
- package/apps/studio/acp/probe.ts +18 -4
- package/apps/studio/acp/repo-private.ts +73 -0
- package/apps/studio/acp/running.ts +50 -5
- package/apps/studio/acp/transcript.ts +356 -21
- package/apps/studio/acp/write-scope.ts +141 -11
- package/apps/studio/actions/agents.ts +2068 -0
- package/apps/studio/actions/canvas-keys.ts +41 -0
- package/apps/studio/actions/ctx.ts +118 -0
- package/apps/studio/actions/defs/_v1.ts +55 -0
- package/apps/studio/actions/defs/ai-runs.ts +56 -0
- package/apps/studio/actions/defs/annotation.ts +164 -0
- package/apps/studio/actions/defs/app.ts +269 -0
- package/apps/studio/actions/defs/canvas.ts +281 -0
- package/apps/studio/actions/defs/chat.ts +158 -0
- package/apps/studio/actions/defs/diagnostics.ts +52 -0
- package/apps/studio/actions/defs/ds.ts +139 -0
- package/apps/studio/actions/defs/edit.ts +986 -0
- package/apps/studio/actions/defs/export.ts +221 -0
- package/apps/studio/actions/defs/history.ts +175 -0
- package/apps/studio/actions/defs/native.ts +264 -0
- package/apps/studio/actions/defs/presence.ts +53 -0
- package/apps/studio/actions/defs/search.ts +90 -0
- package/apps/studio/actions/defs/sync.ts +47 -0
- package/apps/studio/actions/defs/timeline.ts +254 -0
- package/apps/studio/actions/defs/tool.ts +152 -0
- package/apps/studio/actions/defs/ui.ts +38 -0
- package/apps/studio/actions/defs/video.ts +115 -0
- package/apps/studio/actions/defs/view.ts +556 -0
- package/apps/studio/actions/documents.ts +32 -0
- package/apps/studio/actions/forward.ts +48 -0
- package/apps/studio/actions/help.ts +115 -0
- package/apps/studio/actions/index.ts +51 -0
- package/apps/studio/actions/keymap.gen.ts +1170 -0
- package/apps/studio/actions/keys.ts +271 -0
- package/apps/studio/actions/legacy.ts +250 -0
- package/apps/studio/actions/manifest-version.ts +18 -0
- package/apps/studio/actions/menu.ts +203 -0
- package/apps/studio/actions/native-menu.ts +132 -0
- package/apps/studio/actions/resolve.ts +118 -0
- package/apps/studio/actions/types.ts +266 -0
- package/apps/studio/actions/uniqueness.ts +119 -0
- package/apps/studio/actions/verbs.ts +306 -0
- package/apps/studio/actions.manifest.json +7826 -0
- package/apps/studio/actions.parity.json +268 -0
- package/apps/studio/activity.ts +4 -31
- package/apps/studio/agent-runs.ts +679 -0
- package/apps/studio/ai/attach-grants.ts +497 -0
- package/apps/studio/ai/copy-meta.ts +204 -0
- package/apps/studio/ai/create-claim.ts +88 -0
- package/apps/studio/ai/lease-home.ts +212 -0
- package/apps/studio/ai/run-doing.ts +106 -0
- package/apps/studio/ai/run-lifecycle.ts +337 -0
- package/apps/studio/ai/run-progress.ts +154 -0
- package/apps/studio/ai/runs.ts +1232 -0
- package/apps/studio/ai/save-hold.ts +565 -0
- package/apps/studio/ai/watch-progress.ts +182 -0
- package/apps/studio/ai/write-claim-scope.ts +39 -0
- package/apps/studio/ai/write-claim.ts +193 -0
- package/apps/studio/ai-banner.tsx +8 -14
- package/apps/studio/annotations/ai-read.ts +289 -1
- package/apps/studio/annotations/ai-write.ts +281 -23
- package/apps/studio/annotations/artboard-members.ts +86 -0
- package/apps/studio/annotations/board-ops.ts +358 -0
- package/apps/studio/annotations/board-schema.ts +81 -0
- package/apps/studio/annotations/constants.ts +2 -0
- package/apps/studio/annotations/elements/_shared.ts +290 -1
- package/apps/studio/annotations/elements/arrow.model.ts +29 -2
- package/apps/studio/annotations/elements/ballot.model.ts +110 -0
- package/apps/studio/annotations/elements/media.model.ts +11 -1
- package/apps/studio/annotations/elements/section.model.ts +3 -1
- package/apps/studio/annotations/elements/stamp.model.ts +83 -0
- package/apps/studio/annotations/elements/sticky.model.ts +235 -0
- package/apps/studio/annotations/elements/vote.model.ts +71 -0
- package/apps/studio/annotations/fields.ts +51 -0
- package/apps/studio/annotations/figjam-into.ts +119 -0
- package/apps/studio/annotations/hosts.ts +231 -0
- package/apps/studio/annotations/migrate-v1.ts +21 -2
- package/apps/studio/annotations/ops.ts +23 -0
- package/apps/studio/annotations/registry.ts +154 -16
- package/apps/studio/annotations/route.ts +268 -0
- package/apps/studio/annotations/run-tag.ts +150 -0
- package/apps/studio/annotations/stamp-kinds.ts +66 -0
- package/apps/studio/annotations/templates.ts +154 -0
- package/apps/studio/annotations/text-steps.ts +253 -0
- package/apps/studio/annotations/time-marks.ts +140 -0
- package/apps/studio/annotations/types.ts +22 -0
- package/apps/studio/annotations/ui/ai-marks.tsx +64 -0
- package/apps/studio/annotations/ui/ai-seen.tsx +117 -0
- package/apps/studio/annotations/ui/arrow-bind.ts +347 -0
- package/apps/studio/annotations/ui/arrow-cards.tsx +396 -0
- package/apps/studio/annotations/ui/arrow-kinds.ts +90 -0
- package/apps/studio/annotations/ui/bar-place.ts +18 -0
- package/apps/studio/annotations/ui/element-node.tsx +300 -52
- package/apps/studio/annotations/ui/host-view.ts +99 -0
- package/apps/studio/annotations/ui/locked.tsx +83 -0
- package/apps/studio/annotations/ui/lod.tsx +246 -0
- package/apps/studio/annotations/ui/placement.tsx +270 -0
- package/apps/studio/annotations/ui/pointer-pipeline.ts +10 -0
- package/apps/studio/annotations/ui/posture.ts +124 -0
- package/apps/studio/annotations/ui/quiet-tip.ts +28 -0
- package/apps/studio/annotations/ui/render-model.ts +27 -2
- package/apps/studio/annotations/ui/rest-route.ts +152 -0
- package/apps/studio/annotations/ui/ride.ts +957 -0
- package/apps/studio/annotations/ui/scene.tsx +59 -11
- package/apps/studio/annotations/ui/section-fold.ts +95 -0
- package/apps/studio/annotations/ui/shell-asks.ts +62 -0
- package/apps/studio/annotations/ui/stamps.ts +221 -0
- package/apps/studio/annotations/ui/stamps.tsx +272 -0
- package/apps/studio/annotations/ui/sticker-drop.ts +147 -0
- package/apps/studio/annotations/ui/sticker-preview.ts +41 -0
- package/apps/studio/annotations/ui/sticky-resolve.ts +106 -0
- package/apps/studio/annotations/ui/template-place.ts +108 -0
- package/apps/studio/annotations/ui/text-editor.tsx +6 -4
- package/apps/studio/annotations/ui/text-session.ts +63 -1
- package/apps/studio/annotations/ui/text-style.ts +11 -3
- package/apps/studio/annotations/ui/time-pins.tsx +134 -0
- package/apps/studio/annotations/ui/tool-prefs.ts +242 -0
- package/apps/studio/annotations/ui/tool-state.ts +211 -0
- package/apps/studio/annotations/ui/visibility.ts +76 -0
- package/apps/studio/annotations/ui/vote-dots.tsx +283 -0
- package/apps/studio/annotations/v1-adapter.ts +88 -5
- package/apps/studio/annotations/validate-board.ts +257 -0
- package/apps/studio/annotations/vote-guard.ts +48 -0
- package/apps/studio/annotations/votes-local.ts +481 -0
- package/apps/studio/annotations-bindings.ts +54 -8
- package/apps/studio/annotations-context-toolbar.tsx +612 -150
- package/apps/studio/annotations-layer.tsx +1768 -674
- package/apps/studio/annotations-model.ts +80 -5
- package/apps/studio/api.ts +1553 -459
- package/apps/studio/artboard-activity-overlay.tsx +530 -3
- package/apps/studio/artboard-ai-copies.tsx +187 -0
- package/apps/studio/artboard-convert-marks.tsx +142 -0
- package/apps/studio/artboard-gap-mark.tsx +177 -0
- package/apps/studio/artboard-ghosts-overlay.tsx +106 -0
- package/apps/studio/artboard-growth-memory.ts +56 -0
- package/apps/studio/artboard-growth-tag.tsx +115 -0
- package/apps/studio/artboard-guides-overlay.tsx +86 -26
- package/apps/studio/artboard-marquee.tsx +21 -6
- package/apps/studio/artboard-new-section.tsx +188 -0
- package/apps/studio/artboard-warn-mark.tsx +330 -0
- package/apps/studio/asset-details.ts +339 -0
- package/apps/studio/asset-generated.ts +99 -0
- package/apps/studio/asset-origins.ts +147 -0
- package/apps/studio/asset-placeholder.tsx +481 -0
- package/apps/studio/asset-rename.ts +171 -0
- package/apps/studio/asset-trash.ts +176 -0
- package/apps/studio/asset-upload-bars.tsx +167 -0
- package/apps/studio/asset-upload.ts +145 -1
- package/apps/studio/attribute-artboards.ts +327 -0
- package/apps/studio/bin/_ab-headless.sh +35 -0
- package/apps/studio/bin/_ab-park.sh +83 -0
- package/apps/studio/bin/_agent-browser-safe.mjs +36 -3
- package/apps/studio/bin/_annotate-post.mjs +137 -0
- package/apps/studio/bin/_assets.mjs +213 -0
- package/apps/studio/bin/_brand-colours.mjs +189 -0
- package/apps/studio/bin/_brand-fonts.mjs +158 -0
- package/apps/studio/bin/_brand-site.mjs +309 -0
- package/apps/studio/bin/_canvas-errors.mjs +143 -0
- package/apps/studio/bin/_canvas-rects-playwright.mjs +6 -3
- package/apps/studio/bin/_canvas-rects-static.mjs +1 -1
- package/apps/studio/bin/_check.mjs +122 -0
- package/apps/studio/bin/_comments.mjs +274 -0
- package/apps/studio/bin/_curl-local.mjs +122 -3
- package/apps/studio/bin/_decode-webaudio.mjs +120 -0
- package/apps/studio/bin/_describe.mjs +220 -0
- package/apps/studio/bin/_ds-check.mjs +26 -0
- package/apps/studio/bin/_ds-prove-playwright.mjs +327 -0
- package/apps/studio/bin/_ds-upgrade.mjs +14 -0
- package/apps/studio/bin/_ds.mjs +82 -0
- package/apps/studio/bin/_enumerate-artboards-playwright.mjs +6 -3
- package/apps/studio/bin/_exports.mjs +244 -0
- package/apps/studio/bin/_fetch-asset.mjs +209 -15
- package/apps/studio/bin/_history.mjs +509 -0
- package/apps/studio/bin/_html-playwright.mjs +10 -3
- package/apps/studio/bin/_import-asset.mjs +446 -15
- package/apps/studio/bin/_import-brand.mjs +40 -156
- package/apps/studio/bin/_import-figma.mjs +878 -20
- package/apps/studio/bin/_import-tokens.mjs +8 -118
- package/apps/studio/bin/_index-cli.mjs +126 -0
- package/apps/studio/bin/_layout-check.mjs +35 -0
- package/apps/studio/bin/_logs.mjs +130 -0
- package/apps/studio/bin/_motion-sample-playwright.mjs +6 -3
- package/apps/studio/bin/_no-egress.sh +36 -0
- package/apps/studio/bin/_pdf-playwright.mjs +9 -3
- package/apps/studio/bin/_perf-probe-safari.mjs +327 -37
- package/apps/studio/bin/_perf-probe-studio.mjs +259 -0
- package/apps/studio/bin/_perf-probe.mjs +35 -1
- package/apps/studio/bin/_perf-shared.mjs +377 -12
- package/apps/studio/bin/_place.mjs +35 -0
- package/apps/studio/bin/_png-playwright.mjs +27 -7
- package/apps/studio/bin/_pptx-playwright.mjs +4 -3
- package/apps/studio/bin/_pw-launch.mjs +124 -2
- package/apps/studio/bin/_record-shot.sh +65 -0
- package/apps/studio/bin/_rects-input.mjs +69 -0
- package/apps/studio/bin/_reel-place.mjs +160 -0
- package/apps/studio/bin/_region.mjs +37 -1
- package/apps/studio/bin/_runs.mjs +178 -0
- package/apps/studio/bin/_screenshot-playwright.mjs +6 -3
- package/apps/studio/bin/_studio-verb.mjs +220 -0
- package/apps/studio/bin/_svg-playwright.mjs +4 -3
- package/apps/studio/bin/_sync.mjs +179 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +704 -0
- package/apps/studio/bin/_tile-draw.mjs +74 -0
- package/apps/studio/bin/_transcribe-local.mjs +243 -0
- package/apps/studio/bin/_transcribe.mjs +48 -56
- package/apps/studio/bin/_trash.mjs +287 -0
- package/apps/studio/bin/_url-guard.mjs +88 -0
- package/apps/studio/bin/_url-guard.sh +16 -0
- package/apps/studio/bin/_video-playwright.mjs +9 -3
- package/apps/studio/bin/_video-verbs.mjs +403 -0
- package/apps/studio/bin/_write-claim.mjs +124 -0
- package/apps/studio/bin/annotate.mjs +348 -330
- package/apps/studio/bin/assets.sh +28 -0
- package/apps/studio/bin/beats.mjs +237 -0
- package/apps/studio/bin/beats.sh +24 -0
- package/apps/studio/bin/bootstrap-check.sh +2 -1
- package/apps/studio/bin/canvas-edit.sh +17 -9
- package/apps/studio/bin/canvas-errors.sh +18 -0
- package/apps/studio/bin/canvas-rects.sh +14 -0
- package/apps/studio/bin/canvas-source.sh +18 -0
- package/apps/studio/bin/captions.sh +13 -0
- package/apps/studio/bin/chat-open.sh +2 -2
- package/apps/studio/bin/check.sh +27 -0
- package/apps/studio/bin/comments.sh +20 -0
- package/apps/studio/bin/cut-to-beat.sh +13 -0
- package/apps/studio/bin/cut-words.sh +13 -0
- package/apps/studio/bin/describe.sh +28 -0
- package/apps/studio/bin/draw-proof.sh +41 -8
- package/apps/studio/bin/ds-check.sh +30 -0
- package/apps/studio/bin/ds-upgrade.sh +30 -0
- package/apps/studio/bin/ds.sh +29 -0
- package/apps/studio/bin/exports.sh +19 -0
- package/apps/studio/bin/generate.sh +45 -3
- package/apps/studio/bin/handoff.sh +60 -1
- package/apps/studio/bin/history.sh +24 -0
- package/apps/studio/bin/import-brand.sh +5 -3
- package/apps/studio/bin/index.sh +26 -0
- package/apps/studio/bin/layout-check.sh +20 -0
- package/apps/studio/bin/logs.sh +17 -0
- package/apps/studio/bin/perf.sh +93 -3
- package/apps/studio/bin/photo-bg-remove.sh +49 -7
- package/apps/studio/bin/place.sh +20 -0
- package/apps/studio/bin/read-annotations.mjs +52 -1
- package/apps/studio/bin/reel-place.sh +15 -0
- package/apps/studio/bin/runs.sh +19 -0
- package/apps/studio/bin/screenshot.sh +37 -21
- package/apps/studio/bin/server-up.sh +50 -13
- package/apps/studio/bin/smoke.sh +10 -0
- package/apps/studio/bin/sync.sh +18 -0
- package/apps/studio/bin/to-lottie.sh +1 -1
- package/apps/studio/bin/transcribe-local.sh +27 -0
- package/apps/studio/bin/trash.sh +23 -0
- package/apps/studio/bin/visual-sanity.sh +1 -0
- package/apps/studio/bridge/canvas-mode-store.ts +301 -0
- package/apps/studio/bridge/canvas-modes.ts +548 -0
- package/apps/studio/bridge/dgn-protocol.ts +2671 -0
- package/apps/studio/bridge/esc-ladder.ts +98 -0
- package/apps/studio/bridge/link-target.ts +157 -0
- package/apps/studio/bridge/mode-shows.ts +167 -0
- package/apps/studio/bridge/occlusion.ts +108 -0
- package/apps/studio/bridge/paste-data.ts +101 -0
- package/apps/studio/build.ts +12 -1
- package/apps/studio/bunfig.toml +4 -0
- package/apps/studio/canvas-build-sandbox.ts +34 -5
- package/apps/studio/canvas-build-worker.ts +23 -1
- package/apps/studio/canvas-build.ts +419 -15
- package/apps/studio/canvas-comment-mount.tsx +113 -25
- package/apps/studio/canvas-create.ts +285 -49
- package/apps/studio/canvas-cursors.ts +12 -0
- package/apps/studio/canvas-ds-icons.tsx +241 -0
- package/apps/studio/canvas-edit.ts +1188 -172
- package/apps/studio/canvas-hud-tokens.gen.ts +120 -0
- package/apps/studio/canvas-icons.tsx +47 -0
- package/apps/studio/canvas-imports.ts +23 -4
- package/apps/studio/canvas-lib-inline.ts +57 -3
- package/apps/studio/canvas-lib.tsx +1033 -263
- package/apps/studio/canvas-list-watch.ts +73 -2
- package/apps/studio/canvas-meta.schema.json +11 -0
- package/apps/studio/canvas-notifications.tsx +28 -3
- package/apps/studio/canvas-pipeline.ts +43 -8
- package/apps/studio/canvas-replay-keys.ts +65 -0
- package/apps/studio/canvas-rows.ts +116 -0
- package/apps/studio/canvas-shell.tsx +784 -698
- package/apps/studio/canvas-source/errors.ts +315 -0
- package/apps/studio/canvas-source/source-map.ts +69 -0
- package/apps/studio/canvas-theme-pill.tsx +164 -0
- package/apps/studio/canvas-theme.ts +133 -0
- package/apps/studio/canvas-top-level.ts +69 -0
- package/apps/studio/check/ids.ts +28 -0
- package/apps/studio/check/index.ts +586 -0
- package/apps/studio/check/link-resolver.ts +75 -0
- package/apps/studio/check/meta.ts +79 -0
- package/apps/studio/check/video.ts +352 -0
- package/apps/studio/client/actions/shell-key-handlers.js +450 -0
- package/apps/studio/client/app.jsx +2918 -1203
- package/apps/studio/client/canvas-url.js +241 -5
- package/apps/studio/client/clipboard-relay.ts +144 -0
- package/apps/studio/client/command-palette-match.js +4 -2
- package/apps/studio/client/comments-overlay.css +529 -144
- package/apps/studio/client/dialogs/asset-picker.jsx +77 -32
- package/apps/studio/client/dialogs/command-palette.jsx +453 -67
- package/apps/studio/client/dialogs/export-dialog.jsx +6 -781
- package/apps/studio/client/dialogs/help-modal.jsx +31 -2
- package/apps/studio/client/dialogs/shortcuts-overlay.jsx +201 -106
- package/apps/studio/client/edit-op-relay.ts +77 -0
- package/apps/studio/client/embed-view.jsx +25 -5
- package/apps/studio/client/export-bridge-scope.js +72 -0
- package/apps/studio/client/export-center.jsx +179 -369
- package/apps/studio/client/export-lane.js +117 -0
- package/apps/studio/client/export-region.ts +25 -0
- package/apps/studio/client/file-tree.jsx +4 -4
- package/apps/studio/client/fonts/LICENSE-Inter-Tight.txt +93 -0
- package/apps/studio/client/fonts/LICENSE-Inter.txt +93 -0
- package/apps/studio/client/fonts/LICENSE-JetBrains-Mono.txt +93 -0
- package/apps/studio/client/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/inter-tight-latin-ext-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/inter-tight-latin-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/apps/studio/client/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/apps/studio/client/frame-cap.js +132 -0
- package/apps/studio/client/generate-dialog.jsx +38 -36
- package/apps/studio/client/github.js +85 -26
- package/apps/studio/client/home/HomeAsk.jsx +220 -0
- package/apps/studio/client/home/InviteSheet.jsx +150 -0
- package/apps/studio/client/home/Shelves.jsx +216 -0
- package/apps/studio/client/home/Starters.jsx +42 -0
- package/apps/studio/client/home/TargetChip.jsx +152 -0
- package/apps/studio/client/home/home-api.js +275 -0
- package/apps/studio/client/home/home-app.jsx +1884 -0
- package/apps/studio/client/home/home-icons.jsx +143 -0
- package/apps/studio/client/home/home-menu.js +43 -0
- package/apps/studio/client/home/home-model.js +514 -0
- package/apps/studio/client/home/home-starters.js +136 -0
- package/apps/studio/client/home/home.css +1681 -0
- package/apps/studio/client/home/invite-flow.js +422 -0
- package/apps/studio/client/home/shell-mode.js +49 -0
- package/apps/studio/client/hooks/annotations-hidden-toast.js +21 -0
- package/apps/studio/client/hooks/canvas-origin-probe.js +26 -0
- package/apps/studio/client/hooks/edit-scope-query.js +16 -0
- package/apps/studio/client/hooks/use-action-keys.jsx +121 -0
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +881 -247
- package/apps/studio/client/hooks/use-git-actions.jsx +33 -12
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +722 -287
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +268 -307
- package/apps/studio/client/hooks/use-project-data.jsx +23 -2
- package/apps/studio/client/hooks/use-shell-core.jsx +582 -126
- package/apps/studio/client/hooks/use-tabs.jsx +268 -126
- package/apps/studio/client/index-loader.ts +3 -1
- package/apps/studio/client/index.html +0 -3
- package/apps/studio/client/inspector/color-picker.jsx +29 -18
- package/apps/studio/client/inspector/css-knobs.jsx +765 -436
- package/apps/studio/client/inspector/css-vocab.jsx +37 -4
- package/apps/studio/client/inspector/ds-tokens.js +127 -15
- package/apps/studio/client/inspector/grid-tracks-editor.jsx +21 -15
- package/apps/studio/client/inspector/inspect-computed.jsx +17 -15
- package/apps/studio/client/inspector/inspector-panel.jsx +314 -207
- package/apps/studio/client/inspector/layers.jsx +90 -65
- package/apps/studio/client/inspector/selection.js +20 -0
- package/apps/studio/client/inspector/token-popover.jsx +42 -28
- package/apps/studio/client/inspector-controls.jsx +453 -106
- package/apps/studio/client/panels/BrandUploadPanel.jsx +8 -229
- package/apps/studio/client/panels/ChatPanel.jsx +391 -1674
- package/apps/studio/client/panels/CloudBar.jsx +548 -252
- package/apps/studio/client/panels/CollabModelInfographic.jsx +77 -20
- package/apps/studio/client/panels/CreateProject.jsx +224 -40
- package/apps/studio/client/panels/DiffView.jsx +27 -10
- package/apps/studio/client/panels/ElicitationPrompt.jsx +4 -3
- package/apps/studio/client/panels/FigmaImportPanel.jsx +12 -263
- package/apps/studio/client/panels/IdentityBar.jsx +262 -74
- package/apps/studio/client/panels/IntroVideoDialog.jsx +6 -1
- package/apps/studio/client/panels/PermissionPrompt.jsx +85 -9
- package/apps/studio/client/panels/ReadinessList.jsx +71 -46
- package/apps/studio/client/panels/RepoBranchSwitcher.jsx +124 -745
- package/apps/studio/client/panels/SettingsPanel.jsx +492 -608
- package/apps/studio/client/panels/SetupChecklist.jsx +10 -3
- package/apps/studio/client/panels/SourceConflictPanel.jsx +96 -20
- package/apps/studio/client/panels/SyncConsentDialog.jsx +14 -13
- package/apps/studio/client/panels/TeamProjects.jsx +365 -119
- package/apps/studio/client/panels/ToolGroup.jsx +6 -2
- package/apps/studio/client/panels/acp-runtime.js +127 -22
- package/apps/studio/client/panels/acp-usage.js +4 -1
- package/apps/studio/client/panels/chat-context.js +74 -5
- package/apps/studio/client/panels/chat-header.jsx +67 -0
- package/apps/studio/client/panels/chat-markdown.jsx +6 -2
- package/apps/studio/client/panels/file-deep-link-dialog.jsx +88 -17
- package/apps/studio/client/panels/file-preview.jsx +50 -24
- package/apps/studio/client/panels/git-grouping.js +9 -2
- package/apps/studio/client/panels/slash-commands.gen.js +171 -0
- package/apps/studio/client/panels/slash-commands.js +65 -25
- package/apps/studio/client/panels/timeline-media-cache.js +68 -2
- package/apps/studio/client/panels/timeline-parse.js +62 -22
- package/apps/studio/client/panels/timeline-snap.js +4 -1
- package/apps/studio/client/panels/transcript-view.js +9 -0
- package/apps/studio/client/photo-knobs.jsx +225 -46
- package/apps/studio/client/prefs-migrate.js +79 -0
- package/apps/studio/client/report-bug.jsx +59 -26
- package/apps/studio/client/selection-scope.js +215 -0
- package/apps/studio/client/share-link.js +104 -8
- package/apps/studio/client/shell/account-tone.js +28 -0
- package/apps/studio/client/shell/banners.jsx +21 -188
- package/apps/studio/client/shell/comments-panel.jsx +5 -176
- package/apps/studio/client/shell/constants.js +1 -0
- package/apps/studio/client/shell/dock.jsx +217 -31
- package/apps/studio/client/shell/drop-guard.js +52 -0
- package/apps/studio/client/shell/icons.jsx +165 -23
- package/apps/studio/client/shell/util.js +20 -33
- package/apps/studio/client/shell/viewport.jsx +249 -95
- package/apps/studio/client/shell-bus.js +82 -0
- package/apps/studio/client/shell-events.js +251 -0
- package/apps/studio/client/stamp-follow.js +62 -0
- package/apps/studio/client/stores/shell-store.jsx +15 -0
- package/apps/studio/client/styles/0-reset.css +79 -16
- package/apps/studio/client/styles/1-tokens-maude-v2.css +367 -0
- package/apps/studio/client/styles/1-tokens-shell.css +374 -0
- package/apps/studio/client/styles/2-layout.css +404 -24
- package/apps/studio/client/styles/3-kit-maude-v2.css +683 -0
- package/apps/studio/client/styles/_index.css +185 -18
- package/apps/studio/client/styles/fonts.css +63 -0
- package/apps/studio/client/system/system-view.jsx +52 -6
- package/apps/studio/client/tour/collab-tour.js +43 -38
- package/apps/studio/client/tour/overlay.jsx +61 -19
- package/apps/studio/client/tour/quick-setup-tour.js +27 -20
- package/apps/studio/client/tour/tour-model.js +36 -0
- package/apps/studio/client/tour/usage-tour.js +43 -24
- package/apps/studio/client/tree/tree.jsx +661 -409
- package/apps/studio/client/tree-expansion.js +5 -2
- package/apps/studio/client/tree-row-menu.jsx +43 -29
- package/apps/studio/client/ui-open.js +104 -0
- package/apps/studio/client/use-tree-drag.js +2 -0
- package/apps/studio/client/v2/access/access-card.jsx +54 -0
- package/apps/studio/client/v2/access/access-client.js +525 -0
- package/apps/studio/client/v2/access/access-host.jsx +328 -0
- package/apps/studio/client/v2/access/access.css +163 -0
- package/apps/studio/client/v2/access/ask-to-edit.jsx +97 -0
- package/apps/studio/client/v2/access/disabled-reason.js +50 -0
- package/apps/studio/client/v2/access/link-off-card.jsx +37 -0
- package/apps/studio/client/v2/access/trashed-banner.jsx +123 -0
- package/apps/studio/client/v2/advanced/where-matrix.js +231 -0
- package/apps/studio/client/v2/ai/AChip.jsx +158 -0
- package/apps/studio/client/v2/ai/Advanced.jsx +640 -0
- package/apps/studio/client/v2/ai/AiChatIsland.jsx +108 -0
- package/apps/studio/client/v2/ai/AskSelectionHost.jsx +173 -0
- package/apps/studio/client/v2/ai/AttachMenu.jsx +190 -0
- package/apps/studio/client/v2/ai/BigChat.jsx +195 -0
- package/apps/studio/client/v2/ai/ChatList.jsx +614 -0
- package/apps/studio/client/v2/ai/ChatUndo.jsx +164 -0
- package/apps/studio/client/v2/ai/ChoiceCard.jsx +178 -0
- package/apps/studio/client/v2/ai/Composer.jsx +655 -0
- package/apps/studio/client/v2/ai/ConnectSheet.jsx +118 -0
- package/apps/studio/client/v2/ai/Consent.jsx +66 -0
- package/apps/studio/client/v2/ai/DropOverlay.jsx +113 -0
- package/apps/studio/client/v2/ai/Feed.jsx +589 -0
- package/apps/studio/client/v2/ai/FoldNeeds.jsx +23 -0
- package/apps/studio/client/v2/ai/NeedsYouSlot.jsx +250 -0
- package/apps/studio/client/v2/ai/NotReady.jsx +110 -0
- package/apps/studio/client/v2/ai/OfferCard.jsx +165 -0
- package/apps/studio/client/v2/ai/PermissionCard.jsx +168 -0
- package/apps/studio/client/v2/ai/PickedShots.jsx +33 -0
- package/apps/studio/client/v2/ai/ProblemCard.jsx +41 -0
- package/apps/studio/client/v2/ai/QuitDialog.jsx +127 -0
- package/apps/studio/client/v2/ai/RawLog.jsx +68 -0
- package/apps/studio/client/v2/ai/Result.jsx +144 -0
- package/apps/studio/client/v2/ai/RunList.jsx +352 -0
- package/apps/studio/client/v2/ai/RunSurface.jsx +248 -0
- package/apps/studio/client/v2/ai/ScopeChip.jsx +239 -0
- package/apps/studio/client/v2/ai/SentStrip.jsx +70 -0
- package/apps/studio/client/v2/ai/StoppedDivider.jsx +84 -0
- package/apps/studio/client/v2/ai/Suggest.jsx +153 -0
- package/apps/studio/client/v2/ai/TurnResult.jsx +95 -0
- package/apps/studio/client/v2/ai/WaitingCard.jsx +133 -0
- package/apps/studio/client/v2/ai/WillChange.jsx +40 -0
- package/apps/studio/client/v2/ai/Working.jsx +74 -0
- package/apps/studio/client/v2/ai/advanced-handlers.js +56 -0
- package/apps/studio/client/v2/ai/advanced-model.js +214 -0
- package/apps/studio/client/v2/ai/ai-list-advanced.css +625 -0
- package/apps/studio/client/v2/ai/ai-may.js +75 -0
- package/apps/studio/client/v2/ai/ai-offer.js +178 -0
- package/apps/studio/client/v2/ai/ai-run.css +281 -0
- package/apps/studio/client/v2/ai/ai-send.js +164 -0
- package/apps/studio/client/v2/ai/ai.css +261 -0
- package/apps/studio/client/v2/ai/answer-note.js +44 -0
- package/apps/studio/client/v2/ai/ask-frame.js +131 -0
- package/apps/studio/client/v2/ai/ask-selection-lane.js +100 -0
- package/apps/studio/client/v2/ai/ask-selection.css +142 -0
- package/apps/studio/client/v2/ai/ask-selection.js +84 -0
- package/apps/studio/client/v2/ai/attach.css +366 -0
- package/apps/studio/client/v2/ai/attach.js +186 -0
- package/apps/studio/client/v2/ai/chat-list-model.js +333 -0
- package/apps/studio/client/v2/ai/chat-store-api.js +93 -0
- package/apps/studio/client/{styles/6-acp-chat.css → v2/ai/chat.css} +1152 -797
- package/apps/studio/client/v2/ai/connect-flow.js +75 -0
- package/apps/studio/client/v2/ai/gate-lines.js +121 -0
- package/apps/studio/client/v2/ai/icons.jsx +66 -0
- package/apps/studio/client/v2/ai/jump-model.js +61 -0
- package/apps/studio/client/v2/ai/made-by-ai.js +179 -0
- package/apps/studio/client/v2/ai/needs-you-store.js +112 -0
- package/apps/studio/client/v2/ai/needs-you-toast.js +104 -0
- package/apps/studio/client/v2/ai/needs-you.css +554 -0
- package/apps/studio/client/v2/ai/needs-you.js +401 -0
- package/apps/studio/client/v2/ai/panel-focus.js +71 -0
- package/apps/studio/client/v2/ai/panel.css +88 -0
- package/apps/studio/client/v2/ai/paste-chips.jsx +108 -0
- package/apps/studio/client/v2/ai/picked-shots.js +48 -0
- package/apps/studio/client/v2/ai/quit.css +64 -0
- package/apps/studio/client/v2/ai/result-shown.js +50 -0
- package/apps/studio/client/v2/ai/ring-relay.js +143 -0
- package/apps/studio/client/v2/ai/row-slots-lane.js +67 -0
- package/apps/studio/client/v2/ai/run-api.js +137 -0
- package/apps/studio/client/v2/ai/run-cards.js +31 -0
- package/apps/studio/client/v2/ai/run-compare.js +60 -0
- package/apps/studio/client/v2/ai/run-icons.jsx +53 -0
- package/apps/studio/client/v2/ai/run-model.js +348 -0
- package/apps/studio/client/v2/ai/runs-model.js +568 -0
- package/apps/studio/client/v2/ai/runs-store.js +161 -0
- package/apps/studio/client/v2/ai/runs.css +226 -0
- package/apps/studio/client/v2/ai/scope.js +298 -0
- package/apps/studio/client/v2/ai/seen-relay.js +95 -0
- package/apps/studio/client/v2/ai/sent-attachments.js +77 -0
- package/apps/studio/client/v2/ai/stopped.js +69 -0
- package/apps/studio/client/v2/ai/suggest-why.js +200 -0
- package/apps/studio/client/v2/ai/use-ai-scope.js +198 -0
- package/apps/studio/client/v2/ai/use-ask-ai.js +63 -0
- package/apps/studio/client/v2/ai/use-ask-selection.js +41 -0
- package/apps/studio/client/v2/ai/use-attachments.js +239 -0
- package/apps/studio/client/v2/ai/use-chat-runs.js +32 -0
- package/apps/studio/client/v2/ai/use-run-versions.js +39 -0
- package/apps/studio/client/v2/ai/video/ClipsAttached.jsx +23 -0
- package/apps/studio/client/v2/ai/video/LeftOut.jsx +29 -0
- package/apps/studio/client/v2/ai/video/WatchProgress.jsx +65 -0
- package/apps/studio/client/v2/ai/video/card-model.js +107 -0
- package/apps/studio/client/v2/ai/video/cards.jsx +51 -0
- package/apps/studio/client/v2/ai/video/clip-pic.js +12 -0
- package/apps/studio/client/v2/ai/video/video-cards.css +168 -0
- package/apps/studio/client/v2/annotations/annotation-asks.js +171 -0
- package/apps/studio/client/v2/annotations/annotation-list-model.js +238 -0
- package/apps/studio/client/v2/annotations/annotation-list.css +277 -0
- package/apps/studio/client/v2/annotations/annotation-list.jsx +433 -0
- package/apps/studio/client/v2/annotations/recent-stickers.js +64 -0
- package/apps/studio/client/v2/annotations/stamp-row.jsx +66 -0
- package/apps/studio/client/v2/annotations/stamps-glyphs.jsx +35 -0
- package/apps/studio/client/v2/annotations/sticker-preload.js +44 -0
- package/apps/studio/client/v2/annotations/sticker-search.js +155 -0
- package/apps/studio/client/v2/annotations/stickers-gallery.css +295 -0
- package/apps/studio/client/v2/annotations/stickers-gallery.jsx +454 -0
- package/apps/studio/client/v2/annotations/templates-panel.css +344 -0
- package/apps/studio/client/v2/annotations/templates-panel.jsx +240 -0
- package/apps/studio/client/v2/annotations/v2-scope.js +20 -0
- package/apps/studio/client/v2/annotations/vote-bar.jsx +212 -0
- package/apps/studio/client/v2/annotations/vote-sheet.jsx +200 -0
- package/apps/studio/client/v2/annotations/vote-store.js +392 -0
- package/apps/studio/client/v2/annotations/vote.css +153 -0
- package/apps/studio/client/v2/assets/ask-once.js +65 -0
- package/apps/studio/client/v2/assets/asset-drop-session.js +238 -0
- package/apps/studio/client/v2/assets/asset-state-lane.js +267 -0
- package/apps/studio/client/v2/assets/assets-bus.js +109 -0
- package/apps/studio/client/v2/assets/browse-model.js +90 -0
- package/apps/studio/client/v2/assets/browse-view.jsx +202 -0
- package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +114 -0
- package/apps/studio/client/v2/assets/connect-key-sheet.jsx +69 -0
- package/apps/studio/client/v2/assets/copy-asset.js +37 -0
- package/apps/studio/client/v2/assets/describe-client.js +156 -0
- package/apps/studio/client/v2/assets/describe-consent.jsx +184 -0
- package/apps/studio/client/v2/assets/describe.css +72 -0
- package/apps/studio/client/v2/assets/details-advanced.jsx +76 -0
- package/apps/studio/client/v2/assets/details-model.js +233 -0
- package/apps/studio/client/v2/assets/details.jsx +292 -0
- package/apps/studio/client/v2/assets/generate-ask.jsx +506 -0
- package/apps/studio/client/v2/assets/generated.js +83 -0
- package/apps/studio/client/v2/assets/import-lines.js +228 -0
- package/apps/studio/client/v2/assets/import-offline.js +32 -0
- package/apps/studio/client/v2/assets/import-toast.js +56 -0
- package/apps/studio/client/v2/assets/just-added.js +32 -0
- package/apps/studio/client/v2/assets/kinds-chip.jsx +77 -0
- package/apps/studio/client/v2/assets/library-foot.js +42 -0
- package/apps/studio/client/v2/assets/missing-frame.css +60 -0
- package/apps/studio/client/v2/assets/missing-frame.jsx +218 -0
- package/apps/studio/client/v2/assets/multi-select.js +58 -0
- package/apps/studio/client/v2/assets/place-asset.js +128 -0
- package/apps/studio/client/v2/assets/relink.js +96 -0
- package/apps/studio/client/v2/assets/rename-asset.js +83 -0
- package/apps/studio/client/v2/assets/search-marks.jsx +75 -0
- package/apps/studio/client/v2/assets/takes-overlay.jsx +86 -0
- package/apps/studio/client/v2/assets/takes.css +177 -0
- package/apps/studio/client/v2/assets/takes.js +224 -0
- package/apps/studio/client/v2/assets/tidy.jsx +144 -0
- package/apps/studio/client/v2/assets/tile-drag.js +53 -0
- package/apps/studio/client/v2/assets/tile-menu.jsx +119 -0
- package/apps/studio/client/v2/assets/tile.jsx +131 -0
- package/apps/studio/client/v2/assets/trash-assets.js +98 -0
- package/apps/studio/client/v2/assets/use-asset-details.js +58 -0
- package/apps/studio/client/v2/assets/use-assets.js +121 -0
- package/apps/studio/client/v2/assets/use-takes-lane.js +150 -0
- package/apps/studio/client/v2/canvases/canvas-icons.jsx +107 -0
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +1466 -0
- package/apps/studio/client/v2/canvases/canvases.css +699 -0
- package/apps/studio/client/v2/canvases/covers.js +32 -0
- package/apps/studio/client/v2/canvases/inline-rename.jsx +122 -0
- package/apps/studio/client/v2/canvases/jump-list.jsx +100 -0
- package/apps/studio/client/v2/canvases/jump-model.js +102 -0
- package/apps/studio/client/v2/canvases/kept-on-this-mac.jsx +192 -0
- package/apps/studio/client/v2/canvases/last-canvas.js +36 -0
- package/apps/studio/client/v2/canvases/move-model.js +45 -0
- package/apps/studio/client/v2/canvases/move-sheet.jsx +91 -0
- package/apps/studio/client/v2/canvases/open-link.js +154 -0
- package/apps/studio/client/v2/canvases/panel-search.js +156 -0
- package/apps/studio/client/v2/canvases/rename-model.js +134 -0
- package/apps/studio/client/v2/canvases/row-menu.jsx +145 -0
- package/apps/studio/client/v2/canvases/row-slots.js +224 -0
- package/apps/studio/client/v2/canvases/sort.js +132 -0
- package/apps/studio/client/v2/canvases/support-model.js +68 -0
- package/apps/studio/client/v2/canvases/trash-canvas.js +120 -0
- package/apps/studio/client/v2/canvases/tree-model.js +760 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +50 -0
- package/apps/studio/client/v2/canvases/use-canvases-sort.js +59 -0
- package/apps/studio/client/v2/canvases/use-move.js +61 -0
- package/apps/studio/client/v2/canvases/use-pins.js +80 -0
- package/apps/studio/client/v2/cloud/browser-door.js +152 -0
- package/apps/studio/client/v2/cloud/cloud-name.js +38 -0
- package/apps/studio/client/v2/code/canvas-error-card.jsx +407 -0
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +31 -0
- package/apps/studio/client/v2/code/code-bus.js +63 -0
- package/apps/studio/client/v2/code/code-view.jsx +277 -0
- package/apps/studio/client/v2/code/code.css +373 -0
- package/apps/studio/client/v2/code/highlight.js +163 -0
- package/apps/studio/client/v2/code/use-canvas-source.js +338 -0
- package/apps/studio/client/v2/comments/comment-bridge.js +154 -0
- package/apps/studio/client/v2/comments/comment-client.js +84 -0
- package/apps/studio/client/v2/comments/comment-tool.js +18 -0
- package/apps/studio/client/v2/comments/comments-model.js +213 -0
- package/apps/studio/client/v2/comments/comments-panel.jsx +400 -0
- package/apps/studio/client/v2/comments/comments.css +305 -0
- package/apps/studio/client/v2/comments/mention-callouts.jsx +90 -0
- package/apps/studio/client/v2/comments/mention-model.js +118 -0
- package/apps/studio/client/v2/comments/native-mention-notice.js +73 -0
- package/apps/studio/client/v2/comments/reply-focus.js +30 -0
- package/apps/studio/client/v2/comments/use-comments-shell.jsx +176 -0
- package/apps/studio/client/v2/create/NameDialog.jsx +95 -0
- package/apps/studio/client/v2/create/NameDialogHost.jsx +141 -0
- package/apps/studio/client/v2/create/create-project.css +260 -0
- package/apps/studio/client/v2/create/duplicate-done.js +45 -0
- package/apps/studio/client/v2/create/empty-project.css +113 -0
- package/apps/studio/client/v2/create/empty-project.jsx +162 -0
- package/apps/studio/client/v2/create/first-draft.js +30 -0
- package/apps/studio/client/v2/create/intent-host.jsx +40 -0
- package/apps/studio/client/v2/create/name-dialog-bus.js +41 -0
- package/apps/studio/client/v2/create/name-dialog.css +36 -0
- package/apps/studio/client/v2/create/new-canvas.js +64 -0
- package/apps/studio/client/v2/create/open-sizes.js +41 -0
- package/apps/studio/client/v2/create/render-error.css +29 -0
- package/apps/studio/client/v2/create/render-error.jsx +107 -0
- package/apps/studio/client/v2/create/repair-offer.js +36 -0
- package/apps/studio/client/v2/create/take-intent.js +154 -0
- package/apps/studio/client/v2/create/use-project-empty.js +85 -0
- package/apps/studio/client/v2/create/use-render-error.js +116 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-bus.js +47 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-handlers.js +108 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +196 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-model.js +253 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +557 -0
- package/apps/studio/client/v2/diagnostics/diagnostics.css +612 -0
- package/apps/studio/client/v2/diagnostics/resync-model.js +51 -0
- package/apps/studio/client/v2/diagnostics/resync-run.js +79 -0
- package/apps/studio/client/v2/diagnostics/sync-actions.js +38 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +241 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +392 -0
- package/apps/studio/client/v2/diagnostics/use-diagnostics-menu.js +58 -0
- package/apps/studio/client/v2/ds/advanced-bus.js +40 -0
- package/apps/studio/client/v2/ds/advanced-host.jsx +228 -0
- package/apps/studio/client/v2/ds/advanced-model.js +110 -0
- package/apps/studio/client/v2/ds/advanced-store.js +47 -0
- package/apps/studio/client/v2/ds/advanced.css +277 -0
- package/apps/studio/client/v2/ds/advanced.jsx +203 -0
- package/apps/studio/client/v2/ds/check-card.jsx +80 -0
- package/apps/studio/client/v2/ds/colour-picker.jsx +121 -0
- package/apps/studio/client/v2/ds/colour-words.js +48 -0
- package/apps/studio/client/v2/ds/conflict-pick.jsx +151 -0
- package/apps/studio/client/v2/ds/contrast-warning.jsx +80 -0
- package/apps/studio/client/v2/ds/contrast.js +137 -0
- package/apps/studio/client/v2/ds/convert-dialog.jsx +133 -0
- package/apps/studio/client/v2/ds/convert-host.jsx +143 -0
- package/apps/studio/client/v2/ds/convert-model.js +221 -0
- package/apps/studio/client/v2/ds/default-write.js +69 -0
- package/apps/studio/client/v2/ds/direction-bar.jsx +287 -0
- package/apps/studio/client/v2/ds/door-write.js +163 -0
- package/apps/studio/client/v2/ds/edge-model.js +151 -0
- package/apps/studio/client/v2/ds/edge-write.js +91 -0
- package/apps/studio/client/v2/ds/edges.css +152 -0
- package/apps/studio/client/v2/ds/follower-swap.js +88 -0
- package/apps/studio/client/v2/ds/go-to.js +71 -0
- package/apps/studio/client/v2/ds/kinds/master.jsx +214 -0
- package/apps/studio/client/v2/ds/kinds/token.jsx +546 -0
- package/apps/studio/client/v2/ds/library-bus.js +43 -0
- package/apps/studio/client/v2/ds/library-card.jsx +379 -0
- package/apps/studio/client/v2/ds/library-host.jsx +436 -0
- package/apps/studio/client/v2/ds/library-model.js +305 -0
- package/apps/studio/client/v2/ds/library-store.js +45 -0
- package/apps/studio/client/v2/ds/library.css +148 -0
- package/apps/studio/client/v2/ds/make-host.jsx +244 -0
- package/apps/studio/client/v2/ds/make-model.js +208 -0
- package/apps/studio/client/v2/ds/make-sheet.jsx +264 -0
- package/apps/studio/client/v2/ds/make-write.js +90 -0
- package/apps/studio/client/v2/ds/make.css +242 -0
- package/apps/studio/client/v2/ds/master-write.js +145 -0
- package/apps/studio/client/v2/ds/new-canvas-default.js +89 -0
- package/apps/studio/client/v2/ds/off-system-host.jsx +107 -0
- package/apps/studio/client/v2/ds/off-system.jsx +101 -0
- package/apps/studio/client/v2/ds/outside-banner.jsx +153 -0
- package/apps/studio/client/v2/ds/pinned-rows.js +138 -0
- package/apps/studio/client/v2/ds/pins.js +102 -0
- package/apps/studio/client/v2/ds/preview-bar.jsx +220 -0
- package/apps/studio/client/v2/ds/preview-doors.js +47 -0
- package/apps/studio/client/v2/ds/preview-mode.js +163 -0
- package/apps/studio/client/v2/ds/reach-data.js +68 -0
- package/apps/studio/client/v2/ds/reach-model.js +184 -0
- package/apps/studio/client/v2/ds/reach-view.jsx +577 -0
- package/apps/studio/client/v2/ds/reach.css +298 -0
- package/apps/studio/client/v2/ds/rename-write.js +88 -0
- package/apps/studio/client/v2/ds/review-bus.js +41 -0
- package/apps/studio/client/v2/ds/review-host.jsx +438 -0
- package/apps/studio/client/v2/ds/review-model.js +307 -0
- package/apps/studio/client/v2/ds/review-sheet.jsx +390 -0
- package/apps/studio/client/v2/ds/review.css +894 -0
- package/apps/studio/client/v2/ds/row-dots.js +41 -0
- package/apps/studio/client/v2/ds/switch-bus.js +56 -0
- package/apps/studio/client/v2/ds/switch-host.jsx +241 -0
- package/apps/studio/client/v2/ds/switch-model.js +254 -0
- package/apps/studio/client/v2/ds/switch-sheet.jsx +364 -0
- package/apps/studio/client/v2/ds/switch.css +263 -0
- package/apps/studio/client/v2/ds/system-menu.jsx +81 -0
- package/apps/studio/client/v2/ds/system-rename.jsx +102 -0
- package/apps/studio/client/v2/ds/token-write.js +241 -0
- package/apps/studio/client/v2/ds/token.css +185 -0
- package/apps/studio/client/v2/ds/trash-token-sheet.jsx +112 -0
- package/apps/studio/client/v2/ds/truth-card.jsx +85 -0
- package/apps/studio/client/v2/ds/truth-host.jsx +239 -0
- package/apps/studio/client/v2/ds/truth-model.js +315 -0
- package/apps/studio/client/v2/ds/truth-store.js +45 -0
- package/apps/studio/client/v2/ds/truth.css +143 -0
- package/apps/studio/client/v2/ds/update-available.jsx +261 -0
- package/apps/studio/client/v2/ds/update-dots.js +103 -0
- package/apps/studio/client/v2/ds/update-model.js +295 -0
- package/apps/studio/client/v2/ds/upgrade-bus.js +40 -0
- package/apps/studio/client/v2/ds/upgrade-host.jsx +185 -0
- package/apps/studio/client/v2/ds/upgrade-model.js +266 -0
- package/apps/studio/client/v2/ds/upgrade-offers.js +34 -0
- package/apps/studio/client/v2/ds/upgrade-sheet.jsx +277 -0
- package/apps/studio/client/v2/ds/upgrade.css +166 -0
- package/apps/studio/client/v2/ds/use-covers.js +27 -0
- package/apps/studio/client/v2/ds/use-ds-frames.js +165 -0
- package/apps/studio/client/v2/ds/use-ds-model.js +61 -0
- package/apps/studio/client/v2/ds/use-ds-search.js +61 -0
- package/apps/studio/client/v2/ds/use-ds-state.js +65 -0
- package/apps/studio/client/v2/ds/uses-link.jsx +58 -0
- package/apps/studio/client/v2/empty/all-trashed-model.js +321 -0
- package/apps/studio/client/v2/empty/all-trashed-relay.js +65 -0
- package/apps/studio/client/v2/empty/all-trashed.jsx +229 -0
- package/apps/studio/client/v2/empty/arriving.jsx +180 -0
- package/apps/studio/client/v2/empty/artboard-hint.jsx +47 -0
- package/apps/studio/client/v2/empty/ask-button.jsx +35 -0
- package/apps/studio/client/v2/empty/confetti.jsx +46 -0
- package/apps/studio/client/v2/empty/empty-canvas.jsx +96 -0
- package/apps/studio/client/v2/empty/empty-copy.js +265 -0
- package/apps/studio/client/v2/empty/empty-hint-store.js +31 -0
- package/apps/studio/client/v2/empty/empty-host.jsx +168 -0
- package/apps/studio/client/v2/empty/empty.css +440 -0
- package/apps/studio/client/v2/empty/empty.jsx +162 -0
- package/apps/studio/client/v2/empty/fill-ask.js +22 -0
- package/apps/studio/client/v2/empty/free-centre.js +11 -0
- package/apps/studio/client/v2/empty/index.js +40 -0
- package/apps/studio/client/v2/empty/layers-empty.jsx +22 -0
- package/apps/studio/client/v2/empty/not-local.jsx +111 -0
- package/apps/studio/client/v2/empty/select-new-artboard.js +32 -0
- package/apps/studio/client/v2/empty/skeleton.jsx +51 -0
- package/apps/studio/client/v2/empty/spot-art.jsx +923 -0
- package/apps/studio/client/v2/empty/spot.jsx +96 -0
- package/apps/studio/client/v2/empty/suggestions.jsx +18 -0
- package/apps/studio/client/v2/empty/use-empty-canvas.js +251 -0
- package/apps/studio/client/v2/export/access-line.jsx +48 -0
- package/apps/studio/client/v2/export/advanced/advanced-copy.js +77 -0
- package/apps/studio/client/v2/export/advanced/advanced.css +252 -0
- package/apps/studio/client/v2/export/advanced/advanced.jsx +148 -0
- package/apps/studio/client/v2/export/advanced/command.js +128 -0
- package/apps/studio/client/v2/export/advanced/command.jsx +50 -0
- package/apps/studio/client/v2/export/advanced/fields.jsx +132 -0
- package/apps/studio/client/v2/export/advanced/image.jsx +124 -0
- package/apps/studio/client/v2/export/advanced/model.js +199 -0
- package/apps/studio/client/v2/export/advanced/names.jsx +65 -0
- package/apps/studio/client/v2/export/advanced/print.jsx +99 -0
- package/apps/studio/client/v2/export/advanced/render.jsx +63 -0
- package/apps/studio/client/v2/export/advanced/video.jsx +76 -0
- package/apps/studio/client/v2/export/annotations-policy.js +28 -0
- package/apps/studio/client/v2/export/cloud-queue.js +69 -0
- package/apps/studio/client/v2/export/copy-command.js +72 -0
- package/apps/studio/client/v2/export/copy-png.js +144 -0
- package/apps/studio/client/v2/export/done-toast.jsx +89 -0
- package/apps/studio/client/v2/export/edges.css +74 -0
- package/apps/studio/client/v2/export/export-copy.js +352 -0
- package/apps/studio/client/v2/export/export-sheet.jsx +804 -0
- package/apps/studio/client/v2/export/export-sizes.js +217 -0
- package/apps/studio/client/v2/export/export.css +832 -0
- package/apps/studio/client/v2/export/exports-model.js +383 -0
- package/apps/studio/client/v2/export/exports-panel.css +192 -0
- package/apps/studio/client/v2/export/exports-panel.jsx +164 -0
- package/apps/studio/client/v2/export/file-rows.jsx +84 -0
- package/apps/studio/client/v2/export/inspector-export.jsx +335 -0
- package/apps/studio/client/v2/export/job-row.jsx +358 -0
- package/apps/studio/client/v2/export/last-finished.js +34 -0
- package/apps/studio/client/v2/export/native-save.js +160 -0
- package/apps/studio/client/v2/export/other-formats.jsx +199 -0
- package/apps/studio/client/v2/export/parts.jsx +117 -0
- package/apps/studio/client/v2/export/preflight/fonts.js +27 -0
- package/apps/studio/client/v2/export/preflight/paper.jsx +177 -0
- package/apps/studio/client/v2/export/preflight/safe-margin.js +24 -0
- package/apps/studio/client/v2/export/preflight/use-preflight.js +74 -0
- package/apps/studio/client/v2/export/preview.jsx +79 -0
- package/apps/studio/client/v2/export/print.css +219 -0
- package/apps/studio/client/v2/export/run-export.js +177 -0
- package/apps/studio/client/v2/export/scope-bar.jsx +70 -0
- package/apps/studio/client/v2/export/sections/batch-model.js +224 -0
- package/apps/studio/client/v2/export/sections/batch.jsx +235 -0
- package/apps/studio/client/v2/export/sections/image.jsx +93 -0
- package/apps/studio/client/v2/export/sections/print-copy.js +41 -0
- package/apps/studio/client/v2/export/sections/print.jsx +285 -0
- package/apps/studio/client/v2/export/sections/render-row.jsx +81 -0
- package/apps/studio/client/v2/export/sections/version.jsx +176 -0
- package/apps/studio/client/v2/export/sections/video-copy.js +92 -0
- package/apps/studio/client/v2/export/sections/video-model.js +127 -0
- package/apps/studio/client/v2/export/sections/video.jsx +397 -0
- package/apps/studio/client/v2/export/sections/web.jsx +151 -0
- package/apps/studio/client/v2/export/share-hint.jsx +51 -0
- package/apps/studio/client/v2/export/use-export-spec.js +546 -0
- package/apps/studio/client/v2/export/video-content.js +75 -0
- package/apps/studio/client/v2/export/video.css +221 -0
- package/apps/studio/client/v2/fold/advanced-fold.jsx +96 -0
- package/apps/studio/client/v2/fold/fold-store.js +151 -0
- package/apps/studio/client/v2/fold/fold.css +59 -0
- package/apps/studio/client/v2/fold/use-fold.js +36 -0
- package/apps/studio/client/v2/handoff/edges.jsx +74 -0
- package/apps/studio/client/v2/handoff/handoff-sheet.jsx +469 -0
- package/apps/studio/client/v2/handoff/handoff.css +181 -0
- package/apps/studio/client/v2/handoff/ready-card.jsx +84 -0
- package/apps/studio/client/v2/handoff/targets.js +111 -0
- package/apps/studio/client/v2/help/add-guides.js +43 -0
- package/apps/studio/client/v2/help/help.css +995 -0
- package/apps/studio/client/v2/history/blame.js +161 -0
- package/apps/studio/client/v2/history/branch-actions.js +214 -0
- package/apps/studio/client/v2/history/change-list.jsx +102 -0
- package/apps/studio/client/v2/history/clear-band.js +144 -0
- package/apps/studio/client/v2/history/compare-store.js +80 -0
- package/apps/studio/client/v2/history/compare-view.jsx +318 -0
- package/apps/studio/client/v2/history/compare-words.js +8 -0
- package/apps/studio/client/v2/history/git-advanced.jsx +580 -0
- package/apps/studio/client/v2/history/git-io.js +58 -0
- package/apps/studio/client/v2/history/git-model.js +526 -0
- package/apps/studio/client/v2/history/git-parts.jsx +662 -0
- package/apps/studio/client/v2/history/history-host.jsx +78 -0
- package/apps/studio/client/v2/history/history-panel.jsx +599 -0
- package/apps/studio/client/v2/history/history.css +1477 -0
- package/apps/studio/client/v2/history/name-dialog.jsx +109 -0
- package/apps/studio/client/v2/history/object-filter.js +143 -0
- package/apps/studio/client/v2/history/object-history-ask.js +62 -0
- package/apps/studio/client/v2/history/object-view.jsx +236 -0
- package/apps/studio/client/v2/history/rows.ts +445 -0
- package/apps/studio/client/v2/history/use-versions.js +391 -0
- package/apps/studio/client/v2/history/view-bar.jsx +80 -0
- package/apps/studio/client/v2/import/brand-model.js +145 -0
- package/apps/studio/client/v2/import/brand-result.jsx +197 -0
- package/apps/studio/client/v2/import/brand-sheet.jsx +434 -0
- package/apps/studio/client/v2/import/brand.css +378 -0
- package/apps/studio/client/v2/import/figma-artboard.jsx +121 -0
- package/apps/studio/client/v2/import/figma-model.js +237 -0
- package/apps/studio/client/v2/import/figma-prefill.js +23 -0
- package/apps/studio/client/v2/import/figma-sheet.jsx +525 -0
- package/apps/studio/client/v2/import/figma-summary.jsx +62 -0
- package/apps/studio/client/v2/import/figma.css +179 -0
- package/apps/studio/client/v2/import/frame-picker.jsx +57 -0
- package/apps/studio/client/v2/inspect/inspect-host.jsx +53 -0
- package/apps/studio/client/v2/inspect/inspect-model.js +132 -0
- package/apps/studio/client/v2/inspect/inspect-panel.jsx +214 -0
- package/apps/studio/client/v2/inspect/inspect.css +87 -0
- package/apps/studio/client/v2/inspector/advanced-rows-default.jsx +773 -0
- package/apps/studio/client/v2/inspector/advanced-rows.js +106 -0
- package/apps/studio/client/v2/inspector/advanced.jsx +286 -0
- package/apps/studio/client/v2/inspector/blocks.js +57 -0
- package/apps/studio/client/v2/inspector/colour-groups.js +129 -0
- package/apps/studio/client/v2/inspector/component-picker.css +133 -0
- package/apps/studio/client/v2/inspector/component-picker.jsx +367 -0
- package/apps/studio/client/v2/inspector/crumbs.jsx +89 -0
- package/apps/studio/client/v2/inspector/css-text.js +179 -0
- package/apps/studio/client/v2/inspector/css-write.js +204 -0
- package/apps/studio/client/v2/inspector/element-code.js +39 -0
- package/apps/studio/client/v2/inspector/element-id.js +70 -0
- package/apps/studio/client/v2/inspector/formats-ui.js +101 -0
- package/apps/studio/client/v2/inspector/formats-write.js +60 -0
- package/apps/studio/client/v2/inspector/frame.jsx +336 -0
- package/apps/studio/client/v2/inspector/inspector-actions.js +60 -0
- package/apps/studio/client/v2/inspector/inspector.css +2872 -0
- package/apps/studio/client/v2/inspector/jsx-slice.js +219 -0
- package/apps/studio/client/v2/inspector/kinds/add-width.js +55 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-advanced-rows.jsx +89 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-advanced.jsx +62 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-fixed.jsx +111 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-kinds-model.js +171 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-model.js +155 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-multi.jsx +142 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-print-advanced.jsx +210 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-print-model.js +112 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-print.jsx +268 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-rows.jsx +124 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-video.jsx +144 -0
- package/apps/studio/client/v2/inspector/kinds/artboard-web.jsx +170 -0
- package/apps/studio/client/v2/inspector/kinds/artboard.jsx +168 -0
- package/apps/studio/client/v2/inspector/kinds/caption.jsx +203 -0
- package/apps/studio/client/v2/inspector/kinds/clip-model.js +190 -0
- package/apps/studio/client/v2/inspector/kinds/clip.css +157 -0
- package/apps/studio/client/v2/inspector/kinds/clip.jsx +447 -0
- package/apps/studio/client/v2/inspector/kinds/frame.jsx +118 -0
- package/apps/studio/client/v2/inspector/kinds/image.jsx +267 -0
- package/apps/studio/client/v2/inspector/kinds/index.js +180 -0
- package/apps/studio/client/v2/inspector/kinds/instance.jsx +377 -0
- package/apps/studio/client/v2/inspector/kinds/multi-artboard.jsx +129 -0
- package/apps/studio/client/v2/inspector/kinds/multi.jsx +220 -0
- package/apps/studio/client/v2/inspector/kinds/music.jsx +294 -0
- package/apps/studio/client/v2/inspector/kinds/path.jsx +174 -0
- package/apps/studio/client/v2/inspector/kinds/shape.jsx +59 -0
- package/apps/studio/client/v2/inspector/kinds/text.jsx +518 -0
- package/apps/studio/client/v2/inspector/kinds/title-rows.jsx +135 -0
- package/apps/studio/client/v2/inspector/kinds/video-facts.js +142 -0
- package/apps/studio/client/v2/inspector/layers-row-tools.jsx +93 -0
- package/apps/studio/client/v2/inspector/layers-slot.jsx +93 -0
- package/apps/studio/client/v2/inspector/link-write.js +52 -0
- package/apps/studio/client/v2/inspector/live-size.js +96 -0
- package/apps/studio/client/v2/inspector/model.js +228 -0
- package/apps/studio/client/v2/inspector/path-point.js +104 -0
- package/apps/studio/client/v2/inspector/print-write.js +85 -0
- package/apps/studio/client/v2/inspector/safe-zones-write.js +88 -0
- package/apps/studio/client/v2/inspector/sections/add-requests.js +35 -0
- package/apps/studio/client/v2/inspector/sections/border.jsx +141 -0
- package/apps/studio/client/v2/inspector/sections/color-control.jsx +246 -0
- package/apps/studio/client/v2/inspector/sections/colour-custom.jsx +826 -0
- package/apps/studio/client/v2/inspector/sections/colour-model.js +404 -0
- package/apps/studio/client/v2/inspector/sections/colour-popover.jsx +631 -0
- package/apps/studio/client/v2/inspector/sections/colour-words.js +131 -0
- package/apps/studio/client/v2/inspector/sections/corners.jsx +177 -0
- package/apps/studio/client/v2/inspector/sections/effects.jsx +67 -0
- package/apps/studio/client/v2/inspector/sections/export-slot.jsx +60 -0
- package/apps/studio/client/v2/inspector/sections/fill.jsx +187 -0
- package/apps/studio/client/v2/inspector/sections/formats.jsx +209 -0
- package/apps/studio/client/v2/inspector/sections/index.js +74 -0
- package/apps/studio/client/v2/inspector/sections/interaction.jsx +204 -0
- package/apps/studio/client/v2/inspector/sections/layout.jsx +314 -0
- package/apps/studio/client/v2/inspector/sections/opacity-row.jsx +37 -0
- package/apps/studio/client/v2/inspector/sections/point.jsx +102 -0
- package/apps/studio/client/v2/inspector/sections/position.jsx +259 -0
- package/apps/studio/client/v2/inspector/sections/recent-colours.js +106 -0
- package/apps/studio/client/v2/inspector/sections/row.jsx +91 -0
- package/apps/studio/client/v2/inspector/sections/safe-zones.jsx +174 -0
- package/apps/studio/client/v2/inspector/sections/sections.css +1474 -0
- package/apps/studio/client/v2/inspector/sections/size.jsx +104 -0
- package/apps/studio/client/v2/inspector/sections/type.jsx +168 -0
- package/apps/studio/client/v2/inspector/sections/warnings.css +44 -0
- package/apps/studio/client/v2/inspector/sections/warnings.jsx +137 -0
- package/apps/studio/client/v2/inspector/sections.js +226 -0
- package/apps/studio/client/v2/inspector/slots.js +110 -0
- package/apps/studio/client/v2/inspector/token-chip.jsx +315 -0
- package/apps/studio/client/v2/inspector/view-mode.jsx +193 -0
- package/apps/studio/client/v2/inspector/warning-fix.js +111 -0
- package/apps/studio/client/v2/kinds/ConvertDialog.jsx +183 -0
- package/apps/studio/client/v2/kinds/KindChips.jsx +60 -0
- package/apps/studio/client/v2/kinds/KindDimHost.jsx +35 -0
- package/apps/studio/client/v2/kinds/LayersKindFilter.jsx +108 -0
- package/apps/studio/client/v2/kinds/SizePicker.jsx +566 -0
- package/apps/studio/client/v2/kinds/SizePickerHost.jsx +104 -0
- package/apps/studio/client/v2/kinds/advanced-rows.js +40 -0
- package/apps/studio/client/v2/kinds/convert-api.js +116 -0
- package/apps/studio/client/v2/kinds/convert.css +87 -0
- package/apps/studio/client/v2/kinds/kind-dim-relay.js +93 -0
- package/apps/studio/client/v2/kinds/kind-filter-model.js +106 -0
- package/apps/studio/client/v2/kinds/kind-filter-store.js +71 -0
- package/apps/studio/client/v2/kinds/kind-filter.css +105 -0
- package/apps/studio/client/v2/kinds/layers-kind-model.js +99 -0
- package/apps/studio/client/v2/kinds/size-picker-model.js +189 -0
- package/apps/studio/client/v2/kinds/size-picker.css +393 -0
- package/apps/studio/client/v2/layers/artboard-layers.jsx +105 -0
- package/apps/studio/client/v2/layers/layers.css +94 -0
- package/apps/studio/client/v2/left-panel/advanced-model.js +98 -0
- package/apps/studio/client/v2/left-panel/assets-panel.jsx +1203 -0
- package/apps/studio/client/v2/left-panel/canvas-file-menu.js +115 -0
- package/apps/studio/client/v2/left-panel/canvases-advanced.jsx +270 -0
- package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +274 -0
- package/apps/studio/client/v2/left-panel/layers-advanced.jsx +179 -0
- package/apps/studio/client/v2/left-panel/left-panel-bus.js +83 -0
- package/apps/studio/client/v2/left-panel/left-panel-model.js +184 -0
- package/apps/studio/client/v2/left-panel/left-panel.css +1846 -0
- package/apps/studio/client/v2/left-panel/selector-scope.js +42 -0
- package/apps/studio/client/v2/left-panel/trash-model.js +282 -0
- package/apps/studio/client/v2/left-panel/trash-view.jsx +257 -0
- package/apps/studio/client/v2/left-panel/use-trash.js +172 -0
- package/apps/studio/client/v2/left-panel/view-prefs.js +84 -0
- package/apps/studio/client/v2/onboarding/AdvSheet.jsx +114 -0
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +239 -0
- package/apps/studio/client/v2/onboarding/CliSheet.jsx +101 -0
- package/apps/studio/client/v2/onboarding/ConnectAiSheet.jsx +60 -0
- package/apps/studio/client/v2/onboarding/FigmaSheet.jsx +96 -0
- package/apps/studio/client/v2/onboarding/FolderGithubSheet.jsx +77 -0
- package/apps/studio/client/v2/onboarding/GithubSegment.jsx +241 -0
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +244 -0
- package/apps/studio/client/v2/onboarding/connect-ai-home.js +94 -0
- package/apps/studio/client/v2/onboarding/github-home.js +84 -0
- package/apps/studio/client/v2/onboarding/onboarding-model.js +106 -0
- package/apps/studio/client/v2/onboarding/onboarding.css +546 -0
- package/apps/studio/client/v2/photo/apply-every-use-sheet.jsx +196 -0
- package/apps/studio/client/v2/photo/canvas-rel.js +20 -0
- package/apps/studio/client/v2/photo/looks.js +129 -0
- package/apps/studio/client/v2/photo/photo-section.jsx +625 -0
- package/apps/studio/client/v2/photo/photo.css +218 -0
- package/apps/studio/client/v2/portal-scope.jsx +14 -0
- package/apps/studio/client/v2/presence/faces.jsx +356 -0
- package/apps/studio/client/v2/presence/presence.css +187 -0
- package/apps/studio/client/v2/presence/use-presence-host.js +83 -0
- package/apps/studio/client/v2/present/audience-window.js +63 -0
- package/apps/studio/client/v2/present/canvas-pill.jsx +55 -0
- package/apps/studio/client/v2/present/copy-link.js +82 -0
- package/apps/studio/client/v2/present/follow-location.js +82 -0
- package/apps/studio/client/v2/present/follow-model.js +68 -0
- package/apps/studio/client/v2/present/follow-view.jsx +354 -0
- package/apps/studio/client/v2/present/follow.css +91 -0
- package/apps/studio/client/v2/present/order-map.jsx +64 -0
- package/apps/studio/client/v2/present/order-notes-artboards.js +88 -0
- package/apps/studio/client/v2/present/order-notes-model.js +141 -0
- package/apps/studio/client/v2/present/order-notes-mount.jsx +26 -0
- package/apps/studio/client/v2/present/order-notes-sheet.jsx +293 -0
- package/apps/studio/client/v2/present/order-notes.css +150 -0
- package/apps/studio/client/v2/present/present-chrome-host.jsx +95 -0
- package/apps/studio/client/v2/present/present-controls-model.js +114 -0
- package/apps/studio/client/v2/present/present-controls.jsx +263 -0
- package/apps/studio/client/v2/present/present-zoom-store.js +33 -0
- package/apps/studio/client/v2/present/present.css +258 -0
- package/apps/studio/client/v2/present/presenter-button.jsx +25 -0
- package/apps/studio/client/v2/present/presenter-host.jsx +246 -0
- package/apps/studio/client/v2/present/presenter-model.js +167 -0
- package/apps/studio/client/v2/present/presenter-store.js +140 -0
- package/apps/studio/client/v2/present/presenter-view.css +298 -0
- package/apps/studio/client/v2/present/presenter-view.jsx +241 -0
- package/apps/studio/client/v2/present/video-present-model.js +92 -0
- package/apps/studio/client/v2/present/video-present.css +164 -0
- package/apps/studio/client/v2/present/video-present.jsx +331 -0
- package/apps/studio/client/v2/preview/external-link-confirm.jsx +245 -0
- package/apps/studio/client/v2/preview/link-follow.js +109 -0
- package/apps/studio/client/v2/preview/open-in-app.jsx +46 -0
- package/apps/studio/client/v2/preview/preview-back.js +21 -0
- package/apps/studio/client/v2/preview/preview-bar.jsx +86 -0
- package/apps/studio/client/v2/preview/preview-chrome-host.jsx +234 -0
- package/apps/studio/client/v2/preview/preview-history.js +61 -0
- package/apps/studio/client/v2/preview/preview.css +262 -0
- package/apps/studio/client/v2/preview/zoom-only.jsx +58 -0
- package/apps/studio/client/v2/search/help-model.js +275 -0
- package/apps/studio/client/v2/search/moved-keys.js +74 -0
- package/apps/studio/client/v2/search/palette-icons.js +45 -0
- package/apps/studio/client/v2/search/search-ds.js +142 -0
- package/apps/studio/client/v2/search/search-env.js +110 -0
- package/apps/studio/client/v2/search/search-keywords.js +162 -0
- package/apps/studio/client/v2/search/search-model.js +623 -0
- package/apps/studio/client/v2/search/search-projects.js +214 -0
- package/apps/studio/client/v2/search/search-recent.js +94 -0
- package/apps/studio/client/v2/search/search-remote.js +30 -0
- package/apps/studio/client/v2/search/search.css +519 -0
- package/apps/studio/client/v2/settings/account.jsx +164 -0
- package/apps/studio/client/v2/settings/advanced-prefs.js +91 -0
- package/apps/studio/client/v2/settings/advanced-section.jsx +308 -0
- package/apps/studio/client/v2/settings/connection-row.jsx +79 -0
- package/apps/studio/client/v2/settings/connections-model.js +138 -0
- package/apps/studio/client/v2/settings/connections-section.jsx +663 -0
- package/apps/studio/client/v2/settings/general-section.jsx +155 -0
- package/apps/studio/client/v2/settings/parts.jsx +48 -0
- package/apps/studio/client/v2/settings/prefs-migrate.js +141 -0
- package/apps/studio/client/v2/settings/project-sync-settings.jsx +255 -0
- package/apps/studio/client/v2/settings/reset-section.jsx +164 -0
- package/apps/studio/client/v2/settings/settings-handlers.js +46 -0
- package/apps/studio/client/v2/settings/settings-model.js +523 -0
- package/apps/studio/client/v2/settings/settings-sheet.jsx +204 -0
- package/apps/studio/client/v2/settings/settings.css +975 -0
- package/apps/studio/client/v2/settings/theme-auto.js +75 -0
- package/apps/studio/client/v2/settings/use-advanced-prefs.js +32 -0
- package/apps/studio/client/v2/settings/use-connections.js +485 -0
- package/apps/studio/client/v2/share/glyphs.jsx +92 -0
- package/apps/studio/client/v2/share/invite-row.jsx +68 -0
- package/apps/studio/client/v2/share/link-dialog.js +53 -0
- package/apps/studio/client/v2/share/link-row.jsx +38 -0
- package/apps/studio/client/v2/share/move-to-cloud.jsx +88 -0
- package/apps/studio/client/v2/share/people-list.jsx +151 -0
- package/apps/studio/client/v2/share/person.jsx +26 -0
- package/apps/studio/client/v2/share/role-menu.jsx +145 -0
- package/apps/studio/client/v2/share/share-advanced.jsx +411 -0
- package/apps/studio/client/v2/share/share-model.js +469 -0
- package/apps/studio/client/v2/share/share-sheet.jsx +602 -0
- package/apps/studio/client/v2/share/share.css +828 -0
- package/apps/studio/client/v2/shell/account-card-model.js +114 -0
- package/apps/studio/client/v2/shell/account-card.jsx +177 -0
- package/apps/studio/client/v2/shell/annotation-prefs-store.js +105 -0
- package/apps/studio/client/v2/shell/ask-to-edit.js +33 -0
- package/apps/studio/client/v2/shell/callouts-host.jsx +151 -0
- package/apps/studio/client/v2/shell/callouts-model.js +358 -0
- package/apps/studio/client/v2/shell/callouts.css +164 -0
- package/apps/studio/client/v2/shell/callouts.jsx +162 -0
- package/apps/studio/client/v2/shell/canvas-mode.js +393 -0
- package/apps/studio/client/v2/shell/contrast.css +37 -0
- package/apps/studio/client/v2/shell/corner-icons.jsx +153 -0
- package/apps/studio/client/v2/shell/dock-rail-homes.js +106 -0
- package/apps/studio/client/v2/shell/f6-cycle.js +124 -0
- package/apps/studio/client/v2/shell/floating-panels.css +2858 -0
- package/apps/studio/client/v2/shell/fold-ghost.js +70 -0
- package/apps/studio/client/v2/shell/format-update.css +43 -0
- package/apps/studio/client/v2/shell/format-update.js +487 -0
- package/apps/studio/client/v2/shell/format-update.jsx +479 -0
- package/apps/studio/client/v2/shell/held-conflict.js +51 -0
- package/apps/studio/client/v2/shell/image-pick.js +140 -0
- package/apps/studio/client/v2/shell/insets-now.js +35 -0
- package/apps/studio/client/v2/shell/inspector-follow.js +113 -0
- package/apps/studio/client/v2/shell/menu-runner.js +711 -0
- package/apps/studio/client/v2/shell/modal-focus.js +259 -0
- package/apps/studio/client/v2/shell/mode-switch.jsx +418 -0
- package/apps/studio/client/v2/shell/native-doors.js +121 -0
- package/apps/studio/client/v2/shell/occlusion-insets.js +116 -0
- package/apps/studio/client/v2/shell/panel-availability.js +27 -0
- package/apps/studio/client/v2/shell/panel-layout.js +144 -0
- package/apps/studio/client/v2/shell/panel-sizes.js +150 -0
- package/apps/studio/client/v2/shell/paste-forward.js +43 -0
- package/apps/studio/client/v2/shell/present-from-label.js +19 -0
- package/apps/studio/client/v2/shell/project-menu-model.js +216 -0
- package/apps/studio/client/v2/shell/project-pill.css +214 -0
- package/apps/studio/client/v2/shell/project-pill.jsx +456 -0
- package/apps/studio/client/v2/shell/recovery-store.js +139 -0
- package/apps/studio/client/v2/shell/role-denial.js +73 -0
- package/apps/studio/client/v2/shell/role-gate.js +29 -0
- package/apps/studio/client/v2/shell/save-hold-notice.js +69 -0
- package/apps/studio/client/v2/shell/save-status.js +191 -0
- package/apps/studio/client/v2/shell/scroll-lock.js +49 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +389 -0
- package/apps/studio/client/v2/shell/share-cluster.css +608 -0
- package/apps/studio/client/v2/shell/share-cluster.jsx +255 -0
- package/apps/studio/client/v2/shell/shell-error-boundary.jsx +81 -0
- package/apps/studio/client/v2/shell/shell-panels-relay.js +95 -0
- package/apps/studio/client/v2/shell/shell-parity.js +457 -0
- package/apps/studio/client/v2/shell/shell-parity.json +2106 -0
- package/apps/studio/client/v2/shell/single-keys-store.js +49 -0
- package/apps/studio/client/v2/shell/tool-panels.css +39 -0
- package/apps/studio/client/v2/shell/tool-panels.js +156 -0
- package/apps/studio/client/v2/shell/use-account.js +59 -0
- package/apps/studio/client/v2/shell/use-annotation-prefs.js +77 -0
- package/apps/studio/client/v2/shell/use-canvas-mode-lane.js +388 -0
- package/apps/studio/client/v2/shell/use-dismiss-outside.js +35 -0
- package/apps/studio/client/v2/shell/use-fit-on-ai-pin.js +42 -0
- package/apps/studio/client/v2/shell/use-fit-while-ai-drafts.js +37 -0
- package/apps/studio/client/v2/shell/use-occluded-insets.js +107 -0
- package/apps/studio/client/v2/shell/use-panel-layout.js +45 -0
- package/apps/studio/client/v2/shell/use-single-keys.js +56 -0
- package/apps/studio/client/v2/shell/use-tool-panels.js +205 -0
- package/apps/studio/client/v2/signin/CreateLocalSheet.jsx +155 -0
- package/apps/studio/client/v2/signin/SignInCard.jsx +284 -0
- package/apps/studio/client/v2/signin/SignInToast.jsx +22 -0
- package/apps/studio/client/v2/signin/WhatsNewLine.jsx +64 -0
- package/apps/studio/client/v2/signin/advanced-rows.js +40 -0
- package/apps/studio/client/v2/signin/signin-model.js +138 -0
- package/apps/studio/client/v2/signin/signin.css +484 -0
- package/apps/studio/client/v2/signin/use-signin.js +209 -0
- package/apps/studio/client/v2/signin/use-whats-new-line.js +94 -0
- package/apps/studio/client/v2/sync-states/back-online.jsx +61 -0
- package/apps/studio/client/v2/sync-states/conflict-card.jsx +326 -0
- package/apps/studio/client/v2/sync-states/offline-foot.jsx +79 -0
- package/apps/studio/client/v2/sync-states/row-words.js +83 -0
- package/apps/studio/client/v2/sync-states/sync-states-model.js +264 -0
- package/apps/studio/client/v2/sync-states/sync-states.css +232 -0
- package/apps/studio/client/v2/timeline/Timeline.jsx +3194 -0
- package/apps/studio/client/v2/timeline/TimelineHost.jsx +360 -0
- package/apps/studio/client/v2/timeline/advanced/actions.js +27 -0
- package/apps/studio/client/v2/timeline/advanced/advanced-store.js +116 -0
- package/apps/studio/client/v2/timeline/advanced/advanced.css +323 -0
- package/apps/studio/client/v2/timeline/advanced/cut-as-code.jsx +127 -0
- package/apps/studio/client/v2/timeline/advanced/easing-curve.jsx +200 -0
- package/apps/studio/client/v2/timeline/advanced/foot.jsx +210 -0
- package/apps/studio/client/v2/timeline/advanced/model.js +121 -0
- package/apps/studio/client/v2/timeline/advanced/render-settings.jsx +62 -0
- package/apps/studio/client/v2/timeline/advanced/video-cap.js +174 -0
- package/apps/studio/client/v2/timeline/ai-edge-model.js +111 -0
- package/apps/studio/client/v2/timeline/ai-edge.css +104 -0
- package/apps/studio/client/v2/timeline/ai-edge.jsx +113 -0
- package/apps/studio/client/v2/timeline/anchor-lane.js +80 -0
- package/apps/studio/client/v2/timeline/anchor.js +80 -0
- package/apps/studio/client/v2/timeline/assemble-video.js +64 -0
- package/apps/studio/client/v2/timeline/clip-search.js +88 -0
- package/apps/studio/client/v2/timeline/clip-verb.js +224 -0
- package/apps/studio/client/v2/timeline/comment-strip-host.jsx +93 -0
- package/apps/studio/client/v2/timeline/comment-strip-model.js +103 -0
- package/apps/studio/client/v2/timeline/comment-strip.jsx +82 -0
- package/apps/studio/client/v2/timeline/edit/clip-menu.js +118 -0
- package/apps/studio/client/v2/timeline/edit/clip-menu.jsx +48 -0
- package/apps/studio/client/v2/timeline/edit/drop.jsx +101 -0
- package/apps/studio/client/v2/timeline/edit/move.jsx +43 -0
- package/apps/studio/client/v2/timeline/edit/ripple.js +43 -0
- package/apps/studio/client/v2/timeline/edit/trim.jsx +52 -0
- package/apps/studio/client/v2/timeline/edit/words.js +65 -0
- package/apps/studio/client/v2/timeline/fit-fill.jsx +172 -0
- package/apps/studio/client/v2/timeline/fit-model.js +137 -0
- package/apps/studio/client/v2/timeline/fold.js +128 -0
- package/apps/studio/client/v2/timeline/footage-rows.jsx +46 -0
- package/apps/studio/client/v2/timeline/footage-state.js +135 -0
- package/apps/studio/client/v2/timeline/glyphs.jsx +118 -0
- package/apps/studio/client/v2/timeline/island-context.js +29 -0
- package/apps/studio/client/v2/timeline/island-controls.jsx +83 -0
- package/apps/studio/client/v2/timeline/island.jsx +54 -0
- package/apps/studio/client/v2/timeline/joins/join-model.js +133 -0
- package/apps/studio/client/v2/timeline/joins/joins.css +277 -0
- package/apps/studio/client/v2/timeline/joins/transition-picker.jsx +240 -0
- package/apps/studio/client/v2/timeline/keys.js +74 -0
- package/apps/studio/client/v2/timeline/lanes/caption-lane.jsx +149 -0
- package/apps/studio/client/v2/timeline/lanes/music-lane.jsx +294 -0
- package/apps/studio/client/v2/timeline/lanes/music-media.js +200 -0
- package/apps/studio/client/v2/timeline/lanes/music-model.js +190 -0
- package/apps/studio/client/v2/timeline/loop-handle.jsx +70 -0
- package/apps/studio/client/v2/timeline/marker-store.js +117 -0
- package/apps/studio/client/v2/timeline/markers.js +79 -0
- package/apps/studio/client/v2/timeline/marks.jsx +152 -0
- package/apps/studio/client/v2/timeline/music-hint.jsx +98 -0
- package/apps/studio/client/v2/timeline/other-takes-model.js +103 -0
- package/apps/studio/client/v2/timeline/other-takes-store.js +49 -0
- package/apps/studio/client/v2/timeline/other-takes.css +98 -0
- package/apps/studio/client/v2/timeline/other-takes.jsx +269 -0
- package/apps/studio/client/v2/timeline/peers.jsx +246 -0
- package/apps/studio/client/v2/timeline/playhead.js +97 -0
- package/apps/studio/client/v2/timeline/poster.js +109 -0
- package/apps/studio/client/v2/timeline/reframe-island.jsx +478 -0
- package/apps/studio/client/v2/timeline/reframe-model.js +135 -0
- package/apps/studio/client/v2/timeline/reframe.css +150 -0
- package/apps/studio/client/v2/timeline/ruler.js +61 -0
- package/apps/studio/client/v2/timeline/selection.js +110 -0
- package/apps/studio/client/v2/timeline/timeline-empty.jsx +108 -0
- package/apps/studio/client/v2/timeline/timeline-store.js +147 -0
- package/apps/studio/client/v2/timeline/timeline.css +2879 -0
- package/apps/studio/client/v2/timeline/together.css +85 -0
- package/apps/studio/client/v2/timeline/track-toggle.js +56 -0
- package/apps/studio/client/v2/timeline/tracks.js +68 -0
- package/apps/studio/client/v2/timeline/transport.js +66 -0
- package/apps/studio/client/v2/timeline/zoom.js +37 -0
- package/apps/studio/client/v2/transcript/TranscriptHost.jsx +162 -0
- package/apps/studio/client/v2/transcript/TranscriptPanel.jsx +358 -0
- package/apps/studio/client/v2/transcript/captions-api.js +297 -0
- package/apps/studio/client/v2/transcript/captions-file-flag.js +38 -0
- package/apps/studio/client/v2/transcript/comp-media-store.js +89 -0
- package/apps/studio/client/v2/transcript/transcript-model.js +240 -0
- package/apps/studio/client/v2/transcript/transcript.css +262 -0
- package/apps/studio/client/v2/undo/projection.js +291 -0
- package/apps/studio/client/v2/undo/undo-history.jsx +286 -0
- package/apps/studio/client/v2/undo/undo.css +81 -0
- package/apps/studio/client/v2/undo/use-undo-mode-lane.js +96 -0
- package/apps/studio/client/v2/undo/use-undo-projection.jsx +460 -0
- package/apps/studio/client/v2/undo/zoom-undo.jsx +79 -0
- package/apps/studio/client/whats-new-seen.js +40 -0
- package/apps/studio/client/whats-new.jsx +65 -62
- package/apps/studio/clip-ops.ts +38 -6
- package/apps/studio/cloud/config-path.ts +42 -0
- package/apps/studio/cloud/endpoints.ts +212 -50
- package/apps/studio/cloud/renew.ts +29 -16
- package/apps/studio/collab/ai-activity.ts +19 -0
- package/apps/studio/collab/awareness-bridge.ts +131 -4
- package/apps/studio/collab/git-lifecycle.ts +52 -20
- package/apps/studio/collab/holds.ts +69 -0
- package/apps/studio/collab/index.ts +25 -0
- package/apps/studio/collab/protocol.ts +64 -0
- package/apps/studio/collab/registry.ts +59 -6
- package/apps/studio/collab/room.ts +374 -16
- package/apps/studio/collab/timeline-awareness.ts +123 -0
- package/apps/studio/collab/timeline-presence.tsx +219 -0
- package/apps/studio/commands/move-artboards-command.ts +45 -4
- package/apps/studio/comments/anchors.ts +147 -0
- package/apps/studio/comments/author-face.ts +41 -0
- package/apps/studio/comments/from-line.ts +43 -0
- package/apps/studio/comments/imported-from.ts +113 -0
- package/apps/studio/comments/local-author.ts +41 -0
- package/apps/studio/comments/mentions.ts +115 -0
- package/apps/studio/comments/mine-stamp.ts +78 -0
- package/apps/studio/comments/ops.ts +293 -0
- package/apps/studio/comments/people.ts +66 -0
- package/apps/studio/comments/where.ts +136 -0
- package/apps/studio/comments-overlay.tsx +1220 -253
- package/apps/studio/config.schema.json +33 -0
- package/apps/studio/context-menu.tsx +126 -42
- package/apps/studio/context.ts +178 -13
- package/apps/studio/cursors-overlay.tsx +28 -11
- package/apps/studio/debug-bundle.ts +21 -5
- package/apps/studio/describe/batch.ts +414 -0
- package/apps/studio/describe/budget.ts +147 -0
- package/apps/studio/describe/claude.ts +273 -0
- package/apps/studio/describe/consent.ts +120 -0
- package/apps/studio/describe/validate.ts +192 -0
- package/apps/studio/design-setup-readiness.ts +2 -2
- package/apps/studio/diagnostics/store.ts +220 -0
- package/apps/studio/dist/client.bundle.js +2429 -2329
- package/apps/studio/dist/comment-mount.js +12 -9
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/dom-selection.ts +239 -23
- package/apps/studio/drag-bus.ts +211 -0
- package/apps/studio/draw/serialize-animate.ts +4 -4
- package/apps/studio/ds/board/board-specimen.css +199 -0
- package/apps/studio/ds/board/board.css +674 -0
- package/apps/studio/ds/board/brand-notes.ts +92 -0
- package/apps/studio/ds/board/build-model.ts +418 -0
- package/apps/studio/ds/board/component-states.ts +111 -0
- package/apps/studio/ds/board/directions-model.ts +145 -0
- package/apps/studio/ds/board/directions.css +169 -0
- package/apps/studio/ds/board/directions.tsx +100 -0
- package/apps/studio/ds/board/ds-bar.tsx +107 -0
- package/apps/studio/ds/board/index.tsx +71 -0
- package/apps/studio/ds/board/logo-paint.ts +118 -0
- package/apps/studio/ds/board/outline.tsx +127 -0
- package/apps/studio/ds/board/parts.tsx +160 -0
- package/apps/studio/ds/board/section-brand.tsx +148 -0
- package/apps/studio/ds/board/section-colour.tsx +160 -0
- package/apps/studio/ds/board/section-components.tsx +146 -0
- package/apps/studio/ds/board/section-motion.tsx +106 -0
- package/apps/studio/ds/board/section-patterns.tsx +89 -0
- package/apps/studio/ds/board/section-space.tsx +109 -0
- package/apps/studio/ds/board/section-type.tsx +129 -0
- package/apps/studio/ds/board/specimen.tsx +61 -0
- package/apps/studio/ds/board/state.ts +105 -0
- package/apps/studio/ds/board/template.ts +152 -0
- package/apps/studio/ds/board/types.ts +346 -0
- package/apps/studio/ds/canvas-check.ts +914 -0
- package/apps/studio/ds/canvas-cli.ts +346 -0
- package/apps/studio/ds/check-system-verb.ts +88 -0
- package/apps/studio/ds/check-system.ts +293 -0
- package/apps/studio/ds/check.ts +541 -0
- package/apps/studio/ds/cli.ts +348 -0
- package/apps/studio/ds/component-list.ts +150 -0
- package/apps/studio/ds/contrast.ts +438 -0
- package/apps/studio/ds/convert-map.ts +126 -0
- package/apps/studio/ds/convert.ts +603 -0
- package/apps/studio/ds/css-scan.ts +292 -0
- package/apps/studio/ds/default-components.tsx +377 -0
- package/apps/studio/ds/default.ts +58 -0
- package/apps/studio/ds/design-system.tsx.tpl +40 -0
- package/apps/studio/ds/ds-resolver.ts +205 -0
- package/apps/studio/ds/ds-verb.ts +563 -0
- package/apps/studio/ds/edges.ts +412 -0
- package/apps/studio/ds/emit.ts +217 -0
- package/apps/studio/ds/engine.ts +1652 -0
- package/apps/studio/ds/fallbacks.ts +116 -0
- package/apps/studio/ds/generate.ts +746 -0
- package/apps/studio/ds/head.ts +372 -0
- package/apps/studio/ds/instance-info.ts +90 -0
- package/apps/studio/ds/library.ts +1137 -0
- package/apps/studio/ds/make.ts +726 -0
- package/apps/studio/ds/migrate-emitter.ts +42 -0
- package/apps/studio/ds/nearest.ts +163 -0
- package/apps/studio/ds/outside.ts +343 -0
- package/apps/studio/ds/override-map.ts +213 -0
- package/apps/studio/ds/pairing-css.ts +145 -0
- package/apps/studio/ds/pin-scope.ts +268 -0
- package/apps/studio/ds/registry.ts +228 -0
- package/apps/studio/ds/rename.ts +104 -0
- package/apps/studio/ds/render-rev.ts +144 -0
- package/apps/studio/ds/revision.ts +268 -0
- package/apps/studio/ds/shell-fallbacks.ts +84 -0
- package/apps/studio/ds/switch.ts +426 -0
- package/apps/studio/ds/system-files.ts +251 -0
- package/apps/studio/ds/system.ts +312 -0
- package/apps/studio/ds/undo-hook.ts +46 -0
- package/apps/studio/ds/upgrade-apply.ts +258 -0
- package/apps/studio/ds/upgrade-cli.ts +216 -0
- package/apps/studio/ds/upgrade-codemod.ts +116 -0
- package/apps/studio/ds/upgrade-progress.ts +153 -0
- package/apps/studio/ds/upgrade-prove.ts +429 -0
- package/apps/studio/ds/upgrade-stage.ts +387 -0
- package/apps/studio/ds/upgrade.ts +394 -0
- package/apps/studio/ds/value-types.ts +190 -0
- package/apps/studio/edit-ops/align.ts +43 -0
- package/apps/studio/edit-ops/arrange.ts +93 -0
- package/apps/studio/edit-ops/artboard-facts.ts +70 -0
- package/apps/studio/edit-ops/artboard-resize.ts +50 -0
- package/apps/studio/edit-ops/artboard-trash.ts +77 -0
- package/apps/studio/edit-ops/clear-link.ts +16 -0
- package/apps/studio/edit-ops/clip/captions.ts +154 -0
- package/apps/studio/edit-ops/clip/comp.ts +124 -0
- package/apps/studio/edit-ops/clip/cut-source-range.ts +100 -0
- package/apps/studio/edit-ops/clip/cut-to-beat.ts +136 -0
- package/apps/studio/edit-ops/clip/duck.ts +123 -0
- package/apps/studio/edit-ops/clip/easing.ts +76 -0
- package/apps/studio/edit-ops/clip/formats.ts +163 -0
- package/apps/studio/edit-ops/clip/gestures.ts +161 -0
- package/apps/studio/edit-ops/clip/index.ts +543 -0
- package/apps/studio/edit-ops/clip/jsx.ts +251 -0
- package/apps/studio/edit-ops/clip/place.ts +127 -0
- package/apps/studio/edit-ops/clip/reframe.ts +194 -0
- package/apps/studio/edit-ops/clip/take-swap.ts +53 -0
- package/apps/studio/edit-ops/clip/title-motion.ts +103 -0
- package/apps/studio/edit-ops/clip/title-style.ts +177 -0
- package/apps/studio/edit-ops/clip/track.ts +102 -0
- package/apps/studio/edit-ops/clipboard.ts +482 -0
- package/apps/studio/edit-ops/combine.ts +264 -0
- package/apps/studio/edit-ops/constraints.ts +148 -0
- package/apps/studio/edit-ops/convert-kind.ts +203 -0
- package/apps/studio/edit-ops/corner-radius.ts +86 -0
- package/apps/studio/edit-ops/crop.ts +303 -0
- package/apps/studio/edit-ops/czech-ties.ts +84 -0
- package/apps/studio/edit-ops/detach-instance.ts +119 -0
- package/apps/studio/edit-ops/dispatch.ts +552 -0
- package/apps/studio/edit-ops/distribute.ts +31 -0
- package/apps/studio/edit-ops/ds-instance-update.ts +46 -0
- package/apps/studio/edit-ops/ds-use-nearest.ts +72 -0
- package/apps/studio/edit-ops/duplicate-at-width.ts +241 -0
- package/apps/studio/edit-ops/frame.ts +68 -0
- package/apps/studio/edit-ops/guides.ts +67 -0
- package/apps/studio/edit-ops/hide.ts +30 -0
- package/apps/studio/edit-ops/hover-rules.ts +94 -0
- package/apps/studio/edit-ops/image-fit.ts +571 -0
- package/apps/studio/edit-ops/insert-component.ts +344 -0
- package/apps/studio/edit-ops/insert-preset.ts +151 -0
- package/apps/studio/edit-ops/insert-shape.ts +326 -0
- package/apps/studio/edit-ops/instance-model.ts +286 -0
- package/apps/studio/edit-ops/instance-tree.ts +215 -0
- package/apps/studio/edit-ops/layout-patch.ts +81 -0
- package/apps/studio/edit-ops/lock.ts +30 -0
- package/apps/studio/edit-ops/op-label.ts +155 -0
- package/apps/studio/edit-ops/path-model.ts +671 -0
- package/apps/studio/edit-ops/path.ts +172 -0
- package/apps/studio/edit-ops/photo-every-use.ts +64 -0
- package/apps/studio/edit-ops/photo-use.ts +41 -0
- package/apps/studio/edit-ops/place-freely.ts +47 -0
- package/apps/studio/edit-ops/place-plan.ts +60 -0
- package/apps/studio/edit-ops/print.ts +104 -0
- package/apps/studio/edit-ops/references.ts +231 -0
- package/apps/studio/edit-ops/relink.ts +49 -0
- package/apps/studio/edit-ops/reorder.ts +104 -0
- package/apps/studio/edit-ops/reset-overrides.ts +75 -0
- package/apps/studio/edit-ops/revert.ts +63 -0
- package/apps/studio/edit-ops/rotate.ts +58 -0
- package/apps/studio/edit-ops/safe-zones.ts +38 -0
- package/apps/studio/edit-ops/scope-names.ts +151 -0
- package/apps/studio/edit-ops/select-matching.ts +48 -0
- package/apps/studio/edit-ops/set-gap.ts +65 -0
- package/apps/studio/edit-ops/set-id.ts +42 -0
- package/apps/studio/edit-ops/set-link.ts +39 -0
- package/apps/studio/edit-ops/siblings.ts +105 -0
- package/apps/studio/edit-ops/slot-defaults.ts +48 -0
- package/apps/studio/edit-ops/stamp.ts +27 -0
- package/apps/studio/edit-ops/swap-variant.ts +163 -0
- package/apps/studio/edit-ops/text-copy.ts +146 -0
- package/apps/studio/edit-ops/text-detach.ts +62 -0
- package/apps/studio/edit-ops/text-style-ops.ts +131 -0
- package/apps/studio/edit-ops/text-style.ts +141 -0
- package/apps/studio/edit-ops/tidy.ts +72 -0
- package/apps/studio/edit-ops/types.ts +229 -0
- package/apps/studio/edit-ops/unframe.ts +53 -0
- package/apps/studio/edit-ops/words-css.ts +487 -0
- package/apps/studio/edit-ops/words-paint.ts +521 -0
- package/apps/studio/edit-ops/z-order.ts +81 -0
- package/apps/studio/editing/ai-point-ring.tsx +158 -0
- package/apps/studio/editing/ai-scope-outline.tsx +180 -0
- package/apps/studio/editing/align-bar.tsx +510 -0
- package/apps/studio/editing/anchor-report.ts +123 -0
- package/apps/studio/editing/anchor-reporter.tsx +64 -0
- package/apps/studio/editing/aria-live.tsx +162 -0
- package/apps/studio/editing/arrange.ts +345 -0
- package/apps/studio/editing/artboard-actions.ts +275 -0
- package/apps/studio/editing/artboard-commands.tsx +232 -0
- package/apps/studio/editing/artboard-guides.tsx +265 -0
- package/apps/studio/editing/artboard-handles.tsx +524 -0
- package/apps/studio/editing/artboard-menu.tsx +153 -0
- package/apps/studio/editing/artboard-resize.ts +306 -0
- package/apps/studio/editing/ask-bubble.tsx +161 -0
- package/apps/studio/editing/asset-drag.ts +70 -0
- package/apps/studio/editing/click-to-type.ts +207 -0
- package/apps/studio/editing/clipboard-actions.ts +91 -0
- package/apps/studio/editing/clipboard.ts +194 -0
- package/apps/studio/editing/clipped-grab.ts +45 -0
- package/apps/studio/editing/corner-dots.tsx +394 -0
- package/apps/studio/editing/crop-geometry.ts +128 -0
- package/apps/studio/editing/crop-mode.tsx +522 -0
- package/apps/studio/editing/crumbs.ts +158 -0
- package/apps/studio/editing/draw-geometry.ts +151 -0
- package/apps/studio/editing/draw-tools.tsx +490 -0
- package/apps/studio/editing/drop-chip.tsx +105 -0
- package/apps/studio/editing/duplicate-rhythm.ts +166 -0
- package/apps/studio/editing/edit-chrome-gate.tsx +58 -0
- package/apps/studio/editing/edit-op.ts +90 -0
- package/apps/studio/editing/empty-report.ts +182 -0
- package/apps/studio/editing/empty-reporter.tsx +74 -0
- package/apps/studio/editing/figma-paste.ts +71 -0
- package/apps/studio/editing/finder-drop-model.ts +130 -0
- package/apps/studio/editing/finder-drop.tsx +400 -0
- package/apps/studio/editing/focus-model.tsx +429 -0
- package/apps/studio/editing/gap-bands.tsx +257 -0
- package/apps/studio/editing/hold-rings.tsx +461 -0
- package/apps/studio/editing/image-drop.tsx +193 -0
- package/apps/studio/editing/index.tsx +402 -0
- package/apps/studio/editing/instance-actions.ts +152 -0
- package/apps/studio/editing/kids-summary.ts +75 -0
- package/apps/studio/editing/kind-dim.tsx +54 -0
- package/apps/studio/editing/layout-actions.ts +159 -0
- package/apps/studio/editing/lock-badge.tsx +178 -0
- package/apps/studio/editing/long-page.ts +102 -0
- package/apps/studio/editing/minimap-context.tsx +161 -0
- package/apps/studio/editing/nudge.tsx +212 -0
- package/apps/studio/editing/object-actions.ts +156 -0
- package/apps/studio/editing/object-keys.ts +58 -0
- package/apps/studio/editing/object-menu.tsx +216 -0
- package/apps/studio/editing/object-ops.ts +114 -0
- package/apps/studio/editing/paste-bar.tsx +388 -0
- package/apps/studio/editing/pen/combine-run.ts +113 -0
- package/apps/studio/editing/pen/draw.tsx +364 -0
- package/apps/studio/editing/pen/index.tsx +48 -0
- package/apps/studio/editing/pen/overlay.tsx +147 -0
- package/apps/studio/editing/pen/pen-geometry.ts +234 -0
- package/apps/studio/editing/pen/point-store.ts +64 -0
- package/apps/studio/editing/pen/points.tsx +421 -0
- package/apps/studio/editing/place-freely.tsx +389 -0
- package/apps/studio/editing/place-ghost.tsx +418 -0
- package/apps/studio/editing/place-image.tsx +219 -0
- package/apps/studio/editing/preset-ruler.tsx +218 -0
- package/apps/studio/editing/rename-order.ts +58 -0
- package/apps/studio/editing/reorder-slot.tsx +567 -0
- package/apps/studio/editing/rotate-handle.tsx +353 -0
- package/apps/studio/editing/selection.tsx +319 -0
- package/apps/studio/editing/set-gap.ts +55 -0
- package/apps/studio/editing/size-ghost.tsx +343 -0
- package/apps/studio/editing/space-tap.ts +56 -0
- package/apps/studio/editing/sticky-name.tsx +112 -0
- package/apps/studio/editing/tab-order.tsx +298 -0
- package/apps/studio/editing/take-keys.ts +115 -0
- package/apps/studio/editing/text-actions.ts +214 -0
- package/apps/studio/editing/text-in-place.tsx +187 -0
- package/apps/studio/editing/tidy-preview.tsx +83 -0
- package/apps/studio/editing/token-ruler.tsx +231 -0
- package/apps/studio/editing/type-role.ts +122 -0
- package/apps/studio/editing/undo-preview.tsx +120 -0
- package/apps/studio/editing/video-label.ts +66 -0
- package/apps/studio/editing/video-play.ts +65 -0
- package/apps/studio/editing/world-menu.ts +36 -0
- package/apps/studio/element-ids.ts +1030 -0
- package/apps/studio/equal-spacing-handles.tsx +1 -1
- package/apps/studio/exporters/_runtime.ts +64 -24
- package/apps/studio/exporters/audio.ts +136 -0
- package/apps/studio/exporters/door-fingerprint.ts +202 -0
- package/apps/studio/exporters/estimate.ts +314 -0
- package/apps/studio/exporters/file-names.ts +197 -0
- package/apps/studio/exporters/format-scopes.ts +7 -1
- package/apps/studio/exporters/hub-render-door.ts +368 -0
- package/apps/studio/exporters/index.ts +53 -7
- package/apps/studio/exporters/jobs.ts +484 -80
- package/apps/studio/exporters/jpg.ts +21 -0
- package/apps/studio/exporters/pdf-fonts.ts +102 -0
- package/apps/studio/exporters/pdf.ts +133 -14
- package/apps/studio/exporters/png.ts +136 -9
- package/apps/studio/exporters/print-back.ts +92 -0
- package/apps/studio/exporters/print-preflight.ts +373 -0
- package/apps/studio/exporters/rects-runner.ts +130 -0
- package/apps/studio/exporters/remote.ts +726 -3
- package/apps/studio/exporters/render-seconds.ts +57 -0
- package/apps/studio/exporters/replay.ts +48 -0
- package/apps/studio/exporters/scope.ts +560 -15
- package/apps/studio/exporters/spec-run.ts +270 -0
- package/apps/studio/exporters/spec-v2.ts +408 -0
- package/apps/studio/exporters/video-cap.ts +280 -0
- package/apps/studio/exporters/wait-ai.ts +192 -0
- package/apps/studio/figma/client.ts +67 -0
- package/apps/studio/figma/comments-to-pins.ts +249 -0
- package/apps/studio/figma/comments-to-strokes.ts +6 -1
- package/apps/studio/figma/into-board.ts +141 -0
- package/apps/studio/figma/to-strokes.ts +54 -0
- package/apps/studio/format.ts +172 -30
- package/apps/studio/fs-watch.ts +28 -1
- package/apps/studio/generation/adapters/gemini.ts +3 -0
- package/apps/studio/generation/adapters/stub.ts +133 -0
- package/apps/studio/generation/gen-sidecar.ts +108 -0
- package/apps/studio/generation/registry.ts +16 -5
- package/apps/studio/generation/takes.ts +398 -0
- package/apps/studio/generation/types.ts +7 -0
- package/apps/studio/git/service.ts +143 -14
- package/apps/studio/github/endpoints.ts +1 -1
- package/apps/studio/github/identity-cache.ts +53 -14
- package/apps/studio/handoff/blockers.ts +120 -0
- package/apps/studio/handoff/run.ts +233 -0
- package/apps/studio/handoff/targets.ts +334 -0
- package/apps/studio/handoff/write-scopes.ts +57 -0
- package/apps/studio/handoff.ts +24 -5
- package/apps/studio/history/changes.ts +199 -0
- package/apps/studio/history/describe-annotations.ts +216 -0
- package/apps/studio/history/describe-css.ts +592 -0
- package/apps/studio/history/describe-match.ts +866 -0
- package/apps/studio/history/describe-meta.ts +281 -0
- package/apps/studio/history/describe-version.ts +89 -0
- package/apps/studio/history/describe-words.ts +513 -0
- package/apps/studio/history/describe.ts +1452 -0
- package/apps/studio/history/last-good.ts +123 -0
- package/apps/studio/history/links.ts +112 -0
- package/apps/studio/history/object-history.ts +535 -0
- package/apps/studio/history/render-ok-signal.ts +81 -0
- package/apps/studio/history/restore-artboard-action.ts +183 -0
- package/apps/studio/history/restore-artboard.ts +607 -0
- package/apps/studio/history/restore-object.ts +168 -0
- package/apps/studio/history/run-label.ts +18 -0
- package/apps/studio/history/surface-requests.ts +115 -0
- package/apps/studio/history/titles.ts +259 -0
- package/apps/studio/history/trash.ts +314 -0
- package/apps/studio/history/version-lanes.ts +115 -0
- package/apps/studio/history/versions.ts +458 -0
- package/apps/studio/hmr-broadcast.ts +55 -1
- package/apps/studio/home/ai.ts +79 -0
- package/apps/studio/home/cli.ts +221 -0
- package/apps/studio/home/cloud.ts +297 -0
- package/apps/studio/home/create-local.ts +164 -0
- package/apps/studio/home/github.ts +99 -0
- package/apps/studio/home/hub.ts +340 -0
- package/apps/studio/home/index-gc.ts +288 -0
- package/apps/studio/home/index-reader.ts +338 -0
- package/apps/studio/home/invite.ts +204 -0
- package/apps/studio/home/main.ts +159 -0
- package/apps/studio/home/pid.ts +12 -0
- package/apps/studio/home/routes.ts +591 -0
- package/apps/studio/home/signin.ts +285 -0
- package/apps/studio/home/user-state.ts +177 -0
- package/apps/studio/home/whats-new.ts +42 -0
- package/apps/studio/http.ts +2589 -947
- package/apps/studio/index/assets-response.ts +34 -0
- package/apps/studio/index/assets.ts +335 -0
- package/apps/studio/index/ds-usage.ts +983 -0
- package/apps/studio/index/extract.ts +348 -0
- package/apps/studio/index/extractors/asset-usage.ts +349 -0
- package/apps/studio/index/extractors/attribution-cache.ts +225 -0
- package/apps/studio/index/history-refs.ts +301 -0
- package/apps/studio/index/history-source.ts +39 -0
- package/apps/studio/index/match.ts +307 -0
- package/apps/studio/index/scan-kick.ts +47 -0
- package/apps/studio/index/service.ts +367 -0
- package/apps/studio/index/snapshot.ts +135 -0
- package/apps/studio/index/types.ts +139 -0
- package/apps/studio/index/version-feed.ts +71 -0
- package/apps/studio/input-router.tsx +522 -55
- package/apps/studio/inspect-canvas.ts +86 -0
- package/apps/studio/inspect-overlay.tsx +192 -0
- package/apps/studio/inspect.ts +96 -33
- package/apps/studio/kinds/convert.ts +175 -0
- package/apps/studio/kinds/export-defaults.ts +42 -0
- package/apps/studio/kinds/meta.ts +237 -0
- package/apps/studio/kinds/physical.ts +84 -0
- package/apps/studio/kinds/presets.ts +452 -0
- package/apps/studio/kinds/print-custom.ts +165 -0
- package/apps/studio/kinds/print-edit.ts +130 -0
- package/apps/studio/kinds/print-guides.ts +23 -0
- package/apps/studio/kinds/safe-zones.ts +250 -0
- package/apps/studio/kinds/warnings.ts +422 -0
- package/apps/studio/layer-name.ts +148 -0
- package/apps/studio/layout/free-space.ts +131 -0
- package/apps/studio/link-chip-overlay.tsx +175 -0
- package/apps/studio/link-import.ts +617 -0
- package/apps/studio/loopback-listen.ts +105 -0
- package/apps/studio/macro-guard.ts +67 -0
- package/apps/studio/managed-projects.ts +63 -14
- package/apps/studio/marquee-overlay.tsx +2 -2
- package/apps/studio/measure-overlay.tsx +10 -4
- package/apps/studio/migrate/cli.ts +164 -0
- package/apps/studio/migrate/ds-registry.ts +42 -0
- package/apps/studio/migrate/engine.ts +926 -0
- package/apps/studio/migrate/hub.ts +219 -0
- package/apps/studio/migrate/steps.ts +627 -0
- package/apps/studio/notifications.tsx +197 -52
- package/apps/studio/outbox/content.ts +139 -0
- package/apps/studio/outbox/drain.ts +269 -0
- package/apps/studio/outbox/hub-reachability.ts +58 -0
- package/apps/studio/outbox/index.ts +57 -0
- package/apps/studio/outbox/policy.ts +859 -0
- package/apps/studio/outbox/senders/export-cloud.ts +116 -0
- package/apps/studio/outbox/store.ts +336 -0
- package/apps/studio/outbox/types.ts +160 -0
- package/apps/studio/participants-chrome.tsx +178 -60
- package/apps/studio/paths.ts +8 -0
- package/apps/studio/photo-store.ts +230 -1
- package/apps/studio/port.ts +93 -0
- package/apps/studio/presence/canvas-presence.tsx +522 -0
- package/apps/studio/presence/fields.ts +93 -0
- package/apps/studio/presence/model.ts +296 -0
- package/apps/studio/presence/tones.ts +39 -0
- package/apps/studio/present/fit.ts +138 -0
- package/apps/studio/present/follow.ts +142 -0
- package/apps/studio/present/media-presence.ts +105 -0
- package/apps/studio/present/meta-schema.ts +612 -0
- package/apps/studio/present/order.ts +153 -0
- package/apps/studio/present/pointer-dot.tsx +379 -0
- package/apps/studio/present/pointer-point.ts +24 -0
- package/apps/studio/present/present-media.ts +446 -0
- package/apps/studio/present/present-stage.tsx +1018 -0
- package/apps/studio/present/present-zoom.ts +63 -0
- package/apps/studio/present/relay-strip.ts +136 -0
- package/apps/studio/preview/preview-camera.tsx +442 -0
- package/apps/studio/preview/wheel-scroll.ts +85 -0
- package/apps/studio/print/units.ts +3 -0
- package/apps/studio/print-overlay-content.tsx +127 -10
- package/apps/studio/read-only-mode.ts +83 -0
- package/apps/studio/readiness.ts +18 -3
- package/apps/studio/ripple.ts +19 -1
- package/apps/studio/routes/agent.ts +1025 -0
- package/apps/studio/routes/ai.ts +422 -0
- package/apps/studio/routes/annotations.ts +649 -0
- package/apps/studio/routes/asset-details.ts +87 -0
- package/apps/studio/routes/asset-rename.ts +60 -0
- package/apps/studio/routes/asset-state.ts +137 -0
- package/apps/studio/routes/asset-trash.ts +77 -0
- package/apps/studio/routes/assets.ts +217 -0
- package/apps/studio/routes/availability.ts +94 -0
- package/apps/studio/routes/canvas-meta-rider.ts +304 -0
- package/apps/studio/routes/canvas-origin.ts +88 -0
- package/apps/studio/routes/canvas-source.ts +315 -0
- package/apps/studio/routes/chat-attach.ts +335 -0
- package/apps/studio/routes/chat.ts +137 -0
- package/apps/studio/routes/cloud-move.ts +364 -0
- package/apps/studio/routes/cloud-plan.ts +36 -0
- package/apps/studio/routes/comments.ts +118 -0
- package/apps/studio/routes/connections.ts +132 -0
- package/apps/studio/routes/describe.ts +122 -0
- package/apps/studio/routes/diagnostics.ts +118 -0
- package/apps/studio/routes/ds-check.ts +124 -0
- package/apps/studio/routes/ds-convert.ts +55 -0
- package/apps/studio/routes/ds-edges.ts +136 -0
- package/apps/studio/routes/ds-library.ts +194 -0
- package/apps/studio/routes/ds-make.ts +91 -0
- package/apps/studio/routes/ds-switch.ts +68 -0
- package/apps/studio/routes/ds-upgrade.ts +139 -0
- package/apps/studio/routes/ds.ts +808 -0
- package/apps/studio/routes/edit.ts +658 -0
- package/apps/studio/routes/element-links.ts +155 -0
- package/apps/studio/routes/export.ts +486 -0
- package/apps/studio/routes/figma.ts +200 -0
- package/apps/studio/routes/generate.ts +443 -0
- package/apps/studio/routes/handoff.ts +319 -0
- package/apps/studio/routes/help-guides.ts +37 -0
- package/apps/studio/routes/history.ts +739 -0
- package/apps/studio/routes/import-link.ts +186 -0
- package/apps/studio/routes/index.ts +293 -0
- package/apps/studio/routes/kinds.ts +257 -0
- package/apps/studio/routes/links.ts +72 -0
- package/apps/studio/routes/outbox.ts +87 -0
- package/apps/studio/routes/photo-every-use.ts +241 -0
- package/apps/studio/routes/pins.ts +66 -0
- package/apps/studio/routes/present.ts +187 -0
- package/apps/studio/routes/project-format.ts +148 -0
- package/apps/studio/routes/project-undo.ts +497 -0
- package/apps/studio/routes/settings.ts +179 -0
- package/apps/studio/routes/share.ts +463 -0
- package/apps/studio/routes/shell.ts +137 -0
- package/apps/studio/routes/sync-conflicts.ts +150 -0
- package/apps/studio/routes/sync.ts +172 -0
- package/apps/studio/routes/table.ts +224 -0
- package/apps/studio/routes/trash.ts +393 -0
- package/apps/studio/routes/video.ts +395 -0
- package/apps/studio/routes/votes.ts +486 -0
- package/apps/studio/safe-zones-overlay.tsx +269 -0
- package/apps/studio/scaffold-design.ts +72 -124
- package/apps/studio/schema/annotations.v2.schema.json +2303 -0
- package/apps/studio/schema/beats.v1.schema.json +94 -0
- package/apps/studio/schema/canvas-meta.v2.schema.json +264 -0
- package/apps/studio/schema/canvas-tsx.md +357 -0
- package/apps/studio/schema/comments.v2.schema.json +125 -0
- package/apps/studio/schema/ds-components-v1.schema.json +96 -0
- package/apps/studio/schema/ds-formats.md +146 -0
- package/apps/studio/schema/ds-head-v1.schema.json +67 -0
- package/apps/studio/schema/ds-revision-v1.schema.json +31 -0
- package/apps/studio/schema/ds-schema-v1.fallbacks.css +118 -0
- package/apps/studio/schema/ds-schema-v1.json +2029 -0
- package/apps/studio/schema/ds-schema-v1.schema.json +663 -0
- package/apps/studio/schema/ds-tokens-v1.schema.json +210 -0
- package/apps/studio/schema/edl.v1.schema.json +124 -0
- package/apps/studio/schema/formats.ts +175 -0
- package/apps/studio/schema/gen.v1.schema.json +33 -0
- package/apps/studio/schema/transcript.v1.schema.json +133 -0
- package/apps/studio/server.ts +454 -166
- package/apps/studio/shell/info-file.ts +54 -0
- package/apps/studio/shell/parent-watch.ts +97 -0
- package/apps/studio/shell/profile.ts +61 -0
- package/apps/studio/shell-canvas-file.ts +36 -0
- package/apps/studio/skip-dirs.ts +455 -0
- package/apps/studio/spoof-chars.ts +17 -0
- package/apps/studio/static-lane.ts +212 -0
- package/apps/studio/sync/accepted-cold-start.ts +35 -13
- package/apps/studio/sync/accepted-link.ts +524 -27
- package/apps/studio/sync/access-notices.ts +143 -0
- package/apps/studio/sync/action-feed.ts +145 -0
- package/apps/studio/sync/action-stage.ts +831 -165
- package/apps/studio/sync/asset-push.ts +24 -2
- package/apps/studio/sync/asset-state.ts +391 -0
- package/apps/studio/sync/atomic-write.ts +42 -1
- package/apps/studio/sync/availability.ts +185 -0
- package/apps/studio/sync/canvas-path.ts +70 -6
- package/apps/studio/sync/cell-pairing.ts +5 -24
- package/apps/studio/sync/comment-door.ts +104 -0
- package/apps/studio/sync/conflict-record.ts +186 -0
- package/apps/studio/sync/create-collision.ts +297 -0
- package/apps/studio/sync/ctl-provider.ts +16 -1
- package/apps/studio/sync/file-ledger.ts +12 -0
- package/apps/studio/sync/file-membership.ts +123 -10
- package/apps/studio/sync/file-plane.ts +195 -12
- package/apps/studio/sync/format-sync.ts +13 -7
- package/apps/studio/sync/history-fields.ts +61 -0
- package/apps/studio/sync/hub-link.ts +24 -4
- package/apps/studio/sync/hub-text-undo.ts +178 -0
- package/apps/studio/sync/hubs-config.ts +122 -20
- package/apps/studio/sync/index.ts +1499 -128
- package/apps/studio/sync/journal-client.ts +56 -0
- package/apps/studio/sync/keep-both.ts +187 -0
- package/apps/studio/sync/link-consent.ts +390 -0
- package/apps/studio/sync/local-kernel.ts +2725 -0
- package/apps/studio/sync/media-gate.ts +97 -0
- package/apps/studio/sync/object-conflict.ts +199 -0
- package/apps/studio/sync/poke.ts +50 -0
- package/apps/studio/sync/presentation.ts +20 -2
- package/apps/studio/sync/project-config-push.ts +5 -2
- package/apps/studio/sync/projection.ts +208 -34
- package/apps/studio/sync/resync-trace.ts +220 -0
- package/apps/studio/sync/retry-after.ts +27 -0
- package/apps/studio/sync/status.ts +16 -1
- package/apps/studio/sync/supervisor.ts +20 -2
- package/apps/studio/sync/transaction-client.ts +364 -34
- package/apps/studio/sync/trash-clear-copies.ts +120 -0
- package/apps/studio/sync/trash-watch.ts +157 -0
- package/apps/studio/sync/trash.ts +50 -2
- package/apps/studio/sync/undo-target.ts +110 -0
- package/apps/studio/sync/workspace-signin.ts +14 -3
- package/apps/studio/sync/write-hold.ts +238 -0
- package/apps/studio/sync/writer-registry.ts +380 -5
- package/apps/studio/sync-name-key.ts +59 -0
- package/apps/studio/thumbs/keys.ts +147 -0
- package/apps/studio/thumbs/routes.ts +68 -0
- package/apps/studio/thumbs/service.ts +884 -0
- package/apps/studio/thumbs/store.ts +114 -0
- package/apps/studio/thumbs/validate.ts +62 -0
- package/apps/studio/tool-palette.tsx +782 -563
- package/apps/studio/toolbars/marker-tip.ts +22 -0
- package/apps/studio/toolbars/shell-panels.ts +55 -0
- package/apps/studio/toolbars/tool-panel.ts +89 -0
- package/apps/studio/toolbars/toolbar-css.ts +283 -0
- package/apps/studio/toolbars/toolbar-icons.tsx +135 -0
- package/apps/studio/toolbars/toolbar-rect.ts +82 -0
- package/apps/studio/ui-prefs-migrate.ts +467 -0
- package/apps/studio/ui-prefs.ts +305 -3
- package/apps/studio/undo-stack.ts +10 -0
- package/apps/studio/use-annotation-resize.tsx +23 -17
- package/apps/studio/use-artboard-drag.tsx +156 -15
- package/apps/studio/use-canvas-keys.ts +58 -0
- package/apps/studio/use-chrome-visibility.tsx +13 -0
- package/apps/studio/use-collab.tsx +556 -56
- package/apps/studio/use-element-resize.tsx +13 -9
- package/apps/studio/use-governed-mode.ts +23 -0
- package/apps/studio/use-keyboard-discipline.tsx +114 -49
- package/apps/studio/use-selection-set.tsx +110 -9
- package/apps/studio/use-snap-guides.tsx +74 -5
- package/apps/studio/use-spacing-handles.tsx +90 -27
- package/apps/studio/use-tool-mode.tsx +204 -10
- package/apps/studio/use-undo-stack.tsx +19 -23
- package/apps/studio/video/beats.ts +484 -0
- package/apps/studio/video/decode-webaudio.ts +115 -0
- package/apps/studio/video/decode.ts +288 -0
- package/apps/studio/video/derive.ts +647 -0
- package/apps/studio/video/format-ids.ts +158 -0
- package/apps/studio/video/framing.ts +246 -0
- package/apps/studio/video/inject.ts +324 -0
- package/apps/studio/video/keyframes.ts +356 -0
- package/apps/studio/video/link-groups.ts +40 -0
- package/apps/studio/video/linked-formats.ts +142 -0
- package/apps/studio/video/mask-comments.ts +36 -0
- package/apps/studio/video/media-analysis.ts +169 -0
- package/apps/studio/video/reel-place.ts +286 -0
- package/apps/studio/video/reframe-read.ts +90 -0
- package/apps/studio/video/schema.ts +422 -0
- package/apps/studio/video/speech.ts +129 -0
- package/apps/studio/video/title-motion.ts +85 -0
- package/apps/studio/video/transcript-cut.ts +91 -0
- package/apps/studio/video/whisper-parse.ts +123 -0
- package/apps/studio/video/words-run.ts +210 -0
- package/apps/studio/video/words-timing.ts +222 -0
- package/apps/studio/video-comp.tsx +238 -9
- package/apps/studio/video-links-overlay.tsx +272 -0
- package/apps/studio/video-natural.ts +73 -0
- package/apps/studio/video-play-chrome.tsx +229 -0
- package/apps/studio/video-play-overlay.tsx +190 -0
- package/apps/studio/video-vocab.tsx +460 -0
- package/apps/studio/view-only-gesture.tsx +101 -0
- package/apps/studio/viewport-fit.ts +28 -0
- package/apps/studio/web-overlay-content.tsx +4 -2
- package/apps/studio/whats-new.json +100 -20
- package/apps/studio/whats-new.schema.json +10 -0
- package/apps/studio/whats-new.ts +4 -0
- package/apps/studio/workspace-mode.ts +10 -0
- package/apps/studio/ws.ts +299 -8
- package/cli/bin/maude.mjs +1 -0
- package/cli/commands/design.mjs +401 -72
- package/cli/commands/flow.mjs +12 -1
- package/cli/commands/help.mjs +8 -0
- package/cli/commands/migrate.mjs +55 -0
- package/cli/lib/bash-guard.mjs +1691 -0
- package/cli/lib/confine-out.mjs +150 -0
- package/cli/lib/confine-read.mjs +179 -0
- package/cli/lib/confine-root.mjs +157 -0
- package/cli/lib/design-help.gen.mjs +119 -0
- package/cli/lib/design-hook.mjs +1764 -0
- package/cli/lib/design-link.mjs +68 -4
- package/cli/lib/design-open.mjs +238 -0
- package/cli/lib/export-spec.mjs +394 -0
- package/cli/lib/finding-text.mjs +63 -0
- package/cli/lib/flow-usage.mjs +6 -10
- package/cli/lib/gitignore-block.mjs +1 -0
- package/cli/lib/handoff.mjs +285 -0
- package/cli/lib/handoff.schema.json +336 -0
- package/cli/lib/hubs-config.mjs +10 -0
- package/cli/lib/json-schema-lite.mjs +260 -0
- package/cli/lib/project-links.mjs +88 -0
- package/cli/lib/studio-locate.mjs +83 -0
- package/cli/lib/sub-verbs.mjs +111 -0
- package/cli/lib/workspace-plan.mjs +16 -3
- package/package.json +29 -10
- package/plugins/design/README.md +46 -0
- package/plugins/design/templates/_shell.html +749 -69
- package/plugins/design/templates/blank-canvas.tsx.template +26 -0
- package/plugins/design/templates/brief-board.tsx.template +12 -11
- package/plugins/design/templates/canvas.tsx.template +3 -3
- package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +104 -0
- package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +38 -3
- package/plugins/design/templates/design-system-inspiration/core/components.json.tpl +127 -0
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +1 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/_components.css.tpl +111 -0
- package/plugins/flow/.claude-plugin/config.schema.json +6 -1
- package/apps/studio/annotations/ui/edit-actions.ts +0 -551
- package/apps/studio/canvas-header.ts +0 -165
- package/apps/studio/client/hmr.mjs +0 -113
- package/apps/studio/client/hooks/use-keyboard-shortcuts.jsx +0 -297
- package/apps/studio/client/iframe-lazy.mjs +0 -121
- package/apps/studio/client/inspector/artboard-knobs.jsx +0 -456
- package/apps/studio/client/menus/menubar.jsx +0 -856
- package/apps/studio/client/panels/CapabilityBar.jsx +0 -101
- package/apps/studio/client/panels/ClipInspector.jsx +0 -409
- package/apps/studio/client/panels/GitPanel.jsx +0 -1026
- package/apps/studio/client/panels/OnboardingWizard.jsx +0 -642
- package/apps/studio/client/panels/StickerPicker.jsx +0 -160
- package/apps/studio/client/panels/SyncPanel.jsx +0 -1190
- package/apps/studio/client/panels/TimelinePanel.jsx +0 -2259
- package/apps/studio/client/share-dialog.jsx +0 -91
- package/apps/studio/client/shell/collapsed-rail.jsx +0 -23
- package/apps/studio/client/shell/status-bar.jsx +0 -215
- package/apps/studio/client/styles/1-tokens-maude.css +0 -296
- package/apps/studio/client/styles/1-tokens.css +0 -304
- package/apps/studio/client/styles/3-shell-maude.css +0 -3158
- package/apps/studio/client/styles/3-shell.css +0 -1036
- package/apps/studio/client/styles/4-components-maude.css +0 -134
- package/apps/studio/client/styles/4-components.css +0 -2204
- package/apps/studio/client/styles/5-maude-overrides.css +0 -162
- package/apps/studio/client/styles.css +0 -1264
- package/apps/studio/contextual-toolbar.tsx +0 -512
- package/apps/studio/export-dialog.tsx +0 -827
- package/apps/studio/undo-hud.tsx +0 -16
|
@@ -10,147 +10,56 @@
|
|
|
10
10
|
//
|
|
11
11
|
// Native-app only — app.jsx mounts this gated on isNativeApp().
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
ActionBarPrimitive,
|
|
17
|
-
AssistantRuntimeProvider,
|
|
18
|
-
ComposerPrimitive,
|
|
19
|
-
MessagePrimitive,
|
|
20
|
-
ThreadPrimitive,
|
|
21
|
-
useComposer,
|
|
22
|
-
useComposerRuntime,
|
|
23
|
-
useLocalRuntime,
|
|
24
|
-
useMessage,
|
|
25
|
-
useThread,
|
|
26
|
-
} from '@assistant-ui/react';
|
|
15
|
+
import { AssistantRuntimeProvider, ThreadPrimitive, useLocalRuntime } from '@assistant-ui/react';
|
|
27
16
|
|
|
28
17
|
import {
|
|
29
18
|
flattenSelectOptions,
|
|
30
|
-
modeBlocksEdits,
|
|
31
19
|
parseConfigOptions,
|
|
32
20
|
resolvePersistedPick,
|
|
33
21
|
} from './acp-capabilities.js';
|
|
34
22
|
import { parseUsage } from './acp-usage.js';
|
|
35
23
|
import {
|
|
36
|
-
activityLabel,
|
|
37
24
|
attachmentName,
|
|
38
25
|
createAcpConnection,
|
|
39
|
-
designImageRefs,
|
|
40
|
-
extractAttachmentRefs,
|
|
41
26
|
lastUserText,
|
|
42
27
|
makeAcpAdapter,
|
|
43
28
|
} from './acp-runtime.js';
|
|
44
|
-
import {
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
import {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
normalizeName,
|
|
55
|
-
STATIC_COMMANDS,
|
|
56
|
-
} from './slash-commands.js';
|
|
57
|
-
import ToolGroup, { groupToolCalls } from './ToolGroup.jsx';
|
|
29
|
+
import { ChatHeader } from './chat-header.jsx';
|
|
30
|
+
import { StIcon } from '../shell/icons.jsx';
|
|
31
|
+
import { menuCtx } from '../v2/shell/project-menu-model.js';
|
|
32
|
+
import { ChatAdvanced, SuggestOnlyBanner } from '../v2/ai/Advanced.jsx';
|
|
33
|
+
import { AiChatIsland } from '../v2/ai/AiChatIsland.jsx';
|
|
34
|
+
import { JumpToLatest, PinButtonHost } from '../v2/ai/BigChat.jsx';
|
|
35
|
+
import { ChatList } from '../v2/ai/ChatList.jsx';
|
|
36
|
+
import { DropOverlay } from '../v2/ai/DropOverlay.jsx';
|
|
37
|
+
import { Composer } from '../v2/ai/Composer.jsx';
|
|
38
|
+
import { sendToAskAI } from '../v2/search/search-env.js';
|
|
58
39
|
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/>
|
|
83
|
-
</svg>
|
|
84
|
-
);
|
|
85
|
-
const Close = ({ size = 14 }) => (
|
|
86
|
-
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
87
|
-
<path
|
|
88
|
-
d="M4 4l8 8M12 4l-8 8"
|
|
89
|
-
stroke="currentColor"
|
|
90
|
-
strokeWidth="1.5"
|
|
91
|
-
strokeLinecap="round"
|
|
92
|
-
/>
|
|
93
|
-
</svg>
|
|
94
|
-
);
|
|
95
|
-
const SendArrow = ({ size = 16 }) => (
|
|
96
|
-
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
97
|
-
<path
|
|
98
|
-
d="M8 12.5V4.2M4.4 7.6 8 4l3.6 3.6"
|
|
99
|
-
stroke="currentColor"
|
|
100
|
-
strokeWidth="2.1"
|
|
101
|
-
strokeLinecap="round"
|
|
102
|
-
strokeLinejoin="round"
|
|
103
|
-
/>
|
|
104
|
-
</svg>
|
|
105
|
-
);
|
|
106
|
-
// Per-message action icons (Task C2).
|
|
107
|
-
const Copy = ({ size = 14 }) => (
|
|
108
|
-
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
109
|
-
<rect x="5.5" y="5.5" width="8" height="8" rx="1.3" stroke="currentColor" strokeWidth="1.4" />
|
|
110
|
-
<path
|
|
111
|
-
d="M10.5 5.5V3.8A1.3 1.3 0 0 0 9.2 2.5H3.8A1.3 1.3 0 0 0 2.5 3.8v5.4a1.3 1.3 0 0 0 1.3 1.3h1.7"
|
|
112
|
-
stroke="currentColor"
|
|
113
|
-
strokeWidth="1.4"
|
|
114
|
-
strokeLinecap="round"
|
|
115
|
-
strokeLinejoin="round"
|
|
116
|
-
/>
|
|
117
|
-
</svg>
|
|
118
|
-
);
|
|
119
|
-
const Retry = ({ size = 14 }) => (
|
|
120
|
-
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
121
|
-
<path
|
|
122
|
-
d="M13 8A5 5 0 1 1 11.3 4.3M13 2.5v3.2h-3.2"
|
|
123
|
-
stroke="currentColor"
|
|
124
|
-
strokeWidth="1.4"
|
|
125
|
-
strokeLinecap="round"
|
|
126
|
-
strokeLinejoin="round"
|
|
127
|
-
/>
|
|
128
|
-
</svg>
|
|
129
|
-
);
|
|
130
|
-
// Token swatches — reads as "design system"; used on the empty-state DS CTA.
|
|
131
|
-
const Swatches = ({ size = 15 }) => (
|
|
132
|
-
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
133
|
-
<rect x="2" y="2" width="5" height="5" rx="1" fill="currentColor" />
|
|
134
|
-
<rect x="9" y="2" width="5" height="5" rx="1" fill="currentColor" opacity="0.55" />
|
|
135
|
-
<rect x="2" y="9" width="5" height="5" rx="1" fill="currentColor" opacity="0.55" />
|
|
136
|
-
<rect x="9" y="9" width="5" height="5" rx="1" fill="currentColor" opacity="0.3" />
|
|
137
|
-
</svg>
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
// Persistent quick-action verbs (prefill the composer; never fire blind). The
|
|
141
|
-
// one-time `/design:setup-ds` is offered contextually in the empty state, not here.
|
|
142
|
-
const QUICK_ACTIONS = [
|
|
143
|
-
{ label: '/design:edit', prompt: '/design:edit ' },
|
|
144
|
-
{ label: '/design:new', prompt: '/design:new ' },
|
|
145
|
-
{ label: '/design:critic', prompt: '/design:critic' },
|
|
146
|
-
{ label: '/design:screenshot', prompt: '/design:screenshot' },
|
|
147
|
-
];
|
|
148
|
-
|
|
149
|
-
const SUGGESTIONS = [
|
|
150
|
-
'/design:edit make the primary button more prominent',
|
|
151
|
-
'/design:critic',
|
|
152
|
-
'/design:new Pricing "a 3-tier pricing page"',
|
|
153
|
-
];
|
|
40
|
+
AssistantMessage,
|
|
41
|
+
ChatLightbox,
|
|
42
|
+
ChatMediaContext,
|
|
43
|
+
ContinuationBubble,
|
|
44
|
+
UserMessage,
|
|
45
|
+
} from '../v2/ai/Feed.jsx';
|
|
46
|
+
import { RunSurface } from '../v2/ai/RunSurface.jsx';
|
|
47
|
+
import { useChatRuns } from '../v2/ai/use-chat-runs.js';
|
|
48
|
+
import { cleanChatTitle, runTitleFor, shownChatTitle } from '../v2/ai/chat-list-model.js';
|
|
49
|
+
import { useAiRuns } from '../v2/ai/runs-store.js';
|
|
50
|
+
import { fetchChatRuns, undoNote, undoRun } from '../v2/ai/run-api.js';
|
|
51
|
+
import { RunsCount } from '../v2/ai/RunList.jsx';
|
|
52
|
+
import NeedsYouSlot from '../v2/ai/NeedsYouSlot.jsx';
|
|
53
|
+
import { QuotaLine } from '../v2/ai/NotReady.jsx';
|
|
54
|
+
import { doneNotice, OPEN_AI_EVENT, openAiChat } from '../v2/ai/needs-you-toast.js';
|
|
55
|
+
import { StoppedDivider } from '../v2/ai/StoppedDivider.jsx';
|
|
56
|
+
import { ChatEmpty, SuggestStrip } from '../v2/ai/Suggest.jsx';
|
|
57
|
+
import { readSuggestPref, writeSuggestPref } from '../v2/ai/suggest-why.js';
|
|
58
|
+
import { useAiScope } from '../v2/ai/use-ai-scope.js';
|
|
59
|
+
import { WaitingCards } from '../v2/ai/WaitingCard.jsx';
|
|
60
|
+
import { useAttachments } from '../v2/ai/use-attachments.js';
|
|
61
|
+
import { notify } from '../../notifications.tsx';
|
|
62
|
+
import { DEFAULT_TRANSCRIPT_VIEW, TRANSCRIPT_VIEWS } from './transcript-view.js';
|
|
154
63
|
|
|
155
64
|
// DDR-185 — shared "did a genuinely new item arrive" check for the
|
|
156
65
|
// permission/elicitation effects below: both need the identical shape (diff
|
|
@@ -205,1269 +114,13 @@ function savePersistedPicks(picks) {
|
|
|
205
114
|
safeStorageSet(PICKS_KEY, JSON.stringify(picks));
|
|
206
115
|
}
|
|
207
116
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
const file = path.split('/').pop() || path;
|
|
211
|
-
return file.replace(/\.(tsx|html)$/i, '');
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Composer footer note (Task B3) — tells the user whether the CURRENT mode
|
|
215
|
-
// will interrupt them for a permission decision. `bypassPermissions`/
|
|
216
|
-
// `dontAsk` never call requestPermission at all (adapter short-circuits); every
|
|
217
|
-
// other mode does. Sourced from the mode's own id — never a hardcoded label
|
|
218
|
-
// beyond this yes/no framing, since the mode SET itself is fully dynamic.
|
|
219
|
-
const NO_PROMPT_MODE_IDS = new Set(['bypassPermissions', 'dontAsk']);
|
|
220
|
-
function modeFootnote(modes) {
|
|
221
|
-
if (!modes?.currentModeId || !modes.availableModes?.length) return null;
|
|
222
|
-
const current = modes.availableModes.find((m) => m.id === modes.currentModeId);
|
|
223
|
-
const name = current?.name || modes.currentModeId;
|
|
224
|
-
return NO_PROMPT_MODE_IDS.has(modes.currentModeId) ? `${name} — no prompts` : `${name} — you'll be asked`;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// The loud, top-of-thread alert shown ONLY while the current mode blocks edits
|
|
228
|
-
// (`modeBlocksEdits`, DDR-184 #3 — the quiet composer footnote above isn't enough
|
|
229
|
-
// when a user typing "change X" silently gets nothing back).
|
|
230
|
-
// Offers a one-click hop to the least-privilege mode that CAN edit (Accept Edits
|
|
231
|
-
// if advertised, else Manual) so the fix is right there, not buried in the picker.
|
|
232
|
-
function ModeBanner({ modes, onSetMode }) {
|
|
233
|
-
if (!modeBlocksEdits(modes)) return null;
|
|
234
|
-
const current = modes.availableModes.find((m) => m.id === modes.currentModeId);
|
|
235
|
-
const name = current?.name || modes.currentModeId;
|
|
236
|
-
const isPlan = modes.currentModeId === 'plan';
|
|
237
|
-
const ids = new Set(modes.availableModes.map((m) => m.id));
|
|
238
|
-
const target = ids.has('acceptEdits') ? 'acceptEdits' : ids.has('default') ? 'default' : null;
|
|
239
|
-
const targetName = target && (modes.availableModes.find((m) => m.id === target)?.name || target);
|
|
240
|
-
return (
|
|
241
|
-
<div className="chat-mode-banner" role="alert" data-testid="chat-mode-banner">
|
|
242
|
-
<span className="chat-mode-banner-icon" aria-hidden="true">⏸</span>
|
|
243
|
-
<span className="chat-mode-banner-text">
|
|
244
|
-
<b>{name}</b>{' — '}
|
|
245
|
-
{isPlan
|
|
246
|
-
? "Claude is planning and won't edit files or run tools."
|
|
247
|
-
: 'edits and tools without a standing approval are denied — nothing will change.'}
|
|
248
|
-
</span>
|
|
249
|
-
{target ? (
|
|
250
|
-
<button
|
|
251
|
-
type="button"
|
|
252
|
-
className="chat-mode-banner-cta"
|
|
253
|
-
onClick={() => onSetMode(target)}
|
|
254
|
-
data-testid="chat-mode-banner-switch"
|
|
255
|
-
>
|
|
256
|
-
Switch to {targetName}
|
|
257
|
-
</button>
|
|
258
|
-
) : null}
|
|
259
|
-
</div>
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// ── pasted-path / URL → inline chip (Claude-Code-style attachment badge) ──
|
|
264
|
-
// When the whole clipboard is a single path or URL, we collapse it to a short
|
|
265
|
-
// literal token ([image-1] / [file-1] / [link-1]) in the textarea and stash the
|
|
266
|
-
// real value in a per-chat map. The token is the actual text the caret sees, so
|
|
267
|
-
// the mirror can style it as a chip WITHOUT desyncing (chip text === token text),
|
|
268
|
-
// and the adapter expands it back to the real path before sending to Claude.
|
|
269
|
-
const CHIP_RE = /\[(?:image|file|link)-\d+\]/g;
|
|
270
|
-
const IMAGE_EXT_RE = /\.(?:png|jpe?g|gif|webp|svg|avif|bmp|heic|heif|ico|tiff?)$/i;
|
|
271
|
-
|
|
272
|
-
// Classify a raw clipboard string. Returns { kind, value } only when the trimmed
|
|
273
|
-
// paste is a SINGLE path/URL token (no internal whitespace) — pasting prose that
|
|
274
|
-
// merely contains a link is left as a normal paste. Paths with spaces fall through
|
|
275
|
-
// (kept as plain text) in this first cut.
|
|
276
|
-
function classifyPaste(raw) {
|
|
277
|
-
const s = (raw || '').trim();
|
|
278
|
-
if (!s || /\s/.test(s)) return null;
|
|
279
|
-
const isUrl = /^(?:https?|ftp):\/\/[^\s]+$/i.test(s);
|
|
280
|
-
const isWinPath = /^[a-zA-Z]:\\[^\s]+$/.test(s);
|
|
281
|
-
const isAnchoredPath = /^(?:~|\.{0,2})\/[^\s]+$/.test(s); // /a, ~/a, ./a, ../a
|
|
282
|
-
const looksLikeFile = s.includes('/') && /\.[a-z0-9]{1,8}$/i.test(s); // folder/file.ext
|
|
283
|
-
if (!isUrl && !isWinPath && !isAnchoredPath && !looksLikeFile) return null;
|
|
284
|
-
const bare = s.split(/[?#]/)[0]; // strip URL query/hash before the extension test
|
|
285
|
-
const kind = IMAGE_EXT_RE.test(bare) ? 'image' : isUrl ? 'link' : 'file';
|
|
286
|
-
return { kind, value: s };
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// Next free index for a chip kind, scanning existing tokens so deletes renumber
|
|
290
|
-
// back down (paste after clearing → [image-1] again, not [image-3]).
|
|
291
|
-
function nextChipIndex(text, kind) {
|
|
292
|
-
const re = new RegExp(`\\[${kind}-(\\d+)\\]`, 'g');
|
|
293
|
-
let max = 0;
|
|
294
|
-
let m;
|
|
295
|
-
while ((m = re.exec(text || ''))) max = Math.max(max, parseInt(m[1], 10));
|
|
296
|
-
return max + 1;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// Tokenize a string, wrapping [image|file|link-N] tokens in chip spans. Preserves
|
|
300
|
-
// every character verbatim (used both in the mirror overlay and the sent-message
|
|
301
|
-
// bubble), so it is safe over the caret-critical mirror.
|
|
302
|
-
function chipNodes(text, keyPrefix = 'chip') {
|
|
303
|
-
const nodes = [];
|
|
304
|
-
let last = 0;
|
|
305
|
-
let m;
|
|
306
|
-
let k = 0;
|
|
307
|
-
CHIP_RE.lastIndex = 0;
|
|
308
|
-
while ((m = CHIP_RE.exec(text))) {
|
|
309
|
-
if (m.index > last) nodes.push(text.slice(last, m.index));
|
|
310
|
-
nodes.push(
|
|
311
|
-
<span className="chat-paste-chip" key={`${keyPrefix}-${k++}`}>
|
|
312
|
-
{m[0]}
|
|
313
|
-
</span>
|
|
314
|
-
);
|
|
315
|
-
last = m.index + m[0].length;
|
|
316
|
-
}
|
|
317
|
-
if (last < text.length) nodes.push(text.slice(last));
|
|
318
|
-
return nodes;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// First image File on the clipboard — a raw screenshot / copied image arrives as
|
|
322
|
-
// bytes with no path (files, or items via getAsFile on some engines).
|
|
323
|
-
function clipboardImageFile(cd) {
|
|
324
|
-
const files = cd?.files ? Array.from(cd.files) : [];
|
|
325
|
-
const fromFiles = files.find((f) => f.type && f.type.startsWith('image/'));
|
|
326
|
-
if (fromFiles) return fromFiles;
|
|
327
|
-
const items = cd?.items ? Array.from(cd.items) : [];
|
|
328
|
-
for (const it of items) {
|
|
329
|
-
if (it.kind === 'file' && it.type && it.type.startsWith('image/')) {
|
|
330
|
-
const f = it.getAsFile();
|
|
331
|
-
if (f) return f;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
return null;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Insert `chip` at the textarea caret, keeping the undo stack + assistant-ui's
|
|
338
|
-
// controlled value in sync. execCommand is a real user-edit (caret follows); the
|
|
339
|
-
// manual splice is the fallback where execCommand('insertText') is unavailable.
|
|
340
|
-
function insertChipAtCaret(ta, chip) {
|
|
341
|
-
if (document.execCommand && document.execCommand('insertText', false, chip)) return;
|
|
342
|
-
const start = ta.selectionStart ?? ta.value.length;
|
|
343
|
-
const end = ta.selectionEnd ?? start;
|
|
344
|
-
const next = ta.value.slice(0, start) + chip + ta.value.slice(end);
|
|
345
|
-
const setter = Object.getOwnPropertyDescriptor(
|
|
346
|
-
window.HTMLTextAreaElement.prototype,
|
|
347
|
-
'value'
|
|
348
|
-
)?.set;
|
|
349
|
-
setter?.call(ta, next);
|
|
350
|
-
ta.dispatchEvent(new Event('input', { bubbles: true }));
|
|
351
|
-
const pos = start + chip.length;
|
|
352
|
-
ta.setSelectionRange(pos, pos);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
// POST raw image bytes to the dev-server, which writes them under the runtime
|
|
356
|
-
// _chat/attachments/ and returns the absolute path Claude will Read on send.
|
|
357
|
-
async function uploadChatImage(file) {
|
|
358
|
-
const buf = await file.arrayBuffer();
|
|
359
|
-
const res = await fetch('/_api/acp/attachment', {
|
|
360
|
-
method: 'POST',
|
|
361
|
-
headers: { 'Content-Type': file.type || 'application/octet-stream' },
|
|
362
|
-
body: buf,
|
|
363
|
-
});
|
|
364
|
-
if (!res.ok) return null;
|
|
365
|
-
const data = await res.json().catch(() => null);
|
|
366
|
-
return (data && data.path) || null;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
// ── message-part renderers ──
|
|
370
|
-
// Assistant text: markdown, plus a thumbnail strip for any designRoot image
|
|
371
|
-
// path the agent mentioned (e.g. "/design:screenshot → Saved to: .design/…png"
|
|
372
|
-
// — DDR-145). The path stays visible in the text; the strip adds the preview.
|
|
373
|
-
function ChatText({ text }) {
|
|
374
|
-
const media = useContext(ChatMediaContext);
|
|
375
|
-
const refs = designImageRefs(text, media?.designRel);
|
|
376
|
-
return (
|
|
377
|
-
<div className="chat-bubble">
|
|
378
|
-
<Markdown text={text} />
|
|
379
|
-
{refs.length ? (
|
|
380
|
-
<div className="chat-thumbrow">
|
|
381
|
-
{refs.map((src) => {
|
|
382
|
-
const file = src.split('/').pop();
|
|
383
|
-
return <ChatThumb key={src} src={src} label={`Open ${file}`} caption={file} />;
|
|
384
|
-
})}
|
|
385
|
-
</div>
|
|
386
|
-
) : null}
|
|
387
|
-
</div>
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
function ChatReasoning({ text }) {
|
|
392
|
-
return (
|
|
393
|
-
<details className="chat-think">
|
|
394
|
-
<summary className="chat-think-sum">
|
|
395
|
-
<span className="chat-think-spark">
|
|
396
|
-
<Spark size={11} />
|
|
397
|
-
</span>
|
|
398
|
-
Thinking
|
|
399
|
-
</summary>
|
|
400
|
-
<div className="chat-think-body">
|
|
401
|
-
<Markdown text={text} />
|
|
402
|
-
</div>
|
|
403
|
-
</details>
|
|
404
|
-
);
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// Bounded JSON preview for the verbose transcript view (Task C4) — a raw tool
|
|
408
|
-
// arg/result can be arbitrarily large (a big file's content, a long stdout);
|
|
409
|
-
// cap it so one tool call can't blow up the feed's layout or paint cost.
|
|
410
|
-
function jsonPreview(value, cap = 800) {
|
|
411
|
-
let s;
|
|
412
|
-
try {
|
|
413
|
-
s = typeof value === 'string' ? value : JSON.stringify(value, null, 2);
|
|
414
|
-
} catch {
|
|
415
|
-
return null;
|
|
416
|
-
}
|
|
417
|
-
// An empty object/array/string preview ("{}", "[]", '""') is noise, not
|
|
418
|
-
// information — a tool that legitimately took no args or returned nothing
|
|
419
|
-
// shouldn't render a boxed detail block just to say so.
|
|
420
|
-
if (!s || s === '{}' || s === '[]' || s === '""' || s === 'null') return null;
|
|
421
|
-
return s.length > cap ? `${s.slice(0, cap)}…` : s;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// `flat` (Task C1 revision, after dogfooding showed grouped tool calls
|
|
425
|
-
// rendering as nested bordered cards inside a bordered card — "divné") skips
|
|
426
|
-
// the standalone `.chat-tool` card chrome for a lighter row, used only when
|
|
427
|
-
// ChatToolCard renders inside ToolGroup's already-bordered accordion body.
|
|
428
|
-
function ChatToolCard({ toolName, args, result, isError, verbose, flat = false }) {
|
|
429
|
-
const running = result === undefined;
|
|
430
|
-
const path =
|
|
431
|
-
args && typeof args === 'object' ? args.path || args.file || args.filePath : undefined;
|
|
432
|
-
const argsPreview = verbose && args && typeof args === 'object' && Object.keys(args).length
|
|
433
|
-
? jsonPreview(args)
|
|
434
|
-
: null;
|
|
435
|
-
const resultPreview = verbose && !running && result != null ? jsonPreview(result) : null;
|
|
436
|
-
const statusLabel = running ? 'running…' : isError ? 'failed' : 'done';
|
|
437
|
-
|
|
438
|
-
if (flat) {
|
|
439
|
-
return (
|
|
440
|
-
<div className="chat-tool-row" data-testid="chat-tool-row">
|
|
441
|
-
<div className="chat-tool-row-main">
|
|
442
|
-
<span
|
|
443
|
-
className={`chat-tool-dot ${running ? 'chat-tool-dot--run' : 'chat-tool-dot--done'}`}
|
|
444
|
-
/>
|
|
445
|
-
<b>{toolName}</b>
|
|
446
|
-
{path ? <span className="chat-tool-path">{String(path).split('/').pop()}</span> : null}
|
|
447
|
-
<span className={`chat-tool-row-status${isError ? ' del' : ''}`}>{statusLabel}</span>
|
|
448
|
-
</div>
|
|
449
|
-
{argsPreview ? <pre className="chat-tool-detail">{argsPreview}</pre> : null}
|
|
450
|
-
{resultPreview ? <pre className="chat-tool-detail">{resultPreview}</pre> : null}
|
|
451
|
-
</div>
|
|
452
|
-
);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
return (
|
|
456
|
-
<div className="chat-tool">
|
|
457
|
-
<div className="chat-tool-hd">
|
|
458
|
-
<b>{toolName}</b>
|
|
459
|
-
{path ? <span className="chat-tool-path">{String(path).split('/').pop()}</span> : null}
|
|
460
|
-
<span
|
|
461
|
-
className={`chat-tool-dot ${running ? 'chat-tool-dot--run' : 'chat-tool-dot--done'}`}
|
|
462
|
-
/>
|
|
463
|
-
</div>
|
|
464
|
-
{!running ? (
|
|
465
|
-
<div className="chat-tool-body">
|
|
466
|
-
<div className={`chat-tool-line${isError ? ' del' : ''}`}>
|
|
467
|
-
{isError ? 'failed' : 'done'}
|
|
468
|
-
</div>
|
|
469
|
-
{argsPreview ? <pre className="chat-tool-detail">{argsPreview}</pre> : null}
|
|
470
|
-
{resultPreview ? <pre className="chat-tool-detail">{resultPreview}</pre> : null}
|
|
471
|
-
</div>
|
|
472
|
-
) : null}
|
|
473
|
-
</div>
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// ── chat media (image thumbnails + lightbox) ──
|
|
478
|
-
// Per-thread context so deeply-nested bubbles reach the single lightbox + the
|
|
479
|
-
// paste-attachments map without prop-drilling through assistant-ui's renderers.
|
|
480
|
-
// `chipName(token)` resolves a live chip ([image-1]) to its content-addressed
|
|
481
|
-
// name via the per-chat map; `openLightbox(src)` opens the one overlay.
|
|
482
|
-
const ChatMediaContext = createContext(null);
|
|
117
|
+
// The suggest-only banner (DDR-184 #3, 03 `ai-adv-edges`) lives with the Advanced fold now:
|
|
118
|
+
// v2/ai/Advanced.jsx `SuggestOnlyBanner` — same testids, plain words, one verb ("Allow changes").
|
|
483
119
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
// Thumbnail — a real focusable button (Enter/Space open) wrapping the served
|
|
489
|
-
// image; clicking opens the shared lightbox. `src` is always one of our own
|
|
490
|
-
// same-origin serve lanes (attachment route or designRoot static).
|
|
491
|
-
//
|
|
492
|
-
// `caption` marks a REFERENCED path (an image an assistant message merely named,
|
|
493
|
-
// DDR-145) as distinct from first-class user/agent media — it prints the
|
|
494
|
-
// filename under the thumb so an injected assistant can't fully borrow the
|
|
495
|
-
// feed's authority by rendering an arbitrary designRoot image as if it produced
|
|
496
|
-
// it (attacker F2). Pasted-image thumbs pass no caption.
|
|
497
|
-
function ChatThumb({ src, label = 'Open image', caption }) {
|
|
498
|
-
const media = useContext(ChatMediaContext);
|
|
499
|
-
const btn = (
|
|
500
|
-
<button
|
|
501
|
-
type="button"
|
|
502
|
-
className="chat-thumb-btn"
|
|
503
|
-
aria-label={label}
|
|
504
|
-
onClick={() => media?.openLightbox(src)}
|
|
505
|
-
>
|
|
506
|
-
<img className="chat-thumb" src={src} alt="" loading="lazy" />
|
|
507
|
-
</button>
|
|
508
|
-
);
|
|
509
|
-
if (!caption) return btn;
|
|
510
|
-
return (
|
|
511
|
-
<figure className="chat-thumb-fig">
|
|
512
|
-
{btn}
|
|
513
|
-
<figcaption className="chat-thumb-cap" title={caption}>
|
|
514
|
-
{caption}
|
|
515
|
-
</figcaption>
|
|
516
|
-
</figure>
|
|
517
|
-
);
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
// One live-bubble chip: an image chip whose upload has resolved renders as a
|
|
521
|
-
// thumbnail; file/link chips (and a still-pending image upload) keep the text
|
|
522
|
-
// badge. The map entry can fill AFTER the bubble first renders (paste + Enter
|
|
523
|
-
// immediately), so poll briefly until it resolves — the adapter awaits the
|
|
524
|
-
// upload before sending, so this settles within the same turn.
|
|
525
|
-
function ChipOrThumb({ token, kind }) {
|
|
526
|
-
const media = useContext(ChatMediaContext);
|
|
527
|
-
const [name, setName] = useState(() => (kind === 'image' ? media?.chipName(token) : null));
|
|
528
|
-
useEffect(() => {
|
|
529
|
-
if (kind !== 'image' || name || !media) return undefined;
|
|
530
|
-
let tries = 0;
|
|
531
|
-
const id = setInterval(() => {
|
|
532
|
-
const n = media.chipName(token);
|
|
533
|
-
if (n) {
|
|
534
|
-
setName(n);
|
|
535
|
-
clearInterval(id);
|
|
536
|
-
} else if (++tries > 20) {
|
|
537
|
-
clearInterval(id);
|
|
538
|
-
}
|
|
539
|
-
}, 250);
|
|
540
|
-
return () => clearInterval(id);
|
|
541
|
-
}, [kind, name, media, token]);
|
|
542
|
-
if (!name) return <span className="chat-paste-chip">{token}</span>;
|
|
543
|
-
return <ChatThumb src={attachmentSrc(name)} label="Open pasted image" />;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
// Single fixed overlay for the enlarged image — ESC / backdrop / × close,
|
|
547
|
-
// role="dialog", focus moves to the close button on open and returns to the
|
|
548
|
-
// invoking thumbnail on close (mirrors tour/overlay.jsx). The capture-phase
|
|
549
|
-
// key listener runs only while open, so it never collides with the composer's
|
|
550
|
-
// onKeyDownCapture.
|
|
551
|
-
function ChatLightbox({ src, onClose }) {
|
|
552
|
-
const closeRef = useRef(null);
|
|
553
|
-
const prevFocus = useRef(null);
|
|
554
|
-
useEffect(() => {
|
|
555
|
-
prevFocus.current = document.activeElement;
|
|
556
|
-
closeRef.current?.focus();
|
|
557
|
-
function onKey(e) {
|
|
558
|
-
if (e.key === 'Escape') {
|
|
559
|
-
e.preventDefault();
|
|
560
|
-
e.stopPropagation();
|
|
561
|
-
onClose();
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
window.addEventListener('keydown', onKey, true);
|
|
565
|
-
return () => {
|
|
566
|
-
window.removeEventListener('keydown', onKey, true);
|
|
567
|
-
try {
|
|
568
|
-
prevFocus.current?.focus?.();
|
|
569
|
-
} catch {
|
|
570
|
-
/* trigger unmounted — non-fatal */
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
}, [onClose]);
|
|
574
|
-
return (
|
|
575
|
-
<div
|
|
576
|
-
className="chat-lightbox"
|
|
577
|
-
role="dialog"
|
|
578
|
-
aria-modal="true"
|
|
579
|
-
aria-label="Pasted image"
|
|
580
|
-
onClick={onClose}
|
|
581
|
-
>
|
|
582
|
-
<img src={src} alt="pasted image, enlarged" onClick={(e) => e.stopPropagation()} />
|
|
583
|
-
<button
|
|
584
|
-
type="button"
|
|
585
|
-
ref={closeRef}
|
|
586
|
-
className="chat-lightbox-close"
|
|
587
|
-
aria-label="Close image"
|
|
588
|
-
title="Close image"
|
|
589
|
-
onClick={onClose}
|
|
590
|
-
>
|
|
591
|
-
×
|
|
592
|
-
</button>
|
|
593
|
-
</div>
|
|
594
|
-
);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
// User bubble keeps the collapsed chips in the transcript (Claude Code shows the
|
|
598
|
-
// placeholder in history too — the real path went to the agent, not the log),
|
|
599
|
-
// EXCEPT images, which render as clickable thumbnails in a strip UNDER the text
|
|
600
|
-
// (inline they'd break the message's reading flow). Two spellings resolve to the
|
|
601
|
-
// same thumbnail: a live chip ([image-1] → per-chat map) and the reloaded
|
|
602
|
-
// transcript's expanded `_chat/attachments/` path (never printed raw).
|
|
603
|
-
function UserBubble({ text }) {
|
|
604
|
-
const segs = extractAttachmentRefs(text);
|
|
605
|
-
const inline = [];
|
|
606
|
-
const images = [];
|
|
607
|
-
segs.forEach((seg, i) => {
|
|
608
|
-
if (seg.type === 'text') inline.push(<span key={`t-${i}`}>{seg.text}</span>);
|
|
609
|
-
else if (seg.type === 'chip' && seg.kind !== 'image')
|
|
610
|
-
inline.push(
|
|
611
|
-
<span className="chat-paste-chip" key={`c-${i}`}>
|
|
612
|
-
{seg.token}
|
|
613
|
-
</span>
|
|
614
|
-
);
|
|
615
|
-
else if (seg.type === 'chip')
|
|
616
|
-
images.push(<ChipOrThumb key={`c-${i}`} token={seg.token} kind={seg.kind} />);
|
|
617
|
-
else
|
|
618
|
-
images.push(
|
|
619
|
-
<ChatThumb key={`a-${i}`} src={attachmentSrc(seg.name)} label="Open pasted image" />
|
|
620
|
-
);
|
|
621
|
-
});
|
|
622
|
-
return (
|
|
623
|
-
<div className="chat-bubble">
|
|
624
|
-
{inline}
|
|
625
|
-
{images.length ? <div className="chat-thumbrow">{images}</div> : null}
|
|
626
|
-
</div>
|
|
627
|
-
);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
function UserMessage() {
|
|
631
|
-
return (
|
|
632
|
-
<div className="chat-msg chat-msg--user">
|
|
633
|
-
<MessagePrimitive.Parts components={{ Text: UserBubble }} />
|
|
634
|
-
<div className="chat-msg-actions" data-testid="chat-msg-actions">
|
|
635
|
-
<ActionBarPrimitive.Copy className="chat-msg-action" aria-label="Copy message" title="Copy message">
|
|
636
|
-
<Copy size={12} />
|
|
637
|
-
</ActionBarPrimitive.Copy>
|
|
638
|
-
</div>
|
|
639
|
-
</div>
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
// Reads the message's raw parts directly (rather than MessagePrimitive.Parts'
|
|
644
|
-
// per-part renderer) so consecutive tool-call parts can fold into one
|
|
645
|
-
// ToolGroup (Task C1) — grouping needs to see NEIGHBORING parts, which a
|
|
646
|
-
// per-part component registry can't.
|
|
647
|
-
function AssistantMessage() {
|
|
648
|
-
const rawParts = useMessage((m) => m.content) || [];
|
|
649
|
-
const { transcriptView } = useContext(ChatMediaContext) || {};
|
|
650
|
-
const view = transcriptView || DEFAULT_TRANSCRIPT_VIEW;
|
|
651
|
-
const parts = useMemo(() => filterTranscriptParts(rawParts, view), [rawParts, view]);
|
|
652
|
-
const grouped = useMemo(() => groupToolCalls(parts), [parts]);
|
|
653
|
-
const forceExpand = transcriptForcesExpand(view);
|
|
654
|
-
return (
|
|
655
|
-
<div className="chat-msg chat-msg--assistant">
|
|
656
|
-
<div className="chat-msg-role">
|
|
657
|
-
<span className="chat-msg-spark">
|
|
658
|
-
<Spark size={13} />
|
|
659
|
-
</span>
|
|
660
|
-
Claude
|
|
661
|
-
</div>
|
|
662
|
-
{grouped.map((g, i) =>
|
|
663
|
-
g.type === 'tool-group' ? (
|
|
664
|
-
<ToolGroup
|
|
665
|
-
key={`g-${i}`}
|
|
666
|
-
parts={g.parts}
|
|
667
|
-
ToolCard={ChatToolCard}
|
|
668
|
-
forceOpen={forceExpand}
|
|
669
|
-
verbose={forceExpand}
|
|
670
|
-
/>
|
|
671
|
-
) : g.part?.type === 'text' ? (
|
|
672
|
-
<ChatText key={`t-${i}`} text={g.part.text} />
|
|
673
|
-
) : g.part?.type === 'reasoning' ? (
|
|
674
|
-
<ChatReasoning key={`r-${i}`} text={g.part.text} />
|
|
675
|
-
) : g.part?.type === 'tool-call' ? (
|
|
676
|
-
<ChatToolCard
|
|
677
|
-
key={g.part.toolCallId || `tc-${i}`}
|
|
678
|
-
toolName={g.part.toolName}
|
|
679
|
-
args={g.part.args}
|
|
680
|
-
result={g.part.result}
|
|
681
|
-
isError={g.part.isError}
|
|
682
|
-
verbose={forceExpand}
|
|
683
|
-
/>
|
|
684
|
-
) : null
|
|
685
|
-
)}
|
|
686
|
-
<div className="chat-msg-actions" data-testid="chat-msg-actions">
|
|
687
|
-
<ActionBarPrimitive.Copy className="chat-msg-action" aria-label="Copy message" title="Copy message">
|
|
688
|
-
<Copy size={12} />
|
|
689
|
-
</ActionBarPrimitive.Copy>
|
|
690
|
-
<ActionBarPrimitive.Reload className="chat-msg-action" aria-label="Retry" title="Retry — re-send the last message">
|
|
691
|
-
<Retry size={12} />
|
|
692
|
-
</ActionBarPrimitive.Reload>
|
|
693
|
-
</div>
|
|
694
|
-
</div>
|
|
695
|
-
);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
// ── sub-sections ──
|
|
699
|
-
// "Working" is TRUE while the prompt turn is in-flight OR any tool is still
|
|
700
|
-
// running — so background subagents that outlive the main turn (the ACP adapter
|
|
701
|
-
// settles at the main agent's `result` while they drain, claude-agent-acp #773)
|
|
702
|
-
// keep the panel from looking idle. See RCA issue-acp-subagent-activity-invisible.
|
|
703
|
-
function StatusRow({ tools = [], transcriptView, onSetTranscriptView }) {
|
|
704
|
-
const running = useThread((t) => t.isRunning);
|
|
705
|
-
const working = running || tools.length > 0;
|
|
706
|
-
return (
|
|
707
|
-
<div className="chat-statusrow">
|
|
708
|
-
<span
|
|
709
|
-
className={`chat-status-dot ${working ? 'chat-status-dot--working' : 'chat-status-dot--ready'}`}
|
|
710
|
-
/>
|
|
711
|
-
{working ? 'Working…' : 'Ready'}
|
|
712
|
-
<span className="chat-statusrow-sep">·</span>
|
|
713
|
-
<span className="chat-statusrow-cc">Claude Code</span>
|
|
714
|
-
<span className="chat-statusrow-spacer" />
|
|
715
|
-
{/* Transcript view (Task C4/C5) — moved here (user feedback) instead of
|
|
716
|
-
crowding the chat switcher row; panel-wide, not per-chat. */}
|
|
717
|
-
<label className="chat-view-label" title="Transcript view — how much detail replies show">
|
|
718
|
-
<span className="chat-view-label-tx">View</span>
|
|
719
|
-
<select
|
|
720
|
-
className="chat-select"
|
|
721
|
-
value={transcriptView}
|
|
722
|
-
aria-label="Transcript view"
|
|
723
|
-
data-testid="chat-transcript-menu"
|
|
724
|
-
onChange={(e) => onSetTranscriptView(e.target.value)}
|
|
725
|
-
>
|
|
726
|
-
{TRANSCRIPT_VIEWS.map((v) => (
|
|
727
|
-
<option key={v} value={v}>
|
|
728
|
-
{v[0].toUpperCase() + v.slice(1)}
|
|
729
|
-
</option>
|
|
730
|
-
))}
|
|
731
|
-
</select>
|
|
732
|
-
</label>
|
|
733
|
-
</div>
|
|
734
|
-
);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
// Live m:ss since work started — a ticking counter reads as "actively working"
|
|
738
|
-
// during a long, output-quiet subagent stretch (the exact case that used to look
|
|
739
|
-
// hung). Resets whenever work stops.
|
|
740
|
-
function useElapsed(active) {
|
|
741
|
-
const [, tick] = useState(0);
|
|
742
|
-
const startRef = useRef(null);
|
|
743
|
-
useEffect(() => {
|
|
744
|
-
if (!active) {
|
|
745
|
-
startRef.current = null;
|
|
746
|
-
return undefined;
|
|
747
|
-
}
|
|
748
|
-
startRef.current = Date.now();
|
|
749
|
-
const id = setInterval(() => tick((n) => n + 1), 1000);
|
|
750
|
-
return () => clearInterval(id);
|
|
751
|
-
}, [active]);
|
|
752
|
-
if (!active || startRef.current == null) return null;
|
|
753
|
-
const secs = Math.floor((Date.now() - startRef.current) / 1000);
|
|
754
|
-
if (secs < 1) return null;
|
|
755
|
-
return `${Math.floor(secs / 60)}:${String(secs % 60).padStart(2, '0')}`;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
// Live "still working" indicator — sits at the BOTTOM of the feed (under the
|
|
759
|
-
// latest Claude message). Driven by turn-in-flight OR any running tool, so a
|
|
760
|
-
// background subagent stays visible ("N subagents running · 0:42") instead of
|
|
761
|
-
// the feed going quiet and looking dead.
|
|
762
|
-
function ActivityBar({ tools }) {
|
|
763
|
-
const running = useThread((t) => t.isRunning);
|
|
764
|
-
const working = running || tools.length > 0;
|
|
765
|
-
const elapsed = useElapsed(working);
|
|
766
|
-
if (!working) return null;
|
|
767
|
-
return (
|
|
768
|
-
<div className="chat-activity" role="status" aria-live="polite">
|
|
769
|
-
<span className="chat-activity-spin" aria-hidden="true" />
|
|
770
|
-
<span className="chat-activity-text">{activityLabel(tools)}</span>
|
|
771
|
-
{elapsed ? <span className="chat-activity-elapsed">{elapsed}</span> : null}
|
|
772
|
-
</div>
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
// Post-turn-end continuation. The ACP adapter settles the prompt at the main
|
|
777
|
-
// agent's first `result` (claude-agent-acp #773) but keeps streaming background
|
|
778
|
-
// work — subagent results, the consolidated report — AFTER the assistant-ui run
|
|
779
|
-
// ended. Those frames can't join the completed message, so acp-runtime collects
|
|
780
|
-
// them and we render them here as a live "continuation" bubble instead of
|
|
781
|
-
// dropping them (the answer used to only appear on reload). See RCA
|
|
782
|
-
// issue-acp-subagent-activity-invisible (facet F2). Cleared when the next turn
|
|
783
|
-
// starts; the durable copy lives in the transcript.
|
|
784
|
-
function ContinuationBubble({ parts: rawParts, viewMode }) {
|
|
785
|
-
const view = viewMode || DEFAULT_TRANSCRIPT_VIEW;
|
|
786
|
-
const parts = useMemo(() => filterTranscriptParts(rawParts, view), [rawParts, view]);
|
|
787
|
-
if (!parts.length) return null;
|
|
788
|
-
const grouped = groupToolCalls(parts);
|
|
789
|
-
const forceExpand = transcriptForcesExpand(view);
|
|
790
|
-
return (
|
|
791
|
-
<div className="chat-msg chat-msg--assistant chat-msg--continued">
|
|
792
|
-
<div className="chat-msg-role">
|
|
793
|
-
<span className="chat-msg-spark">
|
|
794
|
-
<Spark size={13} />
|
|
795
|
-
</span>
|
|
796
|
-
Claude
|
|
797
|
-
</div>
|
|
798
|
-
{grouped.map((g, i) =>
|
|
799
|
-
g.type === 'tool-group' ? (
|
|
800
|
-
<ToolGroup
|
|
801
|
-
key={`g-${i}`}
|
|
802
|
-
parts={g.parts}
|
|
803
|
-
ToolCard={ChatToolCard}
|
|
804
|
-
forceOpen={forceExpand}
|
|
805
|
-
verbose={forceExpand}
|
|
806
|
-
/>
|
|
807
|
-
) : g.part?.type === 'text' ? (
|
|
808
|
-
<ChatText key={`t-${i}`} text={g.part.text} />
|
|
809
|
-
) : g.part?.type === 'reasoning' ? (
|
|
810
|
-
<ChatReasoning key={`r-${i}`} text={g.part.text} />
|
|
811
|
-
) : g.part?.type === 'tool-call' ? (
|
|
812
|
-
<ChatToolCard
|
|
813
|
-
key={g.part.toolCallId || `tc-${i}`}
|
|
814
|
-
toolName={g.part.toolName}
|
|
815
|
-
args={g.part.args}
|
|
816
|
-
result={g.part.result}
|
|
817
|
-
isError={g.part.isError}
|
|
818
|
-
verbose={forceExpand}
|
|
819
|
-
/>
|
|
820
|
-
) : null
|
|
821
|
-
)}
|
|
822
|
-
</div>
|
|
823
|
-
);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
// Epoch `resetsAt` from SDKRateLimitInfo isn't documented as seconds vs ms —
|
|
827
|
-
// disambiguate by magnitude (a seconds-epoch never reaches 10^11 until the
|
|
828
|
-
// year 2286) rather than guessing wrong silently.
|
|
829
|
-
function formatResetTime(resetsAt) {
|
|
830
|
-
if (!resetsAt) return null;
|
|
831
|
-
const ms = resetsAt > 1e11 ? resetsAt : resetsAt * 1000;
|
|
832
|
-
try {
|
|
833
|
-
return new Date(ms).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
|
834
|
-
} catch {
|
|
835
|
-
return null;
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
// Composer footer info (Task D3, revised repeatedly after dogfooding — the
|
|
840
|
-
// keyboard hint + context gauge + mode footnote + subscription note first
|
|
841
|
-
// sat inline in `.chat-foot` and wrapped into an unreadable mess, then moved
|
|
842
|
-
// behind this info icon. The icon itself later moved INTO `.chat-toolbar`
|
|
843
|
-
// (inside `.chat-box`, which clips its content with `overflow: hidden` for
|
|
844
|
-
// the rounded-corner focus ring) — a plain `position: absolute` popover
|
|
845
|
-
// anchored to the icon got clipped by that box, rendering squashed inside
|
|
846
|
-
// the textarea instead of floating above the whole composer. Fixed
|
|
847
|
-
// positioning computed from the button's own rect escapes that clip (fixed
|
|
848
|
-
// is relative to the viewport, not an ancestor's overflow, unless an
|
|
849
|
-
// ancestor establishes its own containing block via transform/filter —
|
|
850
|
-
// none of `.chat-box`/`.chat-composer`/`.chat-thread` do). Context is
|
|
851
|
-
// PER-CHAT (this session's own window); cost is cumulative for this
|
|
852
|
-
// session only — labeled accordingly so it doesn't read as an
|
|
853
|
-
// account-wide total.
|
|
854
|
-
function ChatFootInfo({ usage, modes }) {
|
|
855
|
-
const [open, setOpen] = useState(false);
|
|
856
|
-
const [pos, setPos] = useState(null);
|
|
857
|
-
const rootRef = useRef(null);
|
|
858
|
-
const btnRef = useRef(null);
|
|
859
|
-
|
|
860
|
-
useEffect(() => {
|
|
861
|
-
if (!open) return undefined;
|
|
862
|
-
const place = () => {
|
|
863
|
-
const r = btnRef.current?.getBoundingClientRect();
|
|
864
|
-
if (r) setPos({ bottom: window.innerHeight - r.top + 8, right: window.innerWidth - r.right });
|
|
865
|
-
};
|
|
866
|
-
place();
|
|
867
|
-
const onPointerDown = (e) => {
|
|
868
|
-
if (rootRef.current && !rootRef.current.contains(e.target)) setOpen(false);
|
|
869
|
-
};
|
|
870
|
-
const onKeyDown = (e) => {
|
|
871
|
-
if (e.key === 'Escape') setOpen(false);
|
|
872
|
-
};
|
|
873
|
-
document.addEventListener('pointerdown', onPointerDown);
|
|
874
|
-
document.addEventListener('keydown', onKeyDown);
|
|
875
|
-
window.addEventListener('resize', place);
|
|
876
|
-
return () => {
|
|
877
|
-
document.removeEventListener('pointerdown', onPointerDown);
|
|
878
|
-
document.removeEventListener('keydown', onKeyDown);
|
|
879
|
-
window.removeEventListener('resize', place);
|
|
880
|
-
};
|
|
881
|
-
}, [open]);
|
|
882
|
-
|
|
883
|
-
const context = usage.context;
|
|
884
|
-
const footnote = modeFootnote(modes);
|
|
885
|
-
// `asOf` is our OWN Date.now() ms timestamp (acp-usage.js) — unambiguous,
|
|
886
|
-
// unlike SDKRateLimitInfo's resetsAt (see formatResetTime's doc comment).
|
|
887
|
-
const timeLabel = usage.asOf
|
|
888
|
-
? new Date(usage.asOf).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })
|
|
889
|
-
: null;
|
|
890
|
-
// Genuine Pro/Max subscription-plan context — the adapter forwards a THIN,
|
|
891
|
-
// event-driven single-window signal (SDKRateLimitInfo, only fires near a
|
|
892
|
-
// real limit event); the rich Claude-Desktop-style multi-window panel
|
|
893
|
-
// (5h + weekly + per-model, live at rest) isn't reachable — its SDK method
|
|
894
|
-
// is explicitly marked experimental and the pinned adapter never calls it
|
|
895
|
-
// (see the Milestone D research in the ACP capabilities plan). Show what's
|
|
896
|
-
// real; don't fabricate the rest.
|
|
897
|
-
const rateLimitResetLabel = usage.rateLimit ? formatResetTime(usage.rateLimit.resetsAt) : null;
|
|
898
|
-
|
|
899
|
-
return (
|
|
900
|
-
<div className="chat-foot-info" ref={rootRef}>
|
|
901
|
-
<button
|
|
902
|
-
ref={btnRef}
|
|
903
|
-
type="button"
|
|
904
|
-
className="chat-foot-info-btn"
|
|
905
|
-
aria-label="Chat info"
|
|
906
|
-
aria-expanded={open}
|
|
907
|
-
title="Chat info"
|
|
908
|
-
data-testid="chat-foot-info-btn"
|
|
909
|
-
onClick={() => setOpen((v) => !v)}
|
|
910
|
-
>
|
|
911
|
-
ⓘ
|
|
912
|
-
</button>
|
|
913
|
-
{open && pos ? (
|
|
914
|
-
<div
|
|
915
|
-
className="chat-foot-popover"
|
|
916
|
-
role="dialog"
|
|
917
|
-
aria-label="Chat info"
|
|
918
|
-
data-testid="chat-foot-popover"
|
|
919
|
-
style={{ bottom: pos.bottom, right: pos.right }}
|
|
920
|
-
>
|
|
921
|
-
{context ? (
|
|
922
|
-
<div className="chat-foot-popover-section">
|
|
923
|
-
<div className="chat-foot-popover-label-row">
|
|
924
|
-
<span>Context</span>
|
|
925
|
-
<span>{context.pct}%</span>
|
|
926
|
-
</div>
|
|
927
|
-
<span className="chat-usage-bar chat-usage-bar--wide" aria-hidden="true">
|
|
928
|
-
<span className="chat-usage-bar-fill" style={{ width: `${context.pct}%` }} />
|
|
929
|
-
</span>
|
|
930
|
-
<div className="chat-foot-popover-row--muted">
|
|
931
|
-
{context.used.toLocaleString()} / {context.size.toLocaleString()} tokens
|
|
932
|
-
</div>
|
|
933
|
-
</div>
|
|
934
|
-
) : null}
|
|
935
|
-
{usage.rateLimit ? (
|
|
936
|
-
<>
|
|
937
|
-
<div className="chat-foot-popover-sep" />
|
|
938
|
-
<div className="chat-foot-popover-label-row">
|
|
939
|
-
<span>{usage.rateLimit.label}</span>
|
|
940
|
-
<span>{usage.rateLimit.pct != null ? `${usage.rateLimit.pct}%` : '—'}</span>
|
|
941
|
-
</div>
|
|
942
|
-
{rateLimitResetLabel ? (
|
|
943
|
-
<div className="chat-foot-popover-row--muted">resets {rateLimitResetLabel}</div>
|
|
944
|
-
) : null}
|
|
945
|
-
</>
|
|
946
|
-
) : null}
|
|
947
|
-
{footnote ? (
|
|
948
|
-
<>
|
|
949
|
-
<div className="chat-foot-popover-sep" />
|
|
950
|
-
<div className="chat-foot-popover-row">{footnote}</div>
|
|
951
|
-
</>
|
|
952
|
-
) : null}
|
|
953
|
-
<div className="chat-foot-popover-sep" />
|
|
954
|
-
<div className="chat-foot-popover-foot">
|
|
955
|
-
<div className="chat-foot-popover-row--muted">↵ to send · ⇧↵ newline</div>
|
|
956
|
-
<div className="chat-foot-popover-row--muted">
|
|
957
|
-
Uses your Claude subscription{timeLabel ? ` · updated ${timeLabel}` : ''}
|
|
958
|
-
</div>
|
|
959
|
-
</div>
|
|
960
|
-
</div>
|
|
961
|
-
) : null}
|
|
962
|
-
</div>
|
|
963
|
-
);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
// Event-driven single-window rate-limit banner (Task D3) — only the ONE
|
|
967
|
-
// active window `SDKRateLimitInfo` carries; NOT the full multi-window "Plan
|
|
968
|
-
// usage limits" panel (out of scope — see the plan's Milestone D research).
|
|
969
|
-
// Dismissible per reset window (re-appears once a NEW window starts warning).
|
|
970
|
-
function RateLimitBanner({ rateLimit, onDismiss }) {
|
|
971
|
-
if (!rateLimit) return null;
|
|
972
|
-
const resetLabel = formatResetTime(rateLimit.resetsAt);
|
|
973
|
-
return (
|
|
974
|
-
<div className="chat-usage-banner" role="status" data-testid="chat-usage-banner">
|
|
975
|
-
<span>
|
|
976
|
-
You're at {rateLimit.pct != null ? `${rateLimit.pct}%` : 'high usage'} of your {rateLimit.label}
|
|
977
|
-
{resetLabel ? ` · resets ${resetLabel}` : ''}
|
|
978
|
-
</span>
|
|
979
|
-
<button
|
|
980
|
-
type="button"
|
|
981
|
-
className="chat-usage-banner-x"
|
|
982
|
-
aria-label="Dismiss"
|
|
983
|
-
title="Dismiss"
|
|
984
|
-
onClick={onDismiss}
|
|
985
|
-
>
|
|
986
|
-
×
|
|
987
|
-
</button>
|
|
988
|
-
</div>
|
|
989
|
-
);
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
// Connection-problem error card (Task C3) — a transient bridge/socket failure
|
|
993
|
-
// mid-turn, distinct from the hard NotConnected state (claude not installed/
|
|
994
|
-
// signed in): that one gates the WHOLE panel before any chat exists; this one
|
|
995
|
-
// is per-chat and recoverable with a retry. Rendered below the feed, like
|
|
996
|
-
// ActivityBar/ContinuationBubble — chrome, not a per-message assistant-ui error.
|
|
997
|
-
function ErrorCard({ error, onRetry }) {
|
|
998
|
-
const [expanded, setExpanded] = useState(false);
|
|
999
|
-
if (!error) return null;
|
|
1000
|
-
return (
|
|
1001
|
-
<div className="chat-error-card" role="alert" data-testid="chat-error-card">
|
|
1002
|
-
<div className="chat-error-hd">
|
|
1003
|
-
<span className="chat-error-ic" aria-hidden="true">
|
|
1004
|
-
⚠
|
|
1005
|
-
</span>
|
|
1006
|
-
<b>Connection problem</b>
|
|
1007
|
-
</div>
|
|
1008
|
-
{expanded ? (
|
|
1009
|
-
<p className="chat-error-detail">{error.message}</p>
|
|
1010
|
-
) : (
|
|
1011
|
-
<p className="chat-error-detail chat-error-detail--muted">
|
|
1012
|
-
Something interrupted the connection to Claude.
|
|
1013
|
-
</p>
|
|
1014
|
-
)}
|
|
1015
|
-
<div className="chat-error-actions">
|
|
1016
|
-
<button type="button" className="btn btn--sm" onClick={() => setExpanded((v) => !v)}>
|
|
1017
|
-
{expanded ? 'Hide details' : 'View details'}
|
|
1018
|
-
</button>
|
|
1019
|
-
<button type="button" className="btn btn--primary btn--sm" onClick={onRetry}>
|
|
1020
|
-
Try again
|
|
1021
|
-
</button>
|
|
1022
|
-
</div>
|
|
1023
|
-
</div>
|
|
1024
|
-
);
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
function ChatEmpty() {
|
|
1028
|
-
return (
|
|
1029
|
-
<div className="chat-empty">
|
|
1030
|
-
<span className="chat-empty-mark">
|
|
1031
|
-
<Spark size={28} />
|
|
1032
|
-
</span>
|
|
1033
|
-
<div className="chat-empty-title">Edit this canvas with Claude</div>
|
|
1034
|
-
<div className="chat-empty-sub">
|
|
1035
|
-
Ask for a change, a critique, or a new screen — Claude runs on your own subscription.
|
|
1036
|
-
</div>
|
|
1037
|
-
{/* One-time contextual CTA: bootstrap a design system. Prefills the guided
|
|
1038
|
-
wizard (name is required, so we never fire it blind — the composer opens
|
|
1039
|
-
ready for the slug). Canvas verbs live in the persistent quick-action row. */}
|
|
1040
|
-
<ThreadPrimitive.Suggestion
|
|
1041
|
-
prompt="/design:setup-ds "
|
|
1042
|
-
send={false}
|
|
1043
|
-
className="chat-empty-cta"
|
|
1044
|
-
>
|
|
1045
|
-
<span className="chat-empty-cta-ic">
|
|
1046
|
-
<Swatches size={15} />
|
|
1047
|
-
</span>
|
|
1048
|
-
Create new design system
|
|
1049
|
-
</ThreadPrimitive.Suggestion>
|
|
1050
|
-
<div className="chat-sugs">
|
|
1051
|
-
{SUGGESTIONS.map((s) => (
|
|
1052
|
-
<ThreadPrimitive.Suggestion key={s} prompt={s} send={false} className="chat-sug">
|
|
1053
|
-
{s}
|
|
1054
|
-
</ThreadPrimitive.Suggestion>
|
|
1055
|
-
))}
|
|
1056
|
-
</div>
|
|
1057
|
-
</div>
|
|
1058
|
-
);
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
function QuickActions({ openComments = 0 }) {
|
|
1062
|
-
return (
|
|
1063
|
-
<div className="chat-quick">
|
|
1064
|
-
{/* Issue #74 — the reporter asked for a button that IMPLEMENTS the
|
|
1065
|
-
comments they already dropped on the canvas, not one that adds a new
|
|
1066
|
-
one. `/design:edit` already owns the whole behaviour (edit.md §3: a
|
|
1067
|
-
generic feedback string + open comments → iterate each as a scoped
|
|
1068
|
-
edit, resolve each after it lands), so this is purely a shortcut to
|
|
1069
|
-
the phrasing that triggers it. Shown only when there IS something to
|
|
1070
|
-
implement — a permanently-disabled verb would just be noise.
|
|
1071
|
-
Prefill, never fire blind: same rule as QUICK_ACTIONS above, so the
|
|
1072
|
-
user can narrow the ask ("…but skip the one about the colour")
|
|
1073
|
-
before sending. */}
|
|
1074
|
-
{openComments > 0 ? (
|
|
1075
|
-
<ThreadPrimitive.Suggestion
|
|
1076
|
-
prompt="/design:edit fix open comments"
|
|
1077
|
-
send={false}
|
|
1078
|
-
className="btn btn--ghost btn--sm chat-qa chat-qa--comments"
|
|
1079
|
-
data-testid="chat-qa-implement-comments"
|
|
1080
|
-
>
|
|
1081
|
-
{`✓ Implement ${openComments} comment${openComments === 1 ? '' : 's'}`}
|
|
1082
|
-
</ThreadPrimitive.Suggestion>
|
|
1083
|
-
) : null}
|
|
1084
|
-
{QUICK_ACTIONS.map((a) => (
|
|
1085
|
-
<ThreadPrimitive.Suggestion
|
|
1086
|
-
key={a.label}
|
|
1087
|
-
prompt={a.prompt}
|
|
1088
|
-
send={false}
|
|
1089
|
-
className="btn btn--ghost btn--sm chat-qa"
|
|
1090
|
-
>
|
|
1091
|
-
{a.label}
|
|
1092
|
-
</ThreadPrimitive.Suggestion>
|
|
1093
|
-
))}
|
|
1094
|
-
</div>
|
|
1095
|
-
);
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
// Merge the static bootstrap list with the live ACP catalogue (pushed over the
|
|
1099
|
-
// connection). Returns `{ all, existsSet }` — see slash-commands.js.
|
|
1100
|
-
function useSlashCommands(conn) {
|
|
1101
|
-
const [live, setLive] = useState([]);
|
|
1102
|
-
useEffect(() => conn.onCommands(setLive), [conn]);
|
|
1103
|
-
return useMemo(() => buildCommandModel(STATIC_COMMANDS, live), [live]);
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
// Autocomplete menu — opens upward above the composer while a slash command is
|
|
1107
|
-
// being typed. Keyboard-driven from the composer (see Composer); mouse hover +
|
|
1108
|
-
// click supported. onMouseDown (not onClick) so picking beats the textarea blur.
|
|
1109
|
-
function CommandPopover({ items, activeIndex, onPick, onHover }) {
|
|
1110
|
-
if (!items.length) return null;
|
|
1111
|
-
return (
|
|
1112
|
-
<div className="chat-cmd-menu" role="listbox" data-testid="chat-cmd-menu">
|
|
1113
|
-
{items.map((c, i) => (
|
|
1114
|
-
<button
|
|
1115
|
-
key={c.name}
|
|
1116
|
-
type="button"
|
|
1117
|
-
role="option"
|
|
1118
|
-
aria-selected={i === activeIndex}
|
|
1119
|
-
data-testid={`chat-cmd-item-${c.name.replace(/[^a-z0-9]+/gi, '-')}`}
|
|
1120
|
-
className={`chat-cmd-item${i === activeIndex ? ' is-active' : ''}`}
|
|
1121
|
-
onMouseEnter={() => onHover(i)}
|
|
1122
|
-
onMouseDown={(e) => {
|
|
1123
|
-
e.preventDefault();
|
|
1124
|
-
onPick(c);
|
|
1125
|
-
}}
|
|
1126
|
-
>
|
|
1127
|
-
<span className={`chat-cmd-name chat-cmd-name--${c.group}`}>/{c.name}</span>
|
|
1128
|
-
{c.description ? <span className="chat-cmd-desc">{c.description}</span> : null}
|
|
1129
|
-
{c.argHint ? <span className="chat-cmd-arg">{c.argHint}</span> : null}
|
|
1130
|
-
</button>
|
|
1131
|
-
))}
|
|
1132
|
-
</div>
|
|
1133
|
-
);
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
// Inline command highlight via a mirror-overlay: a div behind a transparent-text
|
|
1137
|
-
// textarea renders the same text, wrapping the leading command token in a pill —
|
|
1138
|
-
// but ONLY when that token is a command that exists (the badge gate). The mirror
|
|
1139
|
-
// MUST match the textarea's box model exactly (see .chat-input / .chat-input-mirror
|
|
1140
|
-
// in 6-acp-chat.css) or the pill drifts off the text.
|
|
1141
|
-
function HighlightedInput({ existsSet, attachmentsRef, onAttachChange }) {
|
|
1142
|
-
const text = useComposer((c) => c.text);
|
|
1143
|
-
const mirrorRef = useRef(null);
|
|
1144
|
-
const match = matchLeadingCommand(text);
|
|
1145
|
-
const token = match ? normalizeName(match.token) : '';
|
|
1146
|
-
const highlight = !!(match && token && existsSet.has(token));
|
|
1147
|
-
|
|
1148
|
-
// Build the mirror: an optional leading command pill, then the remainder with
|
|
1149
|
-
// any [image|file|link-N] tokens wrapped as chips. Both wrappers preserve the
|
|
1150
|
-
// exact glyphs so the transparent-text textarea's caret stays aligned.
|
|
1151
|
-
let head = null;
|
|
1152
|
-
let bodyStart = 0;
|
|
1153
|
-
if (highlight) {
|
|
1154
|
-
const leadingWs = text.match(/^\s*/)[0];
|
|
1155
|
-
const cmd = `/${match.token}`;
|
|
1156
|
-
head = (
|
|
1157
|
-
<>
|
|
1158
|
-
{leadingWs}
|
|
1159
|
-
<span className="chat-cmd-pill">{cmd}</span>
|
|
1160
|
-
</>
|
|
1161
|
-
);
|
|
1162
|
-
bodyStart = leadingWs.length + cmd.length;
|
|
1163
|
-
}
|
|
1164
|
-
const body = text.slice(bodyStart);
|
|
1165
|
-
// Trailing newline needs a zero-width guard so the mirror keeps the last line.
|
|
1166
|
-
const guard = text.endsWith('\n') ? '' : '';
|
|
1167
|
-
|
|
1168
|
-
// Collapse a pasted attachment into a chip token at the caret and stash its real
|
|
1169
|
-
// value in the map so the adapter expands it on send. Two sources:
|
|
1170
|
-
// 1) a raw clipboard image (screenshot) — insert the chip synchronously, upload
|
|
1171
|
-
// the bytes in the background, and fill the map when the path comes back. The
|
|
1172
|
-
// in-flight promise is tracked so send can await it (no literal [image-N] if
|
|
1173
|
-
// the user hits Enter before the upload lands).
|
|
1174
|
-
// 2) a lone path / URL as text — resolved synchronously.
|
|
1175
|
-
const onPaste = useCallback(
|
|
1176
|
-
(e) => {
|
|
1177
|
-
const cd = e.clipboardData;
|
|
1178
|
-
const ta = e.currentTarget;
|
|
1179
|
-
const { map, pending } = attachmentsRef.current;
|
|
1180
|
-
|
|
1181
|
-
const img = clipboardImageFile(cd);
|
|
1182
|
-
if (img) {
|
|
1183
|
-
e.preventDefault();
|
|
1184
|
-
const chip = `[image-${nextChipIndex(ta.value, 'image')}]`;
|
|
1185
|
-
map.set(chip, null); // pending — expandPasteChips leaves it literal until resolved
|
|
1186
|
-
insertChipAtCaret(ta, chip);
|
|
1187
|
-
onAttachChange?.();
|
|
1188
|
-
const p = uploadChatImage(img)
|
|
1189
|
-
.then((path) => {
|
|
1190
|
-
if (path) map.set(chip, path);
|
|
1191
|
-
else map.delete(chip);
|
|
1192
|
-
})
|
|
1193
|
-
.catch(() => map.delete(chip))
|
|
1194
|
-
.finally(() => {
|
|
1195
|
-
pending.delete(p);
|
|
1196
|
-
onAttachChange?.();
|
|
1197
|
-
});
|
|
1198
|
-
pending.add(p);
|
|
1199
|
-
return;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
const cls = classifyPaste(cd?.getData('text/plain'));
|
|
1203
|
-
if (!cls) return; // ordinary paste — let assistant-ui handle it
|
|
1204
|
-
e.preventDefault();
|
|
1205
|
-
const chip = `[${cls.kind}-${nextChipIndex(ta.value, cls.kind)}]`;
|
|
1206
|
-
map.set(chip, cls.value);
|
|
1207
|
-
insertChipAtCaret(ta, chip);
|
|
1208
|
-
onAttachChange?.();
|
|
1209
|
-
},
|
|
1210
|
-
[attachmentsRef, onAttachChange]
|
|
1211
|
-
);
|
|
1212
|
-
|
|
1213
|
-
return (
|
|
1214
|
-
<div className="chat-input-wrap">
|
|
1215
|
-
<div className="chat-input-mirror" aria-hidden="true" ref={mirrorRef}>
|
|
1216
|
-
{head}
|
|
1217
|
-
{chipNodes(body)}
|
|
1218
|
-
{guard}
|
|
1219
|
-
</div>
|
|
1220
|
-
<ComposerPrimitive.Input
|
|
1221
|
-
className="chat-input chat-input--overlay"
|
|
1222
|
-
submitMode="enter"
|
|
1223
|
-
placeholder="Ask Claude to change this canvas…"
|
|
1224
|
-
onPaste={onPaste}
|
|
1225
|
-
onScroll={(e) => {
|
|
1226
|
-
if (mirrorRef.current) mirrorRef.current.scrollTop = e.currentTarget.scrollTop;
|
|
1227
|
-
}}
|
|
1228
|
-
/>
|
|
1229
|
-
</div>
|
|
1230
|
-
);
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
function Composer({
|
|
1234
|
-
activeCanvas,
|
|
1235
|
-
chatCtx,
|
|
1236
|
-
onCtxDismiss,
|
|
1237
|
-
picksRef,
|
|
1238
|
-
caps,
|
|
1239
|
-
onSetMode,
|
|
1240
|
-
onSetConfig,
|
|
1241
|
-
conn,
|
|
1242
|
-
chatId,
|
|
1243
|
-
attachmentsRef,
|
|
1244
|
-
usage,
|
|
1245
|
-
showRateLimitBanner,
|
|
1246
|
-
onDismissRateLimitBanner,
|
|
1247
|
-
}) {
|
|
1248
|
-
const canvasName = prettyCanvas(activeCanvas);
|
|
1249
|
-
const { all, existsSet } = useSlashCommands(conn);
|
|
1250
|
-
const composerRuntime = useComposerRuntime();
|
|
1251
|
-
const text = useComposer((c) => c.text);
|
|
1252
|
-
|
|
1253
|
-
const match = matchLeadingCommand(text);
|
|
1254
|
-
const [dismissed, setDismissed] = useState(false);
|
|
1255
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
1256
|
-
const menuOpen = !!(match && match.typing) && !dismissed;
|
|
1257
|
-
|
|
1258
|
-
// Attachment reveal (security — DDR-140): a chip collapses a pasted path/URL to
|
|
1259
|
-
// an opaque badge, and the real value is what gets sent to the auto-approving
|
|
1260
|
-
// agent. So the composer MUST show what each chip will expand to BEFORE send —
|
|
1261
|
-
// otherwise a value the user can't see (e.g. one an untrusted canvas seeded onto
|
|
1262
|
-
// the clipboard) rides into the prompt invisibly. `attachTick` re-renders the
|
|
1263
|
-
// strip when an async image upload fills its map entry.
|
|
1264
|
-
const [attachTick, setAttachTick] = useState(0);
|
|
1265
|
-
const bumpAttach = useCallback(() => setAttachTick((t) => t + 1), []);
|
|
1266
|
-
const chipList = useMemo(() => {
|
|
1267
|
-
const map = attachmentsRef.current.map;
|
|
1268
|
-
const seen = new Set();
|
|
1269
|
-
const out = [];
|
|
1270
|
-
for (const m of text.matchAll(/\[(?:image|file|link)-\d+\]/g)) {
|
|
1271
|
-
if (seen.has(m[0])) continue;
|
|
1272
|
-
seen.add(m[0]);
|
|
1273
|
-
out.push({ token: m[0], value: map.get(m[0]) ?? null });
|
|
1274
|
-
}
|
|
1275
|
-
return out;
|
|
1276
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1277
|
-
}, [text, attachTick, attachmentsRef]);
|
|
1278
|
-
const items = useMemo(
|
|
1279
|
-
() => (menuOpen ? filterCommands(all, match.token) : []),
|
|
1280
|
-
[menuOpen, all, match?.token]
|
|
1281
|
-
);
|
|
1282
|
-
|
|
1283
|
-
// Reset selection + un-dismiss whenever the typed token changes.
|
|
1284
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1285
|
-
useEffect(() => {
|
|
1286
|
-
setActiveIndex(0);
|
|
1287
|
-
setDismissed(false);
|
|
1288
|
-
}, [match?.token]);
|
|
1289
|
-
|
|
1290
|
-
// Warm the adapter the first time the user starts a slash command, so the live
|
|
1291
|
-
// catalogue arrives without a full prompt. Guarded to fire once per mount.
|
|
1292
|
-
// model/effort/mode are the user's PERSISTED picks (read live off the ref so
|
|
1293
|
-
// this effect doesn't need to re-run when they change) — applied once, live,
|
|
1294
|
-
// by the bridge right after the session establishes.
|
|
1295
|
-
const warmedRef = useRef(false);
|
|
1296
|
-
useEffect(() => {
|
|
1297
|
-
if (menuOpen && !warmedRef.current) {
|
|
1298
|
-
warmedRef.current = true;
|
|
1299
|
-
const p = picksRef.current;
|
|
1300
|
-
conn.warm(chatId, p.model, p.effort, p.mode);
|
|
1301
|
-
}
|
|
1302
|
-
}, [menuOpen, conn, chatId, picksRef]);
|
|
1303
|
-
|
|
1304
|
-
const pick = useCallback(
|
|
1305
|
-
(cmd) => {
|
|
1306
|
-
composerRuntime.setText(`/${cmd.name} `);
|
|
1307
|
-
setDismissed(false);
|
|
1308
|
-
setActiveIndex(0);
|
|
1309
|
-
},
|
|
1310
|
-
[composerRuntime]
|
|
1311
|
-
);
|
|
1312
|
-
|
|
1313
|
-
const onKeyDownCapture = useCallback(
|
|
1314
|
-
(e) => {
|
|
1315
|
-
if (!menuOpen || !items.length) return;
|
|
1316
|
-
// Swallow navigation keys before they reach the textarea (capture phase +
|
|
1317
|
-
// stopPropagation) so the menu drives them, not the caret / submit.
|
|
1318
|
-
const swallow = () => {
|
|
1319
|
-
e.preventDefault();
|
|
1320
|
-
e.stopPropagation();
|
|
1321
|
-
};
|
|
1322
|
-
if (e.key === 'ArrowDown') {
|
|
1323
|
-
swallow();
|
|
1324
|
-
setActiveIndex((i) => (i + 1) % items.length);
|
|
1325
|
-
} else if (e.key === 'ArrowUp') {
|
|
1326
|
-
swallow();
|
|
1327
|
-
setActiveIndex((i) => (i - 1 + items.length) % items.length);
|
|
1328
|
-
} else if (e.key === 'Enter' || e.key === 'Tab') {
|
|
1329
|
-
swallow();
|
|
1330
|
-
pick(items[Math.min(activeIndex, items.length - 1)]);
|
|
1331
|
-
} else if (e.key === 'Escape') {
|
|
1332
|
-
swallow();
|
|
1333
|
-
setDismissed(true);
|
|
1334
|
-
}
|
|
1335
|
-
},
|
|
1336
|
-
[menuOpen, items, activeIndex, pick]
|
|
1337
|
-
);
|
|
1338
|
-
|
|
1339
|
-
return (
|
|
1340
|
-
<div className="chat-composer" data-testid="chat-composer">
|
|
1341
|
-
<ThreadPrimitive.If running={false}>
|
|
1342
|
-
{showRateLimitBanner ? (
|
|
1343
|
-
<RateLimitBanner rateLimit={usage.rateLimit} onDismiss={onDismissRateLimitBanner} />
|
|
1344
|
-
) : null}
|
|
1345
|
-
{/* Context attachment chip (feature-acp-context-hardening) — the visible
|
|
1346
|
-
reveal of the fenced <maude-context> block the send will prepend
|
|
1347
|
-
(built from the SAME buildChatContext result, so chip ≡ payload).
|
|
1348
|
-
Removable (DDR-140); a stale selection warns instead of hiding. */}
|
|
1349
|
-
{chatCtx ? (
|
|
1350
|
-
<div
|
|
1351
|
-
className={`chat-ctx${chatCtx.stale ? ' chat-ctx--stale' : ''}`}
|
|
1352
|
-
data-testid="chat-context-chip"
|
|
1353
|
-
>
|
|
1354
|
-
<span className="chat-ctx-label">
|
|
1355
|
-
◆ {chatCtx.chipLabel}
|
|
1356
|
-
{chatCtx.stale ? ' — canvas changed since selection' : ''}
|
|
1357
|
-
</span>
|
|
1358
|
-
<button
|
|
1359
|
-
type="button"
|
|
1360
|
-
className="chat-ctx-x"
|
|
1361
|
-
aria-label="Remove canvas context from this message"
|
|
1362
|
-
title="Remove canvas context from this message"
|
|
1363
|
-
onClick={onCtxDismiss}
|
|
1364
|
-
>
|
|
1365
|
-
×
|
|
1366
|
-
</button>
|
|
1367
|
-
</div>
|
|
1368
|
-
) : canvasName ? (
|
|
1369
|
-
<div className="chat-ctx">
|
|
1370
|
-
Editing: <b>{canvasName}</b>
|
|
1371
|
-
</div>
|
|
1372
|
-
) : null}
|
|
1373
|
-
{/* One box: textarea on top, a bottom toolbar (model · effort · send).
|
|
1374
|
-
The anchor is relative so the command popover can float above it. */}
|
|
1375
|
-
<div className="chat-cmd-anchor" onKeyDownCapture={onKeyDownCapture}>
|
|
1376
|
-
{menuOpen ? (
|
|
1377
|
-
<CommandPopover
|
|
1378
|
-
items={items}
|
|
1379
|
-
activeIndex={activeIndex}
|
|
1380
|
-
onPick={pick}
|
|
1381
|
-
onHover={setActiveIndex}
|
|
1382
|
-
/>
|
|
1383
|
-
) : null}
|
|
1384
|
-
<ComposerPrimitive.Root className="chat-box">
|
|
1385
|
-
<HighlightedInput
|
|
1386
|
-
existsSet={existsSet}
|
|
1387
|
-
attachmentsRef={attachmentsRef}
|
|
1388
|
-
onAttachChange={bumpAttach}
|
|
1389
|
-
/>
|
|
1390
|
-
<div className="chat-toolbar">
|
|
1391
|
-
<CapabilityBar
|
|
1392
|
-
modes={caps.modes}
|
|
1393
|
-
configOptions={caps.parsedOptions}
|
|
1394
|
-
onSetMode={onSetMode}
|
|
1395
|
-
onSetConfig={onSetConfig}
|
|
1396
|
-
/>
|
|
1397
|
-
<span className="chat-toolbar-spacer" />
|
|
1398
|
-
<ChatFootInfo usage={usage} modes={caps.modes} />
|
|
1399
|
-
<ComposerPrimitive.Send className="chat-send" aria-label="Send message">
|
|
1400
|
-
<SendArrow />
|
|
1401
|
-
</ComposerPrimitive.Send>
|
|
1402
|
-
</div>
|
|
1403
|
-
</ComposerPrimitive.Root>
|
|
1404
|
-
</div>
|
|
1405
|
-
{chipList.length ? (
|
|
1406
|
-
<div className="chat-attach" role="list" aria-label="Attachments — expands on send">
|
|
1407
|
-
{chipList.map((c) => (
|
|
1408
|
-
<div className="chat-attach-row" role="listitem" key={c.token}>
|
|
1409
|
-
<span className="chat-attach-tok">{c.token}</span>
|
|
1410
|
-
<span className="chat-attach-arrow" aria-hidden="true">
|
|
1411
|
-
→
|
|
1412
|
-
</span>
|
|
1413
|
-
<span className="chat-attach-val" title={c.value || undefined}>
|
|
1414
|
-
{c.value || 'attaching…'}
|
|
1415
|
-
</span>
|
|
1416
|
-
</div>
|
|
1417
|
-
))}
|
|
1418
|
-
</div>
|
|
1419
|
-
) : null}
|
|
1420
|
-
</ThreadPrimitive.If>
|
|
1421
|
-
<ThreadPrimitive.If running>
|
|
1422
|
-
<div className="chat-stopbar">
|
|
1423
|
-
<span className="chat-stop-meta">
|
|
1424
|
-
<span className="chat-status-dot chat-status-dot--working" />
|
|
1425
|
-
Working…
|
|
1426
|
-
</span>
|
|
1427
|
-
<span className="chat-foot-spacer" />
|
|
1428
|
-
<ComposerPrimitive.Cancel className="btn btn--danger" aria-label="Stop">
|
|
1429
|
-
Stop
|
|
1430
|
-
</ComposerPrimitive.Cancel>
|
|
1431
|
-
</div>
|
|
1432
|
-
</ThreadPrimitive.If>
|
|
1433
|
-
</div>
|
|
1434
|
-
);
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
// DDR-166 T0f — the guided, button-driven cold start. Every actionable step
|
|
1438
|
-
// (install command, Sign in) now lives in ReadinessList itself; this shell no
|
|
1439
|
-
// longer carries its own terminal-instruction copy, so there's nothing here to
|
|
1440
|
-
// go stale relative to what the rows actually offer.
|
|
1441
|
-
function NotConnected({ reason, readiness, readinessLoading, onRecheck }) {
|
|
1442
|
-
return (
|
|
1443
|
-
<div className="chat-disabled" data-testid="acp-not-connected">
|
|
1444
|
-
<span className="chat-disabled-mark">
|
|
1445
|
-
<Spark size={28} />
|
|
1446
|
-
</span>
|
|
1447
|
-
<div className="chat-disabled-title">AI editing isn't ready yet</div>
|
|
1448
|
-
<div className="chat-disabled-sub">
|
|
1449
|
-
{reason ? <p>{reason}</p> : null}
|
|
1450
|
-
<p>AI editing pairs with a Claude Code you have installed. Here's what it still needs:</p>
|
|
1451
|
-
</div>
|
|
1452
|
-
{readiness ? (
|
|
1453
|
-
<ReadinessList report={readiness} loading={readinessLoading} refresh={onRecheck} />
|
|
1454
|
-
) : (
|
|
1455
|
-
<p className="chat-disabled-sub">Checking what's needed…</p>
|
|
1456
|
-
)}
|
|
1457
|
-
<div className="chat-trust">
|
|
1458
|
-
<div className="chat-trust-row">
|
|
1459
|
-
<Check /> Runs on your Pro/Max subscription
|
|
1460
|
-
</div>
|
|
1461
|
-
<div className="chat-trust-row">
|
|
1462
|
-
<Check /> Signs in via Claude Code's own login — Maude never sees your credentials
|
|
1463
|
-
</div>
|
|
1464
|
-
<div className="chat-trust-row">
|
|
1465
|
-
<Check /> Never metered API billing
|
|
1466
|
-
</div>
|
|
1467
|
-
</div>
|
|
1468
|
-
</div>
|
|
1469
|
-
);
|
|
1470
|
-
}
|
|
120
|
+
// gate-b-polish2 (CONTRACT §7, 02 ob-ai-connect, 03): the v1 not-ready panel (DDR-166 T0f's readiness list,
|
|
121
|
+
// the not-ready heading) is gone from the AI panel. Ask AI looks the same as always; the first send is
|
|
122
|
+
// kept and the ConnectSheet asks once (v2/ai/NeedsYouSlot.jsx); the readiness list, whole, is Menu ›
|
|
123
|
+
// Diagnostics › AI setup (diag-ai) and Settings › Connections.
|
|
1471
124
|
|
|
1472
125
|
// Repo-level chat id — generated for each new chat.
|
|
1473
126
|
function newChatId() {
|
|
@@ -1481,6 +134,12 @@ function toThreadMessages(msgs) {
|
|
|
1481
134
|
return {
|
|
1482
135
|
role: 'user',
|
|
1483
136
|
content: [{ type: 'text', text: (m.parts || []).map((p) => p.text || '').join('') }],
|
|
137
|
+
// S5.19 — the day dividers read when the ask was sent
|
|
138
|
+
...(Number.isFinite(m.at) ? { createdAt: new Date(m.at) } : {}),
|
|
139
|
+
// P8 c10 — what the ask was sent with (acp/transcript.ts parses the attachments block back)
|
|
140
|
+
...(Array.isArray(m.attachments) && m.attachments.length
|
|
141
|
+
? { metadata: { custom: { attachments: m.attachments } } }
|
|
142
|
+
: {}),
|
|
1484
143
|
};
|
|
1485
144
|
}
|
|
1486
145
|
return {
|
|
@@ -1516,10 +175,22 @@ function ChatThread({
|
|
|
1516
175
|
selected,
|
|
1517
176
|
designRel,
|
|
1518
177
|
openComments,
|
|
178
|
+
selectedClips,
|
|
179
|
+
justShared,
|
|
180
|
+
viewArtboardId,
|
|
181
|
+
panelHidden,
|
|
1519
182
|
transcriptView,
|
|
1520
183
|
onSetTranscriptView,
|
|
1521
184
|
onPermissionRequest,
|
|
1522
185
|
onElicitationRequest,
|
|
186
|
+
chatTitle,
|
|
187
|
+
uiCtx,
|
|
188
|
+
onCopyTranscript,
|
|
189
|
+
suggestOn,
|
|
190
|
+
onSetSuggestOn,
|
|
191
|
+
unavailable = false,
|
|
192
|
+
viewer = false,
|
|
193
|
+
onConnected,
|
|
1523
194
|
}) {
|
|
1524
195
|
// Live session capabilities (feature-acp-panel-dynamic-claude-code-
|
|
1525
196
|
// capabilities) — `caps` is THIS chat's own connection's mode roster +
|
|
@@ -1540,11 +211,12 @@ function ChatThread({
|
|
|
1540
211
|
// the panel costs nothing" intent — only the chat actually on screen warms.
|
|
1541
212
|
const warmedOnVisibleRef = useRef(false);
|
|
1542
213
|
useEffect(() => {
|
|
1543
|
-
|
|
214
|
+
// S5.13: nothing to warm while Claude Code is not ready; the effect runs again when it is.
|
|
215
|
+
if (hidden || unavailable || warmedOnVisibleRef.current) return;
|
|
1544
216
|
warmedOnVisibleRef.current = true;
|
|
1545
217
|
const p = picksRef.current;
|
|
1546
218
|
conn.warm(chatId, p.model, p.effort, p.mode);
|
|
1547
|
-
}, [hidden, conn, chatId, picksRef]);
|
|
219
|
+
}, [hidden, unavailable, conn, chatId, picksRef]);
|
|
1548
220
|
|
|
1549
221
|
// One-time reconciliation: if the user's persisted pick (from a DIFFERENT
|
|
1550
222
|
// chat, or an earlier session) isn't what THIS freshly-established session
|
|
@@ -1568,8 +240,13 @@ function ChatThread({
|
|
|
1568
240
|
}
|
|
1569
241
|
if (parsedOptions.effort && picks.effort) {
|
|
1570
242
|
const values = flattenSelectOptions(parsedOptions.effort.options).map((o) => o.value);
|
|
1571
|
-
const resolved = resolvePersistedPick(
|
|
1572
|
-
|
|
243
|
+
const resolved = resolvePersistedPick(
|
|
244
|
+
values,
|
|
245
|
+
picks.effort,
|
|
246
|
+
parsedOptions.effort.currentValue
|
|
247
|
+
);
|
|
248
|
+
if (resolved !== parsedOptions.effort.currentValue)
|
|
249
|
+
conn.setConfig(chatId, 'effort', resolved);
|
|
1573
250
|
}
|
|
1574
251
|
if (hasModes && picks.mode) {
|
|
1575
252
|
const ids = caps.modes.availableModes.map((m) => m.id);
|
|
@@ -1598,27 +275,14 @@ function ChatThread({
|
|
|
1598
275
|
// adapter awaits `pending` then expands `map` before sending; the composer writes
|
|
1599
276
|
// both on paste.
|
|
1600
277
|
const attachmentsRef = useRef({ map: new Map(), pending: new Set() });
|
|
1601
|
-
//
|
|
1602
|
-
|
|
1603
|
-
//
|
|
1604
|
-
//
|
|
1605
|
-
// (
|
|
1606
|
-
//
|
|
1607
|
-
const
|
|
1608
|
-
const
|
|
1609
|
-
const contextRef = useRef(null);
|
|
1610
|
-
const ctxDismissedRef = useRef(false);
|
|
1611
|
-
useEffect(() => {
|
|
1612
|
-
const c = buildChatContext({ canvas: activeCanvas, selected });
|
|
1613
|
-
setChatCtx(c);
|
|
1614
|
-
contextRef.current = c;
|
|
1615
|
-
setCtxDismissed(false);
|
|
1616
|
-
ctxDismissedRef.current = false;
|
|
1617
|
-
}, [activeCanvas, selected]);
|
|
1618
|
-
const dismissCtx = useCallback(() => {
|
|
1619
|
-
setCtxDismissed(true);
|
|
1620
|
-
ctxDismissedRef.current = true;
|
|
1621
|
-
}, []);
|
|
278
|
+
// S5.10 — drop · paste · paperclip chips and the folder consent; the adapter reads them off the ref.
|
|
279
|
+
const attach = useAttachments({ chatId, attachmentsRef });
|
|
280
|
+
// Canvas/selection context attachment (feature-acp-context-hardening) + the scope chip (S5.8). One
|
|
281
|
+
// buildChatContext result drives BOTH the composer chip and the frozen block the adapter prepends at
|
|
282
|
+
// send (`contextRef` is what it reads — freeze = read-once). The chip follows the selection until the
|
|
283
|
+
// person narrows it; removing it (DDR-140) sends the ask without the canvas.
|
|
284
|
+
const aiScope = useAiScope({ activeCanvas, selected, panelHidden, viewArtboardId, designRel });
|
|
285
|
+
const { contextRef } = aiScope;
|
|
1622
286
|
const adapter = useMemo(
|
|
1623
287
|
() =>
|
|
1624
288
|
makeAcpAdapter(
|
|
@@ -1627,10 +291,10 @@ function ChatThread({
|
|
|
1627
291
|
() => picksRef.current.model || null,
|
|
1628
292
|
() => picksRef.current.effort || null,
|
|
1629
293
|
() => attachmentsRef.current,
|
|
1630
|
-
() =>
|
|
294
|
+
() => contextRef.current,
|
|
1631
295
|
() => picksRef.current.mode || null
|
|
1632
296
|
),
|
|
1633
|
-
[conn, chatId, picksRef]
|
|
297
|
+
[conn, chatId, picksRef, contextRef]
|
|
1634
298
|
);
|
|
1635
299
|
const runtime = useLocalRuntime(adapter, { initialMessages });
|
|
1636
300
|
// Image thumbnails + lightbox — one overlay per thread; bubbles reach it (and
|
|
@@ -1639,14 +303,18 @@ function ChatThread({
|
|
|
1639
303
|
// ThreadPrimitive.Messages' component registry, which doesn't pass custom
|
|
1640
304
|
// props through, so this context is the only way it reaches the filter.
|
|
1641
305
|
const [lightboxSrc, setLightboxSrc] = useState(null);
|
|
306
|
+
// P8 c10 (03 `ai-long`): the chat's runs, so an earlier reply can draw its own result card (v2/ai/TurnResult.jsx)
|
|
307
|
+
const { runs: chatRunList } = useChatRuns(conn, chatId);
|
|
308
|
+
const chatRuns = useMemo(() => ({ runs: chatRunList }), [chatRunList]);
|
|
1642
309
|
const media = useMemo(
|
|
1643
310
|
() => ({
|
|
1644
311
|
chipName: (token) => attachmentName(attachmentsRef.current.map.get(token) || ''),
|
|
1645
312
|
openLightbox: setLightboxSrc,
|
|
1646
313
|
designRel,
|
|
1647
314
|
transcriptView,
|
|
315
|
+
chatRuns,
|
|
1648
316
|
}),
|
|
1649
|
-
[designRel, transcriptView]
|
|
317
|
+
[designRel, transcriptView, chatRuns]
|
|
1650
318
|
);
|
|
1651
319
|
const [activeTools, setActiveTools] = useState([]);
|
|
1652
320
|
useEffect(() => conn.onActivity(setActiveTools), [conn]);
|
|
@@ -1705,6 +373,52 @@ function ChatThread({
|
|
|
1705
373
|
const text = lastUserText(runtime.thread.getState().messages);
|
|
1706
374
|
if (text) runtime.thread.append(text);
|
|
1707
375
|
}, [runtime]);
|
|
376
|
+
// S5.13 (03 `ai-panel-closed`): hiding the panel never stops AI, and a toast says when the chat is done.
|
|
377
|
+
const panelHiddenRef = useRef(panelHidden);
|
|
378
|
+
panelHiddenRef.current = panelHidden;
|
|
379
|
+
// P8 C3 (01 cf-ai-done): the done toast names the WORK and offers Undo - it needs the artboard names + the
|
|
380
|
+
// project's design folder when the chat finishes, so they ride in a ref (the busy subscription stays put).
|
|
381
|
+
const doneCtxRef = useRef({ artboards: [], designRel });
|
|
382
|
+
doneCtxRef.current = { artboards: aiScope.artboards, designRel };
|
|
383
|
+
useEffect(() => {
|
|
384
|
+
let was = false;
|
|
385
|
+
return conn.onBusy((busy) => {
|
|
386
|
+
const finished = was && !busy;
|
|
387
|
+
was = busy;
|
|
388
|
+
if (!finished || !panelHiddenRef.current) return;
|
|
389
|
+
const msgs = runtime.thread.getState().messages;
|
|
390
|
+
const last = [...msgs].reverse().find((m) => m.role === 'assistant');
|
|
391
|
+
const text = (last?.content || [])
|
|
392
|
+
.filter((c) => c.type === 'text')
|
|
393
|
+
.map((c) => c.text)
|
|
394
|
+
.join(' ');
|
|
395
|
+
const say = (run) => {
|
|
396
|
+
const { artboards, designRel: rel } = doneCtxRef.current;
|
|
397
|
+
const notice = doneNotice({
|
|
398
|
+
id: `ai-done-${chatId}`,
|
|
399
|
+
text,
|
|
400
|
+
run,
|
|
401
|
+
artboards,
|
|
402
|
+
onShow: () => openAiChat(chatId),
|
|
403
|
+
onUndo: async () => {
|
|
404
|
+
const out = await undoRun(run, { designRel: rel });
|
|
405
|
+
if (!out.ok)
|
|
406
|
+
notify({
|
|
407
|
+
id: `ai-undo-${chatId}`,
|
|
408
|
+
title: undoNote(out.reason, out.line),
|
|
409
|
+
kind: 'warning',
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
if (notice) notify(notice);
|
|
414
|
+
};
|
|
415
|
+
// the registry's newest ended run of THIS chat says what it changed; an older server has none
|
|
416
|
+
void fetchChatRuns(chatId).then((runs) => {
|
|
417
|
+
const ended = runs.filter((r) => r.state === 'ended');
|
|
418
|
+
say(ended.sort((a, b) => (b.createdAt ?? 0) - (a.createdAt ?? 0))[0] ?? null);
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
}, [conn, runtime, chatId]);
|
|
1708
422
|
|
|
1709
423
|
// Usage (Milestone D) — context-window gauge + session cost + an event-
|
|
1710
424
|
// driven single-window rate-limit banner. Per-chat: each ChatThread has its
|
|
@@ -1718,65 +432,121 @@ function ChatThread({
|
|
|
1718
432
|
(usage.rateLimit.status === 'allowed_warning' || usage.rateLimit.status === 'rejected') &&
|
|
1719
433
|
bannerDismissedFor !== `${usage.rateLimit.type}:${usage.rateLimit.resetsAt}`;
|
|
1720
434
|
const dismissRateLimitBanner = useCallback(() => {
|
|
1721
|
-
if (usage.rateLimit)
|
|
435
|
+
if (usage.rateLimit)
|
|
436
|
+
setBannerDismissedFor(`${usage.rateLimit.type}:${usage.rateLimit.resetsAt}`);
|
|
1722
437
|
}, [usage.rateLimit]);
|
|
1723
438
|
|
|
1724
439
|
return (
|
|
1725
440
|
<AssistantRuntimeProvider runtime={runtime}>
|
|
1726
441
|
<ChatMediaContext.Provider value={media}>
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
transcriptView={transcriptView}
|
|
1731
|
-
onSetTranscriptView={onSetTranscriptView}
|
|
1732
|
-
/>
|
|
1733
|
-
{/* DDR-184 #3 — loud alert when the current mode can't edit (plan / dontAsk),
|
|
442
|
+
<div className="chat-panel" style={hidden ? { display: 'none' } : undefined}>
|
|
443
|
+
<DropOverlay attach={attach} />
|
|
444
|
+
{/* DDR-184 #3 — said up front when the current mode can't edit (plan / dontAsk),
|
|
1734
445
|
so a user typing "change X" isn't silently ignored. Above the feed. */}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
<ThreadPrimitive.
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
446
|
+
<SuggestOnlyBanner modes={caps.modes} onSetMode={onSetMode} />
|
|
447
|
+
<ThreadPrimitive.Root className="chat-thread">
|
|
448
|
+
{/* gate-b-a11y: the feed scrolls, so it is a tab stop with a name (axe scrollable-region-focusable) */}
|
|
449
|
+
<ThreadPrimitive.Viewport
|
|
450
|
+
className="chat-feed"
|
|
451
|
+
autoScroll
|
|
452
|
+
tabIndex={0}
|
|
453
|
+
aria-label="Conversation"
|
|
454
|
+
>
|
|
455
|
+
<ThreadPrimitive.Empty>
|
|
456
|
+
<ChatEmpty />
|
|
457
|
+
</ThreadPrimitive.Empty>
|
|
458
|
+
<ThreadPrimitive.Messages components={{ UserMessage, AssistantMessage }} />
|
|
459
|
+
{/* Background work that outlived the turn — streamed here so it's not
|
|
1743
460
|
dropped (RCA F2). */}
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
461
|
+
<ContinuationBubble parts={bgParts} viewMode={transcriptView} />
|
|
462
|
+
{/* S5.9 — the run's tail: the working line with Stop, then the result card (replaces the v1
|
|
463
|
+
ActivityBar), and the long chat's Jump to latest */}
|
|
464
|
+
<RunSurface
|
|
465
|
+
conn={conn}
|
|
466
|
+
chatId={chatId}
|
|
467
|
+
tools={activeTools}
|
|
468
|
+
artboards={aiScope.artboards}
|
|
469
|
+
designRel={designRel}
|
|
470
|
+
/>
|
|
471
|
+
{/* S5.14: "Stopped when the app quit · …" + Keep going (03 ai-quit). */}
|
|
472
|
+
<StoppedDivider chatId={chatId} hidden={hidden} />
|
|
473
|
+
<JumpToLatest hidden={hidden} />
|
|
474
|
+
</ThreadPrimitive.Viewport>
|
|
475
|
+
<WaitingCards chatId={chatId} designRel={designRel} />
|
|
476
|
+
{/* S5.13 — the open question, a failure, or the kept prompt's line (client/v2/ai/NeedsYouSlot.jsx):
|
|
477
|
+
a permission waits here, inline, never modal. */}
|
|
478
|
+
<NeedsYouSlot
|
|
479
|
+
conn={conn}
|
|
480
|
+
chatId={chatId}
|
|
481
|
+
away={hidden || panelHidden}
|
|
482
|
+
pendingPermissions={pendingPermissions}
|
|
483
|
+
pendingElicitations={pendingElicitations}
|
|
484
|
+
onRespondPermission={respondPermission}
|
|
485
|
+
onRespondElicitation={respondElicitation}
|
|
486
|
+
turnError={turnError}
|
|
487
|
+
onRetry={retryLastTurn}
|
|
488
|
+
onConnected={onConnected}
|
|
489
|
+
designRel={designRel}
|
|
1753
490
|
/>
|
|
1754
|
-
|
|
1755
|
-
<
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
491
|
+
<QuotaLine rateLimit={usage.rateLimit} />
|
|
492
|
+
<Composer
|
|
493
|
+
activeCanvas={activeCanvas}
|
|
494
|
+
scope={aiScope.scope}
|
|
495
|
+
artboards={aiScope.artboards}
|
|
496
|
+
activeArtboardId={aiScope.activeArtboardId}
|
|
497
|
+
stale={aiScope.stale}
|
|
498
|
+
onChooseScope={aiScope.choose}
|
|
499
|
+
onCtxDismiss={aiScope.remove}
|
|
500
|
+
above={
|
|
501
|
+
<ThreadPrimitive.If running={false}>
|
|
502
|
+
<SuggestStrip
|
|
503
|
+
openComments={openComments}
|
|
504
|
+
selectedClips={selectedClips}
|
|
505
|
+
justShared={justShared}
|
|
506
|
+
enabled={suggestOn}
|
|
507
|
+
lastFailed={!!turnError}
|
|
508
|
+
chatId={chatId}
|
|
509
|
+
canvas={activeCanvas}
|
|
510
|
+
conn={conn}
|
|
511
|
+
/>
|
|
512
|
+
</ThreadPrimitive.If>
|
|
513
|
+
}
|
|
514
|
+
picksRef={picksRef}
|
|
515
|
+
conn={conn}
|
|
516
|
+
chatId={chatId}
|
|
517
|
+
attachmentsRef={attachmentsRef}
|
|
518
|
+
attach={attach}
|
|
519
|
+
usage={usage}
|
|
520
|
+
showRateLimitBanner={
|
|
521
|
+
showRateLimitBanner && usage.rateLimit?.status !== 'allowed_warning'
|
|
522
|
+
}
|
|
523
|
+
onDismissRateLimitBanner={dismissRateLimitBanner}
|
|
524
|
+
// S10.16c — the gates a DS host's "send" meets: this chat in front · connected · not a viewer
|
|
525
|
+
active={!hidden}
|
|
526
|
+
unavailable={unavailable}
|
|
527
|
+
viewer={viewer}
|
|
528
|
+
/>
|
|
529
|
+
{/* S5.12 — everything that used to sit in the field's toolbar, under one quiet row. */}
|
|
530
|
+
<ChatAdvanced
|
|
531
|
+
chatId={chatId}
|
|
532
|
+
chatTitle={chatTitle}
|
|
533
|
+
active={!hidden && !panelHidden}
|
|
534
|
+
caps={{ modes: caps.modes, parsedOptions }}
|
|
535
|
+
onSetMode={onSetMode}
|
|
536
|
+
onSetConfig={onSetConfig}
|
|
537
|
+
transcriptView={transcriptView}
|
|
538
|
+
onSetTranscriptView={onSetTranscriptView}
|
|
539
|
+
suggestOn={suggestOn}
|
|
540
|
+
onSetSuggestOn={onSetSuggestOn}
|
|
541
|
+
usage={usage}
|
|
542
|
+
ctx={uiCtx}
|
|
543
|
+
onCopyTranscript={onCopyTranscript}
|
|
544
|
+
/>
|
|
545
|
+
</ThreadPrimitive.Root>
|
|
546
|
+
{lightboxSrc ? (
|
|
547
|
+
<ChatLightbox src={lightboxSrc} onClose={() => setLightboxSrc(null)} />
|
|
548
|
+
) : null}
|
|
549
|
+
</div>
|
|
1780
550
|
</ChatMediaContext.Provider>
|
|
1781
551
|
</AssistantRuntimeProvider>
|
|
1782
552
|
);
|
|
@@ -1788,6 +558,9 @@ export default function ChatPanel({
|
|
|
1788
558
|
selected,
|
|
1789
559
|
designRel,
|
|
1790
560
|
openComments = 0,
|
|
561
|
+
selectedClips = 0,
|
|
562
|
+
justShared = null,
|
|
563
|
+
viewArtboardId = null,
|
|
1791
564
|
width,
|
|
1792
565
|
resizing,
|
|
1793
566
|
onClose,
|
|
@@ -1796,6 +569,8 @@ export default function ChatPanel({
|
|
|
1796
569
|
onFinished,
|
|
1797
570
|
onPermissionRequest,
|
|
1798
571
|
onElicitationRequest,
|
|
572
|
+
readOnly = false,
|
|
573
|
+
projectName = '',
|
|
1799
574
|
}) {
|
|
1800
575
|
// Model/effort/mode picks — persisted across sessions per config id (never a
|
|
1801
576
|
// fixed model/effort pair; see loadPersistedPicks). Read live by each open
|
|
@@ -1835,23 +610,21 @@ export default function ChatPanel({
|
|
|
1835
610
|
probeStatus();
|
|
1836
611
|
}, [probeStatus]);
|
|
1837
612
|
|
|
1838
|
-
//
|
|
1839
|
-
//
|
|
1840
|
-
|
|
1841
|
-
// status, so installing the missing pieces and re-checking can unlock the panel
|
|
1842
|
-
// without reopening it (the persistent re-check surface).
|
|
1843
|
-
const {
|
|
1844
|
-
report: readiness,
|
|
1845
|
-
loading: readinessLoading,
|
|
1846
|
-
refresh: refreshReadiness,
|
|
1847
|
-
} = useReadiness(status.available === false);
|
|
1848
|
-
const recheck = useCallback(() => {
|
|
1849
|
-
refreshReadiness();
|
|
1850
|
-
return probeStatus();
|
|
1851
|
-
}, [refreshReadiness, probeStatus]);
|
|
613
|
+
// After the ConnectSheet connects, look again so the panel unlocks in place (no reopen). The readiness
|
|
614
|
+
// breakdown (DDR-128) is Menu › Diagnostics › AI setup now.
|
|
615
|
+
const recheck = probeStatus;
|
|
1852
616
|
|
|
1853
|
-
// Recents (for the
|
|
617
|
+
// Recents (for the header's title) + the open chat list's re-read trigger.
|
|
1854
618
|
const [chats, setChats] = useState([]);
|
|
619
|
+
const [listKey, setListKey] = useState(0);
|
|
620
|
+
// Suggestions on/off lives in Advanced; it is a per-Mac preference shared by every chat.
|
|
621
|
+
const [suggestOn, setSuggestOn] = useState(readSuggestPref);
|
|
622
|
+
const onSetSuggestOn = useCallback((on) => {
|
|
623
|
+
writeSuggestPref(on);
|
|
624
|
+
setSuggestOn(on);
|
|
625
|
+
}, []);
|
|
626
|
+
// What the chat list's ⋯ menu may offer (the registry's own predicates — the server refuses the same writes).
|
|
627
|
+
const uiCtx = useMemo(() => menuCtx({ native: true, readOnly }), [readOnly]);
|
|
1855
628
|
// Chat ids the server confirms have a user-set title (ChatSummary.renamed)
|
|
1856
629
|
// — session_info_update must never clobber those (Task C5 gotcha: "an
|
|
1857
630
|
// explicit rename must not be silently clobbered by an auto-generated
|
|
@@ -1864,6 +637,7 @@ export default function ChatPanel({
|
|
|
1864
637
|
if (!Array.isArray(d)) return;
|
|
1865
638
|
setChats(d);
|
|
1866
639
|
renamedChatIdsRef.current = new Set(d.filter((c) => c.renamed).map((c) => c.id));
|
|
640
|
+
setListKey((k) => k + 1); // the open chat list reads again (S5.12)
|
|
1867
641
|
})
|
|
1868
642
|
.catch(() => {});
|
|
1869
643
|
}, []);
|
|
@@ -1911,8 +685,9 @@ export default function ChatPanel({
|
|
|
1911
685
|
// fresh chat shows the client's "New chat" heuristic until the first
|
|
1912
686
|
// turn completes; expected). Read live by chatOptions below.
|
|
1913
687
|
conn.onSessionInfo((info) => {
|
|
1914
|
-
|
|
1915
|
-
|
|
688
|
+
const title = cleanChatTitle(info.title);
|
|
689
|
+
if (title && !renamedChatIdsRef.current.has(chatId)) {
|
|
690
|
+
setSessionTitles((prev) => ({ ...prev, [chatId]: title }));
|
|
1916
691
|
}
|
|
1917
692
|
});
|
|
1918
693
|
// Background work (subagents) can outlive the main turn — the ACP adapter
|
|
@@ -1994,10 +769,17 @@ export default function ChatPanel({
|
|
|
1994
769
|
},
|
|
1995
770
|
[activeChatId, openChat]
|
|
1996
771
|
);
|
|
1997
|
-
|
|
1998
|
-
//
|
|
1999
|
-
|
|
2000
|
-
|
|
772
|
+
// S5.13 — a "Needs you" / "Done" toast's Open / Show lands on the chat it was about (the shell opens the
|
|
773
|
+
// panel itself on the same event).
|
|
774
|
+
useEffect(() => {
|
|
775
|
+
const on = (e) => switchTo(e?.detail?.chat);
|
|
776
|
+
window.addEventListener(OPEN_AI_EVENT, on);
|
|
777
|
+
return () => window.removeEventListener(OPEN_AI_EVENT, on);
|
|
778
|
+
}, [switchTo]);
|
|
779
|
+
|
|
780
|
+
// A chat moved to the trash (the list did that, server-side) — kill its claude (close the conn), forget
|
|
781
|
+
// it here, and fall back to another open chat (or a fresh one) if it was active.
|
|
782
|
+
const closeChat = useCallback(
|
|
2001
783
|
(id) => {
|
|
2002
784
|
const conn = connsRef.current.get(id);
|
|
2003
785
|
if (conn) conn.close();
|
|
@@ -2016,9 +798,7 @@ export default function ChatPanel({
|
|
|
2016
798
|
delete next[id];
|
|
2017
799
|
return next;
|
|
2018
800
|
});
|
|
2019
|
-
|
|
2020
|
-
.catch(() => {})
|
|
2021
|
-
.finally(refreshChats);
|
|
801
|
+
refreshChats();
|
|
2022
802
|
setOpenChatIds((ids) => {
|
|
2023
803
|
const remaining = ids.filter((x) => x !== id);
|
|
2024
804
|
if (id === activeChatId) {
|
|
@@ -2054,31 +834,18 @@ export default function ChatPanel({
|
|
|
2054
834
|
.catch(() => null);
|
|
2055
835
|
}, []);
|
|
2056
836
|
|
|
2057
|
-
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
const startRename = useCallback((c) => {
|
|
2062
|
-
setRenamingChatId(c.id);
|
|
2063
|
-
setRenameValue(c.title === 'New chat' ? '' : c.title);
|
|
2064
|
-
setOverflowChatId(null);
|
|
2065
|
-
}, []);
|
|
2066
|
-
|
|
2067
|
-
const commitRename = useCallback(
|
|
2068
|
-
(id) => {
|
|
2069
|
-
const value = renameValue.trim();
|
|
2070
|
-
setRenamingChatId(null);
|
|
2071
|
-
if (!value) return;
|
|
837
|
+
// The list hands back the new name; an explicit rename must not be clobbered by a later auto-title.
|
|
838
|
+
const renameChat = useCallback(
|
|
839
|
+
(id, value) => {
|
|
2072
840
|
renamedChatIdsRef.current.add(id);
|
|
2073
841
|
setSessionTitles((prev) => ({ ...prev, [id]: value })); // optimistic — see gotcha above
|
|
2074
842
|
patchChatMeta(id, { title: value }).then(refreshChats);
|
|
2075
843
|
},
|
|
2076
|
-
[
|
|
844
|
+
[patchChatMeta, refreshChats]
|
|
2077
845
|
);
|
|
2078
846
|
|
|
2079
847
|
const archiveChat = useCallback(
|
|
2080
848
|
(id) => {
|
|
2081
|
-
setOverflowChatId(null);
|
|
2082
849
|
patchChatMeta(id, { archived: true }).then(() => {
|
|
2083
850
|
refreshChats();
|
|
2084
851
|
// An archived chat can still be OPEN (mounted, running) — archiving
|
|
@@ -2090,15 +857,18 @@ export default function ChatPanel({
|
|
|
2090
857
|
);
|
|
2091
858
|
|
|
2092
859
|
const copyTranscript = useCallback((id) => {
|
|
2093
|
-
|
|
2094
|
-
fetch(`/_api/acp/chat?id=${encodeURIComponent(id)}`)
|
|
860
|
+
return fetch(`/_api/acp/chat?id=${encodeURIComponent(id)}`)
|
|
2095
861
|
.then((r) => r.json())
|
|
2096
862
|
.then((msgs) => {
|
|
2097
863
|
const text = (Array.isArray(msgs) ? msgs : [])
|
|
2098
864
|
.map((m) => {
|
|
2099
865
|
const body = (m.parts || [])
|
|
2100
866
|
.map((p) =>
|
|
2101
|
-
p.type === 'text'
|
|
867
|
+
p.type === 'text'
|
|
868
|
+
? p.text || ''
|
|
869
|
+
: p.type === 'tool'
|
|
870
|
+
? `[${p.toolName || 'tool'}]`
|
|
871
|
+
: ''
|
|
2102
872
|
)
|
|
2103
873
|
.join('');
|
|
2104
874
|
return `${m.role === 'user' ? 'User' : 'Claude'}: ${body}`;
|
|
@@ -2122,14 +892,21 @@ export default function ChatPanel({
|
|
|
2122
892
|
// Switcher options — open chats first (parallel), then the rest of the recents.
|
|
2123
893
|
// Title precedence: the agent's own session_info_update title (live, this
|
|
2124
894
|
// process lifetime) > the persisted transcript's title > "New chat".
|
|
895
|
+
const { view: runsView } = useAiRuns();
|
|
2125
896
|
const chatOptions = useMemo(() => {
|
|
2126
897
|
const seen = new Set();
|
|
2127
898
|
const list = [];
|
|
2128
899
|
for (const id of openChatIds) {
|
|
2129
900
|
if (seen.has(id)) continue;
|
|
2130
901
|
seen.add(id);
|
|
2131
|
-
const
|
|
2132
|
-
|
|
902
|
+
const stored = chats.find((c) => c.id === id)?.title;
|
|
903
|
+
const title =
|
|
904
|
+
sessionTitles[id] ||
|
|
905
|
+
(stored && stored !== 'New chat' ? stored : null) ||
|
|
906
|
+
runTitleFor(runsView, id) ||
|
|
907
|
+
stored ||
|
|
908
|
+
'New chat';
|
|
909
|
+
list.push({ id, title: shownChatTitle(title), open: true });
|
|
2133
910
|
}
|
|
2134
911
|
for (const c of chats) {
|
|
2135
912
|
if (seen.has(c.id)) continue;
|
|
@@ -2137,189 +914,129 @@ export default function ChatPanel({
|
|
|
2137
914
|
list.push(sessionTitles[c.id] ? { ...c, title: sessionTitles[c.id] } : c);
|
|
2138
915
|
}
|
|
2139
916
|
return list;
|
|
2140
|
-
}, [chats, openChatIds, sessionTitles]);
|
|
917
|
+
}, [chats, openChatIds, sessionTitles, runsView]);
|
|
2141
918
|
|
|
2142
919
|
const connected = status.available !== false;
|
|
2143
920
|
|
|
2144
921
|
return (
|
|
2145
|
-
<
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
type="button"
|
|
2160
|
-
className="st-iconbtn"
|
|
2161
|
-
aria-label="Close assistant"
|
|
2162
|
-
style={{ marginLeft: 'auto' }}
|
|
2163
|
-
onClick={onClose}
|
|
922
|
+
<AiChatIsland hidden={hidden} resizing={resizing} width={width}>
|
|
923
|
+
{/* V2-4.4b — the 03 header (kit `AIPanel chat=…`): spark · the chat's title ⌄ (opens the chat list) ·
|
|
924
|
+
"✦ N" YOUR running chats · New chat · Hide. Hide folds the island to its spark corner icon. */}
|
|
925
|
+
{/* 03 `ai-chat-list`: the list replaces the panel and has its own single header (`ai-cl-hd`) */}
|
|
926
|
+
{menuOpen && connected ? null : (
|
|
927
|
+
<ChatHeader
|
|
928
|
+
connected={connected}
|
|
929
|
+
onToggleList={() => setMenuOpen((v) => !v)}
|
|
930
|
+
onNew={() => {
|
|
931
|
+
newChat();
|
|
932
|
+
setMenuOpen(false);
|
|
933
|
+
}}
|
|
934
|
+
onHide={onClose}
|
|
935
|
+
pin={<PinButtonHost />}
|
|
2164
936
|
>
|
|
2165
|
-
<Close />
|
|
2166
|
-
</button>
|
|
2167
|
-
</div>
|
|
2168
|
-
{connected ? (
|
|
2169
|
-
<div className="chat-bar">
|
|
2170
937
|
<div className="chat-switch">
|
|
2171
938
|
<button
|
|
2172
939
|
type="button"
|
|
2173
940
|
className="chat-switch-trigger"
|
|
2174
941
|
onClick={() => setMenuOpen((v) => !v)}
|
|
2175
|
-
aria-haspopup="listbox"
|
|
2176
942
|
aria-expanded={menuOpen}
|
|
2177
943
|
>
|
|
2178
|
-
<span
|
|
2179
|
-
className={`chat-dot ${busyChats[activeChatId] ? 'chat-dot--busy' : 'chat-dot--idle'}`}
|
|
2180
|
-
/>
|
|
2181
944
|
<span className="chat-switch-title">
|
|
2182
945
|
{chatOptions.find((c) => c.id === activeChatId)?.title || 'New chat'}
|
|
2183
946
|
</span>
|
|
2184
|
-
<span className="chat-switch-
|
|
947
|
+
<span className="chat-switch-chev" aria-hidden="true">
|
|
948
|
+
<StIcon name="chevron-down" size={12} />
|
|
949
|
+
</span>
|
|
2185
950
|
</button>
|
|
2186
|
-
{menuOpen ? (
|
|
2187
|
-
<>
|
|
2188
|
-
<div
|
|
2189
|
-
className="chat-menu-backdrop"
|
|
2190
|
-
onClick={() => {
|
|
2191
|
-
setMenuOpen(false);
|
|
2192
|
-
setOverflowChatId(null);
|
|
2193
|
-
setRenamingChatId(null);
|
|
2194
|
-
}}
|
|
2195
|
-
/>
|
|
2196
|
-
<div className="chat-menu" role="listbox">
|
|
2197
|
-
{chatOptions.map((c) => (
|
|
2198
|
-
<div
|
|
2199
|
-
key={c.id}
|
|
2200
|
-
className={`chat-menu-row${c.id === activeChatId ? ' is-active' : ''}`}
|
|
2201
|
-
>
|
|
2202
|
-
{renamingChatId === c.id ? (
|
|
2203
|
-
<input
|
|
2204
|
-
type="text"
|
|
2205
|
-
className="chat-menu-rename-input"
|
|
2206
|
-
value={renameValue}
|
|
2207
|
-
autoFocus
|
|
2208
|
-
onChange={(e) => setRenameValue(e.target.value)}
|
|
2209
|
-
onBlur={() => commitRename(c.id)}
|
|
2210
|
-
onKeyDown={(e) => {
|
|
2211
|
-
if (e.key === 'Enter') commitRename(c.id);
|
|
2212
|
-
else if (e.key === 'Escape') setRenamingChatId(null);
|
|
2213
|
-
}}
|
|
2214
|
-
/>
|
|
2215
|
-
) : (
|
|
2216
|
-
<button
|
|
2217
|
-
type="button"
|
|
2218
|
-
className="chat-menu-open"
|
|
2219
|
-
onClick={() => {
|
|
2220
|
-
switchTo(c.id);
|
|
2221
|
-
setMenuOpen(false);
|
|
2222
|
-
}}
|
|
2223
|
-
>
|
|
2224
|
-
<span
|
|
2225
|
-
className={`chat-dot ${busyChats[c.id] ? 'chat-dot--busy' : c.open ? 'chat-dot--idle' : 'chat-dot--off'}`}
|
|
2226
|
-
title={busyChats[c.id] ? 'Running' : c.open ? 'Open' : 'Saved'}
|
|
2227
|
-
/>
|
|
2228
|
-
<span className="chat-menu-title">{c.title}</span>
|
|
2229
|
-
</button>
|
|
2230
|
-
)}
|
|
2231
|
-
<div className="chat-menu-overflow-wrap">
|
|
2232
|
-
<button
|
|
2233
|
-
type="button"
|
|
2234
|
-
className="chat-menu-more"
|
|
2235
|
-
aria-label="More options"
|
|
2236
|
-
title="More options"
|
|
2237
|
-
aria-haspopup="menu"
|
|
2238
|
-
aria-expanded={overflowChatId === c.id}
|
|
2239
|
-
onClick={() =>
|
|
2240
|
-
setOverflowChatId((prev) => (prev === c.id ? null : c.id))
|
|
2241
|
-
}
|
|
2242
|
-
>
|
|
2243
|
-
⋯
|
|
2244
|
-
</button>
|
|
2245
|
-
{overflowChatId === c.id ? (
|
|
2246
|
-
<div className="chat-menu-overflow" role="menu" data-testid="chat-overflow-menu">
|
|
2247
|
-
<button type="button" role="menuitem" onClick={() => startRename(c)}>
|
|
2248
|
-
Rename
|
|
2249
|
-
</button>
|
|
2250
|
-
<button type="button" role="menuitem" onClick={() => archiveChat(c.id)}>
|
|
2251
|
-
Archive
|
|
2252
|
-
</button>
|
|
2253
|
-
<button type="button" role="menuitem" onClick={() => copyTranscript(c.id)}>
|
|
2254
|
-
Copy transcript
|
|
2255
|
-
</button>
|
|
2256
|
-
<button
|
|
2257
|
-
type="button"
|
|
2258
|
-
role="menuitem"
|
|
2259
|
-
className="chat-menu-overflow-danger"
|
|
2260
|
-
onClick={() => {
|
|
2261
|
-
setOverflowChatId(null);
|
|
2262
|
-
deleteChat(c.id);
|
|
2263
|
-
}}
|
|
2264
|
-
>
|
|
2265
|
-
Delete
|
|
2266
|
-
</button>
|
|
2267
|
-
</div>
|
|
2268
|
-
) : null}
|
|
2269
|
-
</div>
|
|
2270
|
-
</div>
|
|
2271
|
-
))}
|
|
2272
|
-
</div>
|
|
2273
|
-
</>
|
|
2274
|
-
) : null}
|
|
2275
951
|
</div>
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
952
|
+
{/* S5.11 — "✦ N": YOUR live runs (the run registry), never anyone else's; its list jumps to the artboard. */}
|
|
953
|
+
{connected ? (
|
|
954
|
+
<RunsCount
|
|
955
|
+
activeCanvas={activeCanvas}
|
|
956
|
+
designRel={designRel}
|
|
957
|
+
currentChatId={activeChatId}
|
|
958
|
+
onOpenChat={switchTo}
|
|
959
|
+
onOpenList={() => setMenuOpen(true)}
|
|
960
|
+
/>
|
|
961
|
+
) : null}
|
|
962
|
+
</ChatHeader>
|
|
963
|
+
)}
|
|
964
|
+
{/* S5.12 — the chat list (03 `ai-chat-list`): the title ⌄ opens it in place of the thread. The threads
|
|
965
|
+
stay MOUNTED underneath (hidden, never unmounted) so a running chat keeps streaming. */}
|
|
966
|
+
{menuOpen && connected ? (
|
|
967
|
+
<div className="sh-rp-body sh-rp-body--list">
|
|
968
|
+
<ChatList
|
|
969
|
+
projectName={projectName}
|
|
970
|
+
busy={busyChats}
|
|
971
|
+
titles={sessionTitles}
|
|
972
|
+
activeChatId={activeChatId}
|
|
973
|
+
ctx={uiCtx}
|
|
974
|
+
refreshKey={listKey}
|
|
975
|
+
onOpen={(id) => {
|
|
976
|
+
switchTo(id);
|
|
977
|
+
setMenuOpen(false);
|
|
978
|
+
}}
|
|
979
|
+
onBack={() => setMenuOpen(false)}
|
|
980
|
+
onNewChat={() => {
|
|
981
|
+
newChat();
|
|
982
|
+
setMenuOpen(false);
|
|
983
|
+
}}
|
|
984
|
+
// S11.3 (05 · es-edge-panels): "Start a chat about it" — a new chat with the search words in its composer
|
|
985
|
+
onStartChat={(text) => {
|
|
2280
986
|
newChat();
|
|
2281
987
|
setMenuOpen(false);
|
|
988
|
+
sendToAskAI(text);
|
|
2282
989
|
}}
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
990
|
+
onRename={renameChat}
|
|
991
|
+
onCopyTranscript={copyTranscript}
|
|
992
|
+
onArchive={archiveChat}
|
|
993
|
+
onTrashed={closeChat}
|
|
994
|
+
/>
|
|
2287
995
|
</div>
|
|
2288
996
|
) : null}
|
|
2289
|
-
<div
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
997
|
+
<div
|
|
998
|
+
className="sh-rp-body sh-rp-body--chat"
|
|
999
|
+
style={menuOpen && connected ? { display: 'none' } : undefined}
|
|
1000
|
+
>
|
|
1001
|
+
{/* S5.13 (rule `ai-not-connected-yet`) + CONTRACT §7: Ask AI looks the same when Claude is not
|
|
1002
|
+
connected. The field stays, a prompt sent now is KEPT (the server queues it) and the ConnectSheet
|
|
1003
|
+
asks once (NeedsYouSlot). */}
|
|
1004
|
+
{openChatIds.map((id) => {
|
|
1005
|
+
const conn = connsRef.current.get(id);
|
|
1006
|
+
if (!conn) return null;
|
|
1007
|
+
return (
|
|
1008
|
+
<ChatThread
|
|
1009
|
+
key={id}
|
|
1010
|
+
conn={conn}
|
|
1011
|
+
chatId={id}
|
|
1012
|
+
initialMessages={hydratedRef.current.get(id) || []}
|
|
1013
|
+
hidden={id !== activeChatId}
|
|
1014
|
+
picksRef={picksRef}
|
|
1015
|
+
setPick={setPick}
|
|
1016
|
+
activeCanvas={activeCanvas}
|
|
1017
|
+
selected={selected}
|
|
1018
|
+
designRel={designRel}
|
|
1019
|
+
openComments={openComments}
|
|
1020
|
+
selectedClips={selectedClips}
|
|
1021
|
+
justShared={justShared}
|
|
1022
|
+
viewArtboardId={viewArtboardId}
|
|
1023
|
+
panelHidden={hidden}
|
|
1024
|
+
transcriptView={transcriptView}
|
|
1025
|
+
onSetTranscriptView={setTranscriptView}
|
|
1026
|
+
onPermissionRequest={onPermissionRequest}
|
|
1027
|
+
onElicitationRequest={onElicitationRequest}
|
|
1028
|
+
chatTitle={chatOptions.find((c) => c.id === id)?.title || 'New chat'}
|
|
1029
|
+
uiCtx={uiCtx}
|
|
1030
|
+
onCopyTranscript={copyTranscript}
|
|
1031
|
+
suggestOn={suggestOn}
|
|
1032
|
+
onSetSuggestOn={onSetSuggestOn}
|
|
1033
|
+
unavailable={status.available === false}
|
|
1034
|
+
viewer={readOnly}
|
|
1035
|
+
onConnected={recheck}
|
|
1036
|
+
/>
|
|
1037
|
+
);
|
|
1038
|
+
})}
|
|
2322
1039
|
</div>
|
|
2323
|
-
</
|
|
1040
|
+
</AiChatIsland>
|
|
2324
1041
|
);
|
|
2325
1042
|
}
|