@townco/ui 0.1.17 → 0.1.19
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/core/hooks/use-chat-input.d.ts +17 -17
- package/dist/core/hooks/use-chat-input.js +55 -64
- package/dist/core/hooks/use-chat-messages.js +114 -121
- package/dist/core/hooks/use-chat-session.d.ts +1 -1
- package/dist/core/hooks/use-chat-session.js +80 -78
- package/dist/gui/components/Button.d.ts +7 -23
- package/dist/gui/components/Button.js +27 -40
- package/dist/gui/components/Card.d.ts +7 -26
- package/dist/gui/components/Card.js +8 -54
- package/dist/gui/components/ChatEmptyState.d.ts +18 -0
- package/dist/gui/components/ChatEmptyState.js +22 -0
- package/dist/gui/components/ChatInput.js +29 -1
- package/dist/gui/components/ChatLayout.js +2 -2
- package/dist/gui/components/ChatSecondaryPanel.d.ts +25 -14
- package/dist/gui/components/ChatSecondaryPanel.js +60 -115
- package/dist/gui/components/ChatStatus.d.ts +2 -4
- package/dist/gui/components/ChatStatus.js +34 -45
- package/dist/gui/components/Conversation.d.ts +14 -17
- package/dist/gui/components/Conversation.js +83 -143
- package/dist/gui/components/Dialog.d.ts +11 -57
- package/dist/gui/components/HeightTransition.d.ts +7 -12
- package/dist/gui/components/HeightTransition.js +77 -88
- package/dist/gui/components/Input.d.ts +6 -13
- package/dist/gui/components/Input.js +16 -27
- package/dist/gui/components/Label.d.ts +1 -7
- package/dist/gui/components/MarkdownRenderer.d.ts +4 -6
- package/dist/gui/components/MarkdownRenderer.js +81 -178
- package/dist/gui/components/Message.d.ts +1 -1
- package/dist/gui/components/MessageContent.d.ts +22 -29
- package/dist/gui/components/PanelTabsHeader.d.ts +17 -0
- package/dist/gui/components/PanelTabsHeader.js +31 -0
- package/dist/gui/components/Reasoning.d.ts +24 -30
- package/dist/gui/components/Reasoning.js +60 -187
- package/dist/gui/components/Response.d.ts +9 -11
- package/dist/gui/components/Response.js +90 -229
- package/dist/gui/components/Select.d.ts +10 -69
- package/dist/gui/components/Tabs.d.ts +4 -24
- package/dist/gui/components/Task.d.ts +24 -28
- package/dist/gui/components/Task.js +31 -164
- package/dist/gui/components/Textarea.d.ts +7 -15
- package/dist/gui/components/Textarea.js +46 -63
- package/dist/gui/components/ThinkingBlock.d.ts +10 -20
- package/dist/gui/components/ThinkingBlock.js +35 -134
- package/dist/gui/components/TodoList.d.ts +10 -12
- package/dist/gui/components/TodoList.js +7 -22
- package/dist/gui/components/TodoListItem.d.ts +6 -9
- package/dist/gui/components/TodoListItem.js +4 -18
- package/dist/gui/components/index.d.ts +2 -0
- package/dist/gui/components/index.js +2 -0
- package/dist/gui/lib/utils.js +1 -1
- package/dist/index.test.js +1 -0
- package/dist/sdk/client/acp-client.d.ts +76 -88
- package/dist/sdk/client/acp-client.js +217 -215
- package/dist/sdk/schemas/agent.d.ts +64 -111
- package/dist/sdk/schemas/agent.js +24 -24
- package/dist/sdk/schemas/message.d.ts +147 -245
- package/dist/sdk/schemas/message.js +40 -40
- package/dist/sdk/schemas/session.d.ts +6 -6
- package/dist/sdk/transports/http.d.ts +55 -55
- package/dist/sdk/transports/http.js +3 -3
- package/dist/sdk/transports/stdio.d.ts +20 -20
- package/dist/sdk/transports/types.d.ts +42 -42
- package/dist/sdk/transports/websocket.d.ts +12 -12
- package/dist/sdk/transports/websocket.js +46 -52
- package/dist/tui/components/ChatView.d.ts +2 -4
- package/dist/tui/components/GameOfLife.js +35 -64
- package/dist/tui/components/InputBox.d.ts +11 -18
- package/dist/tui/components/InputBox.js +10 -70
- package/dist/tui/components/ReadlineInput.d.ts +6 -12
- package/dist/tui/components/ReadlineInput.js +237 -252
- package/dist/tui/components/SingleSelect.d.ts +9 -15
- package/dist/tui/components/SingleSelect.js +43 -84
- package/dist/tui/components/StatusBar.d.ts +6 -11
- package/dist/tui/components/StatusBar.js +67 -102
- package/package.json +2 -2
- package/src/styles/global.css +64 -0
- package/dist/core/hooks/index.d.ts.map +0 -1
- package/dist/core/hooks/index.js.map +0 -1
- package/dist/core/hooks/use-chat-input.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-input.js.map +0 -1
- package/dist/core/hooks/use-chat-messages.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-messages.js.map +0 -1
- package/dist/core/hooks/use-chat-session.d.ts.map +0 -1
- package/dist/core/hooks/use-chat-session.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/schemas/chat.d.ts.map +0 -1
- package/dist/core/schemas/chat.js.map +0 -1
- package/dist/core/schemas/index.d.ts.map +0 -1
- package/dist/core/schemas/index.js.map +0 -1
- package/dist/core/store/chat-store.d.ts.map +0 -1
- package/dist/core/store/chat-store.js.map +0 -1
- package/dist/gui/components/Button.d.ts.map +0 -1
- package/dist/gui/components/Button.js.map +0 -1
- package/dist/gui/components/Card.d.ts.map +0 -1
- package/dist/gui/components/Card.js.map +0 -1
- package/dist/gui/components/ChatInput.d.ts.map +0 -1
- package/dist/gui/components/ChatInput.js.map +0 -1
- package/dist/gui/components/ChatInterface.d.ts +0 -12
- package/dist/gui/components/ChatInterface.d.ts.map +0 -1
- package/dist/gui/components/ChatInterface.js +0 -204
- package/dist/gui/components/ChatInterface.js.map +0 -1
- package/dist/gui/components/ChatPreview.d.ts +0 -12
- package/dist/gui/components/ChatPreview.d.ts.map +0 -1
- package/dist/gui/components/ChatPreview.js +0 -214
- package/dist/gui/components/ChatPreview.js.map +0 -1
- package/dist/gui/components/ChatSecondaryPanel.d.ts.map +0 -1
- package/dist/gui/components/ChatSecondaryPanel.js.map +0 -1
- package/dist/gui/components/ChatStatus.d.ts.map +0 -1
- package/dist/gui/components/ChatStatus.js.map +0 -1
- package/dist/gui/components/ChatView.d.ts +0 -8
- package/dist/gui/components/ChatView.d.ts.map +0 -1
- package/dist/gui/components/ChatView.js +0 -42
- package/dist/gui/components/ChatView.js.map +0 -1
- package/dist/gui/components/ConfigPanel.d.ts +0 -20
- package/dist/gui/components/ConfigPanel.d.ts.map +0 -1
- package/dist/gui/components/ConfigPanel.js +0 -225
- package/dist/gui/components/ConfigPanel.js.map +0 -1
- package/dist/gui/components/Conversation.d.ts.map +0 -1
- package/dist/gui/components/Conversation.js.map +0 -1
- package/dist/gui/components/Dialog.d.ts.map +0 -1
- package/dist/gui/components/Dialog.js.map +0 -1
- package/dist/gui/components/HeightTransition.d.ts.map +0 -1
- package/dist/gui/components/HeightTransition.js.map +0 -1
- package/dist/gui/components/Input.d.ts.map +0 -1
- package/dist/gui/components/Input.js.map +0 -1
- package/dist/gui/components/InputBox.d.ts +0 -21
- package/dist/gui/components/InputBox.d.ts.map +0 -1
- package/dist/gui/components/InputBox.js +0 -90
- package/dist/gui/components/InputBox.js.map +0 -1
- package/dist/gui/components/Label.d.ts.map +0 -1
- package/dist/gui/components/Label.js.map +0 -1
- package/dist/gui/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/gui/components/MarkdownRenderer.js.map +0 -1
- package/dist/gui/components/Message.d.ts.map +0 -1
- package/dist/gui/components/Message.js.map +0 -1
- package/dist/gui/components/MessageContent.d.ts.map +0 -1
- package/dist/gui/components/MessageContent.js.map +0 -1
- package/dist/gui/components/MessageList.d.ts.map +0 -1
- package/dist/gui/components/MessageList.js.map +0 -1
- package/dist/gui/components/PlaygroundLayout.d.ts +0 -14
- package/dist/gui/components/PlaygroundLayout.d.ts.map +0 -1
- package/dist/gui/components/PlaygroundLayout.js +0 -49
- package/dist/gui/components/PlaygroundLayout.js.map +0 -1
- package/dist/gui/components/Reasoning.d.ts.map +0 -1
- package/dist/gui/components/Reasoning.js.map +0 -1
- package/dist/gui/components/Response.d.ts.map +0 -1
- package/dist/gui/components/Response.js.map +0 -1
- package/dist/gui/components/Select.d.ts.map +0 -1
- package/dist/gui/components/Select.js.map +0 -1
- package/dist/gui/components/StatusBar.d.ts +0 -12
- package/dist/gui/components/StatusBar.d.ts.map +0 -1
- package/dist/gui/components/StatusBar.js +0 -58
- package/dist/gui/components/StatusBar.js.map +0 -1
- package/dist/gui/components/Tabs.d.ts.map +0 -1
- package/dist/gui/components/Tabs.js.map +0 -1
- package/dist/gui/components/Task.d.ts.map +0 -1
- package/dist/gui/components/Task.js.map +0 -1
- package/dist/gui/components/Textarea.d.ts.map +0 -1
- package/dist/gui/components/Textarea.js.map +0 -1
- package/dist/gui/components/ThinkingBlock.d.ts.map +0 -1
- package/dist/gui/components/ThinkingBlock.js.map +0 -1
- package/dist/gui/components/TodoList.d.ts.map +0 -1
- package/dist/gui/components/TodoList.js.map +0 -1
- package/dist/gui/components/TodoListItem.d.ts.map +0 -1
- package/dist/gui/components/TodoListItem.js.map +0 -1
- package/dist/gui/components/index.d.ts.map +0 -1
- package/dist/gui/components/index.js.map +0 -1
- package/dist/gui/index.d.ts.map +0 -1
- package/dist/gui/index.js.map +0 -1
- package/dist/gui/lib/utils.d.ts.map +0 -1
- package/dist/gui/lib/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/sdk/client/acp-client.d.ts.map +0 -1
- package/dist/sdk/client/acp-client.js.map +0 -1
- package/dist/sdk/client/index.d.ts.map +0 -1
- package/dist/sdk/client/index.js.map +0 -1
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/schemas/agent.d.ts.map +0 -1
- package/dist/sdk/schemas/agent.js.map +0 -1
- package/dist/sdk/schemas/index.d.ts.map +0 -1
- package/dist/sdk/schemas/index.js.map +0 -1
- package/dist/sdk/schemas/message.d.ts.map +0 -1
- package/dist/sdk/schemas/message.js.map +0 -1
- package/dist/sdk/schemas/session.d.ts.map +0 -1
- package/dist/sdk/schemas/session.js.map +0 -1
- package/dist/sdk/transports/http.d.ts.map +0 -1
- package/dist/sdk/transports/http.js.map +0 -1
- package/dist/sdk/transports/index.d.ts.map +0 -1
- package/dist/sdk/transports/index.js.map +0 -1
- package/dist/sdk/transports/stdio.d.ts.map +0 -1
- package/dist/sdk/transports/stdio.js.map +0 -1
- package/dist/sdk/transports/types.d.ts.map +0 -1
- package/dist/sdk/transports/types.js.map +0 -1
- package/dist/sdk/transports/websocket.d.ts.map +0 -1
- package/dist/sdk/transports/websocket.js.map +0 -1
- package/dist/tui/components/ChatView.d.ts.map +0 -1
- package/dist/tui/components/ChatView.js.map +0 -1
- package/dist/tui/components/GameOfLife.d.ts.map +0 -1
- package/dist/tui/components/GameOfLife.js.map +0 -1
- package/dist/tui/components/InputBox.d.ts.map +0 -1
- package/dist/tui/components/InputBox.js.map +0 -1
- package/dist/tui/components/MessageList.d.ts.map +0 -1
- package/dist/tui/components/MessageList.js.map +0 -1
- package/dist/tui/components/ReadlineInput.d.ts.map +0 -1
- package/dist/tui/components/ReadlineInput.js.map +0 -1
- package/dist/tui/components/StatusBar.d.ts.map +0 -1
- package/dist/tui/components/StatusBar.js.map +0 -1
- package/dist/tui/components/index.d.ts.map +0 -1
- package/dist/tui/components/index.js.map +0 -1
- package/dist/tui/index.d.ts.map +0 -1
- package/dist/tui/index.js.map +0 -1
|
@@ -1,72 +1,13 @@
|
|
|
1
1
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
-
declare const SelectGroup: React.ForwardRefExoticComponent<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
> &
|
|
15
|
-
React.RefAttributes<HTMLButtonElement>
|
|
16
|
-
>;
|
|
17
|
-
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<
|
|
18
|
-
Omit<
|
|
19
|
-
SelectPrimitive.SelectScrollUpButtonProps &
|
|
20
|
-
React.RefAttributes<HTMLDivElement>,
|
|
21
|
-
"ref"
|
|
22
|
-
> &
|
|
23
|
-
React.RefAttributes<HTMLDivElement>
|
|
24
|
-
>;
|
|
25
|
-
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<
|
|
26
|
-
Omit<
|
|
27
|
-
SelectPrimitive.SelectScrollDownButtonProps &
|
|
28
|
-
React.RefAttributes<HTMLDivElement>,
|
|
29
|
-
"ref"
|
|
30
|
-
> &
|
|
31
|
-
React.RefAttributes<HTMLDivElement>
|
|
32
|
-
>;
|
|
33
|
-
declare const SelectContent: React.ForwardRefExoticComponent<
|
|
34
|
-
Omit<
|
|
35
|
-
SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>,
|
|
36
|
-
"ref"
|
|
37
|
-
> &
|
|
38
|
-
React.RefAttributes<HTMLDivElement>
|
|
39
|
-
>;
|
|
40
|
-
declare const SelectLabel: React.ForwardRefExoticComponent<
|
|
41
|
-
Omit<
|
|
42
|
-
SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>,
|
|
43
|
-
"ref"
|
|
44
|
-
> &
|
|
45
|
-
React.RefAttributes<HTMLDivElement>
|
|
46
|
-
>;
|
|
47
|
-
declare const SelectItem: React.ForwardRefExoticComponent<
|
|
48
|
-
Omit<
|
|
49
|
-
SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>,
|
|
50
|
-
"ref"
|
|
51
|
-
> &
|
|
52
|
-
React.RefAttributes<HTMLDivElement>
|
|
53
|
-
>;
|
|
54
|
-
declare const SelectSeparator: React.ForwardRefExoticComponent<
|
|
55
|
-
Omit<
|
|
56
|
-
SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>,
|
|
57
|
-
"ref"
|
|
58
|
-
> &
|
|
59
|
-
React.RefAttributes<HTMLDivElement>
|
|
60
|
-
>;
|
|
61
|
-
export {
|
|
62
|
-
Select,
|
|
63
|
-
SelectGroup,
|
|
64
|
-
SelectValue,
|
|
65
|
-
SelectTrigger,
|
|
66
|
-
SelectContent,
|
|
67
|
-
SelectLabel,
|
|
68
|
-
SelectItem,
|
|
69
|
-
SelectSeparator,
|
|
70
|
-
SelectScrollUpButton,
|
|
71
|
-
SelectScrollDownButton,
|
|
72
|
-
};
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const Tabs: React.ForwardRefExoticComponent<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const
|
|
7
|
-
Omit<
|
|
8
|
-
TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>,
|
|
9
|
-
"ref"
|
|
10
|
-
> &
|
|
11
|
-
React.RefAttributes<HTMLDivElement>
|
|
12
|
-
>;
|
|
13
|
-
declare const TabsTrigger: React.ForwardRefExoticComponent<
|
|
14
|
-
Omit<
|
|
15
|
-
TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>,
|
|
16
|
-
"ref"
|
|
17
|
-
> &
|
|
18
|
-
React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
20
|
-
declare const TabsContent: React.ForwardRefExoticComponent<
|
|
21
|
-
Omit<
|
|
22
|
-
TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>,
|
|
23
|
-
"ref"
|
|
24
|
-
> &
|
|
25
|
-
React.RefAttributes<HTMLDivElement>
|
|
26
|
-
>;
|
|
3
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
7
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -4,36 +4,32 @@ import * as React from "react";
|
|
|
4
4
|
* Enhanced todo/task display with collapsible details and file references
|
|
5
5
|
*/
|
|
6
6
|
export interface TaskItem {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
id: string;
|
|
8
|
+
text: string;
|
|
9
|
+
status: "pending" | "in_progress" | "completed";
|
|
10
|
+
/** Optional file references */
|
|
11
|
+
files?: string[];
|
|
12
|
+
/** Optional additional details */
|
|
13
|
+
details?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface TaskProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
/** Task item data */
|
|
17
|
+
task: TaskItem;
|
|
18
|
+
/** Show collapsible details */
|
|
19
|
+
collapsible?: boolean;
|
|
20
|
+
/** Default expanded state */
|
|
21
|
+
defaultExpanded?: boolean;
|
|
22
|
+
/** Callback when task is clicked */
|
|
23
|
+
onTaskClick?: (task: TaskItem) => void;
|
|
24
24
|
}
|
|
25
|
-
export declare const Task: React.ForwardRefExoticComponent<
|
|
26
|
-
TaskProps & React.RefAttributes<HTMLDivElement>
|
|
27
|
-
>;
|
|
25
|
+
export declare const Task: React.ForwardRefExoticComponent<TaskProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
26
|
export interface TaskListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
tasks: TaskItem[];
|
|
28
|
+
/** Show collapsible details */
|
|
29
|
+
collapsible?: boolean;
|
|
30
|
+
/** Callback when task is clicked */
|
|
31
|
+
onTaskClick?: (task: TaskItem) => void;
|
|
32
|
+
/** Empty state message */
|
|
33
|
+
emptyMessage?: string;
|
|
36
34
|
}
|
|
37
|
-
export declare const TaskList: React.ForwardRefExoticComponent<
|
|
38
|
-
TaskListProps & React.RefAttributes<HTMLDivElement>
|
|
39
|
-
>;
|
|
35
|
+
export declare const TaskList: React.ForwardRefExoticComponent<TaskListProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,170 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { CheckCircle2, ChevronDown, Circle, Loader2 } from "lucide-react";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import { useState } from "react";
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cn } from "../lib/utils.js";
|
|
6
|
-
export const Task = React.forwardRef(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return "text-primary";
|
|
34
|
-
default:
|
|
35
|
-
return "text-foreground opacity-40";
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const handleClick = () => {
|
|
39
|
-
if (hasDetails && collapsible) {
|
|
40
|
-
setIsExpanded(!isExpanded);
|
|
41
|
-
}
|
|
42
|
-
onTaskClick?.(task);
|
|
43
|
-
};
|
|
44
|
-
return _jsxs("div", {
|
|
45
|
-
ref: ref,
|
|
46
|
-
className: cn(
|
|
47
|
-
"rounded-lg border border-border bg-card transition-all",
|
|
48
|
-
"hover:shadow-sm hover:border-border/80",
|
|
49
|
-
className,
|
|
50
|
-
),
|
|
51
|
-
...props,
|
|
52
|
-
children: [
|
|
53
|
-
_jsxs("button", {
|
|
54
|
-
type: "button",
|
|
55
|
-
onClick: handleClick,
|
|
56
|
-
className: cn(
|
|
57
|
-
"w-full flex items-center gap-3 px-3 py-2.5 text-left",
|
|
58
|
-
hasDetails && collapsible && "cursor-pointer",
|
|
59
|
-
),
|
|
60
|
-
disabled: !hasDetails && !collapsible,
|
|
61
|
-
children: [
|
|
62
|
-
_jsx(StatusIcon, {
|
|
63
|
-
className: cn(
|
|
64
|
-
"w-4 h-4 shrink-0",
|
|
65
|
-
getStatusColor(),
|
|
66
|
-
task.status === "in_progress" && "animate-spin",
|
|
67
|
-
),
|
|
68
|
-
}),
|
|
69
|
-
_jsx("span", {
|
|
70
|
-
className: cn(
|
|
71
|
-
"flex-1 text-sm font-[var(--font-family)]",
|
|
72
|
-
task.status === "completed" && "line-through opacity-60",
|
|
73
|
-
task.status === "in_progress" && "font-medium",
|
|
74
|
-
),
|
|
75
|
-
children: task.text,
|
|
76
|
-
}),
|
|
77
|
-
hasDetails &&
|
|
78
|
-
collapsible &&
|
|
79
|
-
_jsx(ChevronDown, {
|
|
80
|
-
className: cn(
|
|
81
|
-
"w-4 h-4 text-foreground opacity-50 transition-transform duration-200 shrink-0",
|
|
82
|
-
isExpanded && "rotate-180",
|
|
83
|
-
),
|
|
84
|
-
"aria-hidden": "true",
|
|
85
|
-
}),
|
|
86
|
-
],
|
|
87
|
-
}),
|
|
88
|
-
hasDetails &&
|
|
89
|
-
isExpanded &&
|
|
90
|
-
_jsxs("div", {
|
|
91
|
-
className:
|
|
92
|
-
"px-3 pb-3 pt-1 border-t border-border/50 animate-fadeIn",
|
|
93
|
-
children: [
|
|
94
|
-
task.details &&
|
|
95
|
-
_jsx("p", {
|
|
96
|
-
className:
|
|
97
|
-
"text-sm text-foreground opacity-80 leading-relaxed mb-2",
|
|
98
|
-
children: task.details,
|
|
99
|
-
}),
|
|
100
|
-
task.files &&
|
|
101
|
-
task.files.length > 0 &&
|
|
102
|
-
_jsxs("div", {
|
|
103
|
-
className: "space-y-1",
|
|
104
|
-
children: [
|
|
105
|
-
_jsx("span", {
|
|
106
|
-
className:
|
|
107
|
-
"text-xs font-medium text-foreground opacity-60 uppercase tracking-wide",
|
|
108
|
-
children: "Files:",
|
|
109
|
-
}),
|
|
110
|
-
_jsx("div", {
|
|
111
|
-
className: "space-y-1",
|
|
112
|
-
children: task.files.map((file) =>
|
|
113
|
-
_jsx(
|
|
114
|
-
"div",
|
|
115
|
-
{
|
|
116
|
-
className:
|
|
117
|
-
"text-xs font-mono text-foreground opacity-70 bg-background px-2 py-1 rounded border border-border/50",
|
|
118
|
-
children: file,
|
|
119
|
-
},
|
|
120
|
-
file,
|
|
121
|
-
),
|
|
122
|
-
),
|
|
123
|
-
}),
|
|
124
|
-
],
|
|
125
|
-
}),
|
|
126
|
-
],
|
|
127
|
-
}),
|
|
128
|
-
],
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
);
|
|
6
|
+
export const Task = React.forwardRef(({ task, collapsible = true, defaultExpanded = false, onTaskClick, className, ...props }, ref) => {
|
|
7
|
+
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
8
|
+
const hasDetails = !!(task.details ||
|
|
9
|
+
(task.files && task.files.length > 0));
|
|
10
|
+
const StatusIcon = {
|
|
11
|
+
pending: Circle,
|
|
12
|
+
in_progress: Loader2,
|
|
13
|
+
completed: CheckCircle2,
|
|
14
|
+
}[task.status];
|
|
15
|
+
const getStatusColor = () => {
|
|
16
|
+
switch (task.status) {
|
|
17
|
+
case "completed":
|
|
18
|
+
return "text-green-500";
|
|
19
|
+
case "in_progress":
|
|
20
|
+
return "text-primary";
|
|
21
|
+
default:
|
|
22
|
+
return "text-foreground opacity-40";
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const handleClick = () => {
|
|
26
|
+
if (hasDetails && collapsible) {
|
|
27
|
+
setIsExpanded(!isExpanded);
|
|
28
|
+
}
|
|
29
|
+
onTaskClick?.(task);
|
|
30
|
+
};
|
|
31
|
+
return (_jsxs("div", { ref: ref, className: cn("rounded-lg border border-border bg-card transition-all", "hover:shadow-sm hover:border-border/80", className), ...props, children: [_jsxs("button", { type: "button", onClick: handleClick, className: cn("w-full flex items-center gap-3 px-3 py-2.5 text-left", hasDetails && collapsible && "cursor-pointer"), disabled: !hasDetails && !collapsible, children: [_jsx(StatusIcon, { className: cn("w-4 h-4 shrink-0", getStatusColor(), task.status === "in_progress" && "animate-spin") }), _jsx("span", { className: cn("flex-1 text-sm font-[var(--font-family)]", task.status === "completed" && "line-through opacity-60", task.status === "in_progress" && "font-medium"), children: task.text }), hasDetails && collapsible && (_jsx(ChevronDown, { className: cn("w-4 h-4 text-foreground opacity-50 transition-transform duration-200 shrink-0", isExpanded && "rotate-180"), "aria-hidden": "true" }))] }), hasDetails && isExpanded && (_jsxs("div", { className: "px-3 pb-3 pt-1 border-t border-border/50 animate-fadeIn", children: [task.details && (_jsx("p", { className: "text-sm text-foreground opacity-80 leading-relaxed mb-2", children: task.details })), task.files && task.files.length > 0 && (_jsxs("div", { className: "space-y-1", children: [_jsx("span", { className: "text-xs font-medium text-foreground opacity-60 uppercase tracking-wide", children: "Files:" }), _jsx("div", { className: "space-y-1", children: task.files.map((file) => (_jsx("div", { className: "text-xs font-mono text-foreground opacity-70 bg-background px-2 py-1 rounded border border-border/50", children: file }, file))) })] }))] }))] }));
|
|
32
|
+
});
|
|
132
33
|
Task.displayName = "Task";
|
|
133
|
-
export const TaskList = React.forwardRef(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
tasks,
|
|
137
|
-
collapsible = true,
|
|
138
|
-
onTaskClick,
|
|
139
|
-
emptyMessage = "No tasks yet.",
|
|
140
|
-
className,
|
|
141
|
-
...props
|
|
142
|
-
},
|
|
143
|
-
ref,
|
|
144
|
-
) => {
|
|
145
|
-
return _jsx("div", {
|
|
146
|
-
ref: ref,
|
|
147
|
-
className: cn("space-y-2 max-h-96 overflow-y-auto", className),
|
|
148
|
-
...props,
|
|
149
|
-
children:
|
|
150
|
-
tasks.length === 0
|
|
151
|
-
? _jsx("p", {
|
|
152
|
-
className:
|
|
153
|
-
"text-sm text-foreground opacity-60 italic py-4 text-center",
|
|
154
|
-
children: emptyMessage,
|
|
155
|
-
})
|
|
156
|
-
: tasks.map((task) =>
|
|
157
|
-
_jsx(
|
|
158
|
-
Task,
|
|
159
|
-
{
|
|
160
|
-
task: task,
|
|
161
|
-
collapsible: collapsible,
|
|
162
|
-
...(onTaskClick ? { onTaskClick } : {}),
|
|
163
|
-
},
|
|
164
|
-
task.id,
|
|
165
|
-
),
|
|
166
|
-
),
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
);
|
|
34
|
+
export const TaskList = React.forwardRef(({ tasks, collapsible = true, onTaskClick, emptyMessage = "No tasks yet.", className, ...props }, ref) => {
|
|
35
|
+
return (_jsx("div", { ref: ref, className: cn("space-y-2 max-h-96 overflow-y-auto", className), ...props, children: tasks.length === 0 ? (_jsx("p", { className: "text-sm text-foreground opacity-60 italic py-4 text-center", children: emptyMessage })) : (tasks.map((task) => (_jsx(Task, { task: task, collapsible: collapsible, ...(onTaskClick ? { onTaskClick } : {}) }, task.id)))) }));
|
|
36
|
+
});
|
|
170
37
|
TaskList.displayName = "TaskList";
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare const textareaVariants: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
) => string;
|
|
10
|
-
export interface TextareaProps
|
|
11
|
-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
|
12
|
-
VariantProps<typeof textareaVariants> {
|
|
13
|
-
autoResize?: boolean;
|
|
14
|
-
maxHeight?: number;
|
|
3
|
+
declare const textareaVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "default" | "error" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaVariants> {
|
|
7
|
+
autoResize?: boolean;
|
|
8
|
+
maxHeight?: number;
|
|
15
9
|
}
|
|
16
|
-
declare const Textarea: React.ForwardRefExoticComponent<
|
|
17
|
-
TextareaProps & React.RefAttributes<HTMLTextAreaElement>
|
|
18
|
-
>;
|
|
10
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
19
11
|
export { Textarea, textareaVariants };
|
|
@@ -1,68 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
import * as React from "react";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
textarea.style.overflowY = "hidden";
|
|
51
|
-
}
|
|
52
|
-
}, [autoResize, maxHeight]);
|
|
53
|
-
React.useEffect(() => {
|
|
54
|
-
adjustHeight();
|
|
55
|
-
}, [adjustHeight]);
|
|
56
|
-
return _jsx("textarea", {
|
|
57
|
-
className: cn(
|
|
58
|
-
textareaVariants({ variant }),
|
|
59
|
-
autoResize && "overflow-y-hidden",
|
|
60
|
-
className,
|
|
61
|
-
),
|
|
62
|
-
ref: handleRef,
|
|
63
|
-
...props,
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
);
|
|
5
|
+
const textareaVariants = cva("flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-none", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "border-input focus-visible:ring-ring",
|
|
9
|
+
error: "border-destructive focus-visible:ring-destructive",
|
|
10
|
+
success: "border-green-500 focus-visible:ring-green-500",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const Textarea = React.forwardRef(({ className, autoResize = false, maxHeight = 200, variant, ...props }, ref) => {
|
|
18
|
+
const textareaRef = React.useRef(null);
|
|
19
|
+
const handleRef = React.useCallback((node) => {
|
|
20
|
+
textareaRef.current = node;
|
|
21
|
+
if (typeof ref === "function") {
|
|
22
|
+
ref(node);
|
|
23
|
+
}
|
|
24
|
+
else if (ref) {
|
|
25
|
+
ref.current = node;
|
|
26
|
+
}
|
|
27
|
+
}, [ref]);
|
|
28
|
+
const adjustHeight = React.useCallback(() => {
|
|
29
|
+
const textarea = textareaRef.current;
|
|
30
|
+
if (!textarea || !autoResize)
|
|
31
|
+
return;
|
|
32
|
+
// Reset height to auto to get the correct scrollHeight
|
|
33
|
+
textarea.style.height = "auto";
|
|
34
|
+
// Set new height based on content, respecting maxHeight
|
|
35
|
+
const newHeight = Math.min(textarea.scrollHeight, maxHeight);
|
|
36
|
+
textarea.style.height = `${newHeight}px`;
|
|
37
|
+
// Enable scrollbar if content exceeds maxHeight
|
|
38
|
+
if (textarea.scrollHeight > maxHeight) {
|
|
39
|
+
textarea.style.overflowY = "auto";
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
textarea.style.overflowY = "hidden";
|
|
43
|
+
}
|
|
44
|
+
}, [autoResize, maxHeight]);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
adjustHeight();
|
|
47
|
+
}, [adjustHeight]);
|
|
48
|
+
return (_jsx("textarea", { className: cn(textareaVariants({ variant }), autoResize && "overflow-y-hidden", className), ref: handleRef, ...props }));
|
|
49
|
+
});
|
|
67
50
|
Textarea.displayName = "Textarea";
|
|
68
51
|
export { Textarea, textareaVariants };
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
declare const thinkingBlockVariants: (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
extends VariantProps<typeof thinkingBlockVariants> {
|
|
11
|
-
thinking?: string;
|
|
12
|
-
isStreaming?: boolean;
|
|
13
|
-
displayMode?: "collapsible" | "inline";
|
|
14
|
-
className?: string;
|
|
2
|
+
declare const thinkingBlockVariants: (props?: ({
|
|
3
|
+
variant?: "default" | "subtle" | "prominent" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export interface ThinkingBlockProps extends VariantProps<typeof thinkingBlockVariants> {
|
|
6
|
+
thinking?: string;
|
|
7
|
+
isStreaming?: boolean;
|
|
8
|
+
displayMode?: "collapsible" | "inline";
|
|
9
|
+
className?: string;
|
|
15
10
|
}
|
|
16
|
-
export declare function ThinkingBlock({
|
|
17
|
-
|
|
18
|
-
isStreaming,
|
|
19
|
-
displayMode,
|
|
20
|
-
variant,
|
|
21
|
-
className,
|
|
22
|
-
}: ThinkingBlockProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export declare function ThinkingBlock({ thinking, isStreaming, displayMode, variant, className, }: ThinkingBlockProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|