@ai-matrx/rich-content 0.2.4 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/code-block/CodeBlock.d.ts +44 -0
- package/dist/code-block/CodeBlock.js +449 -0
- package/dist/code-block/CodeBlockHeader.d.ts +63 -0
- package/dist/code-block/CodeBlockHeader.js +472 -0
- package/dist/code-block/CodeEditorLoading.d.ts +3 -0
- package/dist/code-block/CodeEditorLoading.js +34 -0
- package/dist/code-block/LanguageDisplay.d.ts +28 -0
- package/dist/code-block/LanguageDisplay.js +279 -0
- package/dist/code-block/SmallCodeEditor.d.ts +30 -0
- package/dist/code-block/SmallCodeEditor.js +22 -0
- package/dist/code-block/StickyButtons.d.ts +35 -0
- package/dist/code-block/StickyButtons.js +88 -0
- package/dist/code-block/highlight/ShikiCodeView.d.ts +26 -0
- package/dist/code-block/highlight/ShikiCodeView.js +134 -0
- package/dist/code-block/highlight/shiki-highlighter.d.ts +14 -0
- package/dist/code-block/highlight/shiki-highlighter.js +126 -0
- package/dist/code-block/highlight/useHighlightedLines.d.ts +18 -0
- package/dist/code-block/highlight/useHighlightedLines.js +142 -0
- package/dist/code-block/sticky-inset.d.ts +6 -0
- package/dist/code-block/sticky-inset.js +10 -0
- package/dist/display/block-interaction.d.ts +33 -0
- package/dist/display/block-interaction.js +13 -0
- package/dist/display/blocks/ChatCollapsibleWrapper.d.ts +13 -0
- package/dist/display/blocks/ChatCollapsibleWrapper.js +56 -0
- package/dist/display/blocks/buildMediaSource.d.ts +25 -0
- package/dist/display/blocks/buildMediaSource.js +43 -0
- package/dist/display/blocks/canvas-adaptive.d.ts +118 -0
- package/dist/display/blocks/canvas-adaptive.js +127 -0
- package/dist/display/blocks/canvas-fit.d.ts +24 -0
- package/dist/display/blocks/canvas-fit.js +19 -0
- package/dist/display/blocks/chart/ChartBlock.d.ts +8 -0
- package/dist/display/blocks/chart/ChartBlock.js +125 -0
- package/dist/display/blocks/chart/ChartCanvas.d.ts +18 -0
- package/dist/display/blocks/chart/ChartCanvas.js +159 -0
- package/dist/display/blocks/chart/TableChart.d.ts +25 -0
- package/dist/display/blocks/chart/TableChart.js +97 -0
- package/dist/display/blocks/chart/chart-spec.d.ts +39 -0
- package/dist/display/blocks/chart/chart-spec.js +128 -0
- package/dist/display/blocks/chart/labels.d.ts +20 -0
- package/dist/display/blocks/chart/labels.js +7 -0
- package/dist/display/blocks/chart/table-chart.d.ts +37 -0
- package/dist/display/blocks/chart/table-chart.js +231 -0
- package/dist/display/blocks/common/BlockHeaderWrapper.d.ts +56 -0
- package/dist/display/blocks/common/BlockHeaderWrapper.js +310 -0
- package/dist/display/blocks/common/ContentBlockWrapper.d.ts +40 -0
- package/dist/display/blocks/common/ContentBlockWrapper.js +214 -0
- package/dist/display/blocks/common/SandboxedHtml.d.ts +27 -0
- package/dist/display/blocks/common/SandboxedHtml.js +26 -0
- package/dist/display/blocks/diagram/DiagramLoadingVisualization.d.ts +6 -0
- package/dist/display/blocks/diagram/DiagramLoadingVisualization.js +190 -0
- package/dist/display/blocks/diagram/InteractiveDiagramBlock.d.ts +51 -0
- package/dist/display/blocks/diagram/InteractiveDiagramBlock.js +2415 -0
- package/dist/display/blocks/diagram/diagram-printer.d.ts +16 -0
- package/dist/display/blocks/diagram/diagram-printer.js +294 -0
- package/dist/display/blocks/diagram/diagram-visual-defaults.d.ts +116 -0
- package/dist/display/blocks/diagram/diagram-visual-defaults.js +400 -0
- package/dist/display/blocks/diagram/layout-utils.d.ts +90 -0
- package/dist/display/blocks/diagram/layout-utils.js +347 -0
- package/dist/display/blocks/diagram/parseDiagramJSON.d.ts +105 -0
- package/dist/display/blocks/diagram/parseDiagramJSON.js +296 -0
- package/dist/display/blocks/diagram/presentation-direction.d.ts +29 -0
- package/dist/display/blocks/diagram/presentation-direction.js +19 -0
- package/dist/display/blocks/diagram/ui-utils.d.ts +1 -0
- package/dist/display/blocks/diagram/ui-utils.js +18 -0
- package/dist/display/blocks/diff/DiffBlock.d.ts +10 -0
- package/dist/display/blocks/diff/DiffBlock.js +119 -0
- package/dist/display/blocks/diff/DiffCanvas.d.ts +15 -0
- package/dist/display/blocks/diff/DiffCanvas.js +20 -0
- package/dist/display/blocks/generic/GenericStructuredBlock.d.ts +24 -0
- package/dist/display/blocks/generic/GenericStructuredBlock.js +53 -0
- package/dist/display/blocks/generic/StructuredValueTabs.d.ts +21 -0
- package/dist/display/blocks/generic/StructuredValueTabs.js +124 -0
- package/dist/display/blocks/generic/tile-actions-slot.d.ts +39 -0
- package/dist/display/blocks/generic/tile-actions-slot.js +33 -0
- package/dist/display/blocks/images/ImageBlock.d.ts +8 -0
- package/dist/display/blocks/images/ImageBlock.js +265 -0
- package/dist/display/blocks/json/JsonBlock.d.ts +34 -0
- package/dist/display/blocks/json/JsonBlock.js +562 -0
- package/dist/display/blocks/json/JsonTableView.d.ts +10 -0
- package/dist/display/blocks/json/JsonTableView.js +173 -0
- package/dist/display/blocks/json/json-compact-stringify.d.ts +25 -0
- package/dist/display/blocks/json/json-compact-stringify.js +52 -0
- package/dist/display/blocks/json/json-tabular-utils.d.ts +65 -0
- package/dist/display/blocks/json/json-tabular-utils.js +121 -0
- package/dist/display/blocks/links/LinkComponent.d.ts +6 -0
- package/dist/display/blocks/links/LinkComponent.js +373 -0
- package/dist/display/blocks/links/LinkComponentWithFetch.d.ts +1 -0
- package/dist/display/blocks/links/LinkComponentWithFetch.js +0 -0
- package/dist/display/blocks/markdown/MarkdownKindBlock.d.ts +48 -0
- package/dist/display/blocks/markdown/MarkdownKindBlock.js +52 -0
- package/dist/display/blocks/markdown-preview/MarkdownPreviewBlock.d.ts +17 -0
- package/dist/display/blocks/markdown-preview/MarkdownPreviewBlock.js +70 -0
- package/dist/display/blocks/mermaid/MermaidBlock.d.ts +19 -0
- package/dist/display/blocks/mermaid/MermaidBlock.js +386 -0
- package/dist/display/blocks/search-replace/SearchReplaceBlock.d.ts +50 -0
- package/dist/display/blocks/search-replace/SearchReplaceBlock.js +71 -0
- package/dist/display/blocks/svg/SvgBlock.d.ts +8 -0
- package/dist/display/blocks/svg/SvgBlock.js +126 -0
- package/dist/display/blocks/table/StreamingTableRenderer.d.ts +53 -0
- package/dist/display/blocks/table/StreamingTableRenderer.js +907 -0
- package/dist/display/blocks/table/TableRenderPathDiagnostic.d.ts +21 -0
- package/dist/display/blocks/table/TableRenderPathDiagnostic.js +79 -0
- package/dist/display/blocks/thinking-reasoning/ConsolidatedReasoningVisualization.d.ts +14 -0
- package/dist/display/blocks/thinking-reasoning/ConsolidatedReasoningVisualization.js +15 -0
- package/dist/display/blocks/thinking-reasoning/ReasoningVisualization.d.ts +13 -0
- package/dist/display/blocks/thinking-reasoning/ReasoningVisualization.js +19 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTrace.d.ts +30 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTrace.js +75 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTraceMarkdown.d.ts +13 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingTraceMarkdown.js +48 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingVisualization.d.ts +12 -0
- package/dist/display/blocks/thinking-reasoning/ThinkingVisualization.js +19 -0
- package/dist/display/blocks/toml/TomlBlock.d.ts +7 -0
- package/dist/display/blocks/toml/TomlBlock.js +167 -0
- package/dist/display/blocks/tree/TreeBlock.d.ts +7 -0
- package/dist/display/blocks/tree/TreeBlock.js +163 -0
- package/dist/display/blocks/xml/XmlBlock.d.ts +23 -0
- package/dist/display/blocks/xml/XmlBlock.js +197 -0
- package/dist/display/blocks/xml/readXmlTag.d.ts +1 -0
- package/dist/display/blocks/xml/readXmlTag.js +1 -0
- package/dist/display/blocks/xml/xml-tokenize.d.ts +13 -0
- package/dist/display/blocks/xml/xml-tokenize.js +169 -0
- package/dist/display/blocks/yaml/YamlBlock.d.ts +7 -0
- package/dist/display/blocks/yaml/YamlBlock.js +191 -0
- package/dist/display/chat-markdown/BasicMarkdownContent.d.ts +29 -0
- package/dist/display/chat-markdown/BasicMarkdownContent.js +122 -0
- package/dist/display/chat-markdown/BlockRenderingContext.d.ts +23 -0
- package/dist/display/chat-markdown/BlockRenderingContext.js +17 -0
- package/dist/display/chat-markdown/ConfigurableMarkdownContent.d.ts +172 -0
- package/dist/display/chat-markdown/ConfigurableMarkdownContent.js +649 -0
- package/dist/display/chat-markdown/InlineCodeSnippet.d.ts +19 -0
- package/dist/display/chat-markdown/InlineCodeSnippet.js +146 -0
- package/dist/display/chat-markdown/InlineCodeSnippetKindGate.d.ts +11 -0
- package/dist/display/chat-markdown/InlineCodeSnippetKindGate.js +9 -0
- package/dist/display/chat-markdown/KindTextGate.d.ts +31 -0
- package/dist/display/chat-markdown/KindTextGate.js +60 -0
- package/dist/display/chat-markdown/QuestionnaireLoadingVisualization.d.ts +6 -0
- package/dist/display/chat-markdown/QuestionnaireLoadingVisualization.js +92 -0
- package/dist/display/chat-markdown/block-registry/BlockComponentRegistry.d.ts +72 -0
- package/dist/display/chat-markdown/block-registry/BlockComponentRegistry.js +94 -0
- package/dist/display/chat-markdown/block-registry/BlockRenderer.d.ts +126 -0
- package/dist/display/chat-markdown/block-registry/BlockRenderer.js +473 -0
- package/dist/display/chat-markdown/block-registry/block-dispatch.d.ts +410 -0
- package/dist/display/chat-markdown/block-registry/block-dispatch.js +495 -0
- package/dist/display/chat-markdown/block-registry/json-parse-utils.d.ts +13 -0
- package/dist/display/chat-markdown/block-registry/json-parse-utils.js +236 -0
- package/dist/display/chat-markdown/constants.d.ts +14 -0
- package/dist/display/chat-markdown/constants.js +317 -0
- package/dist/display/chat-markdown/diff-blocks/DiffCollapsible.d.ts +31 -0
- package/dist/display/chat-markdown/diff-blocks/DiffCollapsible.js +62 -0
- package/dist/display/chat-markdown/diff-blocks/DiffLoadingIndicator.d.ts +12 -0
- package/dist/display/chat-markdown/diff-blocks/DiffLoadingIndicator.js +18 -0
- package/dist/display/chat-markdown/diff-blocks/StreamingDiffBlock.d.ts +22 -0
- package/dist/display/chat-markdown/diff-blocks/StreamingDiffBlock.js +130 -0
- package/dist/display/chat-markdown/diff-blocks/diff-style-registry.d.ts +21 -0
- package/dist/display/chat-markdown/diff-blocks/diff-style-registry.js +91 -0
- package/dist/display/chat-markdown/diff-blocks/renderers/SearchReplaceDiffRenderer.d.ts +26 -0
- package/dist/display/chat-markdown/diff-blocks/renderers/SearchReplaceDiffRenderer.js +186 -0
- package/dist/display/chat-markdown/diff-blocks/types.d.ts +56 -0
- package/dist/display/chat-markdown/diff-blocks/types.js +0 -0
- package/dist/display/chat-markdown/internal-handlers/BlockFallback.d.ts +20 -0
- package/dist/display/chat-markdown/internal-handlers/BlockFallback.js +83 -0
- package/dist/display/chat-markdown/internal-handlers/InlineStatusIndicator.d.ts +4 -0
- package/dist/display/chat-markdown/internal-handlers/InlineStatusIndicator.js +16 -0
- package/dist/display/chat-markdown/internal-handlers/MarkdownErrorBoundary.d.ts +17 -0
- package/dist/display/chat-markdown/internal-handlers/MarkdownErrorBoundary.js +40 -0
- package/dist/display/chat-markdown/internal-handlers/PlainTextFallback.d.ts +8 -0
- package/dist/display/chat-markdown/internal-handlers/PlainTextFallback.js +91 -0
- package/dist/display/chat-markdown/internal-handlers/SafeBlockRenderer.d.ts +20 -0
- package/dist/display/chat-markdown/internal-handlers/SafeBlockRenderer.js +72 -0
- package/dist/display/chat-markdown/kind-source-view.d.ts +14 -0
- package/dist/display/chat-markdown/kind-source-view.js +14 -0
- package/dist/display/chat-markdown/matrx-variables/MatrxVariableInline.d.ts +28 -0
- package/dist/display/chat-markdown/matrx-variables/MatrxVariableInline.js +65 -0
- package/dist/display/chat-markdown/progressive-mount.d.ts +18 -0
- package/dist/display/chat-markdown/progressive-mount.js +90 -0
- package/dist/display/chat-markdown/render-block-to-content-block.d.ts +31 -0
- package/dist/display/chat-markdown/render-block-to-content-block.js +32 -0
- package/dist/display/chat-markdown/settle-stream-blocks.d.ts +50 -0
- package/dist/display/chat-markdown/settle-stream-blocks.js +26 -0
- package/dist/display/chat-markdown/stable-blocks.d.ts +15 -0
- package/dist/display/chat-markdown/stable-blocks.js +54 -0
- package/dist/display/chat-markdown/types.d.ts +11 -0
- package/dist/display/chat-markdown/types.js +26 -0
- package/dist/display/specimen/SpecimenContext.d.ts +26 -0
- package/dist/display/specimen/SpecimenContext.js +64 -0
- package/dist/display/tables/MarkdownTable.d.ts +23 -0
- package/dist/display/tables/MarkdownTable.js +769 -0
- package/dist/display/tables/MarkdownTableScrollArea.d.ts +12 -0
- package/dist/display/tables/MarkdownTableScrollArea.js +92 -0
- package/dist/display/tables/SendToGoogleSheetButton.d.ts +19 -0
- package/dist/display/tables/SendToGoogleSheetButton.js +93 -0
- package/dist/display/tables/SendToWorkbookButton.d.ts +24 -0
- package/dist/display/tables/SendToWorkbookButton.js +93 -0
- package/dist/display/tables/TableSaveToMenu.d.ts +16 -0
- package/dist/display/tables/TableSaveToMenu.js +98 -0
- package/dist/display/tables/TableWithSeparatedControls.d.ts +22 -0
- package/dist/display/tables/TableWithSeparatedControls.js +574 -0
- package/dist/display/tables/ViewTableModal.d.ts +14 -0
- package/dist/display/tables/ViewTableModal.js +67 -0
- package/dist/display/tables/editing/ColumnActionsMenu.d.ts +16 -0
- package/dist/display/tables/editing/ColumnActionsMenu.js +80 -0
- package/dist/display/tables/editing/RowActionsMenu.d.ts +16 -0
- package/dist/display/tables/editing/RowActionsMenu.js +80 -0
- package/dist/display/tables/editing/TableEditToolbar.d.ts +15 -0
- package/dist/display/tables/editing/TableEditToolbar.js +63 -0
- package/dist/display/tables/editing/tableMutations.d.ts +50 -0
- package/dist/display/tables/editing/tableMutations.js +148 -0
- package/dist/display/tables/editing/useDoubleClickEdit.d.ts +43 -0
- package/dist/display/tables/editing/useDoubleClickEdit.js +51 -0
- package/dist/display/tables/editing/useTableUndo.d.ts +25 -0
- package/dist/display/tables/editing/useTableUndo.js +17 -0
- package/dist/display/tables/table-action-row.d.ts +8 -0
- package/dist/display/tables/table-action-row.js +31 -0
- package/dist/display/tables/table-viewer.d.ts +13 -0
- package/dist/display/tables/table-viewer.js +18 -0
- package/dist/host/ErrorActions.d.ts +1 -1
- package/dist/host/ErrorNotice.d.ts +10 -0
- package/dist/host/ErrorNotice.js +19 -0
- package/dist/host/app-bindings.d.ts +155 -0
- package/dist/host/app-bindings.js +160 -0
- package/dist/host/diagnostics.d.ts +2 -2
- package/dist/host/diagnostics.js +2 -1
- package/dist/host/tables.d.ts +1 -6
- package/dist/host/types.d.ts +14 -7
- package/dist/levels/RichContent.d.ts +3 -0
- package/dist/levels/RichContent.js +102 -0
- package/dist/levels/RichContentInline.d.ts +28 -0
- package/dist/levels/RichContentInline.js +61 -0
- package/dist/levels/RichContentPreview.d.ts +12 -0
- package/dist/levels/RichContentPreview.js +39 -0
- package/dist/levels/RichContentStandardImpl.d.ts +12 -0
- package/dist/levels/RichContentStandardImpl.js +27 -0
- package/dist/levels/RichContentStaticProse.d.ts +46 -0
- package/dist/levels/RichContentStaticProse.js +100 -0
- package/dist/levels/depth.d.ts +18 -0
- package/dist/levels/depth.js +32 -0
- package/dist/levels/prose/inline-level-elements.d.ts +19 -0
- package/dist/levels/prose/inline-level-elements.js +103 -0
- package/dist/levels/prose/prose-block-elements.d.ts +25 -0
- package/dist/levels/prose/prose-block-elements.js +313 -0
- package/dist/levels/prose/prose-inline-elements.d.ts +13 -0
- package/dist/levels/prose/prose-inline-elements.js +143 -0
- package/dist/levels/prose/prose-prepare.d.ts +50 -0
- package/dist/levels/prose/prose-prepare.js +246 -0
- package/dist/levels/prose/remote-image-policy.d.ts +34 -0
- package/dist/levels/prose/remote-image-policy.js +153 -0
- package/dist/levels/prose/variant-root.d.ts +9 -0
- package/dist/levels/prose/variant-root.js +34 -0
- package/dist/levels/rich-content-types.d.ts +93 -0
- package/dist/levels/rich-content-types.js +4 -0
- package/dist/levels/server/DelimiterViolationReport.d.ts +7 -0
- package/dist/levels/server/DelimiterViolationReport.js +24 -0
- package/dist/levels/server/RichContentServer.d.ts +27 -0
- package/dist/levels/server/RichContentServer.js +97 -0
- package/dist/levels/standard/NestedRichContent.d.ts +7 -0
- package/dist/levels/standard/NestedRichContent.js +70 -0
- package/dist/levels/standard/StandardBlocks.d.ts +13 -0
- package/dist/levels/standard/StandardBlocks.js +239 -0
- package/dist/levels/standard/StandardKindRegion.d.ts +14 -0
- package/dist/levels/standard/StandardKindRegion.js +69 -0
- package/dist/levels/standard/standard-kind-region.d.ts +19 -0
- package/dist/levels/standard/standard-kind-region.js +21 -0
- package/dist/levels/standard/static-standard.d.ts +23 -0
- package/dist/levels/standard/static-standard.js +187 -0
- package/dist/levels/standard/stream-holdback.d.ts +2 -0
- package/dist/levels/standard/stream-holdback.js +77 -0
- package/dist/mermaid/MermaidFullscreen.d.ts +17 -0
- package/dist/mermaid/MermaidFullscreen.js +71 -0
- package/dist/mermaid/MermaidRenderer.d.ts +20 -0
- package/dist/mermaid/MermaidRenderer.js +267 -0
- package/dist/mermaid/MermaidView.d.ts +27 -0
- package/dist/mermaid/MermaidView.js +68 -0
- package/dist/mermaid/MermaidViewport.d.ts +75 -0
- package/dist/mermaid/MermaidViewport.js +286 -0
- package/dist/mermaid/adapters/er.d.ts +10 -0
- package/dist/mermaid/adapters/er.js +205 -0
- package/dist/mermaid/adapters/flowchart.d.ts +17 -0
- package/dist/mermaid/adapters/flowchart.js +634 -0
- package/dist/mermaid/adapters/journey.d.ts +9 -0
- package/dist/mermaid/adapters/journey.js +207 -0
- package/dist/mermaid/adapters/mindmap.d.ts +12 -0
- package/dist/mermaid/adapters/mindmap.js +252 -0
- package/dist/mermaid/adapters/pie.d.ts +7 -0
- package/dist/mermaid/adapters/pie.js +172 -0
- package/dist/mermaid/adapters/quadrant.d.ts +8 -0
- package/dist/mermaid/adapters/quadrant.js +231 -0
- package/dist/mermaid/adapters/register.d.ts +7 -0
- package/dist/mermaid/adapters/register.js +19 -0
- package/dist/mermaid/adapters/sequence.d.ts +8 -0
- package/dist/mermaid/adapters/sequence.js +251 -0
- package/dist/mermaid/adapters/state.d.ts +12 -0
- package/dist/mermaid/adapters/state.js +245 -0
- package/dist/mermaid/adapters/timeline.d.ts +8 -0
- package/dist/mermaid/adapters/timeline.js +245 -0
- package/dist/mermaid/catalog.d.ts +33 -0
- package/dist/mermaid/catalog.js +202 -0
- package/dist/mermaid/diagram-type.d.ts +39 -0
- package/dist/mermaid/diagram-type.js +89 -0
- package/dist/mermaid/export.d.ts +21 -0
- package/dist/mermaid/export.js +112 -0
- package/dist/mermaid/extract-fence.d.ts +15 -0
- package/dist/mermaid/extract-fence.js +22 -0
- package/dist/mermaid/lazy-draw.d.ts +40 -0
- package/dist/mermaid/lazy-draw.js +168 -0
- package/dist/mermaid/model/adapter.d.ts +28 -0
- package/dist/mermaid/model/adapter.js +16 -0
- package/dist/mermaid/model/ops.d.ts +282 -0
- package/dist/mermaid/model/ops.js +9 -0
- package/dist/mermaid/model/round-trip.d.ts +22 -0
- package/dist/mermaid/model/round-trip.js +45 -0
- package/dist/mermaid/model/types.d.ts +271 -0
- package/dist/mermaid/model/types.js +0 -0
- package/dist/mermaid/print-render.d.ts +9 -0
- package/dist/mermaid/print-render.js +39 -0
- package/dist/mermaid/runtime.d.ts +25 -0
- package/dist/mermaid/runtime.js +183 -0
- package/dist/mermaid/sanitize.d.ts +46 -0
- package/dist/mermaid/sanitize.js +234 -0
- package/dist/mermaid/types.d.ts +43 -0
- package/dist/mermaid/types.js +21 -0
- package/dist/mermaid/view/ViewModePane.d.ts +24 -0
- package/dist/mermaid/view/ViewModePane.js +9 -0
- package/dist/utils/client-lazy.d.ts +1 -1
- package/dist/utils/client-lazy.js +4 -1
- package/dist/utils/lifted/DiffView.d.ts +10 -0
- package/dist/utils/lifted/DiffView.js +26 -0
- package/dist/utils/lifted/IconButton.d.ts +24 -0
- package/dist/utils/lifted/IconButton.js +43 -0
- package/dist/utils/lifted/MatrxMiniLoader.d.ts +1 -0
- package/dist/utils/lifted/MatrxMiniLoader.js +8 -0
- package/dist/utils/lifted/ShimmerText.d.ts +5 -0
- package/dist/utils/lifted/ShimmerText.js +21 -0
- package/dist/utils/lifted/SuspenseLoader.d.ts +16 -0
- package/dist/utils/lifted/SuspenseLoader.js +42 -0
- package/dist/utils/lifted/Tooltip.d.ts +20 -0
- package/dist/utils/lifted/Tooltip.js +52 -0
- package/dist/utils/lifted/artifactId.d.ts +34 -0
- package/dist/utils/lifted/artifactId.js +15 -0
- package/dist/utils/lifted/canvasContent.d.ts +63 -0
- package/dist/utils/lifted/canvasContent.js +98 -0
- package/dist/utils/lifted/captureReactError.d.ts +24 -0
- package/dist/utils/lifted/captureReactError.js +28 -0
- package/dist/utils/lifted/chunk-load-recovery.d.ts +25 -0
- package/dist/utils/lifted/chunk-load-recovery.js +36 -0
- package/dist/utils/lifted/code-editor-agent-types.d.ts +6 -0
- package/dist/utils/lifted/code-editor-agent-types.js +0 -0
- package/dist/utils/lifted/code-editor-agents.d.ts +39 -0
- package/dist/utils/lifted/code-editor-agents.js +52 -0
- package/dist/utils/lifted/code-language-extension.d.ts +1 -0
- package/dist/utils/lifted/code-language-extension.js +60 -0
- package/dist/utils/lifted/custom-icons.d.ts +16 -0
- package/dist/utils/lifted/custom-icons.js +47 -0
- package/dist/utils/lifted/durability.d.ts +16 -0
- package/dist/utils/lifted/durability.js +45 -0
- package/dist/utils/lifted/errors.d.ts +30 -0
- package/dist/utils/lifted/errors.js +29 -0
- package/dist/utils/lifted/html-document.d.ts +1 -0
- package/dist/utils/lifted/html-document.js +12 -0
- package/dist/utils/lifted/languageOptions.d.ts +9 -0
- package/dist/utils/lifted/languageOptions.js +52 -0
- package/dist/utils/lifted/languages.d.ts +34 -0
- package/dist/utils/lifted/languages.js +175 -0
- package/dist/utils/lifted/loading-spinner.d.ts +18 -0
- package/dist/utils/lifted/loading-spinner.js +200 -0
- package/dist/utils/lifted/media-refs.d.ts +13 -0
- package/dist/utils/lifted/media-refs.js +27 -0
- package/dist/utils/lifted/scroll-root.d.ts +1 -0
- package/dist/utils/lifted/scroll-root.js +25 -0
- package/dist/utils/lifted/syntax-themes.d.ts +32 -0
- package/dist/utils/lifted/syntax-themes.js +100 -0
- package/dist/utils/lifted/url-utm.d.ts +24 -0
- package/dist/utils/lifted/url-utm.js +66 -0
- package/dist/utils/lifted/use-is-mounted.d.ts +24 -0
- package/dist/utils/lifted/use-is-mounted.js +21 -0
- package/dist/utils/lifted/useToastManager.d.ts +1 -0
- package/dist/utils/lifted/useToastManager.js +7 -0
- package/dist/utils/report-kind-at-raw-renderer.d.ts +19 -0
- package/dist/utils/report-kind-at-raw-renderer.js +32 -0
- package/package.json +48 -10
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
const LATEX_COMMANDS = [
|
|
2
|
+
"alpha",
|
|
3
|
+
"beta",
|
|
4
|
+
"gamma",
|
|
5
|
+
"delta",
|
|
6
|
+
"epsilon",
|
|
7
|
+
"varepsilon",
|
|
8
|
+
"zeta",
|
|
9
|
+
"eta",
|
|
10
|
+
"theta",
|
|
11
|
+
"vartheta",
|
|
12
|
+
"iota",
|
|
13
|
+
"kappa",
|
|
14
|
+
"lambda",
|
|
15
|
+
"mu",
|
|
16
|
+
"nu",
|
|
17
|
+
"xi",
|
|
18
|
+
"pi",
|
|
19
|
+
"varpi",
|
|
20
|
+
"rho",
|
|
21
|
+
"varrho",
|
|
22
|
+
"sigma",
|
|
23
|
+
"varsigma",
|
|
24
|
+
"tau",
|
|
25
|
+
"upsilon",
|
|
26
|
+
"phi",
|
|
27
|
+
"varphi",
|
|
28
|
+
"chi",
|
|
29
|
+
"psi",
|
|
30
|
+
"omega",
|
|
31
|
+
"Gamma",
|
|
32
|
+
"Delta",
|
|
33
|
+
"Theta",
|
|
34
|
+
"Lambda",
|
|
35
|
+
"Xi",
|
|
36
|
+
"Pi",
|
|
37
|
+
"Sigma",
|
|
38
|
+
"Upsilon",
|
|
39
|
+
"Phi",
|
|
40
|
+
"Psi",
|
|
41
|
+
"Omega",
|
|
42
|
+
"frac",
|
|
43
|
+
"dfrac",
|
|
44
|
+
"tfrac",
|
|
45
|
+
"sqrt",
|
|
46
|
+
"sum",
|
|
47
|
+
"prod",
|
|
48
|
+
"int",
|
|
49
|
+
"oint",
|
|
50
|
+
"iint",
|
|
51
|
+
"iiint",
|
|
52
|
+
"lim",
|
|
53
|
+
"sup",
|
|
54
|
+
"inf",
|
|
55
|
+
"max",
|
|
56
|
+
"min",
|
|
57
|
+
"sin",
|
|
58
|
+
"cos",
|
|
59
|
+
"tan",
|
|
60
|
+
"cot",
|
|
61
|
+
"sec",
|
|
62
|
+
"csc",
|
|
63
|
+
"arcsin",
|
|
64
|
+
"arccos",
|
|
65
|
+
"arctan",
|
|
66
|
+
"sinh",
|
|
67
|
+
"cosh",
|
|
68
|
+
"tanh",
|
|
69
|
+
"coth",
|
|
70
|
+
"log",
|
|
71
|
+
"ln",
|
|
72
|
+
"exp",
|
|
73
|
+
"det",
|
|
74
|
+
"dim",
|
|
75
|
+
"ker",
|
|
76
|
+
"rank",
|
|
77
|
+
"deg",
|
|
78
|
+
"infty",
|
|
79
|
+
"nabla",
|
|
80
|
+
"partial",
|
|
81
|
+
"forall",
|
|
82
|
+
"exists",
|
|
83
|
+
"nexists",
|
|
84
|
+
"emptyset",
|
|
85
|
+
"varnothing",
|
|
86
|
+
"cdot",
|
|
87
|
+
"cdots",
|
|
88
|
+
"ldots",
|
|
89
|
+
"vdots",
|
|
90
|
+
"ddots",
|
|
91
|
+
"times",
|
|
92
|
+
"div",
|
|
93
|
+
"pm",
|
|
94
|
+
"mp",
|
|
95
|
+
"leq",
|
|
96
|
+
"geq",
|
|
97
|
+
"le",
|
|
98
|
+
"ge",
|
|
99
|
+
"neq",
|
|
100
|
+
"ne",
|
|
101
|
+
"approx",
|
|
102
|
+
"equiv",
|
|
103
|
+
"sim",
|
|
104
|
+
"simeq",
|
|
105
|
+
"cong",
|
|
106
|
+
"propto",
|
|
107
|
+
"in",
|
|
108
|
+
"notin",
|
|
109
|
+
"subset",
|
|
110
|
+
"supset",
|
|
111
|
+
"subseteq",
|
|
112
|
+
"supseteq",
|
|
113
|
+
"cup",
|
|
114
|
+
"cap",
|
|
115
|
+
"setminus",
|
|
116
|
+
"wedge",
|
|
117
|
+
"vee",
|
|
118
|
+
"neg",
|
|
119
|
+
"oplus",
|
|
120
|
+
"otimes",
|
|
121
|
+
"oslash",
|
|
122
|
+
"rightarrow",
|
|
123
|
+
"leftarrow",
|
|
124
|
+
"leftrightarrow",
|
|
125
|
+
"Rightarrow",
|
|
126
|
+
"Leftarrow",
|
|
127
|
+
"Leftrightarrow",
|
|
128
|
+
"to",
|
|
129
|
+
"gets",
|
|
130
|
+
"mapsto",
|
|
131
|
+
"uparrow",
|
|
132
|
+
"downarrow",
|
|
133
|
+
"updownarrow",
|
|
134
|
+
"left",
|
|
135
|
+
"right",
|
|
136
|
+
"middle",
|
|
137
|
+
"langle",
|
|
138
|
+
"rangle",
|
|
139
|
+
"lfloor",
|
|
140
|
+
"rfloor",
|
|
141
|
+
"lceil",
|
|
142
|
+
"rceil",
|
|
143
|
+
"lbrace",
|
|
144
|
+
"rbrace",
|
|
145
|
+
"hat",
|
|
146
|
+
"tilde",
|
|
147
|
+
"bar",
|
|
148
|
+
"vec",
|
|
149
|
+
"dot",
|
|
150
|
+
"ddot",
|
|
151
|
+
"overline",
|
|
152
|
+
"underline",
|
|
153
|
+
"overbrace",
|
|
154
|
+
"underbrace",
|
|
155
|
+
"widehat",
|
|
156
|
+
"widetilde",
|
|
157
|
+
"text",
|
|
158
|
+
"mathrm",
|
|
159
|
+
"mathbf",
|
|
160
|
+
"mathbb",
|
|
161
|
+
"mathcal",
|
|
162
|
+
"mathit",
|
|
163
|
+
"mathsf",
|
|
164
|
+
"mathtt",
|
|
165
|
+
"mathfrak",
|
|
166
|
+
"displaystyle",
|
|
167
|
+
"textstyle",
|
|
168
|
+
"scriptstyle",
|
|
169
|
+
"scriptscriptstyle",
|
|
170
|
+
"boldmath",
|
|
171
|
+
"boldsymbol",
|
|
172
|
+
"begin",
|
|
173
|
+
"end",
|
|
174
|
+
"quad",
|
|
175
|
+
"qquad",
|
|
176
|
+
"binom",
|
|
177
|
+
"choose",
|
|
178
|
+
"over",
|
|
179
|
+
"atop",
|
|
180
|
+
"limits",
|
|
181
|
+
"nolimits",
|
|
182
|
+
"prime",
|
|
183
|
+
"circ",
|
|
184
|
+
"bullet",
|
|
185
|
+
"angle",
|
|
186
|
+
"perp",
|
|
187
|
+
"parallel",
|
|
188
|
+
"dagger",
|
|
189
|
+
"ddagger",
|
|
190
|
+
"star",
|
|
191
|
+
"ast",
|
|
192
|
+
"Re",
|
|
193
|
+
"Im",
|
|
194
|
+
"hbar",
|
|
195
|
+
"ell",
|
|
196
|
+
"wp"
|
|
197
|
+
];
|
|
198
|
+
function preprocessJsonContent(jsonString) {
|
|
199
|
+
const input = typeof jsonString === "string" ? jsonString : String(jsonString);
|
|
200
|
+
try {
|
|
201
|
+
JSON.parse(input);
|
|
202
|
+
return input;
|
|
203
|
+
} catch {
|
|
204
|
+
try {
|
|
205
|
+
let fixed = input;
|
|
206
|
+
fixed = fixed.replace(/"([^"\\]*(\\.[^"\\]*)*)"/g, (match, content) => {
|
|
207
|
+
let fixedContent = typeof content === "string" ? content : "";
|
|
208
|
+
try {
|
|
209
|
+
for (const cmd of LATEX_COMMANDS) {
|
|
210
|
+
const pattern = new RegExp(`(?<!\\\\)\\\\(${cmd})`, "g");
|
|
211
|
+
fixedContent = fixedContent.replace(pattern, "\\\\$1");
|
|
212
|
+
}
|
|
213
|
+
return `"${fixedContent}"`;
|
|
214
|
+
} catch {
|
|
215
|
+
return match;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
JSON.parse(fixed);
|
|
219
|
+
return fixed;
|
|
220
|
+
} catch {
|
|
221
|
+
return input;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function safeJsonParse(jsonString) {
|
|
226
|
+
try {
|
|
227
|
+
const preprocessed = preprocessJsonContent(jsonString);
|
|
228
|
+
return JSON.parse(preprocessed);
|
|
229
|
+
} catch {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export {
|
|
234
|
+
preprocessJsonContent,
|
|
235
|
+
safeJsonParse
|
|
236
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const thinkingFragments: string[][];
|
|
2
|
+
export declare const aiProcessText: {
|
|
3
|
+
requestAnalysis: string[];
|
|
4
|
+
missingInformation: string[];
|
|
5
|
+
reasonableAssumptions: string[];
|
|
6
|
+
logicalSteps: string[];
|
|
7
|
+
potentialPitfalls: string[];
|
|
8
|
+
readyToRespond: string[];
|
|
9
|
+
preparingQuestionsToAsk: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare const tagMappings: Record<string, RegExp>;
|
|
12
|
+
export declare function getRandomElement<T>(array: T[]): T;
|
|
13
|
+
export declare function getThinkingDisplayText(text: string): string | null;
|
|
14
|
+
export declare function identifyTagType(text: string): string | null;
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
const thinkingFragments = [
|
|
2
|
+
// Step 0: ### Request Analysis
|
|
3
|
+
[
|
|
4
|
+
"Analyzing your input...",
|
|
5
|
+
"Decoding your message...",
|
|
6
|
+
"Understanding your request...",
|
|
7
|
+
"Interpreting what you've said...",
|
|
8
|
+
"Breaking down your query...",
|
|
9
|
+
"Let me see what you're asking...",
|
|
10
|
+
"Taking a closer look at your words...",
|
|
11
|
+
"Processing your input data...",
|
|
12
|
+
"Evaluating your statement...",
|
|
13
|
+
"Getting to the heart of your question...",
|
|
14
|
+
"Deciphering your cryptic message... just kidding!",
|
|
15
|
+
"Input received. Commencing analysis.",
|
|
16
|
+
"Let me put on my thinking cap for this one.",
|
|
17
|
+
"Analyzing... please don't tell me it's another 'why is the sky blue?'",
|
|
18
|
+
"Initiating deep analysis mode."
|
|
19
|
+
],
|
|
20
|
+
// Step 1: Considering context
|
|
21
|
+
[
|
|
22
|
+
"Considering the context...",
|
|
23
|
+
"Looking at the bigger picture...",
|
|
24
|
+
"Taking into account previous interactions...",
|
|
25
|
+
"Weighing the surrounding information...",
|
|
26
|
+
"Factoring in the background...",
|
|
27
|
+
"Context is key, so let's see...",
|
|
28
|
+
"Putting your input in perspective...",
|
|
29
|
+
"Considering all angles...",
|
|
30
|
+
"Contextualizing your query...",
|
|
31
|
+
"Seeing how this fits into the conversation...",
|
|
32
|
+
"Context is everything, right?",
|
|
33
|
+
"Taking a step back to see the whole picture.",
|
|
34
|
+
"Considering the context... it's like detective work.",
|
|
35
|
+
"Contextual analysis in progress.",
|
|
36
|
+
"Looking at the conversation history... interesting."
|
|
37
|
+
],
|
|
38
|
+
// Step 2: Generating draft
|
|
39
|
+
[
|
|
40
|
+
"Generating a draft response...",
|
|
41
|
+
"Sketching out some ideas...",
|
|
42
|
+
"Putting together a preliminary answer...",
|
|
43
|
+
"Crafting an initial reply...",
|
|
44
|
+
"Formulating a rough draft...",
|
|
45
|
+
"Brainstorming possible solutions...",
|
|
46
|
+
"Assembling the first version...",
|
|
47
|
+
"Creating a starting point...",
|
|
48
|
+
"Generating initial thoughts...",
|
|
49
|
+
"Laying the groundwork for an answer...",
|
|
50
|
+
"Drafting a response... hope it's not too drafty!",
|
|
51
|
+
"Generating ideas faster than a caffeinated squirrel.",
|
|
52
|
+
"Putting pen to paper... metaphorically speaking.",
|
|
53
|
+
"Creating a draft that's rough around the edges.",
|
|
54
|
+
"Draft in progress... stay tuned."
|
|
55
|
+
],
|
|
56
|
+
// Step 3: Refining steps
|
|
57
|
+
[
|
|
58
|
+
"Refining the steps...",
|
|
59
|
+
"Polishing the process...",
|
|
60
|
+
"Fine-tuning the approach...",
|
|
61
|
+
"Improving the method...",
|
|
62
|
+
"Sharpening the strategy...",
|
|
63
|
+
"Enhancing the plan...",
|
|
64
|
+
"Optimizing the workflow...",
|
|
65
|
+
"Smoothing out the details...",
|
|
66
|
+
"Perfecting the sequence...",
|
|
67
|
+
"Making the steps more efficient...",
|
|
68
|
+
"Refining like a fine wine... or a fine AI.",
|
|
69
|
+
"Polishing the steps until they shine.",
|
|
70
|
+
"Making sure the process is smoother than a jazz solo.",
|
|
71
|
+
"Refinement in action.",
|
|
72
|
+
"Tweaking and tuning for perfection."
|
|
73
|
+
],
|
|
74
|
+
// Step 4: Checking constraints
|
|
75
|
+
[
|
|
76
|
+
"Checking constraints...",
|
|
77
|
+
"Ensuring all rules are followed...",
|
|
78
|
+
"Verifying limitations...",
|
|
79
|
+
"Making sure we're within bounds...",
|
|
80
|
+
"Confirming compliance with guidelines...",
|
|
81
|
+
"Double-checking restrictions...",
|
|
82
|
+
"Assessing the boundaries...",
|
|
83
|
+
"Validating against constraints...",
|
|
84
|
+
"Ensuring feasibility...",
|
|
85
|
+
"Checking for any roadblocks...",
|
|
86
|
+
"Constraints? More like guidelines, am I right? Just kidding, checking them now.",
|
|
87
|
+
"Ensuring we're playing by the rules.",
|
|
88
|
+
"Checking the fine print.",
|
|
89
|
+
"Making sure we don't break any AI laws.",
|
|
90
|
+
"Constraint verification underway."
|
|
91
|
+
],
|
|
92
|
+
// Step 5: Structuring thoughts
|
|
93
|
+
[
|
|
94
|
+
"Structuring thoughts...",
|
|
95
|
+
"Organizing ideas...",
|
|
96
|
+
"Arranging the response...",
|
|
97
|
+
"Putting thoughts in order...",
|
|
98
|
+
"Building a coherent structure...",
|
|
99
|
+
"Shaping the answer...",
|
|
100
|
+
"Forming a logical flow...",
|
|
101
|
+
"Constructing the narrative...",
|
|
102
|
+
"Assembling the pieces...",
|
|
103
|
+
"Creating a clear framework...",
|
|
104
|
+
"Organizing thoughts like a librarian on a mission.",
|
|
105
|
+
"Structuring the response for maximum clarity.",
|
|
106
|
+
"Putting ideas in their proper places.",
|
|
107
|
+
"Creating a thought architecture.",
|
|
108
|
+
"Arranging the answer like a puzzle."
|
|
109
|
+
],
|
|
110
|
+
// Step 6: Cross-referencing
|
|
111
|
+
[
|
|
112
|
+
"Cross-referencing information...",
|
|
113
|
+
"Checking against known data...",
|
|
114
|
+
"Comparing with existing knowledge...",
|
|
115
|
+
"Verifying with sources...",
|
|
116
|
+
"Looking for corroboration...",
|
|
117
|
+
"Ensuring consistency...",
|
|
118
|
+
"Matching with relevant facts...",
|
|
119
|
+
"Consulting the knowledge base...",
|
|
120
|
+
"Cross-checking details...",
|
|
121
|
+
"Seeking supporting evidence...",
|
|
122
|
+
"Cross-referencing like a boss.",
|
|
123
|
+
"Checking the facts, because accuracy matters.",
|
|
124
|
+
"Diving into the data pool.",
|
|
125
|
+
"Cross-referencing with the speed of light.",
|
|
126
|
+
"Ensuring everything adds up."
|
|
127
|
+
],
|
|
128
|
+
// Step 7: Finalizing chain
|
|
129
|
+
[
|
|
130
|
+
"Finalizing the chain of thought...",
|
|
131
|
+
"Putting the finishing touches...",
|
|
132
|
+
"Wrapping up the response...",
|
|
133
|
+
"Completing the answer...",
|
|
134
|
+
"Polishing the final draft...",
|
|
135
|
+
"Ensuring everything ties together...",
|
|
136
|
+
"Making sure it's ready for you...",
|
|
137
|
+
"Double-checking for accuracy...",
|
|
138
|
+
"Preparing to present the solution...",
|
|
139
|
+
"Almost there, just a moment...",
|
|
140
|
+
"Finalizing... almost as satisfying as hitting 'send' on an email.",
|
|
141
|
+
"Putting the final touches, like an artist signing their work.",
|
|
142
|
+
"Wrapping it up with a bow.",
|
|
143
|
+
"Making sure it's perfect before it reaches you.",
|
|
144
|
+
"Final checks complete. Ready to roll."
|
|
145
|
+
]
|
|
146
|
+
];
|
|
147
|
+
const aiProcessText = {
|
|
148
|
+
requestAnalysis: [
|
|
149
|
+
"Analyzing your input...",
|
|
150
|
+
"Processing your request...",
|
|
151
|
+
"Examining your query...",
|
|
152
|
+
"Interpreting your message...",
|
|
153
|
+
"Evaluating your request parameters...",
|
|
154
|
+
"Parsing your input data...",
|
|
155
|
+
"Conducting initial analysis...",
|
|
156
|
+
"Identifying key components of your request...",
|
|
157
|
+
"Assessing the scope of your query...",
|
|
158
|
+
"Determining the nature of your request...",
|
|
159
|
+
"Systematically reviewing your input...",
|
|
160
|
+
"Extracting essential elements from your query...",
|
|
161
|
+
"Categorizing the components of your request...",
|
|
162
|
+
"Structuring your query for optimal processing...",
|
|
163
|
+
"Performing preliminary analysis...",
|
|
164
|
+
"Breaking down your request into manageable parts...",
|
|
165
|
+
"Deciphering your cryptic message... just kidding!",
|
|
166
|
+
"Let me put on my thinking cap for this one.",
|
|
167
|
+
"Analyzing... please hold while I process this.",
|
|
168
|
+
"Running your input through my neural pathways..."
|
|
169
|
+
],
|
|
170
|
+
missingInformation: [
|
|
171
|
+
"Identifying potential information gaps...",
|
|
172
|
+
"Assessing completeness of provided data...",
|
|
173
|
+
"Determining if additional context is required...",
|
|
174
|
+
"Evaluating information sufficiency...",
|
|
175
|
+
"Checking for necessary contextual elements...",
|
|
176
|
+
"Verifying I have all required parameters...",
|
|
177
|
+
"Scanning for critical missing variables...",
|
|
178
|
+
"Reviewing the completeness of your query...",
|
|
179
|
+
"Analyzing whether supplementary information is needed...",
|
|
180
|
+
"Examining if clarification is necessary...",
|
|
181
|
+
"Confirming data completeness for accurate processing...",
|
|
182
|
+
"Determining if essential details are absent...",
|
|
183
|
+
"Assessing if I have adequate information to proceed...",
|
|
184
|
+
"Hmm, feels like there's a piece of the puzzle missing...",
|
|
185
|
+
"Hold on, I might need a bit more to work with..."
|
|
186
|
+
],
|
|
187
|
+
reasonableAssumptions: [
|
|
188
|
+
"Establishing reasonable parameters based on available information...",
|
|
189
|
+
"Formulating evidence-based assumptions...",
|
|
190
|
+
"Deriving logical inferences from provided data...",
|
|
191
|
+
"Establishing working hypotheses where information is limited...",
|
|
192
|
+
"Applying standard assumptions within this context...",
|
|
193
|
+
"Making informed judgments where details are unspecified...",
|
|
194
|
+
"Drawing reasonable conclusions from context...",
|
|
195
|
+
"Utilizing domain knowledge to fill information gaps...",
|
|
196
|
+
"Implementing logical assumptions where appropriate...",
|
|
197
|
+
"Establishing baseline parameters for processing...",
|
|
198
|
+
"Determining rational defaults based on your query...",
|
|
199
|
+
"Inferring contextual elements from available data...",
|
|
200
|
+
"Filling in the blanks with some safe bets...",
|
|
201
|
+
"Let's see what I can reasonably infer here..."
|
|
202
|
+
],
|
|
203
|
+
logicalSteps: [
|
|
204
|
+
"Developing a structured approach...",
|
|
205
|
+
"Establishing a systematic methodology...",
|
|
206
|
+
"Formulating a sequential analysis framework...",
|
|
207
|
+
"Creating a logical progression for addressing your query...",
|
|
208
|
+
"Organizing analytical steps in optimal sequence...",
|
|
209
|
+
"Mapping the solution pathway...",
|
|
210
|
+
"Constructing a hierarchical problem-solving structure...",
|
|
211
|
+
"Defining process parameters and execution order...",
|
|
212
|
+
"Establishing procedural framework for analysis...",
|
|
213
|
+
"Developing a step-by-step analytical approach...",
|
|
214
|
+
"Determining optimal processing sequence...",
|
|
215
|
+
"Structuring response components in logical order...",
|
|
216
|
+
"Breaking this down into bite-sized pieces...",
|
|
217
|
+
"Walking through this one step at a time...",
|
|
218
|
+
"Building my response brick by brick..."
|
|
219
|
+
],
|
|
220
|
+
potentialPitfalls: [
|
|
221
|
+
"Identifying potential analytical challenges...",
|
|
222
|
+
"Recognizing possible interpretation errors...",
|
|
223
|
+
"Assessing risk factors in analysis process...",
|
|
224
|
+
"Examining potential sources of misinterpretation...",
|
|
225
|
+
"Evaluating possible logical fallacies to avoid...",
|
|
226
|
+
"Determining areas requiring additional verification...",
|
|
227
|
+
"Identifying ambiguities that could affect accuracy...",
|
|
228
|
+
"Recognizing limitations in available information...",
|
|
229
|
+
"Considering alternative interpretations to prevent bias...",
|
|
230
|
+
"Checking for contextual nuances that affect meaning...",
|
|
231
|
+
"Evaluating edge cases that may impact analysis...",
|
|
232
|
+
"Identifying assumptions that require validation...",
|
|
233
|
+
"Watching out for common misunderstandings...",
|
|
234
|
+
"Double-checking I don't go off track...",
|
|
235
|
+
"Making sure I don't miss the obvious..."
|
|
236
|
+
],
|
|
237
|
+
readyToRespond: [
|
|
238
|
+
"Analysis complete, preparing response...",
|
|
239
|
+
"Processing finalized, generating answer...",
|
|
240
|
+
"Information synthesis complete, formulating response...",
|
|
241
|
+
"Analysis framework established, proceeding to answer...",
|
|
242
|
+
"Parameters verified, moving to response phase...",
|
|
243
|
+
"Information processing complete, generating solution...",
|
|
244
|
+
"All factors considered, preparing comprehensive response...",
|
|
245
|
+
"Analysis concluded, formulating optimal answer...",
|
|
246
|
+
"Processing complete, initiating response generation...",
|
|
247
|
+
"Information assessment finalized, preparing response...",
|
|
248
|
+
"Query fully analyzed, proceeding with answer...",
|
|
249
|
+
"Analysis complete, synthesizing response elements...",
|
|
250
|
+
"Evaluation finalized, generating appropriate response...",
|
|
251
|
+
"All systems go\u2014I've got this!",
|
|
252
|
+
"Fully equipped to tackle your request..."
|
|
253
|
+
],
|
|
254
|
+
preparingQuestionsToAsk: [
|
|
255
|
+
"Formulating clarification queries...",
|
|
256
|
+
"Developing targeted follow-up questions...",
|
|
257
|
+
"Identifying specific information requirements...",
|
|
258
|
+
"Preparing precise queries to address information gaps...",
|
|
259
|
+
"Constructing questions to resolve ambiguities...",
|
|
260
|
+
"Developing inquiries to enhance context understanding...",
|
|
261
|
+
"Creating structured questions for additional data...",
|
|
262
|
+
"Formulating queries to verify assumptions...",
|
|
263
|
+
"Developing targeted questions to complete information set...",
|
|
264
|
+
"Preparing inquiries to address critical unknowns...",
|
|
265
|
+
"Designing questions to fill identified knowledge gaps...",
|
|
266
|
+
"Constructing queries to resolve contextual uncertainties...",
|
|
267
|
+
"Formulating questions to establish necessary parameters...",
|
|
268
|
+
"Getting ready to probe for details...",
|
|
269
|
+
"Thinking through what I need to ask next..."
|
|
270
|
+
]
|
|
271
|
+
};
|
|
272
|
+
const tagMappings = {
|
|
273
|
+
// Request Analysis - matches variations like "Analysis", "Analyzing", "Initial Analysis", etc.
|
|
274
|
+
requestAnalysis: /###\s*(Request|Initial|Input|Query)?\s*(Analysis|Analyzing|Examining|Processing|Understanding|Interpreting)\b.*?:/i,
|
|
275
|
+
// Missing Information - matches variations like "Information Missing", "Missing Context", etc.
|
|
276
|
+
missingInformation: /###\s*(Missing|Lacking|Absent|Needed|Required|Additional)?\s*(Information|Context|Data|Details|Input)\b.*?:/i,
|
|
277
|
+
// Reasonable Assumptions - matches variations including "Assumptions", "What I can assume", etc.
|
|
278
|
+
reasonableAssumptions: /###\s*(Reasonable|Logical|Safe|Working|Valid)?\s*(Assumptions|Inferences|Presumptions|Suppositions)\b.*?:/i,
|
|
279
|
+
// Logical Steps - matches variations including "Plan", "Approach", "Method", etc.
|
|
280
|
+
logicalSteps: /###\s*(Logical|Systematic|Step-by-Step|Sequential|Methodical)?\s*(Steps|Plan|Approach|Process|Method|Pathway|Framework)\b.*?:/i,
|
|
281
|
+
// Potential Pitfalls - matches variations including "Risks", "Challenges", "Issues to Avoid", etc.
|
|
282
|
+
potentialPitfalls: /###\s*(Potential|Possible|Likely|Common)?\s*(Pitfalls|Mistakes|Errors|Risks|Challenges|Issues|Traps)\b.*?:/i,
|
|
283
|
+
// Ready To Respond - matches variations of readiness statements
|
|
284
|
+
readyToRespond: /###\s*(I\s*(have|possess)\s*(everything|all|sufficient)\s*(I\s*need|necessary|required)|Ready\s*to\s*(respond|answer|proceed)|Analysis\s*complete|Processing\s*complete)\b.*?[.:]?/i,
|
|
285
|
+
// Preparing Questions - matches variations of needing more information
|
|
286
|
+
preparingQuestionsToAsk: /###\s*(I\s*(am|need|require)\s*(missing|lacking|seeking)\s*(critical|important|additional|more|further)\s*(information|details|context)|Need\s*to\s*ask|Questions\s*to\s*ask|Further\s*clarification\s*needed)\b.*?[.:]?/i
|
|
287
|
+
};
|
|
288
|
+
function getRandomElement(array) {
|
|
289
|
+
return array[Math.floor(Math.random() * array.length)];
|
|
290
|
+
}
|
|
291
|
+
function getThinkingDisplayText(text) {
|
|
292
|
+
for (const [tagType, regex] of Object.entries(tagMappings)) {
|
|
293
|
+
if (regex.test(text)) {
|
|
294
|
+
if (aiProcessText[tagType]) {
|
|
295
|
+
return getRandomElement(aiProcessText[tagType]);
|
|
296
|
+
}
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
function identifyTagType(text) {
|
|
303
|
+
for (const [tagType, regex] of Object.entries(tagMappings)) {
|
|
304
|
+
if (regex.test(text)) {
|
|
305
|
+
return tagType;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
export {
|
|
311
|
+
aiProcessText,
|
|
312
|
+
getRandomElement,
|
|
313
|
+
getThinkingDisplayText,
|
|
314
|
+
identifyTagType,
|
|
315
|
+
tagMappings,
|
|
316
|
+
thinkingFragments
|
|
317
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal VS Code-style Collapsible for Diffs
|
|
3
|
+
*
|
|
4
|
+
* Ultra-tight, professional collapsible component designed specifically
|
|
5
|
+
* for code diffs. Much smaller and more compact than ChatCollapsibleWrapper.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Collapsed preview mode (shows first N lines)
|
|
9
|
+
* - Diff statistics (+/- counts)
|
|
10
|
+
* - Smooth expand/collapse with fade effect
|
|
11
|
+
*/
|
|
12
|
+
import React, { ReactNode } from 'react';
|
|
13
|
+
interface DiffCollapsibleProps {
|
|
14
|
+
icon: ReactNode;
|
|
15
|
+
title: string;
|
|
16
|
+
initialOpen?: boolean;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
additions?: number;
|
|
20
|
+
deletions?: number;
|
|
21
|
+
previewContent?: ReactNode;
|
|
22
|
+
showPreview?: boolean;
|
|
23
|
+
/** Optional element pinned to the right of the header, OUTSIDE the toggle
|
|
24
|
+
* button (so it can be interactive — e.g. an admin chip). */
|
|
25
|
+
headerRight?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Minimal, VS Code-inspired collapsible for diff blocks
|
|
29
|
+
*/
|
|
30
|
+
export declare const DiffCollapsible: React.FC<DiffCollapsibleProps>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { ChevronDown } from "lucide-react";
|
|
5
|
+
import { cn } from "@ai-matrx/design-system";
|
|
6
|
+
import { Button, DisclosureHeader, Badge } from "@ai-matrx/design-system/controls";
|
|
7
|
+
const DiffCollapsible = ({
|
|
8
|
+
icon,
|
|
9
|
+
title,
|
|
10
|
+
initialOpen = false,
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
additions,
|
|
14
|
+
deletions,
|
|
15
|
+
previewContent,
|
|
16
|
+
showPreview = false,
|
|
17
|
+
headerRight
|
|
18
|
+
}) => {
|
|
19
|
+
const [isOpen, setIsOpen] = useState(initialOpen);
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden my-2", className), children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center bg-muted/30", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
DisclosureHeader,
|
|
24
|
+
{
|
|
25
|
+
open: isOpen,
|
|
26
|
+
onClick: () => setIsOpen(!isOpen),
|
|
27
|
+
variant: "label",
|
|
28
|
+
icon,
|
|
29
|
+
title,
|
|
30
|
+
end: additions !== void 0 || deletions !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
+
additions !== void 0 && additions > 0 && /* @__PURE__ */ jsxs(Badge, { tone: "success", children: [
|
|
32
|
+
"+",
|
|
33
|
+
additions
|
|
34
|
+
] }),
|
|
35
|
+
deletions !== void 0 && deletions > 0 && /* @__PURE__ */ jsxs(Badge, { tone: "destructive", children: [
|
|
36
|
+
"-",
|
|
37
|
+
deletions
|
|
38
|
+
] })
|
|
39
|
+
] }) : void 0,
|
|
40
|
+
className: "min-w-0 flex-1"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
headerRight && /* @__PURE__ */ jsx("div", { className: "shrink-0 px-2", children: headerRight })
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
46
|
+
"transition-all duration-200 ease-in-out",
|
|
47
|
+
isOpen ? "max-h-[2000px] opacity-100" : showPreview ? "max-h-32 opacity-100" : "max-h-0 opacity-0"
|
|
48
|
+
), children: isOpen ? (
|
|
49
|
+
// Full content when expanded
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-auto", children })
|
|
51
|
+
) : showPreview && previewContent ? (
|
|
52
|
+
// Preview content when collapsed
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden", children: [
|
|
54
|
+
previewContent,
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-white dark:from-zinc-900 via-white/80 dark:via-zinc-900/80 to-transparent pointer-events-none", children: /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: /* @__PURE__ */ jsx(ChevronDown, {}), onClick: () => setIsOpen(true), "aria-label": "Expand diff", className: "absolute bottom-1 left-1/2 pointer-events-auto w-full" }) })
|
|
56
|
+
] })
|
|
57
|
+
) : null })
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
DiffCollapsible
|
|
62
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal VS Code-like Loading Indicator
|
|
3
|
+
*
|
|
4
|
+
* Sleek, subtle loading state for diff processing
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
interface DiffLoadingIndicatorProps {
|
|
8
|
+
message?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const DiffLoadingIndicator: React.FC<DiffLoadingIndicatorProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@ai-matrx/design-system";
|
|
3
|
+
const DiffLoadingIndicator = ({
|
|
4
|
+
message = "Agent processing...",
|
|
5
|
+
className
|
|
6
|
+
}) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground", className), children: [
|
|
8
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "w-1 h-1 bg-current rounded-full animate-pulse", style: { animationDelay: "0ms" } }),
|
|
10
|
+
/* @__PURE__ */ jsx("div", { className: "w-1 h-1 bg-current rounded-full animate-pulse", style: { animationDelay: "150ms" } }),
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "w-1 h-1 bg-current rounded-full animate-pulse", style: { animationDelay: "300ms" } })
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: message })
|
|
14
|
+
] });
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
DiffLoadingIndicator
|
|
18
|
+
};
|