Skip to content

Commit c92edac

Browse files
authored
Merge pull request #81 from UiPath/feat/events-tab-chat-mode
feat: add Events tab in conversation mode
2 parents 0df6662 + 795fe2d commit c92edac

File tree

6 files changed

+29
-22
lines changed

6 files changed

+29
-22
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-dev"
3-
version = "0.0.55"
3+
version = "0.0.56"
44
description = "UiPath Developer Console"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath/dev/server/frontend/src/components/runs/RunDetailsPanel.tsx

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import RunEventsPanel from "./RunEventsPanel";
1010
import JsonHighlight from "../shared/JsonHighlight";
1111
import DebugControls from "../debug/DebugControls";
1212

13-
type SidebarTab = "primary" | "io" | "logs";
14-
type MobileTab = "traces" | "primary" | "io" | "logs";
13+
type SidebarTab = "primary" | "events" | "io" | "logs";
14+
type MobileTab = "traces" | "primary" | "events" | "io" | "logs";
1515

1616
interface Props {
1717
run: RunSummary;
@@ -131,6 +131,9 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
131131
const primaryLabel = isChatMode ? "Chat" : "Events";
132132
const primaryColor = isChatMode ? "var(--accent)" : "var(--success)";
133133

134+
const tabColor = (id: string) =>
135+
id === "primary" ? primaryColor : id === "events" ? "var(--success)" : "var(--accent)";
136+
134137
const interrupt = useRunStore((s) => s.activeInterrupt[run.id] ?? null);
135138

136139
// Status indicator for the tab bar
@@ -162,6 +165,7 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
162165
const mobileTabs: { id: MobileTab; label: string; count?: number }[] = [
163166
{ id: "traces", label: "Traces", count: traces.length },
164167
{ id: "primary", label: primaryLabel },
168+
...(isChatMode ? [{ id: "events" as const, label: "Events", count: stateEvents.length }] : []),
165169
{ id: "io", label: "I/O" },
166170
{ id: "logs", label: "Logs", count: logs.length },
167171
];
@@ -189,13 +193,11 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
189193
style={{
190194
color:
191195
mobileTab === tab.id
192-
? tab.id === "primary"
193-
? primaryColor
194-
: "var(--accent)"
196+
? tabColor(tab.id)
195197
: "var(--text-muted)",
196198
background:
197199
mobileTab === tab.id
198-
? `color-mix(in srgb, ${tab.id === "primary" ? primaryColor : "var(--accent)"} 10%, transparent)`
200+
? `color-mix(in srgb, ${tabColor(tab.id)} 10%, transparent)`
199201
: "transparent",
200202
}}
201203
>
@@ -228,6 +230,9 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
228230
<RunEventsPanel events={stateEvents} runStatus={run.status} />
229231
)
230232
)}
233+
{mobileTab === "events" && (
234+
<RunEventsPanel events={stateEvents} runStatus={run.status} />
235+
)}
231236
{mobileTab === "io" && (
232237
<IOView run={run} />
233238
)}
@@ -242,6 +247,7 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
242247
// Desktop layout (unchanged)
243248
const sidebarTabs: { id: SidebarTab; label: string; count?: number }[] = [
244249
{ id: "primary", label: primaryLabel },
250+
...(isChatMode ? [{ id: "events" as const, label: "Events", count: stateEvents.length }] : []),
245251
{ id: "io", label: "I/O" },
246252
{ id: "logs", label: "Logs", count: logs.length },
247253
];
@@ -299,13 +305,11 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
299305
style={{
300306
color:
301307
sidebarTab === tab.id
302-
? tab.id === "primary"
303-
? primaryColor
304-
: "var(--accent)"
308+
? tabColor(tab.id)
305309
: "var(--text-muted)",
306310
background:
307311
sidebarTab === tab.id
308-
? `color-mix(in srgb, ${tab.id === "primary" ? primaryColor : "var(--accent)"} 10%, transparent)`
312+
? `color-mix(in srgb, ${tabColor(tab.id)} 10%, transparent)`
309313
: "transparent",
310314
}}
311315
onMouseEnter={(e) => {
@@ -342,6 +346,9 @@ export default function RunDetailsPanel({ run, ws, isMobile }: Props) {
342346
<RunEventsPanel events={stateEvents} runStatus={run.status} />
343347
)
344348
)}
349+
{sidebarTab === "events" && (
350+
<RunEventsPanel events={stateEvents} runStatus={run.status} />
351+
)}
345352
{sidebarTab === "io" && (
346353
<IOView run={run} />
347354
)}

0 commit comments

Comments
 (0)