@galaxycore/ai-chat 0.8.0 → 0.10.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/CHANGELOG.md +10 -0
- package/dist/appearance-Dpvr1osR.d.ts +19 -0
- package/dist/appearance.d.ts +2 -1
- package/dist/appearance.js +1 -1
- package/dist/{branches-MrtWHEkd.js → branches-CRxWPjfD.js} +274 -3
- package/dist/branches-CRxWPjfD.js.map +1 -0
- package/dist/{branches-4UjruXJV.d.ts → branches-CUAJceMN.d.ts} +177 -3
- package/dist/context.js +1 -1
- package/dist/headless.d.ts +2 -2
- package/dist/headless.js +2 -2
- package/dist/icons-BkHI--R-.d.ts +20 -0
- package/dist/index.d.ts +34 -3
- package/dist/index.js +838 -214
- package/dist/index.js.map +1 -1
- package/dist/styles.css +47 -0
- package/dist/{ui-primitives-BJFXxysT.js → ui-primitives-XhFvDm8o.js} +10 -2
- package/dist/ui-primitives-XhFvDm8o.js.map +1 -0
- package/docs/publishing.md +5 -5
- package/package.json +1 -1
- package/dist/appearance-Bcj6SrBr.d.ts +0 -34
- package/dist/branches-MrtWHEkd.js.map +0 -1
- package/dist/ui-primitives-BJFXxysT.js.map +0 -1
package/dist/context.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { r as Icon, t as ChatIconButton } from "./ui-primitives-
|
|
3
|
+
import { r as Icon, t as ChatIconButton } from "./ui-primitives-XhFvDm8o.js";
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/context.tsx
|
package/dist/headless.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { ChatContextAdapter, ChatContextController, ChatContextItem, ChatContextOptions, ChatContextValue, ChatRequestContext, SelectedChatContextItem, TextSelectionAdapterOptions, createTextSelectionAdapter, useChatContext } from "./context.js";
|
|
3
3
|
import { SpeechInputAdapter, SpeechInputController, SpeechInputError, SpeechInputOptions, SpeechInputResult, SpeechInputSession, SpeechInputStartOptions, createBrowserSpeechAdapter, defaultSpeechInputLabels, useSpeechInput } from "./voice.js";
|
|
4
|
-
import { A as ToolPresentationResolver, C as ChatScrollHandle, D as TextRenderer, E as PartRenderers, O as ToolPart, S as ChatPanelProps, T as PartRendererProps, _ as ChatBranchInfo, a as projectChatBranches, b as ChatMessageActionContext, c as zhCN, d as safeUrl, f as useAiChat, g as AttachmentOptions, h as AiChatProps, i as ProjectChatBranchesOptions, j as ToolRenderers, k as ToolPresentation, l as acceptsFile, m as AiChatOptions, n as ChatBranchesController, o as useChatBranches, p as AiChatController, r as ChatBranchesState, s as enUS, t as ChatBranchProjection, u as getMessageText, v as ChatComposerProps, w as ChatSuggestedAction, x as ChatMessagesProps, y as ChatLabels } from "./branches-
|
|
5
|
-
export { type AiChatController, type AiChatOptions, type AiChatProps, type AttachmentOptions, type ChatBranchInfo, type ChatBranchProjection, type ChatBranchesController, type ChatBranchesState, type ChatComposerProps, type ChatContextAdapter, type ChatContextController, type ChatContextItem, type ChatContextOptions, type ChatContextValue, type ChatLabels, type ChatMessageActionContext, type ChatMessagesProps, type ChatPanelProps, type ChatRequestContext, type ChatScrollHandle, type ChatSuggestedAction, type PartRendererProps, type PartRenderers, type ProjectChatBranchesOptions, type SelectedChatContextItem, type SpeechInputAdapter, type SpeechInputController, SpeechInputError, type SpeechInputOptions, type SpeechInputResult, type SpeechInputSession, type SpeechInputStartOptions, type TextRenderer, type TextSelectionAdapterOptions, type ToolPart, type ToolPresentation, type ToolPresentationResolver, type ToolRenderers, acceptsFile, createBrowserSpeechAdapter, createTextSelectionAdapter, defaultSpeechInputLabels, enUS, getMessageText, projectChatBranches, safeUrl, useAiChat, useChatBranches, useChatContext, useSpeechInput, zhCN };
|
|
4
|
+
import { $ as parseSkillMarkdown, A as ToolPresentationResolver, B as resolveChatModelSelection, C as ChatScrollHandle, D as TextRenderer, E as PartRenderers, F as ChatModelOption, G as ComposerTriggerController, H as ChatComposerMenuAction, I as ChatModelSelection, J as ParsedSkillMarkdown, K as ComposerTriggerKind, L as ChatReasoningEffort, O as ToolPart, P as CHAT_REASONING_EFFORTS, Q as filterSkills, R as ResolvedChatModelSelection, S as ChatPanelProps, T as PartRendererProps, U as ChatMentionItem, V as selectChatModel, W as ChatSkillItem, X as detectComposerTrigger, Y as UseComposerTriggerOptions, Z as filterMentions, _ as ChatBranchInfo, a as projectChatBranches, b as ChatMessageActionContext, c as zhCN, d as safeUrl, et as replaceComposerTrigger, f as useAiChat, g as AttachmentOptions, h as AiChatProps, i as ProjectChatBranchesOptions, j as ToolRenderers, k as ToolPresentation, l as acceptsFile, m as AiChatOptions, n as ChatBranchesController, nt as useComposerTrigger, o as useChatBranches, p as AiChatController, q as ComposerTriggerMatch, r as ChatBranchesState, s as enUS, t as ChatBranchProjection, tt as slugifySkillName, u as getMessageText, v as ChatComposerProps, w as ChatSuggestedAction, x as ChatMessagesProps, y as ChatLabels, z as isChatReasoningEffort } from "./branches-CUAJceMN.js";
|
|
5
|
+
export { type AiChatController, type AiChatOptions, type AiChatProps, type AttachmentOptions, CHAT_REASONING_EFFORTS, type ChatBranchInfo, type ChatBranchProjection, type ChatBranchesController, type ChatBranchesState, type ChatComposerMenuAction, type ChatComposerProps, type ChatContextAdapter, type ChatContextController, type ChatContextItem, type ChatContextOptions, type ChatContextValue, type ChatLabels, type ChatMentionItem, type ChatMessageActionContext, type ChatMessagesProps, type ChatModelOption, type ChatModelSelection, type ChatPanelProps, type ChatReasoningEffort, type ChatRequestContext, type ChatScrollHandle, type ChatSkillItem, type ChatSuggestedAction, type ComposerTriggerController, type ComposerTriggerKind, type ComposerTriggerMatch, type ParsedSkillMarkdown, type PartRendererProps, type PartRenderers, type ProjectChatBranchesOptions, type ResolvedChatModelSelection, type SelectedChatContextItem, type SpeechInputAdapter, type SpeechInputController, SpeechInputError, type SpeechInputOptions, type SpeechInputResult, type SpeechInputSession, type SpeechInputStartOptions, type TextRenderer, type TextSelectionAdapterOptions, type ToolPart, type ToolPresentation, type ToolPresentationResolver, type ToolRenderers, type UseComposerTriggerOptions, acceptsFile, createBrowserSpeechAdapter, createTextSelectionAdapter, defaultSpeechInputLabels, detectComposerTrigger, enUS, filterMentions, filterSkills, getMessageText, isChatReasoningEffort, parseSkillMarkdown, projectChatBranches, replaceComposerTrigger, resolveChatModelSelection, safeUrl, selectChatModel, slugifySkillName, useAiChat, useChatBranches, useChatContext, useComposerTrigger, useSpeechInput, zhCN };
|
package/dist/headless.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { a as zhCN, n as useChatBranches, o as
|
|
3
|
+
import { _ as useAiChat, a as resolveChatModelSelection, c as filterMentions, d as replaceComposerTrigger, f as slugifySkillName, g as zhCN, i as isChatReasoningEffort, l as filterSkills, m as enUS, n as useChatBranches, o as selectChatModel, p as useComposerTrigger, r as CHAT_REASONING_EFFORTS, s as detectComposerTrigger, t as projectChatBranches, u as parseSkillMarkdown } from "./branches-CRxWPjfD.js";
|
|
4
4
|
import { i as safeUrl, r as getMessageText, t as acceptsFile } from "./utils-DqBGBYA1.js";
|
|
5
5
|
import { SpeechInputError, createBrowserSpeechAdapter, defaultSpeechInputLabels, useSpeechInput } from "./voice.js";
|
|
6
6
|
import { createTextSelectionAdapter, useChatContext } from "./context.js";
|
|
7
|
-
export { SpeechInputError, acceptsFile, createBrowserSpeechAdapter, createTextSelectionAdapter, defaultSpeechInputLabels, enUS, getMessageText, projectChatBranches, safeUrl, useAiChat, useChatBranches, useChatContext, useSpeechInput, zhCN };
|
|
7
|
+
export { CHAT_REASONING_EFFORTS, SpeechInputError, acceptsFile, createBrowserSpeechAdapter, createTextSelectionAdapter, defaultSpeechInputLabels, detectComposerTrigger, enUS, filterMentions, filterSkills, getMessageText, isChatReasoningEffort, parseSkillMarkdown, projectChatBranches, replaceComposerTrigger, resolveChatModelSelection, safeUrl, selectChatModel, slugifySkillName, useAiChat, useChatBranches, useChatContext, useComposerTrigger, useSpeechInput, zhCN };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentType, ReactNode } from "react";
|
|
3
|
+
import { LucideProps } from "lucide-react";
|
|
4
|
+
//#region src/icons.d.ts
|
|
5
|
+
type ChatIconName = 'send' | 'stop' | 'plus' | 'close' | 'copy' | 'check' | 'refresh' | 'down' | 'file' | 'sparkle' | 'more' | 'edit' | 'chevron' | 'chevronDown' | 'chevronLeft' | 'undo' | 'branch' | 'link' | 'tool' | 'thinking' | 'warning' | 'blocked' | 'loader' | 'mic' | 'audio' | 'text' | 'table' | 'chart' | 'page' | 'target' | 'external' | 'search' | 'compass' | 'scan' | 'paperclip' | 'layers' | 'at' | 'sliders' | 'zap';
|
|
6
|
+
type ChatIconProps = Omit<LucideProps, 'ref'>;
|
|
7
|
+
type ChatIconOverrides = Partial<Record<ChatIconName, ComponentType<ChatIconProps>>>;
|
|
8
|
+
interface ChatAppearanceProviderProps {
|
|
9
|
+
/** Replace just the icons your product needs. Overrides inherit through nested providers. */
|
|
10
|
+
icons?: ChatIconOverrides;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** A DOM-free, instance-scoped provider. Works with ChatPanel and standalone primitives. */
|
|
14
|
+
declare function ChatAppearanceProvider({ icons, children }: ChatAppearanceProviderProps): import("react").JSX.Element;
|
|
15
|
+
declare function Icon({ name, ...props }: ChatIconProps & {
|
|
16
|
+
name: ChatIconName;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ChatIconProps as a, ChatIconOverrides as i, ChatAppearanceProviderProps as n, Icon as o, ChatIconName as r, ChatAppearanceProvider as t };
|
|
20
|
+
//# sourceMappingURL=icons-BkHI--R-.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as ChatIconProps, i as ChatIconOverrides, n as ChatAppearanceProviderProps, o as Icon, r as ChatIconName, t as ChatAppearanceProvider } from "./icons-BkHI--R-.js";
|
|
3
|
+
import { n as ChatIconButtonProps, t as ChatIconButton } from "./appearance-Dpvr1osR.js";
|
|
3
4
|
import { ChatContextAdapter, ChatContextController, ChatContextItem, ChatContextOptions, ChatContextValue, ChatRequestContext, ContextTray, ContextTrayLabels, ContextTrayProps, SelectedChatContextItem, TextSelectionAdapterOptions, createTextSelectionAdapter, useChatContext } from "./context.js";
|
|
4
5
|
import { SpeechInputAdapter, SpeechInputController, SpeechInputError, SpeechInputErrorCode, SpeechInputLabels, SpeechInputOptions, SpeechInputResult, SpeechInputSession, SpeechInputStartOptions, SpeechInputState, SpeechInputSupport, UseSpeechInputOptions, createBrowserSpeechAdapter, defaultSpeechInputLabels, useSpeechInput } from "./voice.js";
|
|
5
|
-
import { A as ToolPresentationResolver, C as ChatScrollHandle, D as TextRenderer, E as PartRenderers, O as ToolPart, S as ChatPanelProps, T as PartRendererProps, _ as ChatBranchInfo, a as projectChatBranches, b as ChatMessageActionContext, c as zhCN, f as useAiChat, g as AttachmentOptions, h as AiChatProps, i as ProjectChatBranchesOptions, j as ToolRenderers, k as ToolPresentation, m as AiChatOptions, n as ChatBranchesController, o as useChatBranches, p as AiChatController, r as ChatBranchesState, s as enUS, t as ChatBranchProjection, u as getMessageText, v as ChatComposerProps, w as ChatSuggestedAction, x as ChatMessagesProps, y as ChatLabels } from "./branches-
|
|
6
|
+
import { $ as parseSkillMarkdown, A as ToolPresentationResolver, B as resolveChatModelSelection, C as ChatScrollHandle, D as TextRenderer, E as PartRenderers, F as ChatModelOption, G as ComposerTriggerController, H as ChatComposerMenuAction, I as ChatModelSelection, J as ParsedSkillMarkdown, K as ComposerTriggerKind, L as ChatReasoningEffort, M as ChatModelPicker, N as ChatModelPickerProps, O as ToolPart, P as CHAT_REASONING_EFFORTS, Q as filterSkills, R as ResolvedChatModelSelection, S as ChatPanelProps, T as PartRendererProps, U as ChatMentionItem, V as selectChatModel, W as ChatSkillItem, X as detectComposerTrigger, Y as UseComposerTriggerOptions, Z as filterMentions, _ as ChatBranchInfo, a as projectChatBranches, b as ChatMessageActionContext, c as zhCN, et as replaceComposerTrigger, f as useAiChat, g as AttachmentOptions, h as AiChatProps, i as ProjectChatBranchesOptions, j as ToolRenderers, k as ToolPresentation, m as AiChatOptions, n as ChatBranchesController, nt as useComposerTrigger, o as useChatBranches, p as AiChatController, q as ComposerTriggerMatch, r as ChatBranchesState, s as enUS, t as ChatBranchProjection, tt as slugifySkillName, u as getMessageText, v as ChatComposerProps, w as ChatSuggestedAction, x as ChatMessagesProps, y as ChatLabels, z as isChatReasoningEffort } from "./branches-CUAJceMN.js";
|
|
6
7
|
import { ActiveMarquee, ChatTargetHit, ChatTargetKind, ChatTargetRect, ChatTargetingController, ChatTargetingLabels, ChatTargetingOverlay, ChatTargetingOverlayProps, PendingChatTarget, UseChatTargetingOptions, enUSTargetingLabels, toChatContextItem, useChatTargeting, zhCNTargetingLabels } from "./targeting.js";
|
|
7
8
|
import { HTMLAttributes, ReactNode } from "react";
|
|
8
9
|
import { UIMessage } from "ai";
|
|
@@ -81,5 +82,35 @@ interface ChatCheckpointBannerProps {
|
|
|
81
82
|
/** Cursor-style checkpoint status bar shown when reverted before a message, with one-click Restore. */
|
|
82
83
|
export declare function ChatCheckpointBanner({ message, onRestore, restoreLabel, disabled, labels: overrides, className }: ChatCheckpointBannerProps): import("react").JSX.Element;
|
|
83
84
|
//#endregion
|
|
84
|
-
|
|
85
|
+
//#region src/composer-popovers.d.ts
|
|
86
|
+
interface ChatSlashMenuProps {
|
|
87
|
+
skills: readonly ChatSkillItem[];
|
|
88
|
+
activeIndex: number;
|
|
89
|
+
onHighlight?: (index: number) => void;
|
|
90
|
+
onSelect: (skill: ChatSkillItem) => void;
|
|
91
|
+
onAddSkill?: () => void;
|
|
92
|
+
onBrowseSkills?: () => void;
|
|
93
|
+
labels?: Partial<ChatLabels>;
|
|
94
|
+
className?: string;
|
|
95
|
+
}
|
|
96
|
+
export declare function ChatSlashMenu({ skills, activeIndex, onHighlight, onSelect, onAddSkill, onBrowseSkills, labels: overrides, className }: ChatSlashMenuProps): import("react").JSX.Element;
|
|
97
|
+
interface ChatMentionMenuProps {
|
|
98
|
+
items: readonly ChatMentionItem[];
|
|
99
|
+
activeIndex: number;
|
|
100
|
+
onHighlight?: (index: number) => void;
|
|
101
|
+
onSelect: (item: ChatMentionItem) => void;
|
|
102
|
+
labels?: Partial<ChatLabels>;
|
|
103
|
+
className?: string;
|
|
104
|
+
}
|
|
105
|
+
export declare function ChatMentionMenu({ items, activeIndex, onHighlight, onSelect, labels: overrides, className }: ChatMentionMenuProps): import("react").JSX.Element;
|
|
106
|
+
interface ChatPlusMenuProps {
|
|
107
|
+
open: boolean;
|
|
108
|
+
onClose: () => void;
|
|
109
|
+
actions: readonly ChatComposerMenuAction[];
|
|
110
|
+
labels?: Partial<ChatLabels>;
|
|
111
|
+
className?: string;
|
|
112
|
+
}
|
|
113
|
+
export declare function ChatPlusMenu({ open, onClose, actions, labels: overrides, className }: ChatPlusMenuProps): import("react").JSX.Element | null;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { type ActiveMarquee, type AiChatController, type AiChatOptions, type AiChatProps, type AttachmentOptions, CHAT_REASONING_EFFORTS, ChatAppearanceProvider, type ChatAppearanceProviderProps, type ChatBranchInfo, type ChatBranchProjection, type ChatBranchSwitcherProps, type ChatBranchesController, type ChatBranchesState, type ChatCheckpointBannerProps, type ChatComposerMenuAction, type ChatComposerProps, type ChatContextAdapter, type ChatContextController, type ChatContextItem, type ChatContextOptions, type ChatContextValue, type ChatHistoryItem, type ChatHistoryLabels, type ChatHistoryMenuProps, Icon as ChatIcon, ChatIconButton, type ChatIconButtonProps, type ChatIconName, type ChatIconOverrides, type ChatIconProps, type ChatLabels, type ChatMentionItem, type ChatMentionMenuProps, type ChatMessageActionContext, type ChatMessagesProps, type ChatModelOption, ChatModelPicker, type ChatModelPickerProps, type ChatModelSelection, type ChatPanelProps, type ChatPlusMenuProps, type ChatReasoningEffort, type ChatRequestContext, type ChatScrollHandle, type ChatSkillItem, type ChatSlashMenuProps, type ChatSuggestedAction, type ChatTargetHit, type ChatTargetKind, type ChatTargetRect, type ChatTargetingController, type ChatTargetingLabels, ChatTargetingOverlay, type ChatTargetingOverlayProps, type ComposerTriggerController, type ComposerTriggerKind, type ComposerTriggerMatch, ContextTray, type ContextTrayLabels, type ContextTrayProps, type ParsedSkillMarkdown, type PartRendererProps, type PartRenderers, type PendingChatTarget, type ProjectChatBranchesOptions, type ResolvedChatModelSelection, type SelectedChatContextItem, type SpeechInputAdapter, type SpeechInputController, SpeechInputError, type SpeechInputErrorCode, type SpeechInputLabels, type SpeechInputOptions, type SpeechInputResult, type SpeechInputSession, type SpeechInputStartOptions, type SpeechInputState, type SpeechInputSupport, type TextRenderer, type TextSelectionAdapterOptions, type ToolPart, type ToolPresentation, type ToolPresentationResolver, type ToolRenderers, type UseChatTargetingOptions, type UseComposerTriggerOptions, type UseSpeechInputOptions, createBrowserSpeechAdapter, createTextSelectionAdapter, defaultSpeechInputLabels, detectComposerTrigger, enUS, enUSTargetingLabels, filterMentions, filterSkills, getMessageText, isChatReasoningEffort, parseSkillMarkdown, projectChatBranches, replaceComposerTrigger, resolveChatModelSelection, selectChatModel, slugifySkillName, toChatContextItem, useAiChat, useChatBranches, useChatContext, useChatTargeting, useComposerTrigger, useSpeechInput, zhCN, zhCNTargetingLabels };
|
|
85
116
|
//# sourceMappingURL=index.d.ts.map
|