@burdenoff/microfe-healthybowl 2026.725.3 → 2026.725.4
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/assistant/AssistantChatArea.js +127 -141
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/components/assistant/AssistantMarkdownImage.js +87 -0
- package/dist/components/assistant/AssistantMarkdownImage.js.map +1 -0
- package/dist/components/assistant/AssistantMarkdownRenderer.js +174 -183
- package/dist/components/assistant/AssistantMarkdownRenderer.js.map +1 -1
- package/dist/components/assistant/AssistantMessageAttachments.js +80 -0
- package/dist/components/assistant/AssistantMessageAttachments.js.map +1 -0
- package/dist/components/assistant/AssistantMessageItem.js +85 -73
- package/dist/components/assistant/AssistantMessageItem.js.map +1 -1
- package/dist/components/assistant/AssistantMessageList.js +6 -1
- package/dist/components/assistant/AssistantMessageList.js.map +1 -1
- package/dist/components/assistant/composer/AssistantAttachmentButton.js +26 -12
- package/dist/components/assistant/composer/AssistantAttachmentButton.js.map +1 -1
- package/dist/components/assistant/composer/AssistantAttachmentChips.js +65 -0
- package/dist/components/assistant/composer/AssistantAttachmentChips.js.map +1 -0
- package/dist/components/assistant/composer/AssistantComposer.js +134 -76
- package/dist/components/assistant/composer/AssistantComposer.js.map +1 -1
- package/dist/components/assistant/composer/AssistantModeSelector.js +60 -21
- package/dist/components/assistant/composer/AssistantModeSelector.js.map +1 -1
- package/dist/components/assistant/composer/AssistantVoiceButton.js +9 -8
- package/dist/components/assistant/composer/AssistantVoiceButton.js.map +1 -1
- package/dist/components/assistant/index.js +4 -0
- package/dist/healthybowl/pages/pest-management/AiPestDetectionPage.js +4 -4
- package/dist/hooks/useAssistantAttachments.js +181 -0
- package/dist/hooks/useAssistantAttachments.js.map +1 -0
- package/dist/hooks/useVoiceInput.js +86 -0
- package/dist/hooks/useVoiceInput.js.map +1 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +63 -0
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +8 -0
- package/dist/node_modules/@ungap/structured-clone/esm/index.js.map +1 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +93 -0
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -0
- package/dist/node_modules/bail/index.js +8 -0
- package/dist/node_modules/bail/index.js.map +1 -0
- package/dist/node_modules/ccount/index.js +12 -0
- package/dist/node_modules/ccount/index.js.map +1 -0
- package/dist/node_modules/comma-separated-tokens/index.js +9 -0
- package/dist/node_modules/comma-separated-tokens/index.js.map +1 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js +12 -0
- package/dist/node_modules/decode-named-character-reference/index.dom.js.map +1 -0
- package/dist/node_modules/devlop/lib/default.js +7 -0
- package/dist/node_modules/devlop/lib/default.js.map +1 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +9 -0
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js.map +1 -0
- package/dist/node_modules/extend/index.js +42 -0
- package/dist/node_modules/extend/index.js.map +1 -0
- package/dist/node_modules/hast-util-sanitize/lib/index.js +163 -0
- package/dist/node_modules/hast-util-sanitize/lib/index.js.map +1 -0
- package/dist/node_modules/hast-util-sanitize/lib/schema.js +76 -0
- package/dist/node_modules/hast-util-sanitize/lib/schema.js.map +1 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +255 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js.map +1 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js +12 -0
- package/dist/node_modules/hast-util-whitespace/lib/index.js.map +1 -0
- package/dist/node_modules/html-url-attributes/lib/index.js +38 -0
- package/dist/node_modules/html-url-attributes/lib/index.js.map +1 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js +92 -0
- package/dist/node_modules/inline-style-parser/cjs/index.js.map +1 -0
- package/dist/node_modules/is-plain-obj/index.js +10 -0
- package/dist/node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/node_modules/longest-streak/index.js +11 -0
- package/dist/node_modules/longest-streak/index.js.map +1 -0
- package/dist/node_modules/markdown-table/index.js +61 -0
- package/dist/node_modules/markdown-table/index.js.map +1 -0
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +63 -0
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +9 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js.map +1 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +559 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js +28 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +131 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +99 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +51 -0
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js +139 -0
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +60 -0
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-phrasing/lib/index.js +24 -0
- package/dist/node_modules/mdast-util-phrasing/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +105 -0
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +24 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +32 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +23 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +58 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +19 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +20 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +17 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +61 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +22 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +12 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +26 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +37 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +13 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +14 -0
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +21 -0
- package/dist/node_modules/mdast-util-to-hast/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +22 -0
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js.map +1 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +110 -0
- package/dist/node_modules/mdast-util-to-hast/lib/state.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +14 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +38 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +26 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +27 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +26 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +12 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +25 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +30 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +46 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +21 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +25 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +43 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +20 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +28 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +9 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +27 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +8 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +11 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +13 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +8 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +40 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +8 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +13 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +10 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +14 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js +26 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/dist/node_modules/micromark/lib/constructs.js +82 -0
- package/dist/node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +179 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +36 -0
- package/dist/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +104 -0
- package/dist/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +27 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +88 -0
- package/dist/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/node_modules/micromark/lib/parse.js +31 -0
- package/dist/node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/node_modules/micromark/lib/postprocess.js +10 -0
- package/dist/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/node_modules/micromark/lib/preprocess.js +34 -0
- package/dist/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +116 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +20 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +40 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +19 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +31 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +91 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +45 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +49 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +62 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +19 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +69 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +143 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +102 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +160 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +25 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +22 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +16 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +80 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +61 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +27 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm/index.js +20 -0
- package/dist/node_modules/micromark-extension-gfm/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +176 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +195 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +98 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +45 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +22 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +203 -0
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +36 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -0
- package/dist/node_modules/micromark-factory-destination/index.js +28 -0
- package/dist/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-label/index.js +22 -0
- package/dist/node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-space/index.js +16 -0
- package/dist/node_modules/micromark-factory-space/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-title/index.js +26 -0
- package/dist/node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +14 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/node_modules/micromark-util-character/index.js +26 -0
- package/dist/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-chunked/index.js +13 -0
- package/dist/node_modules/micromark-util-chunked/index.js.map +1 -0
- package/dist/node_modules/micromark-util-classify-character/index.js +10 -0
- package/dist/node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js +28 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +9 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +19 -0
- package/dist/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +11 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +8 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js +13 -0
- package/dist/node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +20 -0
- package/dist/node_modules/micromark-util-sanitize-uri/index.js.map +1 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js +37 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +59 -0
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +1 -0
- package/dist/node_modules/property-information/index.js +28 -0
- package/dist/node_modules/property-information/index.js.map +1 -0
- package/dist/node_modules/property-information/lib/aria.js +63 -0
- package/dist/node_modules/property-information/lib/aria.js.map +1 -0
- package/dist/node_modules/property-information/lib/find.js +33 -0
- package/dist/node_modules/property-information/lib/find.js.map +1 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js +24 -0
- package/dist/node_modules/property-information/lib/hast-to-react.js.map +1 -0
- package/dist/node_modules/property-information/lib/html.js +328 -0
- package/dist/node_modules/property-information/lib/html.js.map +1 -0
- package/dist/node_modules/property-information/lib/normalize.js +8 -0
- package/dist/node_modules/property-information/lib/normalize.js.map +1 -0
- package/dist/node_modules/property-information/lib/svg.js +566 -0
- package/dist/node_modules/property-information/lib/svg.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +9 -0
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +8 -0
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/create.js +16 -0
- package/dist/node_modules/property-information/lib/util/create.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js +20 -0
- package/dist/node_modules/property-information/lib/util/defined-info.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/info.js +11 -0
- package/dist/node_modules/property-information/lib/util/info.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/merge.js +11 -0
- package/dist/node_modules/property-information/lib/util/merge.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/schema.js +11 -0
- package/dist/node_modules/property-information/lib/util/schema.js.map +1 -0
- package/dist/node_modules/property-information/lib/util/types.js +18 -0
- package/dist/node_modules/property-information/lib/util/types.js.map +1 -0
- package/dist/node_modules/property-information/lib/xlink.js +21 -0
- package/dist/node_modules/property-information/lib/xlink.js.map +1 -0
- package/dist/node_modules/property-information/lib/xml.js +17 -0
- package/dist/node_modules/property-information/lib/xml.js.map +1 -0
- package/dist/node_modules/property-information/lib/xmlns.js +16 -0
- package/dist/node_modules/property-information/lib/xmlns.js.map +1 -0
- package/dist/node_modules/react-markdown/lib/index.js +142 -0
- package/dist/node_modules/react-markdown/lib/index.js.map +1 -0
- package/dist/node_modules/rehype-sanitize/lib/index.js +11 -0
- package/dist/node_modules/rehype-sanitize/lib/index.js.map +1 -0
- package/dist/node_modules/remark-gfm/lib/index.js +12 -0
- package/dist/node_modules/remark-gfm/lib/index.js.map +1 -0
- package/dist/node_modules/remark-parse/lib/index.js +18 -0
- package/dist/node_modules/remark-parse/lib/index.js.map +1 -0
- package/dist/node_modules/remark-rehype/lib/index.js +20 -0
- package/dist/node_modules/remark-rehype/lib/index.js.map +1 -0
- package/dist/node_modules/space-separated-tokens/index.js +8 -0
- package/dist/node_modules/space-separated-tokens/index.js.map +1 -0
- package/dist/node_modules/style-to-js/cjs/index.js +21 -0
- package/dist/node_modules/style-to-js/cjs/index.js.map +1 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js +20 -0
- package/dist/node_modules/style-to-js/cjs/utilities.js.map +1 -0
- package/dist/node_modules/style-to-object/cjs/index.js +25 -0
- package/dist/node_modules/style-to-object/cjs/index.js.map +1 -0
- package/dist/node_modules/trim-lines/index.js +23 -0
- package/dist/node_modules/trim-lines/index.js.map +1 -0
- package/dist/node_modules/trough/lib/index.js +52 -0
- package/dist/node_modules/trough/lib/index.js.map +1 -0
- package/dist/node_modules/unified/lib/callable-instance.js +11 -0
- package/dist/node_modules/unified/lib/callable-instance.js.map +1 -0
- package/dist/node_modules/unified/lib/index.js +163 -0
- package/dist/node_modules/unified/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-is/lib/index.js +49 -0
- package/dist/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-position/lib/index.js +24 -0
- package/dist/node_modules/unist-util-position/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +17 -0
- package/dist/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-visit/lib/index.js +14 -0
- package/dist/node_modules/unist-util-visit/lib/index.js.map +1 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +8 -0
- package/dist/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +38 -0
- package/dist/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/node_modules/vfile/lib/index.js +91 -0
- package/dist/node_modules/vfile/lib/index.js.map +1 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js +101 -0
- package/dist/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js +9 -0
- package/dist/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js +33 -0
- package/dist/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js +8 -0
- package/dist/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/node_modules/vfile-message/lib/index.js +26 -0
- package/dist/node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/services/assistantApi.js +2 -2
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/types/assistant.js.map +1 -1
- package/dist/utils/assistantAttachments.js +140 -0
- package/dist/utils/assistantAttachments.js.map +1 -0
- package/dist/utils/assistantContext.js +25 -0
- package/dist/utils/assistantContext.js.map +1 -0
- package/package.json +5 -2
- package/dist/utils/sanitizeUrl.js +0 -9
- package/dist/utils/sanitizeUrl.js.map +0 -1
|
@@ -2,49 +2,31 @@ import { useAssistantStore as e } from "../../store/assistantStore.js";
|
|
|
2
2
|
import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
3
3
|
import { checkAssistantAiCredits as n, createAssistantSandbox as r, createAssistantSession as i, extendAssistantSandboxTTL as a, findExistingSandbox as o, getAssistantArtifacts as s, getAssistantMessages as c, getAssistantSession as l, reportAssistantAiTokenUsage as u, sendAssistantPromptAsync as d, waitForAssistantServiceReady as f, waitForSandboxReady as p } from "../../services/assistantApi.js";
|
|
4
4
|
import { gatherPageContext as m } from "../../utils/pageContext.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
5
|
+
import { getOrganizationId as h, getWorkspaceId as g } from "../../utils/assistantContext.js";
|
|
6
|
+
import { buildPromptParts as ee, buildPromptWithAttachments as te, toMessageAttachment as _ } from "../../utils/assistantAttachments.js";
|
|
7
|
+
import { AssistantMessageList as v } from "./AssistantMessageList.js";
|
|
8
|
+
import { AssistantApiCallsConsentDialog as y } from "./AssistantApiCallsConsentDialog.js";
|
|
9
|
+
import { ASSISTANT_MODES as b } from "../../types/assistant.js";
|
|
10
|
+
import { AssistantEmptyState as x } from "./AssistantEmptyState.js";
|
|
11
|
+
import { AssistantComposer as ne } from "./composer/AssistantComposer.js";
|
|
12
|
+
import { useAssistantApiAccess as re } from "../../hooks/useAssistantApiAccess.js";
|
|
13
|
+
import { isQuotaExhaustedError as ie } from "../../utils/quotaUtils.js";
|
|
14
|
+
import { dispatchAssistantQuotaExhausted as ae, notifyAiCreditsUpdated as oe } from "../../utils/aiCredits.js";
|
|
15
|
+
import { buildPromptForMode as se } from "../../utils/assistantPrompt.js";
|
|
16
|
+
import { useCallback as S, useEffect as C, useMemo as ce, useRef as w, useState as le } from "react";
|
|
17
|
+
import { jsx as T, jsxs as ue } from "react/jsx-runtime";
|
|
18
|
+
import { useGatewayClient as de } from "@burdenoff/fe-libs/shared/graphql";
|
|
19
|
+
import { useAuthToken as fe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
18
20
|
//#region src/components/assistant/AssistantChatArea.tsx
|
|
19
|
-
var
|
|
21
|
+
var pe = {
|
|
20
22
|
general: 18e4,
|
|
21
23
|
"api-calls": 18e4,
|
|
22
24
|
"vibe-plugins": 6e5
|
|
23
|
-
},
|
|
24
|
-
function
|
|
25
|
+
}, me = 18e4;
|
|
26
|
+
function he() {
|
|
25
27
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
26
28
|
}
|
|
27
|
-
function
|
|
28
|
-
try {
|
|
29
|
-
let t = e === "workspaceId" ? "burdenoff-active-context-workspace" : "burdenoff-active-context-organization", n = sessionStorage.getItem(t);
|
|
30
|
-
if (n) return n;
|
|
31
|
-
let r = localStorage.getItem(t);
|
|
32
|
-
if (r) return r;
|
|
33
|
-
let i = sessionStorage.getItem("bf-active-profile");
|
|
34
|
-
if (!i) return "";
|
|
35
|
-
let a = localStorage.getItem(`bf-p-${i}-context`);
|
|
36
|
-
return a ? JSON.parse(a)[e] ?? "" : "";
|
|
37
|
-
} catch {
|
|
38
|
-
return "";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function pe() {
|
|
42
|
-
return new URLSearchParams(window.location.search).get("workspace") ?? w("workspaceId");
|
|
43
|
-
}
|
|
44
|
-
function me() {
|
|
45
|
-
return new URLSearchParams(window.location.search).get("org") ?? w("organizationId");
|
|
46
|
-
}
|
|
47
|
-
function he(e) {
|
|
29
|
+
function ge(e) {
|
|
48
30
|
let t = e instanceof Error ? e.message.toLowerCase() : String(e).toLowerCase();
|
|
49
31
|
return t.includes("rate limit exceeded") || t.includes("unauthorized") || t.includes("k8s api error 401") ? !1 : [
|
|
50
32
|
"sandbox not found",
|
|
@@ -59,7 +41,7 @@ function he(e) {
|
|
|
59
41
|
"session mode mismatch"
|
|
60
42
|
].some((e) => t.includes(e));
|
|
61
43
|
}
|
|
62
|
-
function
|
|
44
|
+
function _e(e) {
|
|
63
45
|
return e.replace(/(Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/(X-Workspace-Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+\.[A-Za-z0-9._-]+\b/g, "[REDACTED_JWT]").replace(/\bsk-ant-[A-Za-z0-9-]+\b/g, "[REDACTED_API_KEY]");
|
|
64
46
|
}
|
|
65
47
|
function E(e) {
|
|
@@ -74,7 +56,7 @@ function O(e) {
|
|
|
74
56
|
return t === "completed" ? `Completed: ${n}` : t === "failed" ? `Failed: ${n}` : `Running: ${n}`;
|
|
75
57
|
});
|
|
76
58
|
}
|
|
77
|
-
function
|
|
59
|
+
function ve(e, t) {
|
|
78
60
|
let n = e.filter((e) => e.info?.role === "assistant" && E(e) > t).sort((e, t) => E(e) - E(t));
|
|
79
61
|
if (n.length === 0) return {
|
|
80
62
|
content: "Thinking...",
|
|
@@ -87,7 +69,7 @@ function k(e, t) {
|
|
|
87
69
|
tokens: r.info?.tokens
|
|
88
70
|
};
|
|
89
71
|
}
|
|
90
|
-
function
|
|
72
|
+
function ye(e) {
|
|
91
73
|
switch (e) {
|
|
92
74
|
case "provisioning": return "Starting assistant environment...";
|
|
93
75
|
case "connecting": return "Connecting to assistant...";
|
|
@@ -95,146 +77,150 @@ function ge(e) {
|
|
|
95
77
|
default: return "";
|
|
96
78
|
}
|
|
97
79
|
}
|
|
98
|
-
var
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
let e =
|
|
80
|
+
var k = () => {
|
|
81
|
+
let D = t(), O = de("workspace"), { getAccessToken: k, getWorkspaceToken: be, userId: A } = fe(), { conversations: j, activeConversationId: M, mode: N, processingByConversationId: P, setMode: F, setConversationMode: I, setActiveConversation: xe, createConversation: L, addMessage: R, updateMessage: z, patchMessage: B, setConversationProcessing: V, clearConversationProcessing: Se, setBackendSessionId: H, clearBackendSessionId: U, setSandbox: W, clearSandbox: Ce, acknowledgeApiCalls: we } = e(), G = j.find((e) => e.id === M)?.messages ?? [], K = M ? P[M] : void 0, Te = K?.messageId ?? null, Ee = K?.status === "provisioning" || K?.status === "connecting" || K?.status === "streaming", De = K?.status === "error" ? K.messageId : null, { canUseApiCalls: q, loading: Oe } = re(h()), ke = ce(() => b.filter((e) => !e.requiresAdmin || q), [q]), [J, Y] = le(null), Ae = w([]);
|
|
82
|
+
C(() => {
|
|
83
|
+
if (Oe) return;
|
|
84
|
+
let e = b.find((e) => e.id === N);
|
|
103
85
|
(!e || e.requiresAdmin && !q) && N !== "general" && F("general");
|
|
104
86
|
}, [
|
|
105
87
|
N,
|
|
106
88
|
q,
|
|
107
|
-
|
|
89
|
+
Oe,
|
|
108
90
|
F
|
|
109
91
|
]);
|
|
110
|
-
let X =
|
|
111
|
-
V(e, n, t, null), r ? z(e, t, r) : z(e, t,
|
|
112
|
-
}, [V, z]),
|
|
92
|
+
let X = S((e, t, n, r) => {
|
|
93
|
+
V(e, n, t, null), r ? z(e, t, r) : z(e, t, ye(n));
|
|
94
|
+
}, [V, z]), je = S(async (t, n, a, s, c) => {
|
|
113
95
|
let u = e.getState().sandboxesByMode[a]?.sandboxId ?? null, d = async (e) => {
|
|
114
96
|
try {
|
|
115
|
-
return await p(
|
|
97
|
+
return await p(O, e, s, c, 3e5, (e) => X(t, n, "provisioning", e)), await f(O, e, s, c, 9e4, (e) => X(t, n, "connecting", e)), !0;
|
|
116
98
|
} catch {
|
|
117
99
|
return !1;
|
|
118
100
|
}
|
|
119
101
|
};
|
|
120
102
|
if (u && (W(a, u, "provisioning"), X(t, n, "provisioning", "Reusing assistant environment..."), await d(u) || (W(a, null, "provisioning"), u = null)), !u) {
|
|
121
103
|
X(t, n, "provisioning", "Looking for existing environment...");
|
|
122
|
-
let e = await o(
|
|
104
|
+
let e = await o(O, s, a, c);
|
|
123
105
|
e && (W(a, e, "provisioning"), X(t, n, "provisioning", "Reusing assistant environment..."), await d(e) ? u = e : W(a, null, "provisioning"));
|
|
124
106
|
}
|
|
125
107
|
if (!u) {
|
|
126
|
-
if (a === "api-calls" && !
|
|
127
|
-
X(t, n, "provisioning", "Starting assistant environment..."), W(a, null, "provisioning"), u = await r(
|
|
108
|
+
if (a === "api-calls" && !k()) throw Error("API Calls mode requires an authenticated session. Please sign in again.");
|
|
109
|
+
X(t, n, "provisioning", "Starting assistant environment..."), W(a, null, "provisioning"), u = await r(O, a, s, c), W(a, u, "provisioning"), await p(O, u, s, c, 3e5, (e) => X(t, n, "provisioning", e)), await f(O, u, s, c, 9e4, (e) => X(t, n, "connecting", e));
|
|
128
110
|
}
|
|
129
111
|
W(a, u, "running");
|
|
130
112
|
let m = e.getState().conversations.find((e) => e.id === t)?.backendSessionId ?? null;
|
|
131
113
|
if (m) try {
|
|
132
|
-
let e = await l(
|
|
114
|
+
let e = await l(O, u, s, m, c);
|
|
133
115
|
if (e.mode !== a) throw Error(`Session mode mismatch: expected ${a}, received ${e.mode}`);
|
|
134
116
|
} catch {
|
|
135
117
|
U(t), m = null;
|
|
136
118
|
}
|
|
137
|
-
return m || (X(t, n, "connecting", "Preparing session..."), m = (await i(
|
|
119
|
+
return m || (X(t, n, "connecting", "Preparing session..."), m = (await i(O, u, s, a, c)).sessionId, H(t, m)), {
|
|
138
120
|
sandboxId: u,
|
|
139
121
|
sessionId: m
|
|
140
122
|
};
|
|
141
123
|
}, [
|
|
142
|
-
D,
|
|
143
|
-
U,
|
|
144
124
|
O,
|
|
125
|
+
U,
|
|
126
|
+
k,
|
|
145
127
|
H,
|
|
146
128
|
W,
|
|
147
129
|
X
|
|
148
|
-
]), Z =
|
|
130
|
+
]), Z = S(async (t, r = []) => {
|
|
149
131
|
if (M) {
|
|
150
132
|
let e = P[M]?.status;
|
|
151
133
|
if (e === "provisioning" || e === "connecting" || e === "streaming") return;
|
|
152
134
|
}
|
|
153
|
-
let
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
135
|
+
let i = e.getState().mode, o = M, l = o ? e.getState().conversations.find((e) => e.id === o) : void 0;
|
|
136
|
+
if (o ? l && l.mode !== i && (l.messages.length > 0 || l.backendSessionId) ? o = L(void 0, i) : l && l.mode !== i && I(o, i) : o = L(void 0, i), !o) return;
|
|
137
|
+
Ae.current = r;
|
|
138
|
+
let f = g(), p = {
|
|
139
|
+
accessToken: k(),
|
|
140
|
+
workspaceToken: be(),
|
|
141
|
+
userId: A,
|
|
142
|
+
organizationId: h()
|
|
143
|
+
}, v = {
|
|
144
|
+
id: he(),
|
|
162
145
|
role: "user",
|
|
163
146
|
content: t,
|
|
164
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
147
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
148
|
+
metadata: r.length ? { attachments: r.map(_) } : void 0
|
|
165
149
|
};
|
|
166
|
-
R(
|
|
167
|
-
let
|
|
168
|
-
R(
|
|
169
|
-
id:
|
|
150
|
+
R(o, v);
|
|
151
|
+
let y = he();
|
|
152
|
+
R(o, {
|
|
153
|
+
id: y,
|
|
170
154
|
role: "assistant",
|
|
171
155
|
content: "",
|
|
172
156
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
173
157
|
});
|
|
174
|
-
let
|
|
175
|
-
B(
|
|
176
|
-
content:
|
|
177
|
-
metadata: t?.length || n ||
|
|
158
|
+
let b = (e, t, n, r) => {
|
|
159
|
+
B(o, y, {
|
|
160
|
+
content: _e(e),
|
|
161
|
+
metadata: t?.length || n || r ? {
|
|
178
162
|
artifacts: t,
|
|
179
|
-
mode:
|
|
163
|
+
mode: i,
|
|
180
164
|
sessionId: n,
|
|
181
|
-
sandboxId:
|
|
165
|
+
sandboxId: r
|
|
182
166
|
} : void 0
|
|
183
167
|
});
|
|
184
|
-
},
|
|
168
|
+
}, x = async (e = 1) => {
|
|
185
169
|
try {
|
|
186
|
-
await n(
|
|
170
|
+
await n(O, f, p);
|
|
187
171
|
} catch (e) {
|
|
188
|
-
if (
|
|
189
|
-
|
|
172
|
+
if (ie(e)) {
|
|
173
|
+
ae("ai-credits"), b("You've run out of AI credits for this billing cycle. Upgrade your plan to keep chatting."), V(o, "error", y, null);
|
|
190
174
|
return;
|
|
191
175
|
}
|
|
192
176
|
console.warn("[assistant] AI-credit pre-flight check failed with a non-quota error; proceeding — gateway @usage(checkQuota) still enforces the real budget downstream", e);
|
|
193
177
|
}
|
|
194
178
|
try {
|
|
195
|
-
let { sandboxId: e, sessionId: n } = await
|
|
196
|
-
X(
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
179
|
+
let { sandboxId: e, sessionId: n } = await je(o, y, i, f, p), l = (await c(O, e, f, n, p, 50).catch(() => [])).reduce((e, t) => Math.max(e, E(t)), 0);
|
|
180
|
+
X(o, y, "streaming", "Thinking...");
|
|
181
|
+
let h = se(i, te(t, r));
|
|
182
|
+
await d(O, e, f, n, h, i, m(), p, ee(h, r));
|
|
183
|
+
let g = ve([], l), _ = Date.now() + (pe[i] ?? me), v = Date.now();
|
|
184
|
+
for (; Date.now() < _ && (g = ve(await c(O, e, f, n, p, 50), l), B(o, y, { content: _e(g.content) }), !g.done);) Date.now() - v > 3e4 && (await a(O, e, f, 600, p).catch(() => void 0), v = Date.now()), await new Promise((e) => setTimeout(e, 1500));
|
|
185
|
+
if (!g.done && i !== "vibe-plugins") throw Error("Assistant response timed out while streaming progress");
|
|
186
|
+
let x = i === "vibe-plugins" ? await s(O, e, f, n, p).catch(() => []) : void 0;
|
|
187
|
+
if (g.done || (g = {
|
|
188
|
+
...g,
|
|
189
|
+
content: `${g.content}\n\n_Still building in the background — any artifacts below will finish shortly. Re-open this conversation to pick up the completed plugin._`
|
|
190
|
+
}), b(g.content, x, n, e), g.tokens) {
|
|
191
|
+
B(o, y, { tokens: g.tokens });
|
|
206
192
|
try {
|
|
207
|
-
await u(
|
|
193
|
+
await u(O, f, n, g.tokens, p), oe();
|
|
208
194
|
} catch {}
|
|
209
195
|
}
|
|
210
|
-
V(
|
|
196
|
+
V(o, "complete", y, null);
|
|
211
197
|
} catch (t) {
|
|
212
|
-
if (e === 1 &&
|
|
198
|
+
if (e === 1 && ge(t)) return U(o), Ce(i), x(2);
|
|
213
199
|
throw t;
|
|
214
200
|
}
|
|
215
201
|
};
|
|
216
202
|
try {
|
|
217
|
-
if (!
|
|
218
|
-
await
|
|
203
|
+
if (!f) throw Error("Assistant backend is unavailable without an active workspace context.");
|
|
204
|
+
await x();
|
|
219
205
|
} catch (e) {
|
|
220
|
-
if (
|
|
221
|
-
|
|
206
|
+
if (ie(e)) {
|
|
207
|
+
ae("sandbox"), b("You've reached your sandbox limit on the current plan. Upgrade to start the AI assistant."), V(o, "error", y, null);
|
|
222
208
|
return;
|
|
223
209
|
}
|
|
224
210
|
let t = e instanceof Error ? e.message : "Something went wrong";
|
|
225
|
-
V(
|
|
211
|
+
V(o, "error", y, t), z(o, y, `Sorry, an error occurred: ${t}. Please try again.`);
|
|
226
212
|
}
|
|
227
213
|
}, [
|
|
228
214
|
M,
|
|
229
215
|
R,
|
|
230
|
-
|
|
216
|
+
O,
|
|
231
217
|
U,
|
|
232
|
-
|
|
233
|
-
|
|
218
|
+
Ce,
|
|
219
|
+
j,
|
|
234
220
|
L,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
221
|
+
je,
|
|
222
|
+
k,
|
|
223
|
+
be,
|
|
238
224
|
B,
|
|
239
225
|
P,
|
|
240
226
|
H,
|
|
@@ -242,16 +228,16 @@ var A = () => {
|
|
|
242
228
|
V,
|
|
243
229
|
X,
|
|
244
230
|
z,
|
|
245
|
-
|
|
246
|
-
]),
|
|
231
|
+
A
|
|
232
|
+
]), Me = S((e) => {
|
|
247
233
|
Z(e);
|
|
248
|
-
}, [Z]),
|
|
234
|
+
}, [Z]), Ne = S(() => {
|
|
249
235
|
let e = [...G].reverse().find((e) => e.role === "user");
|
|
250
|
-
e && Z(e.content);
|
|
251
|
-
}, [G, Z]), Q =
|
|
252
|
-
|
|
236
|
+
e && Z(e.content, Ae.current);
|
|
237
|
+
}, [G, Z]), Q = w(Z);
|
|
238
|
+
C(() => {
|
|
253
239
|
Q.current = Z;
|
|
254
|
-
}, [Z]),
|
|
240
|
+
}, [Z]), C(() => {
|
|
255
241
|
let t = e.getState().consumePendingPrompt();
|
|
256
242
|
return t && Q.current(t), e.subscribe((t, n) => {
|
|
257
243
|
if (t.pendingPrompt && t.pendingPrompt !== n.pendingPrompt) {
|
|
@@ -260,69 +246,69 @@ var A = () => {
|
|
|
260
246
|
}
|
|
261
247
|
});
|
|
262
248
|
}, []);
|
|
263
|
-
let $ =
|
|
249
|
+
let $ = S((t) => {
|
|
264
250
|
let n = M ? e.getState().conversations.find((e) => e.id === M) : void 0;
|
|
265
251
|
if (n && (n.messages.length > 0 || n.backendSessionId)) {
|
|
266
252
|
if (n.mode !== t) {
|
|
267
253
|
let n = e.getState().conversations.find((n) => n.mode === t && n.messages.length === 0 && !n.backendSessionId && !e.getState().processingByConversationId[n.id]);
|
|
268
|
-
n ?
|
|
254
|
+
n ? xe(n.id) : L(void 0, t);
|
|
269
255
|
}
|
|
270
256
|
} else M && I(M, t);
|
|
271
257
|
F(t);
|
|
272
258
|
}, [
|
|
273
259
|
M,
|
|
274
260
|
L,
|
|
275
|
-
|
|
261
|
+
xe,
|
|
276
262
|
I,
|
|
277
263
|
F
|
|
278
|
-
]),
|
|
279
|
-
if (
|
|
264
|
+
]), Pe = S((t) => {
|
|
265
|
+
if (b.find((e) => e.id === t)?.writeCapable && !e.getState().apiCallsAcknowledged) {
|
|
280
266
|
Y(t);
|
|
281
267
|
return;
|
|
282
268
|
}
|
|
283
269
|
$(t);
|
|
284
|
-
}, [$]),
|
|
270
|
+
}, [$]), Fe = S(() => {
|
|
285
271
|
let e = J;
|
|
286
|
-
Y(null),
|
|
272
|
+
Y(null), we(), e && $(e);
|
|
287
273
|
}, [
|
|
288
274
|
J,
|
|
289
|
-
|
|
275
|
+
we,
|
|
290
276
|
$
|
|
291
|
-
]),
|
|
277
|
+
]), Ie = S(() => {
|
|
292
278
|
Y(null);
|
|
293
279
|
}, []);
|
|
294
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ ue("div", {
|
|
295
281
|
className: "flex flex-1 flex-col overflow-hidden",
|
|
296
282
|
children: [
|
|
297
|
-
G.length === 0 ? /* @__PURE__ */
|
|
283
|
+
G.length === 0 ? /* @__PURE__ */ T(x, {
|
|
298
284
|
mode: N,
|
|
299
|
-
onSuggestionClick:
|
|
300
|
-
}) : /* @__PURE__ */
|
|
285
|
+
onSuggestionClick: Me
|
|
286
|
+
}) : /* @__PURE__ */ T("div", {
|
|
301
287
|
className: "flex min-h-0 flex-1 flex-col",
|
|
302
|
-
children: /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ T(v, {
|
|
303
289
|
messages: G,
|
|
304
|
-
streamingMessageId:
|
|
305
|
-
failedMessageId:
|
|
306
|
-
onRetry:
|
|
290
|
+
streamingMessageId: Te,
|
|
291
|
+
failedMessageId: De,
|
|
292
|
+
onRetry: Ne
|
|
307
293
|
})
|
|
308
294
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
onSend: (e) => void Z(e),
|
|
311
|
-
disabled:
|
|
312
|
-
placeholder: N === "api-calls" ?
|
|
295
|
+
/* @__PURE__ */ T(ne, {
|
|
296
|
+
onSend: (e, t) => void Z(e, t),
|
|
297
|
+
disabled: Ee,
|
|
298
|
+
placeholder: N === "api-calls" ? D("healthybowl.assistant.chatArea.placeholderActions", "What would you like me to do?") : D("healthybowl.assistant.chatArea.placeholderGeneral", "Ask HealthyBowl anything…"),
|
|
313
299
|
mode: N,
|
|
314
|
-
availableModes:
|
|
315
|
-
onModeChange:
|
|
300
|
+
availableModes: ke,
|
|
301
|
+
onModeChange: Pe
|
|
316
302
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ T(y, {
|
|
318
304
|
open: J !== null,
|
|
319
|
-
onConfirm:
|
|
320
|
-
onCancel:
|
|
305
|
+
onConfirm: Fe,
|
|
306
|
+
onCancel: Ie
|
|
321
307
|
})
|
|
322
308
|
]
|
|
323
309
|
});
|
|
324
310
|
};
|
|
325
311
|
//#endregion
|
|
326
|
-
export {
|
|
312
|
+
export { k as AssistantChatArea };
|
|
327
313
|
|
|
328
314
|
//# sourceMappingURL=AssistantChatArea.js.map
|