@slices.sh/ai-chat 0.1.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/LICENSE +21 -0
- package/dist/exports.json +794 -0
- package/dist/fixture/fixture-approval.d.ts +4 -0
- package/dist/fixture/fixture-approval.js +59 -0
- package/dist/fixture/fixture-artifacts.d.ts +2 -0
- package/dist/fixture/fixture-artifacts.js +48 -0
- package/dist/fixture/fixture-question.d.ts +5 -0
- package/dist/fixture/fixture-question.js +93 -0
- package/dist/fixture/fixture-script.d.ts +35 -0
- package/dist/fixture/fixture-script.js +280 -0
- package/dist/fixture/fixture-selection.d.ts +5 -0
- package/dist/fixture/fixture-selection.js +20 -0
- package/dist/fixture/fixture.d.ts +20 -0
- package/dist/fixture/fixture.js +75 -0
- package/dist/fixture/provider.d.ts +15 -0
- package/dist/fixture/provider.js +14 -0
- package/dist/headless/always-allow.d.ts +2 -0
- package/dist/headless/always-allow.js +24 -0
- package/dist/headless/answer.d.ts +6 -0
- package/dist/headless/answer.js +29 -0
- package/dist/headless/approval-error.d.ts +2 -0
- package/dist/headless/approval-error.js +16 -0
- package/dist/headless/approval-reason.d.ts +2 -0
- package/dist/headless/approval-reason.js +13 -0
- package/dist/headless/approval-receipt.d.ts +4 -0
- package/dist/headless/approval-receipt.js +13 -0
- package/dist/headless/approve.d.ts +4 -0
- package/dist/headless/approve.js +15 -0
- package/dist/headless/branch-navigation.d.ts +2 -0
- package/dist/headless/branch-navigation.js +11 -0
- package/dist/headless/branch-next.d.ts +2 -0
- package/dist/headless/branch-next.js +21 -0
- package/dist/headless/branch-page.d.ts +5 -0
- package/dist/headless/branch-page.js +13 -0
- package/dist/headless/branch-previous.d.ts +2 -0
- package/dist/headless/branch-previous.js +21 -0
- package/dist/headless/cancel-edit.d.ts +2 -0
- package/dist/headless/cancel-edit.js +10 -0
- package/dist/headless/cancel-queue-edit.d.ts +2 -0
- package/dist/headless/cancel-queue-edit.js +15 -0
- package/dist/headless/cancel-queued.d.ts +2 -0
- package/dist/headless/cancel-queued.js +15 -0
- package/dist/headless/chat-dictation/confirm.d.ts +2 -0
- package/dist/headless/chat-dictation/confirm.js +14 -0
- package/dist/headless/chat-dictation/index.d.ts +12 -0
- package/dist/headless/chat-dictation/index.js +9 -0
- package/dist/headless/chat-dictation/input.d.ts +3 -0
- package/dist/headless/chat-dictation/input.js +42 -0
- package/dist/headless/chat-dictation/root.d.ts +3 -0
- package/dist/headless/chat-dictation/root.js +42 -0
- package/dist/headless/chat-dictation/text.d.ts +3 -0
- package/dist/headless/chat-dictation/text.js +14 -0
- package/dist/headless/chat-dictation/voice.d.ts +3 -0
- package/dist/headless/chat-dictation/voice.js +35 -0
- package/dist/headless/citation-content.d.ts +3 -0
- package/dist/headless/citation-content.js +19 -0
- package/dist/headless/citation-description.d.ts +2 -0
- package/dist/headless/citation-description.js +12 -0
- package/dist/headless/citation-root.d.ts +2 -0
- package/dist/headless/citation-root.js +13 -0
- package/dist/headless/citation-title.d.ts +2 -0
- package/dist/headless/citation-title.js +12 -0
- package/dist/headless/citation-trigger.d.ts +2 -0
- package/dist/headless/citation-trigger.js +12 -0
- package/dist/headless/clear-answer.d.ts +5 -0
- package/dist/headless/clear-answer.js +19 -0
- package/dist/headless/composer-root.d.ts +14 -0
- package/dist/headless/composer-root.js +12 -0
- package/dist/headless/composer-standalone.d.ts +3 -0
- package/dist/headless/composer-standalone.js +10 -0
- package/dist/headless/composer.d.ts +3 -0
- package/dist/headless/composer.js +24 -0
- package/dist/headless/context-usage.d.ts +3 -0
- package/dist/headless/context-usage.js +13 -0
- package/dist/headless/contexts.d.ts +77 -0
- package/dist/headless/contexts.js +53 -0
- package/dist/headless/continue.d.ts +4 -0
- package/dist/headless/continue.js +26 -0
- package/dist/headless/copy.d.ts +11 -0
- package/dist/headless/copy.js +21 -0
- package/dist/headless/deny.d.ts +4 -0
- package/dist/headless/deny.js +15 -0
- package/dist/headless/edit-queued.d.ts +2 -0
- package/dist/headless/edit-queued.js +15 -0
- package/dist/headless/edit.d.ts +2 -0
- package/dist/headless/edit.js +17 -0
- package/dist/headless/edited-attachments.d.ts +5 -0
- package/dist/headless/edited-attachments.js +11 -0
- package/dist/headless/edited-input.d.ts +2 -0
- package/dist/headless/edited-input.js +28 -0
- package/dist/headless/empty.d.ts +3 -0
- package/dist/headless/empty.js +12 -0
- package/dist/headless/failed.d.ts +15 -0
- package/dist/headless/failed.js +17 -0
- package/dist/headless/feedback-error.d.ts +2 -0
- package/dist/headless/feedback-error.js +11 -0
- package/dist/headless/feedback-root.d.ts +2 -0
- package/dist/headless/feedback-root.js +24 -0
- package/dist/headless/feedback.d.ts +4 -0
- package/dist/headless/feedback.js +18 -0
- package/dist/headless/file-audio.d.ts +2 -0
- package/dist/headless/file-audio.js +16 -0
- package/dist/headless/file-context.d.ts +4 -0
- package/dist/headless/file-context.js +7 -0
- package/dist/headless/file-img.d.ts +2 -0
- package/dist/headless/file-img.js +21 -0
- package/dist/headless/file-kind-gate.d.ts +5 -0
- package/dist/headless/file-kind-gate.js +11 -0
- package/dist/headless/file-link.d.ts +3 -0
- package/dist/headless/file-link.js +14 -0
- package/dist/headless/file-root.d.ts +5 -0
- package/dist/headless/file-root.js +13 -0
- package/dist/headless/file-unavailable.d.ts +2 -0
- package/dist/headless/file-unavailable.js +12 -0
- package/dist/headless/file-video.d.ts +2 -0
- package/dist/headless/file-video.js +16 -0
- package/dist/headless/follow-ups.d.ts +5 -0
- package/dist/headless/follow-ups.js +20 -0
- package/dist/headless/forget-approval.d.ts +2 -0
- package/dist/headless/forget-approval.js +21 -0
- package/dist/headless/gate-content.d.ts +2 -0
- package/dist/headless/gate-content.js +6 -0
- package/dist/headless/index.d.ts +249 -0
- package/dist/headless/index.js +251 -0
- package/dist/headless/input.d.ts +11 -0
- package/dist/headless/input.js +18 -0
- package/dist/headless/jump-to-latest.d.ts +3 -0
- package/dist/headless/jump-to-latest.js +14 -0
- package/dist/headless/message-edit-root.d.ts +2 -0
- package/dist/headless/message-edit-root.js +13 -0
- package/dist/headless/message-editing.d.ts +2 -0
- package/dist/headless/message-editing.js +10 -0
- package/dist/headless/message-editor.d.ts +2 -0
- package/dist/headless/message-editor.js +19 -0
- package/dist/headless/message-footer.d.ts +3 -0
- package/dist/headless/message-footer.js +15 -0
- package/dist/headless/message-reading.d.ts +2 -0
- package/dist/headless/message-reading.js +10 -0
- package/dist/headless/message.d.ts +11 -0
- package/dist/headless/message.js +34 -0
- package/dist/headless/messages.d.ts +9 -0
- package/dist/headless/messages.js +19 -0
- package/dist/headless/model-picker.d.ts +2 -0
- package/dist/headless/model-picker.js +14 -0
- package/dist/headless/model.d.ts +4 -0
- package/dist/headless/model.js +13 -0
- package/dist/headless/models.d.ts +5 -0
- package/dist/headless/models.js +11 -0
- package/dist/headless/optional-tools.d.ts +7 -0
- package/dist/headless/optional-tools.js +12 -0
- package/dist/headless/other-answer.d.ts +5 -0
- package/dist/headless/other-answer.js +32 -0
- package/dist/headless/part-approval.d.ts +2 -0
- package/dist/headless/part-approval.js +33 -0
- package/dist/headless/part-file.d.ts +6 -0
- package/dist/headless/part-file.js +11 -0
- package/dist/headless/part-question.d.ts +2 -0
- package/dist/headless/part-question.js +57 -0
- package/dist/headless/part-reasoning.d.ts +15 -0
- package/dist/headless/part-reasoning.js +26 -0
- package/dist/headless/part-source.d.ts +5 -0
- package/dist/headless/part-source.js +20 -0
- package/dist/headless/part-text.d.ts +16 -0
- package/dist/headless/part-text.js +29 -0
- package/dist/headless/part-tool.d.ts +16 -0
- package/dist/headless/part-tool.js +14 -0
- package/dist/headless/parts.d.ts +11 -0
- package/dist/headless/parts.js +11 -0
- package/dist/headless/question-back.d.ts +2 -0
- package/dist/headless/question-back.js +16 -0
- package/dist/headless/question-error.d.ts +2 -0
- package/dist/headless/question-error.js +14 -0
- package/dist/headless/question-invalid.d.ts +8 -0
- package/dist/headless/question-invalid.js +18 -0
- package/dist/headless/question-item.d.ts +8 -0
- package/dist/headless/question-item.js +51 -0
- package/dist/headless/question-next.d.ts +3 -0
- package/dist/headless/question-next.js +16 -0
- package/dist/headless/question-other.d.ts +5 -0
- package/dist/headless/question-other.js +22 -0
- package/dist/headless/question-progress.d.ts +8 -0
- package/dist/headless/question-progress.js +14 -0
- package/dist/headless/question-receipt.d.ts +11 -0
- package/dist/headless/question-receipt.js +29 -0
- package/dist/headless/questions.d.ts +3 -0
- package/dist/headless/questions.js +13 -0
- package/dist/headless/queue-editing.d.ts +4 -0
- package/dist/headless/queue-editing.js +11 -0
- package/dist/headless/queue-item.d.ts +2 -0
- package/dist/headless/queue-item.js +10 -0
- package/dist/headless/queue-items.d.ts +2 -0
- package/dist/headless/queue-items.js +11 -0
- package/dist/headless/queue-preview.d.ts +6 -0
- package/dist/headless/queue-preview.js +11 -0
- package/dist/headless/queued-input.d.ts +2 -0
- package/dist/headless/queued-input.js +27 -0
- package/dist/headless/queued.d.ts +17 -0
- package/dist/headless/queued.js +16 -0
- package/dist/headless/read-aloud.d.ts +5 -0
- package/dist/headless/read-aloud.js +19 -0
- package/dist/headless/reasoning-disclosure.d.ts +3 -0
- package/dist/headless/reasoning-disclosure.js +17 -0
- package/dist/headless/reasoning-timer.d.ts +5 -0
- package/dist/headless/reasoning-timer.js +13 -0
- package/dist/headless/references.d.ts +6 -0
- package/dist/headless/references.js +13 -0
- package/dist/headless/regenerate.d.ts +3 -0
- package/dist/headless/regenerate.js +22 -0
- package/dist/headless/remembered-approval.d.ts +2 -0
- package/dist/headless/remembered-approval.js +14 -0
- package/dist/headless/root.d.ts +30 -0
- package/dist/headless/root.js +99 -0
- package/dist/headless/save-edit.d.ts +2 -0
- package/dist/headless/save-edit.js +16 -0
- package/dist/headless/save-queued.d.ts +2 -0
- package/dist/headless/save-queued.js +15 -0
- package/dist/headless/send-now.d.ts +2 -0
- package/dist/headless/send-now.js +17 -0
- package/dist/headless/settings.d.ts +2 -0
- package/dist/headless/settings.js +10 -0
- package/dist/headless/skip-questions.d.ts +6 -0
- package/dist/headless/skip-questions.js +18 -0
- package/dist/headless/source-context.d.ts +5 -0
- package/dist/headless/source-context.js +9 -0
- package/dist/headless/source-link.d.ts +2 -0
- package/dist/headless/source-link.js +13 -0
- package/dist/headless/source-primitives.d.ts +1 -0
- package/dist/headless/source-primitives.js +7 -0
- package/dist/headless/source-root.d.ts +5 -0
- package/dist/headless/source-root.js +9 -0
- package/dist/headless/source-sheet-close.d.ts +2 -0
- package/dist/headless/source-sheet-close.js +12 -0
- package/dist/headless/source-sheet-content.d.ts +3 -0
- package/dist/headless/source-sheet-content.js +16 -0
- package/dist/headless/source-sheet-description.d.ts +2 -0
- package/dist/headless/source-sheet-description.js +12 -0
- package/dist/headless/source-sheet-root.d.ts +2 -0
- package/dist/headless/source-sheet-root.js +13 -0
- package/dist/headless/source-sheet-title.d.ts +2 -0
- package/dist/headless/source-sheet-title.js +12 -0
- package/dist/headless/source-sheet-trigger.d.ts +2 -0
- package/dist/headless/source-sheet-trigger.js +12 -0
- package/dist/headless/source-unavailable.d.ts +2 -0
- package/dist/headless/source-unavailable.js +9 -0
- package/dist/headless/sources.d.ts +14 -0
- package/dist/headless/sources.js +12 -0
- package/dist/headless/speaker.d.ts +13 -0
- package/dist/headless/speaker.js +10 -0
- package/dist/headless/step-boundary.d.ts +4 -0
- package/dist/headless/step-boundary.js +16 -0
- package/dist/headless/stop.d.ts +10 -0
- package/dist/headless/stop.js +18 -0
- package/dist/headless/stopped.d.ts +11 -0
- package/dist/headless/stopped.js +17 -0
- package/dist/headless/submit-answers.d.ts +3 -0
- package/dist/headless/submit-answers.js +12 -0
- package/dist/headless/submit.d.ts +23 -0
- package/dist/headless/submit.js +24 -0
- package/dist/headless/suggestion.d.ts +10 -0
- package/dist/headless/suggestion.js +14 -0
- package/dist/headless/suggestions.d.ts +8 -0
- package/dist/headless/suggestions.js +12 -0
- package/dist/headless/thread.d.ts +3 -0
- package/dist/headless/thread.js +25 -0
- package/dist/headless/timing.d.ts +5 -0
- package/dist/headless/timing.js +13 -0
- package/dist/headless/toggle-tool.d.ts +4 -0
- package/dist/headless/toggle-tool.js +15 -0
- package/dist/headless/tool-error.d.ts +4 -0
- package/dist/headless/tool-error.js +13 -0
- package/dist/headless/tool-input.d.ts +4 -0
- package/dist/headless/tool-input.js +13 -0
- package/dist/headless/tool-output.d.ts +4 -0
- package/dist/headless/tool-output.js +13 -0
- package/dist/headless/tool-renderer.d.ts +13 -0
- package/dist/headless/tool-renderer.js +15 -0
- package/dist/headless/transcript.d.ts +23 -0
- package/dist/headless/transcript.js +24 -0
- package/dist/headless/try-again.d.ts +2 -0
- package/dist/headless/try-again.js +24 -0
- package/dist/headless/unavailable.d.ts +8 -0
- package/dist/headless/unavailable.js +9 -0
- package/dist/headless/usage.d.ts +13 -0
- package/dist/headless/usage.js +15 -0
- package/dist/headless/use-merged-ref.d.ts +2 -0
- package/dist/headless/use-merged-ref.js +17 -0
- package/dist/headless/use-question.d.ts +3 -0
- package/dist/headless/use-question.js +9 -0
- package/dist/headless/waiting.d.ts +13 -0
- package/dist/headless/waiting.js +12 -0
- package/dist/headless/writing.d.ts +13 -0
- package/dist/headless/writing.js +12 -0
- package/dist/hooks/chat-refusal.d.ts +18 -0
- package/dist/hooks/chat-refusal.js +44 -0
- package/dist/hooks/turn-mailbox.d.ts +14 -0
- package/dist/hooks/turn-mailbox.js +114 -0
- package/dist/hooks/use-branches.d.ts +10 -0
- package/dist/hooks/use-branches.js +69 -0
- package/dist/hooks/use-chat-instance.d.ts +28 -0
- package/dist/hooks/use-chat-instance.js +44 -0
- package/dist/hooks/use-chat-settings.d.ts +11 -0
- package/dist/hooks/use-chat-settings.js +33 -0
- package/dist/hooks/use-chat-sink.d.ts +19 -0
- package/dist/hooks/use-chat-sink.js +56 -0
- package/dist/hooks/use-composer.d.ts +33 -0
- package/dist/hooks/use-composer.js +45 -0
- package/dist/hooks/use-context-usage.d.ts +8 -0
- package/dist/hooks/use-context-usage.js +14 -0
- package/dist/hooks/use-copied.d.ts +14 -0
- package/dist/hooks/use-copied.js +22 -0
- package/dist/hooks/use-draft.d.ts +6 -0
- package/dist/hooks/use-draft.js +38 -0
- package/dist/hooks/use-feedback.d.ts +8 -0
- package/dist/hooks/use-feedback.js +28 -0
- package/dist/hooks/use-follow.d.ts +15 -0
- package/dist/hooks/use-follow.js +30 -0
- package/dist/hooks/use-media-load.d.ts +5 -0
- package/dist/hooks/use-media-load.js +12 -0
- package/dist/hooks/use-media.d.ts +3 -0
- package/dist/hooks/use-media.js +9 -0
- package/dist/hooks/use-question-check.d.ts +11 -0
- package/dist/hooks/use-question-check.js +29 -0
- package/dist/hooks/use-question-draft.d.ts +34 -0
- package/dist/hooks/use-question-draft.js +57 -0
- package/dist/hooks/use-question-steps.d.ts +18 -0
- package/dist/hooks/use-question-steps.js +31 -0
- package/dist/hooks/use-question-write.d.ts +8 -0
- package/dist/hooks/use-question-write.js +25 -0
- package/dist/hooks/use-read-aloud.d.ts +8 -0
- package/dist/hooks/use-read-aloud.js +60 -0
- package/dist/hooks/use-reasoning.d.ts +8 -0
- package/dist/hooks/use-reasoning.js +32 -0
- package/dist/hooks/use-remembered-approvals.d.ts +9 -0
- package/dist/hooks/use-remembered-approvals.js +40 -0
- package/dist/hooks/use-reply.d.ts +3 -0
- package/dist/hooks/use-reply.js +9 -0
- package/dist/hooks/use-report-missing-configuration.d.ts +9 -0
- package/dist/hooks/use-report-missing-configuration.js +14 -0
- package/dist/hooks/use-retry-delay.d.ts +5 -0
- package/dist/hooks/use-retry-delay.js +17 -0
- package/dist/hooks/use-sent-draft.d.ts +8 -0
- package/dist/hooks/use-sent-draft.js +25 -0
- package/dist/hooks/use-source-disclosure.d.ts +5 -0
- package/dist/hooks/use-source-disclosure.js +9 -0
- package/dist/hooks/use-sources.d.ts +3 -0
- package/dist/hooks/use-sources.js +9 -0
- package/dist/hooks/use-tool-approval-memory.d.ts +8 -0
- package/dist/hooks/use-tool-approval-memory.js +16 -0
- package/dist/hooks/use-tool-approval.d.ts +10 -0
- package/dist/hooks/use-tool-approval.js +26 -0
- package/dist/hooks/use-turn-queue.d.ts +32 -0
- package/dist/hooks/use-turn-queue.js +33 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +5 -0
- package/dist/next.d.ts +43 -0
- package/dist/next.js +10 -0
- package/dist/services/approval-memory.d.ts +9 -0
- package/dist/services/approval-memory.js +32 -0
- package/dist/services/approval.d.ts +14 -0
- package/dist/services/approval.js +37 -0
- package/dist/services/branches.d.ts +27 -0
- package/dist/services/branches.js +131 -0
- package/dist/services/chat-session.d.ts +20 -0
- package/dist/services/chat-session.js +61 -0
- package/dist/services/choices.d.ts +31 -0
- package/dist/services/choices.js +39 -0
- package/dist/services/continue.d.ts +8 -0
- package/dist/services/continue.js +24 -0
- package/dist/services/errors.d.ts +52 -0
- package/dist/services/errors.js +54 -0
- package/dist/services/media.d.ts +9 -0
- package/dist/services/media.js +19 -0
- package/dist/services/messages.d.ts +44 -0
- package/dist/services/messages.js +0 -0
- package/dist/services/optional.d.ts +7 -0
- package/dist/services/optional.js +7 -0
- package/dist/services/ports.d.ts +31 -0
- package/dist/services/ports.js +0 -0
- package/dist/services/questions.d.ts +67 -0
- package/dist/services/questions.js +119 -0
- package/dist/services/request.d.ts +26 -0
- package/dist/services/request.js +85 -0
- package/dist/services/selection.d.ts +10 -0
- package/dist/services/selection.js +49 -0
- package/dist/services/sources.d.ts +11 -0
- package/dist/services/sources.js +29 -0
- package/dist/services/tools.d.ts +11 -0
- package/dist/services/tools.js +0 -0
- package/dist/services/turn.d.ts +84 -0
- package/dist/services/turn.js +0 -0
- package/dist/services/types.d.ts +23 -0
- package/dist/services/types.js +15 -0
- package/package.json +822 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRequired } from "@slices.sh/core/part";
|
|
3
|
+
import { FileContext } from "./file-context.js";
|
|
4
|
+
import { gateContent } from "./gate-content.js";
|
|
5
|
+
function FileKind({ kind, children }) {
|
|
6
|
+
const media = useRequired(FileContext, "Chat.FileKind requires Chat.FileRoot.");
|
|
7
|
+
return media.kind === kind && media.url ? gateContent(children, {}) : null;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
FileKind
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePart, useRequired } from "@slices.sh/core/part";
|
|
3
|
+
import { FileContext } from "./file-context.js";
|
|
4
|
+
function FileLink(props) {
|
|
5
|
+
const media = useRequired(FileContext, "Chat.FileLink requires Chat.FileRoot.");
|
|
6
|
+
const href = media.url && /^https?:/.test(media.url) ? media.url : null;
|
|
7
|
+
const element = usePart("a", props, {
|
|
8
|
+
locked: { href: href ?? void 0, target: "_blank", rel: "noopener noreferrer" }
|
|
9
|
+
});
|
|
10
|
+
return href ? element : null;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
FileLink
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMedia } from "../hooks/use-media.js";
|
|
4
|
+
import { useMediaLoad } from "../hooks/use-media-load.js";
|
|
5
|
+
import { FileContext, FileLoadContext } from "./file-context.js";
|
|
6
|
+
function FileRoot({ file, children }) {
|
|
7
|
+
const media = useMedia(file);
|
|
8
|
+
const load = useMediaLoad(media.url);
|
|
9
|
+
return /* @__PURE__ */ jsx(FileContext, { value: media, children: /* @__PURE__ */ jsx(FileLoadContext, { value: load, children }) });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
FileRoot
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRequired } from "@slices.sh/core/part";
|
|
3
|
+
import { FileContext, FileLoadContext } from "./file-context.js";
|
|
4
|
+
import { gateContent } from "./gate-content.js";
|
|
5
|
+
function FileUnavailable({ children }) {
|
|
6
|
+
const media = useRequired(FileContext, "Chat.FileUnavailable requires Chat.FileRoot.");
|
|
7
|
+
const load = useRequired(FileLoadContext, "Chat.FileUnavailable requires Chat.FileRoot.");
|
|
8
|
+
return media.url && !load.failed ? null : gateContent(children, {});
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
FileUnavailable
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePart, useRequired } from "@slices.sh/core/part";
|
|
3
|
+
import { FileContext, FileLoadContext } from "./file-context.js";
|
|
4
|
+
function FileVideo(props) {
|
|
5
|
+
const media = useRequired(FileContext, "Chat.FileVideo requires Chat.FileRoot.");
|
|
6
|
+
const load = useRequired(FileLoadContext, "File media requires Chat.FileRoot.");
|
|
7
|
+
const element = usePart("video", props, {
|
|
8
|
+
behavior: { onError: load.fail },
|
|
9
|
+
locked: { src: media.url ?? void 0 },
|
|
10
|
+
defaults: { controls: true, preload: "none" }
|
|
11
|
+
});
|
|
12
|
+
return !load.failed && media.url && media.kind === "video" ? element : null;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
FileVideo
|
|
16
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useChat } from "@ai-sdk/react";
|
|
3
|
+
import { useRequired } from "@slices.sh/core/part";
|
|
4
|
+
import { ChatContext } from "./contexts.js";
|
|
5
|
+
import { gateContent } from "./gate-content.js";
|
|
6
|
+
function FollowUps({ children }) {
|
|
7
|
+
const chat = useRequired(ChatContext, "Chat.FollowUps requires Chat.Root.");
|
|
8
|
+
const { messages, status } = useChat({ chat });
|
|
9
|
+
const message = messages.at(-1);
|
|
10
|
+
if (status !== "ready" || message?.role !== "assistant") return null;
|
|
11
|
+
const prompts = [
|
|
12
|
+
...new Set(
|
|
13
|
+
(message.metadata?.followUps ?? []).filter((text) => typeof text === "string" && text.trim().length > 0 && text.length <= 200).map((text) => text.trim())
|
|
14
|
+
)
|
|
15
|
+
].slice(0, 4);
|
|
16
|
+
return prompts.length ? gateContent(children, { prompts }) : null;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
FollowUps
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { getToolName, isToolUIPart } from "ai";
|
|
3
|
+
import { usePart, useRequired } from "@slices.sh/core/part";
|
|
4
|
+
import { ApprovalMemoryContext, PartScope } from "./contexts.js";
|
|
5
|
+
function ForgetApproval(props) {
|
|
6
|
+
const memory = useRequired(ApprovalMemoryContext, "Chat.ForgetApproval requires Chat.Root.");
|
|
7
|
+
const part = useRequired(PartScope, "Chat.ForgetApproval requires Chat.Parts.");
|
|
8
|
+
const name = isToolUIPart(part) ? getToolName(part) : null;
|
|
9
|
+
const element = usePart("button", props, {
|
|
10
|
+
defaults: { type: "button" },
|
|
11
|
+
behavior: {
|
|
12
|
+
onClick: () => {
|
|
13
|
+
if (name) memory.forget(name);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return memory.enabled && name && memory.tools.includes(name) ? element : null;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
ForgetApproval
|
|
21
|
+
};
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { Settings } from "./settings";
|
|
2
|
+
import { Models } from "./models";
|
|
3
|
+
import { ModelPicker } from "./model-picker";
|
|
4
|
+
import { OptionalTools } from "./optional-tools";
|
|
5
|
+
import { ToggleTool } from "./toggle-tool";
|
|
6
|
+
import { FeedbackRoot } from "./feedback-root";
|
|
7
|
+
import { Feedback } from "./feedback";
|
|
8
|
+
import { FeedbackError } from "./feedback-error";
|
|
9
|
+
import { ReadAloud } from "./read-aloud";
|
|
10
|
+
import { FollowUps } from "./follow-ups";
|
|
11
|
+
import { Model } from "./model";
|
|
12
|
+
import { Timing } from "./timing";
|
|
13
|
+
import { EditedAttachments } from "./edited-attachments";
|
|
14
|
+
import { BranchNavigation } from "./branch-navigation";
|
|
15
|
+
import { BranchPrevious } from "./branch-previous";
|
|
16
|
+
import { BranchNext } from "./branch-next";
|
|
17
|
+
import { BranchPage } from "./branch-page";
|
|
18
|
+
import { MessageEditRoot } from "./message-edit-root";
|
|
19
|
+
import { MessageEditing } from "./message-editing";
|
|
20
|
+
import { MessageReading } from "./message-reading";
|
|
21
|
+
import { Edit } from "./edit";
|
|
22
|
+
import { MessageEditor } from "./message-editor";
|
|
23
|
+
import { EditedInput } from "./edited-input";
|
|
24
|
+
import { CancelEdit } from "./cancel-edit";
|
|
25
|
+
import { SaveEdit } from "./save-edit";
|
|
26
|
+
import { FileRoot } from "./file-root";
|
|
27
|
+
import { FileKind } from "./file-kind-gate";
|
|
28
|
+
import { FileImage } from "./file-img";
|
|
29
|
+
import { FileAudio } from "./file-audio";
|
|
30
|
+
import { FileVideo } from "./file-video";
|
|
31
|
+
import { FileLink } from "./file-link";
|
|
32
|
+
import { FileUnavailable } from "./file-unavailable";
|
|
33
|
+
import { CitationRoot } from "./citation-root";
|
|
34
|
+
import { CitationContent } from "./citation-content";
|
|
35
|
+
import { CitationTrigger } from "./citation-trigger";
|
|
36
|
+
import { CitationTitle } from "./citation-title";
|
|
37
|
+
import { CitationDescription } from "./citation-description";
|
|
38
|
+
import { SourceSheetRoot } from "./source-sheet-root";
|
|
39
|
+
import { SourceSheetContent } from "./source-sheet-content";
|
|
40
|
+
import { SourceSheetTrigger } from "./source-sheet-trigger";
|
|
41
|
+
import { SourceSheetTitle } from "./source-sheet-title";
|
|
42
|
+
import { SourceSheetDescription } from "./source-sheet-description";
|
|
43
|
+
import { SourceSheetClose } from "./source-sheet-close";
|
|
44
|
+
import { References } from "./references";
|
|
45
|
+
import { PartSource } from "./part-source";
|
|
46
|
+
import { SourceRoot } from "./source-root";
|
|
47
|
+
import { SourceLink } from "./source-link";
|
|
48
|
+
import { SourceUnavailable } from "./source-unavailable";
|
|
49
|
+
import { PartFile } from "./part-file";
|
|
50
|
+
import { ComposerRoot } from "./composer-root";
|
|
51
|
+
import { ComposerStandalone } from "./composer-standalone";
|
|
52
|
+
import { MessageFooter } from "./message-footer";
|
|
53
|
+
import { SendNow } from "./send-now";
|
|
54
|
+
import { CancelQueued } from "./cancel-queued";
|
|
55
|
+
import { CancelQueueEdit } from "./cancel-queue-edit";
|
|
56
|
+
import { SaveQueued } from "./save-queued";
|
|
57
|
+
import { EditQueued } from "./edit-queued";
|
|
58
|
+
import { QueuedInput } from "./queued-input";
|
|
59
|
+
import { QueueEditing } from "./queue-editing";
|
|
60
|
+
import { QueuePreview } from "./queue-preview";
|
|
61
|
+
import { QueueItem } from "./queue-item";
|
|
62
|
+
import { QueueItems } from "./queue-items";
|
|
63
|
+
import { StepBoundary } from "./step-boundary";
|
|
64
|
+
import { Continue } from "./continue";
|
|
65
|
+
import { ReasoningTimer } from "./reasoning-timer";
|
|
66
|
+
import { ReasoningDisclosure } from "./reasoning-disclosure";
|
|
67
|
+
import { ToolError } from "./tool-error";
|
|
68
|
+
import { ToolOutput } from "./tool-output";
|
|
69
|
+
import { ToolInput } from "./tool-input";
|
|
70
|
+
import { ToolRenderer } from "./tool-renderer";
|
|
71
|
+
import { QuestionReceipt } from "./question-receipt";
|
|
72
|
+
import { QuestionError } from "./question-error";
|
|
73
|
+
import { SubmitAnswers } from "./submit-answers";
|
|
74
|
+
import { SkipQuestions } from "./skip-questions";
|
|
75
|
+
import { QuestionOther } from "./question-other";
|
|
76
|
+
import { OtherAnswer } from "./other-answer";
|
|
77
|
+
import { ClearAnswer } from "./clear-answer";
|
|
78
|
+
import { QuestionProgress } from "./question-progress";
|
|
79
|
+
import { QuestionBack } from "./question-back";
|
|
80
|
+
import { QuestionNext } from "./question-next";
|
|
81
|
+
import { QuestionInvalid } from "./question-invalid";
|
|
82
|
+
import { Answer } from "./answer";
|
|
83
|
+
import { QuestionItem } from "./question-item";
|
|
84
|
+
import { Questions } from "./questions";
|
|
85
|
+
import { PartQuestion } from "./part-question";
|
|
86
|
+
import { ForgetApproval } from "./forget-approval";
|
|
87
|
+
import { RememberedApproval } from "./remembered-approval";
|
|
88
|
+
import { AlwaysAllow } from "./always-allow";
|
|
89
|
+
import { ApprovalReceipt } from "./approval-receipt";
|
|
90
|
+
import { ApprovalError } from "./approval-error";
|
|
91
|
+
import { ApprovalReason } from "./approval-reason";
|
|
92
|
+
import { Deny } from "./deny";
|
|
93
|
+
import { Approve } from "./approve";
|
|
94
|
+
import { PartApproval } from "./part-approval";
|
|
95
|
+
import { Composer } from "./composer";
|
|
96
|
+
import { Copy } from "./copy";
|
|
97
|
+
import { Empty } from "./empty";
|
|
98
|
+
import { Failed } from "./failed";
|
|
99
|
+
import { Input } from "./input";
|
|
100
|
+
import { JumpToLatest } from "./jump-to-latest";
|
|
101
|
+
import { Message } from "./message";
|
|
102
|
+
import { Messages } from "./messages";
|
|
103
|
+
import { PartReasoning } from "./part-reasoning";
|
|
104
|
+
import { PartText } from "./part-text";
|
|
105
|
+
import { PartTool } from "./part-tool";
|
|
106
|
+
import { Parts } from "./parts";
|
|
107
|
+
import { Queued } from "./queued";
|
|
108
|
+
import { Regenerate } from "./regenerate";
|
|
109
|
+
import { Root } from "./root";
|
|
110
|
+
import { Sources } from "./sources";
|
|
111
|
+
import { Speaker } from "./speaker";
|
|
112
|
+
import { Stopped } from "./stopped";
|
|
113
|
+
import { Stop } from "./stop";
|
|
114
|
+
import { Submit } from "./submit";
|
|
115
|
+
import { Suggestion } from "./suggestion";
|
|
116
|
+
import { Suggestions } from "./suggestions";
|
|
117
|
+
import { Thread } from "./thread";
|
|
118
|
+
import { Transcript } from "./transcript";
|
|
119
|
+
import { TryAgain } from "./try-again";
|
|
120
|
+
import { Unavailable } from "./unavailable";
|
|
121
|
+
import { ContextUsage } from "./context-usage";
|
|
122
|
+
import { Usage } from "./usage";
|
|
123
|
+
import { Waiting } from "./waiting";
|
|
124
|
+
export declare const Chat: {
|
|
125
|
+
ToggleTool: typeof ToggleTool;
|
|
126
|
+
OptionalTools: typeof OptionalTools;
|
|
127
|
+
ModelPicker: typeof ModelPicker;
|
|
128
|
+
Models: typeof Models;
|
|
129
|
+
Settings: typeof Settings;
|
|
130
|
+
EditedAttachments: typeof EditedAttachments;
|
|
131
|
+
BranchNavigation: typeof BranchNavigation;
|
|
132
|
+
BranchPrevious: typeof BranchPrevious;
|
|
133
|
+
BranchNext: typeof BranchNext;
|
|
134
|
+
BranchPage: typeof BranchPage;
|
|
135
|
+
MessageEditRoot: typeof MessageEditRoot;
|
|
136
|
+
MessageEditing: typeof MessageEditing;
|
|
137
|
+
MessageReading: typeof MessageReading;
|
|
138
|
+
Edit: typeof Edit;
|
|
139
|
+
MessageEditor: typeof MessageEditor;
|
|
140
|
+
EditedInput: typeof EditedInput;
|
|
141
|
+
CancelEdit: typeof CancelEdit;
|
|
142
|
+
SaveEdit: typeof SaveEdit;
|
|
143
|
+
FileRoot: typeof FileRoot;
|
|
144
|
+
FileKind: typeof FileKind;
|
|
145
|
+
FileImage: typeof FileImage;
|
|
146
|
+
FileAudio: typeof FileAudio;
|
|
147
|
+
FileVideo: typeof FileVideo;
|
|
148
|
+
FileLink: typeof FileLink;
|
|
149
|
+
FileUnavailable: typeof FileUnavailable;
|
|
150
|
+
CitationRoot: typeof CitationRoot;
|
|
151
|
+
CitationContent: typeof CitationContent;
|
|
152
|
+
CitationTrigger: typeof CitationTrigger;
|
|
153
|
+
CitationTitle: typeof CitationTitle;
|
|
154
|
+
CitationDescription: typeof CitationDescription;
|
|
155
|
+
SourceSheetRoot: typeof SourceSheetRoot;
|
|
156
|
+
SourceSheetContent: typeof SourceSheetContent;
|
|
157
|
+
SourceSheetTrigger: typeof SourceSheetTrigger;
|
|
158
|
+
SourceSheetTitle: typeof SourceSheetTitle;
|
|
159
|
+
SourceSheetDescription: typeof SourceSheetDescription;
|
|
160
|
+
SourceSheetClose: typeof SourceSheetClose;
|
|
161
|
+
References: typeof References;
|
|
162
|
+
PartSource: typeof PartSource;
|
|
163
|
+
SourceRoot: typeof SourceRoot;
|
|
164
|
+
SourceLink: typeof SourceLink;
|
|
165
|
+
SourceUnavailable: typeof SourceUnavailable;
|
|
166
|
+
PartFile: typeof PartFile;
|
|
167
|
+
SendNow: typeof SendNow;
|
|
168
|
+
CancelQueued: typeof CancelQueued;
|
|
169
|
+
CancelQueueEdit: typeof CancelQueueEdit;
|
|
170
|
+
SaveQueued: typeof SaveQueued;
|
|
171
|
+
EditQueued: typeof EditQueued;
|
|
172
|
+
QueuedInput: typeof QueuedInput;
|
|
173
|
+
QueueEditing: typeof QueueEditing;
|
|
174
|
+
QueuePreview: typeof QueuePreview;
|
|
175
|
+
QueueItem: typeof QueueItem;
|
|
176
|
+
QueueItems: typeof QueueItems;
|
|
177
|
+
StepBoundary: typeof StepBoundary;
|
|
178
|
+
Continue: typeof Continue;
|
|
179
|
+
ReasoningTimer: typeof ReasoningTimer;
|
|
180
|
+
ReasoningDisclosure: typeof ReasoningDisclosure;
|
|
181
|
+
ToolError: typeof ToolError;
|
|
182
|
+
ToolOutput: typeof ToolOutput;
|
|
183
|
+
ToolInput: typeof ToolInput;
|
|
184
|
+
ToolRenderer: typeof ToolRenderer;
|
|
185
|
+
QuestionReceipt: typeof QuestionReceipt;
|
|
186
|
+
QuestionError: typeof QuestionError;
|
|
187
|
+
SubmitAnswers: typeof SubmitAnswers;
|
|
188
|
+
SkipQuestions: typeof SkipQuestions;
|
|
189
|
+
QuestionOther: typeof QuestionOther;
|
|
190
|
+
OtherAnswer: typeof OtherAnswer;
|
|
191
|
+
ClearAnswer: typeof ClearAnswer;
|
|
192
|
+
QuestionProgress: typeof QuestionProgress;
|
|
193
|
+
QuestionBack: typeof QuestionBack;
|
|
194
|
+
QuestionNext: typeof QuestionNext;
|
|
195
|
+
QuestionInvalid: typeof QuestionInvalid;
|
|
196
|
+
Answer: typeof Answer;
|
|
197
|
+
QuestionItem: typeof QuestionItem;
|
|
198
|
+
Questions: typeof Questions;
|
|
199
|
+
PartQuestion: typeof PartQuestion;
|
|
200
|
+
ForgetApproval: typeof ForgetApproval;
|
|
201
|
+
RememberedApproval: typeof RememberedApproval;
|
|
202
|
+
AlwaysAllow: typeof AlwaysAllow;
|
|
203
|
+
ApprovalReceipt: typeof ApprovalReceipt;
|
|
204
|
+
ApprovalError: typeof ApprovalError;
|
|
205
|
+
ApprovalReason: typeof ApprovalReason;
|
|
206
|
+
Deny: typeof Deny;
|
|
207
|
+
Approve: typeof Approve;
|
|
208
|
+
PartApproval: typeof PartApproval;
|
|
209
|
+
MessageFooter: typeof MessageFooter;
|
|
210
|
+
ComposerRoot: typeof ComposerRoot;
|
|
211
|
+
ComposerStandalone: typeof ComposerStandalone;
|
|
212
|
+
Root: typeof Root;
|
|
213
|
+
Transcript: typeof Transcript;
|
|
214
|
+
Thread: typeof Thread;
|
|
215
|
+
Messages: typeof Messages;
|
|
216
|
+
Message: typeof Message;
|
|
217
|
+
Speaker: typeof Speaker;
|
|
218
|
+
Parts: typeof Parts;
|
|
219
|
+
PartText: typeof PartText;
|
|
220
|
+
PartReasoning: typeof PartReasoning;
|
|
221
|
+
PartTool: typeof PartTool;
|
|
222
|
+
Sources: typeof Sources;
|
|
223
|
+
Usage: typeof Usage;
|
|
224
|
+
ContextUsage: typeof ContextUsage;
|
|
225
|
+
Model: typeof Model;
|
|
226
|
+
Timing: typeof Timing;
|
|
227
|
+
Stopped: typeof Stopped;
|
|
228
|
+
Copy: typeof Copy;
|
|
229
|
+
FeedbackRoot: typeof FeedbackRoot;
|
|
230
|
+
Feedback: typeof Feedback;
|
|
231
|
+
FeedbackError: typeof FeedbackError;
|
|
232
|
+
ReadAloud: typeof ReadAloud;
|
|
233
|
+
Regenerate: typeof Regenerate;
|
|
234
|
+
Composer: typeof Composer;
|
|
235
|
+
Input: typeof Input;
|
|
236
|
+
Submit: typeof Submit;
|
|
237
|
+
Stop: typeof Stop;
|
|
238
|
+
Queued: typeof Queued;
|
|
239
|
+
Suggestions: typeof Suggestions;
|
|
240
|
+
FollowUps: typeof FollowUps;
|
|
241
|
+
Suggestion: typeof Suggestion;
|
|
242
|
+
JumpToLatest: typeof JumpToLatest;
|
|
243
|
+
Empty: typeof Empty;
|
|
244
|
+
Waiting: typeof Waiting;
|
|
245
|
+
Failed: typeof Failed;
|
|
246
|
+
TryAgain: typeof TryAgain;
|
|
247
|
+
Unavailable: typeof Unavailable;
|
|
248
|
+
};
|
|
249
|
+
export type { ToolRenderers, ToolView } from "./tool-renderer";
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { Settings } from "./settings.js";
|
|
2
|
+
import { Models } from "./models.js";
|
|
3
|
+
import { ModelPicker } from "./model-picker.js";
|
|
4
|
+
import { OptionalTools } from "./optional-tools.js";
|
|
5
|
+
import { ToggleTool } from "./toggle-tool.js";
|
|
6
|
+
import { FeedbackRoot } from "./feedback-root.js";
|
|
7
|
+
import { Feedback } from "./feedback.js";
|
|
8
|
+
import { FeedbackError } from "./feedback-error.js";
|
|
9
|
+
import { ReadAloud } from "./read-aloud.js";
|
|
10
|
+
import { FollowUps } from "./follow-ups.js";
|
|
11
|
+
import { Model } from "./model.js";
|
|
12
|
+
import { Timing } from "./timing.js";
|
|
13
|
+
import { EditedAttachments } from "./edited-attachments.js";
|
|
14
|
+
import { BranchNavigation } from "./branch-navigation.js";
|
|
15
|
+
import { BranchPrevious } from "./branch-previous.js";
|
|
16
|
+
import { BranchNext } from "./branch-next.js";
|
|
17
|
+
import { BranchPage } from "./branch-page.js";
|
|
18
|
+
import { MessageEditRoot } from "./message-edit-root.js";
|
|
19
|
+
import { MessageEditing } from "./message-editing.js";
|
|
20
|
+
import { MessageReading } from "./message-reading.js";
|
|
21
|
+
import { Edit } from "./edit.js";
|
|
22
|
+
import { MessageEditor } from "./message-editor.js";
|
|
23
|
+
import { EditedInput } from "./edited-input.js";
|
|
24
|
+
import { CancelEdit } from "./cancel-edit.js";
|
|
25
|
+
import { SaveEdit } from "./save-edit.js";
|
|
26
|
+
import { FileRoot } from "./file-root.js";
|
|
27
|
+
import { FileKind } from "./file-kind-gate.js";
|
|
28
|
+
import { FileImage } from "./file-img.js";
|
|
29
|
+
import { FileAudio } from "./file-audio.js";
|
|
30
|
+
import { FileVideo } from "./file-video.js";
|
|
31
|
+
import { FileLink } from "./file-link.js";
|
|
32
|
+
import { FileUnavailable } from "./file-unavailable.js";
|
|
33
|
+
import { CitationRoot } from "./citation-root.js";
|
|
34
|
+
import { CitationContent } from "./citation-content.js";
|
|
35
|
+
import { CitationTrigger } from "./citation-trigger.js";
|
|
36
|
+
import { CitationTitle } from "./citation-title.js";
|
|
37
|
+
import { CitationDescription } from "./citation-description.js";
|
|
38
|
+
import { SourceSheetRoot } from "./source-sheet-root.js";
|
|
39
|
+
import { SourceSheetContent } from "./source-sheet-content.js";
|
|
40
|
+
import { SourceSheetTrigger } from "./source-sheet-trigger.js";
|
|
41
|
+
import { SourceSheetTitle } from "./source-sheet-title.js";
|
|
42
|
+
import { SourceSheetDescription } from "./source-sheet-description.js";
|
|
43
|
+
import { SourceSheetClose } from "./source-sheet-close.js";
|
|
44
|
+
import { References } from "./references.js";
|
|
45
|
+
import { PartSource } from "./part-source.js";
|
|
46
|
+
import { SourceRoot } from "./source-root.js";
|
|
47
|
+
import { SourceLink } from "./source-link.js";
|
|
48
|
+
import { SourceUnavailable } from "./source-unavailable.js";
|
|
49
|
+
import { PartFile } from "./part-file.js";
|
|
50
|
+
import { ComposerRoot } from "./composer-root.js";
|
|
51
|
+
import { ComposerStandalone } from "./composer-standalone.js";
|
|
52
|
+
import { MessageFooter } from "./message-footer.js";
|
|
53
|
+
import { SendNow } from "./send-now.js";
|
|
54
|
+
import { CancelQueued } from "./cancel-queued.js";
|
|
55
|
+
import { CancelQueueEdit } from "./cancel-queue-edit.js";
|
|
56
|
+
import { SaveQueued } from "./save-queued.js";
|
|
57
|
+
import { EditQueued } from "./edit-queued.js";
|
|
58
|
+
import { QueuedInput } from "./queued-input.js";
|
|
59
|
+
import { QueueEditing } from "./queue-editing.js";
|
|
60
|
+
import { QueuePreview } from "./queue-preview.js";
|
|
61
|
+
import { QueueItem } from "./queue-item.js";
|
|
62
|
+
import { QueueItems } from "./queue-items.js";
|
|
63
|
+
import { StepBoundary } from "./step-boundary.js";
|
|
64
|
+
import { Continue } from "./continue.js";
|
|
65
|
+
import { ReasoningTimer } from "./reasoning-timer.js";
|
|
66
|
+
import { ReasoningDisclosure } from "./reasoning-disclosure.js";
|
|
67
|
+
import { ToolError } from "./tool-error.js";
|
|
68
|
+
import { ToolOutput } from "./tool-output.js";
|
|
69
|
+
import { ToolInput } from "./tool-input.js";
|
|
70
|
+
import { ToolRenderer } from "./tool-renderer.js";
|
|
71
|
+
import { QuestionReceipt } from "./question-receipt.js";
|
|
72
|
+
import { QuestionError } from "./question-error.js";
|
|
73
|
+
import { SubmitAnswers } from "./submit-answers.js";
|
|
74
|
+
import { SkipQuestions } from "./skip-questions.js";
|
|
75
|
+
import { QuestionOther } from "./question-other.js";
|
|
76
|
+
import { OtherAnswer } from "./other-answer.js";
|
|
77
|
+
import { ClearAnswer } from "./clear-answer.js";
|
|
78
|
+
import { QuestionProgress } from "./question-progress.js";
|
|
79
|
+
import { QuestionBack } from "./question-back.js";
|
|
80
|
+
import { QuestionNext } from "./question-next.js";
|
|
81
|
+
import { QuestionInvalid } from "./question-invalid.js";
|
|
82
|
+
import { Answer } from "./answer.js";
|
|
83
|
+
import { QuestionItem } from "./question-item.js";
|
|
84
|
+
import { Questions } from "./questions.js";
|
|
85
|
+
import { PartQuestion } from "./part-question.js";
|
|
86
|
+
import { ForgetApproval } from "./forget-approval.js";
|
|
87
|
+
import { RememberedApproval } from "./remembered-approval.js";
|
|
88
|
+
import { AlwaysAllow } from "./always-allow.js";
|
|
89
|
+
import { ApprovalReceipt } from "./approval-receipt.js";
|
|
90
|
+
import { ApprovalError } from "./approval-error.js";
|
|
91
|
+
import { ApprovalReason } from "./approval-reason.js";
|
|
92
|
+
import { Deny } from "./deny.js";
|
|
93
|
+
import { Approve } from "./approve.js";
|
|
94
|
+
import { PartApproval } from "./part-approval.js";
|
|
95
|
+
import { Composer } from "./composer.js";
|
|
96
|
+
import { Copy } from "./copy.js";
|
|
97
|
+
import { Empty } from "./empty.js";
|
|
98
|
+
import { Failed } from "./failed.js";
|
|
99
|
+
import { Input } from "./input.js";
|
|
100
|
+
import { JumpToLatest } from "./jump-to-latest.js";
|
|
101
|
+
import { Message } from "./message.js";
|
|
102
|
+
import { Messages } from "./messages.js";
|
|
103
|
+
import { PartReasoning } from "./part-reasoning.js";
|
|
104
|
+
import { PartText } from "./part-text.js";
|
|
105
|
+
import { PartTool } from "./part-tool.js";
|
|
106
|
+
import { Parts } from "./parts.js";
|
|
107
|
+
import { Queued } from "./queued.js";
|
|
108
|
+
import { Regenerate } from "./regenerate.js";
|
|
109
|
+
import { Root } from "./root.js";
|
|
110
|
+
import { Sources } from "./sources.js";
|
|
111
|
+
import { Speaker } from "./speaker.js";
|
|
112
|
+
import { Stopped } from "./stopped.js";
|
|
113
|
+
import { Stop } from "./stop.js";
|
|
114
|
+
import { Submit } from "./submit.js";
|
|
115
|
+
import { Suggestion } from "./suggestion.js";
|
|
116
|
+
import { Suggestions } from "./suggestions.js";
|
|
117
|
+
import { Thread } from "./thread.js";
|
|
118
|
+
import { Transcript } from "./transcript.js";
|
|
119
|
+
import { TryAgain } from "./try-again.js";
|
|
120
|
+
import { Unavailable } from "./unavailable.js";
|
|
121
|
+
import { ContextUsage } from "./context-usage.js";
|
|
122
|
+
import { Usage } from "./usage.js";
|
|
123
|
+
import { Waiting } from "./waiting.js";
|
|
124
|
+
const Chat = {
|
|
125
|
+
ToggleTool,
|
|
126
|
+
OptionalTools,
|
|
127
|
+
ModelPicker,
|
|
128
|
+
Models,
|
|
129
|
+
Settings,
|
|
130
|
+
EditedAttachments,
|
|
131
|
+
BranchNavigation,
|
|
132
|
+
BranchPrevious,
|
|
133
|
+
BranchNext,
|
|
134
|
+
BranchPage,
|
|
135
|
+
MessageEditRoot,
|
|
136
|
+
MessageEditing,
|
|
137
|
+
MessageReading,
|
|
138
|
+
Edit,
|
|
139
|
+
MessageEditor,
|
|
140
|
+
EditedInput,
|
|
141
|
+
CancelEdit,
|
|
142
|
+
SaveEdit,
|
|
143
|
+
FileRoot,
|
|
144
|
+
FileKind,
|
|
145
|
+
FileImage,
|
|
146
|
+
FileAudio,
|
|
147
|
+
FileVideo,
|
|
148
|
+
FileLink,
|
|
149
|
+
FileUnavailable,
|
|
150
|
+
CitationRoot,
|
|
151
|
+
CitationContent,
|
|
152
|
+
CitationTrigger,
|
|
153
|
+
CitationTitle,
|
|
154
|
+
CitationDescription,
|
|
155
|
+
SourceSheetRoot,
|
|
156
|
+
SourceSheetContent,
|
|
157
|
+
SourceSheetTrigger,
|
|
158
|
+
SourceSheetTitle,
|
|
159
|
+
SourceSheetDescription,
|
|
160
|
+
SourceSheetClose,
|
|
161
|
+
References,
|
|
162
|
+
PartSource,
|
|
163
|
+
SourceRoot,
|
|
164
|
+
SourceLink,
|
|
165
|
+
SourceUnavailable,
|
|
166
|
+
PartFile,
|
|
167
|
+
SendNow,
|
|
168
|
+
CancelQueued,
|
|
169
|
+
CancelQueueEdit,
|
|
170
|
+
SaveQueued,
|
|
171
|
+
EditQueued,
|
|
172
|
+
QueuedInput,
|
|
173
|
+
QueueEditing,
|
|
174
|
+
QueuePreview,
|
|
175
|
+
QueueItem,
|
|
176
|
+
QueueItems,
|
|
177
|
+
StepBoundary,
|
|
178
|
+
Continue,
|
|
179
|
+
ReasoningTimer,
|
|
180
|
+
ReasoningDisclosure,
|
|
181
|
+
ToolError,
|
|
182
|
+
ToolOutput,
|
|
183
|
+
ToolInput,
|
|
184
|
+
ToolRenderer,
|
|
185
|
+
QuestionReceipt,
|
|
186
|
+
QuestionError,
|
|
187
|
+
SubmitAnswers,
|
|
188
|
+
SkipQuestions,
|
|
189
|
+
QuestionOther,
|
|
190
|
+
OtherAnswer,
|
|
191
|
+
ClearAnswer,
|
|
192
|
+
QuestionProgress,
|
|
193
|
+
QuestionBack,
|
|
194
|
+
QuestionNext,
|
|
195
|
+
QuestionInvalid,
|
|
196
|
+
Answer,
|
|
197
|
+
QuestionItem,
|
|
198
|
+
Questions,
|
|
199
|
+
PartQuestion,
|
|
200
|
+
ForgetApproval,
|
|
201
|
+
RememberedApproval,
|
|
202
|
+
AlwaysAllow,
|
|
203
|
+
ApprovalReceipt,
|
|
204
|
+
ApprovalError,
|
|
205
|
+
ApprovalReason,
|
|
206
|
+
Deny,
|
|
207
|
+
Approve,
|
|
208
|
+
PartApproval,
|
|
209
|
+
MessageFooter,
|
|
210
|
+
ComposerRoot,
|
|
211
|
+
ComposerStandalone,
|
|
212
|
+
Root,
|
|
213
|
+
Transcript,
|
|
214
|
+
Thread,
|
|
215
|
+
Messages,
|
|
216
|
+
Message,
|
|
217
|
+
Speaker,
|
|
218
|
+
Parts,
|
|
219
|
+
PartText,
|
|
220
|
+
PartReasoning,
|
|
221
|
+
PartTool,
|
|
222
|
+
Sources,
|
|
223
|
+
Usage,
|
|
224
|
+
ContextUsage,
|
|
225
|
+
Model,
|
|
226
|
+
Timing,
|
|
227
|
+
Stopped,
|
|
228
|
+
Copy,
|
|
229
|
+
FeedbackRoot,
|
|
230
|
+
Feedback,
|
|
231
|
+
FeedbackError,
|
|
232
|
+
ReadAloud,
|
|
233
|
+
Regenerate,
|
|
234
|
+
Composer,
|
|
235
|
+
Input,
|
|
236
|
+
Submit,
|
|
237
|
+
Stop,
|
|
238
|
+
Queued,
|
|
239
|
+
Suggestions,
|
|
240
|
+
FollowUps,
|
|
241
|
+
Suggestion,
|
|
242
|
+
JumpToLatest,
|
|
243
|
+
Empty,
|
|
244
|
+
Waiting,
|
|
245
|
+
Failed,
|
|
246
|
+
TryAgain,
|
|
247
|
+
Unavailable
|
|
248
|
+
};
|
|
249
|
+
export {
|
|
250
|
+
Chat
|
|
251
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PartProps } from "@slices.sh/core/part";
|
|
2
|
+
/**
|
|
3
|
+
* A textarea rather than an input, because Shift+Enter has to mean something.
|
|
4
|
+
*
|
|
5
|
+
* No `rows`: the skin sizes it with `field-sizing: content`, so it grows with the message
|
|
6
|
+
* and stops at a maximum. A fixed row locked every paragraph anyone ever wrote into a
|
|
7
|
+
* thirty-six pixel slit, with the browser's own resize handle taken away.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Chat.Input becomes Composer.Input, a field named text, wrapped by Dictation.Field when dictation is wanted.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Input(props: PartProps<"textarea">): import("react").ReactNode;
|