@townco/ui 0.1.17 → 0.1.18

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 (207) hide show
  1. package/dist/core/hooks/use-chat-input.d.ts +17 -17
  2. package/dist/core/hooks/use-chat-input.js +55 -64
  3. package/dist/core/hooks/use-chat-messages.js +114 -121
  4. package/dist/core/hooks/use-chat-session.d.ts +1 -1
  5. package/dist/core/hooks/use-chat-session.js +80 -78
  6. package/dist/gui/components/Button.d.ts +7 -23
  7. package/dist/gui/components/Button.js +27 -40
  8. package/dist/gui/components/Card.d.ts +7 -26
  9. package/dist/gui/components/Card.js +8 -54
  10. package/dist/gui/components/ChatSecondaryPanel.d.ts +25 -14
  11. package/dist/gui/components/ChatSecondaryPanel.js +60 -115
  12. package/dist/gui/components/ChatStatus.d.ts +2 -4
  13. package/dist/gui/components/ChatStatus.js +34 -45
  14. package/dist/gui/components/Conversation.d.ts +14 -17
  15. package/dist/gui/components/Conversation.js +83 -143
  16. package/dist/gui/components/Dialog.d.ts +11 -57
  17. package/dist/gui/components/HeightTransition.d.ts +7 -12
  18. package/dist/gui/components/HeightTransition.js +77 -88
  19. package/dist/gui/components/Input.d.ts +6 -13
  20. package/dist/gui/components/Input.js +16 -27
  21. package/dist/gui/components/Label.d.ts +1 -7
  22. package/dist/gui/components/MarkdownRenderer.d.ts +4 -6
  23. package/dist/gui/components/MarkdownRenderer.js +81 -178
  24. package/dist/gui/components/MessageContent.d.ts +22 -29
  25. package/dist/gui/components/PanelTabsHeader.d.ts +17 -0
  26. package/dist/gui/components/PanelTabsHeader.js +31 -0
  27. package/dist/gui/components/Reasoning.d.ts +24 -30
  28. package/dist/gui/components/Reasoning.js +60 -187
  29. package/dist/gui/components/Response.d.ts +9 -11
  30. package/dist/gui/components/Response.js +90 -229
  31. package/dist/gui/components/Select.d.ts +10 -69
  32. package/dist/gui/components/Tabs.d.ts +4 -24
  33. package/dist/gui/components/Task.d.ts +24 -28
  34. package/dist/gui/components/Task.js +31 -164
  35. package/dist/gui/components/Textarea.d.ts +7 -15
  36. package/dist/gui/components/Textarea.js +46 -63
  37. package/dist/gui/components/ThinkingBlock.d.ts +10 -20
  38. package/dist/gui/components/ThinkingBlock.js +35 -134
  39. package/dist/gui/components/TodoList.d.ts +10 -12
  40. package/dist/gui/components/TodoList.js +7 -22
  41. package/dist/gui/components/TodoListItem.d.ts +6 -9
  42. package/dist/gui/components/TodoListItem.js +4 -18
  43. package/dist/gui/components/index.d.ts +1 -0
  44. package/dist/gui/components/index.js +1 -0
  45. package/dist/gui/lib/utils.js +1 -1
  46. package/dist/index.test.js +1 -0
  47. package/dist/sdk/client/acp-client.d.ts +76 -88
  48. package/dist/sdk/client/acp-client.js +217 -215
  49. package/dist/sdk/schemas/agent.d.ts +64 -111
  50. package/dist/sdk/schemas/agent.js +24 -24
  51. package/dist/sdk/schemas/message.d.ts +147 -245
  52. package/dist/sdk/schemas/message.js +40 -40
  53. package/dist/sdk/schemas/session.d.ts +6 -6
  54. package/dist/sdk/transports/http.d.ts +55 -55
  55. package/dist/sdk/transports/stdio.d.ts +20 -20
  56. package/dist/sdk/transports/types.d.ts +42 -42
  57. package/dist/sdk/transports/websocket.d.ts +12 -12
  58. package/dist/sdk/transports/websocket.js +46 -52
  59. package/dist/tui/components/ChatView.d.ts +2 -4
  60. package/dist/tui/components/GameOfLife.js +35 -64
  61. package/dist/tui/components/InputBox.d.ts +11 -18
  62. package/dist/tui/components/InputBox.js +10 -70
  63. package/dist/tui/components/ReadlineInput.d.ts +6 -12
  64. package/dist/tui/components/ReadlineInput.js +237 -252
  65. package/dist/tui/components/SingleSelect.d.ts +9 -15
  66. package/dist/tui/components/SingleSelect.js +43 -84
  67. package/dist/tui/components/StatusBar.d.ts +6 -11
  68. package/dist/tui/components/StatusBar.js +67 -102
  69. package/package.json +2 -2
  70. package/dist/core/hooks/index.d.ts.map +0 -1
  71. package/dist/core/hooks/index.js.map +0 -1
  72. package/dist/core/hooks/use-chat-input.d.ts.map +0 -1
  73. package/dist/core/hooks/use-chat-input.js.map +0 -1
  74. package/dist/core/hooks/use-chat-messages.d.ts.map +0 -1
  75. package/dist/core/hooks/use-chat-messages.js.map +0 -1
  76. package/dist/core/hooks/use-chat-session.d.ts.map +0 -1
  77. package/dist/core/hooks/use-chat-session.js.map +0 -1
  78. package/dist/core/index.d.ts.map +0 -1
  79. package/dist/core/index.js.map +0 -1
  80. package/dist/core/schemas/chat.d.ts.map +0 -1
  81. package/dist/core/schemas/chat.js.map +0 -1
  82. package/dist/core/schemas/index.d.ts.map +0 -1
  83. package/dist/core/schemas/index.js.map +0 -1
  84. package/dist/core/store/chat-store.d.ts.map +0 -1
  85. package/dist/core/store/chat-store.js.map +0 -1
  86. package/dist/gui/components/Button.d.ts.map +0 -1
  87. package/dist/gui/components/Button.js.map +0 -1
  88. package/dist/gui/components/Card.d.ts.map +0 -1
  89. package/dist/gui/components/Card.js.map +0 -1
  90. package/dist/gui/components/ChatInput.d.ts.map +0 -1
  91. package/dist/gui/components/ChatInput.js.map +0 -1
  92. package/dist/gui/components/ChatInterface.d.ts +0 -12
  93. package/dist/gui/components/ChatInterface.d.ts.map +0 -1
  94. package/dist/gui/components/ChatInterface.js +0 -204
  95. package/dist/gui/components/ChatInterface.js.map +0 -1
  96. package/dist/gui/components/ChatPreview.d.ts +0 -12
  97. package/dist/gui/components/ChatPreview.d.ts.map +0 -1
  98. package/dist/gui/components/ChatPreview.js +0 -214
  99. package/dist/gui/components/ChatPreview.js.map +0 -1
  100. package/dist/gui/components/ChatSecondaryPanel.d.ts.map +0 -1
  101. package/dist/gui/components/ChatSecondaryPanel.js.map +0 -1
  102. package/dist/gui/components/ChatStatus.d.ts.map +0 -1
  103. package/dist/gui/components/ChatStatus.js.map +0 -1
  104. package/dist/gui/components/ChatView.d.ts +0 -8
  105. package/dist/gui/components/ChatView.d.ts.map +0 -1
  106. package/dist/gui/components/ChatView.js +0 -42
  107. package/dist/gui/components/ChatView.js.map +0 -1
  108. package/dist/gui/components/ConfigPanel.d.ts +0 -20
  109. package/dist/gui/components/ConfigPanel.d.ts.map +0 -1
  110. package/dist/gui/components/ConfigPanel.js +0 -225
  111. package/dist/gui/components/ConfigPanel.js.map +0 -1
  112. package/dist/gui/components/Conversation.d.ts.map +0 -1
  113. package/dist/gui/components/Conversation.js.map +0 -1
  114. package/dist/gui/components/Dialog.d.ts.map +0 -1
  115. package/dist/gui/components/Dialog.js.map +0 -1
  116. package/dist/gui/components/HeightTransition.d.ts.map +0 -1
  117. package/dist/gui/components/HeightTransition.js.map +0 -1
  118. package/dist/gui/components/Input.d.ts.map +0 -1
  119. package/dist/gui/components/Input.js.map +0 -1
  120. package/dist/gui/components/InputBox.d.ts +0 -21
  121. package/dist/gui/components/InputBox.d.ts.map +0 -1
  122. package/dist/gui/components/InputBox.js +0 -90
  123. package/dist/gui/components/InputBox.js.map +0 -1
  124. package/dist/gui/components/Label.d.ts.map +0 -1
  125. package/dist/gui/components/Label.js.map +0 -1
  126. package/dist/gui/components/MarkdownRenderer.d.ts.map +0 -1
  127. package/dist/gui/components/MarkdownRenderer.js.map +0 -1
  128. package/dist/gui/components/Message.d.ts.map +0 -1
  129. package/dist/gui/components/Message.js.map +0 -1
  130. package/dist/gui/components/MessageContent.d.ts.map +0 -1
  131. package/dist/gui/components/MessageContent.js.map +0 -1
  132. package/dist/gui/components/MessageList.d.ts.map +0 -1
  133. package/dist/gui/components/MessageList.js.map +0 -1
  134. package/dist/gui/components/PlaygroundLayout.d.ts +0 -14
  135. package/dist/gui/components/PlaygroundLayout.d.ts.map +0 -1
  136. package/dist/gui/components/PlaygroundLayout.js +0 -49
  137. package/dist/gui/components/PlaygroundLayout.js.map +0 -1
  138. package/dist/gui/components/Reasoning.d.ts.map +0 -1
  139. package/dist/gui/components/Reasoning.js.map +0 -1
  140. package/dist/gui/components/Response.d.ts.map +0 -1
  141. package/dist/gui/components/Response.js.map +0 -1
  142. package/dist/gui/components/Select.d.ts.map +0 -1
  143. package/dist/gui/components/Select.js.map +0 -1
  144. package/dist/gui/components/StatusBar.d.ts +0 -12
  145. package/dist/gui/components/StatusBar.d.ts.map +0 -1
  146. package/dist/gui/components/StatusBar.js +0 -58
  147. package/dist/gui/components/StatusBar.js.map +0 -1
  148. package/dist/gui/components/Tabs.d.ts.map +0 -1
  149. package/dist/gui/components/Tabs.js.map +0 -1
  150. package/dist/gui/components/Task.d.ts.map +0 -1
  151. package/dist/gui/components/Task.js.map +0 -1
  152. package/dist/gui/components/Textarea.d.ts.map +0 -1
  153. package/dist/gui/components/Textarea.js.map +0 -1
  154. package/dist/gui/components/ThinkingBlock.d.ts.map +0 -1
  155. package/dist/gui/components/ThinkingBlock.js.map +0 -1
  156. package/dist/gui/components/TodoList.d.ts.map +0 -1
  157. package/dist/gui/components/TodoList.js.map +0 -1
  158. package/dist/gui/components/TodoListItem.d.ts.map +0 -1
  159. package/dist/gui/components/TodoListItem.js.map +0 -1
  160. package/dist/gui/components/index.d.ts.map +0 -1
  161. package/dist/gui/components/index.js.map +0 -1
  162. package/dist/gui/index.d.ts.map +0 -1
  163. package/dist/gui/index.js.map +0 -1
  164. package/dist/gui/lib/utils.d.ts.map +0 -1
  165. package/dist/gui/lib/utils.js.map +0 -1
  166. package/dist/index.d.ts.map +0 -1
  167. package/dist/index.js.map +0 -1
  168. package/dist/sdk/client/acp-client.d.ts.map +0 -1
  169. package/dist/sdk/client/acp-client.js.map +0 -1
  170. package/dist/sdk/client/index.d.ts.map +0 -1
  171. package/dist/sdk/client/index.js.map +0 -1
  172. package/dist/sdk/index.d.ts.map +0 -1
  173. package/dist/sdk/index.js.map +0 -1
  174. package/dist/sdk/schemas/agent.d.ts.map +0 -1
  175. package/dist/sdk/schemas/agent.js.map +0 -1
  176. package/dist/sdk/schemas/index.d.ts.map +0 -1
  177. package/dist/sdk/schemas/index.js.map +0 -1
  178. package/dist/sdk/schemas/message.d.ts.map +0 -1
  179. package/dist/sdk/schemas/message.js.map +0 -1
  180. package/dist/sdk/schemas/session.d.ts.map +0 -1
  181. package/dist/sdk/schemas/session.js.map +0 -1
  182. package/dist/sdk/transports/http.d.ts.map +0 -1
  183. package/dist/sdk/transports/http.js.map +0 -1
  184. package/dist/sdk/transports/index.d.ts.map +0 -1
  185. package/dist/sdk/transports/index.js.map +0 -1
  186. package/dist/sdk/transports/stdio.d.ts.map +0 -1
  187. package/dist/sdk/transports/stdio.js.map +0 -1
  188. package/dist/sdk/transports/types.d.ts.map +0 -1
  189. package/dist/sdk/transports/types.js.map +0 -1
  190. package/dist/sdk/transports/websocket.d.ts.map +0 -1
  191. package/dist/sdk/transports/websocket.js.map +0 -1
  192. package/dist/tui/components/ChatView.d.ts.map +0 -1
  193. package/dist/tui/components/ChatView.js.map +0 -1
  194. package/dist/tui/components/GameOfLife.d.ts.map +0 -1
  195. package/dist/tui/components/GameOfLife.js.map +0 -1
  196. package/dist/tui/components/InputBox.d.ts.map +0 -1
  197. package/dist/tui/components/InputBox.js.map +0 -1
  198. package/dist/tui/components/MessageList.d.ts.map +0 -1
  199. package/dist/tui/components/MessageList.js.map +0 -1
  200. package/dist/tui/components/ReadlineInput.d.ts.map +0 -1
  201. package/dist/tui/components/ReadlineInput.js.map +0 -1
  202. package/dist/tui/components/StatusBar.d.ts.map +0 -1
  203. package/dist/tui/components/StatusBar.js.map +0 -1
  204. package/dist/tui/components/index.d.ts.map +0 -1
  205. package/dist/tui/components/index.js.map +0 -1
  206. package/dist/tui/index.d.ts.map +0 -1
  207. package/dist/tui/index.js.map +0 -1
@@ -1,139 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { cva } from "class-variance-authority";
2
3
  import { ChevronDown } from "lucide-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
-
7
- const thinkingBlockVariants = cva(
8
- "mb-3 p-3 rounded-lg bg-card border border-border",
9
- {
10
- variants: {
11
- variant: {
12
- default: "opacity-70",
13
- subtle: "opacity-50",
14
- prominent: "opacity-90",
15
- },
16
- },
17
- defaultVariants: {
18
- variant: "default",
19
- },
20
- },
21
- );
22
- const thinkingIconVariants = cva(
23
- "w-4 h-4 text-foreground opacity-60 transition-transform",
24
- {
25
- variants: {
26
- expanded: {
27
- true: "rotate-180",
28
- false: "",
29
- },
30
- },
31
- defaultVariants: {
32
- expanded: false,
33
- },
34
- },
35
- );
36
- export function ThinkingBlock({
37
- thinking,
38
- isStreaming,
39
- displayMode = "collapsible",
40
- variant,
41
- className,
42
- }) {
43
- const [isExpanded, setIsExpanded] = useState(false);
44
- if (!thinking && !isStreaming) {
45
- return null;
46
- }
47
- // Inline mode - always visible
48
- if (displayMode === "inline") {
49
- return _jsxs("div", {
50
- className: cn(thinkingBlockVariants({ variant }), className),
51
- children: [
52
- _jsxs("div", {
53
- className: "flex items-start gap-2",
54
- children: [
55
- _jsx("span", {
56
- className:
57
- "text-xs font-medium text-foreground opacity-60 uppercase tracking-wide",
58
- children: "Thinking",
59
- }),
60
- isStreaming &&
61
- _jsx("span", {
62
- className:
63
- "inline-block w-2 h-2 bg-primary rounded-full animate-pulse",
64
- }),
65
- ],
66
- }),
67
- _jsxs("div", {
68
- className:
69
- "mt-2 text-sm italic text-foreground opacity-80 leading-relaxed whitespace-pre-wrap",
70
- children: [
71
- thinking,
72
- isStreaming &&
73
- thinking &&
74
- _jsx("span", {
75
- className: "inline-block animate-typing",
76
- children: "...",
77
- }),
78
- ],
79
- }),
80
- ],
81
- });
82
- }
83
- // Collapsible mode
84
- return _jsxs("div", {
85
- className: cn("mb-3", className),
86
- children: [
87
- _jsxs("button", {
88
- type: "button",
89
- onClick: () => setIsExpanded(!isExpanded),
90
- className:
91
- "w-full flex items-center justify-between p-2 rounded-lg bg-card border border-border hover:bg-card transition-colors text-left",
92
- children: [
93
- _jsxs("div", {
94
- className: "flex items-center gap-2",
95
- children: [
96
- _jsx("span", {
97
- className:
98
- "text-xs font-medium text-foreground opacity-60 uppercase tracking-wide",
99
- children: "Thinking",
100
- }),
101
- isStreaming &&
102
- _jsx("span", {
103
- className:
104
- "inline-block w-2 h-2 bg-primary rounded-full animate-pulse",
105
- }),
106
- !isExpanded &&
107
- thinking &&
108
- _jsxs("span", {
109
- className:
110
- "text-xs text-foreground opacity-50 truncate max-w-[200px]",
111
- children: [thinking.substring(0, 50), "..."],
112
- }),
113
- ],
114
- }),
115
- _jsx(ChevronDown, {
116
- className: thinkingIconVariants({ expanded: isExpanded }),
117
- }),
118
- ],
119
- }),
120
- isExpanded &&
121
- _jsx("div", {
122
- className: cn(thinkingBlockVariants({ variant }), "mt-2"),
123
- children: _jsxs("div", {
124
- className:
125
- "text-sm italic text-foreground opacity-80 leading-relaxed whitespace-pre-wrap",
126
- children: [
127
- thinking,
128
- isStreaming &&
129
- thinking &&
130
- _jsx("span", {
131
- className: "inline-block animate-typing",
132
- children: "...",
133
- }),
134
- ],
135
- }),
136
- }),
137
- ],
138
- });
6
+ const thinkingBlockVariants = cva("mb-3 p-3 rounded-lg bg-card border border-border", {
7
+ variants: {
8
+ variant: {
9
+ default: "opacity-70",
10
+ subtle: "opacity-50",
11
+ prominent: "opacity-90",
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ variant: "default",
16
+ },
17
+ });
18
+ const thinkingIconVariants = cva("w-4 h-4 text-foreground opacity-60 transition-transform", {
19
+ variants: {
20
+ expanded: {
21
+ true: "rotate-180",
22
+ false: "",
23
+ },
24
+ },
25
+ defaultVariants: {
26
+ expanded: false,
27
+ },
28
+ });
29
+ export function ThinkingBlock({ thinking, isStreaming, displayMode = "collapsible", variant, className, }) {
30
+ const [isExpanded, setIsExpanded] = useState(false);
31
+ if (!thinking && !isStreaming) {
32
+ return null;
33
+ }
34
+ // Inline mode - always visible
35
+ if (displayMode === "inline") {
36
+ return (_jsxs("div", { className: cn(thinkingBlockVariants({ variant }), className), children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-xs font-medium text-foreground opacity-60 uppercase tracking-wide", children: "Thinking" }), isStreaming && (_jsx("span", { className: "inline-block w-2 h-2 bg-primary rounded-full animate-pulse" }))] }), _jsxs("div", { className: "mt-2 text-sm italic text-foreground opacity-80 leading-relaxed whitespace-pre-wrap", children: [thinking, isStreaming && thinking && (_jsx("span", { className: "inline-block animate-typing", children: "..." }))] })] }));
37
+ }
38
+ // Collapsible mode
39
+ return (_jsxs("div", { className: cn("mb-3", className), children: [_jsxs("button", { type: "button", onClick: () => setIsExpanded(!isExpanded), className: "w-full flex items-center justify-between p-2 rounded-lg bg-card border border-border hover:bg-card transition-colors text-left", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-xs font-medium text-foreground opacity-60 uppercase tracking-wide", children: "Thinking" }), isStreaming && (_jsx("span", { className: "inline-block w-2 h-2 bg-primary rounded-full animate-pulse" })), !isExpanded && thinking && (_jsxs("span", { className: "text-xs text-foreground opacity-50 truncate max-w-[200px]", children: [thinking.substring(0, 50), "..."] }))] }), _jsx(ChevronDown, { className: thinkingIconVariants({ expanded: isExpanded }) })] }), isExpanded && (_jsx("div", { className: cn(thinkingBlockVariants({ variant }), "mt-2"), children: _jsxs("div", { className: "text-sm italic text-foreground opacity-80 leading-relaxed whitespace-pre-wrap", children: [thinking, isStreaming && thinking && (_jsx("span", { className: "inline-block animate-typing", children: "..." }))] }) }))] }));
139
40
  }
@@ -7,16 +7,14 @@ import { type TodoItem } from "./TodoListItem.js";
7
7
  * 2. Prop-based: Pass `todos` prop directly
8
8
  */
9
9
  export interface TodoListProps extends React.HTMLAttributes<HTMLDivElement> {
10
- /**
11
- * ACP Client for hook-based todo fetching (future support)
12
- */
13
- client?: AcpClient | null;
14
- /**
15
- * Todos to display (prop-based pattern)
16
- * Either client or todos should be provided
17
- */
18
- todos?: TodoItem[];
10
+ /**
11
+ * ACP Client for hook-based todo fetching (future support)
12
+ */
13
+ client?: AcpClient | null;
14
+ /**
15
+ * Todos to display (prop-based pattern)
16
+ * Either client or todos should be provided
17
+ */
18
+ todos?: TodoItem[];
19
19
  }
20
- export declare const TodoList: React.ForwardRefExoticComponent<
21
- TodoListProps & React.RefAttributes<HTMLDivElement>
22
- >;
20
+ export declare const TodoList: React.ForwardRefExoticComponent<TodoListProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,26 +1,11 @@
1
- import * as React from "react";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
3
  import { cn } from "../lib/utils.js";
4
4
  import { TodoListItem } from "./TodoListItem.js";
5
- export const TodoList = React.forwardRef(
6
- ({ client, todos, className, ...props }, ref) => {
7
- // For now, just use prop-based todos
8
- // Future: Add hook to get todos from store when available
9
- const todosToDisplay = todos || [];
10
- return _jsx("div", {
11
- ref: ref,
12
- className: cn("space-y-2 max-h-64 overflow-y-auto", className),
13
- ...props,
14
- children:
15
- todosToDisplay.length === 0
16
- ? _jsx("p", {
17
- className: "text-sm text-foreground opacity-60 italic",
18
- children: "No tasks yet.",
19
- })
20
- : todosToDisplay.map((todo) =>
21
- _jsx(TodoListItem, { todo: todo }, todo.id),
22
- ),
23
- });
24
- },
25
- );
5
+ export const TodoList = React.forwardRef(({ client, todos, className, ...props }, ref) => {
6
+ // For now, just use prop-based todos
7
+ // Future: Add hook to get todos from store when available
8
+ const todosToDisplay = todos || [];
9
+ return (_jsx("div", { ref: ref, className: cn("space-y-2 max-h-64 overflow-y-auto", className), ...props, children: todosToDisplay.length === 0 ? (_jsx("p", { className: "text-sm text-foreground opacity-60 italic", children: "No tasks yet." })) : (todosToDisplay.map((todo) => (_jsx(TodoListItem, { todo: todo }, todo.id)))) }));
10
+ });
26
11
  TodoList.displayName = "TodoList";
@@ -1,13 +1,10 @@
1
1
  import * as React from "react";
2
2
  export interface TodoItem {
3
- id: string;
4
- text: string;
5
- status: "pending" | "in_progress" | "completed";
3
+ id: string;
4
+ text: string;
5
+ status: "pending" | "in_progress" | "completed";
6
6
  }
7
- export interface TodoListItemProps
8
- extends React.HTMLAttributes<HTMLDivElement> {
9
- todo: TodoItem;
7
+ export interface TodoListItemProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ todo: TodoItem;
10
9
  }
11
- export declare const TodoListItem: React.ForwardRefExoticComponent<
12
- TodoListItemProps & React.RefAttributes<HTMLDivElement>
13
- >;
10
+ export declare const TodoListItem: React.ForwardRefExoticComponent<TodoListItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,21 +1,7 @@
1
- import * as React from "react";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
3
  import { cn } from "../lib/utils.js";
4
- export const TodoListItem = React.forwardRef(
5
- ({ todo, className, ...props }, ref) => {
6
- return _jsx("div", {
7
- ref: ref,
8
- className: cn("flex items-center gap-3 px-3 py-2 rounded-lg", className),
9
- ...props,
10
- children: _jsx("span", {
11
- className: cn(
12
- "flex-1 text-[var(--font-size)] font-[var(--font-family)]",
13
- todo.status === "completed" && "line-through opacity-60",
14
- todo.status === "in_progress" && "shimmer-animation",
15
- ),
16
- children: todo.text,
17
- }),
18
- });
19
- },
20
- );
4
+ export const TodoListItem = React.forwardRef(({ todo, className, ...props }, ref) => {
5
+ return (_jsx("div", { ref: ref, className: cn("flex items-center gap-3 px-3 py-2 rounded-lg", className), ...props, children: _jsx("span", { className: cn("flex-1 text-[var(--font-size)] font-[var(--font-family)]", todo.status === "completed" && "line-through opacity-60", todo.status === "in_progress" && "shimmer-animation"), children: todo.text }) }));
6
+ });
21
7
  TodoListItem.displayName = "TodoListItem";
@@ -19,6 +19,7 @@ export { MarkdownRenderer } from "./MarkdownRenderer.js";
19
19
  export { Message, type MessageProps } from "./Message.js";
20
20
  export { MessageContent, type MessageContentProps } from "./MessageContent.js";
21
21
  export type { DisplayMessage } from "./MessageList.js";
22
+ export { PanelTabsHeader, type PanelTabsHeaderProps, } from "./PanelTabsHeader.js";
22
23
  export { Reasoning, type ReasoningProps } from "./Reasoning.js";
23
24
  export { Response, type ResponseProps } from "./Response.js";
24
25
  export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./Select.js";
@@ -24,6 +24,7 @@ export { Label } from "./Label.js";
24
24
  export { MarkdownRenderer } from "./MarkdownRenderer.js";
25
25
  export { Message } from "./Message.js";
26
26
  export { MessageContent } from "./MessageContent.js";
27
+ export { PanelTabsHeader, } from "./PanelTabsHeader.js";
27
28
  export { Reasoning } from "./Reasoning.js";
28
29
  export { Response } from "./Response.js";
29
30
  export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./Select.js";
@@ -1,5 +1,5 @@
1
1
  import { clsx } from "clsx";
2
2
  import { twMerge } from "tailwind-merge";
3
3
  export function cn(...inputs) {
4
- return twMerge(clsx(inputs));
4
+ return twMerge(clsx(inputs));
5
5
  }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,96 +1,84 @@
1
- import type {
2
- MessageChunk,
3
- Session,
4
- SessionConfig,
5
- SessionUpdate,
6
- } from "../schemas/index.js";
7
- import type {
8
- HttpTransportOptions,
9
- StdioTransportOptions,
10
- WebSocketTransportOptions,
11
- } from "../transports/index.js";
1
+ import type { MessageChunk, Session, SessionConfig, SessionUpdate } from "../schemas/index.js";
2
+ import type { HttpTransportOptions, StdioTransportOptions, WebSocketTransportOptions } from "../transports/index.js";
12
3
  /**
13
4
  * Client configuration with explicit transport selection
14
5
  */
15
- export type AcpClientConfig =
16
- | {
17
- type: "stdio";
18
- options: StdioTransportOptions;
19
- autoConnect?: boolean;
20
- }
21
- | {
22
- type: "http";
23
- options: HttpTransportOptions;
24
- autoConnect?: boolean;
25
- }
26
- | {
27
- type: "websocket";
28
- options: WebSocketTransportOptions;
29
- autoConnect?: boolean;
30
- };
6
+ export type AcpClientConfig = {
7
+ type: "stdio";
8
+ options: StdioTransportOptions;
9
+ autoConnect?: boolean;
10
+ } | {
11
+ type: "http";
12
+ options: HttpTransportOptions;
13
+ autoConnect?: boolean;
14
+ } | {
15
+ type: "websocket";
16
+ options: WebSocketTransportOptions;
17
+ autoConnect?: boolean;
18
+ };
31
19
  /**
32
20
  * Simplified ACP client with explicit transport selection
33
21
  */
34
22
  export declare class AcpClient {
35
- private config;
36
- private transport;
37
- private sessions;
38
- private currentSessionId;
39
- private sessionUpdateHandlers;
40
- private errorHandlers;
41
- constructor(config: AcpClientConfig);
42
- /**
43
- * Connect to the agent
44
- */
45
- connect(): Promise<void>;
46
- /**
47
- * Disconnect from the agent
48
- */
49
- disconnect(): Promise<void>;
50
- /**
51
- * Check if connected
52
- */
53
- isConnected(): boolean;
54
- /**
55
- * Start a new chat session
56
- */
57
- startSession(config?: Partial<SessionConfig>): Promise<string>;
58
- /**
59
- * Send a message in the current session
60
- */
61
- sendMessage(content: string, sessionId?: string): Promise<void>;
62
- /**
63
- * Receive messages from the agent (streaming)
64
- */
65
- receiveMessages(): AsyncIterableIterator<MessageChunk>;
66
- /**
67
- * Get a session by ID
68
- */
69
- getSession(sessionId: string): Session | undefined;
70
- /**
71
- * Get current session
72
- */
73
- getCurrentSession(): Session | undefined;
74
- /**
75
- * Get all sessions
76
- */
77
- getAllSessions(): Session[];
78
- /**
79
- * Subscribe to session updates
80
- */
81
- onSessionUpdate(handler: (update: SessionUpdate) => void): () => void;
82
- /**
83
- * Subscribe to errors
84
- */
85
- onError(handler: (error: Error) => void): () => void;
86
- /**
87
- * Create transport based on explicit configuration
88
- */
89
- private createTransport;
90
- private setupTransportListeners;
91
- private handleSessionUpdate;
92
- private handleError;
93
- private updateSessionStatus;
94
- private generateSessionId;
95
- private generateMessageId;
23
+ private config;
24
+ private transport;
25
+ private sessions;
26
+ private currentSessionId;
27
+ private sessionUpdateHandlers;
28
+ private errorHandlers;
29
+ constructor(config: AcpClientConfig);
30
+ /**
31
+ * Connect to the agent
32
+ */
33
+ connect(): Promise<void>;
34
+ /**
35
+ * Disconnect from the agent
36
+ */
37
+ disconnect(): Promise<void>;
38
+ /**
39
+ * Check if connected
40
+ */
41
+ isConnected(): boolean;
42
+ /**
43
+ * Start a new chat session
44
+ */
45
+ startSession(config?: Partial<SessionConfig>): Promise<string>;
46
+ /**
47
+ * Send a message in the current session
48
+ */
49
+ sendMessage(content: string, sessionId?: string): Promise<void>;
50
+ /**
51
+ * Receive messages from the agent (streaming)
52
+ */
53
+ receiveMessages(): AsyncIterableIterator<MessageChunk>;
54
+ /**
55
+ * Get a session by ID
56
+ */
57
+ getSession(sessionId: string): Session | undefined;
58
+ /**
59
+ * Get current session
60
+ */
61
+ getCurrentSession(): Session | undefined;
62
+ /**
63
+ * Get all sessions
64
+ */
65
+ getAllSessions(): Session[];
66
+ /**
67
+ * Subscribe to session updates
68
+ */
69
+ onSessionUpdate(handler: (update: SessionUpdate) => void): () => void;
70
+ /**
71
+ * Subscribe to errors
72
+ */
73
+ onError(handler: (error: Error) => void): () => void;
74
+ /**
75
+ * Create transport based on explicit configuration
76
+ */
77
+ private createTransport;
78
+ private setupTransportListeners;
79
+ private handleSessionUpdate;
80
+ private handleError;
81
+ private updateSessionStatus;
82
+ private generateSessionId;
83
+ private generateMessageId;
96
84
  }