@adea-ai/ui 0.140.0 → 0.142.0
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/dist/components/composites/appearance-editor/appearance-editor.js +2 -2
- package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +1 -1
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +56 -0
- package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -0
- package/dist/components/composites/chain-of-thought/chain-of-thought.js +117 -0
- package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -0
- package/dist/components/composites/chain-of-thought/index.d.ts +2 -0
- package/dist/components/composites/chain-of-thought/index.d.ts.map +1 -0
- package/dist/components/composites/chain-of-thought/index.js +2 -0
- package/dist/components/composites/chat/chat.d.ts +67 -0
- package/dist/components/composites/chat/chat.d.ts.map +1 -0
- package/dist/components/composites/chat/chat.js +179 -0
- package/dist/components/composites/chat/chat.js.map +1 -0
- package/dist/components/composites/chat/index.d.ts +2 -0
- package/dist/components/composites/chat/index.d.ts.map +1 -0
- package/dist/components/composites/chat/index.js +2 -0
- package/dist/components/composites/checkpoint/checkpoint-model.d.ts +34 -0
- package/dist/components/composites/checkpoint/checkpoint-model.d.ts.map +1 -0
- package/dist/components/composites/checkpoint/checkpoint-model.js +48 -0
- package/dist/components/composites/checkpoint/checkpoint-model.js.map +1 -0
- package/dist/components/composites/checkpoint/checkpoint.d.ts +48 -0
- package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -0
- package/dist/components/composites/checkpoint/checkpoint.js +160 -0
- package/dist/components/composites/checkpoint/checkpoint.js.map +1 -0
- package/dist/components/composites/checkpoint/index.d.ts +3 -0
- package/dist/components/composites/checkpoint/index.d.ts.map +1 -0
- package/dist/components/composites/checkpoint/index.js +3 -0
- package/dist/components/composites/confirmation/confirmation-model.d.ts +45 -0
- package/dist/components/composites/confirmation/confirmation-model.d.ts.map +1 -0
- package/dist/components/composites/confirmation/confirmation-model.js +51 -0
- package/dist/components/composites/confirmation/confirmation-model.js.map +1 -0
- package/dist/components/composites/confirmation/confirmation.d.ts +72 -0
- package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -0
- package/dist/components/composites/confirmation/confirmation.js +300 -0
- package/dist/components/composites/confirmation/confirmation.js.map +1 -0
- package/dist/components/composites/confirmation/index.d.ts +3 -0
- package/dist/components/composites/confirmation/index.d.ts.map +1 -0
- package/dist/components/composites/confirmation/index.js +3 -0
- package/dist/components/composites/context/context-model.d.ts +69 -0
- package/dist/components/composites/context/context-model.d.ts.map +1 -0
- package/dist/components/composites/context/context-model.js +122 -0
- package/dist/components/composites/context/context-model.js.map +1 -0
- package/dist/components/composites/context/context.d.ts +38 -0
- package/dist/components/composites/context/context.d.ts.map +1 -0
- package/dist/components/composites/context/context.js +234 -0
- package/dist/components/composites/context/context.js.map +1 -0
- package/dist/components/composites/context/index.d.ts +3 -0
- package/dist/components/composites/context/index.d.ts.map +1 -0
- package/dist/components/composites/context/index.js +3 -0
- package/dist/components/composites/file-tree/build-file-tree.d.ts +138 -0
- package/dist/components/composites/file-tree/build-file-tree.d.ts.map +1 -0
- package/dist/components/composites/file-tree/build-file-tree.js +325 -0
- package/dist/components/composites/file-tree/build-file-tree.js.map +1 -0
- package/dist/components/composites/file-tree/file-tree.d.ts +74 -0
- package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -0
- package/dist/components/composites/file-tree/file-tree.js +389 -0
- package/dist/components/composites/file-tree/file-tree.js.map +1 -0
- package/dist/components/composites/file-tree/index.d.ts +3 -0
- package/dist/components/composites/file-tree/index.d.ts.map +1 -0
- package/dist/components/composites/file-tree/index.js +3 -0
- package/dist/components/composites/inline-citation/citation.d.ts +37 -0
- package/dist/components/composites/inline-citation/citation.d.ts.map +1 -0
- package/dist/components/composites/inline-citation/citation.js +52 -0
- package/dist/components/composites/inline-citation/citation.js.map +1 -0
- package/dist/components/composites/inline-citation/index.d.ts +3 -0
- package/dist/components/composites/inline-citation/index.d.ts.map +1 -0
- package/dist/components/composites/inline-citation/index.js +3 -0
- package/dist/components/composites/inline-citation/inline-citation.d.ts +64 -0
- package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -0
- package/dist/components/composites/inline-citation/inline-citation.js +272 -0
- package/dist/components/composites/inline-citation/inline-citation.js.map +1 -0
- package/dist/components/composites/message-scroller/index.d.ts +3 -0
- package/dist/components/composites/message-scroller/index.d.ts.map +1 -0
- package/dist/components/composites/message-scroller/index.js +3 -0
- package/dist/components/composites/message-scroller/message-scroller.d.ts +55 -0
- package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -0
- package/dist/components/composites/message-scroller/message-scroller.js +201 -0
- package/dist/components/composites/message-scroller/message-scroller.js.map +1 -0
- package/dist/components/composites/message-scroller/scroll-anchor.d.ts +66 -0
- package/dist/components/composites/message-scroller/scroll-anchor.d.ts.map +1 -0
- package/dist/components/composites/message-scroller/scroll-anchor.js +122 -0
- package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -0
- package/dist/components/composites/model-selector/index.d.ts +3 -0
- package/dist/components/composites/model-selector/index.d.ts.map +1 -0
- package/dist/components/composites/model-selector/index.js +3 -0
- package/dist/components/composites/model-selector/model-selector.d.ts +55 -0
- package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -0
- package/dist/components/composites/model-selector/model-selector.js +490 -0
- package/dist/components/composites/model-selector/model-selector.js.map +1 -0
- package/dist/components/composites/model-selector/models.d.ts +51 -0
- package/dist/components/composites/model-selector/models.d.ts.map +1 -0
- package/dist/components/composites/model-selector/models.js +71 -0
- package/dist/components/composites/model-selector/models.js.map +1 -0
- package/dist/components/composites/plan/index.d.ts +2 -0
- package/dist/components/composites/plan/index.d.ts.map +1 -0
- package/dist/components/composites/plan/index.js +2 -0
- package/dist/components/composites/plan/plan.d.ts +61 -0
- package/dist/components/composites/plan/plan.d.ts.map +1 -0
- package/dist/components/composites/plan/plan.js +130 -0
- package/dist/components/composites/plan/plan.js.map +1 -0
- package/dist/components/composites/queue/index.d.ts +2 -0
- package/dist/components/composites/queue/index.d.ts.map +1 -0
- package/dist/components/composites/queue/index.js +2 -0
- package/dist/components/composites/queue/queue.d.ts +77 -0
- package/dist/components/composites/queue/queue.d.ts.map +1 -0
- package/dist/components/composites/queue/queue.js +271 -0
- package/dist/components/composites/queue/queue.js.map +1 -0
- package/dist/components/composites/reasoning/index.d.ts +2 -0
- package/dist/components/composites/reasoning/index.d.ts.map +1 -0
- package/dist/components/composites/reasoning/index.js +2 -0
- package/dist/components/composites/reasoning/reasoning.d.ts +62 -0
- package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -0
- package/dist/components/composites/reasoning/reasoning.js +156 -0
- package/dist/components/composites/reasoning/reasoning.js.map +1 -0
- package/dist/components/composites/sources/index.d.ts +3 -0
- package/dist/components/composites/sources/index.d.ts.map +1 -0
- package/dist/components/composites/sources/index.js +3 -0
- package/dist/components/composites/sources/source.d.ts +46 -0
- package/dist/components/composites/sources/source.d.ts.map +1 -0
- package/dist/components/composites/sources/source.js +74 -0
- package/dist/components/composites/sources/source.js.map +1 -0
- package/dist/components/composites/sources/sources.d.ts +45 -0
- package/dist/components/composites/sources/sources.d.ts.map +1 -0
- package/dist/components/composites/sources/sources.js +175 -0
- package/dist/components/composites/sources/sources.js.map +1 -0
- package/dist/components/composites/stack-trace/index.d.ts +3 -0
- package/dist/components/composites/stack-trace/index.d.ts.map +1 -0
- package/dist/components/composites/stack-trace/index.js +3 -0
- package/dist/components/composites/stack-trace/parse-stack-trace.d.ts +118 -0
- package/dist/components/composites/stack-trace/parse-stack-trace.d.ts.map +1 -0
- package/dist/components/composites/stack-trace/parse-stack-trace.js +376 -0
- package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -0
- package/dist/components/composites/stack-trace/stack-trace.d.ts +63 -0
- package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -0
- package/dist/components/composites/stack-trace/stack-trace.js +491 -0
- package/dist/components/composites/stack-trace/stack-trace.js.map +1 -0
- package/dist/components/composites/subagent/index.d.ts +2 -0
- package/dist/components/composites/subagent/index.d.ts.map +1 -0
- package/dist/components/composites/subagent/index.js +2 -0
- package/dist/components/composites/subagent/subagent.d.ts +55 -0
- package/dist/components/composites/subagent/subagent.d.ts.map +1 -0
- package/dist/components/composites/subagent/subagent.js +138 -0
- package/dist/components/composites/subagent/subagent.js.map +1 -0
- package/dist/components/composites/suggestion/index.d.ts +2 -0
- package/dist/components/composites/suggestion/index.d.ts.map +1 -0
- package/dist/components/composites/suggestion/index.js +2 -0
- package/dist/components/composites/suggestion/suggestion.d.ts +37 -0
- package/dist/components/composites/suggestion/suggestion.d.ts.map +1 -0
- package/dist/components/composites/suggestion/suggestion.js +100 -0
- package/dist/components/composites/suggestion/suggestion.js.map +1 -0
- package/dist/components/composites/task/index.d.ts +2 -0
- package/dist/components/composites/task/index.d.ts.map +1 -0
- package/dist/components/composites/task/index.js +2 -0
- package/dist/components/composites/task/task.d.ts +96 -0
- package/dist/components/composites/task/task.d.ts.map +1 -0
- package/dist/components/composites/task/task.js +311 -0
- package/dist/components/composites/task/task.js.map +1 -0
- package/dist/components/composites/terminal/ansi.d.ts +101 -0
- package/dist/components/composites/terminal/ansi.d.ts.map +1 -0
- package/dist/components/composites/terminal/ansi.js +544 -0
- package/dist/components/composites/terminal/ansi.js.map +1 -0
- package/dist/components/composites/terminal/index.d.ts +4 -0
- package/dist/components/composites/terminal/index.d.ts.map +1 -0
- package/dist/components/composites/terminal/index.js +4 -0
- package/dist/components/composites/terminal/terminal-model.d.ts +63 -0
- package/dist/components/composites/terminal/terminal-model.d.ts.map +1 -0
- package/dist/components/composites/terminal/terminal-model.js +69 -0
- package/dist/components/composites/terminal/terminal-model.js.map +1 -0
- package/dist/components/composites/terminal/terminal.d.ts +88 -0
- package/dist/components/composites/terminal/terminal.d.ts.map +1 -0
- package/dist/components/composites/terminal/terminal.js +500 -0
- package/dist/components/composites/terminal/terminal.js.map +1 -0
- package/dist/components/composites/test-results/index.d.ts +3 -0
- package/dist/components/composites/test-results/index.d.ts.map +1 -0
- package/dist/components/composites/test-results/index.js +3 -0
- package/dist/components/composites/test-results/test-results-model.d.ts +154 -0
- package/dist/components/composites/test-results/test-results-model.d.ts.map +1 -0
- package/dist/components/composites/test-results/test-results-model.js +252 -0
- package/dist/components/composites/test-results/test-results-model.js.map +1 -0
- package/dist/components/composites/test-results/test-results.d.ts +60 -0
- package/dist/components/composites/test-results/test-results.d.ts.map +1 -0
- package/dist/components/composites/test-results/test-results.js +631 -0
- package/dist/components/composites/test-results/test-results.js.map +1 -0
- package/dist/components/composites/tool/format-tool-value.d.ts +37 -0
- package/dist/components/composites/tool/format-tool-value.d.ts.map +1 -0
- package/dist/components/composites/tool/format-tool-value.js +135 -0
- package/dist/components/composites/tool/format-tool-value.js.map +1 -0
- package/dist/components/composites/tool/index.d.ts +3 -0
- package/dist/components/composites/tool/index.d.ts.map +1 -0
- package/dist/components/composites/tool/index.js +3 -0
- package/dist/components/composites/tool/tool.d.ts +69 -0
- package/dist/components/composites/tool/tool.d.ts.map +1 -0
- package/dist/components/composites/tool/tool.js +214 -0
- package/dist/components/composites/tool/tool.js.map +1 -0
- package/dist/components/composites/update-dialog/update-dialog.js +1 -1
- package/dist/components/conversation/conversation-surface.d.ts +7 -0
- package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
- package/dist/components/conversation/conversation-surface.js +2 -0
- package/dist/components/conversation/conversation-surface.js.map +1 -1
- package/dist/components/conversation/scroll-follow-core.d.ts +24 -0
- package/dist/components/conversation/scroll-follow-core.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow-core.js +23 -1
- package/dist/components/conversation/scroll-follow-core.js.map +1 -1
- package/dist/components/conversation/scroll-follow.d.ts +3 -0
- package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
- package/dist/components/conversation/scroll-follow.js +80 -1
- package/dist/components/conversation/scroll-follow.js.map +1 -1
- package/dist/components/ui/attachment/attachment.d.ts +58 -0
- package/dist/components/ui/attachment/attachment.d.ts.map +1 -0
- package/dist/components/ui/attachment/attachment.js +279 -0
- package/dist/components/ui/attachment/attachment.js.map +1 -0
- package/dist/components/ui/attachment/index.d.ts +2 -0
- package/dist/components/ui/attachment/index.d.ts.map +1 -0
- package/dist/components/ui/attachment/index.js +2 -0
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/bubble/bubble.d.ts +33 -0
- package/dist/components/ui/bubble/bubble.d.ts.map +1 -0
- package/dist/components/ui/bubble/bubble.js +95 -0
- package/dist/components/ui/bubble/bubble.js.map +1 -0
- package/dist/components/ui/bubble/index.d.ts +2 -0
- package/dist/components/ui/bubble/index.d.ts.map +1 -0
- package/dist/components/ui/bubble/index.js +2 -0
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/code-block/code-block.d.ts +56 -3
- package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
- package/dist/components/ui/code-block/code-block.js +231 -50
- package/dist/components/ui/code-block/code-block.js.map +1 -1
- package/dist/components/ui/code-block/index.d.ts +1 -1
- package/dist/components/ui/code-block/index.d.ts.map +1 -1
- package/dist/components/ui/code-block/index.js +2 -2
- package/dist/components/ui/field/number-field.d.ts +21 -4
- package/dist/components/ui/field/number-field.d.ts.map +1 -1
- package/dist/components/ui/field/number-field.js +22 -11
- package/dist/components/ui/field/number-field.js.map +1 -1
- package/dist/components/ui/marker/index.d.ts +2 -0
- package/dist/components/ui/marker/index.d.ts.map +1 -0
- package/dist/components/ui/marker/index.js +2 -0
- package/dist/components/ui/marker/marker.d.ts +35 -0
- package/dist/components/ui/marker/marker.d.ts.map +1 -0
- package/dist/components/ui/marker/marker.js +123 -0
- package/dist/components/ui/marker/marker.js.map +1 -0
- package/dist/components/ui/message/cite-ranges.d.ts +42 -0
- package/dist/components/ui/message/cite-ranges.d.ts.map +1 -0
- package/dist/components/ui/message/cite-ranges.js +105 -0
- package/dist/components/ui/message/cite-ranges.js.map +1 -0
- package/dist/components/ui/message/index.d.ts +4 -0
- package/dist/components/ui/message/index.d.ts.map +1 -0
- package/dist/components/ui/message/index.js +4 -0
- package/dist/components/ui/message/message.d.ts +95 -0
- package/dist/components/ui/message/message.d.ts.map +1 -0
- package/dist/components/ui/message/message.js +443 -0
- package/dist/components/ui/message/message.js.map +1 -0
- package/dist/components/ui/message/parse-message-text.d.ts +93 -0
- package/dist/components/ui/message/parse-message-text.d.ts.map +1 -0
- package/dist/components/ui/message/parse-message-text.js +365 -0
- package/dist/components/ui/message/parse-message-text.js.map +1 -0
- package/dist/components/ui/questionnaire/index.d.ts +2 -0
- package/dist/components/ui/questionnaire/index.d.ts.map +1 -0
- package/dist/components/ui/questionnaire/index.js +2 -0
- package/dist/components/ui/questionnaire/questionnaire.d.ts +83 -0
- package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -0
- package/dist/components/ui/questionnaire/questionnaire.js +470 -0
- package/dist/components/ui/questionnaire/questionnaire.js.map +1 -0
- package/dist/components/ui/status-chip/status-chip.d.ts +1 -1
- package/dist/components/ui/switch/switch.js +11 -11
- package/dist/components/ui/switch/switch.js.map +1 -1
- package/dist/components/ui/trace/index.d.ts +2 -0
- package/dist/components/ui/trace/index.d.ts.map +1 -0
- package/dist/components/ui/trace/index.js +2 -0
- package/dist/components/ui/trace/trace.d.ts +72 -0
- package/dist/components/ui/trace/trace.d.ts.map +1 -0
- package/dist/components/ui/trace/trace.js +340 -0
- package/dist/components/ui/trace/trace.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -5
- package/dist/r/attachment.json +25 -0
- package/dist/r/bubble.json +22 -0
- package/dist/r/chain-of-thought.json +26 -0
- package/dist/r/chat.json +24 -0
- package/dist/r/checkpoint.json +35 -0
- package/dist/r/confirmation.json +34 -0
- package/dist/r/context.json +33 -0
- package/dist/r/file-tree.json +32 -0
- package/dist/r/inline-citation.json +35 -0
- package/dist/r/marker.json +22 -0
- package/dist/r/message-scroller.json +31 -0
- package/dist/r/message.json +33 -0
- package/dist/r/model-selector.json +34 -0
- package/dist/r/plan.json +26 -0
- package/dist/r/questionnaire.json +28 -0
- package/dist/r/queue.json +26 -0
- package/dist/r/reasoning.json +26 -0
- package/dist/r/registry.json +811 -52
- package/dist/r/sources.json +32 -0
- package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +141 -0
- package/dist/r/src/components/composites/chain-of-thought/index.ts +11 -0
- package/dist/r/src/components/composites/chat/chat.tsx +190 -0
- package/dist/r/src/components/composites/chat/index.ts +11 -0
- package/dist/r/src/components/composites/checkpoint/checkpoint-model.ts +71 -0
- package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +214 -0
- package/dist/r/src/components/composites/checkpoint/index.ts +8 -0
- package/dist/r/src/components/composites/confirmation/confirmation-model.ts +83 -0
- package/dist/r/src/components/composites/confirmation/confirmation.tsx +311 -0
- package/dist/r/src/components/composites/confirmation/index.ts +9 -0
- package/dist/r/src/components/composites/context/context-model.ts +168 -0
- package/dist/r/src/components/composites/context/context.tsx +187 -0
- package/dist/r/src/components/composites/context/index.ts +18 -0
- package/dist/r/src/components/composites/file-tree/build-file-tree.ts +456 -0
- package/dist/r/src/components/composites/file-tree/file-tree.tsx +405 -0
- package/dist/r/src/components/composites/file-tree/index.ts +25 -0
- package/dist/r/src/components/composites/inline-citation/citation.ts +78 -0
- package/dist/r/src/components/composites/inline-citation/index.ts +9 -0
- package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +285 -0
- package/dist/r/src/components/composites/message-scroller/index.ts +2 -0
- package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +301 -0
- package/dist/r/src/components/composites/message-scroller/scroll-anchor.ts +170 -0
- package/dist/r/src/components/composites/model-selector/index.ts +14 -0
- package/dist/r/src/components/composites/model-selector/model-selector.tsx +420 -0
- package/dist/r/src/components/composites/model-selector/models.ts +103 -0
- package/dist/r/src/components/composites/plan/index.ts +1 -0
- package/dist/r/src/components/composites/plan/plan.tsx +155 -0
- package/dist/r/src/components/composites/queue/index.ts +10 -0
- package/dist/r/src/components/composites/queue/queue.tsx +264 -0
- package/dist/r/src/components/composites/reasoning/index.ts +1 -0
- package/dist/r/src/components/composites/reasoning/reasoning.tsx +176 -0
- package/dist/r/src/components/composites/sources/index.ts +11 -0
- package/dist/r/src/components/composites/sources/source.ts +116 -0
- package/dist/r/src/components/composites/sources/sources.tsx +163 -0
- package/dist/r/src/components/composites/stack-trace/index.ts +19 -0
- package/dist/r/src/components/composites/stack-trace/parse-stack-trace.ts +507 -0
- package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +395 -0
- package/dist/r/src/components/composites/subagent/index.ts +1 -0
- package/dist/r/src/components/composites/subagent/subagent.tsx +159 -0
- package/dist/r/src/components/composites/suggestion/index.ts +1 -0
- package/dist/r/src/components/composites/suggestion/suggestion.tsx +140 -0
- package/dist/r/src/components/composites/task/index.ts +14 -0
- package/dist/r/src/components/composites/task/task.tsx +317 -0
- package/dist/r/src/components/composites/terminal/ansi.ts +674 -0
- package/dist/r/src/components/composites/terminal/index.ts +20 -0
- package/dist/r/src/components/composites/terminal/terminal-model.ts +111 -0
- package/dist/r/src/components/composites/terminal/terminal.tsx +574 -0
- package/dist/r/src/components/composites/test-results/index.ts +20 -0
- package/dist/r/src/components/composites/test-results/test-results-model.ts +368 -0
- package/dist/r/src/components/composites/test-results/test-results.tsx +586 -0
- package/dist/r/src/components/composites/tool/format-tool-value.ts +221 -0
- package/dist/r/src/components/composites/tool/index.ts +2 -0
- package/dist/r/src/components/composites/tool/tool.tsx +228 -0
- package/dist/r/src/components/conversation/conversation-surface.tsx +9 -0
- package/dist/r/src/components/conversation/scroll-follow-core.ts +31 -0
- package/dist/r/src/components/conversation/scroll-follow.ts +92 -0
- package/dist/r/src/components/ui/attachment/attachment.tsx +282 -0
- package/dist/r/src/components/ui/attachment/index.ts +10 -0
- package/dist/r/src/components/ui/bubble/bubble.tsx +86 -0
- package/dist/r/src/components/ui/bubble/index.ts +1 -0
- package/dist/r/src/components/ui/code-block/code-block.tsx +256 -26
- package/dist/r/src/components/ui/code-block/index.ts +9 -1
- package/dist/r/src/components/ui/field/number-field.tsx +51 -14
- package/dist/r/src/components/ui/marker/index.ts +1 -0
- package/dist/r/src/components/ui/marker/marker.tsx +90 -0
- package/dist/r/src/components/ui/message/cite-ranges.ts +144 -0
- package/dist/r/src/components/ui/message/index.ts +23 -0
- package/dist/r/src/components/ui/message/message.tsx +434 -0
- package/dist/r/src/components/ui/message/parse-message-text.ts +450 -0
- package/dist/r/src/components/ui/questionnaire/index.ts +10 -0
- package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +446 -0
- package/dist/r/src/components/ui/trace/index.ts +9 -0
- package/dist/r/src/components/ui/trace/trace.tsx +334 -0
- package/dist/r/src/styles/base.css +34 -0
- package/dist/r/stack-trace.json +32 -0
- package/dist/r/subagent.json +27 -0
- package/dist/r/suggestion.json +24 -0
- package/dist/r/task.json +28 -0
- package/dist/r/terminal.json +35 -0
- package/dist/r/test-results.json +33 -0
- package/dist/r/tool.json +31 -0
- package/dist/r/trace.json +25 -0
- package/package.json +6 -3
- package/registry.json +811 -52
- package/src/components/composites/chain-of-thought/chain-of-thought.tsx +141 -0
- package/src/components/composites/chain-of-thought/index.ts +11 -0
- package/src/components/composites/chat/chat.tsx +190 -0
- package/src/components/composites/chat/index.ts +11 -0
- package/src/components/composites/checkpoint/checkpoint-model.ts +71 -0
- package/src/components/composites/checkpoint/checkpoint.tsx +214 -0
- package/src/components/composites/checkpoint/index.ts +8 -0
- package/src/components/composites/confirmation/confirmation-model.ts +83 -0
- package/src/components/composites/confirmation/confirmation.tsx +311 -0
- package/src/components/composites/confirmation/index.ts +9 -0
- package/src/components/composites/context/context-model.ts +168 -0
- package/src/components/composites/context/context.tsx +187 -0
- package/src/components/composites/context/index.ts +18 -0
- package/src/components/composites/file-tree/build-file-tree.ts +456 -0
- package/src/components/composites/file-tree/file-tree.tsx +405 -0
- package/src/components/composites/file-tree/index.ts +25 -0
- package/src/components/composites/inline-citation/citation.ts +78 -0
- package/src/components/composites/inline-citation/index.ts +9 -0
- package/src/components/composites/inline-citation/inline-citation.tsx +285 -0
- package/src/components/composites/message-scroller/index.ts +2 -0
- package/src/components/composites/message-scroller/message-scroller.tsx +301 -0
- package/src/components/composites/message-scroller/scroll-anchor.ts +170 -0
- package/src/components/composites/model-selector/index.ts +14 -0
- package/src/components/composites/model-selector/model-selector.tsx +420 -0
- package/src/components/composites/model-selector/models.ts +103 -0
- package/src/components/composites/plan/index.ts +1 -0
- package/src/components/composites/plan/plan.tsx +155 -0
- package/src/components/composites/queue/index.ts +10 -0
- package/src/components/composites/queue/queue.tsx +264 -0
- package/src/components/composites/reasoning/index.ts +1 -0
- package/src/components/composites/reasoning/reasoning.tsx +176 -0
- package/src/components/composites/sources/index.ts +11 -0
- package/src/components/composites/sources/source.ts +116 -0
- package/src/components/composites/sources/sources.tsx +163 -0
- package/src/components/composites/stack-trace/index.ts +19 -0
- package/src/components/composites/stack-trace/parse-stack-trace.ts +507 -0
- package/src/components/composites/stack-trace/stack-trace.tsx +395 -0
- package/src/components/composites/subagent/index.ts +1 -0
- package/src/components/composites/subagent/subagent.tsx +159 -0
- package/src/components/composites/suggestion/index.ts +1 -0
- package/src/components/composites/suggestion/suggestion.tsx +140 -0
- package/src/components/composites/task/index.ts +14 -0
- package/src/components/composites/task/task.tsx +317 -0
- package/src/components/composites/terminal/ansi.ts +674 -0
- package/src/components/composites/terminal/index.ts +20 -0
- package/src/components/composites/terminal/terminal-model.ts +111 -0
- package/src/components/composites/terminal/terminal.tsx +574 -0
- package/src/components/composites/test-results/index.ts +20 -0
- package/src/components/composites/test-results/test-results-model.ts +368 -0
- package/src/components/composites/test-results/test-results.tsx +586 -0
- package/src/components/composites/tool/format-tool-value.ts +221 -0
- package/src/components/composites/tool/index.ts +2 -0
- package/src/components/composites/tool/tool.tsx +228 -0
- package/src/components/conversation/conversation-surface.tsx +9 -0
- package/src/components/conversation/scroll-follow-core.ts +31 -0
- package/src/components/conversation/scroll-follow.ts +92 -0
- package/src/components/ui/attachment/attachment.tsx +282 -0
- package/src/components/ui/attachment/index.ts +10 -0
- package/src/components/ui/bubble/bubble.tsx +86 -0
- package/src/components/ui/bubble/index.ts +1 -0
- package/src/components/ui/code-block/code-block.tsx +256 -26
- package/src/components/ui/code-block/index.ts +9 -1
- package/src/components/ui/field/number-field.tsx +51 -14
- package/src/components/ui/marker/index.ts +1 -0
- package/src/components/ui/marker/marker.tsx +90 -0
- package/src/components/ui/message/cite-ranges.ts +144 -0
- package/src/components/ui/message/index.ts +23 -0
- package/src/components/ui/message/message.tsx +434 -0
- package/src/components/ui/message/parse-message-text.ts +450 -0
- package/src/components/ui/questionnaire/index.ts +10 -0
- package/src/components/ui/questionnaire/questionnaire.tsx +446 -0
- package/src/components/ui/trace/index.ts +9 -0
- package/src/components/ui/trace/trace.tsx +334 -0
- package/src/index.ts +26 -0
- package/src/styles/base.css +34 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The terminal's pure decisions: what its status says, which lines are mounted,
|
|
3
|
+
* and whether the reader is at the end. They live apart from the component so
|
|
4
|
+
* the rules that are easy to get subtly wrong — an off-by-one in "N earlier
|
|
5
|
+
* lines", a tolerance that yanks the reader back to the bottom — have tests.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* What the host knows about the command. Absent means no statement: a terminal
|
|
9
|
+
* handed output with no status does not say whether the command is still running.
|
|
10
|
+
*/
|
|
11
|
+
export type TerminalStatus = {
|
|
12
|
+
state: 'running';
|
|
13
|
+
} | {
|
|
14
|
+
state: 'exited';
|
|
15
|
+
code: number;
|
|
16
|
+
} | {
|
|
17
|
+
state: 'cancelled';
|
|
18
|
+
};
|
|
19
|
+
/** The words for a status, which are also what a screen reader hears. */
|
|
20
|
+
export declare function terminalStatusLabel(status: TerminalStatus): string;
|
|
21
|
+
/** Whether a status is a non-zero exit — the one thing the header tones as a failure. */
|
|
22
|
+
export declare function isFailedExit(status: TerminalStatus | undefined): boolean;
|
|
23
|
+
export type TerminalWindow = Readonly<{
|
|
24
|
+
/** Index of the first mounted finished line. */
|
|
25
|
+
start: number;
|
|
26
|
+
/** Index after the last mounted finished line. */
|
|
27
|
+
end: number;
|
|
28
|
+
/** Retained lines before `start` that "show earlier" can reveal. */
|
|
29
|
+
revealable: number;
|
|
30
|
+
/** Every earlier line not on screen, including those the parser discarded. */
|
|
31
|
+
hidden: number;
|
|
32
|
+
/** Retained finished lines after `end`: output that arrived while the view was parked. */
|
|
33
|
+
later: number;
|
|
34
|
+
/** Lines of the parked view that retention discarded before the reader moved on. */
|
|
35
|
+
evicted: number;
|
|
36
|
+
/** The whole parked view was discarded, so the oldest retained lines are shown instead. */
|
|
37
|
+
lost: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* The slice of the retained lines that is mounted. `limit` is how many finished
|
|
41
|
+
* lines to show; the rest are counted, not rendered, because a terminal that
|
|
42
|
+
* mounts every line of a long build is a frozen page.
|
|
43
|
+
*
|
|
44
|
+
* While the reader follows the tail the slice ends at the newest line. Once they
|
|
45
|
+
* have scrolled away it is *parked*: `anchorEnd` is the number of lines (counting
|
|
46
|
+
* the ones retention already discarded) that existed when they left, and the
|
|
47
|
+
* slice stays ending there while output keeps arriving, so what they are reading
|
|
48
|
+
* does not move under them. If retention discards the lines they were reading,
|
|
49
|
+
* `evicted` says how many, and when all of them are gone `lost` is set and the
|
|
50
|
+
* oldest retained lines are shown, because the nearest thing that still exists
|
|
51
|
+
* is better than a blank box.
|
|
52
|
+
*/
|
|
53
|
+
export declare function terminalWindow(retained: number, dropped: number, limit: number, anchorEnd?: number): TerminalWindow;
|
|
54
|
+
/** The limit after one "show earlier" press: one more page, never past what exists. */
|
|
55
|
+
export declare function revealEarlier(limit: number, page: number, retained: number): number;
|
|
56
|
+
/** Subpixel scroll positions and zoom make "exactly at the bottom" unreliable. */
|
|
57
|
+
export declare const BOTTOM_TOLERANCE_PX = 4;
|
|
58
|
+
/**
|
|
59
|
+
* Whether a scroller is showing its end. This decides whether new output
|
|
60
|
+
* follows the reader: at the bottom it does, anywhere else the view is theirs.
|
|
61
|
+
*/
|
|
62
|
+
export declare function isAtBottom(scrollHeight: number, scrollTop: number, clientHeight: number): boolean;
|
|
63
|
+
//# sourceMappingURL=terminal-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-model.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/terminal/terminal-model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,CAAA;AAE1B,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAIlE;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAExE;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAA;IACf,2FAA2F;IAC3F,IAAI,EAAE,OAAO,CAAA;CACd,CAAC,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,CA8BhB;AAED,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAEpC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAEjG"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region src/components/composites/terminal/terminal-model.ts
|
|
2
|
+
/** The words for a status, which are also what a screen reader hears. */
|
|
3
|
+
function terminalStatusLabel(status) {
|
|
4
|
+
if (status.state === "running") return "Running";
|
|
5
|
+
if (status.state === "cancelled") return "Cancelled";
|
|
6
|
+
return Number.isInteger(status.code) ? `Exited with code ${status.code}` : "Exited";
|
|
7
|
+
}
|
|
8
|
+
/** Whether a status is a non-zero exit — the one thing the header tones as a failure. */
|
|
9
|
+
function isFailedExit(status) {
|
|
10
|
+
return status?.state === "exited" && Number.isInteger(status.code) && status.code !== 0;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The slice of the retained lines that is mounted. `limit` is how many finished
|
|
14
|
+
* lines to show; the rest are counted, not rendered, because a terminal that
|
|
15
|
+
* mounts every line of a long build is a frozen page.
|
|
16
|
+
*
|
|
17
|
+
* While the reader follows the tail the slice ends at the newest line. Once they
|
|
18
|
+
* have scrolled away it is *parked*: `anchorEnd` is the number of lines (counting
|
|
19
|
+
* the ones retention already discarded) that existed when they left, and the
|
|
20
|
+
* slice stays ending there while output keeps arriving, so what they are reading
|
|
21
|
+
* does not move under them. If retention discards the lines they were reading,
|
|
22
|
+
* `evicted` says how many, and when all of them are gone `lost` is set and the
|
|
23
|
+
* oldest retained lines are shown, because the nearest thing that still exists
|
|
24
|
+
* is better than a blank box.
|
|
25
|
+
*/
|
|
26
|
+
function terminalWindow(retained, dropped, limit, anchorEnd) {
|
|
27
|
+
const size = Math.max(1, Math.floor(limit));
|
|
28
|
+
if (anchorEnd === void 0 || anchorEnd >= dropped + retained) {
|
|
29
|
+
const start = Math.max(0, retained - size);
|
|
30
|
+
return {
|
|
31
|
+
start,
|
|
32
|
+
end: retained,
|
|
33
|
+
revealable: start,
|
|
34
|
+
hidden: start + dropped,
|
|
35
|
+
later: 0,
|
|
36
|
+
evicted: 0,
|
|
37
|
+
lost: false
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const wantedStart = Math.max(0, anchorEnd - size);
|
|
41
|
+
const lost = anchorEnd <= dropped;
|
|
42
|
+
const end = lost ? Math.min(retained, size) : anchorEnd - dropped;
|
|
43
|
+
const start = lost ? 0 : Math.max(0, end - size);
|
|
44
|
+
const evicted = lost ? anchorEnd - wantedStart : Math.max(0, Math.min(dropped, anchorEnd) - wantedStart);
|
|
45
|
+
return {
|
|
46
|
+
start,
|
|
47
|
+
end,
|
|
48
|
+
revealable: start,
|
|
49
|
+
hidden: start + dropped,
|
|
50
|
+
later: retained - end,
|
|
51
|
+
evicted,
|
|
52
|
+
lost
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** The limit after one "show earlier" press: one more page, never past what exists. */
|
|
56
|
+
function revealEarlier(limit, page, retained) {
|
|
57
|
+
return Math.min(Math.max(retained, 1), limit + Math.max(1, Math.floor(page)));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Whether a scroller is showing its end. This decides whether new output
|
|
61
|
+
* follows the reader: at the bottom it does, anywhere else the view is theirs.
|
|
62
|
+
*/
|
|
63
|
+
function isAtBottom(scrollHeight, scrollTop, clientHeight) {
|
|
64
|
+
return scrollHeight - scrollTop - clientHeight <= 4;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { isAtBottom, isFailedExit, revealEarlier, terminalStatusLabel, terminalWindow };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=terminal-model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-model.js","names":[],"sources":["../../../../src/components/composites/terminal/terminal-model.ts"],"sourcesContent":["/**\n * The terminal's pure decisions: what its status says, which lines are mounted,\n * and whether the reader is at the end. They live apart from the component so\n * the rules that are easy to get subtly wrong — an off-by-one in \"N earlier\n * lines\", a tolerance that yanks the reader back to the bottom — have tests.\n */\n\n/**\n * What the host knows about the command. Absent means no statement: a terminal\n * handed output with no status does not say whether the command is still running.\n */\nexport type TerminalStatus =\n | { state: 'running' }\n | { state: 'exited'; code: number }\n | { state: 'cancelled' }\n\n/** The words for a status, which are also what a screen reader hears. */\nexport function terminalStatusLabel(status: TerminalStatus): string {\n if (status.state === 'running') return 'Running'\n if (status.state === 'cancelled') return 'Cancelled'\n return Number.isInteger(status.code) ? `Exited with code ${status.code}` : 'Exited'\n}\n\n/** Whether a status is a non-zero exit — the one thing the header tones as a failure. */\nexport function isFailedExit(status: TerminalStatus | undefined): boolean {\n return status?.state === 'exited' && Number.isInteger(status.code) && status.code !== 0\n}\n\nexport type TerminalWindow = Readonly<{\n /** Index of the first mounted finished line. */\n start: number\n /** Index after the last mounted finished line. */\n end: number\n /** Retained lines before `start` that \"show earlier\" can reveal. */\n revealable: number\n /** Every earlier line not on screen, including those the parser discarded. */\n hidden: number\n /** Retained finished lines after `end`: output that arrived while the view was parked. */\n later: number\n /** Lines of the parked view that retention discarded before the reader moved on. */\n evicted: number\n /** The whole parked view was discarded, so the oldest retained lines are shown instead. */\n lost: boolean\n}>\n\n/**\n * The slice of the retained lines that is mounted. `limit` is how many finished\n * lines to show; the rest are counted, not rendered, because a terminal that\n * mounts every line of a long build is a frozen page.\n *\n * While the reader follows the tail the slice ends at the newest line. Once they\n * have scrolled away it is *parked*: `anchorEnd` is the number of lines (counting\n * the ones retention already discarded) that existed when they left, and the\n * slice stays ending there while output keeps arriving, so what they are reading\n * does not move under them. If retention discards the lines they were reading,\n * `evicted` says how many, and when all of them are gone `lost` is set and the\n * oldest retained lines are shown, because the nearest thing that still exists\n * is better than a blank box.\n */\nexport function terminalWindow(\n retained: number,\n dropped: number,\n limit: number,\n anchorEnd?: number\n): TerminalWindow {\n const size = Math.max(1, Math.floor(limit))\n if (anchorEnd === undefined || anchorEnd >= dropped + retained) {\n const start = Math.max(0, retained - size)\n return {\n start,\n end: retained,\n revealable: start,\n hidden: start + dropped,\n later: 0,\n evicted: 0,\n lost: false,\n }\n }\n const wantedStart = Math.max(0, anchorEnd - size)\n const lost = anchorEnd <= dropped\n const end = lost ? Math.min(retained, size) : anchorEnd - dropped\n const start = lost ? 0 : Math.max(0, end - size)\n const evicted = lost\n ? anchorEnd - wantedStart\n : Math.max(0, Math.min(dropped, anchorEnd) - wantedStart)\n return {\n start,\n end,\n revealable: start,\n hidden: start + dropped,\n later: retained - end,\n evicted,\n lost,\n }\n}\n\n/** The limit after one \"show earlier\" press: one more page, never past what exists. */\nexport function revealEarlier(limit: number, page: number, retained: number): number {\n return Math.min(Math.max(retained, 1), limit + Math.max(1, Math.floor(page)))\n}\n\n/** Subpixel scroll positions and zoom make \"exactly at the bottom\" unreliable. */\nexport const BOTTOM_TOLERANCE_PX = 4\n\n/**\n * Whether a scroller is showing its end. This decides whether new output\n * follows the reader: at the bottom it does, anywhere else the view is theirs.\n */\nexport function isAtBottom(scrollHeight: number, scrollTop: number, clientHeight: number): boolean {\n return scrollHeight - scrollTop - clientHeight <= BOTTOM_TOLERANCE_PX\n}\n"],"mappings":";;AAiBA,SAAgB,oBAAoB,QAAgC;CAClE,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,IAAI,OAAO,UAAU,aAAa,OAAO;CACzC,OAAO,OAAO,UAAU,OAAO,IAAI,IAAI,oBAAoB,OAAO,SAAS;AAC7E;;AAGA,SAAgB,aAAa,QAA6C;CACxE,OAAO,QAAQ,UAAU,YAAY,OAAO,UAAU,OAAO,IAAI,KAAK,OAAO,SAAS;AACxF;;;;;;;;;;;;;;;AAiCA,SAAgB,eACd,UACA,SACA,OACA,WACgB;CAChB,MAAM,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,CAAC;CAC1C,IAAI,cAAc,KAAA,KAAa,aAAa,UAAU,UAAU;EAC9D,MAAM,QAAQ,KAAK,IAAI,GAAG,WAAW,IAAI;EACzC,OAAO;GACL;GACA,KAAK;GACL,YAAY;GACZ,QAAQ,QAAQ;GAChB,OAAO;GACP,SAAS;GACT,MAAM;EACR;CACF;CACA,MAAM,cAAc,KAAK,IAAI,GAAG,YAAY,IAAI;CAChD,MAAM,OAAO,aAAa;CAC1B,MAAM,MAAM,OAAO,KAAK,IAAI,UAAU,IAAI,IAAI,YAAY;CAC1D,MAAM,QAAQ,OAAO,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI;CAC/C,MAAM,UAAU,OACZ,YAAY,cACZ,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,SAAS,IAAI,WAAW;CAC1D,OAAO;EACL;EACA;EACA,YAAY;EACZ,QAAQ,QAAQ;EAChB,OAAO,WAAW;EAClB;EACA;CACF;AACF;;AAGA,SAAgB,cAAc,OAAe,MAAc,UAA0B;CACnF,OAAO,KAAK,IAAI,KAAK,IAAI,UAAU,CAAC,GAAG,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,IAAI,CAAC,CAAC;AAC9E;;;;;AASA,SAAgB,WAAW,cAAsB,WAAmB,cAA+B;CACjG,OAAO,eAAe,YAAY,gBAAA;AACpC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type ComponentProps } from 'solid-js';
|
|
2
|
+
import { type TerminalStatus } from './terminal-model';
|
|
3
|
+
/**
|
|
4
|
+
* Terminal.
|
|
5
|
+
*
|
|
6
|
+
* A command and its output, as it arrives. It is the thing to put inside an
|
|
7
|
+
* agent's "ran a command" line (a `TraceLine`, with `size="sm"`) when the output
|
|
8
|
+
* is the evidence; reach for `CodeBlock` instead when the text is source or a
|
|
9
|
+
* finished log that needs no live behaviour, and for `TestResults` when the
|
|
10
|
+
* output is a test run the host can structure.
|
|
11
|
+
*
|
|
12
|
+
* It does not wrap `CodeBlock`. A block's `highlight` seam re-renders the whole
|
|
13
|
+
* body whenever the code changes, which is exactly wrong for output that grows a
|
|
14
|
+
* line at a time, and a terminal has to own its scroller to follow the tail. It
|
|
15
|
+
* keeps the block's header and surface vocabulary so the two read as one family.
|
|
16
|
+
*
|
|
17
|
+
* ## What the output is allowed to do
|
|
18
|
+
*
|
|
19
|
+
* Output is untrusted bytes. It is parsed by `createAnsiParser` into plain text
|
|
20
|
+
* and a fixed set of styles — sixteen theme colours, bold, dim, italic,
|
|
21
|
+
* underline, strike-through, reverse — and everything else (cursor movement,
|
|
22
|
+
* title and clipboard sequences, anything malformed) is dropped, never echoed.
|
|
23
|
+
* Colours come from the theme's `--terminal-ansi-*` tokens, painted on the
|
|
24
|
+
* theme's own terminal background, so a program's colours keep the contrast the
|
|
25
|
+
* theme measured for them. Nothing is rendered as markup.
|
|
26
|
+
*
|
|
27
|
+
* ## Streaming
|
|
28
|
+
*
|
|
29
|
+
* `output` is the whole string so far. When the new value begins with the old
|
|
30
|
+
* one, only the appended text is parsed, so a chunk costs the size of the chunk
|
|
31
|
+
* and not of the transcript. Finished lines are keyed by identity and are never
|
|
32
|
+
* re-rendered; only the line still being written changes, which is what makes a
|
|
33
|
+
* `\r` progress bar redraw in place. Batch appends per frame — the host sees a
|
|
34
|
+
* prefix check proportional to the output on every change.
|
|
35
|
+
*
|
|
36
|
+
* Only the last `maxLines` finished lines are mounted. The rest are counted in
|
|
37
|
+
* an explicit note with a control to show them a page at a time, because tens of
|
|
38
|
+
* thousands of row elements are a frozen page, not a transcript. Copy still
|
|
39
|
+
* writes `output` exactly as given — not the rendered lines, not the visible tail.
|
|
40
|
+
*
|
|
41
|
+
* ## Following the tail
|
|
42
|
+
*
|
|
43
|
+
* The terminal scrolls inside its own bounded box and follows new output only
|
|
44
|
+
* while the reader is at the bottom of that box. Scrolling up *parks* the view:
|
|
45
|
+
* the lines mounted are the ones that were there when they left, however much
|
|
46
|
+
* output arrives, and "Jump to latest" is the only way back to the tail (reaching
|
|
47
|
+
* the bottom of a parked view with nothing newer resumes it, because nothing was
|
|
48
|
+
* missed). If retention discards the lines they were reading the note says how
|
|
49
|
+
* many, and when none are left the oldest retained lines are shown. The page
|
|
50
|
+
* itself is never scrolled. Scrolling is instant, so there is no animation to
|
|
51
|
+
* reduce.
|
|
52
|
+
*
|
|
53
|
+
* ## Status is a claim
|
|
54
|
+
*
|
|
55
|
+
* `status` is drawn only when the host passes it, in words as well as an icon,
|
|
56
|
+
* and only a non-zero exit is toned as a failure: this component does not decide
|
|
57
|
+
* that a command "passed". Without a status the header says nothing about whether
|
|
58
|
+
* the command is still running. `onClear` adds a clear button; without it the
|
|
59
|
+
* output is the host's record and nothing here offers to erase it.
|
|
60
|
+
*/
|
|
61
|
+
export type TerminalProps = Omit<ComponentProps<'div'>, 'children'> & {
|
|
62
|
+
/** Everything the command has printed so far, exactly as received. */
|
|
63
|
+
output: string;
|
|
64
|
+
/** The command line. Shown as text; the prompt glyph is decoration. */
|
|
65
|
+
command?: string;
|
|
66
|
+
status?: TerminalStatus;
|
|
67
|
+
/** Finished lines mounted at once; earlier ones are counted and revealed a page at a time. */
|
|
68
|
+
maxLines?: number;
|
|
69
|
+
/** Finished lines kept at all; older ones are discarded and counted. Default 200 000. */
|
|
70
|
+
retainLines?: number;
|
|
71
|
+
/** Height of the output box, which scrolls past it. A number is pixels. Default `20rem`. */
|
|
72
|
+
maxHeight?: number | string;
|
|
73
|
+
/** Soft-wrap long lines instead of scrolling sideways. Off: terminal columns keep their alignment. */
|
|
74
|
+
wrap?: boolean;
|
|
75
|
+
/** `sm` is the compact chrome for output nested inside a Trace line. */
|
|
76
|
+
size?: 'default' | 'sm';
|
|
77
|
+
/** Show a clear button. The host empties `output`; the terminal erases nothing itself. */
|
|
78
|
+
onClear?: () => void;
|
|
79
|
+
copyLabel?: string;
|
|
80
|
+
copiedLabel?: string;
|
|
81
|
+
clearLabel?: string;
|
|
82
|
+
/** Called after each copy attempt with whether the clipboard accepted it. */
|
|
83
|
+
onCopy?: (ok: boolean) => void;
|
|
84
|
+
};
|
|
85
|
+
/** Finished lines mounted by default. */
|
|
86
|
+
export declare const TERMINAL_MAX_LINES = 1000;
|
|
87
|
+
export declare function Terminal(props: TerminalProps): import("solid-js").JSX.Element;
|
|
88
|
+
//# sourceMappingURL=terminal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/terminal/terminal.tsx"],"names":[],"mappings":"AASA,OAAO,EAQL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAA;AAWjB,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACpE,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAA;IACd,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,sGAAsG;IACtG,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/B,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,kBAAkB,OAAO,CAAA;AAwItC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCA2T5C"}
|