Skip to content

Commit bf3810f

Browse files
committed
add thread
1 parent c541393 commit bf3810f

File tree

1 file changed

+2
-61
lines changed
  • client/packages/lowcoder/src/comps/comps/chatComp

1 file changed

+2
-61
lines changed

client/packages/lowcoder/src/comps/comps/chatComp/chatView.tsx

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// client/packages/lowcoder/src/comps/comps/chatComp/chatView.tsx
22
import React from "react";
33
import { ChatCompProps } from "./chatCompTypes";
4+
import { Thread } from "./components/assistant-ui/thread";
45

56
// Import assistant-ui components and proper runtime
67
import {
78
AssistantRuntimeProvider,
8-
ThreadPrimitive,
9-
ComposerPrimitive
109
} from "@assistant-ui/react";
1110
import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
1211
import "@assistant-ui/styles/index.css";
@@ -20,65 +19,7 @@ export const ChatView = React.memo((props: ChatCompProps) => {
2019

2120
return (
2221
<AssistantRuntimeProvider runtime={runtime}>
23-
<div style={{
24-
height: '100%',
25-
padding: '16px',
26-
backgroundColor: '#f5f5f5'
27-
}}>
28-
<div className="aui-root">
29-
<h3 style={{ marginBottom: '16px' }}>🚀 Assistant-UI with Vercel AI SDK!</h3>
30-
31-
{/* Test Thread with real runtime */}
32-
<div className="aui-thread-root" style={{
33-
background: 'white',
34-
borderRadius: '8px',
35-
padding: '16px',
36-
marginBottom: '16px',
37-
border: '1px solid #e0e0e0',
38-
minHeight: '200px'
39-
}}>
40-
<ThreadPrimitive.Empty>
41-
<div className="aui-thread-welcome-root">
42-
<div className="aui-thread-welcome-center">
43-
<p className="aui-thread-welcome-message">
44-
{props.text} - Runtime Working! 🎉
45-
</p>
46-
</div>
47-
</div>
48-
</ThreadPrimitive.Empty>
49-
</div>
50-
51-
{/* Test Composer with real runtime */}
52-
<div className="aui-composer-root" style={{
53-
background: 'white',
54-
borderRadius: '8px',
55-
padding: '12px',
56-
border: '1px solid #e0e0e0'
57-
}}>
58-
<ComposerPrimitive.Input
59-
placeholder={props.text}
60-
disabled={false}
61-
className="aui-composer-input"
62-
rows={1}
63-
/>
64-
</div>
65-
66-
{/* Property status */}
67-
<div style={{
68-
marginTop: '16px',
69-
fontSize: '12px',
70-
color: '#666',
71-
background: 'white',
72-
padding: '8px',
73-
borderRadius: '4px',
74-
border: '1px solid #e0e0e0'
75-
}}>
76-
<strong>✅ Test Status:</strong><br/>
77-
Text: {props.text}<br/>
78-
Runtime: Vercel AI SDK ✅
79-
</div>
80-
</div>
81-
</div>
22+
<Thread />
8223
</AssistantRuntimeProvider>
8324
);
8425
});

0 commit comments

Comments
 (0)