@opengeni/react 4.0.2 → 4.0.5-canary.39118806767001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +787 -26
- package/dist/accounts.js +2 -0
- package/dist/accounts.js.map +1 -1
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +6 -3
- package/dist/artifacts-presentation.js +6 -3
- package/dist/artifacts-spreadsheet.d.ts +1 -1
- package/dist/artifacts-spreadsheet.js +6 -3
- package/dist/artifacts.d.ts +5 -1
- package/dist/artifacts.js +542 -278
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-GEHX3KYE.js +20 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-5V3BGLXT.js +15 -0
- package/dist/chunk-2DDJ6YH6.js +41 -0
- package/dist/chunk-2DDJ6YH6.js.map +1 -0
- package/dist/chunk-2EGXXUG4.js +1161 -0
- package/dist/chunk-2EGXXUG4.js.map +1 -0
- package/dist/chunk-2XKRY4GF.js +302 -0
- package/dist/chunk-2XKRY4GF.js.map +1 -0
- package/dist/chunk-2ZUUIMBY.js +343 -0
- package/dist/chunk-2ZUUIMBY.js.map +1 -0
- package/dist/chunk-4F4FGCH2.js +34 -0
- package/dist/chunk-4F4FGCH2.js.map +1 -0
- package/dist/{chunk-Z7WBDB4E.js → chunk-4M2MJLY3.js} +848 -867
- package/dist/chunk-4M2MJLY3.js.map +1 -0
- package/dist/chunk-4U7SHFQ2.js +193 -0
- package/dist/chunk-4U7SHFQ2.js.map +1 -0
- package/dist/chunk-5I4VRWBB.js +56 -0
- package/dist/chunk-5I4VRWBB.js.map +1 -0
- package/dist/{chunk-24M4YBCL.js → chunk-62XZ3IX3.js} +1751 -845
- package/dist/chunk-62XZ3IX3.js.map +1 -0
- package/dist/chunk-77THWHSU.js +308 -0
- package/dist/chunk-77THWHSU.js.map +1 -0
- package/dist/chunk-7CZLTFXF.js +466 -0
- package/dist/chunk-7CZLTFXF.js.map +1 -0
- package/dist/chunk-7N5AD2TC.js +327 -0
- package/dist/chunk-7N5AD2TC.js.map +1 -0
- package/dist/chunk-7SZ7MMCY.js +325 -0
- package/dist/chunk-7SZ7MMCY.js.map +1 -0
- package/dist/chunk-7TG6KTR2.js +3153 -0
- package/dist/chunk-7TG6KTR2.js.map +1 -0
- package/dist/chunk-AIX25FIQ.js +409 -0
- package/dist/chunk-AIX25FIQ.js.map +1 -0
- package/dist/chunk-AT2HD6RQ.js +1936 -0
- package/dist/chunk-AT2HD6RQ.js.map +1 -0
- package/dist/chunk-B27E3V37.js +29 -0
- package/dist/chunk-B27E3V37.js.map +1 -0
- package/dist/{chunk-5M6VTFJ5.js → chunk-B4EDAXMC.js} +37 -13
- package/dist/chunk-B4EDAXMC.js.map +1 -0
- package/dist/chunk-BOG2FED3.js +35 -0
- package/dist/chunk-BOG2FED3.js.map +1 -0
- package/dist/chunk-BQYQU5QW.js +109 -0
- package/dist/chunk-BQYQU5QW.js.map +1 -0
- package/dist/{chunk-PAJU5KKL.js → chunk-BRIOXCLH.js} +68 -25
- package/dist/chunk-BRIOXCLH.js.map +1 -0
- package/dist/chunk-CM7LVUKC.js +35 -0
- package/dist/chunk-CM7LVUKC.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-CXIGFHVL.js} +35 -23
- package/dist/chunk-CXIGFHVL.js.map +1 -0
- package/dist/chunk-DHXKEJBH.js +71 -0
- package/dist/chunk-DHXKEJBH.js.map +1 -0
- package/dist/{chunk-NOSYBS2D.js → chunk-DN3TKURW.js} +12 -9
- package/dist/chunk-DN3TKURW.js.map +1 -0
- package/dist/chunk-DNJ23AWQ.js +35 -0
- package/dist/chunk-DNJ23AWQ.js.map +1 -0
- package/dist/chunk-ESAMXNBZ.js +3237 -0
- package/dist/chunk-ESAMXNBZ.js.map +1 -0
- package/dist/{chunk-4MDLEHXL.js → chunk-EWATYP5L.js} +64 -44
- package/dist/chunk-EWATYP5L.js.map +1 -0
- package/dist/{chunk-YBM6CQRU.js → chunk-FQ5CXNUG.js} +65 -42
- package/dist/chunk-FQ5CXNUG.js.map +1 -0
- package/dist/chunk-HEVQKE27.js +150 -0
- package/dist/chunk-HEVQKE27.js.map +1 -0
- package/dist/chunk-HZ47S3DP.js +1086 -0
- package/dist/chunk-HZ47S3DP.js.map +1 -0
- package/dist/chunk-I5BJ7ENY.js +174 -0
- package/dist/chunk-I5BJ7ENY.js.map +1 -0
- package/dist/chunk-IGFZFLI2.js +1390 -0
- package/dist/chunk-IGFZFLI2.js.map +1 -0
- package/dist/chunk-IGVL3ELX.js +46 -0
- package/dist/chunk-IGVL3ELX.js.map +1 -0
- package/dist/chunk-IOD24LGR.js +384 -0
- package/dist/chunk-IOD24LGR.js.map +1 -0
- package/dist/chunk-IOYHDEP3.js +38 -0
- package/dist/chunk-IOYHDEP3.js.map +1 -0
- package/dist/chunk-IQL77TMM.js +803 -0
- package/dist/chunk-IQL77TMM.js.map +1 -0
- package/dist/chunk-IZV5FTJC.js +55 -0
- package/dist/chunk-IZV5FTJC.js.map +1 -0
- package/dist/{chunk-H5YGYNXS.js → chunk-JAYYFOOB.js} +75 -28
- package/dist/chunk-JAYYFOOB.js.map +1 -0
- package/dist/chunk-KN2MYSCC.js +409 -0
- package/dist/chunk-KN2MYSCC.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-KYVJMTXL.js} +434 -145
- package/dist/chunk-KYVJMTXL.js.map +1 -0
- package/dist/{chunk-ZYRGEKWS.js → chunk-LJUMYUBO.js} +3 -1
- package/dist/{chunk-ZYRGEKWS.js.map → chunk-LJUMYUBO.js.map} +1 -1
- package/dist/{chunk-ICA6R6TW.js → chunk-LNUD3JNI.js} +1532 -395
- package/dist/chunk-LNUD3JNI.js.map +1 -0
- package/dist/chunk-M357MHH3.js +2 -0
- package/dist/{chunk-BV5A4OTE.js → chunk-MEL6PH2I.js} +1218 -537
- package/dist/chunk-MEL6PH2I.js.map +1 -0
- package/dist/chunk-MF6WS2XF.js +386 -0
- package/dist/chunk-MF6WS2XF.js.map +1 -0
- package/dist/chunk-MK2TQO4Y.js +24 -0
- package/dist/chunk-MK2TQO4Y.js.map +1 -0
- package/dist/chunk-N7S72EXK.js +25 -0
- package/dist/chunk-N7S72EXK.js.map +1 -0
- package/dist/{chunk-KZ73RL76.js → chunk-NAWXARTY.js} +58 -9
- package/dist/chunk-NAWXARTY.js.map +1 -0
- package/dist/chunk-NX4ADH73.js +14 -0
- package/dist/chunk-NX4ADH73.js.map +1 -0
- package/dist/chunk-OYQQJL3J.js +16 -0
- package/dist/chunk-OYQQJL3J.js.map +1 -0
- package/dist/chunk-P4MKPCTC.js +51 -0
- package/dist/chunk-P4MKPCTC.js.map +1 -0
- package/dist/{chunk-JVYQRRC4.js → chunk-PEHTX3V7.js} +21 -1
- package/dist/chunk-PEHTX3V7.js.map +1 -0
- package/dist/chunk-PMV53IMM.js +26 -0
- package/dist/chunk-PMV53IMM.js.map +1 -0
- package/dist/chunk-PYSEGV5X.js +14396 -0
- package/dist/chunk-PYSEGV5X.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-QOEWDOFW.js} +295 -156
- package/dist/chunk-QOEWDOFW.js.map +1 -0
- package/dist/chunk-QV3DJVRZ.js +11 -0
- package/dist/chunk-QV3DJVRZ.js.map +1 -0
- package/dist/{chunk-HUMIRRYI.js → chunk-QYUYVSNG.js} +1103 -1699
- package/dist/chunk-QYUYVSNG.js.map +1 -0
- package/dist/{chunk-6J56T3MG.js → chunk-RRAQ5FV5.js} +186 -60
- package/dist/chunk-RRAQ5FV5.js.map +1 -0
- package/dist/{chunk-5YK2ZDIG.js → chunk-TNEZNMSN.js} +4 -10
- package/dist/chunk-TNEZNMSN.js.map +1 -0
- package/dist/{chunk-22KP6LR5.js → chunk-TXS65BB2.js} +3 -1
- package/dist/{chunk-22KP6LR5.js.map → chunk-TXS65BB2.js.map} +1 -1
- package/dist/chunk-UIWIOB4U.js +2215 -0
- package/dist/chunk-UIWIOB4U.js.map +1 -0
- package/dist/chunk-UNJPZGNK.js +63 -0
- package/dist/chunk-UNJPZGNK.js.map +1 -0
- package/dist/chunk-V7UGCQHQ.js +86 -0
- package/dist/chunk-V7UGCQHQ.js.map +1 -0
- package/dist/chunk-VU4QUISJ.js +3405 -0
- package/dist/chunk-VU4QUISJ.js.map +1 -0
- package/dist/chunk-WEY5J52U.js +467 -0
- package/dist/chunk-WEY5J52U.js.map +1 -0
- package/dist/chunk-WH2CBESG.js +409 -0
- package/dist/chunk-WH2CBESG.js.map +1 -0
- package/dist/{chunk-VZTQ73XT.js → chunk-XEA5BCMA.js} +3 -1
- package/dist/{chunk-VZTQ73XT.js.map → chunk-XEA5BCMA.js.map} +1 -1
- package/dist/{chunk-NLTS7JHI.js → chunk-XEIHS3RN.js} +834 -403
- package/dist/chunk-XEIHS3RN.js.map +1 -0
- package/dist/chunk-YNXZRE3F.js +408 -0
- package/dist/chunk-YNXZRE3F.js.map +1 -0
- package/dist/chunk-YSRBFJMQ.js +43 -0
- package/dist/chunk-YSRBFJMQ.js.map +1 -0
- package/dist/{chunk-NEXLLTP4.js → chunk-ZGFU4LVW.js} +6 -5
- package/dist/chunk-ZGFU4LVW.js.map +1 -0
- package/dist/chunk-ZO35BAMO.js +172 -0
- package/dist/chunk-ZO35BAMO.js.map +1 -0
- package/dist/chunk-ZUWF4NF7.js +13 -0
- package/dist/chunk-ZUWF4NF7.js.map +1 -0
- package/dist/client.d.ts +15 -6
- package/dist/clipboard.js +3 -1
- package/dist/commands/registry.d.ts +2 -1
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/anthropic-mark.d.ts +3 -0
- package/dist/components/approval-surface.d.ts +21 -7
- package/dist/components/artifacts/artifact-chrome.d.ts +121 -0
- package/dist/components/artifacts/artifact-sandbox.d.ts +30 -0
- package/dist/components/artifacts/artifact-surface.d.ts +4 -2
- package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
- package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
- package/dist/components/artifacts/document-editor.d.ts +4 -2
- package/dist/components/artifacts/editable-artifact-ui.d.ts +4 -2
- package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
- package/dist/components/artifacts/editable-document.d.ts +3 -2
- package/dist/components/artifacts/editable-presentation.d.ts +4 -3
- package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
- package/dist/components/artifacts/index.d.ts +8 -1
- package/dist/components/artifacts/inline-html-document.d.ts +2 -0
- package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
- package/dist/components/artifacts/presentation-editor.d.ts +6 -2
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +17 -40
- package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
- package/dist/components/artifacts/site-view.d.ts +26 -0
- package/dist/components/artifacts/spreadsheet-command-queue.d.ts +20 -0
- package/dist/components/artifacts/spreadsheet-download.d.ts +7 -0
- package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +11 -4
- package/dist/components/artifacts/spreadsheet-resize.d.ts +50 -0
- package/dist/components/artifacts/spreadsheet-submissions.d.ts +9 -0
- package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
- package/dist/components/browser-select-control.d.ts +16 -0
- package/dist/components/browser-viewer.d.ts +11 -2
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/child-session-link.d.ts +5 -1
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/command-palette.d.ts +1 -1
- package/dist/components/composer-transcription-control.d.ts +7 -0
- package/dist/components/composer.d.ts +30 -67
- package/dist/components/computer-viewer.d.ts +1 -1
- package/dist/components/copy-button.d.ts +3 -1
- package/dist/components/desktop-viewer.d.ts +1 -1
- package/dist/components/generated-video-player.d.ts +1 -1
- package/dist/components/grok-mark.d.ts +26 -0
- package/dist/components/human-input-form.d.ts +26 -32
- package/dist/components/human-input-surface.d.ts +5 -1
- package/dist/components/linkified-text.d.ts +18 -0
- package/dist/components/machine-input-display.d.ts +25 -3
- package/dist/components/machine-status-pill.d.ts +3 -2
- package/dist/components/machines/agent-status-icon.d.ts +6 -0
- package/dist/components/machines/health.d.ts +2 -1
- package/dist/components/machines/machine-detail.d.ts +7 -1
- package/dist/components/machines/machine-status.d.ts +49 -0
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/series.d.ts +3 -2
- package/dist/components/markdown-table-layout.d.ts +11 -2
- package/dist/components/markdown.d.ts +37 -4
- package/dist/components/message-timeline.d.ts +79 -7
- package/dist/components/model-mark.d.ts +29 -0
- package/dist/components/model-picker.d.ts +1 -1
- package/dist/components/model-policy-picker.d.ts +31 -22
- package/dist/components/new-conversation.d.ts +32 -0
- package/dist/components/open-geni-chat.d.ts +73 -0
- package/dist/components/open-geni-links.d.ts +69 -0
- package/dist/components/openrouter-mark.d.ts +6 -0
- package/dist/components/opper-mark.d.ts +7 -0
- package/dist/components/preview-loading.d.ts +2 -0
- package/dist/components/provider-recovery-notice.d.ts +17 -0
- package/dist/components/queue-item-content.d.ts +10 -0
- package/dist/components/rehype-secret-refs.d.ts +23 -0
- package/dist/components/remark-soft-line-breaks.d.ts +38 -0
- package/dist/components/sandbox-workspace.d.ts +18 -0
- package/dist/components/secret-question-field.d.ts +31 -0
- package/dist/components/secret-ref-chip.d.ts +35 -0
- package/dist/components/session-capability-frame.d.ts +37 -0
- package/dist/components/session-chrome.d.ts +20 -7
- package/dist/components/session-commands.d.ts +6 -0
- package/dist/components/session-connection-request.d.ts +8 -0
- package/dist/components/session-conversation.d.ts +147 -6
- package/dist/components/session-list.d.ts +39 -0
- package/dist/components/session-mcp-capability-card.d.ts +41 -0
- package/dist/components/session-proxy-scope.d.ts +35 -0
- package/dist/components/session-status.d.ts +6 -2
- package/dist/components/session-usage-limit-notice.d.ts +39 -0
- package/dist/components/this-computer/illustrations.d.ts +38 -0
- package/dist/components/this-computer/labels.d.ts +111 -0
- package/dist/components/this-computer/this-computer-card.d.ts +40 -0
- package/dist/components/this-computer/this-computer-setup.d.ts +35 -0
- package/dist/components/this-computer/this-computer-status.d.ts +42 -0
- package/dist/components/this-computer/use-this-computer.d.ts +29 -0
- package/dist/components/timeline-anchor.d.ts +3 -0
- package/dist/components/timeline-annotation-shared.d.ts +3 -2
- package/dist/components/timeline-annotations-dialog.d.ts +2 -1
- package/dist/components/timeline-annotations.d.ts +5 -1
- package/dist/components/timeline-reading-progress.d.ts +11 -0
- package/dist/components/timeline-search.d.ts +34 -0
- package/dist/components/timeline-settlement.d.ts +16 -0
- package/dist/components/tool-action-review.d.ts +48 -0
- package/dist/components/tool-review-history.d.ts +25 -0
- package/dist/components/usage-limit-notice.d.ts +50 -0
- package/dist/components/usage-member-list.d.ts +92 -0
- package/dist/components/usage-meter.d.ts +74 -0
- package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
- package/dist/components/user-message-body.d.ts +10 -1
- package/dist/components/workbench-changes.d.ts +2 -1
- package/dist/composer-messages.d.ts +75 -0
- package/dist/composer-messages.js +9 -0
- package/dist/composer-messages.js.map +1 -0
- package/dist/composer-voice-events.d.ts +8 -0
- package/dist/composer.d.ts +3 -3
- package/dist/composer.js +25 -12
- package/dist/computer-viewer-VOIOZGVZ.js +21 -0
- package/dist/computer-viewer-VOIOZGVZ.js.map +1 -0
- package/dist/connect-account-identity.d.ts +8 -0
- package/dist/connect-accounts.d.ts +15 -0
- package/dist/connect-chooser.d.ts +18 -0
- package/dist/connect-panel.d.ts +18 -0
- package/dist/connect-setup.d.ts +18 -0
- package/dist/connect.d.ts +21 -0
- package/dist/connect.js +2216 -0
- package/dist/connect.js.map +1 -0
- package/dist/connection-catalog.d.ts +38 -0
- package/dist/connection-discovery.d.ts +12 -0
- package/dist/connection-installed.d.ts +17 -0
- package/dist/connection-logo.d.ts +9 -0
- package/dist/connection-service-logo.d.ts +8 -0
- package/dist/connection-service-presentation.d.ts +13 -0
- package/dist/connection-skeleton.d.ts +5 -0
- package/dist/connection-type-picker.d.ts +6 -0
- package/dist/conversation-timeline.d.ts +1 -1
- package/dist/desktop.d.ts +7 -0
- package/dist/desktop.js +28 -0
- package/dist/desktop.js.map +1 -0
- package/dist/device-authorization.d.ts +23 -0
- package/dist/diffs.d.ts +8 -0
- package/dist/diffs.js +15 -0
- package/dist/diffs.js.map +1 -0
- package/dist/discovery-cache.d.ts +5 -0
- package/dist/editor.d.ts +7 -0
- package/dist/editor.js +23 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-new-voice-KPLC5UJZ.js +19 -0
- package/dist/embedded-new-voice-KPLC5UJZ.js.map +1 -0
- package/dist/embedded-voice-V2RFSLIU.js +19 -0
- package/dist/embedded-voice-V2RFSLIU.js.map +1 -0
- package/dist/fleet-decision-row-FE73NSQ6.js +361 -0
- package/dist/fleet-decision-row-FE73NSQ6.js.map +1 -0
- package/dist/hooks/internal.d.ts +27 -2
- package/dist/hooks/latest-question.d.ts +26 -0
- package/dist/hooks/session-view-cache.d.ts +38 -0
- package/dist/hooks/shared-machines-list.d.ts +4 -0
- package/dist/hooks/shared-query.d.ts +123 -0
- package/dist/hooks/use-attached-browsers.d.ts +1 -1
- package/dist/hooks/use-auth-runs.d.ts +1 -4
- package/dist/hooks/use-available-models.d.ts +8 -3
- package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
- package/dist/hooks/use-browser-session.d.ts +12 -1
- package/dist/hooks/use-client-config-flags.d.ts +49 -0
- package/dist/hooks/use-codex-accounts.d.ts +48 -9
- package/dist/hooks/use-composer.d.ts +24 -3
- package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
- package/dist/hooks/use-computer-input-posture.d.ts +13 -0
- package/dist/hooks/use-computer-session.d.ts +5 -0
- package/dist/hooks/use-connect.d.ts +23 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +4 -0
- package/dist/hooks/use-goal.d.ts +2 -1
- package/dist/hooks/use-last-started-turn-policy.d.ts +5 -1
- package/dist/hooks/use-machine-chip.d.ts +3 -2
- package/dist/hooks/use-new-conversation.d.ts +56 -0
- package/dist/hooks/use-new-session-draft.d.ts +74 -0
- package/dist/hooks/use-realtime-voice-models.d.ts +7 -0
- package/dist/hooks/use-sandbox-files.d.ts +3 -2
- package/dist/hooks/use-session-conversation.d.ts +49 -0
- package/dist/hooks/use-session-events.d.ts +21 -2
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session-model-account.d.ts +48 -0
- package/dist/hooks/use-supergrok-accounts.d.ts +7 -1
- package/dist/hooks/use-terminal-stream.d.ts +11 -5
- package/dist/hooks/use-transcription.d.ts +2 -1
- package/dist/hooks/use-usage.d.ts +40 -0
- package/dist/hooks/use-vaults.d.ts +53 -0
- package/dist/hooks/use-voice-input.d.ts +8 -1
- package/dist/hooks/use-workspace-sessions.d.ts +24 -5
- package/dist/human-input-model.d.ts +123 -0
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +83 -18
- package/dist/index.js +2317 -6453
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +20 -29
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-SXBXROBT.js +118 -0
- package/dist/latest-question-SXBXROBT.js.map +1 -0
- package/dist/lib/client-config-read.d.ts +31 -0
- package/dist/lib/clipboard.d.ts +7 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +59 -9
- package/dist/lib/host-theme.d.ts +77 -0
- package/dist/lib/interaction-errors.d.ts +3 -0
- package/dist/lib/menu-styles.d.ts +22 -0
- package/dist/lib/notify-observer.d.ts +2 -0
- package/dist/lib/pierre-diffs-loader.d.ts +20 -0
- package/dist/lib/provider-recovery.d.ts +56 -0
- package/dist/lib/scrollbars.d.ts +11 -0
- package/dist/lib/terminal-input-readiness.d.ts +11 -0
- package/dist/lib/transient-retry.d.ts +26 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.js +12 -6
- package/dist/{markdown-table-layout-3Z3AWBY7.js → markdown-table-layout-3PV2UAAH.js} +51 -9
- package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +15 -0
- package/dist/messages/en.d.ts +3328 -0
- package/dist/messages/runtime.d.ts +69 -0
- package/dist/messages.d.ts +3 -0
- package/dist/messages.js +16 -0
- package/dist/messages.js.map +1 -0
- package/dist/model-mark-paths.d.ts +34 -0
- package/dist/model-mark-paths.js +16 -0
- package/dist/model-mark-paths.js.map +1 -0
- package/dist/model-picker-model.d.ts +112 -0
- package/dist/model-picker-model.js +25 -0
- package/dist/model-picker-model.js.map +1 -0
- package/dist/model-policy-picker-menu-NWIETWSR.js +18 -0
- package/dist/model-policy-picker-menu-NWIETWSR.js.map +1 -0
- package/dist/model-policy.d.ts +35 -10
- package/dist/model-policy.js +12 -1
- package/dist/native-previews.d.ts +29 -0
- package/dist/native-previews.js +82 -0
- package/dist/native-previews.js.map +1 -0
- package/dist/new-session-draft.d.ts +7 -0
- package/dist/new-session-draft.js +639 -0
- package/dist/new-session-draft.js.map +1 -0
- package/dist/notification-text.d.ts +27 -0
- package/dist/{noto-sans-arabic-loader-IA2T4X2A.js → noto-sans-arabic-loader-XSH2KYWJ.js} +3 -1
- package/dist/{noto-sans-arabic-loader-IA2T4X2A.js.map → noto-sans-arabic-loader-XSH2KYWJ.js.map} +1 -1
- package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js → noto-sans-jp-loader.generated-MR5L6V7K.js} +3 -1
- package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js.map → noto-sans-jp-loader.generated-MR5L6V7K.js.map} +1 -1
- package/dist/organization-model.d.ts +33 -0
- package/dist/organization-model.js +65 -0
- package/dist/organization-model.js.map +1 -0
- package/dist/platform-activity-row-VSQ2FZ5T.js +119 -0
- package/dist/platform-activity-row-VSQ2FZ5T.js.map +1 -0
- package/dist/plugin-details.d.ts +14 -0
- package/dist/plugin-discovery.d.ts +25 -0
- package/dist/preview-loading-paint.d.ts +20 -0
- package/dist/provider.d.ts +37 -2
- package/dist/queue-presentation-model.d.ts +73 -0
- package/dist/queue-presentation-model.js +38 -0
- package/dist/queue-presentation-model.js.map +1 -0
- package/dist/{queue-surface-implementation-LK3S4BIW.js → queue-surface-implementation-MEKXXWGR.js} +189 -343
- package/dist/queue-surface-implementation-MEKXXWGR.js.map +1 -0
- package/dist/realtime/embedded-new-voice.d.ts +1 -0
- package/dist/realtime/embedded-voice.d.ts +1 -0
- package/dist/realtime/realtime-control.d.ts +4 -65
- package/dist/realtime/session-realtime.d.ts +79 -0
- package/dist/realtime.js +26 -1333
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-5NRC2QUT.js +24 -0
- package/dist/sandbox-files-5NRC2QUT.js.map +1 -0
- package/dist/sandbox-label-model.d.ts +31 -0
- package/dist/sandbox-label-model.js +20 -0
- package/dist/sandbox-label-model.js.map +1 -0
- package/dist/scrollbars.d.ts +1 -0
- package/dist/scrollbars.js +10 -0
- package/dist/scrollbars.js.map +1 -0
- package/dist/secret-reference-label.d.ts +15 -0
- package/dist/secrets-ui.d.ts +57 -0
- package/dist/session-agents-model.d.ts +11 -0
- package/dist/session-agents-model.js +25 -0
- package/dist/session-agents-model.js.map +1 -0
- package/dist/session-attention-model.d.ts +8 -0
- package/dist/session-attention-model.js +47 -0
- package/dist/session-attention-model.js.map +1 -0
- package/dist/session-auth-recommendation.d.ts +6 -0
- package/dist/session-capability-policy.d.ts +32 -0
- package/dist/session-context.d.ts +9 -1
- package/dist/session-feedback-model.d.ts +21 -0
- package/dist/session-feedback-model.js +56 -0
- package/dist/session-feedback-model.js.map +1 -0
- package/dist/session-list-model.d.ts +139 -0
- package/dist/session-list-model.js +274 -0
- package/dist/session-list-model.js.map +1 -0
- package/dist/session-realtime-OZCE6IKP.js +22 -0
- package/dist/session-realtime-OZCE6IKP.js.map +1 -0
- package/dist/session-realtime.d.ts +7 -0
- package/dist/session-realtime.js +20 -0
- package/dist/session-realtime.js.map +1 -0
- package/dist/session-status-model.d.ts +37 -0
- package/dist/session-ui.d.ts +40 -3
- package/dist/session-ui.js +127 -21
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +10 -2
- package/dist/session.js +44 -20
- package/dist/site-snapshot.d.ts +14 -0
- package/dist/sites-ui.d.ts +24 -0
- package/dist/sites.d.ts +3 -0
- package/dist/sites.js +15 -0
- package/dist/sites.js.map +1 -0
- package/dist/skill-discovery.d.ts +47 -0
- package/dist/terminal.d.ts +8 -0
- package/dist/terminal.js +33 -0
- package/dist/terminal.js.map +1 -0
- package/dist/testing/session-scenarios.d.ts +10 -0
- package/dist/testing/session-scenarios.js +367 -0
- package/dist/testing/session-scenarios.js.map +1 -0
- package/dist/this-computer.d.ts +8 -0
- package/dist/this-computer.js +1042 -0
- package/dist/this-computer.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +12 -2
- package/dist/timeline/agent-identity.d.ts +30 -0
- package/dist/timeline/agent-row.d.ts +31 -0
- package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
- package/dist/timeline/compaction-copy.d.ts +47 -0
- package/dist/timeline/focus-sequence.d.ts +9 -0
- package/dist/timeline/genie-copy.d.ts +4 -0
- package/dist/timeline/genie-loading.d.ts +48 -0
- package/dist/timeline/index.d.ts +12 -5
- package/dist/timeline/invoked-tool.d.ts +6 -0
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/learning-refusal-copy.d.ts +23 -0
- package/dist/timeline/learning-refusal-row.d.ts +19 -0
- package/dist/timeline/message-sender.d.ts +19 -0
- package/dist/timeline/notice-presentation.d.ts +14 -0
- package/dist/timeline/parsers.d.ts +11 -0
- package/dist/timeline/patch-apply-command.d.ts +19 -0
- package/dist/timeline/platform-activity-presentation.d.ts +26 -0
- package/dist/timeline/platform-activity-row.d.ts +1 -2
- package/dist/timeline/presented-image.d.ts +11 -0
- package/dist/timeline/projection.d.ts +32 -2
- package/dist/timeline/provider-logo.d.ts +15 -0
- package/dist/timeline/question-nav-model.d.ts +23 -0
- package/dist/timeline/registry.d.ts +10 -1
- package/dist/timeline/retained-image.d.ts +18 -0
- package/dist/timeline/retained-loaders.d.ts +27 -0
- package/dist/timeline/rolling-activity.d.ts +11 -0
- package/dist/timeline/screenshot-lightbox.d.ts +23 -1
- package/dist/timeline/session-usage-limit-row.d.ts +11 -0
- package/dist/timeline/shared.d.ts +8 -3
- package/dist/timeline/startup-dispatch-details.d.ts +5 -0
- package/dist/timeline/startup-preference.d.ts +3 -0
- package/dist/timeline/startup-timings.d.ts +4 -0
- package/dist/timeline/tool-display-name.d.ts +6 -2
- package/dist/timeline/tool-presentation.d.ts +185 -0
- package/dist/timeline/turn-summary-model.d.ts +102 -0
- package/dist/timeline/turn-summary.d.ts +20 -54
- package/dist/timeline/types.d.ts +184 -7
- package/dist/timeline/work-presentation.d.ts +61 -0
- package/dist/{timeline-annotation-markers-DRSTLEM6.js → timeline-annotation-markers-HYLRTT6S.js} +11 -6
- package/dist/timeline-annotation-markers-HYLRTT6S.js.map +1 -0
- package/dist/{timeline-annotation-selection-IHLUGVND.js → timeline-annotation-selection-LBKW5GHA.js} +15 -5
- package/dist/timeline-annotation-selection-LBKW5GHA.js.map +1 -0
- package/dist/{timeline-annotations-dialog-6Q53N5FG.js → timeline-annotations-dialog-JKVINC42.js} +34 -19
- package/dist/timeline-annotations-dialog-JKVINC42.js.map +1 -0
- package/dist/timeline-model.d.ts +29 -0
- package/dist/timeline-model.js +254 -0
- package/dist/timeline-model.js.map +1 -0
- package/dist/usage/allowance-copy.d.ts +26 -0
- package/dist/usage/session-usage-limit.d.ts +89 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +17 -0
- package/dist/usage.js +1201 -0
- package/dist/usage.js.map +1 -0
- package/dist/voice-recording-owner.d.ts +7 -0
- package/package.json +119 -7
- package/src/approvals.ts +8 -1
- package/src/artifacts-spreadsheet.ts +1 -0
- package/src/artifacts.ts +41 -0
- package/src/assets/README.md +8 -0
- package/src/assets/gmail.ico +0 -0
- package/src/assets/outlook.ico +0 -0
- package/src/capability-catalog-row.tsx +96 -0
- package/src/capability-logo-fallback.ts +22 -0
- package/src/client.ts +18 -30
- package/src/commands/registry.ts +46 -36
- package/src/commands/types.ts +2 -0
- package/src/components/anthropic-mark.tsx +10 -0
- package/src/components/approval-surface.tsx +407 -142
- package/src/components/artifacts/artifact-chrome.tsx +425 -0
- package/src/components/artifacts/artifact-sandbox.tsx +193 -0
- package/src/components/artifacts/artifact-surface.tsx +48 -26
- package/src/components/artifacts/chat-interactive-block.tsx +260 -0
- package/src/components/artifacts/deferred-chat-media.tsx +72 -0
- package/src/components/artifacts/document-editor.tsx +193 -45
- package/src/components/artifacts/editable-artifact-ui.tsx +23 -11
- package/src/components/artifacts/editable-artifact-view.tsx +199 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +8 -3
- package/src/components/artifacts/editable-document.tsx +76 -54
- package/src/components/artifacts/editable-presentation.tsx +86 -40
- package/src/components/artifacts/editable-spreadsheet.tsx +581 -121
- package/src/components/artifacts/index.ts +42 -0
- package/src/components/artifacts/inline-html-document.ts +24 -0
- package/src/components/artifacts/latest-task-runner.ts +49 -0
- package/src/components/artifacts/presentation-editor.tsx +422 -122
- package/src/components/artifacts/published-html-artifact-frame.tsx +79 -265
- package/src/components/artifacts/session-artifact-viewer.tsx +381 -0
- package/src/components/artifacts/site-view.tsx +129 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-command-queue.ts +190 -0
- package/src/components/artifacts/spreadsheet-download.tsx +117 -0
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +390 -172
- package/src/components/artifacts/spreadsheet-resize.tsx +432 -0
- package/src/components/artifacts/spreadsheet-submissions.tsx +46 -0
- package/src/components/artifacts/visualization-assets/base.css +1015 -0
- package/src/components/artifacts/visualization-assets/helpers.html +349 -0
- package/src/components/artifacts/visualization-assets.gen.ts +3 -0
- package/src/components/browser-select-control.tsx +320 -0
- package/src/components/browser-viewer.tsx +1102 -505
- package/src/components/chat-composer.tsx +42 -3
- package/src/components/child-session-link.tsx +16 -5
- package/src/components/claude-mark.tsx +11 -0
- package/src/components/code-editor.tsx +38 -27
- package/src/components/command-palette.tsx +4 -1
- package/src/components/composer-transcription-control.tsx +151 -50
- package/src/components/composer.tsx +281 -176
- package/src/components/computer-viewer.tsx +1013 -341
- package/src/components/copy-button.tsx +17 -7
- package/src/components/desktop-viewer.tsx +42 -33
- package/src/components/diff-view.tsx +3 -1
- package/src/components/enrollment-consent.tsx +39 -34
- package/src/components/enrollment-device-flow.tsx +31 -19
- package/src/components/file-browser.tsx +47 -35
- package/src/components/fleet-tile.tsx +8 -4
- package/src/components/generated-video-player.tsx +10 -5
- package/src/components/grok-mark.tsx +34 -0
- package/src/components/human-input-form.tsx +438 -251
- package/src/components/human-input-surface.tsx +8 -0
- package/src/components/interaction-intervention-banner.tsx +15 -13
- package/src/components/linkified-text.tsx +79 -0
- package/src/components/machine-card.tsx +56 -89
- package/src/components/machine-dock-bar.tsx +10 -4
- package/src/components/machine-health-pill.tsx +4 -2
- package/src/components/machine-input-display.ts +309 -34
- package/src/components/machine-metrics.tsx +10 -7
- package/src/components/machine-status-pill.tsx +23 -15
- package/src/components/machines/agent-status-icon.tsx +31 -0
- package/src/components/machines/health.ts +53 -10
- package/src/components/machines/machine-detail.tsx +230 -42
- package/src/components/machines/machine-operation-policy.tsx +36 -29
- package/src/components/machines/machine-status.ts +264 -0
- package/src/components/machines/metric-history-chart.tsx +8 -2
- package/src/components/machines/series.ts +12 -11
- package/src/components/machines-dashboard.tsx +16 -9
- package/src/components/markdown-table-layout.ts +67 -9
- package/src/components/markdown.tsx +470 -133
- package/src/components/message-timeline.tsx +2290 -752
- package/src/components/model-mark.tsx +102 -0
- package/src/components/model-picker.tsx +27 -9
- package/src/components/model-policy-picker-menu.tsx +204 -100
- package/src/components/model-policy-picker.tsx +215 -152
- package/src/components/new-conversation.tsx +223 -0
- package/src/components/open-geni-chat.tsx +311 -0
- package/src/components/open-geni-links.tsx +183 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/opper-mark.tsx +18 -0
- package/src/components/pierre-diff.tsx +47 -19
- package/src/components/pierre-file.tsx +38 -11
- package/src/components/preview-loading.tsx +111 -0
- package/src/components/provider-recovery-notice.tsx +51 -0
- package/src/components/queue-item-content.ts +16 -0
- package/src/components/queue-surface-implementation.tsx +185 -420
- package/src/components/queue-surface-state.tsx +13 -8
- package/src/components/queue-surface.tsx +3 -1
- package/src/components/rehype-secret-refs.ts +98 -0
- package/src/components/remark-soft-line-breaks.ts +166 -0
- package/src/components/sandbox-files.tsx +75 -44
- package/src/components/sandbox-terminal.tsx +103 -22
- package/src/components/sandbox-workspace.tsx +168 -78
- package/src/components/secret-question-field.tsx +326 -0
- package/src/components/secret-ref-chip.tsx +187 -0
- package/src/components/session-capability-frame.tsx +203 -0
- package/src/components/session-chrome.tsx +559 -328
- package/src/components/session-commands-panel.tsx +34 -17
- package/src/components/session-commands.tsx +18 -0
- package/src/components/session-connection-request.tsx +99 -0
- package/src/components/session-conversation.tsx +853 -118
- package/src/components/session-list.tsx +259 -0
- package/src/components/session-mcp-capability-card.tsx +681 -0
- package/src/components/session-proxy-scope.tsx +160 -0
- package/src/components/session-status.tsx +35 -21
- package/src/components/session-usage-limit-notice.tsx +176 -0
- package/src/components/this-computer/illustrations.tsx +164 -0
- package/src/components/this-computer/labels.ts +234 -0
- package/src/components/this-computer/this-computer-card.tsx +203 -0
- package/src/components/this-computer/this-computer-setup.tsx +433 -0
- package/src/components/this-computer/this-computer-status.tsx +329 -0
- package/src/components/this-computer/use-this-computer.ts +183 -0
- package/src/components/timeline-anchor.tsx +43 -15
- package/src/components/timeline-annotation-chrome.tsx +33 -9
- package/src/components/timeline-annotation-markers.tsx +4 -2
- package/src/components/timeline-annotation-selection.tsx +11 -2
- package/src/components/timeline-annotation-shared.ts +9 -8
- package/src/components/timeline-annotations-dialog.tsx +30 -9
- package/src/components/timeline-annotations.tsx +24 -7
- package/src/components/timeline-reading-progress.ts +80 -0
- package/src/components/timeline-search.tsx +168 -0
- package/src/components/timeline-settlement.ts +60 -0
- package/src/components/tool-action-review.tsx +670 -0
- package/src/components/tool-review-history.tsx +88 -0
- package/src/components/usage-limit-notice.tsx +183 -0
- package/src/components/usage-member-list.tsx +797 -0
- package/src/components/usage-meter.tsx +386 -0
- package/src/components/use-viewer-menu-dismiss.ts +33 -0
- package/src/components/user-message-body.tsx +33 -2
- package/src/components/workbench-changes.tsx +28 -16
- package/src/components/workspace-dock.tsx +45 -13
- package/src/composer-messages.ts +153 -0
- package/src/composer-voice-events.ts +12 -0
- package/src/composer.ts +4 -0
- package/src/connect-account-identity.tsx +38 -0
- package/src/connect-accounts.tsx +233 -0
- package/src/connect-chooser.tsx +339 -0
- package/src/connect-panel.tsx +104 -0
- package/src/connect-setup.tsx +354 -0
- package/src/connect.ts +60 -0
- package/src/connection-assets.d.ts +4 -0
- package/src/connection-catalog.tsx +175 -0
- package/src/connection-discovery.tsx +251 -0
- package/src/connection-installed.tsx +56 -0
- package/src/connection-logo.tsx +37 -0
- package/src/connection-service-logo.tsx +55 -0
- package/src/connection-service-presentation.ts +46 -0
- package/src/connection-skeleton.tsx +16 -0
- package/src/connection-type-picker.tsx +38 -0
- package/src/conversation-timeline.ts +11 -2
- package/src/desktop.ts +24 -0
- package/src/device-authorization.tsx +111 -0
- package/src/diffs.ts +16 -0
- package/src/discovery-cache.ts +42 -0
- package/src/editor.ts +13 -0
- package/src/hooks/internal.ts +93 -10
- package/src/hooks/latest-question.ts +168 -0
- package/src/hooks/session-view-cache.ts +167 -0
- package/src/hooks/shared-machines-list.ts +34 -1
- package/src/hooks/shared-query.ts +744 -0
- package/src/hooks/use-attached-browsers.ts +1 -1
- package/src/hooks/use-auth-runs.ts +0 -27
- package/src/hooks/use-available-models.ts +20 -10
- package/src/hooks/use-browser-frame-stream.ts +23 -4
- package/src/hooks/use-browser-session.ts +684 -206
- package/src/hooks/use-browser-sessions.ts +32 -1
- package/src/hooks/use-client-config-flags.ts +102 -0
- package/src/hooks/use-codex-accounts.ts +216 -43
- package/src/hooks/use-composer.ts +240 -59
- package/src/hooks/use-computer-frame-stream.ts +29 -9
- package/src/hooks/use-computer-input-posture.ts +96 -0
- package/src/hooks/use-computer-session.ts +419 -100
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +19 -3
- package/src/hooks/use-goal.ts +172 -21
- package/src/hooks/use-human-input.ts +16 -2
- package/src/hooks/use-last-started-turn-policy.ts +37 -11
- package/src/hooks/use-machine-chip.ts +13 -8
- package/src/hooks/use-machines.ts +24 -10
- package/src/hooks/use-new-conversation.ts +377 -0
- package/src/hooks/use-new-session-draft.ts +813 -0
- package/src/hooks/use-realtime-voice-models.ts +46 -0
- package/src/hooks/use-sandbox-files.ts +22 -16
- package/src/hooks/use-session-background-commands.ts +2 -2
- package/src/hooks/use-session-capabilities.ts +3 -2
- package/src/hooks/use-session-conversation.ts +150 -0
- package/src/hooks/use-session-events.ts +403 -64
- package/src/hooks/use-session-lineage.ts +47 -9
- package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
- package/src/hooks/use-session-model-account.ts +174 -0
- package/src/hooks/use-session.ts +19 -3
- package/src/hooks/use-slash-commands.ts +6 -11
- package/src/hooks/use-supergrok-accounts.ts +22 -8
- package/src/hooks/use-terminal-stream.ts +153 -27
- package/src/hooks/use-transcription.ts +45 -19
- package/src/hooks/use-turn-queue.ts +25 -5
- package/src/hooks/use-usage.ts +100 -0
- package/src/hooks/use-vaults.ts +153 -0
- package/src/hooks/use-video-artifact-playback.ts +1 -1
- package/src/hooks/use-voice-input.ts +127 -19
- package/src/hooks/use-workspace-capture.ts +3 -2
- package/src/hooks/use-workspace-sessions.ts +74 -7
- package/src/human-input-model.ts +374 -0
- package/src/identity-link-accounts.tsx +149 -0
- package/src/identity-link-consent.tsx +193 -0
- package/src/index.ts +282 -16
- package/src/interaction.ts +1 -0
- package/src/lib/client-config-read.ts +76 -0
- package/src/lib/clipboard.ts +29 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +231 -36
- package/src/lib/host-theme.ts +529 -0
- package/src/lib/interaction-errors.ts +15 -0
- package/src/lib/menu-styles.ts +44 -0
- package/src/lib/notify-observer.ts +15 -0
- package/src/lib/pierre-diffs-loader.ts +53 -0
- package/src/lib/provider-recovery.ts +255 -0
- package/src/lib/scrollbars.ts +30 -0
- package/src/lib/terminal-input-readiness.ts +51 -0
- package/src/lib/transient-retry.ts +101 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/mcp-connection-status.ts +39 -0
- package/src/messages/en.ts +3810 -0
- package/src/messages/runtime.tsx +175 -0
- package/src/messages.ts +19 -0
- package/src/model-mark-paths.ts +53 -0
- package/src/model-picker-model.ts +343 -0
- package/src/model-policy.ts +301 -79
- package/src/native-previews.ts +104 -0
- package/src/new-session-draft.ts +22 -0
- package/src/notification-text.ts +81 -0
- package/src/organization-model.ts +123 -0
- package/src/plugin-details.tsx +192 -0
- package/src/plugin-discovery.tsx +209 -0
- package/src/preview-loading-paint.ts +68 -0
- package/src/provider.tsx +105 -21
- package/src/queue-presentation-model.ts +475 -0
- package/src/realtime/dropdown-menu.tsx +19 -12
- package/src/realtime/embedded-new-voice.tsx +1 -0
- package/src/realtime/embedded-voice.tsx +3 -0
- package/src/realtime/realtime-control.tsx +240 -609
- package/src/realtime/session-realtime.ts +582 -0
- package/src/sandbox-label-model.ts +56 -0
- package/src/scrollbars.ts +3 -0
- package/src/secret-reference-label.ts +47 -0
- package/src/secrets-ui.tsx +59 -0
- package/src/session-agents-model.ts +40 -0
- package/src/session-attention-model.ts +62 -0
- package/src/session-auth-recommendation.ts +50 -0
- package/src/session-capability-policy.ts +200 -0
- package/src/session-context.ts +13 -5
- package/src/session-feedback-model.ts +101 -0
- package/src/session-list-model.ts +437 -0
- package/src/session-realtime.ts +18 -0
- package/src/session-status-model.ts +99 -0
- package/src/session-ui.ts +102 -3
- package/src/session.ts +19 -1
- package/src/site-snapshot.ts +74 -0
- package/src/sites-ui.tsx +350 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +221 -0
- package/src/terminal.ts +26 -0
- package/src/testing/session-scenarios.ts +404 -0
- package/src/this-computer.ts +62 -0
- package/src/timeline/activity-rail.tsx +289 -119
- package/src/timeline/agent-identity.tsx +84 -0
- package/src/timeline/agent-row.tsx +235 -0
- package/src/timeline/allowance-exhausted-row.tsx +90 -0
- package/src/timeline/compaction-copy.ts +125 -0
- package/src/timeline/fleet-decision-row.tsx +120 -101
- package/src/timeline/focus-sequence.ts +44 -0
- package/src/timeline/genie-copy.ts +22 -0
- package/src/timeline/genie-loading.tsx +158 -0
- package/src/timeline/index.ts +37 -2
- package/src/timeline/invoked-tool.ts +15 -0
- package/src/timeline/knowledge-receipt.tsx +104 -0
- package/src/timeline/learning-refusal-copy.ts +67 -0
- package/src/timeline/learning-refusal-row.tsx +70 -0
- package/src/timeline/message-sender.tsx +71 -0
- package/src/timeline/notice-presentation.ts +67 -0
- package/src/timeline/parsers.ts +42 -2
- package/src/timeline/patch-apply-command.tsx +139 -0
- package/src/timeline/platform-activity-presentation.ts +219 -0
- package/src/timeline/platform-activity-row.tsx +34 -98
- package/src/timeline/presented-image.ts +63 -0
- package/src/timeline/projection.ts +1556 -71
- package/src/timeline/provider-logo.tsx +53 -0
- package/src/timeline/question-nav-model.ts +28 -0
- package/src/timeline/registry.ts +11 -1
- package/src/timeline/retained-image.ts +102 -0
- package/src/timeline/retained-loaders.ts +91 -0
- package/src/timeline/rolling-activity.tsx +84 -0
- package/src/timeline/screenshot-lightbox.tsx +250 -10
- package/src/timeline/session-usage-limit-row.tsx +44 -0
- package/src/timeline/shared.tsx +76 -29
- package/src/timeline/startup-dispatch-details.tsx +43 -0
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +164 -0
- package/src/timeline/tool-diff.tsx +3 -1
- package/src/timeline/tool-display-name.ts +38 -6
- package/src/timeline/tool-presentation.ts +1552 -0
- package/src/timeline/tool-renderers.tsx +1023 -1265
- package/src/timeline/turn-summary-model.ts +363 -0
- package/src/timeline/turn-summary.tsx +288 -367
- package/src/timeline/types.ts +191 -7
- package/src/timeline/work-presentation.ts +196 -0
- package/src/timeline-model.ts +143 -0
- package/src/usage/allowance-copy.ts +70 -0
- package/src/usage/session-usage-limit.ts +270 -0
- package/src/usage/summary.ts +93 -0
- package/src/usage.ts +70 -0
- package/src/voice-recording-owner.ts +22 -0
- package/styles/compiled.css +2010 -651
- package/styles/connect.css +290 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +286 -9
- package/styles/responsive.css +98 -6
- package/styles/session-capability.css +44 -0
- package/styles/this-computer.css +1042 -0
- package/styles/this-computer.d.ts +1 -0
- package/styles/tokens.css +132 -64
- package/dist/browser-viewer-NTD6UIPR.js +0 -14
- package/dist/chunk-24M4YBCL.js.map +0 -1
- package/dist/chunk-4MDLEHXL.js.map +0 -1
- package/dist/chunk-5M6VTFJ5.js.map +0 -1
- package/dist/chunk-5PQJOCX5.js +0 -902
- package/dist/chunk-5PQJOCX5.js.map +0 -1
- package/dist/chunk-5YK2ZDIG.js.map +0 -1
- package/dist/chunk-6J56T3MG.js.map +0 -1
- package/dist/chunk-BV5A4OTE.js.map +0 -1
- package/dist/chunk-CQG7YUJB.js +0 -10883
- package/dist/chunk-CQG7YUJB.js.map +0 -1
- package/dist/chunk-H5YGYNXS.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-HUMIRRYI.js.map +0 -1
- package/dist/chunk-ICA6R6TW.js.map +0 -1
- package/dist/chunk-JVYQRRC4.js.map +0 -1
- package/dist/chunk-KCGXPP5V.js.map +0 -1
- package/dist/chunk-KZ73RL76.js.map +0 -1
- package/dist/chunk-NEXLLTP4.js.map +0 -1
- package/dist/chunk-NLTS7JHI.js.map +0 -1
- package/dist/chunk-NOSYBS2D.js.map +0 -1
- package/dist/chunk-PAJU5KKL.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-PLYRL5ER.js +0 -164
- package/dist/chunk-PLYRL5ER.js.map +0 -1
- package/dist/chunk-R4KRSFGA.js +0 -290
- package/dist/chunk-R4KRSFGA.js.map +0 -1
- package/dist/chunk-UMECRJRV.js +0 -223
- package/dist/chunk-UMECRJRV.js.map +0 -1
- package/dist/chunk-VRBL3F5E.js +0 -241
- package/dist/chunk-VRBL3F5E.js.map +0 -1
- package/dist/chunk-YBM6CQRU.js.map +0 -1
- package/dist/chunk-Z7WBDB4E.js.map +0 -1
- package/dist/computer-viewer-7TEZC6Y2.js +0 -16
- package/dist/fleet-decision-row-YZ3ZKWMM.js +0 -352
- package/dist/fleet-decision-row-YZ3ZKWMM.js.map +0 -1
- package/dist/hooks/use-environments.d.ts +0 -41
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/markdown-table-layout-3Z3AWBY7.js.map +0 -1
- package/dist/model-policy-picker-menu-3R336DP2.js +0 -13
- package/dist/platform-activity-row-27LKAWZD.js +0 -169
- package/dist/platform-activity-row-27LKAWZD.js.map +0 -1
- package/dist/queue-surface-implementation-LK3S4BIW.js.map +0 -1
- package/dist/timeline-annotation-markers-DRSTLEM6.js.map +0 -1
- package/dist/timeline-annotation-selection-IHLUGVND.js.map +0 -1
- package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +0 -1
- package/src/hooks/use-environments.ts +0 -182
- package/src/hooks/use-packs.ts +0 -157
- /package/dist/{browser-viewer-NTD6UIPR.js.map → browser-viewer-GEHX3KYE.js.map} +0 -0
- /package/dist/{computer-viewer-7TEZC6Y2.js.map → chat-interactive-block-5V3BGLXT.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-3R336DP2.js.map → chunk-M357MHH3.js.map} +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "
|
|
1
|
+
import { useHasToolReview, useRecordedToolReview } from "../components/tool-review-history";
|
|
2
|
+
import { ToolActionReviewCard } from "../components/tool-action-review";
|
|
3
|
+
import { SecretRefText } from "../components/secret-ref-chip";
|
|
4
|
+
import type { ToolReviewStatus } from "@opengeni/sdk";
|
|
5
|
+
import { KnowledgeReceiptRow } from "./knowledge-receipt";
|
|
6
|
+
import { defaultUrlTransform } from "react-markdown";
|
|
7
|
+
import { isRetainedImageContentType, useRetainedImageObjectUrl } from "./retained-image";
|
|
8
|
+
import { parseSandboxFileArtifactReceipt, type RetainedArtifactReference } from "@opengeni/sdk";
|
|
6
9
|
import {
|
|
7
10
|
BoxIcon,
|
|
8
11
|
BrainCircuitIcon,
|
|
@@ -33,28 +36,20 @@ import {
|
|
|
33
36
|
TerminalIcon,
|
|
34
37
|
VideoIcon,
|
|
35
38
|
WrenchIcon,
|
|
39
|
+
type LucideIcon,
|
|
36
40
|
} from "lucide-react";
|
|
37
|
-
import {
|
|
38
|
-
import { formatBytes,
|
|
41
|
+
import { useContext, useState, type ReactNode } from "react";
|
|
42
|
+
import { formatBytes, tryParseJson } from "../lib/format";
|
|
39
43
|
import { useTimelineComputeLabel } from "./compute-label";
|
|
44
|
+
import { ConnectorLogoIcon, useToolConnectorLogo } from "./provider-logo";
|
|
40
45
|
import {
|
|
41
|
-
applyPatchOpsFromToolItem,
|
|
42
|
-
controlCaret,
|
|
43
|
-
execTruncated,
|
|
44
46
|
generatedImageReceipt,
|
|
45
|
-
isExecSessionLostBanner,
|
|
46
|
-
looksBinary,
|
|
47
47
|
mediaPreviewFact,
|
|
48
|
-
parseExecBannerSessionId,
|
|
49
48
|
parseToolArgs,
|
|
50
49
|
retainedScreenshotMetadata,
|
|
51
|
-
|
|
52
|
-
stripExecBanner,
|
|
53
|
-
tailPeek,
|
|
50
|
+
retainedToolResultImages,
|
|
54
51
|
unwrapMcpOutput,
|
|
55
|
-
v4aToGitFileDiff,
|
|
56
52
|
screenshotDataUrl,
|
|
57
|
-
type ApplyPatchOperation,
|
|
58
53
|
} from "./parsers";
|
|
59
54
|
import {
|
|
60
55
|
createToolRegistry,
|
|
@@ -71,18 +66,43 @@ import {
|
|
|
71
66
|
TermBlock,
|
|
72
67
|
Thumbnail,
|
|
73
68
|
ActivityDisclosure,
|
|
69
|
+
CompactActivityContext,
|
|
74
70
|
type DisclosureChip,
|
|
75
71
|
} from "./shared";
|
|
76
72
|
import { RawPatch, ToolDiff } from "./tool-diff";
|
|
73
|
+
import {
|
|
74
|
+
applyPatchPresentation,
|
|
75
|
+
askPresentation,
|
|
76
|
+
execPresentation,
|
|
77
|
+
genericToolIconKind,
|
|
78
|
+
parseDisclosedTools,
|
|
79
|
+
parseSearchHits,
|
|
80
|
+
pathBasename,
|
|
81
|
+
pathDirname,
|
|
82
|
+
machinePresentation,
|
|
83
|
+
runOnPresentation,
|
|
84
|
+
toolRowPresentation,
|
|
85
|
+
toolSearchPreview,
|
|
86
|
+
toolSearchQuery,
|
|
87
|
+
truncatePreview,
|
|
88
|
+
webSearchPresentation,
|
|
89
|
+
writeStdinPresentation,
|
|
90
|
+
type ToolBody,
|
|
91
|
+
type ToolIconKind,
|
|
92
|
+
type ToolPreview,
|
|
93
|
+
type ToolRowPresentation,
|
|
94
|
+
type WebSearchResult,
|
|
95
|
+
} from "./tool-presentation";
|
|
96
|
+
import { isPatchFilename, PatchApplyCommand } from "./patch-apply-command";
|
|
77
97
|
import { mcpToolLeaf, toolDisplayName } from "./tool-display-name";
|
|
98
|
+
import { useOpenGeniLinkResolver } from "../components/open-geni-links";
|
|
99
|
+
import { useOpenGeniText, type OpenGeniText } from "../messages/runtime";
|
|
78
100
|
|
|
79
101
|
/* ----------------------------------------------------------------------------
|
|
80
102
|
Per-tool renderers
|
|
81
|
-
|
|
82
103
|
Each renderer takes one projected `ToolCallItem` and returns an `ActivityDisclosure`
|
|
83
104
|
tuned for that tool's real wire shape. The defaults below populate the
|
|
84
105
|
registry; the mapping is registered at the bottom of the file.
|
|
85
|
-
|
|
86
106
|
Restraint is the rule: compact title + one quiet preview, secondary detail
|
|
87
107
|
only on expand. No loud right-side badges — at most a single settle chip.
|
|
88
108
|
-------------------------------------------------------------------------- */
|
|
@@ -96,226 +116,17 @@ const ICON_SIZE = "size-3.5";
|
|
|
96
116
|
* left-to-right.
|
|
97
117
|
*/
|
|
98
118
|
function RunningPreview({ children }: { children: ReactNode }) {
|
|
119
|
+
const compact = useContext(CompactActivityContext);
|
|
99
120
|
return (
|
|
100
121
|
<span className="inline-flex items-center gap-1.5">
|
|
101
|
-
|
|
122
|
+
{!compact && (
|
|
123
|
+
<span className="size-1.5 shrink-0 animate-og-pulse rounded-full bg-og-status-running" />
|
|
124
|
+
)}
|
|
102
125
|
<span className="min-w-0 truncate">{children}</span>
|
|
103
126
|
</span>
|
|
104
127
|
);
|
|
105
128
|
}
|
|
106
129
|
|
|
107
|
-
/** Prefix a collapsed preview with the host-supplied active compute label. */
|
|
108
|
-
function withComputePreview(label: string | null, preview: string): string {
|
|
109
|
-
if (!label) {
|
|
110
|
-
return preview;
|
|
111
|
-
}
|
|
112
|
-
return `on ${label} · ${preview}`;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/* ---- exec_command ---------------------------------------------------------- */
|
|
116
|
-
|
|
117
|
-
function ExecRenderer({ item }: ToolRendererProps) {
|
|
118
|
-
const args = parseToolArgs(item.arguments);
|
|
119
|
-
const cmd = typeof args.cmd === "string" ? args.cmd : "";
|
|
120
|
-
const workdir = typeof args.workdir === "string" ? args.workdir : null;
|
|
121
|
-
const running = item.status === "running";
|
|
122
|
-
const out = item.output;
|
|
123
|
-
const title = `$ ${cmd}`;
|
|
124
|
-
const computeLabel = useTimelineComputeLabel();
|
|
125
|
-
|
|
126
|
-
// No output event ever arrived (item.output stays undefined from creation):
|
|
127
|
-
// the turn failed before the output insert — most likely a NUL byte in the
|
|
128
|
-
// command output prevented storage. Surface the specific explanation.
|
|
129
|
-
// (Cancelled items bypass this: a cancellation is not a NUL-storage failure.)
|
|
130
|
-
if (item.status === "failed" && out === undefined) {
|
|
131
|
-
return (
|
|
132
|
-
<ActivityDisclosure
|
|
133
|
-
icon={<TerminalIcon className={ICON_SIZE} />}
|
|
134
|
-
iconTone="failed"
|
|
135
|
-
title={title}
|
|
136
|
-
titleMono
|
|
137
|
-
chip={{ tone: "bad", text: "failed" }}
|
|
138
|
-
preview={withComputePreview(computeLabel, "output lost — NUL byte could not be stored")}
|
|
139
|
-
>
|
|
140
|
-
<BodyNote tone="error">
|
|
141
|
-
output contained a NUL byte and could not be stored; the turn failed on this tool's
|
|
142
|
-
output insert — no output event ever arrived.
|
|
143
|
-
</BodyNote>
|
|
144
|
-
</ActivityDisclosure>
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// An output event arrived but the tool still failed (error:true / MCP isError)
|
|
149
|
-
// and the output is empty — show a generic failure rather than claiming NUL.
|
|
150
|
-
// (Cancelled items bypass this: a cancellation is not a tool-call failure.)
|
|
151
|
-
if (item.status === "failed" && (out == null || out === "")) {
|
|
152
|
-
return (
|
|
153
|
-
<ActivityDisclosure
|
|
154
|
-
icon={<TerminalIcon className={ICON_SIZE} />}
|
|
155
|
-
iconTone="failed"
|
|
156
|
-
title={title}
|
|
157
|
-
titleMono
|
|
158
|
-
chip={{ tone: "bad", text: "failed" }}
|
|
159
|
-
preview={withComputePreview(computeLabel, "tool call failed")}
|
|
160
|
-
>
|
|
161
|
-
<BodyNote tone="error">the tool call failed with no output.</BodyNote>
|
|
162
|
-
</ActivityDisclosure>
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
if (running) {
|
|
167
|
-
const streamed = typeof out === "string" ? stripExecBanner(out) : "";
|
|
168
|
-
const runningPreview = streamed ? `${streamed.split("\n").length} lines` : "running…";
|
|
169
|
-
return (
|
|
170
|
-
<ActivityDisclosure
|
|
171
|
-
icon={<TerminalIcon className={ICON_SIZE} />}
|
|
172
|
-
iconTone="running"
|
|
173
|
-
title={title}
|
|
174
|
-
titleMono
|
|
175
|
-
running
|
|
176
|
-
preview={
|
|
177
|
-
<RunningPreview>{withComputePreview(computeLabel, runningPreview)}</RunningPreview>
|
|
178
|
-
}
|
|
179
|
-
>
|
|
180
|
-
{/* The row title is already `$ ${cmd}`; the TermBlock header drops the
|
|
181
|
-
command (command={null}) so it never repeats above the output. */}
|
|
182
|
-
<TermBlock command={null} workdir={workdir} output={streamed} live />
|
|
183
|
-
</ActivityDisclosure>
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const text = typeof out === "string" ? out : stringifyPayload(out);
|
|
188
|
-
const stripped = stripExecBanner(text);
|
|
189
|
-
const bgSession = parseExecBannerSessionId(text);
|
|
190
|
-
const exitCode = sandboxCommandExitCode(text);
|
|
191
|
-
const binary = looksBinary(stripped);
|
|
192
|
-
|
|
193
|
-
// Color is spent on the exception only: a clean exit (0) earns NO chip — the
|
|
194
|
-
// absence of a red token is the success signal. Background sessions surface a
|
|
195
|
-
// muted id; a non-zero exit is the one red token.
|
|
196
|
-
let chip: DisclosureChip | undefined;
|
|
197
|
-
let iconTone: "accent" | "failed" | "muted" = "muted";
|
|
198
|
-
if (bgSession != null) {
|
|
199
|
-
chip = { tone: "muted", text: `session ${bgSession}` };
|
|
200
|
-
} else if (exitCode != null && exitCode !== 0) {
|
|
201
|
-
chip = { tone: "bad", text: `exit ${exitCode}` };
|
|
202
|
-
iconTone = "failed";
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const peek = binary ? "binary output" : tailPeek(stripped) || "(no output)";
|
|
206
|
-
const truncated = execTruncated(text);
|
|
207
|
-
const preview = withComputePreview(computeLabel, truncated ? `⋯ truncated · ${peek}` : peek);
|
|
208
|
-
// Hand TermBlock the FULL stripped output; it owns the tail/show-more slicing.
|
|
209
|
-
const body = binary ? "(binary output suppressed)" : stripped;
|
|
210
|
-
|
|
211
|
-
return (
|
|
212
|
-
<ActivityDisclosure
|
|
213
|
-
icon={<TerminalIcon className={ICON_SIZE} />}
|
|
214
|
-
iconTone={iconTone}
|
|
215
|
-
title={title}
|
|
216
|
-
titleMono
|
|
217
|
-
{...(chip ? { chip } : {})}
|
|
218
|
-
failed={item.status === "failed"}
|
|
219
|
-
cancelled={item.status === "cancelled"}
|
|
220
|
-
preview={preview}
|
|
221
|
-
>
|
|
222
|
-
<TermBlock
|
|
223
|
-
command={null}
|
|
224
|
-
workdir={workdir}
|
|
225
|
-
output={body}
|
|
226
|
-
failed={item.status === "failed" || (exitCode != null && exitCode !== 0)}
|
|
227
|
-
/>
|
|
228
|
-
{bgSession != null ? (
|
|
229
|
-
<BodyNote>↳ session {bgSession} — a later write_stdin can target this PTY.</BodyNote>
|
|
230
|
-
) : null}
|
|
231
|
-
</ActivityDisclosure>
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* ---- write_stdin ----------------------------------------------------------- */
|
|
236
|
-
|
|
237
|
-
function WriteStdinRenderer({ item }: ToolRendererProps) {
|
|
238
|
-
const args = parseToolArgs(item.arguments);
|
|
239
|
-
const sessionId =
|
|
240
|
-
typeof args.session_id === "string" || typeof args.session_id === "number"
|
|
241
|
-
? args.session_id
|
|
242
|
-
: undefined;
|
|
243
|
-
const running = item.status === "running";
|
|
244
|
-
const text = typeof item.output === "string" ? item.output : stringifyPayload(item.output);
|
|
245
|
-
const lost = isExecSessionLostBanner(text);
|
|
246
|
-
const keys = controlCaret(typeof args.chars === "string" ? args.chars : "");
|
|
247
|
-
const exitCode = sandboxCommandExitCode(text);
|
|
248
|
-
const stripped = stripExecBanner(text);
|
|
249
|
-
|
|
250
|
-
if (running) {
|
|
251
|
-
return (
|
|
252
|
-
<ActivityDisclosure
|
|
253
|
-
icon={<KeyboardIcon className={ICON_SIZE} />}
|
|
254
|
-
iconTone="running"
|
|
255
|
-
title={`session ${sessionId} ← ${keys || "∅"}`}
|
|
256
|
-
titleMono
|
|
257
|
-
running
|
|
258
|
-
preview={<RunningPreview>sending…</RunningPreview>}
|
|
259
|
-
>
|
|
260
|
-
<BodyNote>sending input to session {sessionId}…</BodyNote>
|
|
261
|
-
</ActivityDisclosure>
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Success (exit 0 or a quiet ack) earns no chip; only a lost PTY / non-zero
|
|
266
|
-
// exit gets the one red token.
|
|
267
|
-
let chip: DisclosureChip | undefined;
|
|
268
|
-
if (lost) {
|
|
269
|
-
chip = { tone: "bad", text: "lost" };
|
|
270
|
-
} else if (exitCode != null && exitCode !== 0) {
|
|
271
|
-
chip = { tone: "bad", text: `exit ${exitCode}` };
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
return (
|
|
275
|
-
<ActivityDisclosure
|
|
276
|
-
icon={<KeyboardIcon className={ICON_SIZE} />}
|
|
277
|
-
iconTone={lost ? "failed" : "muted"}
|
|
278
|
-
title={`session ${sessionId} ← ${keys || "∅"}`}
|
|
279
|
-
titleMono
|
|
280
|
-
{...(chip ? { chip } : {})}
|
|
281
|
-
failed={item.status === "failed"}
|
|
282
|
-
cancelled={item.status === "cancelled"}
|
|
283
|
-
preview={lost ? `session ${sessionId} PTY vanished` : tailPeek(stripped) || "sent"}
|
|
284
|
-
>
|
|
285
|
-
{lost ? (
|
|
286
|
-
<BodyNote tone="error">{stripped || text}</BodyNote>
|
|
287
|
-
) : (
|
|
288
|
-
<TermBlock command={`write_stdin → session ${sessionId}`} output={stripped} />
|
|
289
|
-
)}
|
|
290
|
-
</ActivityDisclosure>
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/* ---- apply_patch ----------------------------------------------------------- */
|
|
295
|
-
|
|
296
|
-
function verbForOp(op: ApplyPatchOperation | undefined): string {
|
|
297
|
-
if (!op) {
|
|
298
|
-
return "Edited";
|
|
299
|
-
}
|
|
300
|
-
return op.type === "create_file"
|
|
301
|
-
? "Created"
|
|
302
|
-
: op.type === "delete_file"
|
|
303
|
-
? "Deleted"
|
|
304
|
-
: op.moveTo
|
|
305
|
-
? "Renamed"
|
|
306
|
-
: "Edited";
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
function basename(path: string): string {
|
|
310
|
-
const parts = path.split("/").filter(Boolean);
|
|
311
|
-
return parts.length ? parts[parts.length - 1]! : path;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
function dirname(path: string): string {
|
|
315
|
-
const idx = path.lastIndexOf("/");
|
|
316
|
-
return idx >= 0 ? path.slice(0, idx + 1) : "";
|
|
317
|
-
}
|
|
318
|
-
|
|
319
130
|
/**
|
|
320
131
|
* The collapsed-row path preview. Diff magnitude is rendered as a SINGLE muted
|
|
321
132
|
* "+N −M" glyph pair — the saturated add/del green/red is reserved exclusively
|
|
@@ -334,8 +145,8 @@ function PathPreview({
|
|
|
334
145
|
return (
|
|
335
146
|
<span className="inline-flex items-center gap-2 truncate font-og-mono">
|
|
336
147
|
<span className="truncate">
|
|
337
|
-
<span className="text-og-fg-subtle">{
|
|
338
|
-
<span className="text-og-fg-muted">{
|
|
148
|
+
<span className="text-og-fg-subtle">{pathDirname(path)}</span>
|
|
149
|
+
<span className="text-og-fg-muted">{pathBasename(path)}</span>
|
|
339
150
|
</span>
|
|
340
151
|
{add != null || del != null ? (
|
|
341
152
|
<span className="shrink-0 text-og-fg-subtle">
|
|
@@ -348,162 +159,323 @@ function PathPreview({
|
|
|
348
159
|
);
|
|
349
160
|
}
|
|
350
161
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
const firstOp = ops[0];
|
|
357
|
-
|
|
358
|
-
if (running) {
|
|
359
|
-
// Show the patch structure from the arguments (available immediately on
|
|
360
|
-
// creation), but mark the row clearly as in-progress — not applied yet.
|
|
361
|
-
const fileCount = ops.length;
|
|
362
|
-
const titleVerb = firstOp ? `Applying ${basename(firstOp.path)}` : "Applying patch";
|
|
363
|
-
return (
|
|
364
|
-
<ActivityDisclosure
|
|
365
|
-
icon={<FileDiffIcon className={ICON_SIZE} />}
|
|
366
|
-
iconTone="running"
|
|
367
|
-
title={fileCount > 1 ? `Applying ${fileCount} files` : titleVerb}
|
|
368
|
-
running
|
|
369
|
-
preview={
|
|
370
|
-
<RunningPreview>
|
|
371
|
-
{fileCount > 1 ? `${fileCount} files` : firstOp ? firstOp.path : "applying…"}
|
|
372
|
-
</RunningPreview>
|
|
373
|
-
}
|
|
374
|
-
>
|
|
375
|
-
{ops.map((op, index) => {
|
|
376
|
-
const file = safeParseOp(op);
|
|
377
|
-
const key = `${op.type}:${op.path}:${index}`;
|
|
378
|
-
return file ? (
|
|
379
|
-
<ToolDiff key={key} files={[file]} />
|
|
380
|
-
) : (
|
|
381
|
-
<div key={key}>
|
|
382
|
-
<p className="mb-1 font-og-mono text-og-xs text-og-fg-muted">{op.path}</p>
|
|
383
|
-
<RawPatch diff={op.diff ?? ""} />
|
|
384
|
-
</div>
|
|
385
|
-
);
|
|
386
|
-
})}
|
|
387
|
-
</ActivityDisclosure>
|
|
388
|
-
);
|
|
389
|
-
}
|
|
162
|
+
/* ---- shared-model rows ------------------------------------------------------
|
|
163
|
+
exec_command, write_stdin, apply_patch, web search, request_human_input,
|
|
164
|
+
run_on and the generic fallback draw their row from the renderer-neutral
|
|
165
|
+
presentation model in ./tool-presentation, which non-DOM renderers share.
|
|
166
|
+
-------------------------------------------------------------------------- */
|
|
390
167
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
168
|
+
/**
|
|
169
|
+
* The icon for a presentation kind, looked up when a row renders. A module-level
|
|
170
|
+
* table would capture the icons at load time; in a bundle where this module and
|
|
171
|
+
* the icon library's chunk import each other, an icon can still be undefined
|
|
172
|
+
* then, and the row would render an undefined component (React #130).
|
|
173
|
+
*/
|
|
174
|
+
function toolIcon(kind: ToolIconKind): LucideIcon {
|
|
175
|
+
switch (kind) {
|
|
176
|
+
case "terminal":
|
|
177
|
+
return TerminalIcon;
|
|
178
|
+
case "keyboard":
|
|
179
|
+
return KeyboardIcon;
|
|
180
|
+
case "file-diff":
|
|
181
|
+
return FileDiffIcon;
|
|
182
|
+
case "search":
|
|
183
|
+
return SearchIcon;
|
|
184
|
+
case "question":
|
|
185
|
+
return MessageCircleQuestionIcon;
|
|
186
|
+
case "target":
|
|
187
|
+
return TargetIcon;
|
|
188
|
+
case "brain":
|
|
189
|
+
return BrainCircuitIcon;
|
|
190
|
+
case "sessions":
|
|
191
|
+
return MessagesSquareIcon;
|
|
192
|
+
case "server":
|
|
193
|
+
return ServerIcon;
|
|
194
|
+
case "server-cog":
|
|
195
|
+
return ServerCogIcon;
|
|
196
|
+
case "calendar":
|
|
197
|
+
return CalendarClockIcon;
|
|
198
|
+
case "panels":
|
|
199
|
+
return PanelsTopLeftIcon;
|
|
200
|
+
case "share":
|
|
201
|
+
return Share2Icon;
|
|
202
|
+
case "message":
|
|
203
|
+
return MessageSquareIcon;
|
|
204
|
+
case "git":
|
|
205
|
+
return FolderGitIcon;
|
|
206
|
+
case "box":
|
|
207
|
+
return BoxIcon;
|
|
208
|
+
case "key":
|
|
209
|
+
return KeyRoundIcon;
|
|
210
|
+
case "file-search":
|
|
211
|
+
return FileSearchIcon;
|
|
212
|
+
case "package-search":
|
|
213
|
+
return PackageSearchIcon;
|
|
214
|
+
case "plug":
|
|
215
|
+
return PlugIcon;
|
|
216
|
+
case "wrench":
|
|
217
|
+
return WrenchIcon;
|
|
403
218
|
}
|
|
219
|
+
}
|
|
404
220
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
return (
|
|
417
|
-
<ActivityDisclosure
|
|
418
|
-
icon={<FileDiffIcon className={ICON_SIZE} />}
|
|
419
|
-
iconTone="accent"
|
|
420
|
-
title={`Edited ${ops.length} files`}
|
|
421
|
-
cancelled={cancelled}
|
|
422
|
-
preview={
|
|
423
|
-
<span className="inline-flex items-center gap-2 font-og-mono">
|
|
424
|
-
<span className="text-og-fg-muted">{ops.length} files</span>
|
|
425
|
-
<span className="text-og-fg-subtle">
|
|
426
|
-
+{add} −{del}
|
|
427
|
-
</span>
|
|
221
|
+
function presentedPreviewNode(msg: OpenGeniText, preview: ToolPreview): ReactNode {
|
|
222
|
+
switch (preview.kind) {
|
|
223
|
+
case "text":
|
|
224
|
+
return preview.running ? <RunningPreview>{preview.text}</RunningPreview> : preview.text;
|
|
225
|
+
case "path":
|
|
226
|
+
return <PathPreview path={preview.path} add={preview.add} del={preview.del} />;
|
|
227
|
+
case "files":
|
|
228
|
+
return (
|
|
229
|
+
<span className="inline-flex items-center gap-2 font-og-mono">
|
|
230
|
+
<span className="text-og-fg-muted">
|
|
231
|
+
{msg("timeline.toolRenderers.filesCount", { count: preview.count })}
|
|
428
232
|
</span>
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
);
|
|
442
|
-
})}
|
|
443
|
-
</ActivityDisclosure>
|
|
444
|
-
);
|
|
233
|
+
<span className="text-og-fg-subtle">
|
|
234
|
+
+{preview.add} −{preview.del}
|
|
235
|
+
</span>
|
|
236
|
+
</span>
|
|
237
|
+
);
|
|
238
|
+
case "malformed":
|
|
239
|
+
return (
|
|
240
|
+
<span className="inline-flex items-center gap-2 font-og-mono">
|
|
241
|
+
<span className="text-og-fg-muted">{preview.name}</span>
|
|
242
|
+
<span className="text-og-fg-subtle">{msg("timeline.toolRenderers.malformedPatch")}</span>
|
|
243
|
+
</span>
|
|
244
|
+
);
|
|
445
245
|
}
|
|
246
|
+
}
|
|
446
247
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
248
|
+
function PresentedBody({ body }: { body: ToolBody }) {
|
|
249
|
+
switch (body.kind) {
|
|
250
|
+
case "term":
|
|
251
|
+
return (
|
|
252
|
+
<>
|
|
253
|
+
{/* Exec rows pass command={null}: the row title already carries `$ cmd`. */}
|
|
254
|
+
<TermBlock
|
|
255
|
+
command={body.command}
|
|
256
|
+
{...(body.workdir !== null || body.command === null ? { workdir: body.workdir } : {})}
|
|
257
|
+
output={body.output}
|
|
258
|
+
{...(body.live ? { live: true } : {})}
|
|
259
|
+
{...(body.failed !== undefined ? { failed: body.failed } : {})}
|
|
260
|
+
/>
|
|
261
|
+
{body.note ? <BodyNote>{body.note}</BodyNote> : null}
|
|
262
|
+
</>
|
|
263
|
+
);
|
|
264
|
+
case "note":
|
|
265
|
+
return body.tone ? (
|
|
266
|
+
<BodyNote tone={body.tone}>{body.text}</BodyNote>
|
|
267
|
+
) : (
|
|
268
|
+
<BodyNote>{body.text}</BodyNote>
|
|
269
|
+
);
|
|
270
|
+
case "payloads":
|
|
271
|
+
return (
|
|
272
|
+
<>
|
|
273
|
+
{body.note ? <p className="m-0 py-1 text-og-sm text-og-fg-muted">{body.note}</p> : null}
|
|
274
|
+
{body.blocks.map((block) =>
|
|
275
|
+
block.failed ? (
|
|
276
|
+
<PayloadBlock key={block.label} label={block.label} value={block.value} failed />
|
|
277
|
+
) : (
|
|
278
|
+
<PayloadBlock key={block.label} label={block.label} value={block.value} />
|
|
279
|
+
),
|
|
280
|
+
)}
|
|
281
|
+
</>
|
|
282
|
+
);
|
|
283
|
+
case "patch":
|
|
284
|
+
if (body.bare) {
|
|
285
|
+
return <RawPatch diff={body.files[0]?.diff ?? ""} />;
|
|
286
|
+
}
|
|
287
|
+
return (
|
|
288
|
+
<>
|
|
289
|
+
{body.files.map((entry) =>
|
|
290
|
+
entry.file ? (
|
|
291
|
+
<ToolDiff key={entry.key} files={[entry.file]} />
|
|
292
|
+
) : (
|
|
293
|
+
<div key={entry.key}>
|
|
294
|
+
<p className="mb-1 font-og-mono text-og-xs text-og-fg-muted">{entry.path}</p>
|
|
295
|
+
<RawPatch diff={entry.diff} />
|
|
296
|
+
</div>
|
|
297
|
+
),
|
|
298
|
+
)}
|
|
299
|
+
</>
|
|
300
|
+
);
|
|
301
|
+
case "web-results":
|
|
302
|
+
return <WebSearchResults results={body.results} />;
|
|
463
303
|
}
|
|
304
|
+
}
|
|
464
305
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
<span className="text-og-fg-subtle">malformed V4A</span>
|
|
477
|
-
</span>
|
|
478
|
-
}
|
|
479
|
-
>
|
|
480
|
-
<RawPatch diff={firstOp.diff ?? ""} />
|
|
481
|
-
</ActivityDisclosure>
|
|
482
|
-
);
|
|
306
|
+
function WebSearchResults({ results }: { results: WebSearchResult[] | null }) {
|
|
307
|
+
const msg = useOpenGeniText();
|
|
308
|
+
const resultOccurrences = new Map<string, number>();
|
|
309
|
+
const keyedResults = results?.map((result) => {
|
|
310
|
+
const contentKey = `${result.domain}\u0000${result.title}\u0000${result.snippet}`;
|
|
311
|
+
const occurrence = (resultOccurrences.get(contentKey) ?? 0) + 1;
|
|
312
|
+
resultOccurrences.set(contentKey, occurrence);
|
|
313
|
+
return { key: `${contentKey}\u0000${occurrence}`, result };
|
|
314
|
+
});
|
|
315
|
+
if (!keyedResults || !keyedResults.length) {
|
|
316
|
+
return <BodyNote>{msg("timeline.toolRenderers.resultsFoldedIntoModelContext")}</BodyNote>;
|
|
483
317
|
}
|
|
318
|
+
return (
|
|
319
|
+
<ul className="flex flex-col gap-2">
|
|
320
|
+
{keyedResults.map(({ key, result }) => (
|
|
321
|
+
<li key={key} className="flex gap-2.5">
|
|
322
|
+
<GlobeIcon className="mt-0.5 size-3.5 shrink-0 text-og-fg-subtle" />
|
|
323
|
+
<div className="min-w-0">
|
|
324
|
+
<p className="truncate text-og-base text-og-fg">
|
|
325
|
+
{result.title} <span className="text-og-fg-subtle">{result.domain}</span>
|
|
326
|
+
</p>
|
|
327
|
+
<p className="text-og-sm leading-5 text-og-fg-muted">{result.snippet}</p>
|
|
328
|
+
</div>
|
|
329
|
+
</li>
|
|
330
|
+
))}
|
|
331
|
+
</ul>
|
|
332
|
+
);
|
|
333
|
+
}
|
|
484
334
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
335
|
+
/** Draw one shared-model row with the web disclosure primitives. */
|
|
336
|
+
function PresentedToolRow({
|
|
337
|
+
presentation: p,
|
|
338
|
+
logo = null,
|
|
339
|
+
}: {
|
|
340
|
+
presentation: ToolRowPresentation;
|
|
341
|
+
/** A connector's logo, drawn in place of the row's icon. */
|
|
342
|
+
logo?: string | null;
|
|
343
|
+
}) {
|
|
344
|
+
const msg = useOpenGeniText();
|
|
345
|
+
const Icon = toolIcon(p.icon);
|
|
488
346
|
return (
|
|
489
347
|
<ActivityDisclosure
|
|
490
|
-
icon={<
|
|
491
|
-
iconTone=
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
348
|
+
icon={<ConnectorLogoIcon src={logo} fallback={<Icon className={ICON_SIZE} />} />}
|
|
349
|
+
iconTone={p.iconTone}
|
|
350
|
+
// A chip inside the row's own toggle never links.
|
|
351
|
+
title={<SecretRefText text={p.title} linkable={false} />}
|
|
352
|
+
{...(p.titleMono ? { titleMono: true } : {})}
|
|
353
|
+
{...(p.running ? { running: true } : {})}
|
|
354
|
+
{...(p.chip ? { chip: p.chip } : {})}
|
|
355
|
+
{...(p.failed !== undefined ? { failed: p.failed } : {})}
|
|
356
|
+
{...(p.cancelled !== undefined ? { cancelled: p.cancelled } : {})}
|
|
357
|
+
preview={p.preview ? presentedPreviewNode(msg, p.preview) : undefined}
|
|
495
358
|
>
|
|
496
|
-
<
|
|
359
|
+
<PresentedBody body={p.body} />
|
|
497
360
|
</ActivityDisclosure>
|
|
498
361
|
);
|
|
499
362
|
}
|
|
500
363
|
|
|
501
|
-
function
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
364
|
+
function ExecRenderer({ item }: ToolRendererProps) {
|
|
365
|
+
const msg = useOpenGeniText();
|
|
366
|
+
const computeLabel = useTimelineComputeLabel();
|
|
367
|
+
return <PresentedToolRow presentation={execPresentation(msg, item, { computeLabel })} />;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function WriteStdinRenderer({ item }: ToolRendererProps) {
|
|
371
|
+
const msg = useOpenGeniText();
|
|
372
|
+
return <PresentedToolRow presentation={writeStdinPresentation(msg, item)} />;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
function ApplyPatchRenderer({ item }: ToolRendererProps) {
|
|
376
|
+
const msg = useOpenGeniText();
|
|
377
|
+
const presentation = applyPatchPresentation(msg, item);
|
|
378
|
+
return presentation ? (
|
|
379
|
+
<PresentedToolRow presentation={presentation} />
|
|
380
|
+
) : (
|
|
381
|
+
<GenericRenderer item={item} />
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function WebSearchRenderer({ item }: ToolRendererProps) {
|
|
386
|
+
const msg = useOpenGeniText();
|
|
387
|
+
return <PresentedToolRow presentation={webSearchPresentation(msg, item)} />;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function AskRenderer({ item }: ToolRendererProps) {
|
|
391
|
+
const msg = useOpenGeniText();
|
|
392
|
+
return <PresentedToolRow presentation={askPresentation(msg, item)} />;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function RunOnRenderer({ item }: ToolRendererProps) {
|
|
396
|
+
const msg = useOpenGeniText();
|
|
397
|
+
return <PresentedToolRow presentation={runOnPresentation(msg, item)} />;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Finding machines, moving onto one and back, and using its screen. A look at
|
|
402
|
+
* the screen, or an action on it, shows the screenshot it took.
|
|
403
|
+
*/
|
|
404
|
+
function MachineRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
405
|
+
const msg = useOpenGeniText();
|
|
406
|
+
const presentation = machinePresentation(msg, item);
|
|
407
|
+
const retained = mcpToolLeaf(item.name).startsWith("computer_")
|
|
408
|
+
? retainedScreenshotMetadata(item.output)
|
|
409
|
+
: null;
|
|
410
|
+
if (!retained?.available) return <PresentedToolRow presentation={presentation} />;
|
|
411
|
+
return (
|
|
412
|
+
<RetainedSessionImageDisclosure
|
|
413
|
+
artifact={retained}
|
|
414
|
+
load={loadRetainedScreenshot}
|
|
415
|
+
title={presentation.title}
|
|
416
|
+
caption={presentation.title}
|
|
417
|
+
noun="screenshot"
|
|
418
|
+
icon={<CameraIcon className={ICON_SIZE} />}
|
|
419
|
+
lightboxLabel={msg("timeline.toolRenderers.screenshot")}
|
|
420
|
+
batched={null}
|
|
421
|
+
failed={item.status === "failed"}
|
|
422
|
+
cancelled={item.status === "cancelled"}
|
|
423
|
+
/>
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Baseline craft for unmatched tools: family icon + title-cased leaf + honest
|
|
429
|
+
* status preview (Running… / Done / error snippet). No argument-field sniffing —
|
|
430
|
+
* JSON stays in the expandable body only.
|
|
431
|
+
*
|
|
432
|
+
* A tool the shared presenter knows but no dedicated renderer claims (screen
|
|
433
|
+
* steps such as `cua_get_desktop_state`, `interaction_discover`) still reads
|
|
434
|
+
* the way the presenter words it, so the web row and other renderers agree.
|
|
435
|
+
*/
|
|
436
|
+
function UnreviewedGenericRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
437
|
+
const msg = useOpenGeniText();
|
|
438
|
+
const logo = useToolConnectorLogo(item.display);
|
|
439
|
+
const { images, output } = retainedToolResultImages(item.output);
|
|
440
|
+
if (images.length === 0 || item.status === "running") {
|
|
441
|
+
return <PresentedToolRow presentation={toolRowPresentation(msg, item)} logo={logo} />;
|
|
442
|
+
}
|
|
443
|
+
// A tool that returned images shows them like a viewed image, with its
|
|
444
|
+
// ordinary result text (and any further images) in the expanded body.
|
|
445
|
+
const presentation = toolRowPresentation(msg, { ...item, output });
|
|
446
|
+
const Icon = toolIcon(presentation.icon);
|
|
447
|
+
const [first, ...rest] = images;
|
|
448
|
+
return (
|
|
449
|
+
<RetainedSessionImageDisclosure
|
|
450
|
+
artifact={first!}
|
|
451
|
+
load={loadRetainedScreenshot}
|
|
452
|
+
title={presentation.title}
|
|
453
|
+
caption={presentation.title}
|
|
454
|
+
noun="image"
|
|
455
|
+
icon={<ConnectorLogoIcon src={logo} fallback={<Icon className={ICON_SIZE} />} />}
|
|
456
|
+
lightboxLabel={presentation.title}
|
|
457
|
+
batched={null}
|
|
458
|
+
failed={presentation.failed ?? false}
|
|
459
|
+
cancelled={presentation.cancelled ?? false}
|
|
460
|
+
>
|
|
461
|
+
<PresentedBody body={presentation.body} />
|
|
462
|
+
{rest.map((image, index) => (
|
|
463
|
+
<RetainedSessionImageDisclosure
|
|
464
|
+
key={image.artifactId}
|
|
465
|
+
artifact={image}
|
|
466
|
+
load={loadRetainedScreenshot}
|
|
467
|
+
title={msg("timeline.toolRenderers.imageIndex", { index: index + 2 })}
|
|
468
|
+
caption={`${presentation.title}, image ${index + 2}`}
|
|
469
|
+
noun="image"
|
|
470
|
+
icon={<ImageIcon className={ICON_SIZE} />}
|
|
471
|
+
lightboxLabel={presentation.title}
|
|
472
|
+
batched={null}
|
|
473
|
+
failed={false}
|
|
474
|
+
cancelled={false}
|
|
475
|
+
/>
|
|
476
|
+
))}
|
|
477
|
+
</RetainedSessionImageDisclosure>
|
|
478
|
+
);
|
|
507
479
|
}
|
|
508
480
|
|
|
509
481
|
/* ---- computer_call --------------------------------------------------------- */
|
|
@@ -517,31 +489,34 @@ type ComputerAction = {
|
|
|
517
489
|
button?: string;
|
|
518
490
|
};
|
|
519
491
|
|
|
520
|
-
function computerVerb(action: ComputerAction | undefined): string {
|
|
492
|
+
function computerVerb(msg: OpenGeniText, action: ComputerAction | undefined): string {
|
|
521
493
|
if (!action || !action.type) {
|
|
522
|
-
return "
|
|
494
|
+
return msg("timeline.toolRenderers.acted");
|
|
523
495
|
}
|
|
524
496
|
switch (action.type) {
|
|
525
497
|
case "screenshot":
|
|
526
|
-
return "
|
|
498
|
+
return msg("timeline.toolRenderers.screenshot");
|
|
527
499
|
case "click":
|
|
528
|
-
return
|
|
500
|
+
return msg("timeline.toolRenderers.clickedXY", { x: action.x, y: action.y });
|
|
529
501
|
case "double_click":
|
|
530
|
-
return
|
|
502
|
+
return msg("timeline.toolRenderers.doubleClickedXY", { x: action.x, y: action.y });
|
|
531
503
|
case "move":
|
|
532
|
-
return
|
|
504
|
+
return msg("timeline.toolRenderers.movedXY", { x: action.x, y: action.y });
|
|
533
505
|
case "scroll":
|
|
534
|
-
return "
|
|
506
|
+
return msg("timeline.toolRenderers.scrolled");
|
|
535
507
|
case "type": {
|
|
536
508
|
const t = action.text ?? "";
|
|
537
|
-
return
|
|
509
|
+
return msg("timeline.toolRenderers.typedSliceValue", {
|
|
510
|
+
slice: t.slice(0, 28),
|
|
511
|
+
value: t.length > 28 ? "…" : "",
|
|
512
|
+
});
|
|
538
513
|
}
|
|
539
514
|
case "keypress":
|
|
540
|
-
return
|
|
515
|
+
return msg("timeline.toolRenderers.pressedJoin", { join: (action.keys ?? []).join("+") });
|
|
541
516
|
case "drag":
|
|
542
|
-
return "
|
|
517
|
+
return msg("timeline.toolRenderers.dragged");
|
|
543
518
|
case "wait":
|
|
544
|
-
return "
|
|
519
|
+
return msg("timeline.toolRenderers.waited");
|
|
545
520
|
default:
|
|
546
521
|
return action.type;
|
|
547
522
|
}
|
|
@@ -567,6 +542,7 @@ function asComputerArgs(args: unknown): Partial<ComputerAction> {
|
|
|
567
542
|
}
|
|
568
543
|
|
|
569
544
|
function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
545
|
+
const msg = useOpenGeniText();
|
|
570
546
|
const raw = (item.raw ?? {}) as {
|
|
571
547
|
action?: ComputerAction;
|
|
572
548
|
actions?: ComputerAction[];
|
|
@@ -579,11 +555,14 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
579
555
|
// every transport.
|
|
580
556
|
const functionAction: ComputerAction | undefined =
|
|
581
557
|
!raw.action && item.name.startsWith("computer_") && item.name !== "computer_call"
|
|
582
|
-
? {
|
|
558
|
+
? {
|
|
559
|
+
type: item.name.slice("computer_".length),
|
|
560
|
+
...asComputerArgs(item.arguments),
|
|
561
|
+
}
|
|
583
562
|
: undefined;
|
|
584
563
|
const action = raw.action ?? functionAction;
|
|
585
564
|
const actions = raw.actions ?? (action ? [action] : []);
|
|
586
|
-
const verb = computerVerb(action);
|
|
565
|
+
const verb = computerVerb(msg, action);
|
|
587
566
|
const out = item.output;
|
|
588
567
|
const running = item.status === "running";
|
|
589
568
|
const rejected = raw.providerData?.approvalStatus === "rejected";
|
|
@@ -592,7 +571,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
592
571
|
const retained = retainedScreenshotMetadata(out);
|
|
593
572
|
const omittedMedia = mediaPreviewFact(out);
|
|
594
573
|
const empty = out === "" || out == null;
|
|
595
|
-
const batched = actions.length > 1 ? actions.map((a) => computerVerb(a)).join(" · ") : null;
|
|
574
|
+
const batched = actions.length > 1 ? actions.map((a) => computerVerb(msg, a)).join(" · ") : null;
|
|
596
575
|
// Fold the batched-action count into the title (one media affordance per row),
|
|
597
576
|
// rather than a separate "+N more" mono label competing beside the thumbnail.
|
|
598
577
|
const countSuffix = actions.length > 1 ? ` ·${actions.length}` : "";
|
|
@@ -613,7 +592,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
613
592
|
running
|
|
614
593
|
media={<MediaSkeleton />}
|
|
615
594
|
>
|
|
616
|
-
<BodyNote>
|
|
595
|
+
<BodyNote>{msg("timeline.toolRenderers.capturingFrame")}</BodyNote>
|
|
617
596
|
</ActivityDisclosure>
|
|
618
597
|
);
|
|
619
598
|
}
|
|
@@ -627,7 +606,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
627
606
|
chip={{ tone: "bad", text: "read-only" }}
|
|
628
607
|
preview="write actions disabled"
|
|
629
608
|
>
|
|
630
|
-
<BodyNote tone="error">
|
|
609
|
+
<BodyNote tone="error">{msg("timeline.toolRenderers.computerUseIsReadOnly")}</BodyNote>
|
|
631
610
|
</ActivityDisclosure>
|
|
632
611
|
);
|
|
633
612
|
}
|
|
@@ -638,9 +617,9 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
638
617
|
icon={<LockIcon className={ICON_SIZE} />}
|
|
639
618
|
iconTone="muted"
|
|
640
619
|
title={verb}
|
|
641
|
-
preview="
|
|
620
|
+
preview={msg("timeline.toolRenderers.approvalRejectedThisActionDid2")}
|
|
642
621
|
>
|
|
643
|
-
<BodyNote>
|
|
622
|
+
<BodyNote>{msg("timeline.toolRenderers.approvalRejectedThisActionDid")}</BodyNote>
|
|
644
623
|
</ActivityDisclosure>
|
|
645
624
|
);
|
|
646
625
|
}
|
|
@@ -665,7 +644,10 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
665
644
|
media={<MediaEmpty />}
|
|
666
645
|
>
|
|
667
646
|
<BodyNote tone={isFailed ? "error" : undefined}>
|
|
668
|
-
|
|
647
|
+
{msg("timeline.toolRenderers.screenshotStateReplaceall", {
|
|
648
|
+
state,
|
|
649
|
+
replaceAll: retained.reason.replaceAll("_", " "),
|
|
650
|
+
})}
|
|
669
651
|
</BodyNote>
|
|
670
652
|
</ActivityDisclosure>
|
|
671
653
|
);
|
|
@@ -678,7 +660,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
678
660
|
caption={`${verb}${countSuffix}`}
|
|
679
661
|
noun="screenshot"
|
|
680
662
|
icon={<CameraIcon className={ICON_SIZE} />}
|
|
681
|
-
lightboxLabel="
|
|
663
|
+
lightboxLabel={msg("timeline.toolRenderers.screenshot")}
|
|
682
664
|
batched={batched}
|
|
683
665
|
failed={isFailed}
|
|
684
666
|
cancelled={isCancelled}
|
|
@@ -704,7 +686,9 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
704
686
|
media={<Thumbnail src={shotUrl} caption={caption} />}
|
|
705
687
|
>
|
|
706
688
|
<ScreenshotFigure src={shotUrl} caption={caption} />
|
|
707
|
-
{batched ?
|
|
689
|
+
{batched ? (
|
|
690
|
+
<BodyNote>{msg("timeline.toolRenderers.batchedBatched", { batched })}</BodyNote>
|
|
691
|
+
) : null}
|
|
708
692
|
</ActivityDisclosure>
|
|
709
693
|
);
|
|
710
694
|
}
|
|
@@ -714,17 +698,20 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
714
698
|
<ActivityDisclosure
|
|
715
699
|
icon={<CameraOffIcon className={ICON_SIZE} />}
|
|
716
700
|
iconTone={isFailed ? "failed" : "muted"}
|
|
717
|
-
title={
|
|
701
|
+
title={msg("timeline.toolRenderers.verbCountsuffixImageOmittedNot", { verb, countSuffix })}
|
|
718
702
|
failed={isFailed}
|
|
719
703
|
cancelled={isCancelled}
|
|
720
|
-
preview="
|
|
704
|
+
preview={msg("timeline.toolRenderers.inlineImageOmittedNotRetained")}
|
|
721
705
|
media={<MediaEmpty />}
|
|
722
706
|
>
|
|
723
707
|
<BodyNote>
|
|
724
|
-
|
|
725
|
-
|
|
708
|
+
{msg("timeline.toolRenderers.theInlineMediatypeOutputWas", {
|
|
709
|
+
mediaType: omittedMedia.mediaType,
|
|
710
|
+
})}
|
|
726
711
|
</BodyNote>
|
|
727
|
-
{batched ?
|
|
712
|
+
{batched ? (
|
|
713
|
+
<BodyNote>{msg("timeline.toolRenderers.batchedBatched", { batched })}</BodyNote>
|
|
714
|
+
) : null}
|
|
728
715
|
</ActivityDisclosure>
|
|
729
716
|
);
|
|
730
717
|
}
|
|
@@ -741,10 +728,10 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
741
728
|
>
|
|
742
729
|
<BodyNote>
|
|
743
730
|
{isFailed
|
|
744
|
-
? "
|
|
731
|
+
? msg("timeline.toolRenderers.computerCallFailedNoImage")
|
|
745
732
|
: isCancelled
|
|
746
|
-
? "
|
|
747
|
-
: "
|
|
733
|
+
? msg("timeline.toolRenderers.computerCallInterruptedNoImage")
|
|
734
|
+
: msg("timeline.toolRenderers.noImageTheSessionReturned")}
|
|
748
735
|
</BodyNote>
|
|
749
736
|
</ActivityDisclosure>
|
|
750
737
|
);
|
|
@@ -766,96 +753,111 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
766
753
|
);
|
|
767
754
|
}
|
|
768
755
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
)
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
756
|
+
/** Browser tool images share authenticated screenshot loading, with their own media kind. */
|
|
757
|
+
function BrowserScreenshotRenderer(props: ToolRendererProps) {
|
|
758
|
+
const msg = useOpenGeniText();
|
|
759
|
+
const { item, loadRetainedScreenshot } = props;
|
|
760
|
+
const leaf = mcpToolLeaf(item.name);
|
|
761
|
+
const title =
|
|
762
|
+
leaf === "browser_observe"
|
|
763
|
+
? msg("timeline.toolRenderers.observedBrowser")
|
|
764
|
+
: leaf === "browser_act"
|
|
765
|
+
? msg("timeline.toolRenderers.usedBrowser")
|
|
766
|
+
: msg("timeline.toolRenderers.browserScreenshot");
|
|
767
|
+
const retained = retainedScreenshotMetadata(item.output);
|
|
768
|
+
const isFailed = item.status === "failed";
|
|
769
|
+
const isCancelled = item.status === "cancelled";
|
|
770
|
+
|
|
771
|
+
if (item.status === "running" && leaf === "browser_screenshot") {
|
|
772
|
+
return (
|
|
773
|
+
<ActivityDisclosure
|
|
774
|
+
icon={<CameraIcon className={ICON_SIZE} />}
|
|
775
|
+
iconTone="running"
|
|
776
|
+
title={title}
|
|
777
|
+
running
|
|
778
|
+
media={<MediaSkeleton />}
|
|
779
|
+
>
|
|
780
|
+
<BodyNote>{msg("timeline.toolRenderers.capturingFrame")}</BodyNote>
|
|
781
|
+
</ActivityDisclosure>
|
|
782
|
+
);
|
|
787
783
|
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
: { kind: "error", message: "retrieval failed" },
|
|
829
|
-
);
|
|
830
|
-
});
|
|
831
|
-
return () => {
|
|
832
|
-
controller.abort();
|
|
833
|
-
if (objectUrl) URL.revokeObjectURL(objectUrl);
|
|
834
|
-
};
|
|
835
|
-
}, [stableArtifact, load]);
|
|
836
|
-
return state;
|
|
784
|
+
|
|
785
|
+
if (!retained) return <GenericRenderer {...props} />;
|
|
786
|
+
if (!retained.available) {
|
|
787
|
+
const state =
|
|
788
|
+
retained.reason === "expired" || retained.reason === "deleted"
|
|
789
|
+
? retained.reason
|
|
790
|
+
: "unavailable";
|
|
791
|
+
return (
|
|
792
|
+
<ActivityDisclosure
|
|
793
|
+
icon={<CameraOffIcon className={ICON_SIZE} />}
|
|
794
|
+
iconTone={isFailed ? "failed" : "muted"}
|
|
795
|
+
title={`${title} · ${state}`}
|
|
796
|
+
failed={isFailed}
|
|
797
|
+
cancelled={isCancelled}
|
|
798
|
+
preview={`screenshot ${state}`}
|
|
799
|
+
media={<MediaEmpty />}
|
|
800
|
+
>
|
|
801
|
+
<BodyNote tone={isFailed ? "error" : undefined}>
|
|
802
|
+
{msg("timeline.toolRenderers.screenshotStateReplaceall", {
|
|
803
|
+
state,
|
|
804
|
+
replaceAll: retained.reason.replaceAll("_", " "),
|
|
805
|
+
})}
|
|
806
|
+
</BodyNote>
|
|
807
|
+
</ActivityDisclosure>
|
|
808
|
+
);
|
|
809
|
+
}
|
|
810
|
+
return (
|
|
811
|
+
<RetainedSessionImageDisclosure
|
|
812
|
+
artifact={retained}
|
|
813
|
+
load={loadRetainedScreenshot}
|
|
814
|
+
title={title}
|
|
815
|
+
caption={title}
|
|
816
|
+
noun="screenshot"
|
|
817
|
+
icon={<CameraIcon className={ICON_SIZE} />}
|
|
818
|
+
lightboxLabel={msg("timeline.toolRenderers.browserScreenshot")}
|
|
819
|
+
batched={null}
|
|
820
|
+
failed={isFailed}
|
|
821
|
+
cancelled={isCancelled}
|
|
822
|
+
/>
|
|
823
|
+
);
|
|
837
824
|
}
|
|
838
825
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
826
|
+
type RetainedSessionImageDisclosureProps = {
|
|
827
|
+
artifact: RetainedArtifactReference;
|
|
828
|
+
load: ToolRendererProps["loadRetainedArtifact"];
|
|
829
|
+
title: string;
|
|
830
|
+
caption: string;
|
|
831
|
+
noun: "image" | "screenshot";
|
|
832
|
+
icon: ReactNode;
|
|
833
|
+
lightboxLabel: string;
|
|
834
|
+
batched: string | null;
|
|
835
|
+
failed: boolean;
|
|
836
|
+
cancelled: boolean;
|
|
837
|
+
filename?: string;
|
|
838
|
+
defaultOpen?: boolean;
|
|
839
|
+
children?: ReactNode;
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
function RetainedSessionImageDisclosure(props: RetainedSessionImageDisclosureProps) {
|
|
843
|
+
const compact = useContext(CompactActivityContext);
|
|
844
|
+
// The rolling progress label has no screenshot loader by design. Do not run
|
|
845
|
+
// the full image hook there: it would report the missing loader as an error.
|
|
846
|
+
if (compact) {
|
|
847
|
+
return (
|
|
848
|
+
<ActivityDisclosure
|
|
849
|
+
icon={props.icon}
|
|
850
|
+
title={props.title}
|
|
851
|
+
compactPreview={null}
|
|
852
|
+
failed={props.failed}
|
|
853
|
+
cancelled={props.cancelled}
|
|
854
|
+
/>
|
|
855
|
+
);
|
|
856
|
+
}
|
|
857
|
+
return <LoadedRetainedSessionImageDisclosure {...props} />;
|
|
856
858
|
}
|
|
857
859
|
|
|
858
|
-
function
|
|
860
|
+
function LoadedRetainedSessionImageDisclosure({
|
|
859
861
|
artifact,
|
|
860
862
|
load,
|
|
861
863
|
title,
|
|
@@ -866,47 +868,42 @@ function RetainedSessionImageDisclosure({
|
|
|
866
868
|
batched,
|
|
867
869
|
failed,
|
|
868
870
|
cancelled,
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
noun: "image" | "screenshot";
|
|
875
|
-
icon: ReactNode;
|
|
876
|
-
lightboxLabel: string;
|
|
877
|
-
batched: string | null;
|
|
878
|
-
failed: boolean;
|
|
879
|
-
cancelled: boolean;
|
|
880
|
-
}) {
|
|
871
|
+
filename,
|
|
872
|
+
defaultOpen,
|
|
873
|
+
children,
|
|
874
|
+
}: RetainedSessionImageDisclosureProps) {
|
|
875
|
+
const msg = useOpenGeniText();
|
|
881
876
|
const state = useRetainedImageObjectUrl(artifact, load);
|
|
882
|
-
const downloadFilename = retainedImageFilename(artifact);
|
|
877
|
+
const downloadFilename = filename ?? retainedImageFilename(artifact);
|
|
878
|
+
const figure = {
|
|
879
|
+
src: state.kind === "ready" ? state.url : "",
|
|
880
|
+
caption,
|
|
881
|
+
alt: caption,
|
|
882
|
+
expandLabel: msg("timeline.toolRenderers.expandNoun", { noun }),
|
|
883
|
+
lightboxLabel,
|
|
884
|
+
downloadFilename,
|
|
885
|
+
};
|
|
883
886
|
|
|
884
887
|
return (
|
|
885
888
|
<ActivityDisclosure
|
|
886
889
|
icon={icon}
|
|
887
890
|
iconTone={failed ? "failed" : state.kind === "ready" ? "accent" : "muted"}
|
|
888
891
|
title={title}
|
|
892
|
+
defaultOpen={defaultOpen}
|
|
889
893
|
failed={failed}
|
|
890
894
|
cancelled={cancelled}
|
|
891
895
|
preview={
|
|
892
896
|
state.kind === "loading"
|
|
893
|
-
?
|
|
897
|
+
? msg("timeline.toolRenderers.loadingRetainedNoun", { noun })
|
|
894
898
|
: state.kind === "error"
|
|
895
|
-
?
|
|
899
|
+
? msg("timeline.toolRenderers.nounRetrievalFailed", { noun })
|
|
896
900
|
: state.kind === "unavailable"
|
|
897
901
|
? `${noun} ${state.label}`
|
|
898
902
|
: undefined
|
|
899
903
|
}
|
|
900
904
|
media={
|
|
901
905
|
state.kind === "ready" ? (
|
|
902
|
-
<Thumbnail
|
|
903
|
-
src={state.url}
|
|
904
|
-
caption={caption}
|
|
905
|
-
alt={caption}
|
|
906
|
-
expandLabel={`Expand ${noun}`}
|
|
907
|
-
lightboxLabel={lightboxLabel}
|
|
908
|
-
downloadFilename={downloadFilename}
|
|
909
|
-
/>
|
|
906
|
+
<Thumbnail {...figure} />
|
|
910
907
|
) : state.kind === "loading" ? (
|
|
911
908
|
<MediaSkeleton />
|
|
912
909
|
) : (
|
|
@@ -915,31 +912,49 @@ function RetainedSessionImageDisclosure({
|
|
|
915
912
|
}
|
|
916
913
|
>
|
|
917
914
|
{state.kind === "ready" ? (
|
|
918
|
-
<ScreenshotFigure
|
|
919
|
-
src={state.url}
|
|
920
|
-
caption={caption}
|
|
921
|
-
alt={caption}
|
|
922
|
-
expandLabel={`Expand ${noun}`}
|
|
923
|
-
lightboxLabel={lightboxLabel}
|
|
924
|
-
downloadFilename={downloadFilename}
|
|
925
|
-
/>
|
|
915
|
+
<ScreenshotFigure {...figure} showCaption={caption !== title} />
|
|
926
916
|
) : state.kind === "loading" ? (
|
|
927
|
-
<BodyNote>
|
|
917
|
+
<BodyNote>{msg("timeline.toolRenderers.loadingTheRetainedNoun", { noun })}</BodyNote>
|
|
928
918
|
) : state.kind === "unavailable" ? (
|
|
929
919
|
<BodyNote>
|
|
930
|
-
{noun === "screenshot"
|
|
920
|
+
{noun === "screenshot"
|
|
921
|
+
? msg("timeline.toolRenderers.screenshot")
|
|
922
|
+
: msg("timeline.toolRenderers.image")}{" "}
|
|
923
|
+
{state.label}.
|
|
931
924
|
</BodyNote>
|
|
932
925
|
) : (
|
|
933
|
-
<
|
|
934
|
-
{noun === "screenshot" ? "Screenshot" : "Image"} retrieval failed: {state.message}
|
|
935
|
-
</BodyNote>
|
|
926
|
+
<ImageRetrievalError noun={noun} retry={state.retry} />
|
|
936
927
|
)}
|
|
937
|
-
{batched ?
|
|
928
|
+
{batched ? (
|
|
929
|
+
<BodyNote>{msg("timeline.toolRenderers.batchedBatched", { batched })}</BodyNote>
|
|
930
|
+
) : null}
|
|
931
|
+
{children}
|
|
938
932
|
</ActivityDisclosure>
|
|
939
933
|
);
|
|
940
934
|
}
|
|
941
935
|
|
|
936
|
+
function ImageRetrievalError({ noun = "image", retry }: { noun?: string; retry: () => void }) {
|
|
937
|
+
const msg = useOpenGeniText();
|
|
938
|
+
return (
|
|
939
|
+
<BodyNote tone="error">
|
|
940
|
+
{noun === "screenshot"
|
|
941
|
+
? msg("timeline.toolRenderers.screenshot")
|
|
942
|
+
: msg("timeline.toolRenderers.image")}{" "}
|
|
943
|
+
{msg("timeline.toolRenderers.retrievalFailed")}{" "}
|
|
944
|
+
<button
|
|
945
|
+
type="button"
|
|
946
|
+
aria-label={msg("timeline.toolRenderers.retryNounRetrieval", { noun })}
|
|
947
|
+
onClick={retry}
|
|
948
|
+
className="underline underline-offset-2"
|
|
949
|
+
>
|
|
950
|
+
{msg("timeline.toolRenderers.retry")}
|
|
951
|
+
</button>
|
|
952
|
+
</BodyNote>
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
|
|
942
956
|
function GeneratedImageRenderer({ item, loadRetainedArtifact }: ToolRendererProps) {
|
|
957
|
+
const msg = useOpenGeniText();
|
|
943
958
|
const args = parseToolArgs(item.arguments);
|
|
944
959
|
const prompt = typeof args.prompt === "string" ? args.prompt : "";
|
|
945
960
|
const raw =
|
|
@@ -955,9 +970,13 @@ function GeneratedImageRenderer({ item, loadRetainedArtifact }: ToolRendererProp
|
|
|
955
970
|
<ActivityDisclosure
|
|
956
971
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
957
972
|
iconTone="running"
|
|
958
|
-
title="
|
|
973
|
+
title={msg("timeline.toolRenderers.generatingImage")}
|
|
959
974
|
running
|
|
960
|
-
preview={
|
|
975
|
+
preview={
|
|
976
|
+
<RunningPreview>
|
|
977
|
+
{truncatePreview(prompt, 72) || msg("timeline.toolRenderers.creating")}
|
|
978
|
+
</RunningPreview>
|
|
979
|
+
}
|
|
961
980
|
media={<MediaSkeleton />}
|
|
962
981
|
>
|
|
963
982
|
{prompt ? <BodyNote>{prompt}</BodyNote> : null}
|
|
@@ -977,6 +996,7 @@ function GeneratedImageRenderer({ item, loadRetainedArtifact }: ToolRendererProp
|
|
|
977
996
|
}
|
|
978
997
|
|
|
979
998
|
function GeneratedVideoRenderer({ item }: ToolRendererProps) {
|
|
999
|
+
const msg = useOpenGeniText();
|
|
980
1000
|
const args = parseToolArgs(item.arguments);
|
|
981
1001
|
const prompt = typeof args.prompt === "string" ? args.prompt : "";
|
|
982
1002
|
const parsedOutput = typeof item.output === "string" ? tryParseJson(item.output) : item.output;
|
|
@@ -993,23 +1013,31 @@ function GeneratedVideoRenderer({ item }: ToolRendererProps) {
|
|
|
993
1013
|
icon={<VideoIcon className={ICON_SIZE} />}
|
|
994
1014
|
iconTone={failed ? "failed" : running ? "running" : accepted ? "accent" : "muted"}
|
|
995
1015
|
title={
|
|
996
|
-
running
|
|
1016
|
+
running
|
|
1017
|
+
? msg("timeline.toolRenderers.startingVideoGeneration")
|
|
1018
|
+
: accepted
|
|
1019
|
+
? msg("timeline.toolRenderers.generatingVideo")
|
|
1020
|
+
: msg("timeline.toolRenderers.generateVideo")
|
|
997
1021
|
}
|
|
998
1022
|
running={running}
|
|
999
1023
|
failed={failed}
|
|
1000
1024
|
cancelled={cancelled}
|
|
1001
|
-
preview={
|
|
1025
|
+
preview={
|
|
1026
|
+
truncatePreview(prompt, 88) ||
|
|
1027
|
+
(accepted ? msg("timeline.toolRenderers.requestAccepted") : undefined)
|
|
1028
|
+
}
|
|
1002
1029
|
>
|
|
1003
1030
|
{prompt ? <BodyNote>{prompt}</BodyNote> : null}
|
|
1004
1031
|
{accepted ? (
|
|
1005
|
-
<BodyNote>
|
|
1032
|
+
<BodyNote>{msg("timeline.toolRenderers.theVideoWillAppearHere")}</BodyNote>
|
|
1006
1033
|
) : item.output !== undefined ? (
|
|
1007
|
-
<PayloadBlock label="
|
|
1034
|
+
<PayloadBlock label={msg("timeline.toolRenderers.output")} value={item.output} />
|
|
1008
1035
|
) : null}
|
|
1009
1036
|
</ActivityDisclosure>
|
|
1010
1037
|
);
|
|
1011
1038
|
}
|
|
1012
1039
|
function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRendererProps) {
|
|
1040
|
+
const msg = useOpenGeniText();
|
|
1013
1041
|
const { text: output, isError } = unwrapMcpOutput(item.output);
|
|
1014
1042
|
const receipt = parseSandboxFileArtifactReceipt(output);
|
|
1015
1043
|
const [downloadState, setDownloadState] = useState<"idle" | "loading" | "error">("idle");
|
|
@@ -1018,9 +1046,11 @@ function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRenderer
|
|
|
1018
1046
|
<ActivityDisclosure
|
|
1019
1047
|
icon={<DownloadIcon className={ICON_SIZE} />}
|
|
1020
1048
|
iconTone="running"
|
|
1021
|
-
title="
|
|
1049
|
+
title={msg("timeline.toolRenderers.publishingFile")}
|
|
1022
1050
|
running
|
|
1023
|
-
preview={
|
|
1051
|
+
preview={
|
|
1052
|
+
<RunningPreview>{msg("timeline.toolRenderers.retainingWorkspaceBytes")}</RunningPreview>
|
|
1053
|
+
}
|
|
1024
1054
|
/>
|
|
1025
1055
|
);
|
|
1026
1056
|
}
|
|
@@ -1028,6 +1058,24 @@ function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRenderer
|
|
|
1028
1058
|
return <GenericRenderer item={item} />;
|
|
1029
1059
|
}
|
|
1030
1060
|
|
|
1061
|
+
// The closed SDK receipt has already checked the workspace-qualified route.
|
|
1062
|
+
const workspaceId = /^\/v1\/workspaces\/([0-9a-f-]+)\/artifacts\//.exec(
|
|
1063
|
+
receipt.artifact.retrieval.path,
|
|
1064
|
+
)?.[1];
|
|
1065
|
+
const openLink = workspaceId ? (
|
|
1066
|
+
<a
|
|
1067
|
+
href={`/workspaces/${workspaceId}/artifacts/files/${receipt.artifact.artifactId}`}
|
|
1068
|
+
aria-label={msg("timeline.toolRenderers.openFilenameInArtifacts", {
|
|
1069
|
+
filename: receipt.filename,
|
|
1070
|
+
})}
|
|
1071
|
+
className="inline-flex min-h-7 items-center rounded-og-sm px-2 text-og-sm font-medium text-og-accent-strong hover:bg-og-surface-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent pointer-coarse:min-h-10"
|
|
1072
|
+
onClick={(event) => event.stopPropagation()}
|
|
1073
|
+
onKeyDown={(event) => event.stopPropagation()}
|
|
1074
|
+
>
|
|
1075
|
+
{msg("timeline.toolRenderers.openInArtifacts")}
|
|
1076
|
+
</a>
|
|
1077
|
+
) : null;
|
|
1078
|
+
|
|
1031
1079
|
const download = async () => {
|
|
1032
1080
|
if (!loadRetainedArtifact) {
|
|
1033
1081
|
setDownloadState("error");
|
|
@@ -1060,27 +1108,61 @@ function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRenderer
|
|
|
1060
1108
|
}
|
|
1061
1109
|
};
|
|
1062
1110
|
|
|
1111
|
+
const downloadButton = (
|
|
1112
|
+
<button
|
|
1113
|
+
type="button"
|
|
1114
|
+
onClick={() => void download()}
|
|
1115
|
+
disabled={downloadState === "loading"}
|
|
1116
|
+
className="inline-flex items-center gap-1.5 rounded-og-sm border border-og-border px-2.5 py-1.5 text-og-sm font-medium text-og-fg transition-colors hover:border-og-border-strong hover:bg-og-surface-2 disabled:cursor-wait disabled:opacity-60"
|
|
1117
|
+
>
|
|
1118
|
+
<DownloadIcon className="size-3.5" />
|
|
1119
|
+
{downloadState === "loading"
|
|
1120
|
+
? msg("timeline.toolRenderers.preparing")
|
|
1121
|
+
: downloadState === "error"
|
|
1122
|
+
? msg("timeline.toolRenderers.retryDownload")
|
|
1123
|
+
: msg("timeline.toolRenderers.download")}
|
|
1124
|
+
</button>
|
|
1125
|
+
);
|
|
1126
|
+
|
|
1127
|
+
if (isRetainedImageContentType(receipt.artifact.contentType)) {
|
|
1128
|
+
return (
|
|
1129
|
+
<RetainedSessionImageDisclosure
|
|
1130
|
+
artifact={receipt.artifact}
|
|
1131
|
+
load={loadRetainedArtifact}
|
|
1132
|
+
title={msg("timeline.toolRenderers.publishedFilename", { filename: receipt.filename })}
|
|
1133
|
+
caption={receipt.filename}
|
|
1134
|
+
noun="image"
|
|
1135
|
+
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1136
|
+
lightboxLabel={msg("timeline.toolRenderers.image")}
|
|
1137
|
+
batched={null}
|
|
1138
|
+
failed={false}
|
|
1139
|
+
cancelled={false}
|
|
1140
|
+
filename={receipt.filename}
|
|
1141
|
+
defaultOpen
|
|
1142
|
+
>
|
|
1143
|
+
{downloadButton}
|
|
1144
|
+
{openLink}
|
|
1145
|
+
</RetainedSessionImageDisclosure>
|
|
1146
|
+
);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1063
1149
|
return (
|
|
1064
1150
|
<ActivityDisclosure
|
|
1065
1151
|
icon={<DownloadIcon className={ICON_SIZE} />}
|
|
1066
1152
|
iconTone="accent"
|
|
1067
|
-
title={
|
|
1153
|
+
title={msg("timeline.toolRenderers.publishedFilename", { filename: receipt.filename })}
|
|
1068
1154
|
defaultOpen
|
|
1069
1155
|
preview={formatBytes(receipt.artifact.originalBytes)}
|
|
1070
1156
|
>
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
: downloadState === "error"
|
|
1081
|
-
? "Retry download"
|
|
1082
|
-
: "Download"}
|
|
1083
|
-
</button>
|
|
1157
|
+
{downloadButton}
|
|
1158
|
+
{openLink}
|
|
1159
|
+
{isPatchFilename(receipt.filename) ? (
|
|
1160
|
+
<PatchApplyCommand
|
|
1161
|
+
artifact={receipt.artifact}
|
|
1162
|
+
filename={receipt.filename}
|
|
1163
|
+
load={loadRetainedArtifact}
|
|
1164
|
+
/>
|
|
1165
|
+
) : null}
|
|
1084
1166
|
</ActivityDisclosure>
|
|
1085
1167
|
);
|
|
1086
1168
|
}
|
|
@@ -1131,22 +1213,67 @@ function publishedSiteReceipt(output: unknown): PublishedSiteReceipt | null {
|
|
|
1131
1213
|
};
|
|
1132
1214
|
}
|
|
1133
1215
|
|
|
1216
|
+
const SITE_OPEN_CLASS =
|
|
1217
|
+
"inline-flex min-h-7 items-center rounded-og-sm px-2 text-og-sm font-medium text-og-accent-strong hover:bg-og-surface-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-og-accent pointer-coarse:min-h-10";
|
|
1218
|
+
|
|
1134
1219
|
function SiteOpenLink({ receipt }: { receipt: PublishedSiteReceipt }) {
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1220
|
+
const msg = useOpenGeniText();
|
|
1221
|
+
const [pending, setPending] = useState(false);
|
|
1222
|
+
const [failed, setFailed] = useState(false);
|
|
1223
|
+
// The console route only exists in the Opengeni console; a host decides.
|
|
1224
|
+
const resolution = useOpenGeniLinkResolver()?.({
|
|
1225
|
+
kind: "site",
|
|
1226
|
+
artifactId: receipt.artifactId,
|
|
1227
|
+
workspaceId: receipt.workspaceId,
|
|
1228
|
+
});
|
|
1229
|
+
const destination = resolution?.href ? defaultUrlTransform(resolution.href) : "";
|
|
1230
|
+
if (destination) {
|
|
1231
|
+
return (
|
|
1232
|
+
<a
|
|
1233
|
+
href={destination}
|
|
1234
|
+
aria-label={msg("timeline.toolRenderers.openTitle", { title: receipt.title })}
|
|
1235
|
+
className={SITE_OPEN_CLASS}
|
|
1236
|
+
onClick={(event) => event.stopPropagation()}
|
|
1237
|
+
onKeyDown={(event) => event.stopPropagation()}
|
|
1238
|
+
>
|
|
1239
|
+
{msg("timeline.toolRenderers.open")}
|
|
1240
|
+
</a>
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
if (resolution?.open) {
|
|
1244
|
+
const open = resolution.open;
|
|
1245
|
+
return (
|
|
1246
|
+
<button
|
|
1247
|
+
type="button"
|
|
1248
|
+
aria-label={msg("timeline.toolRenderers.openTitle", { title: receipt.title })}
|
|
1249
|
+
aria-busy={pending}
|
|
1250
|
+
disabled={pending}
|
|
1251
|
+
className={SITE_OPEN_CLASS}
|
|
1252
|
+
onClick={(event) => {
|
|
1253
|
+
event.stopPropagation();
|
|
1254
|
+
if (pending) return;
|
|
1255
|
+
setPending(true);
|
|
1256
|
+
setFailed(false);
|
|
1257
|
+
void Promise.resolve()
|
|
1258
|
+
.then(open)
|
|
1259
|
+
.catch(() => setFailed(true))
|
|
1260
|
+
.finally(() => setPending(false));
|
|
1261
|
+
}}
|
|
1262
|
+
onKeyDown={(event) => event.stopPropagation()}
|
|
1263
|
+
>
|
|
1264
|
+
{pending
|
|
1265
|
+
? msg("timeline.toolRenderers.opening")
|
|
1266
|
+
: failed
|
|
1267
|
+
? msg("timeline.toolRenderers.retryOpen")
|
|
1268
|
+
: msg("timeline.toolRenderers.open")}
|
|
1269
|
+
</button>
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
return null;
|
|
1147
1273
|
}
|
|
1148
1274
|
|
|
1149
1275
|
function SiteArtifactRenderer({ item }: ToolRendererProps) {
|
|
1276
|
+
const msg = useOpenGeniText();
|
|
1150
1277
|
const leaf = mcpToolLeaf(item.name);
|
|
1151
1278
|
const publishingExisting = leaf === "artifacts_publish";
|
|
1152
1279
|
if (item.status === "running") {
|
|
@@ -1154,9 +1281,17 @@ function SiteArtifactRenderer({ item }: ToolRendererProps) {
|
|
|
1154
1281
|
<ActivityDisclosure
|
|
1155
1282
|
icon={<PanelsTopLeftIcon className={ICON_SIZE} />}
|
|
1156
1283
|
iconTone="running"
|
|
1157
|
-
title={
|
|
1284
|
+
title={
|
|
1285
|
+
publishingExisting
|
|
1286
|
+
? msg("timeline.toolRenderers.publishingSiteUpdate")
|
|
1287
|
+
: msg("timeline.toolRenderers.publishingSite")
|
|
1288
|
+
}
|
|
1158
1289
|
running
|
|
1159
|
-
preview={
|
|
1290
|
+
preview={
|
|
1291
|
+
<RunningPreview>
|
|
1292
|
+
{msg("timeline.toolRenderers.retainingSourceAndCompiledHtml")}
|
|
1293
|
+
</RunningPreview>
|
|
1294
|
+
}
|
|
1160
1295
|
/>
|
|
1161
1296
|
);
|
|
1162
1297
|
}
|
|
@@ -1166,12 +1301,18 @@ function SiteArtifactRenderer({ item }: ToolRendererProps) {
|
|
|
1166
1301
|
<ActivityDisclosure
|
|
1167
1302
|
icon={<PanelsTopLeftIcon className={ICON_SIZE} />}
|
|
1168
1303
|
iconTone="accent"
|
|
1169
|
-
title={
|
|
1304
|
+
title={
|
|
1305
|
+
publishingExisting
|
|
1306
|
+
? msg("timeline.toolRenderers.updatedTitle", { title: receipt.title })
|
|
1307
|
+
: msg("timeline.toolRenderers.publishedTitle", { title: receipt.title })
|
|
1308
|
+
}
|
|
1170
1309
|
media={<SiteOpenLink receipt={receipt} />}
|
|
1171
1310
|
>
|
|
1172
1311
|
<BodyNote>
|
|
1173
|
-
|
|
1174
|
-
{receipt.replayed
|
|
1312
|
+
{msg("timeline.toolRenderers.versionRevisionIsLive", { revision: receipt.revision })}
|
|
1313
|
+
{receipt.replayed
|
|
1314
|
+
? ` ${msg("timeline.toolRenderers.replayedFromTheOriginalPublication")}`
|
|
1315
|
+
: "."}
|
|
1175
1316
|
</BodyNote>
|
|
1176
1317
|
</ActivityDisclosure>
|
|
1177
1318
|
);
|
|
@@ -1190,10 +1331,18 @@ function GeneratedImageDisclosure({
|
|
|
1190
1331
|
failed: boolean;
|
|
1191
1332
|
cancelled: boolean;
|
|
1192
1333
|
}) {
|
|
1334
|
+
const msg = useOpenGeniText();
|
|
1193
1335
|
const state = useRetainedImageObjectUrl(receipt.artifact, load);
|
|
1194
1336
|
const dimensions = receipt.artifact.dimensions!;
|
|
1195
|
-
const title = failed
|
|
1196
|
-
|
|
1337
|
+
const title = failed
|
|
1338
|
+
? msg("timeline.toolRenderers.imageGenerationFailed")
|
|
1339
|
+
: msg("timeline.toolRenderers.generatedImage");
|
|
1340
|
+
const caption =
|
|
1341
|
+
prompt ||
|
|
1342
|
+
msg("timeline.toolRenderers.generatedImageWidthHeight", {
|
|
1343
|
+
width: dimensions.width,
|
|
1344
|
+
height: dimensions.height,
|
|
1345
|
+
});
|
|
1197
1346
|
return (
|
|
1198
1347
|
<ActivityDisclosure
|
|
1199
1348
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
@@ -1204,9 +1353,9 @@ function GeneratedImageDisclosure({
|
|
|
1204
1353
|
cancelled={cancelled}
|
|
1205
1354
|
preview={
|
|
1206
1355
|
state.kind === "loading"
|
|
1207
|
-
? "
|
|
1356
|
+
? msg("timeline.toolRenderers.loadingImage")
|
|
1208
1357
|
: state.kind === "error"
|
|
1209
|
-
? "
|
|
1358
|
+
? msg("timeline.toolRenderers.imageRetrievalFailed")
|
|
1210
1359
|
: state.kind === "unavailable"
|
|
1211
1360
|
? `image ${state.label}`
|
|
1212
1361
|
: truncatePreview(prompt, 88) || `${dimensions.width}×${dimensions.height}`
|
|
@@ -1217,8 +1366,8 @@ function GeneratedImageDisclosure({
|
|
|
1217
1366
|
src={state.url}
|
|
1218
1367
|
caption={caption}
|
|
1219
1368
|
alt={caption}
|
|
1220
|
-
expandLabel="
|
|
1221
|
-
lightboxLabel="
|
|
1369
|
+
expandLabel={msg("timeline.toolRenderers.expandGeneratedImage")}
|
|
1370
|
+
lightboxLabel={msg("timeline.toolRenderers.generatedImage")}
|
|
1222
1371
|
/>
|
|
1223
1372
|
) : state.kind === "loading" ? (
|
|
1224
1373
|
<MediaSkeleton />
|
|
@@ -1232,15 +1381,15 @@ function GeneratedImageDisclosure({
|
|
|
1232
1381
|
src={state.url}
|
|
1233
1382
|
caption={caption}
|
|
1234
1383
|
alt={caption}
|
|
1235
|
-
expandLabel="
|
|
1236
|
-
lightboxLabel="
|
|
1384
|
+
expandLabel={msg("timeline.toolRenderers.expandGeneratedImage")}
|
|
1385
|
+
lightboxLabel={msg("timeline.toolRenderers.generatedImage")}
|
|
1237
1386
|
/>
|
|
1238
1387
|
) : state.kind === "loading" ? (
|
|
1239
|
-
<BodyNote>
|
|
1388
|
+
<BodyNote>{msg("timeline.toolRenderers.loadingTheGeneratedImage")}</BodyNote>
|
|
1240
1389
|
) : state.kind === "unavailable" ? (
|
|
1241
|
-
<BodyNote>
|
|
1390
|
+
<BodyNote>{msg("timeline.toolRenderers.imageLabel", { label: state.label })}</BodyNote>
|
|
1242
1391
|
) : (
|
|
1243
|
-
<
|
|
1392
|
+
<ImageRetrievalError retry={state.retry} />
|
|
1244
1393
|
)}
|
|
1245
1394
|
<BodyNote>
|
|
1246
1395
|
{dimensions.width}×{dimensions.height} · {receipt.sandboxPath}
|
|
@@ -1249,168 +1398,31 @@ function GeneratedImageDisclosure({
|
|
|
1249
1398
|
);
|
|
1250
1399
|
}
|
|
1251
1400
|
|
|
1252
|
-
function retainedImageFilename(artifact: RetainedArtifactReference): string {
|
|
1253
|
-
const extension =
|
|
1254
|
-
artifact.contentType === "image/jpeg"
|
|
1255
|
-
? "jpg"
|
|
1256
|
-
: artifact.contentType === "image/webp"
|
|
1257
|
-
? "webp"
|
|
1258
|
-
: "png";
|
|
1259
|
-
return `${artifact.kind}-${artifact.artifactId}.${extension}`;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
/* ---- web_search ------------------------------------------------------------ */
|
|
1263
|
-
|
|
1264
|
-
type WebSearchResult = { title: string; domain: string; snippet: string };
|
|
1265
|
-
|
|
1266
|
-
/** Pull a search string from tool-call arguments when providerData.action is sparse. */
|
|
1267
|
-
function webSearchQueryFromArguments(args: unknown): string | null {
|
|
1268
|
-
if (typeof args === "string") {
|
|
1269
|
-
const trimmed = args.trim();
|
|
1270
|
-
if (!trimmed) {
|
|
1271
|
-
return null;
|
|
1272
|
-
}
|
|
1273
|
-
try {
|
|
1274
|
-
return webSearchQueryFromArguments(JSON.parse(trimmed));
|
|
1275
|
-
} catch {
|
|
1276
|
-
return trimmed;
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
if (!args || typeof args !== "object") {
|
|
1280
|
-
return null;
|
|
1281
|
-
}
|
|
1282
|
-
const record = args as Record<string, unknown>;
|
|
1283
|
-
if (typeof record.query === "string" && record.query.trim().length > 0) {
|
|
1284
|
-
return record.query;
|
|
1285
|
-
}
|
|
1286
|
-
if (Array.isArray(record.queries)) {
|
|
1287
|
-
const first = record.queries.find(
|
|
1288
|
-
(value): value is string => typeof value === "string" && value.trim().length > 0,
|
|
1289
|
-
);
|
|
1290
|
-
if (first) {
|
|
1291
|
-
return first;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
return null;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
function WebSearchRenderer({ item }: ToolRendererProps) {
|
|
1298
|
-
const raw = (item.raw ?? {}) as {
|
|
1299
|
-
providerData?: {
|
|
1300
|
-
action?: {
|
|
1301
|
-
type?: string;
|
|
1302
|
-
query?: string;
|
|
1303
|
-
queries?: string[];
|
|
1304
|
-
url?: string;
|
|
1305
|
-
pattern?: string;
|
|
1306
|
-
};
|
|
1307
|
-
};
|
|
1308
|
-
};
|
|
1309
|
-
const action = raw.providerData?.action ?? {};
|
|
1310
|
-
const actionType = action.type ?? "search";
|
|
1311
|
-
// Responses API deprecated singular `query` in favor of `queries[]`.
|
|
1312
|
-
// Codex/current OpenAI often only populate the array.
|
|
1313
|
-
const queries = (action.queries ?? []).filter(
|
|
1314
|
-
(value): value is string => typeof value === "string" && value.trim().length > 0,
|
|
1315
|
-
);
|
|
1316
|
-
const searchQuery =
|
|
1317
|
-
(typeof action.query === "string" && action.query.trim().length > 0 ? action.query : null) ??
|
|
1318
|
-
queries[0] ??
|
|
1319
|
-
webSearchQueryFromArguments(item.arguments);
|
|
1320
|
-
const running = item.status === "running";
|
|
1321
|
-
const query =
|
|
1322
|
-
actionType === "open_page"
|
|
1323
|
-
? (action.url ?? "(page unavailable)")
|
|
1324
|
-
: actionType === "find_in_page"
|
|
1325
|
-
? action.pattern && action.url
|
|
1326
|
-
? `"${action.pattern}" in ${action.url}`
|
|
1327
|
-
: (action.pattern ?? action.url ?? "(page unavailable)")
|
|
1328
|
-
: // Codex often emits the live card before action.query/queries land;
|
|
1329
|
-
// don't flash the scary unavailable copy while still searching.
|
|
1330
|
-
(searchQuery ?? (running ? "…" : "(query unavailable)"));
|
|
1331
|
-
const variants = queries.length > 1 ? ` +${queries.length - 1} variants` : "";
|
|
1332
|
-
const runningTitle =
|
|
1333
|
-
actionType === "open_page"
|
|
1334
|
-
? "Opening web page"
|
|
1335
|
-
: actionType === "find_in_page"
|
|
1336
|
-
? "Searching within page"
|
|
1337
|
-
: "Searching the web";
|
|
1338
|
-
const completedTitle =
|
|
1339
|
-
actionType === "open_page"
|
|
1340
|
-
? "Opened web page"
|
|
1341
|
-
: actionType === "find_in_page"
|
|
1342
|
-
? "Searched within page"
|
|
1343
|
-
: "Searched the web";
|
|
1344
|
-
// web_search may surface a results array on the output when the host enriches it.
|
|
1345
|
-
// Filter out null/undefined/non-object entries before casting: host-provided
|
|
1346
|
-
// data is untrusted and a null element would throw on result.title access.
|
|
1347
|
-
const rawResults = (item.output as { results?: unknown } | undefined)?.results;
|
|
1348
|
-
const results = Array.isArray(rawResults)
|
|
1349
|
-
? (rawResults as unknown[]).filter((r): r is WebSearchResult => !!r && typeof r === "object")
|
|
1350
|
-
: undefined;
|
|
1351
|
-
const resultOccurrences = new Map<string, number>();
|
|
1352
|
-
const keyedResults = results?.map((result) => {
|
|
1353
|
-
const contentKey = `${result.domain}\u0000${result.title}\u0000${result.snippet}`;
|
|
1354
|
-
const occurrence = (resultOccurrences.get(contentKey) ?? 0) + 1;
|
|
1355
|
-
resultOccurrences.set(contentKey, occurrence);
|
|
1356
|
-
return { key: `${contentKey}\u0000${occurrence}`, result };
|
|
1357
|
-
});
|
|
1358
|
-
|
|
1359
|
-
if (running) {
|
|
1360
|
-
return (
|
|
1361
|
-
<ActivityDisclosure
|
|
1362
|
-
icon={<SearchIcon className={ICON_SIZE} />}
|
|
1363
|
-
iconTone="running"
|
|
1364
|
-
title={runningTitle}
|
|
1365
|
-
running
|
|
1366
|
-
preview={<RunningPreview>{`${query}${variants}`}</RunningPreview>}
|
|
1367
|
-
>
|
|
1368
|
-
<BodyNote>searching… results fold into the model context (no output event).</BodyNote>
|
|
1369
|
-
</ActivityDisclosure>
|
|
1370
|
-
);
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
return (
|
|
1374
|
-
<ActivityDisclosure
|
|
1375
|
-
icon={<SearchIcon className={ICON_SIZE} />}
|
|
1376
|
-
iconTone="muted"
|
|
1377
|
-
title={completedTitle}
|
|
1378
|
-
preview={`${query}${variants}`}
|
|
1379
|
-
failed={item.status === "failed"}
|
|
1380
|
-
cancelled={item.status === "cancelled"}
|
|
1381
|
-
>
|
|
1382
|
-
{keyedResults && keyedResults.length ? (
|
|
1383
|
-
<ul className="flex flex-col gap-2">
|
|
1384
|
-
{keyedResults.map(({ key, result }) => (
|
|
1385
|
-
<li key={key} className="flex gap-2.5">
|
|
1386
|
-
<GlobeIcon className="mt-0.5 size-3.5 shrink-0 text-og-fg-subtle" />
|
|
1387
|
-
<div className="min-w-0">
|
|
1388
|
-
<p className="truncate text-og-base text-og-fg">
|
|
1389
|
-
{result.title} <span className="text-og-fg-subtle">{result.domain}</span>
|
|
1390
|
-
</p>
|
|
1391
|
-
<p className="text-og-sm leading-5 text-og-fg-muted">{result.snippet}</p>
|
|
1392
|
-
</div>
|
|
1393
|
-
</li>
|
|
1394
|
-
))}
|
|
1395
|
-
</ul>
|
|
1396
|
-
) : (
|
|
1397
|
-
<BodyNote>results folded into model context — no list available.</BodyNote>
|
|
1398
|
-
)}
|
|
1399
|
-
</ActivityDisclosure>
|
|
1400
|
-
);
|
|
1401
|
+
function retainedImageFilename(artifact: RetainedArtifactReference): string {
|
|
1402
|
+
const extension =
|
|
1403
|
+
artifact.contentType === "image/jpeg"
|
|
1404
|
+
? "jpg"
|
|
1405
|
+
: artifact.contentType === "image/webp"
|
|
1406
|
+
? "webp"
|
|
1407
|
+
: "png";
|
|
1408
|
+
return `${artifact.kind}-${artifact.artifactId}.${extension}`;
|
|
1401
1409
|
}
|
|
1402
1410
|
|
|
1411
|
+
/* ---- web_search ------------------------------------------------------------ */
|
|
1412
|
+
|
|
1403
1413
|
/* ---- view_image ------------------------------------------------------------ */
|
|
1404
1414
|
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
"
|
|
1408
|
-
"
|
|
1409
|
-
"
|
|
1410
|
-
"
|
|
1415
|
+
// Fragments of the tool's own (English) error output; matched, never displayed.
|
|
1416
|
+
const VIEW_IMAGE_ERRORS = (msg: OpenGeniText) => [
|
|
1417
|
+
msg("timeline.toolRenderers.wasNotFound"),
|
|
1418
|
+
msg("timeline.toolRenderers.isNotAFile"),
|
|
1419
|
+
msg("timeline.toolRenderers.exceededTheAllowedSize"),
|
|
1420
|
+
msg("timeline.toolRenderers.isNotASupportedImage"),
|
|
1421
|
+
msg("timeline.toolRenderers.unableToReadImage"),
|
|
1411
1422
|
];
|
|
1412
1423
|
|
|
1413
1424
|
function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
1425
|
+
const msg = useOpenGeniText();
|
|
1414
1426
|
const args = parseToolArgs(item.arguments);
|
|
1415
1427
|
const path = typeof args.path === "string" ? args.path : "";
|
|
1416
1428
|
const out = item.output;
|
|
@@ -1423,12 +1435,12 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1423
1435
|
<ActivityDisclosure
|
|
1424
1436
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1425
1437
|
iconTone="running"
|
|
1426
|
-
title={
|
|
1438
|
+
title={msg("timeline.toolRenderers.viewPathbasename", { pathBasename: pathBasename(path) })}
|
|
1427
1439
|
running
|
|
1428
|
-
preview={<RunningPreview>reading
|
|
1440
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.reading")}</RunningPreview>}
|
|
1429
1441
|
media={<MediaSkeleton />}
|
|
1430
1442
|
>
|
|
1431
|
-
<BodyNote>
|
|
1443
|
+
<BodyNote>{msg("timeline.toolRenderers.readingImage")}</BodyNote>
|
|
1432
1444
|
</ActivityDisclosure>
|
|
1433
1445
|
);
|
|
1434
1446
|
}
|
|
@@ -1437,7 +1449,9 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1437
1449
|
const viewCancelled = item.status === "cancelled";
|
|
1438
1450
|
|
|
1439
1451
|
if (retained) {
|
|
1440
|
-
const title =
|
|
1452
|
+
const title = msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1453
|
+
pathBasename: pathBasename(path),
|
|
1454
|
+
});
|
|
1441
1455
|
if (!retained.available) {
|
|
1442
1456
|
const state =
|
|
1443
1457
|
retained.reason === "expired" || retained.reason === "deleted"
|
|
@@ -1454,7 +1468,10 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1454
1468
|
media={<MediaEmpty />}
|
|
1455
1469
|
>
|
|
1456
1470
|
<BodyNote tone={viewFailed ? "error" : undefined}>
|
|
1457
|
-
|
|
1471
|
+
{msg("timeline.toolRenderers.imageStateReplaceall", {
|
|
1472
|
+
state,
|
|
1473
|
+
replaceAll: retained.reason.replaceAll("_", " "),
|
|
1474
|
+
})}
|
|
1458
1475
|
</BodyNote>
|
|
1459
1476
|
</ActivityDisclosure>
|
|
1460
1477
|
);
|
|
@@ -1467,7 +1484,7 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1467
1484
|
caption={path || title}
|
|
1468
1485
|
noun="image"
|
|
1469
1486
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1470
|
-
lightboxLabel="
|
|
1487
|
+
lightboxLabel={msg("timeline.toolRenderers.image")}
|
|
1471
1488
|
batched={null}
|
|
1472
1489
|
failed={viewFailed}
|
|
1473
1490
|
cancelled={viewCancelled}
|
|
@@ -1475,15 +1492,18 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1475
1492
|
);
|
|
1476
1493
|
}
|
|
1477
1494
|
|
|
1478
|
-
const errMatch = VIEW_IMAGE_ERRORS.find((p) => text.includes(p));
|
|
1495
|
+
const errMatch = VIEW_IMAGE_ERRORS(msg).find((p) => text.includes(p));
|
|
1479
1496
|
if (errMatch) {
|
|
1480
1497
|
const tooBig = text.includes("exceeded the allowed size");
|
|
1481
1498
|
return (
|
|
1482
1499
|
<ActivityDisclosure
|
|
1483
1500
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1484
1501
|
iconTone="failed"
|
|
1485
|
-
title={
|
|
1486
|
-
chip={{
|
|
1502
|
+
title={msg("timeline.toolRenderers.viewPathbasename", { pathBasename: pathBasename(path) })}
|
|
1503
|
+
chip={{
|
|
1504
|
+
tone: "bad",
|
|
1505
|
+
text: tooBig ? msg("timeline.toolRenderers.tooLarge") : msg("timeline.chip.error"),
|
|
1506
|
+
}}
|
|
1487
1507
|
preview={text}
|
|
1488
1508
|
>
|
|
1489
1509
|
<BodyNote tone="error">{text}</BodyNote>
|
|
@@ -1495,7 +1515,9 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1495
1515
|
<ActivityDisclosure
|
|
1496
1516
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1497
1517
|
iconTone={viewFailed ? "failed" : "muted"}
|
|
1498
|
-
title={
|
|
1518
|
+
title={msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1519
|
+
pathBasename: pathBasename(path),
|
|
1520
|
+
})}
|
|
1499
1521
|
failed={viewFailed}
|
|
1500
1522
|
cancelled={viewCancelled}
|
|
1501
1523
|
preview={path}
|
|
@@ -1509,15 +1531,18 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1509
1531
|
<ActivityDisclosure
|
|
1510
1532
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1511
1533
|
iconTone={viewFailed ? "failed" : "muted"}
|
|
1512
|
-
title={
|
|
1534
|
+
title={msg("timeline.toolRenderers.viewedPathbasenameImageOmittedNot", {
|
|
1535
|
+
pathBasename: pathBasename(path),
|
|
1536
|
+
})}
|
|
1513
1537
|
failed={viewFailed}
|
|
1514
1538
|
cancelled={viewCancelled}
|
|
1515
|
-
preview="
|
|
1539
|
+
preview={msg("timeline.toolRenderers.inlineImageOmittedNotRetained")}
|
|
1516
1540
|
media={<MediaEmpty />}
|
|
1517
1541
|
>
|
|
1518
1542
|
<BodyNote>
|
|
1519
|
-
|
|
1520
|
-
|
|
1543
|
+
{msg("timeline.toolRenderers.theInlineMediatypeOutputWas", {
|
|
1544
|
+
mediaType: omittedMedia.mediaType,
|
|
1545
|
+
})}
|
|
1521
1546
|
</BodyNote>
|
|
1522
1547
|
</ActivityDisclosure>
|
|
1523
1548
|
);
|
|
@@ -1527,17 +1552,19 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1527
1552
|
<ActivityDisclosure
|
|
1528
1553
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1529
1554
|
iconTone={viewFailed ? "failed" : "muted"}
|
|
1530
|
-
title={
|
|
1555
|
+
title={msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1556
|
+
pathBasename: pathBasename(path),
|
|
1557
|
+
})}
|
|
1531
1558
|
failed={viewFailed}
|
|
1532
1559
|
cancelled={viewCancelled}
|
|
1533
|
-
preview="
|
|
1560
|
+
preview={msg("timeline.toolRenderers.noImage")}
|
|
1534
1561
|
>
|
|
1535
1562
|
<BodyNote>
|
|
1536
1563
|
{viewFailed
|
|
1537
|
-
? "
|
|
1564
|
+
? msg("timeline.toolRenderers.viewImageFailedNoImage")
|
|
1538
1565
|
: viewCancelled
|
|
1539
|
-
? "
|
|
1540
|
-
: "
|
|
1566
|
+
? msg("timeline.toolRenderers.viewImageInterrupted")
|
|
1567
|
+
: msg("timeline.toolRenderers.noImageTheSandboxSession")}
|
|
1541
1568
|
</BodyNote>
|
|
1542
1569
|
</ActivityDisclosure>
|
|
1543
1570
|
);
|
|
@@ -1547,7 +1574,9 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1547
1574
|
<ActivityDisclosure
|
|
1548
1575
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1549
1576
|
iconTone={viewFailed ? "failed" : "accent"}
|
|
1550
|
-
title={
|
|
1577
|
+
title={msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1578
|
+
pathBasename: pathBasename(path),
|
|
1579
|
+
})}
|
|
1551
1580
|
failed={viewFailed}
|
|
1552
1581
|
cancelled={viewCancelled}
|
|
1553
1582
|
media={<Thumbnail src={text} caption={path} alt={path} />}
|
|
@@ -1562,6 +1591,7 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1562
1591
|
/* ---- environment_set_variable (secret-safe, write-only) -------------------- */
|
|
1563
1592
|
|
|
1564
1593
|
function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
1594
|
+
const msg = useOpenGeniText();
|
|
1565
1595
|
const args = parseToolArgs(item.arguments);
|
|
1566
1596
|
const name = typeof args.name === "string" ? args.name : "variable";
|
|
1567
1597
|
|
|
@@ -1570,11 +1600,11 @@ function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
|
1570
1600
|
<ActivityDisclosure
|
|
1571
1601
|
icon={<KeyRoundIcon className={ICON_SIZE} />}
|
|
1572
1602
|
iconTone="running"
|
|
1573
|
-
title={
|
|
1603
|
+
title={msg("timeline.toolRenderers.setName", { name })}
|
|
1574
1604
|
running
|
|
1575
|
-
preview={<RunningPreview>setting
|
|
1605
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.setting")}</RunningPreview>}
|
|
1576
1606
|
>
|
|
1577
|
-
<PayloadBlock label="
|
|
1607
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1578
1608
|
</ActivityDisclosure>
|
|
1579
1609
|
);
|
|
1580
1610
|
}
|
|
@@ -1585,15 +1615,15 @@ function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
|
1585
1615
|
<ActivityDisclosure
|
|
1586
1616
|
icon={<KeyRoundIcon className={ICON_SIZE} />}
|
|
1587
1617
|
iconTone="failed"
|
|
1588
|
-
title={
|
|
1618
|
+
title={msg("timeline.toolRenderers.setName", { name })}
|
|
1589
1619
|
failed
|
|
1590
|
-
preview={errorText ?? "
|
|
1620
|
+
preview={errorText ?? msg("timeline.toolRenderers.variableWriteFailed")}
|
|
1591
1621
|
>
|
|
1592
|
-
<PayloadBlock label="
|
|
1622
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1593
1623
|
{errorText ? (
|
|
1594
|
-
<PayloadBlock label="
|
|
1624
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={errorText} failed />
|
|
1595
1625
|
) : (
|
|
1596
|
-
<BodyNote tone="error">
|
|
1626
|
+
<BodyNote tone="error">{msg("timeline.toolRenderers.theToolCallFailedWith")}</BodyNote>
|
|
1597
1627
|
)}
|
|
1598
1628
|
</ActivityDisclosure>
|
|
1599
1629
|
);
|
|
@@ -1603,138 +1633,20 @@ function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
|
1603
1633
|
<ActivityDisclosure
|
|
1604
1634
|
icon={<KeyRoundIcon className={ICON_SIZE} />}
|
|
1605
1635
|
iconTone="muted"
|
|
1606
|
-
title={
|
|
1636
|
+
title={msg("timeline.toolRenderers.setName", { name })}
|
|
1607
1637
|
cancelled={item.status === "cancelled"}
|
|
1608
1638
|
preview="exact value preserved"
|
|
1609
1639
|
>
|
|
1610
|
-
<PayloadBlock label="
|
|
1611
|
-
<BodyNote>
|
|
1612
|
-
The configured value is preserved exactly and available through authorized secret reads.
|
|
1613
|
-
</BodyNote>
|
|
1640
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1641
|
+
<BodyNote>{msg("timeline.toolRenderers.theConfiguredValueIsPreserved")}</BodyNote>
|
|
1614
1642
|
</ActivityDisclosure>
|
|
1615
1643
|
);
|
|
1616
1644
|
}
|
|
1617
1645
|
|
|
1618
1646
|
/* ---- tool_search (progressive MCP disclosure) ------------------------------ */
|
|
1619
1647
|
|
|
1620
|
-
type DisclosedTool = {
|
|
1621
|
-
/** Full wire name (`server__leaf` or bare). */
|
|
1622
|
-
name: string;
|
|
1623
|
-
/** Server / namespace prefix before `__`, when present. */
|
|
1624
|
-
source: string | null;
|
|
1625
|
-
/** Leaf tool name after `__`. */
|
|
1626
|
-
leaf: string;
|
|
1627
|
-
};
|
|
1628
|
-
|
|
1629
|
-
function splitToolWireName(name: string): DisclosedTool {
|
|
1630
|
-
const boundary = name.indexOf("__");
|
|
1631
|
-
if (boundary <= 0) {
|
|
1632
|
-
return { name, source: null, leaf: name };
|
|
1633
|
-
}
|
|
1634
|
-
return {
|
|
1635
|
-
name,
|
|
1636
|
-
source: name.slice(0, boundary),
|
|
1637
|
-
leaf: name.slice(boundary + 2),
|
|
1638
|
-
};
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
/** Capability query from live tool_search args (object or JSON string). */
|
|
1642
|
-
function toolSearchQuery(item: ToolRendererProps["item"]): string {
|
|
1643
|
-
const fromArgs = parseToolArgs(item.arguments);
|
|
1644
|
-
if (typeof fromArgs.query === "string" && fromArgs.query.trim()) {
|
|
1645
|
-
return fromArgs.query.trim();
|
|
1646
|
-
}
|
|
1647
|
-
const raw = item.raw;
|
|
1648
|
-
if (raw && typeof raw === "object") {
|
|
1649
|
-
const rawArgs = (raw as { arguments?: unknown }).arguments;
|
|
1650
|
-
if (typeof rawArgs === "string" && rawArgs.trim()) {
|
|
1651
|
-
const parsed = tryParseJson(rawArgs);
|
|
1652
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
1653
|
-
const query = (parsed as { query?: unknown }).query;
|
|
1654
|
-
if (typeof query === "string" && query.trim()) {
|
|
1655
|
-
return query.trim();
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
} else if (rawArgs && typeof rawArgs === "object" && !Array.isArray(rawArgs)) {
|
|
1659
|
-
const query = (rawArgs as { query?: unknown }).query;
|
|
1660
|
-
if (typeof query === "string" && query.trim()) {
|
|
1661
|
-
return query.trim();
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
return "";
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
/**
|
|
1669
|
-
* Parse disclosed tools from the runtime event shape.
|
|
1670
|
-
* `normalizeSdkEvent` collapses `tool_search_output.tools[]` into text:
|
|
1671
|
-
* "Disclosed tools: a, b" | "No matching tools found."
|
|
1672
|
-
* Also accept a structured `tools` array when a host/enricher preserves it.
|
|
1673
|
-
*/
|
|
1674
|
-
function parseDisclosedTools(output: unknown): DisclosedTool[] | null {
|
|
1675
|
-
if (output && typeof output === "object" && !Array.isArray(output)) {
|
|
1676
|
-
const tools = (output as { tools?: unknown }).tools;
|
|
1677
|
-
if (Array.isArray(tools)) {
|
|
1678
|
-
return tools
|
|
1679
|
-
.map((tool) => {
|
|
1680
|
-
if (typeof tool === "string" && tool.trim()) {
|
|
1681
|
-
return splitToolWireName(tool.trim());
|
|
1682
|
-
}
|
|
1683
|
-
if (
|
|
1684
|
-
tool &&
|
|
1685
|
-
typeof tool === "object" &&
|
|
1686
|
-
typeof (tool as { name?: unknown }).name === "string"
|
|
1687
|
-
) {
|
|
1688
|
-
const name = (tool as { name: string }).name.trim();
|
|
1689
|
-
return name ? splitToolWireName(name) : null;
|
|
1690
|
-
}
|
|
1691
|
-
return null;
|
|
1692
|
-
})
|
|
1693
|
-
.filter((tool): tool is DisclosedTool => tool != null);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
const { text } = unwrapMcpOutput(output);
|
|
1698
|
-
const trimmed = text.trim();
|
|
1699
|
-
if (!trimmed) {
|
|
1700
|
-
return null;
|
|
1701
|
-
}
|
|
1702
|
-
if (/^no matching tools found\.?$/i.test(trimmed)) {
|
|
1703
|
-
return [];
|
|
1704
|
-
}
|
|
1705
|
-
const disclosed = trimmed.match(/^disclosed tools:\s*(.+)$/i);
|
|
1706
|
-
if (disclosed?.[1]) {
|
|
1707
|
-
return disclosed[1]
|
|
1708
|
-
.split(",")
|
|
1709
|
-
.map((part) => part.trim())
|
|
1710
|
-
.filter(Boolean)
|
|
1711
|
-
.map(splitToolWireName);
|
|
1712
|
-
}
|
|
1713
|
-
const parsed = tryParseJson(trimmed);
|
|
1714
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
1715
|
-
return parseDisclosedTools(parsed);
|
|
1716
|
-
}
|
|
1717
|
-
return null;
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
function toolSearchPreview(tools: DisclosedTool[] | null, cancelled: boolean): string | undefined {
|
|
1721
|
-
if (cancelled) {
|
|
1722
|
-
return undefined;
|
|
1723
|
-
}
|
|
1724
|
-
if (!tools) {
|
|
1725
|
-
return "Done";
|
|
1726
|
-
}
|
|
1727
|
-
if (tools.length === 0) {
|
|
1728
|
-
return "No matches";
|
|
1729
|
-
}
|
|
1730
|
-
if (tools.length === 1) {
|
|
1731
|
-
return tools[0]!.leaf;
|
|
1732
|
-
}
|
|
1733
|
-
const head = tools[0]!.leaf;
|
|
1734
|
-
return `${tools.length} tools · ${truncatePreview(head, 28)}`;
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
1648
|
function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
1649
|
+
const msg = useOpenGeniText();
|
|
1738
1650
|
const query = toolSearchQuery(item);
|
|
1739
1651
|
const icon = <PackageSearchIcon className={ICON_SIZE} />;
|
|
1740
1652
|
const running = item.status === "running";
|
|
@@ -1745,18 +1657,23 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1745
1657
|
<ActivityDisclosure
|
|
1746
1658
|
icon={icon}
|
|
1747
1659
|
iconTone="running"
|
|
1748
|
-
title="
|
|
1660
|
+
title={msg("timeline.toolRenderers.lookingUpTools")}
|
|
1749
1661
|
running
|
|
1750
1662
|
preview={
|
|
1751
1663
|
queryPreview ? (
|
|
1752
1664
|
<RunningPreview>{queryPreview}</RunningPreview>
|
|
1753
1665
|
) : (
|
|
1754
|
-
<RunningPreview>
|
|
1666
|
+
<RunningPreview>{msg("timeline.toolRenderers.matchingCapabilities")}</RunningPreview>
|
|
1755
1667
|
)
|
|
1756
1668
|
}
|
|
1757
1669
|
>
|
|
1758
|
-
{query ?
|
|
1759
|
-
|
|
1670
|
+
{query ? (
|
|
1671
|
+
<BodyNote>{msg("timeline.toolRenderers.capabilityQueryQuery", { query })}</BodyNote>
|
|
1672
|
+
) : null}
|
|
1673
|
+
<PayloadBlock
|
|
1674
|
+
label={msg("timeline.toolRenderers.arguments")}
|
|
1675
|
+
value={parseToolArgs(item.arguments)}
|
|
1676
|
+
/>
|
|
1760
1677
|
</ActivityDisclosure>
|
|
1761
1678
|
);
|
|
1762
1679
|
}
|
|
@@ -1767,29 +1684,38 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1767
1684
|
<ActivityDisclosure
|
|
1768
1685
|
icon={icon}
|
|
1769
1686
|
iconTone="failed"
|
|
1770
|
-
title="
|
|
1687
|
+
title={msg("timeline.toolRenderers.toolLookupFailed")}
|
|
1771
1688
|
failed
|
|
1772
|
-
preview={
|
|
1689
|
+
preview={
|
|
1690
|
+
truncatePreview(outText, 80) || queryPreview || msg("timeline.toolRenderers.lookupFailed")
|
|
1691
|
+
}
|
|
1773
1692
|
>
|
|
1774
|
-
{query ?
|
|
1775
|
-
|
|
1776
|
-
|
|
1693
|
+
{query ? (
|
|
1694
|
+
<BodyNote>{msg("timeline.toolRenderers.capabilityQueryQuery", { query })}</BodyNote>
|
|
1695
|
+
) : null}
|
|
1696
|
+
<PayloadBlock
|
|
1697
|
+
label={msg("timeline.toolRenderers.arguments")}
|
|
1698
|
+
value={parseToolArgs(item.arguments)}
|
|
1699
|
+
/>
|
|
1700
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
1777
1701
|
</ActivityDisclosure>
|
|
1778
1702
|
);
|
|
1779
1703
|
}
|
|
1780
1704
|
|
|
1781
1705
|
const tools = parseDisclosedTools(item.output);
|
|
1782
|
-
const preview = toolSearchPreview(tools, item.status === "cancelled");
|
|
1706
|
+
const preview = toolSearchPreview(msg, tools, item.status === "cancelled");
|
|
1783
1707
|
|
|
1784
1708
|
return (
|
|
1785
1709
|
<ActivityDisclosure
|
|
1786
1710
|
icon={icon}
|
|
1787
1711
|
iconTone="muted"
|
|
1788
|
-
title="
|
|
1712
|
+
title={msg("timeline.toolRenderers.lookedUpTools")}
|
|
1789
1713
|
cancelled={item.status === "cancelled"}
|
|
1790
1714
|
preview={preview}
|
|
1791
1715
|
>
|
|
1792
|
-
{query ?
|
|
1716
|
+
{query ? (
|
|
1717
|
+
<BodyNote>{msg("timeline.toolRenderers.capabilityQueryQuery", { query })}</BodyNote>
|
|
1718
|
+
) : null}
|
|
1793
1719
|
{tools && tools.length > 0 ? (
|
|
1794
1720
|
<ul className="grid gap-1.5">
|
|
1795
1721
|
{tools.slice(0, 12).map((tool) => (
|
|
@@ -1801,14 +1727,21 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1801
1727
|
</li>
|
|
1802
1728
|
))}
|
|
1803
1729
|
{tools.length > 12 ? (
|
|
1804
|
-
<li className="text-og-xs text-og-fg-muted"
|
|
1730
|
+
<li className="text-og-xs text-og-fg-muted">
|
|
1731
|
+
+{tools.length - 12} {msg("timeline.toolRenderers.more")}
|
|
1732
|
+
</li>
|
|
1805
1733
|
) : null}
|
|
1806
1734
|
</ul>
|
|
1807
1735
|
) : tools && tools.length === 0 ? (
|
|
1808
|
-
<BodyNote>
|
|
1736
|
+
<BodyNote>{msg("timeline.toolRenderers.noDeferredToolsMatchedThis")}</BodyNote>
|
|
1737
|
+
) : null}
|
|
1738
|
+
<PayloadBlock
|
|
1739
|
+
label={msg("timeline.toolRenderers.arguments")}
|
|
1740
|
+
value={parseToolArgs(item.arguments)}
|
|
1741
|
+
/>
|
|
1742
|
+
{tools == null && outText ? (
|
|
1743
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
1809
1744
|
) : null}
|
|
1810
|
-
<PayloadBlock label="Arguments" value={parseToolArgs(item.arguments)} />
|
|
1811
|
-
{tools == null && outText ? <PayloadBlock label="Result" value={outText} /> : null}
|
|
1812
1745
|
</ActivityDisclosure>
|
|
1813
1746
|
);
|
|
1814
1747
|
}
|
|
@@ -1816,9 +1749,14 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1816
1749
|
/* ---- docs / knowledge search ----------------------------------------------- */
|
|
1817
1750
|
|
|
1818
1751
|
function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
1752
|
+
const msg = useOpenGeniText();
|
|
1819
1753
|
const args = parseToolArgs(item.arguments);
|
|
1820
1754
|
const query = typeof args.query === "string" ? args.query.trim() : "";
|
|
1821
|
-
const title = query
|
|
1755
|
+
const title = query
|
|
1756
|
+
? msg("timeline.toolRenderers.searchTruncatepreview", {
|
|
1757
|
+
truncatePreview: truncatePreview(query, 48),
|
|
1758
|
+
})
|
|
1759
|
+
: toolDisplayName(msg, item.name, item.display);
|
|
1822
1760
|
const running = item.status === "running";
|
|
1823
1761
|
|
|
1824
1762
|
if (running) {
|
|
@@ -1828,9 +1766,9 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1828
1766
|
iconTone="running"
|
|
1829
1767
|
title={title}
|
|
1830
1768
|
running
|
|
1831
|
-
preview={<RunningPreview>
|
|
1769
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.searching")}</RunningPreview>}
|
|
1832
1770
|
>
|
|
1833
|
-
<PayloadBlock label="
|
|
1771
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1834
1772
|
</ActivityDisclosure>
|
|
1835
1773
|
);
|
|
1836
1774
|
}
|
|
@@ -1843,23 +1781,23 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1843
1781
|
iconTone="failed"
|
|
1844
1782
|
title={title}
|
|
1845
1783
|
failed
|
|
1846
|
-
preview={truncatePreview(outText, 80) || "
|
|
1784
|
+
preview={truncatePreview(outText, 80) || msg("timeline.toolRenderers.searchFailed")}
|
|
1847
1785
|
>
|
|
1848
|
-
<PayloadBlock label="
|
|
1849
|
-
<PayloadBlock label="
|
|
1786
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1787
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
1850
1788
|
</ActivityDisclosure>
|
|
1851
1789
|
);
|
|
1852
1790
|
}
|
|
1853
1791
|
|
|
1854
|
-
const hits = parseSearchHits(outText);
|
|
1792
|
+
const hits = parseSearchHits(msg, outText);
|
|
1855
1793
|
const preview =
|
|
1856
1794
|
item.status === "cancelled"
|
|
1857
1795
|
? undefined
|
|
1858
1796
|
: hits
|
|
1859
1797
|
? hits.length === 0
|
|
1860
|
-
? "
|
|
1861
|
-
:
|
|
1862
|
-
: "
|
|
1798
|
+
? msg("timeline.toolRenderers.noHits")
|
|
1799
|
+
: msg("counts.hits", { count: hits.length })
|
|
1800
|
+
: msg("timeline.toolRenderers.done");
|
|
1863
1801
|
|
|
1864
1802
|
return (
|
|
1865
1803
|
<ActivityDisclosure
|
|
@@ -1881,8 +1819,8 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1881
1819
|
))}
|
|
1882
1820
|
</ul>
|
|
1883
1821
|
) : null}
|
|
1884
|
-
<PayloadBlock label="
|
|
1885
|
-
<PayloadBlock label="
|
|
1822
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1823
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
1886
1824
|
</ActivityDisclosure>
|
|
1887
1825
|
);
|
|
1888
1826
|
}
|
|
@@ -1890,9 +1828,10 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1890
1828
|
/* ---- set_session_title / set_other_session_title --------------------------- */
|
|
1891
1829
|
|
|
1892
1830
|
function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
1831
|
+
const msg = useOpenGeniText();
|
|
1893
1832
|
const args = parseToolArgs(item.arguments);
|
|
1894
1833
|
const titleArg = typeof args.title === "string" ? args.title.trim() : "";
|
|
1895
|
-
const display = toolDisplayName(item.name);
|
|
1834
|
+
const display = toolDisplayName(msg, item.name, item.display);
|
|
1896
1835
|
const previewTitle = titleArg ? truncatePreview(titleArg, 72) : "";
|
|
1897
1836
|
const icon = <MessagesSquareIcon className={ICON_SIZE} />;
|
|
1898
1837
|
|
|
@@ -1907,11 +1846,11 @@ function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
|
1907
1846
|
previewTitle ? (
|
|
1908
1847
|
<RunningPreview>{previewTitle}</RunningPreview>
|
|
1909
1848
|
) : (
|
|
1910
|
-
<RunningPreview>
|
|
1849
|
+
<RunningPreview>{msg("timeline.toolRenderers.settingTitle")}</RunningPreview>
|
|
1911
1850
|
)
|
|
1912
1851
|
}
|
|
1913
1852
|
>
|
|
1914
|
-
<PayloadBlock label="
|
|
1853
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1915
1854
|
</ActivityDisclosure>
|
|
1916
1855
|
);
|
|
1917
1856
|
}
|
|
@@ -1924,10 +1863,10 @@ function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
|
1924
1863
|
iconTone="failed"
|
|
1925
1864
|
title={display}
|
|
1926
1865
|
failed
|
|
1927
|
-
preview={truncatePreview(outText, 80) || "
|
|
1866
|
+
preview={truncatePreview(outText, 80) || msg("timeline.toolRenderers.renameFailed")}
|
|
1928
1867
|
>
|
|
1929
|
-
<PayloadBlock label="
|
|
1930
|
-
<PayloadBlock label="
|
|
1868
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1869
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
1931
1870
|
</ActivityDisclosure>
|
|
1932
1871
|
);
|
|
1933
1872
|
}
|
|
@@ -1952,55 +1891,21 @@ function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
|
1952
1891
|
cancelled={item.status === "cancelled"}
|
|
1953
1892
|
preview={item.status === "cancelled" ? undefined : settledTitle || undefined}
|
|
1954
1893
|
>
|
|
1955
|
-
<PayloadBlock label="
|
|
1956
|
-
{outText ?
|
|
1894
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1895
|
+
{outText ? (
|
|
1896
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
1897
|
+
) : null}
|
|
1957
1898
|
</ActivityDisclosure>
|
|
1958
1899
|
);
|
|
1959
1900
|
}
|
|
1960
1901
|
|
|
1961
|
-
type SearchHit = { title: string; snippet: string };
|
|
1962
|
-
|
|
1963
|
-
function parseSearchHits(outText: string): SearchHit[] | null {
|
|
1964
|
-
const parsed = tryParseJson(outText);
|
|
1965
|
-
if (parsed == null) {
|
|
1966
|
-
return null;
|
|
1967
|
-
}
|
|
1968
|
-
const list = Array.isArray(parsed)
|
|
1969
|
-
? parsed
|
|
1970
|
-
: parsed &&
|
|
1971
|
-
typeof parsed === "object" &&
|
|
1972
|
-
Array.isArray((parsed as { results?: unknown }).results)
|
|
1973
|
-
? (parsed as { results: unknown[] }).results
|
|
1974
|
-
: parsed && typeof parsed === "object" && Array.isArray((parsed as { hits?: unknown }).hits)
|
|
1975
|
-
? (parsed as { hits: unknown[] }).hits
|
|
1976
|
-
: null;
|
|
1977
|
-
if (!list) {
|
|
1978
|
-
return null;
|
|
1979
|
-
}
|
|
1980
|
-
return list.map((row) => {
|
|
1981
|
-
const r = row && typeof row === "object" ? (row as Record<string, unknown>) : {};
|
|
1982
|
-
const title =
|
|
1983
|
-
(typeof r.title === "string" && r.title) ||
|
|
1984
|
-
(typeof r.name === "string" && r.name) ||
|
|
1985
|
-
(typeof r.documentTitle === "string" && r.documentTitle) ||
|
|
1986
|
-
(typeof r.path === "string" && r.path) ||
|
|
1987
|
-
(typeof r.id === "string" && r.id) ||
|
|
1988
|
-
"Result";
|
|
1989
|
-
const snippet =
|
|
1990
|
-
(typeof r.snippet === "string" && r.snippet) ||
|
|
1991
|
-
(typeof r.text === "string" && r.text) ||
|
|
1992
|
-
(typeof r.content === "string" && r.content) ||
|
|
1993
|
-
"";
|
|
1994
|
-
return { title, snippet: truncatePreview(snippet, 160) };
|
|
1995
|
-
});
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
1902
|
/* ---- company memory propose (docs MCP) ------------------------------------- */
|
|
1999
1903
|
|
|
2000
1904
|
function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
1905
|
+
const msg = useOpenGeniText();
|
|
2001
1906
|
const args = parseToolArgs(item.arguments);
|
|
2002
1907
|
const text = typeof args.text === "string" ? args.text.trim() : "";
|
|
2003
|
-
const title = "
|
|
1908
|
+
const title = msg("timeline.toolRenderers.proposeMemory");
|
|
2004
1909
|
const running = item.status === "running";
|
|
2005
1910
|
|
|
2006
1911
|
if (running) {
|
|
@@ -2010,9 +1915,9 @@ function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
|
2010
1915
|
iconTone="running"
|
|
2011
1916
|
title={title}
|
|
2012
1917
|
running
|
|
2013
|
-
preview={<RunningPreview>
|
|
1918
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.proposing")}</RunningPreview>}
|
|
2014
1919
|
>
|
|
2015
|
-
<PayloadBlock label="
|
|
1920
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
2016
1921
|
</ActivityDisclosure>
|
|
2017
1922
|
);
|
|
2018
1923
|
}
|
|
@@ -2025,10 +1930,10 @@ function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
|
2025
1930
|
iconTone="failed"
|
|
2026
1931
|
title={title}
|
|
2027
1932
|
failed
|
|
2028
|
-
preview={truncatePreview(outText, 80) || "
|
|
1933
|
+
preview={truncatePreview(outText, 80) || msg("timeline.toolRenderers.proposeFailed")}
|
|
2029
1934
|
>
|
|
2030
1935
|
{text ? <BodyNote>{text}</BodyNote> : null}
|
|
2031
|
-
<PayloadBlock label="
|
|
1936
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
2032
1937
|
</ActivityDisclosure>
|
|
2033
1938
|
);
|
|
2034
1939
|
}
|
|
@@ -2039,187 +1944,18 @@ function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
|
2039
1944
|
iconTone="muted"
|
|
2040
1945
|
title={title}
|
|
2041
1946
|
cancelled={item.status === "cancelled"}
|
|
2042
|
-
preview={text ? truncatePreview(text, 90) : "
|
|
1947
|
+
preview={text ? truncatePreview(text, 90) : msg("timeline.toolRenderers.done")}
|
|
2043
1948
|
>
|
|
2044
1949
|
{text ? <BodyNote>{text}</BodyNote> : null}
|
|
2045
|
-
<PayloadBlock label="
|
|
1950
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
2046
1951
|
</ActivityDisclosure>
|
|
2047
1952
|
);
|
|
2048
1953
|
}
|
|
2049
1954
|
|
|
2050
1955
|
/* ---- request_human_input --------------------------------------------------- */
|
|
2051
1956
|
|
|
2052
|
-
function askToolPreview(args: unknown): string | null {
|
|
2053
|
-
const record = args && typeof args === "object" ? (args as Record<string, unknown>) : null;
|
|
2054
|
-
const questions = Array.isArray(record?.questions) ? record.questions : null;
|
|
2055
|
-
if (!questions || questions.length === 0) {
|
|
2056
|
-
return null;
|
|
2057
|
-
}
|
|
2058
|
-
const first = questions[0];
|
|
2059
|
-
if (!first || typeof first !== "object") {
|
|
2060
|
-
return null;
|
|
2061
|
-
}
|
|
2062
|
-
const q = first as Record<string, unknown>;
|
|
2063
|
-
const text =
|
|
2064
|
-
typeof q.label === "string" && q.label.trim()
|
|
2065
|
-
? q.label.trim()
|
|
2066
|
-
: typeof q.prompt === "string" && q.prompt.trim()
|
|
2067
|
-
? q.prompt.trim()
|
|
2068
|
-
: null;
|
|
2069
|
-
if (!text) {
|
|
2070
|
-
return null;
|
|
2071
|
-
}
|
|
2072
|
-
const preview = truncatePreview(text, 90);
|
|
2073
|
-
return questions.length > 1 ? `${preview} · ${questions.length} questions` : preview;
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
function AskRenderer({ item }: ToolRendererProps) {
|
|
2077
|
-
const args = parseToolArgs(item.arguments);
|
|
2078
|
-
const preview = askToolPreview(args);
|
|
2079
|
-
const icon = <MessageCircleQuestionIcon className={ICON_SIZE} />;
|
|
2080
|
-
const title = "Ask";
|
|
2081
|
-
|
|
2082
|
-
if (item.status === "running") {
|
|
2083
|
-
return (
|
|
2084
|
-
<ActivityDisclosure
|
|
2085
|
-
icon={icon}
|
|
2086
|
-
iconTone="running"
|
|
2087
|
-
title={title}
|
|
2088
|
-
running
|
|
2089
|
-
preview={
|
|
2090
|
-
preview ? (
|
|
2091
|
-
<RunningPreview>{preview}</RunningPreview>
|
|
2092
|
-
) : (
|
|
2093
|
-
<RunningPreview>Waiting…</RunningPreview>
|
|
2094
|
-
)
|
|
2095
|
-
}
|
|
2096
|
-
>
|
|
2097
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2098
|
-
</ActivityDisclosure>
|
|
2099
|
-
);
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
const { text: outText, isError } = unwrapMcpOutput(item.output);
|
|
2103
|
-
if ((isError || item.status === "failed") && item.status !== "cancelled") {
|
|
2104
|
-
return (
|
|
2105
|
-
<ActivityDisclosure
|
|
2106
|
-
icon={icon}
|
|
2107
|
-
iconTone="failed"
|
|
2108
|
-
title={title}
|
|
2109
|
-
chip={{ tone: "bad", text: "error" }}
|
|
2110
|
-
preview={truncatePreview(outText, 80) || preview || "Error"}
|
|
2111
|
-
>
|
|
2112
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2113
|
-
<PayloadBlock label="Error" value={outText} failed />
|
|
2114
|
-
</ActivityDisclosure>
|
|
2115
|
-
);
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2118
|
-
return (
|
|
2119
|
-
<ActivityDisclosure
|
|
2120
|
-
icon={icon}
|
|
2121
|
-
iconTone="muted"
|
|
2122
|
-
title={title}
|
|
2123
|
-
cancelled={item.status === "cancelled"}
|
|
2124
|
-
preview={item.status === "cancelled" ? undefined : (preview ?? undefined)}
|
|
2125
|
-
>
|
|
2126
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2127
|
-
{outText ? <PayloadBlock label="Result" value={outText} /> : null}
|
|
2128
|
-
</ActivityDisclosure>
|
|
2129
|
-
);
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
1957
|
/* ---- run_on ---------------------------------------------------------------- */
|
|
2133
1958
|
|
|
2134
|
-
function runOnTargetName(output: unknown): string | null {
|
|
2135
|
-
const { text } = unwrapMcpOutput(output);
|
|
2136
|
-
const parsed = tryParseJson(text);
|
|
2137
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
2138
|
-
const name = (parsed as { targetName?: unknown }).targetName;
|
|
2139
|
-
if (typeof name === "string" && name.trim()) {
|
|
2140
|
-
return name.trim();
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
return null;
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
function runOnOpPreview(args: Record<string, unknown>): string | null {
|
|
2147
|
-
const op = args.op;
|
|
2148
|
-
if (!op || typeof op !== "object" || Array.isArray(op)) {
|
|
2149
|
-
return null;
|
|
2150
|
-
}
|
|
2151
|
-
const record = op as Record<string, unknown>;
|
|
2152
|
-
if (record.kind === "exec" && typeof record.cmd === "string" && record.cmd.trim()) {
|
|
2153
|
-
return `$ ${record.cmd.trim()}`;
|
|
2154
|
-
}
|
|
2155
|
-
if (
|
|
2156
|
-
(record.kind === "read" || record.kind === "write") &&
|
|
2157
|
-
typeof record.path === "string" &&
|
|
2158
|
-
record.path.trim()
|
|
2159
|
-
) {
|
|
2160
|
-
return truncatePreview(record.path.trim(), 72);
|
|
2161
|
-
}
|
|
2162
|
-
return null;
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
function RunOnRenderer({ item }: ToolRendererProps) {
|
|
2166
|
-
const parsedArgs = parseToolArgs(item.arguments);
|
|
2167
|
-
const args = parsedArgs;
|
|
2168
|
-
const targetName = runOnTargetName(item.output);
|
|
2169
|
-
const title = targetName ? `Run on ${targetName}` : "Run on";
|
|
2170
|
-
const opPreview = runOnOpPreview(parsedArgs);
|
|
2171
|
-
const icon = <ServerIcon className={ICON_SIZE} />;
|
|
2172
|
-
|
|
2173
|
-
if (item.status === "running") {
|
|
2174
|
-
return (
|
|
2175
|
-
<ActivityDisclosure
|
|
2176
|
-
icon={icon}
|
|
2177
|
-
iconTone="running"
|
|
2178
|
-
title={title}
|
|
2179
|
-
running
|
|
2180
|
-
preview={
|
|
2181
|
-
opPreview ? (
|
|
2182
|
-
<RunningPreview>{opPreview}</RunningPreview>
|
|
2183
|
-
) : (
|
|
2184
|
-
<RunningPreview>Running…</RunningPreview>
|
|
2185
|
-
)
|
|
2186
|
-
}
|
|
2187
|
-
>
|
|
2188
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2189
|
-
</ActivityDisclosure>
|
|
2190
|
-
);
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
const { text: outText, isError } = unwrapMcpOutput(item.output);
|
|
2194
|
-
if ((isError || item.status === "failed") && item.status !== "cancelled") {
|
|
2195
|
-
return (
|
|
2196
|
-
<ActivityDisclosure
|
|
2197
|
-
icon={icon}
|
|
2198
|
-
iconTone="failed"
|
|
2199
|
-
title={title}
|
|
2200
|
-
chip={{ tone: "bad", text: "error" }}
|
|
2201
|
-
preview={truncatePreview(outText, 80) || opPreview || "Error"}
|
|
2202
|
-
>
|
|
2203
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2204
|
-
<PayloadBlock label="Error" value={outText} failed />
|
|
2205
|
-
</ActivityDisclosure>
|
|
2206
|
-
);
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
return (
|
|
2210
|
-
<ActivityDisclosure
|
|
2211
|
-
icon={icon}
|
|
2212
|
-
iconTone="muted"
|
|
2213
|
-
title={title}
|
|
2214
|
-
cancelled={item.status === "cancelled"}
|
|
2215
|
-
preview={item.status === "cancelled" ? undefined : (opPreview ?? undefined)}
|
|
2216
|
-
>
|
|
2217
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2218
|
-
{outText ? <PayloadBlock label="Result" value={outText} /> : null}
|
|
2219
|
-
</ActivityDisclosure>
|
|
2220
|
-
);
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
1959
|
/* ---- generic fallback (first-party MCP, external MCP, unknown) ------------- */
|
|
2224
1960
|
|
|
2225
1961
|
/**
|
|
@@ -2227,150 +1963,136 @@ function RunOnRenderer({ item }: ToolRendererProps) {
|
|
|
2227
1963
|
* status preview (Running… / Done / error snippet). No argument-field sniffing —
|
|
2228
1964
|
* JSON stays in the expandable body only.
|
|
2229
1965
|
*/
|
|
2230
|
-
function GenericRenderer(
|
|
2231
|
-
const
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
// Goal tools: surface the objective text on the collapsed row so the in-cluster
|
|
2236
|
-
// tool replaces the old breakaway GoalRow pill without losing the gist.
|
|
2237
|
-
const goalPreview = goalToolPreview(item.name, args);
|
|
2238
|
-
|
|
2239
|
-
if (running) {
|
|
2240
|
-
return (
|
|
2241
|
-
<ActivityDisclosure
|
|
2242
|
-
icon={icon}
|
|
2243
|
-
iconTone="running"
|
|
2244
|
-
title={display}
|
|
2245
|
-
running
|
|
2246
|
-
preview={goalPreview ?? <RunningPreview>Running…</RunningPreview>}
|
|
2247
|
-
>
|
|
2248
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2249
|
-
</ActivityDisclosure>
|
|
2250
|
-
);
|
|
2251
|
-
}
|
|
1966
|
+
function GenericRenderer(props: ToolRendererProps) {
|
|
1967
|
+
const reviewed = useHasToolReview(props.item.callId);
|
|
1968
|
+
if (reviewed && props.item.callId) return <ReviewedGenericRenderer {...props} />;
|
|
1969
|
+
return <UnreviewedGenericRenderer {...props} />;
|
|
1970
|
+
}
|
|
2252
1971
|
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
>
|
|
2266
|
-
<PayloadBlock label="Arguments" value={args} />
|
|
2267
|
-
<PayloadBlock label="Error" value={outText} failed />
|
|
2268
|
-
</ActivityDisclosure>
|
|
2269
|
-
);
|
|
2270
|
-
}
|
|
1972
|
+
/** Settled review states earn one quiet gutter word; success and waiting stay chip-free. */
|
|
1973
|
+
const REVIEW_CHIP = (msg: OpenGeniText): Partial<Record<ToolReviewStatus, DisclosureChip>> => ({
|
|
1974
|
+
rejected: { tone: "interrupted", text: msg("timeline.chip.declined") },
|
|
1975
|
+
cancelled: { tone: "interrupted", text: msg("timeline.toolRenderers.notRun") },
|
|
1976
|
+
expired: { tone: "interrupted", text: msg("timeline.chip.expired") },
|
|
1977
|
+
stale: { tone: "interrupted", text: msg("timeline.toolRenderers.notRun") },
|
|
1978
|
+
revoked: { tone: "interrupted", text: msg("timeline.toolRenderers.notRun") },
|
|
1979
|
+
blocked: { tone: "interrupted", text: msg("timeline.chip.blocked") },
|
|
1980
|
+
unknown: { tone: "bad", text: msg("timeline.toolRenderers.outcomeUnknown") },
|
|
1981
|
+
partial: { tone: "bad", text: msg("timeline.toolRenderers.partlyDone") },
|
|
1982
|
+
failed: { tone: "bad", text: msg("timeline.chip.failed") },
|
|
1983
|
+
});
|
|
2271
1984
|
|
|
1985
|
+
/**
|
|
1986
|
+
* A call that went through approval keeps the ordinary row shape, titled with
|
|
1987
|
+
* what was approved. The expanded body is the saved review plus the result.
|
|
1988
|
+
*/
|
|
1989
|
+
function ReviewedGenericRenderer(props: ToolRendererProps) {
|
|
1990
|
+
const msg = useOpenGeniText();
|
|
1991
|
+
const { item } = props;
|
|
1992
|
+
const { review, onViewDetails } = useRecordedToolReview(item.callId);
|
|
1993
|
+
const logo = useToolConnectorLogo(item.display);
|
|
1994
|
+
if (!review) return <UnreviewedGenericRenderer {...props} />;
|
|
1995
|
+
const ReviewIcon = toolIcon(genericToolIconKind(item.name));
|
|
1996
|
+
const icon = <ConnectorLogoIcon src={logo} fallback={<ReviewIcon className={ICON_SIZE} />} />;
|
|
1997
|
+
const waiting = review.status === "pending";
|
|
1998
|
+
const running =
|
|
1999
|
+
!waiting &&
|
|
2000
|
+
(review.status === "executing" || review.status === "approved") &&
|
|
2001
|
+
item.status === "running";
|
|
2002
|
+
const { text: outText, isError } = unwrapMcpOutput(retainedToolResultImages(item.output).output);
|
|
2003
|
+
const chip =
|
|
2004
|
+
REVIEW_CHIP(msg)[review.status] ??
|
|
2005
|
+
(isError && !running && !waiting
|
|
2006
|
+
? ({ tone: "bad", text: msg("timeline.chip.error") } as const)
|
|
2007
|
+
: undefined);
|
|
2272
2008
|
return (
|
|
2273
2009
|
<ActivityDisclosure
|
|
2274
2010
|
icon={icon}
|
|
2275
|
-
iconTone="muted"
|
|
2276
|
-
title={
|
|
2277
|
-
|
|
2278
|
-
|
|
2011
|
+
iconTone={chip?.tone === "bad" ? "failed" : waiting ? "accent" : "muted"}
|
|
2012
|
+
title={review.title}
|
|
2013
|
+
running={running}
|
|
2014
|
+
chip={chip}
|
|
2015
|
+
preview={
|
|
2016
|
+
waiting ? (
|
|
2017
|
+
msg("timeline.toolRenderers.waitingForYourApproval")
|
|
2018
|
+
) : running ? (
|
|
2019
|
+
<RunningPreview>{msg("timeline.toolRenderers.running")}</RunningPreview>
|
|
2020
|
+
) : item.display?.connector ? (
|
|
2021
|
+
// The logo names the connector; only a second account needs words.
|
|
2022
|
+
(item.display.accountLabel ?? undefined)
|
|
2023
|
+
) : (
|
|
2024
|
+
(review.accountLabel ?? undefined)
|
|
2025
|
+
)
|
|
2026
|
+
}
|
|
2279
2027
|
>
|
|
2280
|
-
<
|
|
2281
|
-
|
|
2028
|
+
<div className="py-1" data-approval-id={item.callId} data-review-origin="history">
|
|
2029
|
+
<ToolActionReviewCard
|
|
2030
|
+
bare
|
|
2031
|
+
review={{ ...review, availableActions: [] }}
|
|
2032
|
+
onViewDetails={onViewDetails}
|
|
2033
|
+
/>
|
|
2034
|
+
</div>
|
|
2035
|
+
{outText ? (
|
|
2036
|
+
<PayloadBlock
|
|
2037
|
+
label={msg("timeline.toolRenderers.result")}
|
|
2038
|
+
value={outText}
|
|
2039
|
+
failed={isError}
|
|
2040
|
+
/>
|
|
2041
|
+
) : null}
|
|
2282
2042
|
</ActivityDisclosure>
|
|
2283
2043
|
);
|
|
2284
2044
|
}
|
|
2285
2045
|
|
|
2286
|
-
|
|
2287
|
-
const leaf = mcpToolLeaf(name);
|
|
2288
|
-
if (
|
|
2289
|
-
leaf !== "goal_set" &&
|
|
2290
|
-
leaf !== "goal_update" &&
|
|
2291
|
-
leaf !== "goal_complete" &&
|
|
2292
|
-
leaf !== "goal_pause" &&
|
|
2293
|
-
leaf !== "wait_for_input"
|
|
2294
|
-
) {
|
|
2295
|
-
return null;
|
|
2296
|
-
}
|
|
2297
|
-
const record = args && typeof args === "object" ? (args as Record<string, unknown>) : null;
|
|
2298
|
-
if (!record) {
|
|
2299
|
-
return null;
|
|
2300
|
-
}
|
|
2301
|
-
const text =
|
|
2302
|
-
typeof record.text === "string"
|
|
2303
|
-
? record.text
|
|
2304
|
-
: typeof record.evidence === "string"
|
|
2305
|
-
? record.evidence
|
|
2306
|
-
: typeof record.rationale === "string"
|
|
2307
|
-
? record.rationale
|
|
2308
|
-
: typeof record.reason === "string"
|
|
2309
|
-
? record.reason
|
|
2310
|
-
: typeof record.progressNote === "string"
|
|
2311
|
-
? record.progressNote
|
|
2312
|
-
: null;
|
|
2313
|
-
return text ? truncatePreview(text, 90) : null;
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
function truncatePreview(text: string, max: number): string {
|
|
2317
|
-
const cleaned = text.replace(/\s+/g, " ").trim();
|
|
2318
|
-
if (!cleaned) {
|
|
2319
|
-
return "";
|
|
2320
|
-
}
|
|
2321
|
-
return cleaned.length > max ? `${cleaned.slice(0, max - 1)}…` : cleaned;
|
|
2322
|
-
}
|
|
2046
|
+
/* ---- the default registry -------------------------------------------------- */
|
|
2323
2047
|
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
const
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
: leaf.startsWith("variable_")
|
|
2356
|
-
? BoxIcon
|
|
2357
|
-
: leaf.startsWith("environment_")
|
|
2358
|
-
? KeyRoundIcon
|
|
2359
|
-
: leaf.includes("document") ||
|
|
2360
|
-
leaf.includes("knowledge") ||
|
|
2361
|
-
leaf === "list_document_bases"
|
|
2362
|
-
? FileSearchIcon
|
|
2363
|
-
: leaf === "tool_search"
|
|
2364
|
-
? PackageSearchIcon
|
|
2365
|
-
: leaf === "load_skill"
|
|
2366
|
-
? PlugIcon
|
|
2367
|
-
: WrenchIcon;
|
|
2368
|
-
return <Icon className={ICON_SIZE} />;
|
|
2048
|
+
function KnowledgeSaveRenderer({ item }: ToolRendererProps) {
|
|
2049
|
+
const output = unwrapMcpOutput(item.output);
|
|
2050
|
+
const parsed = tryParseJson(output.text);
|
|
2051
|
+
if (item.status === "running" || output.isError || !parsed || typeof parsed !== "object")
|
|
2052
|
+
return <GenericRenderer item={item} />;
|
|
2053
|
+
const value = parsed as Record<string, unknown>;
|
|
2054
|
+
const receipt = (value.status === "retained" ? value.receipt : value) as
|
|
2055
|
+
| Record<string, unknown>
|
|
2056
|
+
| undefined;
|
|
2057
|
+
if (
|
|
2058
|
+
!receipt ||
|
|
2059
|
+
typeof receipt.entryId !== "string" ||
|
|
2060
|
+
!["published", "pending", "rejected", "archived"].includes(String(receipt.outcome))
|
|
2061
|
+
)
|
|
2062
|
+
return <GenericRenderer item={item} />;
|
|
2063
|
+
const args = parseToolArgs(item.arguments);
|
|
2064
|
+
const entry = args.entry as Record<string, unknown> | undefined;
|
|
2065
|
+
return (
|
|
2066
|
+
<KnowledgeReceiptRow
|
|
2067
|
+
outcome={receipt.outcome as "published" | "pending" | "rejected" | "archived"}
|
|
2068
|
+
entryId={receipt.entryId}
|
|
2069
|
+
title={
|
|
2070
|
+
typeof entry?.title === "string"
|
|
2071
|
+
? entry.title
|
|
2072
|
+
: typeof value.filename === "string"
|
|
2073
|
+
? value.filename
|
|
2074
|
+
: undefined
|
|
2075
|
+
}
|
|
2076
|
+
source={value.status === "retained" || value.retained === true}
|
|
2077
|
+
/>
|
|
2078
|
+
);
|
|
2369
2079
|
}
|
|
2370
2080
|
|
|
2371
|
-
/* ---- the default registry -------------------------------------------------- */
|
|
2372
|
-
|
|
2373
2081
|
const BASE_ENTRIES: ToolRegistryEntry[] = [
|
|
2082
|
+
...[
|
|
2083
|
+
"knowledge_save",
|
|
2084
|
+
"knowledge_archive",
|
|
2085
|
+
"knowledge_retain_file",
|
|
2086
|
+
"knowledge_retain_message",
|
|
2087
|
+
"task_note_promote_knowledge",
|
|
2088
|
+
].flatMap((name) =>
|
|
2089
|
+
[name, `opengeni__${name}`, `mcp__opengeni__${name}`].map((trustedName) => ({
|
|
2090
|
+
match: "name" as const,
|
|
2091
|
+
name: trustedName,
|
|
2092
|
+
matchPrefixedLeaf: false,
|
|
2093
|
+
render: KnowledgeSaveRenderer,
|
|
2094
|
+
})),
|
|
2095
|
+
),
|
|
2374
2096
|
// Provider-native items carry `raw.type` on the wire — this is their source of
|
|
2375
2097
|
// truth and is consulted first by the registry.
|
|
2376
2098
|
{ match: "rawType", type: "apply_patch_call", render: ApplyPatchRenderer },
|
|
@@ -2380,26 +2102,50 @@ const BASE_ENTRIES: ToolRegistryEntry[] = [
|
|
|
2380
2102
|
{ match: "name", name: "exec_command", render: ExecRenderer },
|
|
2381
2103
|
{ match: "name", name: "request_human_input", render: AskRenderer },
|
|
2382
2104
|
{ match: "name", name: "run_on", render: RunOnRenderer },
|
|
2105
|
+
{ match: "name", name: "sandboxes_list", render: MachineRenderer },
|
|
2106
|
+
{ match: "name", name: "sandbox_swap", render: MachineRenderer },
|
|
2107
|
+
{ match: "name", name: "computer_open", render: MachineRenderer },
|
|
2108
|
+
{ match: "name", name: "computer_observe", render: MachineRenderer },
|
|
2109
|
+
{ match: "name", name: "computer_act", render: MachineRenderer },
|
|
2383
2110
|
{ match: "name", name: "write_stdin", render: WriteStdinRenderer },
|
|
2384
2111
|
{ match: "name", name: "apply_patch_call", render: ApplyPatchRenderer },
|
|
2385
2112
|
{ match: "name", name: "apply_patch", render: ApplyPatchRenderer },
|
|
2386
2113
|
{ match: "name", name: "computer_call", render: ComputerCallRenderer },
|
|
2114
|
+
{
|
|
2115
|
+
match: "name",
|
|
2116
|
+
name: "browser_screenshot",
|
|
2117
|
+
render: BrowserScreenshotRenderer,
|
|
2118
|
+
},
|
|
2119
|
+
{ match: "name", name: "browser_observe", render: BrowserScreenshotRenderer },
|
|
2120
|
+
{ match: "name", name: "browser_act", render: BrowserScreenshotRenderer },
|
|
2387
2121
|
// Function-mode computer tools (codex / chat-wire transports).
|
|
2388
2122
|
{ match: "name", name: "computer_screenshot", render: ComputerCallRenderer },
|
|
2389
2123
|
{ match: "name", name: "computer_click", render: ComputerCallRenderer },
|
|
2390
|
-
{
|
|
2124
|
+
{
|
|
2125
|
+
match: "name",
|
|
2126
|
+
name: "computer_double_click",
|
|
2127
|
+
render: ComputerCallRenderer,
|
|
2128
|
+
},
|
|
2391
2129
|
{ match: "name", name: "computer_move", render: ComputerCallRenderer },
|
|
2392
2130
|
{ match: "name", name: "computer_scroll", render: ComputerCallRenderer },
|
|
2393
2131
|
{ match: "name", name: "computer_type", render: ComputerCallRenderer },
|
|
2394
2132
|
{ match: "name", name: "computer_keypress", render: ComputerCallRenderer },
|
|
2395
2133
|
{ match: "name", name: "computer_drag", render: ComputerCallRenderer },
|
|
2396
2134
|
{ match: "name", name: "web_search_call", render: WebSearchRenderer },
|
|
2397
|
-
{
|
|
2135
|
+
{
|
|
2136
|
+
match: "name",
|
|
2137
|
+
name: "image_generation_call",
|
|
2138
|
+
render: GeneratedImageRenderer,
|
|
2139
|
+
},
|
|
2398
2140
|
{ match: "name", name: "generate_image", render: GeneratedImageRenderer },
|
|
2399
2141
|
{ match: "name", name: "generate_video", render: GeneratedVideoRenderer },
|
|
2400
2142
|
{ match: "name", name: "tool_search", render: ToolSearchRenderer },
|
|
2401
2143
|
{ match: "name", name: "view_image", render: ViewImageRenderer },
|
|
2402
|
-
{
|
|
2144
|
+
{
|
|
2145
|
+
match: "name",
|
|
2146
|
+
name: "sandbox_file_publish",
|
|
2147
|
+
render: SandboxFilePublishRenderer,
|
|
2148
|
+
},
|
|
2403
2149
|
{
|
|
2404
2150
|
match: "name",
|
|
2405
2151
|
name: "artifacts_create",
|
|
@@ -2424,13 +2170,25 @@ const BASE_ENTRIES: ToolRegistryEntry[] = [
|
|
|
2424
2170
|
render: SiteArtifactRenderer,
|
|
2425
2171
|
matchPrefixedLeaf: false,
|
|
2426
2172
|
},
|
|
2427
|
-
{
|
|
2428
|
-
|
|
2173
|
+
{
|
|
2174
|
+
match: "name",
|
|
2175
|
+
name: "environment_set_variable",
|
|
2176
|
+
render: SecretSetRenderer,
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
match: "name",
|
|
2180
|
+
name: "variable_set_set_variable",
|
|
2181
|
+
render: SecretSetRenderer,
|
|
2182
|
+
},
|
|
2429
2183
|
{ match: "name", name: "search_documents", render: DocsSearchRenderer },
|
|
2430
2184
|
{ match: "name", name: "knowledge_search", render: DocsSearchRenderer },
|
|
2431
2185
|
{ match: "name", name: "memory_propose", render: MemoryProposeRenderer },
|
|
2432
2186
|
{ match: "name", name: "set_session_title", render: SetSessionTitleRenderer },
|
|
2433
|
-
{
|
|
2187
|
+
{
|
|
2188
|
+
match: "name",
|
|
2189
|
+
name: "set_other_session_title",
|
|
2190
|
+
render: SetSessionTitleRenderer,
|
|
2191
|
+
},
|
|
2434
2192
|
];
|
|
2435
2193
|
|
|
2436
2194
|
/** The built-in tool renderer registry: every first-party tool plus a fallback. */
|