@ocai/app-sdk-ui 0.3.0 → 0.5.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.
@@ -1,5 +1,5 @@
1
1
  import { LucideIcon } from 'lucide-react';
2
- import { ReactElement } from 'react';
2
+ import { ReactElement, ReactNode } from 'react';
3
3
  import { AiActivity } from './activity-labels';
4
4
  import { TracePart } from './segments';
5
5
  export declare function humanizeToolName(type: string): string;
@@ -11,7 +11,8 @@ export type MessageTraceProps = {
11
11
  getToolLabel?: (type: string) => string | undefined;
12
12
  getToolIcon?: (type: string) => LucideIcon | undefined;
13
13
  getActivityOverride?: (runningToolType: string | undefined) => string | undefined;
14
+ renderStepDetail?: (part: TracePart) => ReactNode;
14
15
  defaultOpen?: boolean;
15
16
  className?: string;
16
17
  };
17
- export declare const MessageTrace: import('react').MemoExoticComponent<({ parts, isLoading, messageId, activity, getToolLabel, getToolIcon, getActivityOverride, defaultOpen, className, }: MessageTraceProps) => ReactElement>;
18
+ export declare const MessageTrace: import('react').MemoExoticComponent<({ parts, isLoading, messageId, activity, getToolLabel, getToolIcon, getActivityOverride, renderStepDetail, defaultOpen, className, }: MessageTraceProps) => ReactElement>;
@@ -0,0 +1,6 @@
1
+ import { ThemeInput } from '@streamdown/code';
2
+ type CodexTheme = Extract<ThemeInput, object>;
3
+ declare const codexLightTheme: CodexTheme;
4
+ declare const codexDarkTheme: CodexTheme;
5
+ export { codexLightTheme, codexDarkTheme };
6
+ export declare const shikiTheme: [ThemeInput, ThemeInput];
@@ -4,6 +4,12 @@ export type SourceItem = {
4
4
  url: string;
5
5
  title?: string;
6
6
  };
7
+ export type SourceListProps = {
8
+ sources: readonly SourceItem[];
9
+ getFaviconUrl?: (url: string) => string | null;
10
+ className?: string;
11
+ };
12
+ export declare const SourceList: ({ sources, getFaviconUrl, className, }: SourceListProps) => ReactElement | null;
7
13
  export type SourcesProps = Omit<ComponentProps<typeof Collapsible>, "children"> & {
8
14
  sources: readonly SourceItem[];
9
15
  getLabel?: (count: number) => string;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,6 @@ export { MessageTrace, humanizeToolName, type MessageTraceProps, } from './chat/
8
8
  export { buildSegments, traceIsLoading, type BuildSegmentsOptions, type MessageSegment, type TracePart, } from './chat/segments';
9
9
  export { getAiActivityLabel, getAiActivityLabelParts, labelSeedFromString, traceElapsedSeconds, type AiActivity, type AiActivityKind, type ActivityLabelParts, type GetAiActivityLabelArgs, } from './chat/activity-labels';
10
10
  export { useActivityClock } from './chat/use-activity-clock';
11
- export { Sources, citationClassName, type SourceItem, type SourcesProps, } from './chat/sources';
11
+ export { Sources, SourceList, citationClassName, type SourceItem, type SourcesProps, type SourceListProps, } from './chat/sources';
12
12
  export { extractWebSearchSources, isWebSearchError, stripCitationParens, type WebSearchErrorOutput, type WebSearchInput, type WebSearchOutput, type WebSearchResult, type WebSearchSuccessOutput, type WebSearchUIPart, type WebSearchUITool, } from './chat/web-search';
13
13
  export { WebSearchToggle, type WebSearchToggleProps, } from './chat/web-search-toggle';