11import { useState , useRef , useEffect } from 'react'
22import styles from './Home.module.scss'
3- import { Scrollable } from '@ui/components/editor/panel/Scrollable'
4- import { Timeline } from '@ui/components/editor/panel/Timeline'
5- import { ModeButton } from '@ui/components/editor/panel/ModeButton'
3+ import { Scrollable as UiScrollable } from '@ui/components/editor/panel/Scrollable'
4+ import { Timeline as UiTimeline } from '@ui/components/editor/panel/Timeline'
5+ import { ModeButton as UiModeButton } from '@ui/components/editor/panel/ModeButton'
66import cn from 'classnames'
77import { post_message } from '../utils/post_message'
88import { Checkpoint , FrontendMessage } from '@/views/panel/types/messages'
99import { Responses as UiResponses } from '@ui/components/editor/panel/Responses'
1010import { ResponseHistoryItem } from '@shared/types/response-history-item'
11- import { Separator } from '@ui/components/editor/panel/Separator'
12- import { ListHeader } from '@ui/components/editor/panel/ListHeader'
11+ import { Separator as UiSeparator } from '@ui/components/editor/panel/Separator'
12+ import { ListHeader as UiListHeader } from '@ui/components/editor/panel/ListHeader'
1313import { Translation , use_translation } from '@/views/i18n/use-translation'
14- import { IconButton } from '@ui/components/editor/common/IconButton'
15- import { Tasks } from '@ui/components/editor/panel/Tasks'
14+ import { IconButton as UiIconButton } from '@ui/components/editor/common/IconButton'
15+ import { Tasks as UiTasks } from '@ui/components/editor/panel/Tasks'
1616import { Task } from '@shared/types/task'
1717import { use_tasks } from './hooks/use-tasks'
1818import { use_timeline_scroll } from './hooks/use-timeline-scroll'
19- import { SettingsButton } from '@ui/components/editor/panel/SettingsButton'
19+ import { SettingsButton as UiSettingsButton } from '@ui/components/editor/panel/SettingsButton'
2020
2121type Props = {
2222 vscode : any
@@ -105,14 +105,14 @@ export const Home: React.FC<Props> = (props) => {
105105 { t ( 'panel.header.home' ) }
106106 </ span >
107107 </ div >
108- < SettingsButton
108+ < UiSettingsButton
109109 on_click = { handle_settings_click }
110110 label = { t ( 'panel.header.settings' ) }
111111 show_warning_icon = { ! props . is_setup_complete }
112112 />
113113 </ div >
114114
115- < Scrollable
115+ < UiScrollable
116116 on_scroll = { ( top ) => {
117117 const responses_height = responses_ref . current ?. clientHeight || 0
118118 const current_mode_height = mode_ref . current ?. offsetHeight || 0
@@ -160,31 +160,31 @@ export const Home: React.FC<Props> = (props) => {
160160 } ) }
161161 ref = { mode_ref }
162162 >
163- < ModeButton
163+ < UiModeButton
164164 pre = "Autofill"
165165 label = "Chatbots"
166166 on_click = { props . on_chatbots_click }
167167 is_compact = { is_mode_sticky }
168168 />
169- < ModeButton
169+ < UiModeButton
170170 pre = "Make"
171171 label = "API calls"
172172 on_click = { props . on_api_calls_click }
173173 is_compact = { is_mode_sticky }
174174 />
175175 </ div >
176176
177- < Separator height = { 8 } />
177+ < UiSeparator height = { 8 } />
178178
179- < ListHeader
179+ < UiListHeader
180180 title = { t ( 'panel.home.tasks' ) }
181181 is_collapsed = { props . are_tasks_collapsed }
182182 on_toggle_collapsed = { ( ) =>
183183 props . on_tasks_collapsed_change ( ! props . are_tasks_collapsed )
184184 }
185185 actions = {
186186 Object . keys ( props . tasks ) . length == 1 ? (
187- < IconButton
187+ < UiIconButton
188188 codicon_icon = "add"
189189 title = { t ( 'panel.home.tasks.add' ) }
190190 on_click = { ( e ) => {
@@ -234,7 +234,7 @@ export const Home: React.FC<Props> = (props) => {
234234 </ div >
235235 ) }
236236 { tasks . length > 0 && (
237- < Tasks
237+ < UiTasks
238238 tasks = { tasks }
239239 on_reorder = { ( new_tasks ) =>
240240 handle_reorder ( workspace_root_folder , new_tasks )
@@ -268,7 +268,7 @@ export const Home: React.FC<Props> = (props) => {
268268 </ div >
269269 ) ) }
270270
271- < ListHeader
271+ < UiListHeader
272272 ref = { timeline_ref }
273273 title = { t ( 'panel.home.timeline' ) }
274274 is_collapsed = { props . is_timeline_collapsed }
@@ -277,7 +277,7 @@ export const Home: React.FC<Props> = (props) => {
277277 }
278278 actions = {
279279 < >
280- < IconButton
280+ < UiIconButton
281281 codicon_icon = "add"
282282 title = { t ( 'panel.home.timeline.new-checkpoint' ) }
283283 on_click = { ( e ) => {
@@ -286,7 +286,7 @@ export const Home: React.FC<Props> = (props) => {
286286 } }
287287 />
288288 { props . checkpoints . length > 0 && (
289- < IconButton
289+ < UiIconButton
290290 codicon_icon = "trash"
291291 title = { t ( 'panel.home.timeline.delete-all' ) }
292292 on_click = { ( e ) => {
@@ -300,7 +300,7 @@ export const Home: React.FC<Props> = (props) => {
300300 />
301301 { ! props . is_timeline_collapsed &&
302302 ( props . checkpoints . length > 0 ? (
303- < Timeline
303+ < UiTimeline
304304 items = { props . checkpoints . map ( ( c ) => ( {
305305 id : c . timestamp ,
306306 label : c . title ,
@@ -350,7 +350,7 @@ export const Home: React.FC<Props> = (props) => {
350350 </ div >
351351 </ div >
352352 </ div >
353- </ Scrollable >
353+ </ UiScrollable >
354354
355355 { ! is_timeline_reached && (
356356 < button
0 commit comments