@neo4j-ndl/react 4.1.8 → 4.2.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/lib/cjs/ai/code-preview/CodePreview.js +91 -0
- package/lib/cjs/ai/code-preview/CodePreview.js.map +1 -0
- package/lib/cjs/ai/code-preview/index.js +26 -0
- package/lib/cjs/ai/code-preview/index.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js +37 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js +31 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js +36 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js +36 -0
- package/lib/cjs/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/code-preview.stories.js +88 -0
- package/lib/cjs/ai/code-preview/stories/code-preview.stories.js.map +1 -0
- package/lib/cjs/ai/code-preview/stories/index.js +44 -0
- package/lib/cjs/ai/code-preview/stories/index.js.map +1 -0
- package/lib/cjs/ai/file-tag/FileTag.js +58 -0
- package/lib/cjs/ai/file-tag/FileTag.js.map +1 -0
- package/lib/cjs/ai/file-tag/index.js +38 -0
- package/lib/cjs/ai/file-tag/index.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js +31 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js +33 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js +33 -0
- package/lib/cjs/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/file-tag.stories.js +76 -0
- package/lib/cjs/ai/file-tag/stories/file-tag.stories.js.map +1 -0
- package/lib/cjs/ai/file-tag/stories/index.js +40 -0
- package/lib/cjs/ai/file-tag/stories/index.js.map +1 -0
- package/lib/cjs/ai/image-tag/ImageTag.js +58 -0
- package/lib/cjs/ai/image-tag/ImageTag.js.map +1 -0
- package/lib/cjs/ai/image-tag/index.js +38 -0
- package/lib/cjs/ai/image-tag/index.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js +30 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js +32 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js +32 -0
- package/lib/cjs/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/image-tag.stories.js +76 -0
- package/lib/cjs/ai/image-tag/stories/image-tag.stories.js.map +1 -0
- package/lib/cjs/ai/image-tag/stories/index.js +40 -0
- package/lib/cjs/ai/image-tag/stories/index.js.map +1 -0
- package/lib/cjs/ai/index.js +23 -1
- package/lib/cjs/ai/index.js.map +1 -1
- package/lib/cjs/ai/more-files/MoreFiles.js +55 -0
- package/lib/cjs/ai/more-files/MoreFiles.js.map +1 -0
- package/lib/cjs/ai/more-files/index.js +38 -0
- package/lib/cjs/ai/more-files/index.js.map +1 -0
- package/lib/cjs/ai/more-files/stories/index.js +32 -0
- package/lib/cjs/ai/more-files/stories/index.js.map +1 -0
- package/lib/cjs/ai/more-files/stories/more-files.stories.js +50 -0
- package/lib/cjs/ai/more-files/stories/more-files.stories.js.map +1 -0
- package/lib/cjs/ai/more-files/stories/more-files.story.js +35 -0
- package/lib/cjs/ai/more-files/stories/more-files.story.js.map +1 -0
- package/lib/cjs/ai/presence/Presence.js +5 -1
- package/lib/cjs/ai/presence/Presence.js.map +1 -1
- package/lib/cjs/ai/prompt/Prompt.js +163 -0
- package/lib/cjs/ai/prompt/Prompt.js.map +1 -0
- package/lib/cjs/ai/prompt/index.js +38 -0
- package/lib/cjs/ai/prompt/index.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/index.js +36 -0
- package/lib/cjs/ai/prompt/stories/index.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js +56 -0
- package/lib/cjs/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/prompt-default.story.js +40 -0
- package/lib/cjs/ai/prompt/stories/prompt-default.story.js.map +1 -0
- package/lib/cjs/ai/prompt/stories/prompt.stories.js +63 -0
- package/lib/cjs/ai/prompt/stories/prompt.stories.js.map +1 -0
- package/lib/cjs/ai/reasoning/Reasoning.js +77 -0
- package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -0
- package/lib/cjs/ai/reasoning/index.js +38 -0
- package/lib/cjs/ai/reasoning/index.js.map +1 -0
- package/lib/cjs/ai/reasoning/stories/index.js +32 -0
- package/lib/cjs/ai/reasoning/stories/index.js.map +1 -0
- package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js +34 -0
- package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
- package/lib/cjs/ai/reasoning/stories/reasoning.stories.js +50 -0
- package/lib/cjs/ai/reasoning/stories/reasoning.stories.js.map +1 -0
- package/lib/cjs/ai/response/Response.js +185 -0
- package/lib/cjs/ai/response/Response.js.map +1 -0
- package/lib/cjs/ai/response/index.js +26 -0
- package/lib/cjs/ai/response/index.js.map +1 -0
- package/lib/cjs/ai/response/stories/index.js +56 -0
- package/lib/cjs/ai/response/stories/index.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-all-components.story.js +229 -0
- package/lib/cjs/ai/response/stories/response-all-components.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-code-examples.story.js +248 -0
- package/lib/cjs/ai/response/stories/response-code-examples.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-default.story.js +50 -0
- package/lib/cjs/ai/response/stories/response-default.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-full-example.story.js +162 -0
- package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-headings.story.js +120 -0
- package/lib/cjs/ai/response/stories/response-headings.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-lists.story.js +170 -0
- package/lib/cjs/ai/response/stories/response-lists.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response-streaming.story.js +65 -0
- package/lib/cjs/ai/response/stories/response-streaming.story.js.map +1 -0
- package/lib/cjs/ai/response/stories/response.stories.js +132 -0
- package/lib/cjs/ai/response/stories/response.stories.js.map +1 -0
- package/lib/cjs/ai/suggestion/Suggestion.js +58 -0
- package/lib/cjs/ai/suggestion/Suggestion.js.map +1 -0
- package/lib/cjs/ai/suggestion/index.js +38 -0
- package/lib/cjs/ai/suggestion/index.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/index.js +44 -0
- package/lib/cjs/ai/suggestion/stories/index.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js +30 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js +31 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js +30 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js +30 -0
- package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
- package/lib/cjs/ai/suggestion/stories/suggestion.stories.js +89 -0
- package/lib/cjs/ai/suggestion/stories/suggestion.stories.js.map +1 -0
- package/lib/cjs/ai/thinking/Thinking.js +57 -0
- package/lib/cjs/ai/thinking/Thinking.js.map +1 -0
- package/lib/cjs/ai/thinking/index.js +38 -0
- package/lib/cjs/ai/thinking/index.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js +30 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js +30 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js +63 -0
- package/lib/cjs/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
- package/lib/cjs/ai/thinking/stories/index.js +36 -0
- package/lib/cjs/ai/thinking/stories/index.js.map +1 -0
- package/lib/cjs/ai/thinking/thinking-duration-formatter.js +71 -0
- package/lib/cjs/ai/thinking/thinking-duration-formatter.js.map +1 -0
- package/lib/cjs/ai/tool-call/ToolCall.js +55 -0
- package/lib/cjs/ai/tool-call/ToolCall.js.map +1 -0
- package/lib/cjs/ai/tool-call/index.js +38 -0
- package/lib/cjs/ai/tool-call/index.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/index.js +36 -0
- package/lib/cjs/ai/tool-call/stories/index.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js +30 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js +30 -0
- package/lib/cjs/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
- package/lib/cjs/ai/tool-call/stories/tool-call.stories.js +63 -0
- package/lib/cjs/ai/tool-call/stories/tool-call.stories.js.map +1 -0
- package/lib/cjs/ai/user-bubble/UserBubble.js +53 -0
- package/lib/cjs/ai/user-bubble/UserBubble.js.map +1 -0
- package/lib/cjs/ai/user-bubble/index.js +38 -0
- package/lib/cjs/ai/user-bubble/index.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/index.js +44 -0
- package/lib/cjs/ai/user-bubble/stories/index.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js +35 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +39 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js +33 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js +89 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js +34 -0
- package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
- package/lib/cjs/code/Code.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/tooltip/use-tooltip.js +1 -0
- package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
- package/lib/esm/ai/code-preview/CodePreview.js +84 -0
- package/lib/esm/ai/code-preview/CodePreview.js.map +1 -0
- package/lib/esm/ai/code-preview/index.js +22 -0
- package/lib/esm/ai/code-preview/index.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js +33 -0
- package/lib/esm/ai/code-preview/stories/code-preview-languages.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js +27 -0
- package/lib/esm/ai/code-preview/stories/code-preview-loading.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-read.story.js +32 -0
- package/lib/esm/ai/code-preview/stories/code-preview-read.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview-write.story.js +32 -0
- package/lib/esm/ai/code-preview/stories/code-preview-write.story.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/code-preview.stories.js +85 -0
- package/lib/esm/ai/code-preview/stories/code-preview.stories.js.map +1 -0
- package/lib/esm/ai/code-preview/stories/index.js +34 -0
- package/lib/esm/ai/code-preview/stories/index.js.map +1 -0
- package/lib/esm/ai/file-tag/FileTag.js +52 -0
- package/lib/esm/ai/file-tag/FileTag.js.map +1 -0
- package/lib/esm/ai/file-tag/index.js +22 -0
- package/lib/esm/ai/file-tag/index.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js +29 -0
- package/lib/esm/ai/file-tag/stories/file-tag-chat.story.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js +31 -0
- package/lib/esm/ai/file-tag/stories/file-tag-loading.story.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js +31 -0
- package/lib/esm/ai/file-tag/stories/file-tag-prompt.story.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/file-tag.stories.js +73 -0
- package/lib/esm/ai/file-tag/stories/file-tag.stories.js.map +1 -0
- package/lib/esm/ai/file-tag/stories/index.js +31 -0
- package/lib/esm/ai/file-tag/stories/index.js.map +1 -0
- package/lib/esm/ai/image-tag/ImageTag.js +52 -0
- package/lib/esm/ai/image-tag/ImageTag.js.map +1 -0
- package/lib/esm/ai/image-tag/index.js +22 -0
- package/lib/esm/ai/image-tag/index.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js +28 -0
- package/lib/esm/ai/image-tag/stories/image-tag-chat.story.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js +30 -0
- package/lib/esm/ai/image-tag/stories/image-tag-loading.story.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js +30 -0
- package/lib/esm/ai/image-tag/stories/image-tag-prompt.story.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/image-tag.stories.js +73 -0
- package/lib/esm/ai/image-tag/stories/image-tag.stories.js.map +1 -0
- package/lib/esm/ai/image-tag/stories/index.js +31 -0
- package/lib/esm/ai/image-tag/stories/index.js.map +1 -0
- package/lib/esm/ai/index.js +11 -0
- package/lib/esm/ai/index.js.map +1 -1
- package/lib/esm/ai/more-files/MoreFiles.js +49 -0
- package/lib/esm/ai/more-files/MoreFiles.js.map +1 -0
- package/lib/esm/ai/more-files/index.js +22 -0
- package/lib/esm/ai/more-files/index.js.map +1 -0
- package/lib/esm/ai/more-files/stories/index.js +25 -0
- package/lib/esm/ai/more-files/stories/index.js.map +1 -0
- package/lib/esm/ai/more-files/stories/more-files.stories.js +47 -0
- package/lib/esm/ai/more-files/stories/more-files.stories.js.map +1 -0
- package/lib/esm/ai/more-files/stories/more-files.story.js +33 -0
- package/lib/esm/ai/more-files/stories/more-files.story.js.map +1 -0
- package/lib/esm/ai/presence/Presence.js +5 -1
- package/lib/esm/ai/presence/Presence.js.map +1 -1
- package/lib/esm/ai/prompt/Prompt.js +157 -0
- package/lib/esm/ai/prompt/Prompt.js.map +1 -0
- package/lib/esm/ai/prompt/index.js +22 -0
- package/lib/esm/ai/prompt/index.js.map +1 -0
- package/lib/esm/ai/prompt/stories/index.js +28 -0
- package/lib/esm/ai/prompt/stories/index.js.map +1 -0
- package/lib/esm/ai/prompt/stories/prompt-advanced.story.js +54 -0
- package/lib/esm/ai/prompt/stories/prompt-advanced.story.js.map +1 -0
- package/lib/esm/ai/prompt/stories/prompt-default.story.js +38 -0
- package/lib/esm/ai/prompt/stories/prompt-default.story.js.map +1 -0
- package/lib/esm/ai/prompt/stories/prompt.stories.js +60 -0
- package/lib/esm/ai/prompt/stories/prompt.stories.js.map +1 -0
- package/lib/esm/ai/reasoning/Reasoning.js +71 -0
- package/lib/esm/ai/reasoning/Reasoning.js.map +1 -0
- package/lib/esm/ai/reasoning/index.js +22 -0
- package/lib/esm/ai/reasoning/index.js.map +1 -0
- package/lib/esm/ai/reasoning/stories/index.js +25 -0
- package/lib/esm/ai/reasoning/stories/index.js.map +1 -0
- package/lib/esm/ai/reasoning/stories/reasoning-full.story.js +32 -0
- package/lib/esm/ai/reasoning/stories/reasoning-full.story.js.map +1 -0
- package/lib/esm/ai/reasoning/stories/reasoning.stories.js +47 -0
- package/lib/esm/ai/reasoning/stories/reasoning.stories.js.map +1 -0
- package/lib/esm/ai/response/Response.js +179 -0
- package/lib/esm/ai/response/Response.js.map +1 -0
- package/lib/esm/ai/response/index.js +22 -0
- package/lib/esm/ai/response/index.js.map +1 -0
- package/lib/esm/ai/response/stories/index.js +43 -0
- package/lib/esm/ai/response/stories/index.js.map +1 -0
- package/lib/esm/ai/response/stories/response-all-components.story.js +225 -0
- package/lib/esm/ai/response/stories/response-all-components.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-code-examples.story.js +244 -0
- package/lib/esm/ai/response/stories/response-code-examples.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-default.story.js +46 -0
- package/lib/esm/ai/response/stories/response-default.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-full-example.story.js +158 -0
- package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-headings.story.js +116 -0
- package/lib/esm/ai/response/stories/response-headings.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-lists.story.js +166 -0
- package/lib/esm/ai/response/stories/response-lists.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response-streaming.story.js +61 -0
- package/lib/esm/ai/response/stories/response-streaming.story.js.map +1 -0
- package/lib/esm/ai/response/stories/response.stories.js +129 -0
- package/lib/esm/ai/response/stories/response.stories.js.map +1 -0
- package/lib/esm/ai/suggestion/Suggestion.js +52 -0
- package/lib/esm/ai/suggestion/Suggestion.js.map +1 -0
- package/lib/esm/ai/suggestion/index.js +22 -0
- package/lib/esm/ai/suggestion/index.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/index.js +34 -0
- package/lib/esm/ai/suggestion/stories/index.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-default.story.js +28 -0
- package/lib/esm/ai/suggestion/stories/suggestion-default.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js +29 -0
- package/lib/esm/ai/suggestion/stories/suggestion-icon.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js +28 -0
- package/lib/esm/ai/suggestion/stories/suggestion-primary.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js +28 -0
- package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -0
- package/lib/esm/ai/suggestion/stories/suggestion.stories.js +86 -0
- package/lib/esm/ai/suggestion/stories/suggestion.stories.js.map +1 -0
- package/lib/esm/ai/thinking/Thinking.js +51 -0
- package/lib/esm/ai/thinking/Thinking.js.map +1 -0
- package/lib/esm/ai/thinking/index.js +22 -0
- package/lib/esm/ai/thinking/index.js.map +1 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js +28 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-default.story.js.map +1 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js +28 -0
- package/lib/esm/ai/thinking/stories/ai-thinking-finished.story.js.map +1 -0
- package/lib/esm/ai/thinking/stories/ai-thinking.stories.js +60 -0
- package/lib/esm/ai/thinking/stories/ai-thinking.stories.js.map +1 -0
- package/lib/esm/ai/thinking/stories/index.js +28 -0
- package/lib/esm/ai/thinking/stories/index.js.map +1 -0
- package/lib/esm/ai/thinking/thinking-duration-formatter.js +67 -0
- package/lib/esm/ai/thinking/thinking-duration-formatter.js.map +1 -0
- package/lib/esm/ai/tool-call/ToolCall.js +49 -0
- package/lib/esm/ai/tool-call/ToolCall.js.map +1 -0
- package/lib/esm/ai/tool-call/index.js +22 -0
- package/lib/esm/ai/tool-call/index.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/index.js +28 -0
- package/lib/esm/ai/tool-call/stories/index.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/tool-call-default.story.js +28 -0
- package/lib/esm/ai/tool-call/stories/tool-call-default.story.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/tool-call-done.story.js +28 -0
- package/lib/esm/ai/tool-call/stories/tool-call-done.story.js.map +1 -0
- package/lib/esm/ai/tool-call/stories/tool-call.stories.js +60 -0
- package/lib/esm/ai/tool-call/stories/tool-call.stories.js.map +1 -0
- package/lib/esm/ai/user-bubble/UserBubble.js +47 -0
- package/lib/esm/ai/user-bubble/UserBubble.js.map +1 -0
- package/lib/esm/ai/user-bubble/index.js +22 -0
- package/lib/esm/ai/user-bubble/index.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/index.js +34 -0
- package/lib/esm/ai/user-bubble/stories/index.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js +33 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-action.story.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +37 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js +31 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble-long.story.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js +86 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.stories.js.map +1 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.story.js +32 -0
- package/lib/esm/ai/user-bubble/stories/user-bubble.story.js.map +1 -0
- package/lib/esm/code/Code.js.map +1 -1
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/tooltip/use-tooltip.js +2 -1
- package/lib/esm/tooltip/use-tooltip.js.map +1 -1
- package/lib/types/ai/code-preview/CodePreview.d.ts +44 -0
- package/lib/types/ai/code-preview/CodePreview.d.ts.map +1 -0
- package/lib/types/ai/code-preview/index.d.ts +22 -0
- package/lib/types/ai/code-preview/index.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-languages.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-loading.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-read.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts +23 -0
- package/lib/types/ai/code-preview/stories/code-preview-write.story.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts +30 -0
- package/lib/types/ai/code-preview/stories/code-preview.stories.d.ts.map +1 -0
- package/lib/types/ai/code-preview/stories/index.d.ts +29 -0
- package/lib/types/ai/code-preview/stories/index.d.ts.map +1 -0
- package/lib/types/ai/file-tag/FileTag.d.ts +44 -0
- package/lib/types/ai/file-tag/FileTag.d.ts.map +1 -0
- package/lib/types/ai/file-tag/index.d.ts +22 -0
- package/lib/types/ai/file-tag/index.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts +24 -0
- package/lib/types/ai/file-tag/stories/file-tag-chat.story.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts +24 -0
- package/lib/types/ai/file-tag/stories/file-tag-loading.story.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts +24 -0
- package/lib/types/ai/file-tag/stories/file-tag-prompt.story.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts +29 -0
- package/lib/types/ai/file-tag/stories/file-tag.stories.d.ts.map +1 -0
- package/lib/types/ai/file-tag/stories/index.d.ts +27 -0
- package/lib/types/ai/file-tag/stories/index.d.ts.map +1 -0
- package/lib/types/ai/image-tag/ImageTag.d.ts +46 -0
- package/lib/types/ai/image-tag/ImageTag.d.ts.map +1 -0
- package/lib/types/ai/image-tag/index.d.ts +22 -0
- package/lib/types/ai/image-tag/index.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts +24 -0
- package/lib/types/ai/image-tag/stories/image-tag-chat.story.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts +24 -0
- package/lib/types/ai/image-tag/stories/image-tag-loading.story.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts +24 -0
- package/lib/types/ai/image-tag/stories/image-tag-prompt.story.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts +29 -0
- package/lib/types/ai/image-tag/stories/image-tag.stories.d.ts.map +1 -0
- package/lib/types/ai/image-tag/stories/index.d.ts +27 -0
- package/lib/types/ai/image-tag/stories/index.d.ts.map +1 -0
- package/lib/types/ai/index.d.ts +11 -0
- package/lib/types/ai/index.d.ts.map +1 -1
- package/lib/types/ai/more-files/MoreFiles.d.ts +38 -0
- package/lib/types/ai/more-files/MoreFiles.d.ts.map +1 -0
- package/lib/types/ai/more-files/index.d.ts +22 -0
- package/lib/types/ai/more-files/index.d.ts.map +1 -0
- package/lib/types/ai/more-files/stories/index.d.ts +23 -0
- package/lib/types/ai/more-files/stories/index.d.ts.map +1 -0
- package/lib/types/ai/more-files/stories/more-files.stories.d.ts +27 -0
- package/lib/types/ai/more-files/stories/more-files.stories.d.ts.map +1 -0
- package/lib/types/ai/more-files/stories/more-files.story.d.ts +24 -0
- package/lib/types/ai/more-files/stories/more-files.story.d.ts.map +1 -0
- package/lib/types/ai/presence/Presence.d.ts.map +1 -1
- package/lib/types/ai/prompt/Prompt.d.ts +62 -0
- package/lib/types/ai/prompt/Prompt.d.ts.map +1 -0
- package/lib/types/ai/prompt/index.d.ts +22 -0
- package/lib/types/ai/prompt/index.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/index.d.ts +25 -0
- package/lib/types/ai/prompt/stories/index.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts +24 -0
- package/lib/types/ai/prompt/stories/prompt-advanced.story.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/prompt-default.story.d.ts +24 -0
- package/lib/types/ai/prompt/stories/prompt-default.story.d.ts.map +1 -0
- package/lib/types/ai/prompt/stories/prompt.stories.d.ts +28 -0
- package/lib/types/ai/prompt/stories/prompt.stories.d.ts.map +1 -0
- package/lib/types/ai/reasoning/Reasoning.d.ts +44 -0
- package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -0
- package/lib/types/ai/reasoning/index.d.ts +22 -0
- package/lib/types/ai/reasoning/index.d.ts.map +1 -0
- package/lib/types/ai/reasoning/stories/index.d.ts +23 -0
- package/lib/types/ai/reasoning/stories/index.d.ts.map +1 -0
- package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts +24 -0
- package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts.map +1 -0
- package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts +27 -0
- package/lib/types/ai/reasoning/stories/reasoning.stories.d.ts.map +1 -0
- package/lib/types/ai/response/Response.d.ts +37 -0
- package/lib/types/ai/response/Response.d.ts.map +1 -0
- package/lib/types/ai/response/index.d.ts +22 -0
- package/lib/types/ai/response/index.d.ts.map +1 -0
- package/lib/types/ai/response/stories/index.d.ts +35 -0
- package/lib/types/ai/response/stories/index.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-all-components.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-all-components.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-code-examples.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-code-examples.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-default.story.d.ts +23 -0
- package/lib/types/ai/response/stories/response-default.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-full-example.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-full-example.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-headings.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-headings.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-lists.story.d.ts +24 -0
- package/lib/types/ai/response/stories/response-lists.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response-streaming.story.d.ts +23 -0
- package/lib/types/ai/response/stories/response-streaming.story.d.ts.map +1 -0
- package/lib/types/ai/response/stories/response.stories.d.ts +33 -0
- package/lib/types/ai/response/stories/response.stories.d.ts.map +1 -0
- package/lib/types/ai/suggestion/Suggestion.d.ts +42 -0
- package/lib/types/ai/suggestion/Suggestion.d.ts.map +1 -0
- package/lib/types/ai/suggestion/index.d.ts +22 -0
- package/lib/types/ai/suggestion/index.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/index.d.ts +29 -0
- package/lib/types/ai/suggestion/stories/index.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-default.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-icon.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-primary.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts +24 -0
- package/lib/types/ai/suggestion/stories/suggestion-sizes.story.d.ts.map +1 -0
- package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts +30 -0
- package/lib/types/ai/suggestion/stories/suggestion.stories.d.ts.map +1 -0
- package/lib/types/ai/thinking/Thinking.d.ts +40 -0
- package/lib/types/ai/thinking/Thinking.d.ts.map +1 -0
- package/lib/types/ai/thinking/index.d.ts +22 -0
- package/lib/types/ai/thinking/index.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts +24 -0
- package/lib/types/ai/thinking/stories/ai-thinking-default.story.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts +24 -0
- package/lib/types/ai/thinking/stories/ai-thinking-finished.story.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts +28 -0
- package/lib/types/ai/thinking/stories/ai-thinking.stories.d.ts.map +1 -0
- package/lib/types/ai/thinking/stories/index.d.ts +25 -0
- package/lib/types/ai/thinking/stories/index.d.ts.map +1 -0
- package/lib/types/ai/thinking/thinking-duration-formatter.d.ts +45 -0
- package/lib/types/ai/thinking/thinking-duration-formatter.d.ts.map +1 -0
- package/lib/types/ai/tool-call/ToolCall.d.ts +37 -0
- package/lib/types/ai/tool-call/ToolCall.d.ts.map +1 -0
- package/lib/types/ai/tool-call/index.d.ts +22 -0
- package/lib/types/ai/tool-call/index.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/index.d.ts +25 -0
- package/lib/types/ai/tool-call/stories/index.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts +24 -0
- package/lib/types/ai/tool-call/stories/tool-call-default.story.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts +24 -0
- package/lib/types/ai/tool-call/stories/tool-call-done.story.d.ts.map +1 -0
- package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts +28 -0
- package/lib/types/ai/tool-call/stories/tool-call.stories.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/UserBubble.d.ts +39 -0
- package/lib/types/ai/user-bubble/UserBubble.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/index.d.ts +22 -0
- package/lib/types/ai/user-bubble/index.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/index.d.ts +29 -0
- package/lib/types/ai/user-bubble/stories/index.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-action.story.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-and-files.story.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble-long.story.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts +30 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.stories.d.ts.map +1 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts +24 -0
- package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts.map +1 -0
- package/lib/types/code/Code.d.ts +4 -1
- package/lib/types/code/Code.d.ts.map +1 -1
- package/lib/types/text-area/TextArea.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
- package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Suggestion } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-8", children: [_jsx(Suggestion, { size: "small", children: "This is a small suggestion" }), _jsx(Suggestion, { size: "large", children: "This is a large suggestion" })] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=suggestion-sizes.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion-sizes.story.js","sourceRoot":"","sources":["../../../../../src/ai/suggestion/stories/suggestion-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,2CAAwC,EAChE,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,2CAAwC,IAC5D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Suggestion } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <Suggestion size=\"small\">This is a small suggestion</Suggestion>\n <Suggestion size=\"large\">This is a large suggestion</Suggestion>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { Suggestion } from '../Suggestion';
|
|
23
|
+
import { SuggestionDefault, SuggestionDefaultSrc, SuggestionIcon, SuggestionIconSrc, SuggestionPrimary, SuggestionPrimarySrc, SuggestionSizes, SuggestionSizesSrc, } from '.';
|
|
24
|
+
const componentMeta = {
|
|
25
|
+
component: Suggestion,
|
|
26
|
+
id: 'components-ai-suggestion',
|
|
27
|
+
parameters: {
|
|
28
|
+
controls: { disable: true },
|
|
29
|
+
},
|
|
30
|
+
tags: ['docsPage'],
|
|
31
|
+
title: 'Components/AI/Suggestion',
|
|
32
|
+
};
|
|
33
|
+
export default componentMeta;
|
|
34
|
+
export const Default = {
|
|
35
|
+
args: {},
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
source: {
|
|
39
|
+
code: SuggestionDefaultSrc,
|
|
40
|
+
language: 'tsx',
|
|
41
|
+
type: 'code',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
render: SuggestionDefault,
|
|
46
|
+
};
|
|
47
|
+
export const Sizes = {
|
|
48
|
+
args: {},
|
|
49
|
+
parameters: {
|
|
50
|
+
docs: {
|
|
51
|
+
source: {
|
|
52
|
+
code: SuggestionSizesSrc,
|
|
53
|
+
language: 'tsx',
|
|
54
|
+
type: 'code',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
render: SuggestionSizes,
|
|
59
|
+
};
|
|
60
|
+
export const Icon = {
|
|
61
|
+
args: {},
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
source: {
|
|
65
|
+
code: SuggestionIconSrc,
|
|
66
|
+
language: 'tsx',
|
|
67
|
+
type: 'code',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
render: SuggestionIcon,
|
|
72
|
+
};
|
|
73
|
+
export const Primary = {
|
|
74
|
+
args: {},
|
|
75
|
+
parameters: {
|
|
76
|
+
docs: {
|
|
77
|
+
source: {
|
|
78
|
+
code: SuggestionPrimarySrc,
|
|
79
|
+
language: 'tsx',
|
|
80
|
+
type: 'code',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
render: SuggestionPrimary,
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=suggestion.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestion.stories.js","sourceRoot":"","sources":["../../../../../src/ai/suggestion/stories/suggestion.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,GACnB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA4B;IAC7C,SAAS,EAAE,UAAU;IACrB,EAAE,EAAE,0BAA0B;IAC9B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,0BAA0B;CAClC,CAAC;AAEF,eAAe,aAAa,CAAC;AAI7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,iBAAiB;CAC1B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Suggestion } from '../Suggestion';\nimport {\n SuggestionDefault,\n SuggestionDefaultSrc,\n SuggestionIcon,\n SuggestionIconSrc,\n SuggestionPrimary,\n SuggestionPrimarySrc,\n SuggestionSizes,\n SuggestionSizesSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof Suggestion> = {\n component: Suggestion,\n id: 'components-ai-suggestion',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/Suggestion',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionDefault,\n};\n\nexport const Sizes: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionSizesSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionSizes,\n};\n\nexport const Icon: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionIconSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionIcon,\n};\n\nexport const Primary: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: SuggestionPrimarySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: SuggestionPrimary,\n};\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
23
|
+
var t = {};
|
|
24
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
25
|
+
t[p] = s[p];
|
|
26
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
27
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
28
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
29
|
+
t[p[i]] = s[p[i]];
|
|
30
|
+
}
|
|
31
|
+
return t;
|
|
32
|
+
};
|
|
33
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
|
+
import classNames from 'classnames';
|
|
35
|
+
import { Presence } from '../presence';
|
|
36
|
+
import { formatThinkingDuration } from './thinking-duration-formatter';
|
|
37
|
+
/**
|
|
38
|
+
* The component is used to display the thinking state of an LLM.
|
|
39
|
+
* If the `isThinking` prop is true, it will render a thinking presence icon and the text "Thinking".
|
|
40
|
+
* If the `isThinking` prop is false, it will render the duration of the thinking.
|
|
41
|
+
*
|
|
42
|
+
* @alpha - Changes to this component may be breaking.
|
|
43
|
+
*/
|
|
44
|
+
const Thinking = (_a) => {
|
|
45
|
+
var { className, isThinking = true, style, htmlAttributes, ref, thinkingMs = 1000 } = _a, restProps = __rest(_a, ["className", "isThinking", "style", "htmlAttributes", "ref", "thinkingMs"]);
|
|
46
|
+
const classes = classNames('n-flex n-flex-col n-items-start n-gap-token-12', className);
|
|
47
|
+
const { value: thinkingDuration, unit } = formatThinkingDuration(thinkingMs);
|
|
48
|
+
return (_jsx("div", Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: isThinking === true ? (_jsxs(_Fragment, { children: [_jsx(Presence, { isThinking: isThinking, className: "n-size-token-32" }), _jsx("span", { className: "n-subheading-small n-text-neutral-text-default", children: "Thinking" })] })) : (_jsxs("span", { className: "n-subheading-small n-text-neutral-text-weak", children: ["Thought", ' ', _jsxs("span", { className: "n-font-normal", children: ["for ", thinkingDuration, " ", unit] })] })) })));
|
|
49
|
+
};
|
|
50
|
+
export { Thinking };
|
|
51
|
+
//# sourceMappingURL=Thinking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thinking.js","sourceRoot":"","sources":["../../../../src/ai/thinking/Thinking.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAYvE;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,CAAC,EAQkB,EAAE,EAAE;QARtB,EAChB,SAAS,EACT,UAAU,GAAG,IAAI,EACjB,KAAK,EACL,cAAc,EACd,GAAG,EACH,UAAU,GAAG,IAAI,OAEiB,EAD/B,SAAS,cAPI,2EAQjB,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CACxB,gDAAgD,EAChD,SAAS,CACV,CAAC;IAEF,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAE7E,OAAO,CACL,4BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAEjB,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,CACrB,8BACE,KAAC,QAAQ,IAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC,iBAAiB,GAAG,EAChE,eAAM,SAAS,EAAC,gDAAgD,yBAEzD,IACN,CACJ,CAAC,CAAC,CAAC,CACF,gBAAM,SAAS,EAAC,6CAA6C,wBACnD,GAAG,EACX,gBAAM,SAAS,EAAC,eAAe,qBACxB,gBAAgB,OAAG,IAAI,IACvB,IACF,CACR,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { CommonProps } from '@neo4j-ndl/react/_common/types';\nimport classNames from 'classnames';\n\nimport { Presence } from '../presence';\nimport { formatThinkingDuration } from './thinking-duration-formatter';\n\ntype ThinkingProps = {\n /** Whether the AI is thinking.\n * If true, will render a thinking presence icon and the text \"Thinking\".\n * If false, will render the duration of the thinking.\n */\n isThinking?: boolean;\n /** The duration of the thinking in milliseconds */\n thinkingMs?: number;\n};\n\n/**\n * The component is used to display the thinking state of an LLM.\n * If the `isThinking` prop is true, it will render a thinking presence icon and the text \"Thinking\".\n * If the `isThinking` prop is false, it will render the duration of the thinking.\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst Thinking = ({\n className,\n isThinking = true,\n style,\n htmlAttributes,\n ref,\n thinkingMs = 1000,\n ...restProps\n}: CommonProps<'div', ThinkingProps>) => {\n const classes = classNames(\n 'n-flex n-flex-col n-items-start n-gap-token-12',\n className,\n );\n\n const { value: thinkingDuration, unit } = formatThinkingDuration(thinkingMs);\n\n return (\n <div\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {isThinking === true ? (\n <>\n <Presence isThinking={isThinking} className=\"n-size-token-32\" />\n <span className=\"n-subheading-small n-text-neutral-text-default\">\n Thinking\n </span>\n </>\n ) : (\n <span className=\"n-subheading-small n-text-neutral-text-weak\">\n Thought{' '}\n <span className=\"n-font-normal\">\n for {thinkingDuration} {unit}\n </span>\n </span>\n )}\n </div>\n );\n};\n\nexport { Thinking };\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Thinking';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/thinking/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,YAAY,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './Thinking';\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Thinking } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return _jsx(Thinking, { isThinking: true, thinkingMs: 1400 });
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=ai-thinking-default.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-thinking-default.story.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/ai-thinking-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,GAAI,CAAC;AAC1D,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Thinking } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Thinking isThinking={true} thinkingMs={1400} />;\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Thinking } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return _jsx(Thinking, { isThinking: false, thinkingMs: 1400 });
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=ai-thinking-finished.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-thinking-finished.story.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/ai-thinking-finished.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,GAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Thinking } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Thinking isThinking={false} thinkingMs={1400} />;\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { Thinking } from '../Thinking';
|
|
23
|
+
import { ThinkingDefault, ThinkingDefaultSrc, ThinkingFinished, ThinkingFinishedSrc, } from '.';
|
|
24
|
+
const componentMeta = {
|
|
25
|
+
component: Thinking,
|
|
26
|
+
id: 'components-ai-thinking',
|
|
27
|
+
parameters: {
|
|
28
|
+
controls: { disable: true },
|
|
29
|
+
},
|
|
30
|
+
tags: ['docsPage'],
|
|
31
|
+
title: 'Components/AI/Thinking',
|
|
32
|
+
};
|
|
33
|
+
export default componentMeta;
|
|
34
|
+
export const Default = {
|
|
35
|
+
args: {},
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
source: {
|
|
39
|
+
code: ThinkingDefaultSrc,
|
|
40
|
+
language: 'tsx',
|
|
41
|
+
type: 'code',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
render: ThinkingDefault,
|
|
46
|
+
};
|
|
47
|
+
export const Finished = {
|
|
48
|
+
args: {},
|
|
49
|
+
parameters: {
|
|
50
|
+
docs: {
|
|
51
|
+
source: {
|
|
52
|
+
code: ThinkingFinishedSrc,
|
|
53
|
+
language: 'tsx',
|
|
54
|
+
type: 'code',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
render: ThinkingFinished,
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=ai-thinking.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-thinking.stories.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/ai-thinking.stories.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,QAAQ;IACnB,EAAE,EAAE,wBAAwB;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,wBAAwB;CAChC,CAAC;AAEF,eAAe,aAAa,CAAC;AAI7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Thinking } from '../Thinking';\nimport {\n ThinkingDefault,\n ThinkingDefaultSrc,\n ThinkingFinished,\n ThinkingFinishedSrc,\n} from '.';\n\nconst componentMeta: Meta<typeof Thinking> = {\n component: Thinking,\n id: 'components-ai-thinking',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/AI/Thinking',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ThinkingDefaultSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ThinkingDefault,\n};\n\nexport const Finished: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: ThinkingFinishedSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: ThinkingFinished,\n};\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as ThinkingDefault } from './ai-thinking-default.story';
|
|
22
|
+
export { default as ThinkingFinished } from './ai-thinking-finished.story';
|
|
23
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
24
|
+
import ThinkingDefaultSrcRaw from './ai-thinking-default.story?raw';
|
|
25
|
+
import ThinkingFinishedSrcRaw from './ai-thinking-finished.story?raw';
|
|
26
|
+
export const ThinkingDefaultSrc = removeLicenseHeader(ThinkingDefaultSrcRaw);
|
|
27
|
+
export const ThinkingFinishedSrc = removeLicenseHeader(ThinkingFinishedSrcRaw);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/thinking/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,qBAAqB,MAAM,iCAAiC,CAAC;AACpE,OAAO,sBAAsB,MAAM,kCAAkC,CAAC;AAEtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ThinkingDefault } from './ai-thinking-default.story';\nexport { default as ThinkingFinished } from './ai-thinking-finished.story';\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport ThinkingDefaultSrcRaw from './ai-thinking-default.story?raw';\nimport ThinkingFinishedSrcRaw from './ai-thinking-finished.story?raw';\n\nexport const ThinkingDefaultSrc = removeLicenseHeader(ThinkingDefaultSrcRaw);\nexport const ThinkingFinishedSrc = removeLicenseHeader(ThinkingFinishedSrcRaw);\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Formats a duration in milliseconds to a human-readable representation with automatic unit selection.
|
|
23
|
+
*
|
|
24
|
+
* The function selects the most appropriate time unit (milliseconds, seconds, minutes, or hours)
|
|
25
|
+
* based on the input value and applies smart rounding:
|
|
26
|
+
* - Values under 10 in a given unit are rounded to 1 decimal place
|
|
27
|
+
* - Values 10 or greater are rounded to whole numbers
|
|
28
|
+
* - Unit names are automatically pluralized based on the value
|
|
29
|
+
*
|
|
30
|
+
* @param ms - The duration in milliseconds to format. Negative or NaN values return { unit: 'seconds', value: 0 }
|
|
31
|
+
* @returns An object containing:
|
|
32
|
+
* - `unit`: The time unit string (e.g., 'second', 'seconds', 'minute', 'minutes')
|
|
33
|
+
* - `value`: The numeric value in the selected unit
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* formatThinkingDuration(500) // { unit: 'milliseconds', value: 500 }
|
|
37
|
+
* formatThinkingDuration(1500) // { unit: 'seconds', value: 1.5 }
|
|
38
|
+
* formatThinkingDuration(65000) // { unit: 'minutes', value: 1.1 }
|
|
39
|
+
* formatThinkingDuration(3600000) // { unit: 'hour', value: 1 }
|
|
40
|
+
*/
|
|
41
|
+
export const formatThinkingDuration = (ms) => {
|
|
42
|
+
if (Number.isNaN(ms) || ms < 0) {
|
|
43
|
+
return { unit: 'seconds', value: 0 };
|
|
44
|
+
}
|
|
45
|
+
if (ms < 1000) {
|
|
46
|
+
const value = Math.round(ms);
|
|
47
|
+
const unit = value === 1 ? 'millisecond' : 'milliseconds';
|
|
48
|
+
return { unit, value };
|
|
49
|
+
}
|
|
50
|
+
const seconds = ms / 1000;
|
|
51
|
+
if (seconds < 60) {
|
|
52
|
+
const value = seconds < 10 ? Math.round(seconds * 10) / 10 : Math.round(seconds);
|
|
53
|
+
const unit = value === 1 ? 'second' : 'seconds';
|
|
54
|
+
return { unit, value };
|
|
55
|
+
}
|
|
56
|
+
const minutes = seconds / 60;
|
|
57
|
+
if (minutes < 60) {
|
|
58
|
+
const value = minutes < 10 ? Math.round(minutes * 10) / 10 : Math.round(minutes);
|
|
59
|
+
const unit = value === 1 ? 'minute' : 'minutes';
|
|
60
|
+
return { unit, value };
|
|
61
|
+
}
|
|
62
|
+
const hours = minutes / 60;
|
|
63
|
+
const value = hours < 10 ? Math.round(hours * 10) / 10 : Math.round(hours);
|
|
64
|
+
const unit = value === 1 ? 'hour' : 'hours';
|
|
65
|
+
return { unit, value };
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=thinking-duration-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-duration-formatter.js","sourceRoot":"","sources":["../../../../src/ai/thinking/thinking-duration-formatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,EAAU,EACuB,EAAE;IACnC,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACvC,CAAC;IAED,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;QAC1D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;IAE1B,IAAI,OAAO,GAAG,EAAE,EAAE,CAAC;QACjB,MAAM,KAAK,GACT,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAChD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,GAAG,EAAE,CAAC;IAE7B,IAAI,OAAO,GAAG,EAAE,EAAE,CAAC;QACjB,MAAM,KAAK,GACT,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QAChD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,GAAG,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3E,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAE5C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACzB,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Formats a duration in milliseconds to a human-readable representation with automatic unit selection.\n *\n * The function selects the most appropriate time unit (milliseconds, seconds, minutes, or hours)\n * based on the input value and applies smart rounding:\n * - Values under 10 in a given unit are rounded to 1 decimal place\n * - Values 10 or greater are rounded to whole numbers\n * - Unit names are automatically pluralized based on the value\n *\n * @param ms - The duration in milliseconds to format. Negative or NaN values return { unit: 'seconds', value: 0 }\n * @returns An object containing:\n * - `unit`: The time unit string (e.g., 'second', 'seconds', 'minute', 'minutes')\n * - `value`: The numeric value in the selected unit\n *\n * @example\n * formatThinkingDuration(500) // { unit: 'milliseconds', value: 500 }\n * formatThinkingDuration(1500) // { unit: 'seconds', value: 1.5 }\n * formatThinkingDuration(65000) // { unit: 'minutes', value: 1.1 }\n * formatThinkingDuration(3600000) // { unit: 'hour', value: 1 }\n */\nexport const formatThinkingDuration = (\n ms: number,\n): { unit: string; value: number } => {\n if (Number.isNaN(ms) || ms < 0) {\n return { unit: 'seconds', value: 0 };\n }\n\n if (ms < 1000) {\n const value = Math.round(ms);\n const unit = value === 1 ? 'millisecond' : 'milliseconds';\n return { unit, value };\n }\n\n const seconds = ms / 1000;\n\n if (seconds < 60) {\n const value =\n seconds < 10 ? Math.round(seconds * 10) / 10 : Math.round(seconds);\n const unit = value === 1 ? 'second' : 'seconds';\n return { unit, value };\n }\n\n const minutes = seconds / 60;\n\n if (minutes < 60) {\n const value =\n minutes < 10 ? Math.round(minutes * 10) / 10 : Math.round(minutes);\n const unit = value === 1 ? 'minute' : 'minutes';\n return { unit, value };\n }\n\n const hours = minutes / 60;\n const value = hours < 10 ? Math.round(hours * 10) / 10 : Math.round(hours);\n const unit = value === 1 ? 'hour' : 'hours';\n\n return { unit, value };\n};\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import { Code, Typography } from '@neo4j-ndl/react';
|
|
34
|
+
import { CheckIconOutline } from '@neo4j-ndl/react/icons';
|
|
35
|
+
import classNames from 'classnames';
|
|
36
|
+
/**
|
|
37
|
+
* The component is used to display that an LLM is using a tool.
|
|
38
|
+
* Per default, the component will display the text "Using".
|
|
39
|
+
* If the `isDone` prop is true, the component will display the check icon and the text "Ran".
|
|
40
|
+
*
|
|
41
|
+
* @alpha - Changes to this component may be breaking.
|
|
42
|
+
*/
|
|
43
|
+
const ToolCall = (_a) => {
|
|
44
|
+
var { children, isDone = false, ref, className, style, htmlAttributes } = _a, restProps = __rest(_a, ["children", "isDone", "ref", "className", "style", "htmlAttributes"]);
|
|
45
|
+
const classes = classNames('ndl-ai-tool n-inline-flex n-items-center n-gap-token-12 n-flex-row', className);
|
|
46
|
+
return (_jsxs(Typography, Object.assign({ variant: "body-medium", ref: ref, className: classes, style: style, htmlAttributes: htmlAttributes }, restProps, { children: [_jsx("span", { className: "n-text-neutral-text-weak n-capitalize n-inline-flex n-items-center n-gap-token-6 n-flex-row", children: isDone ? (_jsxs(_Fragment, { children: [_jsx(CheckIconOutline, { className: "n-size-token-16 n-text-neutral-text-weaker" }), "Ran"] })) : ('Using') }), _jsx(Code, { isRunnable: false, children: children })] })));
|
|
47
|
+
};
|
|
48
|
+
export { ToolCall };
|
|
49
|
+
//# sourceMappingURL=ToolCall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCall.js","sourceRoot":"","sources":["../../../../src/ai/tool-call/ToolCall.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,CAAC,EAQmB,EAAE,EAAE;QARvB,EAChB,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,GAAG,EACH,SAAS,EACT,KAAK,EACL,cAAc,OAEqB,EADhC,SAAS,cAPI,qEAQjB,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CACxB,oEAAoE,EACpE,SAAS,CACV,CAAC;IAEF,OAAO,CACL,MAAC,UAAU,kBACT,OAAO,EAAC,aAAa,EACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,IAC1B,SAAS,eAEb,eAAM,SAAS,EAAC,6FAA6F,YAC1G,MAAM,CAAC,CAAC,CAAC,CACR,8BACE,KAAC,gBAAgB,IAAC,SAAS,EAAC,4CAA4C,GAAG,WAE1E,CACJ,CAAC,CAAC,CAAC,CACF,OAAO,CACR,GACI,EACP,KAAC,IAAI,IAAC,UAAU,EAAE,KAAK,YAAG,QAAQ,GAAQ,KAC/B,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Code, Typography } from '@neo4j-ndl/react';\nimport { type CommonProps } from '@neo4j-ndl/react/_common/types';\nimport { CheckIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\n\ntype ToolCallProps = {\n /** The content of the suggestion */\n children?: React.ReactNode;\n /** Whether the AI is done with using the tool*/\n isDone?: boolean;\n};\n\n/**\n * The component is used to display that an LLM is using a tool.\n * Per default, the component will display the text \"Using\".\n * If the `isDone` prop is true, the component will display the check icon and the text \"Ran\".\n *\n * @alpha - Changes to this component may be breaking.\n */\nconst ToolCall = ({\n children,\n isDone = false,\n ref,\n className,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'span', ToolCallProps>) => {\n const classes = classNames(\n 'ndl-ai-tool n-inline-flex n-items-center n-gap-token-12 n-flex-row',\n className,\n );\n\n return (\n <Typography\n variant=\"body-medium\"\n ref={ref}\n className={classes}\n style={style}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n <span className=\"n-text-neutral-text-weak n-capitalize n-inline-flex n-items-center n-gap-token-6 n-flex-row\">\n {isDone ? (\n <>\n <CheckIconOutline className=\"n-size-token-16 n-text-neutral-text-weaker\" />\n Ran\n </>\n ) : (\n 'Using'\n )}\n </span>\n <Code isRunnable={false}>{children}</Code>\n </Typography>\n );\n};\n\nexport { ToolCall };\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './ToolCall';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ai/tool-call/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,YAAY,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './ToolCall';\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as ToolCallDefault } from './tool-call-default.story';
|
|
22
|
+
export { default as ToolCallDone } from './tool-call-done.story';
|
|
23
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
24
|
+
import ToolCallDefaultSrcRaw from './tool-call-default.story?raw';
|
|
25
|
+
import ToolCallDoneSrcRaw from './tool-call-done.story?raw';
|
|
26
|
+
export const ToolCallDefaultSrc = removeLicenseHeader(ToolCallDefaultSrcRaw);
|
|
27
|
+
export const ToolCallDoneSrc = removeLicenseHeader(ToolCallDoneSrcRaw);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ai/tool-call/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,qBAAqB,MAAM,+BAA+B,CAAC;AAClE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAE5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ToolCallDefault } from './tool-call-default.story';\nexport { default as ToolCallDone } from './tool-call-done.story';\n\nimport { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';\n\nimport ToolCallDefaultSrcRaw from './tool-call-default.story?raw';\nimport ToolCallDoneSrcRaw from './tool-call-done.story?raw';\n\nexport const ToolCallDefaultSrc = removeLicenseHeader(ToolCallDefaultSrcRaw);\nexport const ToolCallDoneSrc = removeLicenseHeader(ToolCallDoneSrcRaw);\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { ToolCall } from '@neo4j-ndl/react/ai';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return _jsx(ToolCall, { children: "list_import_jobs" });
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=tool-call-default.story.js.map
|