teodor-new-chat-ui 4.3.385 → 4.3.387

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.
Files changed (37) hide show
  1. package/dist/api/chat-api.d.ts +2 -2
  2. package/dist/api/utils.d.ts +1 -1
  3. package/dist/components/chat/ChatInterface.d.ts +1 -1
  4. package/dist/components/chat/MessageComponent.d.ts +1 -1
  5. package/dist/components/chat/MessageList.d.ts +1 -1
  6. package/dist/components/chat/MessageRow.d.ts +1 -1
  7. package/dist/components/chat/message-components/ArtifactRenderer.d.ts +1 -1
  8. package/dist/components/chat/message-components/StreamProgress.d.ts +1 -1
  9. package/dist/components/chat/message-components/ToolComponent.d.ts +1 -1
  10. package/dist/components/chat/message-components/artifacts/PlotArtifact.d.ts +1 -1
  11. package/dist/components/chat/threads/ThreadListItem.d.ts +1 -1
  12. package/dist/config/env.d.ts +1 -1
  13. package/dist/context/ChatProviders.d.ts +1 -1
  14. package/dist/context/index.d.ts +1 -1
  15. package/dist/context/providers/ApiProvider.d.ts +1 -1
  16. package/dist/context/providers/ChatSessionProvider.d.ts +1 -1
  17. package/dist/context/reducers/MessageReducer.d.ts +1 -1
  18. package/dist/context/reducers/utils/reducerUtils.d.ts +1 -1
  19. package/dist/context/services/streaming/use-streaming-service.d.ts +1 -1
  20. package/dist/context/types.d.ts +1 -1
  21. package/dist/hooks/use-stream.d.ts +1 -1
  22. package/dist/hooks/useCheckpointMetadata.d.ts +1 -1
  23. package/dist/hooks/useMessageMetadata.d.ts +1 -1
  24. package/dist/hooks/useThreadHistoryState.d.ts +2 -2
  25. package/dist/hooks/useThreadsState.d.ts +1 -1
  26. package/dist/index.esm.js +862 -862
  27. package/dist/index.umd.js +1 -1
  28. package/dist/lib/chatUtils.d.ts +1 -1
  29. package/dist/lib/historyUtils.d.ts +1 -1
  30. package/dist/lib/index.d.ts +2 -2
  31. package/dist/lib/messageHelpers.d.ts +1 -1
  32. package/dist/lib/messagePreviews.d.ts +1 -1
  33. package/dist/types/{api.d.ts → index.d.ts} +1 -1
  34. package/dist/types/models.d.ts +0 -21
  35. package/dist/types/user.d.ts +21 -0
  36. package/package.json +1 -1
  37. package/dist/types/json-structures.d.ts +0 -30
@@ -1,5 +1,5 @@
1
- import type { AgentDetail, AgentSchemaInfo, AgentSummary, CheckpointList, CheckpointSnapshot, HistoryPayload, SharedThreadSummary, SmartOrgUser, ThreadInfo, ThreadShareResponse, ThreadSummary } from "@/types/api";
2
- import type { TokenListener } from "../types/api";
1
+ import type { AgentDetail, AgentSchemaInfo, AgentSummary, CheckpointList, CheckpointSnapshot, HistoryPayload, SharedThreadSummary, SmartOrgUser, ThreadInfo, ThreadShareResponse, ThreadSummary } from "@/types";
2
+ import type { TokenListener } from "../types";
3
3
  import { getChatToken, onChatTokenChanged, setChatToken } from "./utils";
4
4
  export declare class ChatApi {
5
5
  get baseUrl(): string;
@@ -4,7 +4,7 @@
4
4
  * This client only handles chat-related operations. Authentication is handled
5
5
  * by the host application which passes tokens via apiConfig.
6
6
  */
7
- import type { TokenListener } from "@/types/api";
7
+ import type { TokenListener } from "@/types";
8
8
  import { AxiosInstance, AxiosRequestConfig } from "axios";
9
9
  export declare function resolveChatBaseUrl(baseUrl?: string): string;
10
10
  export declare function getChatToken(): string | null;
@@ -3,7 +3,7 @@
3
3
  * Designed for use across multiple applications with customizable styling.
4
4
  * Relies on the split context hooks (useThreads/useMessages/useStream/useApi).
5
5
  */
6
- import type { ExcelUploadResponse } from "@/types/api";
6
+ import type { ExcelUploadResponse } from "@/types";
7
7
  export interface ChatInterfaceProps {
8
8
  className?: string;
9
9
  placeholder?: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Message Component - With truncatable tool messages and responsive design
3
3
  */
4
- import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types/api";
4
+ import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
5
5
  import type { CheckpointMetaWithAttempts } from "@/types/timeline";
6
6
  type MessageCheckpointMeta = {
7
7
  id: string;
@@ -1,4 +1,4 @@
1
- import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types/api";
1
+ import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
2
2
  import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta, TimelineCheckpoint } from "@/types/timeline";
3
3
  import React from "react";
4
4
  export interface MessageListProps {
@@ -1,4 +1,4 @@
1
- import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types/api";
1
+ import type { ChatMessage, DefaultMessage, PendingInterrupt } from "@/types";
2
2
  import type { CheckpointMeta, CheckpointMetaWithAttempts, EditMeta } from "@/types/timeline";
3
3
  import React from "react";
4
4
  export declare const getMessageDomKey: (message: ChatMessage | DefaultMessage | undefined, index: number) => string;
@@ -4,7 +4,7 @@
4
4
  * Dispatches to specific artifact renderers based on type.
5
5
  * Supports: plots, research_task_info, and extensible for other types.
6
6
  */
7
- import type { MessageArtifact } from "@/types/api";
7
+ import type { MessageArtifact } from "@/types";
8
8
  export interface ArtifactRendererProps {
9
9
  artifact: MessageArtifact | any;
10
10
  idx?: number;
@@ -1,4 +1,4 @@
1
- import type { ChatMessage } from "@/types/api";
1
+ import type { ChatMessage } from "@/types";
2
2
  interface StreamProgressProps {
3
3
  message: ChatMessage;
4
4
  isStreaming?: boolean;
@@ -1,4 +1,4 @@
1
- import type { ChatMessage } from "@/types/api";
1
+ import type { ChatMessage } from "@/types";
2
2
  interface ToolComponentProps {
3
3
  message: ChatMessage;
4
4
  viewMode: "preview" | "expanded";
@@ -1,4 +1,4 @@
1
- import type { ArtifactPreview } from "@/types/api";
1
+ import type { ArtifactPreview } from "@/types";
2
2
  export declare function PlotArtifact({ preview, idx }: {
3
3
  preview: ArtifactPreview;
4
4
  idx: number;
@@ -1,4 +1,4 @@
1
- import type { ThreadSummary } from "@/types/api";
1
+ import type { ThreadSummary } from "@/types";
2
2
  import React from "react";
3
3
  export interface ThreadListItemProps {
4
4
  thread: ThreadSummary;
@@ -1,4 +1,4 @@
1
- import type { ApiConfig } from "@/types/api";
1
+ import type { ApiConfig } from "@/types";
2
2
  /**
3
3
  * Get the default API configuration from runtime globals (if provided)
4
4
  */
@@ -5,7 +5,7 @@
5
5
  * ApiProvider (auth token & API client)
6
6
  * └─ ChatSessionProvider (threads, messages, and streaming state)
7
7
  */
8
- import type { ApiConfig } from '@/types/api';
8
+ import type { ApiConfig } from '@/types';
9
9
  import type { ToolEndEvent } from '@/types/events';
10
10
  import { type ReactNode } from 'react';
11
11
  export interface ChatProvidersProps {
@@ -11,4 +11,4 @@ export { ChatProviders } from './ChatProviders';
11
11
  export { ApiProvider, useApi } from './providers/ApiProvider';
12
12
  export { ChatSessionProvider, useHasChatSession, useStream, useThreads, useThreadState } from './providers/ChatSessionProvider';
13
13
  export { useMessagesReducer } from './reducers/MessageReducer';
14
- export type { ApiContextValue, CoordinatorOptions, SendOptions, StreamContextValue, ThreadsContextValue, ThreadStateContextValue } from '@/types/api';
14
+ export type { ApiContextValue, CoordinatorOptions, SendOptions, StreamContextValue, ThreadsContextValue, ThreadStateContextValue } from '@/types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * ApiProvider - Lowest level context providing API client and auth token
3
3
  */
4
- import type { ApiConfig, ApiContextValue } from '@/types/api';
4
+ import type { ApiConfig, ApiContextValue } from '@/types';
5
5
  import { type ReactNode } from 'react';
6
6
  export interface ApiProviderProps {
7
7
  children: ReactNode;
@@ -31,7 +31,7 @@
31
31
  *
32
32
  * RESULT: Much easier to debug, faster development, no stale cache issues
33
33
  */
34
- import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, SharedThreadSummary, SmartOrgUser, StreamContextValue, ThreadSummary, TimelineCheckpoint } from '@/types/api';
34
+ import type { ChatMessage, HydratedCheckpointSnapshot, PendingInterrupt, SharedThreadSummary, SmartOrgUser, StreamContextValue, ThreadSummary, TimelineCheckpoint } from '@/types';
35
35
  import type { ThreadStateMetadata } from '@/types/context';
36
36
  import type { ToolEndEvent } from '@/types/events';
37
37
  import { type ReactNode } from 'react';
@@ -1,4 +1,4 @@
1
- import type { ChatMessage, PendingInterrupt, StreamEvent } from "@/types/api";
1
+ import type { ChatMessage, PendingInterrupt, StreamEvent } from "@/types";
2
2
  import type { ToolStreamEntry } from "@/types/toolStream";
3
3
  export interface MessagesState {
4
4
  messages: ChatMessage[];
@@ -1,4 +1,4 @@
1
- import type { ChatMessage, MessagePart } from "@/types/api";
1
+ import type { ChatMessage, MessagePart } from "@/types";
2
2
  import type { ToolStreamEntry } from "@/types/toolStream";
3
3
  export declare function sanitizeHistory(messages: ChatMessage[]): ChatMessage[];
4
4
  export declare function replaceMessageAtIndex(messages: ChatMessage[], index: number, message: ChatMessage): ChatMessage[];
@@ -1,4 +1,4 @@
1
- import type { ChatRequest, HistoryPayload, StreamEvent } from '@/types/api';
1
+ import type { ChatRequest, HistoryPayload, StreamEvent } from '@/types';
2
2
  export type ThreadInfoEvent = Extract<StreamEvent, {
3
3
  type: 'thread_info';
4
4
  }>;
@@ -1 +1 @@
1
- export type { ApiContextValue, StreamContextValue, ThreadsContextValue, ThreadStateContextValue, SendOptions, StreamEvent, MessageAction, StreamAction, ThreadAction, CoordinatorOptions, } from '@/types/api';
1
+ export type { ApiContextValue, CoordinatorOptions, MessageAction, SendOptions, StreamAction, StreamContextValue, StreamEvent, ThreadAction, ThreadsContextValue, ThreadStateContextValue } from '@/types';
@@ -1,4 +1,4 @@
1
- import { ChatRequest, HistoryPayload, StreamEvent } from "@/types/api";
1
+ import { ChatRequest, HistoryPayload, StreamEvent } from "@/types";
2
2
  export type UseChatStreamOptions = {
3
3
  baseUrl?: string;
4
4
  streamPath?: string;
@@ -12,7 +12,7 @@
12
12
  * This hook moves ~107 lines of metadata preparation logic from ChatInterface,
13
13
  * resulting in cleaner separation of concerns.
14
14
  */
15
- import type { HydratedCheckpointSnapshot } from "@/types/api";
15
+ import type { HydratedCheckpointSnapshot } from "@/types";
16
16
  import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/types/timeline";
17
17
  export interface CheckpointMetadataResult {
18
18
  checkpointMetaById: Map<string, CheckpointMeta>;
@@ -9,7 +9,7 @@
9
9
  * This hook encapsulates ~120 lines of complex metadata resolution logic
10
10
  * that was previously embedded in MessageList.tsx's render function.
11
11
  */
12
- import type { ChatMessage, DefaultMessage } from "@/types/api";
12
+ import type { ChatMessage, DefaultMessage } from "@/types";
13
13
  import type { CheckpointMeta, CheckpointMetaWithAttempts } from "@/types/timeline";
14
14
  export interface MetadataResolverMaps {
15
15
  checkpointMetaById?: Map<string, CheckpointMeta>;
@@ -1,7 +1,7 @@
1
1
  import type { ChatApi } from "@/api/chat-api";
2
- import type { ChatMessage, HydratedCheckpointSnapshot, TimelineCheckpoint } from "@/types/api";
3
- import type { PendingInterrupt } from "@/types/models";
4
2
  import type { StateHistoryEvent } from "@/context/services/streaming/use-streaming-service";
3
+ import type { ChatMessage, HydratedCheckpointSnapshot, TimelineCheckpoint } from "@/types";
4
+ import type { PendingInterrupt } from "@/types/models";
5
5
  interface UseThreadHistoryStateOptions {
6
6
  api: ChatApi;
7
7
  seed: (messages: ChatMessage[], opts?: {
@@ -1,7 +1,7 @@
1
1
  import { type MutableRefObject } from 'react';
2
2
  import type { ChatApi } from '@/api/chat-api';
3
- import type { SharedThreadSummary, SmartOrgUser, ThreadSummary } from '@/types/api';
4
3
  import type { ThreadInfoEvent } from '@/context/services/streaming/use-streaming-service';
4
+ import type { SharedThreadSummary, SmartOrgUser, ThreadSummary } from '@/types';
5
5
  interface ThreadActions {
6
6
  createThread: (title?: string) => Promise<string | null>;
7
7
  deleteThread: (threadId: string) => Promise<void>;