@opengeni/react 4.0.2 → 4.0.5-canary.39120434730001
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-FVROZ7HR.js +14396 -0
- package/dist/chunk-FVROZ7HR.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-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 +1019 -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
|
+
genericToolPresentation,
|
|
79
|
+
parseDisclosedTools,
|
|
80
|
+
parseSearchHits,
|
|
81
|
+
pathBasename,
|
|
82
|
+
pathDirname,
|
|
83
|
+
machinePresentation,
|
|
84
|
+
runOnPresentation,
|
|
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,319 @@ 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
|
+
function UnreviewedGenericRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
433
|
+
const msg = useOpenGeniText();
|
|
434
|
+
const logo = useToolConnectorLogo(item.display);
|
|
435
|
+
const { images, output } = retainedToolResultImages(item.output);
|
|
436
|
+
if (images.length === 0 || item.status === "running") {
|
|
437
|
+
return <PresentedToolRow presentation={genericToolPresentation(msg, item)} logo={logo} />;
|
|
438
|
+
}
|
|
439
|
+
// A tool that returned images shows them like a viewed image, with its
|
|
440
|
+
// ordinary result text (and any further images) in the expanded body.
|
|
441
|
+
const presentation = genericToolPresentation(msg, { ...item, output });
|
|
442
|
+
const Icon = toolIcon(presentation.icon);
|
|
443
|
+
const [first, ...rest] = images;
|
|
444
|
+
return (
|
|
445
|
+
<RetainedSessionImageDisclosure
|
|
446
|
+
artifact={first!}
|
|
447
|
+
load={loadRetainedScreenshot}
|
|
448
|
+
title={presentation.title}
|
|
449
|
+
caption={presentation.title}
|
|
450
|
+
noun="image"
|
|
451
|
+
icon={<ConnectorLogoIcon src={logo} fallback={<Icon className={ICON_SIZE} />} />}
|
|
452
|
+
lightboxLabel={presentation.title}
|
|
453
|
+
batched={null}
|
|
454
|
+
failed={presentation.failed ?? false}
|
|
455
|
+
cancelled={presentation.cancelled ?? false}
|
|
456
|
+
>
|
|
457
|
+
<PresentedBody body={presentation.body} />
|
|
458
|
+
{rest.map((image, index) => (
|
|
459
|
+
<RetainedSessionImageDisclosure
|
|
460
|
+
key={image.artifactId}
|
|
461
|
+
artifact={image}
|
|
462
|
+
load={loadRetainedScreenshot}
|
|
463
|
+
title={msg("timeline.toolRenderers.imageIndex", { index: index + 2 })}
|
|
464
|
+
caption={`${presentation.title}, image ${index + 2}`}
|
|
465
|
+
noun="image"
|
|
466
|
+
icon={<ImageIcon className={ICON_SIZE} />}
|
|
467
|
+
lightboxLabel={presentation.title}
|
|
468
|
+
batched={null}
|
|
469
|
+
failed={false}
|
|
470
|
+
cancelled={false}
|
|
471
|
+
/>
|
|
472
|
+
))}
|
|
473
|
+
</RetainedSessionImageDisclosure>
|
|
474
|
+
);
|
|
507
475
|
}
|
|
508
476
|
|
|
509
477
|
/* ---- computer_call --------------------------------------------------------- */
|
|
@@ -517,31 +485,34 @@ type ComputerAction = {
|
|
|
517
485
|
button?: string;
|
|
518
486
|
};
|
|
519
487
|
|
|
520
|
-
function computerVerb(action: ComputerAction | undefined): string {
|
|
488
|
+
function computerVerb(msg: OpenGeniText, action: ComputerAction | undefined): string {
|
|
521
489
|
if (!action || !action.type) {
|
|
522
|
-
return "
|
|
490
|
+
return msg("timeline.toolRenderers.acted");
|
|
523
491
|
}
|
|
524
492
|
switch (action.type) {
|
|
525
493
|
case "screenshot":
|
|
526
|
-
return "
|
|
494
|
+
return msg("timeline.toolRenderers.screenshot");
|
|
527
495
|
case "click":
|
|
528
|
-
return
|
|
496
|
+
return msg("timeline.toolRenderers.clickedXY", { x: action.x, y: action.y });
|
|
529
497
|
case "double_click":
|
|
530
|
-
return
|
|
498
|
+
return msg("timeline.toolRenderers.doubleClickedXY", { x: action.x, y: action.y });
|
|
531
499
|
case "move":
|
|
532
|
-
return
|
|
500
|
+
return msg("timeline.toolRenderers.movedXY", { x: action.x, y: action.y });
|
|
533
501
|
case "scroll":
|
|
534
|
-
return "
|
|
502
|
+
return msg("timeline.toolRenderers.scrolled");
|
|
535
503
|
case "type": {
|
|
536
504
|
const t = action.text ?? "";
|
|
537
|
-
return
|
|
505
|
+
return msg("timeline.toolRenderers.typedSliceValue", {
|
|
506
|
+
slice: t.slice(0, 28),
|
|
507
|
+
value: t.length > 28 ? "…" : "",
|
|
508
|
+
});
|
|
538
509
|
}
|
|
539
510
|
case "keypress":
|
|
540
|
-
return
|
|
511
|
+
return msg("timeline.toolRenderers.pressedJoin", { join: (action.keys ?? []).join("+") });
|
|
541
512
|
case "drag":
|
|
542
|
-
return "
|
|
513
|
+
return msg("timeline.toolRenderers.dragged");
|
|
543
514
|
case "wait":
|
|
544
|
-
return "
|
|
515
|
+
return msg("timeline.toolRenderers.waited");
|
|
545
516
|
default:
|
|
546
517
|
return action.type;
|
|
547
518
|
}
|
|
@@ -567,6 +538,7 @@ function asComputerArgs(args: unknown): Partial<ComputerAction> {
|
|
|
567
538
|
}
|
|
568
539
|
|
|
569
540
|
function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
541
|
+
const msg = useOpenGeniText();
|
|
570
542
|
const raw = (item.raw ?? {}) as {
|
|
571
543
|
action?: ComputerAction;
|
|
572
544
|
actions?: ComputerAction[];
|
|
@@ -579,11 +551,14 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
579
551
|
// every transport.
|
|
580
552
|
const functionAction: ComputerAction | undefined =
|
|
581
553
|
!raw.action && item.name.startsWith("computer_") && item.name !== "computer_call"
|
|
582
|
-
? {
|
|
554
|
+
? {
|
|
555
|
+
type: item.name.slice("computer_".length),
|
|
556
|
+
...asComputerArgs(item.arguments),
|
|
557
|
+
}
|
|
583
558
|
: undefined;
|
|
584
559
|
const action = raw.action ?? functionAction;
|
|
585
560
|
const actions = raw.actions ?? (action ? [action] : []);
|
|
586
|
-
const verb = computerVerb(action);
|
|
561
|
+
const verb = computerVerb(msg, action);
|
|
587
562
|
const out = item.output;
|
|
588
563
|
const running = item.status === "running";
|
|
589
564
|
const rejected = raw.providerData?.approvalStatus === "rejected";
|
|
@@ -592,7 +567,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
592
567
|
const retained = retainedScreenshotMetadata(out);
|
|
593
568
|
const omittedMedia = mediaPreviewFact(out);
|
|
594
569
|
const empty = out === "" || out == null;
|
|
595
|
-
const batched = actions.length > 1 ? actions.map((a) => computerVerb(a)).join(" · ") : null;
|
|
570
|
+
const batched = actions.length > 1 ? actions.map((a) => computerVerb(msg, a)).join(" · ") : null;
|
|
596
571
|
// Fold the batched-action count into the title (one media affordance per row),
|
|
597
572
|
// rather than a separate "+N more" mono label competing beside the thumbnail.
|
|
598
573
|
const countSuffix = actions.length > 1 ? ` ·${actions.length}` : "";
|
|
@@ -613,7 +588,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
613
588
|
running
|
|
614
589
|
media={<MediaSkeleton />}
|
|
615
590
|
>
|
|
616
|
-
<BodyNote>
|
|
591
|
+
<BodyNote>{msg("timeline.toolRenderers.capturingFrame")}</BodyNote>
|
|
617
592
|
</ActivityDisclosure>
|
|
618
593
|
);
|
|
619
594
|
}
|
|
@@ -627,7 +602,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
627
602
|
chip={{ tone: "bad", text: "read-only" }}
|
|
628
603
|
preview="write actions disabled"
|
|
629
604
|
>
|
|
630
|
-
<BodyNote tone="error">
|
|
605
|
+
<BodyNote tone="error">{msg("timeline.toolRenderers.computerUseIsReadOnly")}</BodyNote>
|
|
631
606
|
</ActivityDisclosure>
|
|
632
607
|
);
|
|
633
608
|
}
|
|
@@ -638,9 +613,9 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
638
613
|
icon={<LockIcon className={ICON_SIZE} />}
|
|
639
614
|
iconTone="muted"
|
|
640
615
|
title={verb}
|
|
641
|
-
preview="
|
|
616
|
+
preview={msg("timeline.toolRenderers.approvalRejectedThisActionDid2")}
|
|
642
617
|
>
|
|
643
|
-
<BodyNote>
|
|
618
|
+
<BodyNote>{msg("timeline.toolRenderers.approvalRejectedThisActionDid")}</BodyNote>
|
|
644
619
|
</ActivityDisclosure>
|
|
645
620
|
);
|
|
646
621
|
}
|
|
@@ -665,7 +640,10 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
665
640
|
media={<MediaEmpty />}
|
|
666
641
|
>
|
|
667
642
|
<BodyNote tone={isFailed ? "error" : undefined}>
|
|
668
|
-
|
|
643
|
+
{msg("timeline.toolRenderers.screenshotStateReplaceall", {
|
|
644
|
+
state,
|
|
645
|
+
replaceAll: retained.reason.replaceAll("_", " "),
|
|
646
|
+
})}
|
|
669
647
|
</BodyNote>
|
|
670
648
|
</ActivityDisclosure>
|
|
671
649
|
);
|
|
@@ -678,7 +656,7 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
678
656
|
caption={`${verb}${countSuffix}`}
|
|
679
657
|
noun="screenshot"
|
|
680
658
|
icon={<CameraIcon className={ICON_SIZE} />}
|
|
681
|
-
lightboxLabel="
|
|
659
|
+
lightboxLabel={msg("timeline.toolRenderers.screenshot")}
|
|
682
660
|
batched={batched}
|
|
683
661
|
failed={isFailed}
|
|
684
662
|
cancelled={isCancelled}
|
|
@@ -704,7 +682,9 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
704
682
|
media={<Thumbnail src={shotUrl} caption={caption} />}
|
|
705
683
|
>
|
|
706
684
|
<ScreenshotFigure src={shotUrl} caption={caption} />
|
|
707
|
-
{batched ?
|
|
685
|
+
{batched ? (
|
|
686
|
+
<BodyNote>{msg("timeline.toolRenderers.batchedBatched", { batched })}</BodyNote>
|
|
687
|
+
) : null}
|
|
708
688
|
</ActivityDisclosure>
|
|
709
689
|
);
|
|
710
690
|
}
|
|
@@ -714,17 +694,20 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
714
694
|
<ActivityDisclosure
|
|
715
695
|
icon={<CameraOffIcon className={ICON_SIZE} />}
|
|
716
696
|
iconTone={isFailed ? "failed" : "muted"}
|
|
717
|
-
title={
|
|
697
|
+
title={msg("timeline.toolRenderers.verbCountsuffixImageOmittedNot", { verb, countSuffix })}
|
|
718
698
|
failed={isFailed}
|
|
719
699
|
cancelled={isCancelled}
|
|
720
|
-
preview="
|
|
700
|
+
preview={msg("timeline.toolRenderers.inlineImageOmittedNotRetained")}
|
|
721
701
|
media={<MediaEmpty />}
|
|
722
702
|
>
|
|
723
703
|
<BodyNote>
|
|
724
|
-
|
|
725
|
-
|
|
704
|
+
{msg("timeline.toolRenderers.theInlineMediatypeOutputWas", {
|
|
705
|
+
mediaType: omittedMedia.mediaType,
|
|
706
|
+
})}
|
|
726
707
|
</BodyNote>
|
|
727
|
-
{batched ?
|
|
708
|
+
{batched ? (
|
|
709
|
+
<BodyNote>{msg("timeline.toolRenderers.batchedBatched", { batched })}</BodyNote>
|
|
710
|
+
) : null}
|
|
728
711
|
</ActivityDisclosure>
|
|
729
712
|
);
|
|
730
713
|
}
|
|
@@ -741,10 +724,10 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
741
724
|
>
|
|
742
725
|
<BodyNote>
|
|
743
726
|
{isFailed
|
|
744
|
-
? "
|
|
727
|
+
? msg("timeline.toolRenderers.computerCallFailedNoImage")
|
|
745
728
|
: isCancelled
|
|
746
|
-
? "
|
|
747
|
-
: "
|
|
729
|
+
? msg("timeline.toolRenderers.computerCallInterruptedNoImage")
|
|
730
|
+
: msg("timeline.toolRenderers.noImageTheSessionReturned")}
|
|
748
731
|
</BodyNote>
|
|
749
732
|
</ActivityDisclosure>
|
|
750
733
|
);
|
|
@@ -766,96 +749,111 @@ function ComputerCallRenderer({ item, loadRetainedScreenshot }: ToolRendererProp
|
|
|
766
749
|
);
|
|
767
750
|
}
|
|
768
751
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
)
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
752
|
+
/** Browser tool images share authenticated screenshot loading, with their own media kind. */
|
|
753
|
+
function BrowserScreenshotRenderer(props: ToolRendererProps) {
|
|
754
|
+
const msg = useOpenGeniText();
|
|
755
|
+
const { item, loadRetainedScreenshot } = props;
|
|
756
|
+
const leaf = mcpToolLeaf(item.name);
|
|
757
|
+
const title =
|
|
758
|
+
leaf === "browser_observe"
|
|
759
|
+
? msg("timeline.toolRenderers.observedBrowser")
|
|
760
|
+
: leaf === "browser_act"
|
|
761
|
+
? msg("timeline.toolRenderers.usedBrowser")
|
|
762
|
+
: msg("timeline.toolRenderers.browserScreenshot");
|
|
763
|
+
const retained = retainedScreenshotMetadata(item.output);
|
|
764
|
+
const isFailed = item.status === "failed";
|
|
765
|
+
const isCancelled = item.status === "cancelled";
|
|
766
|
+
|
|
767
|
+
if (item.status === "running" && leaf === "browser_screenshot") {
|
|
768
|
+
return (
|
|
769
|
+
<ActivityDisclosure
|
|
770
|
+
icon={<CameraIcon className={ICON_SIZE} />}
|
|
771
|
+
iconTone="running"
|
|
772
|
+
title={title}
|
|
773
|
+
running
|
|
774
|
+
media={<MediaSkeleton />}
|
|
775
|
+
>
|
|
776
|
+
<BodyNote>{msg("timeline.toolRenderers.capturingFrame")}</BodyNote>
|
|
777
|
+
</ActivityDisclosure>
|
|
778
|
+
);
|
|
787
779
|
}
|
|
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;
|
|
780
|
+
|
|
781
|
+
if (!retained) return <GenericRenderer {...props} />;
|
|
782
|
+
if (!retained.available) {
|
|
783
|
+
const state =
|
|
784
|
+
retained.reason === "expired" || retained.reason === "deleted"
|
|
785
|
+
? retained.reason
|
|
786
|
+
: "unavailable";
|
|
787
|
+
return (
|
|
788
|
+
<ActivityDisclosure
|
|
789
|
+
icon={<CameraOffIcon className={ICON_SIZE} />}
|
|
790
|
+
iconTone={isFailed ? "failed" : "muted"}
|
|
791
|
+
title={`${title} · ${state}`}
|
|
792
|
+
failed={isFailed}
|
|
793
|
+
cancelled={isCancelled}
|
|
794
|
+
preview={`screenshot ${state}`}
|
|
795
|
+
media={<MediaEmpty />}
|
|
796
|
+
>
|
|
797
|
+
<BodyNote tone={isFailed ? "error" : undefined}>
|
|
798
|
+
{msg("timeline.toolRenderers.screenshotStateReplaceall", {
|
|
799
|
+
state,
|
|
800
|
+
replaceAll: retained.reason.replaceAll("_", " "),
|
|
801
|
+
})}
|
|
802
|
+
</BodyNote>
|
|
803
|
+
</ActivityDisclosure>
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
return (
|
|
807
|
+
<RetainedSessionImageDisclosure
|
|
808
|
+
artifact={retained}
|
|
809
|
+
load={loadRetainedScreenshot}
|
|
810
|
+
title={title}
|
|
811
|
+
caption={title}
|
|
812
|
+
noun="screenshot"
|
|
813
|
+
icon={<CameraIcon className={ICON_SIZE} />}
|
|
814
|
+
lightboxLabel={msg("timeline.toolRenderers.browserScreenshot")}
|
|
815
|
+
batched={null}
|
|
816
|
+
failed={isFailed}
|
|
817
|
+
cancelled={isCancelled}
|
|
818
|
+
/>
|
|
819
|
+
);
|
|
837
820
|
}
|
|
838
821
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
822
|
+
type RetainedSessionImageDisclosureProps = {
|
|
823
|
+
artifact: RetainedArtifactReference;
|
|
824
|
+
load: ToolRendererProps["loadRetainedArtifact"];
|
|
825
|
+
title: string;
|
|
826
|
+
caption: string;
|
|
827
|
+
noun: "image" | "screenshot";
|
|
828
|
+
icon: ReactNode;
|
|
829
|
+
lightboxLabel: string;
|
|
830
|
+
batched: string | null;
|
|
831
|
+
failed: boolean;
|
|
832
|
+
cancelled: boolean;
|
|
833
|
+
filename?: string;
|
|
834
|
+
defaultOpen?: boolean;
|
|
835
|
+
children?: ReactNode;
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
function RetainedSessionImageDisclosure(props: RetainedSessionImageDisclosureProps) {
|
|
839
|
+
const compact = useContext(CompactActivityContext);
|
|
840
|
+
// The rolling progress label has no screenshot loader by design. Do not run
|
|
841
|
+
// the full image hook there: it would report the missing loader as an error.
|
|
842
|
+
if (compact) {
|
|
843
|
+
return (
|
|
844
|
+
<ActivityDisclosure
|
|
845
|
+
icon={props.icon}
|
|
846
|
+
title={props.title}
|
|
847
|
+
compactPreview={null}
|
|
848
|
+
failed={props.failed}
|
|
849
|
+
cancelled={props.cancelled}
|
|
850
|
+
/>
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
return <LoadedRetainedSessionImageDisclosure {...props} />;
|
|
856
854
|
}
|
|
857
855
|
|
|
858
|
-
function
|
|
856
|
+
function LoadedRetainedSessionImageDisclosure({
|
|
859
857
|
artifact,
|
|
860
858
|
load,
|
|
861
859
|
title,
|
|
@@ -866,47 +864,42 @@ function RetainedSessionImageDisclosure({
|
|
|
866
864
|
batched,
|
|
867
865
|
failed,
|
|
868
866
|
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
|
-
}) {
|
|
867
|
+
filename,
|
|
868
|
+
defaultOpen,
|
|
869
|
+
children,
|
|
870
|
+
}: RetainedSessionImageDisclosureProps) {
|
|
871
|
+
const msg = useOpenGeniText();
|
|
881
872
|
const state = useRetainedImageObjectUrl(artifact, load);
|
|
882
|
-
const downloadFilename = retainedImageFilename(artifact);
|
|
873
|
+
const downloadFilename = filename ?? retainedImageFilename(artifact);
|
|
874
|
+
const figure = {
|
|
875
|
+
src: state.kind === "ready" ? state.url : "",
|
|
876
|
+
caption,
|
|
877
|
+
alt: caption,
|
|
878
|
+
expandLabel: msg("timeline.toolRenderers.expandNoun", { noun }),
|
|
879
|
+
lightboxLabel,
|
|
880
|
+
downloadFilename,
|
|
881
|
+
};
|
|
883
882
|
|
|
884
883
|
return (
|
|
885
884
|
<ActivityDisclosure
|
|
886
885
|
icon={icon}
|
|
887
886
|
iconTone={failed ? "failed" : state.kind === "ready" ? "accent" : "muted"}
|
|
888
887
|
title={title}
|
|
888
|
+
defaultOpen={defaultOpen}
|
|
889
889
|
failed={failed}
|
|
890
890
|
cancelled={cancelled}
|
|
891
891
|
preview={
|
|
892
892
|
state.kind === "loading"
|
|
893
|
-
?
|
|
893
|
+
? msg("timeline.toolRenderers.loadingRetainedNoun", { noun })
|
|
894
894
|
: state.kind === "error"
|
|
895
|
-
?
|
|
895
|
+
? msg("timeline.toolRenderers.nounRetrievalFailed", { noun })
|
|
896
896
|
: state.kind === "unavailable"
|
|
897
897
|
? `${noun} ${state.label}`
|
|
898
898
|
: undefined
|
|
899
899
|
}
|
|
900
900
|
media={
|
|
901
901
|
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
|
-
/>
|
|
902
|
+
<Thumbnail {...figure} />
|
|
910
903
|
) : state.kind === "loading" ? (
|
|
911
904
|
<MediaSkeleton />
|
|
912
905
|
) : (
|
|
@@ -915,31 +908,49 @@ function RetainedSessionImageDisclosure({
|
|
|
915
908
|
}
|
|
916
909
|
>
|
|
917
910
|
{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
|
-
/>
|
|
911
|
+
<ScreenshotFigure {...figure} showCaption={caption !== title} />
|
|
926
912
|
) : state.kind === "loading" ? (
|
|
927
|
-
<BodyNote>
|
|
913
|
+
<BodyNote>{msg("timeline.toolRenderers.loadingTheRetainedNoun", { noun })}</BodyNote>
|
|
928
914
|
) : state.kind === "unavailable" ? (
|
|
929
915
|
<BodyNote>
|
|
930
|
-
{noun === "screenshot"
|
|
916
|
+
{noun === "screenshot"
|
|
917
|
+
? msg("timeline.toolRenderers.screenshot")
|
|
918
|
+
: msg("timeline.toolRenderers.image")}{" "}
|
|
919
|
+
{state.label}.
|
|
931
920
|
</BodyNote>
|
|
932
921
|
) : (
|
|
933
|
-
<
|
|
934
|
-
{noun === "screenshot" ? "Screenshot" : "Image"} retrieval failed: {state.message}
|
|
935
|
-
</BodyNote>
|
|
922
|
+
<ImageRetrievalError noun={noun} retry={state.retry} />
|
|
936
923
|
)}
|
|
937
|
-
{batched ?
|
|
924
|
+
{batched ? (
|
|
925
|
+
<BodyNote>{msg("timeline.toolRenderers.batchedBatched", { batched })}</BodyNote>
|
|
926
|
+
) : null}
|
|
927
|
+
{children}
|
|
938
928
|
</ActivityDisclosure>
|
|
939
929
|
);
|
|
940
930
|
}
|
|
941
931
|
|
|
932
|
+
function ImageRetrievalError({ noun = "image", retry }: { noun?: string; retry: () => void }) {
|
|
933
|
+
const msg = useOpenGeniText();
|
|
934
|
+
return (
|
|
935
|
+
<BodyNote tone="error">
|
|
936
|
+
{noun === "screenshot"
|
|
937
|
+
? msg("timeline.toolRenderers.screenshot")
|
|
938
|
+
: msg("timeline.toolRenderers.image")}{" "}
|
|
939
|
+
{msg("timeline.toolRenderers.retrievalFailed")}{" "}
|
|
940
|
+
<button
|
|
941
|
+
type="button"
|
|
942
|
+
aria-label={msg("timeline.toolRenderers.retryNounRetrieval", { noun })}
|
|
943
|
+
onClick={retry}
|
|
944
|
+
className="underline underline-offset-2"
|
|
945
|
+
>
|
|
946
|
+
{msg("timeline.toolRenderers.retry")}
|
|
947
|
+
</button>
|
|
948
|
+
</BodyNote>
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
|
|
942
952
|
function GeneratedImageRenderer({ item, loadRetainedArtifact }: ToolRendererProps) {
|
|
953
|
+
const msg = useOpenGeniText();
|
|
943
954
|
const args = parseToolArgs(item.arguments);
|
|
944
955
|
const prompt = typeof args.prompt === "string" ? args.prompt : "";
|
|
945
956
|
const raw =
|
|
@@ -955,9 +966,13 @@ function GeneratedImageRenderer({ item, loadRetainedArtifact }: ToolRendererProp
|
|
|
955
966
|
<ActivityDisclosure
|
|
956
967
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
957
968
|
iconTone="running"
|
|
958
|
-
title="
|
|
969
|
+
title={msg("timeline.toolRenderers.generatingImage")}
|
|
959
970
|
running
|
|
960
|
-
preview={
|
|
971
|
+
preview={
|
|
972
|
+
<RunningPreview>
|
|
973
|
+
{truncatePreview(prompt, 72) || msg("timeline.toolRenderers.creating")}
|
|
974
|
+
</RunningPreview>
|
|
975
|
+
}
|
|
961
976
|
media={<MediaSkeleton />}
|
|
962
977
|
>
|
|
963
978
|
{prompt ? <BodyNote>{prompt}</BodyNote> : null}
|
|
@@ -977,6 +992,7 @@ function GeneratedImageRenderer({ item, loadRetainedArtifact }: ToolRendererProp
|
|
|
977
992
|
}
|
|
978
993
|
|
|
979
994
|
function GeneratedVideoRenderer({ item }: ToolRendererProps) {
|
|
995
|
+
const msg = useOpenGeniText();
|
|
980
996
|
const args = parseToolArgs(item.arguments);
|
|
981
997
|
const prompt = typeof args.prompt === "string" ? args.prompt : "";
|
|
982
998
|
const parsedOutput = typeof item.output === "string" ? tryParseJson(item.output) : item.output;
|
|
@@ -993,23 +1009,31 @@ function GeneratedVideoRenderer({ item }: ToolRendererProps) {
|
|
|
993
1009
|
icon={<VideoIcon className={ICON_SIZE} />}
|
|
994
1010
|
iconTone={failed ? "failed" : running ? "running" : accepted ? "accent" : "muted"}
|
|
995
1011
|
title={
|
|
996
|
-
running
|
|
1012
|
+
running
|
|
1013
|
+
? msg("timeline.toolRenderers.startingVideoGeneration")
|
|
1014
|
+
: accepted
|
|
1015
|
+
? msg("timeline.toolRenderers.generatingVideo")
|
|
1016
|
+
: msg("timeline.toolRenderers.generateVideo")
|
|
997
1017
|
}
|
|
998
1018
|
running={running}
|
|
999
1019
|
failed={failed}
|
|
1000
1020
|
cancelled={cancelled}
|
|
1001
|
-
preview={
|
|
1021
|
+
preview={
|
|
1022
|
+
truncatePreview(prompt, 88) ||
|
|
1023
|
+
(accepted ? msg("timeline.toolRenderers.requestAccepted") : undefined)
|
|
1024
|
+
}
|
|
1002
1025
|
>
|
|
1003
1026
|
{prompt ? <BodyNote>{prompt}</BodyNote> : null}
|
|
1004
1027
|
{accepted ? (
|
|
1005
|
-
<BodyNote>
|
|
1028
|
+
<BodyNote>{msg("timeline.toolRenderers.theVideoWillAppearHere")}</BodyNote>
|
|
1006
1029
|
) : item.output !== undefined ? (
|
|
1007
|
-
<PayloadBlock label="
|
|
1030
|
+
<PayloadBlock label={msg("timeline.toolRenderers.output")} value={item.output} />
|
|
1008
1031
|
) : null}
|
|
1009
1032
|
</ActivityDisclosure>
|
|
1010
1033
|
);
|
|
1011
1034
|
}
|
|
1012
1035
|
function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRendererProps) {
|
|
1036
|
+
const msg = useOpenGeniText();
|
|
1013
1037
|
const { text: output, isError } = unwrapMcpOutput(item.output);
|
|
1014
1038
|
const receipt = parseSandboxFileArtifactReceipt(output);
|
|
1015
1039
|
const [downloadState, setDownloadState] = useState<"idle" | "loading" | "error">("idle");
|
|
@@ -1018,9 +1042,11 @@ function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRenderer
|
|
|
1018
1042
|
<ActivityDisclosure
|
|
1019
1043
|
icon={<DownloadIcon className={ICON_SIZE} />}
|
|
1020
1044
|
iconTone="running"
|
|
1021
|
-
title="
|
|
1045
|
+
title={msg("timeline.toolRenderers.publishingFile")}
|
|
1022
1046
|
running
|
|
1023
|
-
preview={
|
|
1047
|
+
preview={
|
|
1048
|
+
<RunningPreview>{msg("timeline.toolRenderers.retainingWorkspaceBytes")}</RunningPreview>
|
|
1049
|
+
}
|
|
1024
1050
|
/>
|
|
1025
1051
|
);
|
|
1026
1052
|
}
|
|
@@ -1028,6 +1054,24 @@ function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRenderer
|
|
|
1028
1054
|
return <GenericRenderer item={item} />;
|
|
1029
1055
|
}
|
|
1030
1056
|
|
|
1057
|
+
// The closed SDK receipt has already checked the workspace-qualified route.
|
|
1058
|
+
const workspaceId = /^\/v1\/workspaces\/([0-9a-f-]+)\/artifacts\//.exec(
|
|
1059
|
+
receipt.artifact.retrieval.path,
|
|
1060
|
+
)?.[1];
|
|
1061
|
+
const openLink = workspaceId ? (
|
|
1062
|
+
<a
|
|
1063
|
+
href={`/workspaces/${workspaceId}/artifacts/files/${receipt.artifact.artifactId}`}
|
|
1064
|
+
aria-label={msg("timeline.toolRenderers.openFilenameInArtifacts", {
|
|
1065
|
+
filename: receipt.filename,
|
|
1066
|
+
})}
|
|
1067
|
+
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"
|
|
1068
|
+
onClick={(event) => event.stopPropagation()}
|
|
1069
|
+
onKeyDown={(event) => event.stopPropagation()}
|
|
1070
|
+
>
|
|
1071
|
+
{msg("timeline.toolRenderers.openInArtifacts")}
|
|
1072
|
+
</a>
|
|
1073
|
+
) : null;
|
|
1074
|
+
|
|
1031
1075
|
const download = async () => {
|
|
1032
1076
|
if (!loadRetainedArtifact) {
|
|
1033
1077
|
setDownloadState("error");
|
|
@@ -1060,27 +1104,61 @@ function SandboxFilePublishRenderer({ item, loadRetainedArtifact }: ToolRenderer
|
|
|
1060
1104
|
}
|
|
1061
1105
|
};
|
|
1062
1106
|
|
|
1107
|
+
const downloadButton = (
|
|
1108
|
+
<button
|
|
1109
|
+
type="button"
|
|
1110
|
+
onClick={() => void download()}
|
|
1111
|
+
disabled={downloadState === "loading"}
|
|
1112
|
+
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"
|
|
1113
|
+
>
|
|
1114
|
+
<DownloadIcon className="size-3.5" />
|
|
1115
|
+
{downloadState === "loading"
|
|
1116
|
+
? msg("timeline.toolRenderers.preparing")
|
|
1117
|
+
: downloadState === "error"
|
|
1118
|
+
? msg("timeline.toolRenderers.retryDownload")
|
|
1119
|
+
: msg("timeline.toolRenderers.download")}
|
|
1120
|
+
</button>
|
|
1121
|
+
);
|
|
1122
|
+
|
|
1123
|
+
if (isRetainedImageContentType(receipt.artifact.contentType)) {
|
|
1124
|
+
return (
|
|
1125
|
+
<RetainedSessionImageDisclosure
|
|
1126
|
+
artifact={receipt.artifact}
|
|
1127
|
+
load={loadRetainedArtifact}
|
|
1128
|
+
title={msg("timeline.toolRenderers.publishedFilename", { filename: receipt.filename })}
|
|
1129
|
+
caption={receipt.filename}
|
|
1130
|
+
noun="image"
|
|
1131
|
+
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1132
|
+
lightboxLabel={msg("timeline.toolRenderers.image")}
|
|
1133
|
+
batched={null}
|
|
1134
|
+
failed={false}
|
|
1135
|
+
cancelled={false}
|
|
1136
|
+
filename={receipt.filename}
|
|
1137
|
+
defaultOpen
|
|
1138
|
+
>
|
|
1139
|
+
{downloadButton}
|
|
1140
|
+
{openLink}
|
|
1141
|
+
</RetainedSessionImageDisclosure>
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1063
1145
|
return (
|
|
1064
1146
|
<ActivityDisclosure
|
|
1065
1147
|
icon={<DownloadIcon className={ICON_SIZE} />}
|
|
1066
1148
|
iconTone="accent"
|
|
1067
|
-
title={
|
|
1149
|
+
title={msg("timeline.toolRenderers.publishedFilename", { filename: receipt.filename })}
|
|
1068
1150
|
defaultOpen
|
|
1069
1151
|
preview={formatBytes(receipt.artifact.originalBytes)}
|
|
1070
1152
|
>
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
: downloadState === "error"
|
|
1081
|
-
? "Retry download"
|
|
1082
|
-
: "Download"}
|
|
1083
|
-
</button>
|
|
1153
|
+
{downloadButton}
|
|
1154
|
+
{openLink}
|
|
1155
|
+
{isPatchFilename(receipt.filename) ? (
|
|
1156
|
+
<PatchApplyCommand
|
|
1157
|
+
artifact={receipt.artifact}
|
|
1158
|
+
filename={receipt.filename}
|
|
1159
|
+
load={loadRetainedArtifact}
|
|
1160
|
+
/>
|
|
1161
|
+
) : null}
|
|
1084
1162
|
</ActivityDisclosure>
|
|
1085
1163
|
);
|
|
1086
1164
|
}
|
|
@@ -1131,22 +1209,67 @@ function publishedSiteReceipt(output: unknown): PublishedSiteReceipt | null {
|
|
|
1131
1209
|
};
|
|
1132
1210
|
}
|
|
1133
1211
|
|
|
1212
|
+
const SITE_OPEN_CLASS =
|
|
1213
|
+
"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";
|
|
1214
|
+
|
|
1134
1215
|
function SiteOpenLink({ receipt }: { receipt: PublishedSiteReceipt }) {
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1216
|
+
const msg = useOpenGeniText();
|
|
1217
|
+
const [pending, setPending] = useState(false);
|
|
1218
|
+
const [failed, setFailed] = useState(false);
|
|
1219
|
+
// The console route only exists in the Opengeni console; a host decides.
|
|
1220
|
+
const resolution = useOpenGeniLinkResolver()?.({
|
|
1221
|
+
kind: "site",
|
|
1222
|
+
artifactId: receipt.artifactId,
|
|
1223
|
+
workspaceId: receipt.workspaceId,
|
|
1224
|
+
});
|
|
1225
|
+
const destination = resolution?.href ? defaultUrlTransform(resolution.href) : "";
|
|
1226
|
+
if (destination) {
|
|
1227
|
+
return (
|
|
1228
|
+
<a
|
|
1229
|
+
href={destination}
|
|
1230
|
+
aria-label={msg("timeline.toolRenderers.openTitle", { title: receipt.title })}
|
|
1231
|
+
className={SITE_OPEN_CLASS}
|
|
1232
|
+
onClick={(event) => event.stopPropagation()}
|
|
1233
|
+
onKeyDown={(event) => event.stopPropagation()}
|
|
1234
|
+
>
|
|
1235
|
+
{msg("timeline.toolRenderers.open")}
|
|
1236
|
+
</a>
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
if (resolution?.open) {
|
|
1240
|
+
const open = resolution.open;
|
|
1241
|
+
return (
|
|
1242
|
+
<button
|
|
1243
|
+
type="button"
|
|
1244
|
+
aria-label={msg("timeline.toolRenderers.openTitle", { title: receipt.title })}
|
|
1245
|
+
aria-busy={pending}
|
|
1246
|
+
disabled={pending}
|
|
1247
|
+
className={SITE_OPEN_CLASS}
|
|
1248
|
+
onClick={(event) => {
|
|
1249
|
+
event.stopPropagation();
|
|
1250
|
+
if (pending) return;
|
|
1251
|
+
setPending(true);
|
|
1252
|
+
setFailed(false);
|
|
1253
|
+
void Promise.resolve()
|
|
1254
|
+
.then(open)
|
|
1255
|
+
.catch(() => setFailed(true))
|
|
1256
|
+
.finally(() => setPending(false));
|
|
1257
|
+
}}
|
|
1258
|
+
onKeyDown={(event) => event.stopPropagation()}
|
|
1259
|
+
>
|
|
1260
|
+
{pending
|
|
1261
|
+
? msg("timeline.toolRenderers.opening")
|
|
1262
|
+
: failed
|
|
1263
|
+
? msg("timeline.toolRenderers.retryOpen")
|
|
1264
|
+
: msg("timeline.toolRenderers.open")}
|
|
1265
|
+
</button>
|
|
1266
|
+
);
|
|
1267
|
+
}
|
|
1268
|
+
return null;
|
|
1147
1269
|
}
|
|
1148
1270
|
|
|
1149
1271
|
function SiteArtifactRenderer({ item }: ToolRendererProps) {
|
|
1272
|
+
const msg = useOpenGeniText();
|
|
1150
1273
|
const leaf = mcpToolLeaf(item.name);
|
|
1151
1274
|
const publishingExisting = leaf === "artifacts_publish";
|
|
1152
1275
|
if (item.status === "running") {
|
|
@@ -1154,9 +1277,17 @@ function SiteArtifactRenderer({ item }: ToolRendererProps) {
|
|
|
1154
1277
|
<ActivityDisclosure
|
|
1155
1278
|
icon={<PanelsTopLeftIcon className={ICON_SIZE} />}
|
|
1156
1279
|
iconTone="running"
|
|
1157
|
-
title={
|
|
1280
|
+
title={
|
|
1281
|
+
publishingExisting
|
|
1282
|
+
? msg("timeline.toolRenderers.publishingSiteUpdate")
|
|
1283
|
+
: msg("timeline.toolRenderers.publishingSite")
|
|
1284
|
+
}
|
|
1158
1285
|
running
|
|
1159
|
-
preview={
|
|
1286
|
+
preview={
|
|
1287
|
+
<RunningPreview>
|
|
1288
|
+
{msg("timeline.toolRenderers.retainingSourceAndCompiledHtml")}
|
|
1289
|
+
</RunningPreview>
|
|
1290
|
+
}
|
|
1160
1291
|
/>
|
|
1161
1292
|
);
|
|
1162
1293
|
}
|
|
@@ -1166,12 +1297,18 @@ function SiteArtifactRenderer({ item }: ToolRendererProps) {
|
|
|
1166
1297
|
<ActivityDisclosure
|
|
1167
1298
|
icon={<PanelsTopLeftIcon className={ICON_SIZE} />}
|
|
1168
1299
|
iconTone="accent"
|
|
1169
|
-
title={
|
|
1300
|
+
title={
|
|
1301
|
+
publishingExisting
|
|
1302
|
+
? msg("timeline.toolRenderers.updatedTitle", { title: receipt.title })
|
|
1303
|
+
: msg("timeline.toolRenderers.publishedTitle", { title: receipt.title })
|
|
1304
|
+
}
|
|
1170
1305
|
media={<SiteOpenLink receipt={receipt} />}
|
|
1171
1306
|
>
|
|
1172
1307
|
<BodyNote>
|
|
1173
|
-
|
|
1174
|
-
{receipt.replayed
|
|
1308
|
+
{msg("timeline.toolRenderers.versionRevisionIsLive", { revision: receipt.revision })}
|
|
1309
|
+
{receipt.replayed
|
|
1310
|
+
? ` ${msg("timeline.toolRenderers.replayedFromTheOriginalPublication")}`
|
|
1311
|
+
: "."}
|
|
1175
1312
|
</BodyNote>
|
|
1176
1313
|
</ActivityDisclosure>
|
|
1177
1314
|
);
|
|
@@ -1190,10 +1327,18 @@ function GeneratedImageDisclosure({
|
|
|
1190
1327
|
failed: boolean;
|
|
1191
1328
|
cancelled: boolean;
|
|
1192
1329
|
}) {
|
|
1330
|
+
const msg = useOpenGeniText();
|
|
1193
1331
|
const state = useRetainedImageObjectUrl(receipt.artifact, load);
|
|
1194
1332
|
const dimensions = receipt.artifact.dimensions!;
|
|
1195
|
-
const title = failed
|
|
1196
|
-
|
|
1333
|
+
const title = failed
|
|
1334
|
+
? msg("timeline.toolRenderers.imageGenerationFailed")
|
|
1335
|
+
: msg("timeline.toolRenderers.generatedImage");
|
|
1336
|
+
const caption =
|
|
1337
|
+
prompt ||
|
|
1338
|
+
msg("timeline.toolRenderers.generatedImageWidthHeight", {
|
|
1339
|
+
width: dimensions.width,
|
|
1340
|
+
height: dimensions.height,
|
|
1341
|
+
});
|
|
1197
1342
|
return (
|
|
1198
1343
|
<ActivityDisclosure
|
|
1199
1344
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
@@ -1204,9 +1349,9 @@ function GeneratedImageDisclosure({
|
|
|
1204
1349
|
cancelled={cancelled}
|
|
1205
1350
|
preview={
|
|
1206
1351
|
state.kind === "loading"
|
|
1207
|
-
? "
|
|
1352
|
+
? msg("timeline.toolRenderers.loadingImage")
|
|
1208
1353
|
: state.kind === "error"
|
|
1209
|
-
? "
|
|
1354
|
+
? msg("timeline.toolRenderers.imageRetrievalFailed")
|
|
1210
1355
|
: state.kind === "unavailable"
|
|
1211
1356
|
? `image ${state.label}`
|
|
1212
1357
|
: truncatePreview(prompt, 88) || `${dimensions.width}×${dimensions.height}`
|
|
@@ -1217,8 +1362,8 @@ function GeneratedImageDisclosure({
|
|
|
1217
1362
|
src={state.url}
|
|
1218
1363
|
caption={caption}
|
|
1219
1364
|
alt={caption}
|
|
1220
|
-
expandLabel="
|
|
1221
|
-
lightboxLabel="
|
|
1365
|
+
expandLabel={msg("timeline.toolRenderers.expandGeneratedImage")}
|
|
1366
|
+
lightboxLabel={msg("timeline.toolRenderers.generatedImage")}
|
|
1222
1367
|
/>
|
|
1223
1368
|
) : state.kind === "loading" ? (
|
|
1224
1369
|
<MediaSkeleton />
|
|
@@ -1232,15 +1377,15 @@ function GeneratedImageDisclosure({
|
|
|
1232
1377
|
src={state.url}
|
|
1233
1378
|
caption={caption}
|
|
1234
1379
|
alt={caption}
|
|
1235
|
-
expandLabel="
|
|
1236
|
-
lightboxLabel="
|
|
1380
|
+
expandLabel={msg("timeline.toolRenderers.expandGeneratedImage")}
|
|
1381
|
+
lightboxLabel={msg("timeline.toolRenderers.generatedImage")}
|
|
1237
1382
|
/>
|
|
1238
1383
|
) : state.kind === "loading" ? (
|
|
1239
|
-
<BodyNote>
|
|
1384
|
+
<BodyNote>{msg("timeline.toolRenderers.loadingTheGeneratedImage")}</BodyNote>
|
|
1240
1385
|
) : state.kind === "unavailable" ? (
|
|
1241
|
-
<BodyNote>
|
|
1386
|
+
<BodyNote>{msg("timeline.toolRenderers.imageLabel", { label: state.label })}</BodyNote>
|
|
1242
1387
|
) : (
|
|
1243
|
-
<
|
|
1388
|
+
<ImageRetrievalError retry={state.retry} />
|
|
1244
1389
|
)}
|
|
1245
1390
|
<BodyNote>
|
|
1246
1391
|
{dimensions.width}×{dimensions.height} · {receipt.sandboxPath}
|
|
@@ -1249,168 +1394,31 @@ function GeneratedImageDisclosure({
|
|
|
1249
1394
|
);
|
|
1250
1395
|
}
|
|
1251
1396
|
|
|
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
|
-
);
|
|
1397
|
+
function retainedImageFilename(artifact: RetainedArtifactReference): string {
|
|
1398
|
+
const extension =
|
|
1399
|
+
artifact.contentType === "image/jpeg"
|
|
1400
|
+
? "jpg"
|
|
1401
|
+
: artifact.contentType === "image/webp"
|
|
1402
|
+
? "webp"
|
|
1403
|
+
: "png";
|
|
1404
|
+
return `${artifact.kind}-${artifact.artifactId}.${extension}`;
|
|
1401
1405
|
}
|
|
1402
1406
|
|
|
1407
|
+
/* ---- web_search ------------------------------------------------------------ */
|
|
1408
|
+
|
|
1403
1409
|
/* ---- view_image ------------------------------------------------------------ */
|
|
1404
1410
|
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
"
|
|
1408
|
-
"
|
|
1409
|
-
"
|
|
1410
|
-
"
|
|
1411
|
+
// Fragments of the tool's own (English) error output; matched, never displayed.
|
|
1412
|
+
const VIEW_IMAGE_ERRORS = (msg: OpenGeniText) => [
|
|
1413
|
+
msg("timeline.toolRenderers.wasNotFound"),
|
|
1414
|
+
msg("timeline.toolRenderers.isNotAFile"),
|
|
1415
|
+
msg("timeline.toolRenderers.exceededTheAllowedSize"),
|
|
1416
|
+
msg("timeline.toolRenderers.isNotASupportedImage"),
|
|
1417
|
+
msg("timeline.toolRenderers.unableToReadImage"),
|
|
1411
1418
|
];
|
|
1412
1419
|
|
|
1413
1420
|
function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps) {
|
|
1421
|
+
const msg = useOpenGeniText();
|
|
1414
1422
|
const args = parseToolArgs(item.arguments);
|
|
1415
1423
|
const path = typeof args.path === "string" ? args.path : "";
|
|
1416
1424
|
const out = item.output;
|
|
@@ -1423,12 +1431,12 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1423
1431
|
<ActivityDisclosure
|
|
1424
1432
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1425
1433
|
iconTone="running"
|
|
1426
|
-
title={
|
|
1434
|
+
title={msg("timeline.toolRenderers.viewPathbasename", { pathBasename: pathBasename(path) })}
|
|
1427
1435
|
running
|
|
1428
|
-
preview={<RunningPreview>reading
|
|
1436
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.reading")}</RunningPreview>}
|
|
1429
1437
|
media={<MediaSkeleton />}
|
|
1430
1438
|
>
|
|
1431
|
-
<BodyNote>
|
|
1439
|
+
<BodyNote>{msg("timeline.toolRenderers.readingImage")}</BodyNote>
|
|
1432
1440
|
</ActivityDisclosure>
|
|
1433
1441
|
);
|
|
1434
1442
|
}
|
|
@@ -1437,7 +1445,9 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1437
1445
|
const viewCancelled = item.status === "cancelled";
|
|
1438
1446
|
|
|
1439
1447
|
if (retained) {
|
|
1440
|
-
const title =
|
|
1448
|
+
const title = msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1449
|
+
pathBasename: pathBasename(path),
|
|
1450
|
+
});
|
|
1441
1451
|
if (!retained.available) {
|
|
1442
1452
|
const state =
|
|
1443
1453
|
retained.reason === "expired" || retained.reason === "deleted"
|
|
@@ -1454,7 +1464,10 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1454
1464
|
media={<MediaEmpty />}
|
|
1455
1465
|
>
|
|
1456
1466
|
<BodyNote tone={viewFailed ? "error" : undefined}>
|
|
1457
|
-
|
|
1467
|
+
{msg("timeline.toolRenderers.imageStateReplaceall", {
|
|
1468
|
+
state,
|
|
1469
|
+
replaceAll: retained.reason.replaceAll("_", " "),
|
|
1470
|
+
})}
|
|
1458
1471
|
</BodyNote>
|
|
1459
1472
|
</ActivityDisclosure>
|
|
1460
1473
|
);
|
|
@@ -1467,7 +1480,7 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1467
1480
|
caption={path || title}
|
|
1468
1481
|
noun="image"
|
|
1469
1482
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1470
|
-
lightboxLabel="
|
|
1483
|
+
lightboxLabel={msg("timeline.toolRenderers.image")}
|
|
1471
1484
|
batched={null}
|
|
1472
1485
|
failed={viewFailed}
|
|
1473
1486
|
cancelled={viewCancelled}
|
|
@@ -1475,15 +1488,18 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1475
1488
|
);
|
|
1476
1489
|
}
|
|
1477
1490
|
|
|
1478
|
-
const errMatch = VIEW_IMAGE_ERRORS.find((p) => text.includes(p));
|
|
1491
|
+
const errMatch = VIEW_IMAGE_ERRORS(msg).find((p) => text.includes(p));
|
|
1479
1492
|
if (errMatch) {
|
|
1480
1493
|
const tooBig = text.includes("exceeded the allowed size");
|
|
1481
1494
|
return (
|
|
1482
1495
|
<ActivityDisclosure
|
|
1483
1496
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1484
1497
|
iconTone="failed"
|
|
1485
|
-
title={
|
|
1486
|
-
chip={{
|
|
1498
|
+
title={msg("timeline.toolRenderers.viewPathbasename", { pathBasename: pathBasename(path) })}
|
|
1499
|
+
chip={{
|
|
1500
|
+
tone: "bad",
|
|
1501
|
+
text: tooBig ? msg("timeline.toolRenderers.tooLarge") : msg("timeline.chip.error"),
|
|
1502
|
+
}}
|
|
1487
1503
|
preview={text}
|
|
1488
1504
|
>
|
|
1489
1505
|
<BodyNote tone="error">{text}</BodyNote>
|
|
@@ -1495,7 +1511,9 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1495
1511
|
<ActivityDisclosure
|
|
1496
1512
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1497
1513
|
iconTone={viewFailed ? "failed" : "muted"}
|
|
1498
|
-
title={
|
|
1514
|
+
title={msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1515
|
+
pathBasename: pathBasename(path),
|
|
1516
|
+
})}
|
|
1499
1517
|
failed={viewFailed}
|
|
1500
1518
|
cancelled={viewCancelled}
|
|
1501
1519
|
preview={path}
|
|
@@ -1509,15 +1527,18 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1509
1527
|
<ActivityDisclosure
|
|
1510
1528
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1511
1529
|
iconTone={viewFailed ? "failed" : "muted"}
|
|
1512
|
-
title={
|
|
1530
|
+
title={msg("timeline.toolRenderers.viewedPathbasenameImageOmittedNot", {
|
|
1531
|
+
pathBasename: pathBasename(path),
|
|
1532
|
+
})}
|
|
1513
1533
|
failed={viewFailed}
|
|
1514
1534
|
cancelled={viewCancelled}
|
|
1515
|
-
preview="
|
|
1535
|
+
preview={msg("timeline.toolRenderers.inlineImageOmittedNotRetained")}
|
|
1516
1536
|
media={<MediaEmpty />}
|
|
1517
1537
|
>
|
|
1518
1538
|
<BodyNote>
|
|
1519
|
-
|
|
1520
|
-
|
|
1539
|
+
{msg("timeline.toolRenderers.theInlineMediatypeOutputWas", {
|
|
1540
|
+
mediaType: omittedMedia.mediaType,
|
|
1541
|
+
})}
|
|
1521
1542
|
</BodyNote>
|
|
1522
1543
|
</ActivityDisclosure>
|
|
1523
1544
|
);
|
|
@@ -1527,17 +1548,19 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1527
1548
|
<ActivityDisclosure
|
|
1528
1549
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1529
1550
|
iconTone={viewFailed ? "failed" : "muted"}
|
|
1530
|
-
title={
|
|
1551
|
+
title={msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1552
|
+
pathBasename: pathBasename(path),
|
|
1553
|
+
})}
|
|
1531
1554
|
failed={viewFailed}
|
|
1532
1555
|
cancelled={viewCancelled}
|
|
1533
|
-
preview="
|
|
1556
|
+
preview={msg("timeline.toolRenderers.noImage")}
|
|
1534
1557
|
>
|
|
1535
1558
|
<BodyNote>
|
|
1536
1559
|
{viewFailed
|
|
1537
|
-
? "
|
|
1560
|
+
? msg("timeline.toolRenderers.viewImageFailedNoImage")
|
|
1538
1561
|
: viewCancelled
|
|
1539
|
-
? "
|
|
1540
|
-
: "
|
|
1562
|
+
? msg("timeline.toolRenderers.viewImageInterrupted")
|
|
1563
|
+
: msg("timeline.toolRenderers.noImageTheSandboxSession")}
|
|
1541
1564
|
</BodyNote>
|
|
1542
1565
|
</ActivityDisclosure>
|
|
1543
1566
|
);
|
|
@@ -1547,7 +1570,9 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1547
1570
|
<ActivityDisclosure
|
|
1548
1571
|
icon={<ImageIcon className={ICON_SIZE} />}
|
|
1549
1572
|
iconTone={viewFailed ? "failed" : "accent"}
|
|
1550
|
-
title={
|
|
1573
|
+
title={msg("timeline.toolRenderers.viewedPathbasename", {
|
|
1574
|
+
pathBasename: pathBasename(path),
|
|
1575
|
+
})}
|
|
1551
1576
|
failed={viewFailed}
|
|
1552
1577
|
cancelled={viewCancelled}
|
|
1553
1578
|
media={<Thumbnail src={text} caption={path} alt={path} />}
|
|
@@ -1562,6 +1587,7 @@ function ViewImageRenderer({ item, loadRetainedScreenshot }: ToolRendererProps)
|
|
|
1562
1587
|
/* ---- environment_set_variable (secret-safe, write-only) -------------------- */
|
|
1563
1588
|
|
|
1564
1589
|
function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
1590
|
+
const msg = useOpenGeniText();
|
|
1565
1591
|
const args = parseToolArgs(item.arguments);
|
|
1566
1592
|
const name = typeof args.name === "string" ? args.name : "variable";
|
|
1567
1593
|
|
|
@@ -1570,11 +1596,11 @@ function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
|
1570
1596
|
<ActivityDisclosure
|
|
1571
1597
|
icon={<KeyRoundIcon className={ICON_SIZE} />}
|
|
1572
1598
|
iconTone="running"
|
|
1573
|
-
title={
|
|
1599
|
+
title={msg("timeline.toolRenderers.setName", { name })}
|
|
1574
1600
|
running
|
|
1575
|
-
preview={<RunningPreview>setting
|
|
1601
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.setting")}</RunningPreview>}
|
|
1576
1602
|
>
|
|
1577
|
-
<PayloadBlock label="
|
|
1603
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1578
1604
|
</ActivityDisclosure>
|
|
1579
1605
|
);
|
|
1580
1606
|
}
|
|
@@ -1585,15 +1611,15 @@ function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
|
1585
1611
|
<ActivityDisclosure
|
|
1586
1612
|
icon={<KeyRoundIcon className={ICON_SIZE} />}
|
|
1587
1613
|
iconTone="failed"
|
|
1588
|
-
title={
|
|
1614
|
+
title={msg("timeline.toolRenderers.setName", { name })}
|
|
1589
1615
|
failed
|
|
1590
|
-
preview={errorText ?? "
|
|
1616
|
+
preview={errorText ?? msg("timeline.toolRenderers.variableWriteFailed")}
|
|
1591
1617
|
>
|
|
1592
|
-
<PayloadBlock label="
|
|
1618
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1593
1619
|
{errorText ? (
|
|
1594
|
-
<PayloadBlock label="
|
|
1620
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={errorText} failed />
|
|
1595
1621
|
) : (
|
|
1596
|
-
<BodyNote tone="error">
|
|
1622
|
+
<BodyNote tone="error">{msg("timeline.toolRenderers.theToolCallFailedWith")}</BodyNote>
|
|
1597
1623
|
)}
|
|
1598
1624
|
</ActivityDisclosure>
|
|
1599
1625
|
);
|
|
@@ -1603,138 +1629,20 @@ function SecretSetRenderer({ item }: ToolRendererProps) {
|
|
|
1603
1629
|
<ActivityDisclosure
|
|
1604
1630
|
icon={<KeyRoundIcon className={ICON_SIZE} />}
|
|
1605
1631
|
iconTone="muted"
|
|
1606
|
-
title={
|
|
1632
|
+
title={msg("timeline.toolRenderers.setName", { name })}
|
|
1607
1633
|
cancelled={item.status === "cancelled"}
|
|
1608
1634
|
preview="exact value preserved"
|
|
1609
1635
|
>
|
|
1610
|
-
<PayloadBlock label="
|
|
1611
|
-
<BodyNote>
|
|
1612
|
-
The configured value is preserved exactly and available through authorized secret reads.
|
|
1613
|
-
</BodyNote>
|
|
1636
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1637
|
+
<BodyNote>{msg("timeline.toolRenderers.theConfiguredValueIsPreserved")}</BodyNote>
|
|
1614
1638
|
</ActivityDisclosure>
|
|
1615
1639
|
);
|
|
1616
1640
|
}
|
|
1617
1641
|
|
|
1618
1642
|
/* ---- tool_search (progressive MCP disclosure) ------------------------------ */
|
|
1619
1643
|
|
|
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
1644
|
function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
1645
|
+
const msg = useOpenGeniText();
|
|
1738
1646
|
const query = toolSearchQuery(item);
|
|
1739
1647
|
const icon = <PackageSearchIcon className={ICON_SIZE} />;
|
|
1740
1648
|
const running = item.status === "running";
|
|
@@ -1745,18 +1653,23 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1745
1653
|
<ActivityDisclosure
|
|
1746
1654
|
icon={icon}
|
|
1747
1655
|
iconTone="running"
|
|
1748
|
-
title="
|
|
1656
|
+
title={msg("timeline.toolRenderers.lookingUpTools")}
|
|
1749
1657
|
running
|
|
1750
1658
|
preview={
|
|
1751
1659
|
queryPreview ? (
|
|
1752
1660
|
<RunningPreview>{queryPreview}</RunningPreview>
|
|
1753
1661
|
) : (
|
|
1754
|
-
<RunningPreview>
|
|
1662
|
+
<RunningPreview>{msg("timeline.toolRenderers.matchingCapabilities")}</RunningPreview>
|
|
1755
1663
|
)
|
|
1756
1664
|
}
|
|
1757
1665
|
>
|
|
1758
|
-
{query ?
|
|
1759
|
-
|
|
1666
|
+
{query ? (
|
|
1667
|
+
<BodyNote>{msg("timeline.toolRenderers.capabilityQueryQuery", { query })}</BodyNote>
|
|
1668
|
+
) : null}
|
|
1669
|
+
<PayloadBlock
|
|
1670
|
+
label={msg("timeline.toolRenderers.arguments")}
|
|
1671
|
+
value={parseToolArgs(item.arguments)}
|
|
1672
|
+
/>
|
|
1760
1673
|
</ActivityDisclosure>
|
|
1761
1674
|
);
|
|
1762
1675
|
}
|
|
@@ -1767,29 +1680,38 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1767
1680
|
<ActivityDisclosure
|
|
1768
1681
|
icon={icon}
|
|
1769
1682
|
iconTone="failed"
|
|
1770
|
-
title="
|
|
1683
|
+
title={msg("timeline.toolRenderers.toolLookupFailed")}
|
|
1771
1684
|
failed
|
|
1772
|
-
preview={
|
|
1685
|
+
preview={
|
|
1686
|
+
truncatePreview(outText, 80) || queryPreview || msg("timeline.toolRenderers.lookupFailed")
|
|
1687
|
+
}
|
|
1773
1688
|
>
|
|
1774
|
-
{query ?
|
|
1775
|
-
|
|
1776
|
-
|
|
1689
|
+
{query ? (
|
|
1690
|
+
<BodyNote>{msg("timeline.toolRenderers.capabilityQueryQuery", { query })}</BodyNote>
|
|
1691
|
+
) : null}
|
|
1692
|
+
<PayloadBlock
|
|
1693
|
+
label={msg("timeline.toolRenderers.arguments")}
|
|
1694
|
+
value={parseToolArgs(item.arguments)}
|
|
1695
|
+
/>
|
|
1696
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
1777
1697
|
</ActivityDisclosure>
|
|
1778
1698
|
);
|
|
1779
1699
|
}
|
|
1780
1700
|
|
|
1781
1701
|
const tools = parseDisclosedTools(item.output);
|
|
1782
|
-
const preview = toolSearchPreview(tools, item.status === "cancelled");
|
|
1702
|
+
const preview = toolSearchPreview(msg, tools, item.status === "cancelled");
|
|
1783
1703
|
|
|
1784
1704
|
return (
|
|
1785
1705
|
<ActivityDisclosure
|
|
1786
1706
|
icon={icon}
|
|
1787
1707
|
iconTone="muted"
|
|
1788
|
-
title="
|
|
1708
|
+
title={msg("timeline.toolRenderers.lookedUpTools")}
|
|
1789
1709
|
cancelled={item.status === "cancelled"}
|
|
1790
1710
|
preview={preview}
|
|
1791
1711
|
>
|
|
1792
|
-
{query ?
|
|
1712
|
+
{query ? (
|
|
1713
|
+
<BodyNote>{msg("timeline.toolRenderers.capabilityQueryQuery", { query })}</BodyNote>
|
|
1714
|
+
) : null}
|
|
1793
1715
|
{tools && tools.length > 0 ? (
|
|
1794
1716
|
<ul className="grid gap-1.5">
|
|
1795
1717
|
{tools.slice(0, 12).map((tool) => (
|
|
@@ -1801,14 +1723,21 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1801
1723
|
</li>
|
|
1802
1724
|
))}
|
|
1803
1725
|
{tools.length > 12 ? (
|
|
1804
|
-
<li className="text-og-xs text-og-fg-muted"
|
|
1726
|
+
<li className="text-og-xs text-og-fg-muted">
|
|
1727
|
+
+{tools.length - 12} {msg("timeline.toolRenderers.more")}
|
|
1728
|
+
</li>
|
|
1805
1729
|
) : null}
|
|
1806
1730
|
</ul>
|
|
1807
1731
|
) : tools && tools.length === 0 ? (
|
|
1808
|
-
<BodyNote>
|
|
1732
|
+
<BodyNote>{msg("timeline.toolRenderers.noDeferredToolsMatchedThis")}</BodyNote>
|
|
1733
|
+
) : null}
|
|
1734
|
+
<PayloadBlock
|
|
1735
|
+
label={msg("timeline.toolRenderers.arguments")}
|
|
1736
|
+
value={parseToolArgs(item.arguments)}
|
|
1737
|
+
/>
|
|
1738
|
+
{tools == null && outText ? (
|
|
1739
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
1809
1740
|
) : null}
|
|
1810
|
-
<PayloadBlock label="Arguments" value={parseToolArgs(item.arguments)} />
|
|
1811
|
-
{tools == null && outText ? <PayloadBlock label="Result" value={outText} /> : null}
|
|
1812
1741
|
</ActivityDisclosure>
|
|
1813
1742
|
);
|
|
1814
1743
|
}
|
|
@@ -1816,9 +1745,14 @@ function ToolSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1816
1745
|
/* ---- docs / knowledge search ----------------------------------------------- */
|
|
1817
1746
|
|
|
1818
1747
|
function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
1748
|
+
const msg = useOpenGeniText();
|
|
1819
1749
|
const args = parseToolArgs(item.arguments);
|
|
1820
1750
|
const query = typeof args.query === "string" ? args.query.trim() : "";
|
|
1821
|
-
const title = query
|
|
1751
|
+
const title = query
|
|
1752
|
+
? msg("timeline.toolRenderers.searchTruncatepreview", {
|
|
1753
|
+
truncatePreview: truncatePreview(query, 48),
|
|
1754
|
+
})
|
|
1755
|
+
: toolDisplayName(msg, item.name, item.display);
|
|
1822
1756
|
const running = item.status === "running";
|
|
1823
1757
|
|
|
1824
1758
|
if (running) {
|
|
@@ -1828,9 +1762,9 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1828
1762
|
iconTone="running"
|
|
1829
1763
|
title={title}
|
|
1830
1764
|
running
|
|
1831
|
-
preview={<RunningPreview>
|
|
1765
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.searching")}</RunningPreview>}
|
|
1832
1766
|
>
|
|
1833
|
-
<PayloadBlock label="
|
|
1767
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1834
1768
|
</ActivityDisclosure>
|
|
1835
1769
|
);
|
|
1836
1770
|
}
|
|
@@ -1843,23 +1777,23 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1843
1777
|
iconTone="failed"
|
|
1844
1778
|
title={title}
|
|
1845
1779
|
failed
|
|
1846
|
-
preview={truncatePreview(outText, 80) || "
|
|
1780
|
+
preview={truncatePreview(outText, 80) || msg("timeline.toolRenderers.searchFailed")}
|
|
1847
1781
|
>
|
|
1848
|
-
<PayloadBlock label="
|
|
1849
|
-
<PayloadBlock label="
|
|
1782
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1783
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
1850
1784
|
</ActivityDisclosure>
|
|
1851
1785
|
);
|
|
1852
1786
|
}
|
|
1853
1787
|
|
|
1854
|
-
const hits = parseSearchHits(outText);
|
|
1788
|
+
const hits = parseSearchHits(msg, outText);
|
|
1855
1789
|
const preview =
|
|
1856
1790
|
item.status === "cancelled"
|
|
1857
1791
|
? undefined
|
|
1858
1792
|
: hits
|
|
1859
1793
|
? hits.length === 0
|
|
1860
|
-
? "
|
|
1861
|
-
:
|
|
1862
|
-
: "
|
|
1794
|
+
? msg("timeline.toolRenderers.noHits")
|
|
1795
|
+
: msg("counts.hits", { count: hits.length })
|
|
1796
|
+
: msg("timeline.toolRenderers.done");
|
|
1863
1797
|
|
|
1864
1798
|
return (
|
|
1865
1799
|
<ActivityDisclosure
|
|
@@ -1881,8 +1815,8 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1881
1815
|
))}
|
|
1882
1816
|
</ul>
|
|
1883
1817
|
) : null}
|
|
1884
|
-
<PayloadBlock label="
|
|
1885
|
-
<PayloadBlock label="
|
|
1818
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1819
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
1886
1820
|
</ActivityDisclosure>
|
|
1887
1821
|
);
|
|
1888
1822
|
}
|
|
@@ -1890,9 +1824,10 @@ function DocsSearchRenderer({ item }: ToolRendererProps) {
|
|
|
1890
1824
|
/* ---- set_session_title / set_other_session_title --------------------------- */
|
|
1891
1825
|
|
|
1892
1826
|
function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
1827
|
+
const msg = useOpenGeniText();
|
|
1893
1828
|
const args = parseToolArgs(item.arguments);
|
|
1894
1829
|
const titleArg = typeof args.title === "string" ? args.title.trim() : "";
|
|
1895
|
-
const display = toolDisplayName(item.name);
|
|
1830
|
+
const display = toolDisplayName(msg, item.name, item.display);
|
|
1896
1831
|
const previewTitle = titleArg ? truncatePreview(titleArg, 72) : "";
|
|
1897
1832
|
const icon = <MessagesSquareIcon className={ICON_SIZE} />;
|
|
1898
1833
|
|
|
@@ -1907,11 +1842,11 @@ function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
|
1907
1842
|
previewTitle ? (
|
|
1908
1843
|
<RunningPreview>{previewTitle}</RunningPreview>
|
|
1909
1844
|
) : (
|
|
1910
|
-
<RunningPreview>
|
|
1845
|
+
<RunningPreview>{msg("timeline.toolRenderers.settingTitle")}</RunningPreview>
|
|
1911
1846
|
)
|
|
1912
1847
|
}
|
|
1913
1848
|
>
|
|
1914
|
-
<PayloadBlock label="
|
|
1849
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1915
1850
|
</ActivityDisclosure>
|
|
1916
1851
|
);
|
|
1917
1852
|
}
|
|
@@ -1924,10 +1859,10 @@ function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
|
1924
1859
|
iconTone="failed"
|
|
1925
1860
|
title={display}
|
|
1926
1861
|
failed
|
|
1927
|
-
preview={truncatePreview(outText, 80) || "
|
|
1862
|
+
preview={truncatePreview(outText, 80) || msg("timeline.toolRenderers.renameFailed")}
|
|
1928
1863
|
>
|
|
1929
|
-
<PayloadBlock label="
|
|
1930
|
-
<PayloadBlock label="
|
|
1864
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1865
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
1931
1866
|
</ActivityDisclosure>
|
|
1932
1867
|
);
|
|
1933
1868
|
}
|
|
@@ -1952,55 +1887,21 @@ function SetSessionTitleRenderer({ item }: ToolRendererProps) {
|
|
|
1952
1887
|
cancelled={item.status === "cancelled"}
|
|
1953
1888
|
preview={item.status === "cancelled" ? undefined : settledTitle || undefined}
|
|
1954
1889
|
>
|
|
1955
|
-
<PayloadBlock label="
|
|
1956
|
-
{outText ?
|
|
1890
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
1891
|
+
{outText ? (
|
|
1892
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
1893
|
+
) : null}
|
|
1957
1894
|
</ActivityDisclosure>
|
|
1958
1895
|
);
|
|
1959
1896
|
}
|
|
1960
1897
|
|
|
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
1898
|
/* ---- company memory propose (docs MCP) ------------------------------------- */
|
|
1999
1899
|
|
|
2000
1900
|
function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
1901
|
+
const msg = useOpenGeniText();
|
|
2001
1902
|
const args = parseToolArgs(item.arguments);
|
|
2002
1903
|
const text = typeof args.text === "string" ? args.text.trim() : "";
|
|
2003
|
-
const title = "
|
|
1904
|
+
const title = msg("timeline.toolRenderers.proposeMemory");
|
|
2004
1905
|
const running = item.status === "running";
|
|
2005
1906
|
|
|
2006
1907
|
if (running) {
|
|
@@ -2010,9 +1911,9 @@ function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
|
2010
1911
|
iconTone="running"
|
|
2011
1912
|
title={title}
|
|
2012
1913
|
running
|
|
2013
|
-
preview={<RunningPreview>
|
|
1914
|
+
preview={<RunningPreview>{msg("timeline.toolRenderers.proposing")}</RunningPreview>}
|
|
2014
1915
|
>
|
|
2015
|
-
<PayloadBlock label="
|
|
1916
|
+
<PayloadBlock label={msg("timeline.toolRenderers.arguments")} value={args} />
|
|
2016
1917
|
</ActivityDisclosure>
|
|
2017
1918
|
);
|
|
2018
1919
|
}
|
|
@@ -2025,10 +1926,10 @@ function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
|
2025
1926
|
iconTone="failed"
|
|
2026
1927
|
title={title}
|
|
2027
1928
|
failed
|
|
2028
|
-
preview={truncatePreview(outText, 80) || "
|
|
1929
|
+
preview={truncatePreview(outText, 80) || msg("timeline.toolRenderers.proposeFailed")}
|
|
2029
1930
|
>
|
|
2030
1931
|
{text ? <BodyNote>{text}</BodyNote> : null}
|
|
2031
|
-
<PayloadBlock label="
|
|
1932
|
+
<PayloadBlock label={msg("timeline.toolRenderers.error")} value={outText} failed />
|
|
2032
1933
|
</ActivityDisclosure>
|
|
2033
1934
|
);
|
|
2034
1935
|
}
|
|
@@ -2039,187 +1940,18 @@ function MemoryProposeRenderer({ item }: ToolRendererProps) {
|
|
|
2039
1940
|
iconTone="muted"
|
|
2040
1941
|
title={title}
|
|
2041
1942
|
cancelled={item.status === "cancelled"}
|
|
2042
|
-
preview={text ? truncatePreview(text, 90) : "
|
|
1943
|
+
preview={text ? truncatePreview(text, 90) : msg("timeline.toolRenderers.done")}
|
|
2043
1944
|
>
|
|
2044
1945
|
{text ? <BodyNote>{text}</BodyNote> : null}
|
|
2045
|
-
<PayloadBlock label="
|
|
1946
|
+
<PayloadBlock label={msg("timeline.toolRenderers.result")} value={outText} />
|
|
2046
1947
|
</ActivityDisclosure>
|
|
2047
1948
|
);
|
|
2048
1949
|
}
|
|
2049
1950
|
|
|
2050
1951
|
/* ---- request_human_input --------------------------------------------------- */
|
|
2051
1952
|
|
|
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
1953
|
/* ---- run_on ---------------------------------------------------------------- */
|
|
2133
1954
|
|
|
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
1955
|
/* ---- generic fallback (first-party MCP, external MCP, unknown) ------------- */
|
|
2224
1956
|
|
|
2225
1957
|
/**
|
|
@@ -2227,150 +1959,136 @@ function RunOnRenderer({ item }: ToolRendererProps) {
|
|
|
2227
1959
|
* status preview (Running… / Done / error snippet). No argument-field sniffing —
|
|
2228
1960
|
* JSON stays in the expandable body only.
|
|
2229
1961
|
*/
|
|
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
|
-
}
|
|
1962
|
+
function GenericRenderer(props: ToolRendererProps) {
|
|
1963
|
+
const reviewed = useHasToolReview(props.item.callId);
|
|
1964
|
+
if (reviewed && props.item.callId) return <ReviewedGenericRenderer {...props} />;
|
|
1965
|
+
return <UnreviewedGenericRenderer {...props} />;
|
|
1966
|
+
}
|
|
2252
1967
|
|
|
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
|
-
}
|
|
1968
|
+
/** Settled review states earn one quiet gutter word; success and waiting stay chip-free. */
|
|
1969
|
+
const REVIEW_CHIP = (msg: OpenGeniText): Partial<Record<ToolReviewStatus, DisclosureChip>> => ({
|
|
1970
|
+
rejected: { tone: "interrupted", text: msg("timeline.chip.declined") },
|
|
1971
|
+
cancelled: { tone: "interrupted", text: msg("timeline.toolRenderers.notRun") },
|
|
1972
|
+
expired: { tone: "interrupted", text: msg("timeline.chip.expired") },
|
|
1973
|
+
stale: { tone: "interrupted", text: msg("timeline.toolRenderers.notRun") },
|
|
1974
|
+
revoked: { tone: "interrupted", text: msg("timeline.toolRenderers.notRun") },
|
|
1975
|
+
blocked: { tone: "interrupted", text: msg("timeline.chip.blocked") },
|
|
1976
|
+
unknown: { tone: "bad", text: msg("timeline.toolRenderers.outcomeUnknown") },
|
|
1977
|
+
partial: { tone: "bad", text: msg("timeline.toolRenderers.partlyDone") },
|
|
1978
|
+
failed: { tone: "bad", text: msg("timeline.chip.failed") },
|
|
1979
|
+
});
|
|
2271
1980
|
|
|
1981
|
+
/**
|
|
1982
|
+
* A call that went through approval keeps the ordinary row shape, titled with
|
|
1983
|
+
* what was approved. The expanded body is the saved review plus the result.
|
|
1984
|
+
*/
|
|
1985
|
+
function ReviewedGenericRenderer(props: ToolRendererProps) {
|
|
1986
|
+
const msg = useOpenGeniText();
|
|
1987
|
+
const { item } = props;
|
|
1988
|
+
const { review, onViewDetails } = useRecordedToolReview(item.callId);
|
|
1989
|
+
const logo = useToolConnectorLogo(item.display);
|
|
1990
|
+
if (!review) return <UnreviewedGenericRenderer {...props} />;
|
|
1991
|
+
const ReviewIcon = toolIcon(genericToolIconKind(item.name));
|
|
1992
|
+
const icon = <ConnectorLogoIcon src={logo} fallback={<ReviewIcon className={ICON_SIZE} />} />;
|
|
1993
|
+
const waiting = review.status === "pending";
|
|
1994
|
+
const running =
|
|
1995
|
+
!waiting &&
|
|
1996
|
+
(review.status === "executing" || review.status === "approved") &&
|
|
1997
|
+
item.status === "running";
|
|
1998
|
+
const { text: outText, isError } = unwrapMcpOutput(retainedToolResultImages(item.output).output);
|
|
1999
|
+
const chip =
|
|
2000
|
+
REVIEW_CHIP(msg)[review.status] ??
|
|
2001
|
+
(isError && !running && !waiting
|
|
2002
|
+
? ({ tone: "bad", text: msg("timeline.chip.error") } as const)
|
|
2003
|
+
: undefined);
|
|
2272
2004
|
return (
|
|
2273
2005
|
<ActivityDisclosure
|
|
2274
2006
|
icon={icon}
|
|
2275
|
-
iconTone="muted"
|
|
2276
|
-
title={
|
|
2277
|
-
|
|
2278
|
-
|
|
2007
|
+
iconTone={chip?.tone === "bad" ? "failed" : waiting ? "accent" : "muted"}
|
|
2008
|
+
title={review.title}
|
|
2009
|
+
running={running}
|
|
2010
|
+
chip={chip}
|
|
2011
|
+
preview={
|
|
2012
|
+
waiting ? (
|
|
2013
|
+
msg("timeline.toolRenderers.waitingForYourApproval")
|
|
2014
|
+
) : running ? (
|
|
2015
|
+
<RunningPreview>{msg("timeline.toolRenderers.running")}</RunningPreview>
|
|
2016
|
+
) : item.display?.connector ? (
|
|
2017
|
+
// The logo names the connector; only a second account needs words.
|
|
2018
|
+
(item.display.accountLabel ?? undefined)
|
|
2019
|
+
) : (
|
|
2020
|
+
(review.accountLabel ?? undefined)
|
|
2021
|
+
)
|
|
2022
|
+
}
|
|
2279
2023
|
>
|
|
2280
|
-
<
|
|
2281
|
-
|
|
2024
|
+
<div className="py-1" data-approval-id={item.callId} data-review-origin="history">
|
|
2025
|
+
<ToolActionReviewCard
|
|
2026
|
+
bare
|
|
2027
|
+
review={{ ...review, availableActions: [] }}
|
|
2028
|
+
onViewDetails={onViewDetails}
|
|
2029
|
+
/>
|
|
2030
|
+
</div>
|
|
2031
|
+
{outText ? (
|
|
2032
|
+
<PayloadBlock
|
|
2033
|
+
label={msg("timeline.toolRenderers.result")}
|
|
2034
|
+
value={outText}
|
|
2035
|
+
failed={isError}
|
|
2036
|
+
/>
|
|
2037
|
+
) : null}
|
|
2282
2038
|
</ActivityDisclosure>
|
|
2283
2039
|
);
|
|
2284
2040
|
}
|
|
2285
2041
|
|
|
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
|
-
}
|
|
2042
|
+
/* ---- the default registry -------------------------------------------------- */
|
|
2323
2043
|
|
|
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} />;
|
|
2044
|
+
function KnowledgeSaveRenderer({ item }: ToolRendererProps) {
|
|
2045
|
+
const output = unwrapMcpOutput(item.output);
|
|
2046
|
+
const parsed = tryParseJson(output.text);
|
|
2047
|
+
if (item.status === "running" || output.isError || !parsed || typeof parsed !== "object")
|
|
2048
|
+
return <GenericRenderer item={item} />;
|
|
2049
|
+
const value = parsed as Record<string, unknown>;
|
|
2050
|
+
const receipt = (value.status === "retained" ? value.receipt : value) as
|
|
2051
|
+
| Record<string, unknown>
|
|
2052
|
+
| undefined;
|
|
2053
|
+
if (
|
|
2054
|
+
!receipt ||
|
|
2055
|
+
typeof receipt.entryId !== "string" ||
|
|
2056
|
+
!["published", "pending", "rejected", "archived"].includes(String(receipt.outcome))
|
|
2057
|
+
)
|
|
2058
|
+
return <GenericRenderer item={item} />;
|
|
2059
|
+
const args = parseToolArgs(item.arguments);
|
|
2060
|
+
const entry = args.entry as Record<string, unknown> | undefined;
|
|
2061
|
+
return (
|
|
2062
|
+
<KnowledgeReceiptRow
|
|
2063
|
+
outcome={receipt.outcome as "published" | "pending" | "rejected" | "archived"}
|
|
2064
|
+
entryId={receipt.entryId}
|
|
2065
|
+
title={
|
|
2066
|
+
typeof entry?.title === "string"
|
|
2067
|
+
? entry.title
|
|
2068
|
+
: typeof value.filename === "string"
|
|
2069
|
+
? value.filename
|
|
2070
|
+
: undefined
|
|
2071
|
+
}
|
|
2072
|
+
source={value.status === "retained" || value.retained === true}
|
|
2073
|
+
/>
|
|
2074
|
+
);
|
|
2369
2075
|
}
|
|
2370
2076
|
|
|
2371
|
-
/* ---- the default registry -------------------------------------------------- */
|
|
2372
|
-
|
|
2373
2077
|
const BASE_ENTRIES: ToolRegistryEntry[] = [
|
|
2078
|
+
...[
|
|
2079
|
+
"knowledge_save",
|
|
2080
|
+
"knowledge_archive",
|
|
2081
|
+
"knowledge_retain_file",
|
|
2082
|
+
"knowledge_retain_message",
|
|
2083
|
+
"task_note_promote_knowledge",
|
|
2084
|
+
].flatMap((name) =>
|
|
2085
|
+
[name, `opengeni__${name}`, `mcp__opengeni__${name}`].map((trustedName) => ({
|
|
2086
|
+
match: "name" as const,
|
|
2087
|
+
name: trustedName,
|
|
2088
|
+
matchPrefixedLeaf: false,
|
|
2089
|
+
render: KnowledgeSaveRenderer,
|
|
2090
|
+
})),
|
|
2091
|
+
),
|
|
2374
2092
|
// Provider-native items carry `raw.type` on the wire — this is their source of
|
|
2375
2093
|
// truth and is consulted first by the registry.
|
|
2376
2094
|
{ match: "rawType", type: "apply_patch_call", render: ApplyPatchRenderer },
|
|
@@ -2380,26 +2098,50 @@ const BASE_ENTRIES: ToolRegistryEntry[] = [
|
|
|
2380
2098
|
{ match: "name", name: "exec_command", render: ExecRenderer },
|
|
2381
2099
|
{ match: "name", name: "request_human_input", render: AskRenderer },
|
|
2382
2100
|
{ match: "name", name: "run_on", render: RunOnRenderer },
|
|
2101
|
+
{ match: "name", name: "sandboxes_list", render: MachineRenderer },
|
|
2102
|
+
{ match: "name", name: "sandbox_swap", render: MachineRenderer },
|
|
2103
|
+
{ match: "name", name: "computer_open", render: MachineRenderer },
|
|
2104
|
+
{ match: "name", name: "computer_observe", render: MachineRenderer },
|
|
2105
|
+
{ match: "name", name: "computer_act", render: MachineRenderer },
|
|
2383
2106
|
{ match: "name", name: "write_stdin", render: WriteStdinRenderer },
|
|
2384
2107
|
{ match: "name", name: "apply_patch_call", render: ApplyPatchRenderer },
|
|
2385
2108
|
{ match: "name", name: "apply_patch", render: ApplyPatchRenderer },
|
|
2386
2109
|
{ match: "name", name: "computer_call", render: ComputerCallRenderer },
|
|
2110
|
+
{
|
|
2111
|
+
match: "name",
|
|
2112
|
+
name: "browser_screenshot",
|
|
2113
|
+
render: BrowserScreenshotRenderer,
|
|
2114
|
+
},
|
|
2115
|
+
{ match: "name", name: "browser_observe", render: BrowserScreenshotRenderer },
|
|
2116
|
+
{ match: "name", name: "browser_act", render: BrowserScreenshotRenderer },
|
|
2387
2117
|
// Function-mode computer tools (codex / chat-wire transports).
|
|
2388
2118
|
{ match: "name", name: "computer_screenshot", render: ComputerCallRenderer },
|
|
2389
2119
|
{ match: "name", name: "computer_click", render: ComputerCallRenderer },
|
|
2390
|
-
{
|
|
2120
|
+
{
|
|
2121
|
+
match: "name",
|
|
2122
|
+
name: "computer_double_click",
|
|
2123
|
+
render: ComputerCallRenderer,
|
|
2124
|
+
},
|
|
2391
2125
|
{ match: "name", name: "computer_move", render: ComputerCallRenderer },
|
|
2392
2126
|
{ match: "name", name: "computer_scroll", render: ComputerCallRenderer },
|
|
2393
2127
|
{ match: "name", name: "computer_type", render: ComputerCallRenderer },
|
|
2394
2128
|
{ match: "name", name: "computer_keypress", render: ComputerCallRenderer },
|
|
2395
2129
|
{ match: "name", name: "computer_drag", render: ComputerCallRenderer },
|
|
2396
2130
|
{ match: "name", name: "web_search_call", render: WebSearchRenderer },
|
|
2397
|
-
{
|
|
2131
|
+
{
|
|
2132
|
+
match: "name",
|
|
2133
|
+
name: "image_generation_call",
|
|
2134
|
+
render: GeneratedImageRenderer,
|
|
2135
|
+
},
|
|
2398
2136
|
{ match: "name", name: "generate_image", render: GeneratedImageRenderer },
|
|
2399
2137
|
{ match: "name", name: "generate_video", render: GeneratedVideoRenderer },
|
|
2400
2138
|
{ match: "name", name: "tool_search", render: ToolSearchRenderer },
|
|
2401
2139
|
{ match: "name", name: "view_image", render: ViewImageRenderer },
|
|
2402
|
-
{
|
|
2140
|
+
{
|
|
2141
|
+
match: "name",
|
|
2142
|
+
name: "sandbox_file_publish",
|
|
2143
|
+
render: SandboxFilePublishRenderer,
|
|
2144
|
+
},
|
|
2403
2145
|
{
|
|
2404
2146
|
match: "name",
|
|
2405
2147
|
name: "artifacts_create",
|
|
@@ -2424,13 +2166,25 @@ const BASE_ENTRIES: ToolRegistryEntry[] = [
|
|
|
2424
2166
|
render: SiteArtifactRenderer,
|
|
2425
2167
|
matchPrefixedLeaf: false,
|
|
2426
2168
|
},
|
|
2427
|
-
{
|
|
2428
|
-
|
|
2169
|
+
{
|
|
2170
|
+
match: "name",
|
|
2171
|
+
name: "environment_set_variable",
|
|
2172
|
+
render: SecretSetRenderer,
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
match: "name",
|
|
2176
|
+
name: "variable_set_set_variable",
|
|
2177
|
+
render: SecretSetRenderer,
|
|
2178
|
+
},
|
|
2429
2179
|
{ match: "name", name: "search_documents", render: DocsSearchRenderer },
|
|
2430
2180
|
{ match: "name", name: "knowledge_search", render: DocsSearchRenderer },
|
|
2431
2181
|
{ match: "name", name: "memory_propose", render: MemoryProposeRenderer },
|
|
2432
2182
|
{ match: "name", name: "set_session_title", render: SetSessionTitleRenderer },
|
|
2433
|
-
{
|
|
2183
|
+
{
|
|
2184
|
+
match: "name",
|
|
2185
|
+
name: "set_other_session_title",
|
|
2186
|
+
render: SetSessionTitleRenderer,
|
|
2187
|
+
},
|
|
2434
2188
|
];
|
|
2435
2189
|
|
|
2436
2190
|
/** The built-in tool renderer registry: every first-party tool plus a fallback. */
|