Skip to content

Commit 0cb0ab1

Browse files
feat: clear HeroUI components (#557)
Co-authored-by: Dawid Żywczak <[email protected]>
1 parent a89531e commit 0cb0ab1

File tree

14 files changed

+94
-265
lines changed

14 files changed

+94
-265
lines changed

packages/ragbits-chat/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- remove HeroUI Pro components (#557)
6+
57
## 0.18.0 (2025-05-22)
68

79
### Changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import{H as e}from"./index-BDc1cJws.js";const i=()=>e.jsxs("div",{children:[e.jsx("h1",{children:"Example Plugin"}),e.jsx("p",{children:"This is an example plugin."})]});export{i as default};
1+
import{H as e}from"./index-CNA7APJN.js";const i=()=>e.jsxs("div",{children:[e.jsx("h1",{children:"Example Plugin"}),e.jsx("p",{children:"This is an example plugin."})]});export{i as default};
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-BDc1cJws.js renamed to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CNA7APJN.js

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-D23L4yB9.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-Dk4Ry3-1.js renamed to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-DnBwcsXi.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-DxlHc-HZ.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/ragbits-chat/src/ragbits/chat/ui-build/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<link rel="icon" type="image/svg+xml" href="/assets/ragbits-9U4hpuUb.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Ragbits</title>
8-
<script type="module" crossorigin src="/assets/index-BDc1cJws.js"></script>
9-
<link rel="stylesheet" crossorigin href="/assets/index-DxlHc-HZ.css">
8+
<script type="module" crossorigin src="/assets/index-CNA7APJN.js"></script>
9+
<link rel="stylesheet" crossorigin href="/assets/index-D23L4yB9.css">
1010
</head>
1111

1212
<body class="h-full">

ui/src/App.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ export default function Component() {
4545
const handleScroll = useCallback(() => {
4646
const AUTO_SCROLL_THRESHOLD = 25;
4747
const SCROLL_DOWN_THRESHOLD = 100;
48+
4849
if (!scrollContainerRef.current) return;
50+
4951
const container = scrollContainerRef.current;
5052
const offsetFromBottom =
5153
container.scrollHeight - container.scrollTop - container.clientHeight;
5254

5355
setShowScrollDownButton(offsetFromBottom > SCROLL_DOWN_THRESHOLD);
5456
setShouldAutoScroll(false);
57+
5558
if (offsetFromBottom > AUTO_SCROLL_THRESHOLD) {
5659
setShouldAutoScroll(false);
5760
} else {
@@ -62,6 +65,7 @@ export default function Component() {
6265
useEffect(() => {
6366
if (configRequest.data) {
6467
const config = configRequest.data.data;
68+
6569
setConfig(config);
6670
}
6771
}, [configRequest.data]);
@@ -78,6 +82,7 @@ export default function Component() {
7882

7983
useEffect(() => {
8084
setShouldAutoScroll(true);
85+
8186
if (history.length === 0) {
8287
setShowScrollDownButton(false);
8388
}
@@ -103,10 +108,12 @@ export default function Component() {
103108

104109
const scrollToBottom = useCallback(() => {
105110
if (!scrollContainerRef.current) return;
111+
106112
scrollContainerRef.current.scrollTo({
107113
top: scrollContainerRef.current.scrollHeight,
108114
behavior: "smooth",
109115
});
116+
110117
setShouldAutoScroll(true);
111118
}, []);
112119

@@ -142,6 +149,7 @@ export default function Component() {
142149

143150
const handleSubmit = () => {
144151
sendMessage(message);
152+
setMessage("");
145153
};
146154

147155
const heroMessage = `Hello! I'm your AI assistant.\n\n How can I help you today?

ui/src/core/components/ChatMessage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ const ChatMessage = forwardRef<HTMLDivElement, ChatMessageProps>(
2929
ref,
3030
) => {
3131
const rightAlign = role === MessageRole.USER;
32+
3233
const [didAnimate, setDidAnimate] = useState(false);
33-
const copyIconTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
3434
const [copyIcon, setCopyIcon] = useState("heroicons:clipboard");
35+
36+
const copyIconTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
3537
const { theme } = useThemeContext();
3638

3739
const onCopyClick = () => {

0 commit comments

Comments
 (0)