mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 12:03:27 +00:00
feat: add Create Session button to empty state, move refresh to header
This commit is contained in:
parent
241bea6eb9
commit
2e47f9cf8d
2 changed files with 47 additions and 26 deletions
|
|
@ -809,20 +809,28 @@ export default function App() {
|
|||
<div className="session-sidebar">
|
||||
<div className="sidebar-header">
|
||||
<span className="sidebar-title">Sessions</span>
|
||||
<button
|
||||
className="sidebar-add-btn"
|
||||
onClick={createNewSession}
|
||||
title="New session"
|
||||
>
|
||||
<Plus size={14} />
|
||||
</button>
|
||||
<div className="sidebar-header-actions">
|
||||
<button
|
||||
className="sidebar-icon-btn"
|
||||
onClick={fetchSessions}
|
||||
title="Refresh sessions"
|
||||
>
|
||||
<RefreshCw size={14} />
|
||||
</button>
|
||||
<button
|
||||
className="sidebar-add-btn"
|
||||
onClick={createNewSession}
|
||||
title="New session"
|
||||
>
|
||||
<Plus size={14} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="session-list">
|
||||
{sessions.length === 0 ? (
|
||||
<div className="sidebar-empty">
|
||||
No sessions yet.<br />
|
||||
Create one to get started.
|
||||
No sessions yet.
|
||||
</div>
|
||||
) : (
|
||||
sessions.map((session) => (
|
||||
|
|
@ -841,12 +849,6 @@ export default function App() {
|
|||
))
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="sidebar-refresh">
|
||||
<button className="button ghost small" onClick={fetchSessions}>
|
||||
<RefreshCw size={12} /> Refresh
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Chat Panel */}
|
||||
|
|
@ -868,8 +870,12 @@ export default function App() {
|
|||
<MessageSquare className="empty-state-icon" />
|
||||
<div className="empty-state-title">No Session Selected</div>
|
||||
<p className="empty-state-text">
|
||||
Click + in the sidebar to create a new session, or select an existing one.
|
||||
Create a new session to start chatting with an agent.
|
||||
</p>
|
||||
<button className="button primary" onClick={createNewSession} style={{ marginTop: 16 }}>
|
||||
<Plus className="button-icon" />
|
||||
Create Session
|
||||
</button>
|
||||
</div>
|
||||
) : transcriptMessages.length === 0 && !sessionError ? (
|
||||
<div className="empty-state">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue