@fencyai/react 0.1.97 → 0.1.99

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.
@@ -1,8 +1,14 @@
1
+ import { AgentTaskProgressItemType } from '@fencyai/js';
2
+ import { default as React } from 'react';
3
+ export type ChatResponseState = 'thinking' | 'loading' | 'complete';
1
4
  export type ChatResponseMessage = {
2
5
  id: string;
6
+ title: string;
3
7
  markdown: string;
8
+ state: AgentTaskProgressItemType;
9
+ completed: boolean;
4
10
  };
5
11
  export interface ChatResponseProps {
6
- messages: ChatResponseMessage[];
12
+ message: ChatResponseMessage;
7
13
  }
8
14
  export declare const ChatResponse: React.FC<ChatResponseProps>;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface ChatResponseCompleteProps {
3
+ markdown: string;
4
+ }
5
+ export declare const ChatResponseComplete: React.FC<ChatResponseCompleteProps>;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface ChatResponseLoadingProps {
3
+ title: string;
4
+ completed: boolean;
5
+ }
6
+ export declare const ChatResponseLoading: React.FC<ChatResponseLoadingProps>;
@@ -0,0 +1,6 @@
1
+ export interface ChatResponseThinkingProps {
2
+ title: string;
3
+ markdown: string;
4
+ completed: boolean;
5
+ }
6
+ export declare const ChatResponseThinking: React.FC<ChatResponseThinkingProps>;
@@ -1,5 +1,5 @@
1
- import { ChatResponseMessage } from './ChatResponse';
1
+ import { StreamingAgentTask } from '../types';
2
2
  export interface DisplayProps {
3
- messages: ChatResponseMessage[];
3
+ agentTasks: StreamingAgentTask[];
4
4
  }
5
5
  export declare const Display: React.FC<DisplayProps>;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  interface EditableContentProps {
3
- editableRef: React.RefObject<HTMLDivElement>;
3
+ editableRef: React.RefObject<HTMLDivElement | null>;
4
4
  onInput: () => void;
5
5
  onKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
6
6
  isComposingRef: React.MutableRefObject<boolean>;
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  interface GhostWrapperProps {
3
- ghostRef: React.RefObject<HTMLDivElement>;
3
+ ghostRef: React.RefObject<HTMLDivElement | null>;
4
4
  isOpen: boolean;
5
5
  value: string;
6
6
  atPosition: number;
@@ -1,4 +1,4 @@
1
- import { PubMemoryDto, PubMemoryTypeDto } from '@fencyai/js/lib/openapi';
1
+ import { PubMemoryDto, PubMemoryTypeDto } from '@fencyai/js';
2
2
  import { default as React } from 'react';
3
3
  export type TransformedOption = {
4
4
  type: 'option' | 'category';
@@ -3,7 +3,7 @@ import { RefObject } from 'react';
3
3
  * Hook for managing contenteditable DOM operations
4
4
  * Provides utilities for cursor positioning and text extraction
5
5
  */
6
- export declare function useContentEditable(editableRef: RefObject<HTMLDivElement>): {
6
+ export declare function useContentEditable(editableRef: RefObject<HTMLDivElement | null>): {
7
7
  getCaretPosition: () => number;
8
8
  setCaretPosition: (pos: number) => void;
9
9
  getPlainText: () => string;
@@ -4,7 +4,7 @@ type Option = {
4
4
  label: string;
5
5
  };
6
6
  interface UseMentionRendererProps {
7
- editableRef: RefObject<HTMLDivElement>;
7
+ editableRef: RefObject<HTMLDivElement | null>;
8
8
  options: Option[];
9
9
  mentionClassName: string;
10
10
  getCaretPosition: () => number;
@@ -1,5 +1,4 @@
1
- import { ApiError } from '@fencyai/js';
2
- import { PaginationDto } from '@fencyai/js/lib/openapi';
1
+ import { ApiError, PaginationDto } from '@fencyai/js';
3
2
  export interface PaginatedParams {
4
3
  fetchClientSecret: () => Promise<{
5
4
  clientSecret: string;
package/dist/index.d.ts CHANGED
@@ -9,6 +9,9 @@ export { useStreamingChatCompletions } from './hooks/useStreamingChatCompletions
9
9
  export { useStructuredChatCompletions } from './hooks/useStructuredChatCompletions';
10
10
  export { Chat } from './chat/Chat';
11
11
  export { ChatResponse } from './chat/ChatResponse';
12
+ export { ChatResponseComplete } from './chat/ChatResponseComplete';
13
+ export { ChatResponseLoading } from './chat/ChatResponseLoading';
14
+ export { ChatResponseThinking } from './chat/ChatResponseThinking';
12
15
  export { MentionInput } from './chat/MentionInput';
13
16
  export { MentionPopover } from './chat/MentionPopover';
14
17
  export { FencyProvider } from './provider/FencyProvider';