@codexview/react 0.2.3 → 0.3.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/dist/components/CodexTranscript.d.ts +2 -0
- package/dist/components/ToolGroup.d.ts +20 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +199 -102
- package/dist/index.js.map +1 -1
- package/dist/styles.css +31 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ import { TodoListBlockProps } from './TodoListBlock.js';
|
|
|
11
11
|
import { ErrorBlockProps } from './ErrorBlock.js';
|
|
12
12
|
import { RawEventBlockProps } from './RawEventBlock.js';
|
|
13
13
|
import { StatusBarProps } from './StatusBar.js';
|
|
14
|
+
import { ToolGroupProps } from './ToolGroup.js';
|
|
14
15
|
export interface CodexTranscriptComponents {
|
|
15
16
|
StatusBar: ComponentType<StatusBarProps>;
|
|
16
17
|
MessageBubble: ComponentType<MessageBubbleProps>;
|
|
@@ -22,6 +23,7 @@ export interface CodexTranscriptComponents {
|
|
|
22
23
|
TodoListBlock: ComponentType<TodoListBlockProps>;
|
|
23
24
|
ErrorBlock: ComponentType<ErrorBlockProps>;
|
|
24
25
|
RawEventBlock: ComponentType<RawEventBlockProps>;
|
|
26
|
+
ToolGroup: ComponentType<ToolGroupProps>;
|
|
25
27
|
}
|
|
26
28
|
export interface CodexTranscriptProps {
|
|
27
29
|
events: ChatStreamEvent[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ItemView } from '../types/model.js';
|
|
3
|
+
export interface ToolGroupProps {
|
|
4
|
+
items: ItemView[];
|
|
5
|
+
/** Pre-rendered child blocks, one per item, in the same order as `items`. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Default to false (collapsed). Auto-expands while any item is pending/running. */
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function isGroupableKind(kind: ItemView['kind']): boolean;
|
|
11
|
+
export type Slice = {
|
|
12
|
+
kind: 'single';
|
|
13
|
+
item: ItemView;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'group';
|
|
16
|
+
items: ItemView[];
|
|
17
|
+
};
|
|
18
|
+
export declare function partitionForGrouping(items: ItemView[]): Slice[];
|
|
19
|
+
export declare function summarize(items: ItemView[]): string;
|
|
20
|
+
export declare function ToolGroup({ items, children, defaultOpen }: ToolGroupProps): JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,8 +31,10 @@ export { ErrorBlock } from './components/ErrorBlock.js';
|
|
|
31
31
|
export type { ErrorBlockProps } from './components/ErrorBlock.js';
|
|
32
32
|
export { RawEventBlock } from './components/RawEventBlock.js';
|
|
33
33
|
export type { RawEventBlockProps } from './components/RawEventBlock.js';
|
|
34
|
+
export { ToolGroup, partitionForGrouping, summarize as summarizeToolGroup, isGroupableKind } from './components/ToolGroup.js';
|
|
35
|
+
export type { ToolGroupProps, Slice as ToolGroupSlice } from './components/ToolGroup.js';
|
|
34
36
|
export { ItemErrorBoundary } from './components/ItemErrorBoundary.js';
|
|
35
37
|
export type { ItemErrorBoundaryProps } from './components/ItemErrorBoundary.js';
|
|
36
38
|
export { Markdown } from './components/Markdown.js';
|
|
37
39
|
export type { MarkdownProps } from './components/Markdown.js';
|
|
38
|
-
export declare const VERSION = "0.
|
|
40
|
+
export declare const VERSION = "0.3.0";
|