uipath 2.1.37__py3-none-any.whl → 2.1.38__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- uipath/_cli/_dev/_terminal/__init__.py +1 -1
- uipath/_cli/_dev/_terminal/_components/_chat.py +20 -12
- uipath/_cli/_dev/_terminal/_components/_details.py +6 -3
- uipath/_cli/_dev/_terminal/_styles/terminal.tcss +4 -3
- uipath/_cli/_dev/_terminal/_utils/_chat.py +36 -34
- {uipath-2.1.37.dist-info → uipath-2.1.38.dist-info}/METADATA +1 -1
- {uipath-2.1.37.dist-info → uipath-2.1.38.dist-info}/RECORD +10 -10
- {uipath-2.1.37.dist-info → uipath-2.1.38.dist-info}/WHEEL +0 -0
- {uipath-2.1.37.dist-info → uipath-2.1.38.dist-info}/entry_points.txt +0 -0
- {uipath-2.1.37.dist-info → uipath-2.1.38.dist-info}/licenses/LICENSE +0 -0
@@ -295,7 +295,7 @@ class UiPathDevTerminal(App[Any]):
|
|
295
295
|
if not updated_chat_message:
|
296
296
|
return
|
297
297
|
details_panel = self.app.query_one("#details-panel", RunDetailsPanel)
|
298
|
-
details_panel.add_chat_message(updated_chat_message, execution_id)
|
298
|
+
details_panel.add_chat_message(event, updated_chat_message, execution_id)
|
299
299
|
|
300
300
|
def _add_info_log(self, run: ExecutionRun, message: str):
|
301
301
|
"""Add info log to run."""
|
@@ -6,6 +6,7 @@ from textual.containers import Container, Vertical, VerticalScroll
|
|
6
6
|
from textual.widgets import Input, Markdown
|
7
7
|
|
8
8
|
from uipath.agent.conversation import (
|
9
|
+
UiPathConversationEvent,
|
9
10
|
UiPathConversationMessage,
|
10
11
|
UiPathExternalValue,
|
11
12
|
UiPathInlineValue,
|
@@ -17,11 +18,11 @@ class Prompt(Markdown):
|
|
17
18
|
|
18
19
|
|
19
20
|
class Response(Markdown):
|
20
|
-
BORDER_TITLE = "ai"
|
21
|
+
BORDER_TITLE = "🤖 ai"
|
21
22
|
|
22
23
|
|
23
24
|
class Tool(Markdown):
|
24
|
-
BORDER_TITLE = "tool"
|
25
|
+
BORDER_TITLE = "🛠️ tool"
|
25
26
|
|
26
27
|
|
27
28
|
class ChatPanel(Container):
|
@@ -43,38 +44,40 @@ class ChatPanel(Container):
|
|
43
44
|
id="chat-input",
|
44
45
|
)
|
45
46
|
|
46
|
-
def add_chat_message(
|
47
|
+
def add_chat_message(
|
48
|
+
self, event: UiPathConversationEvent, chat_msg: UiPathConversationMessage
|
49
|
+
) -> None:
|
47
50
|
"""Add or update a chat message bubble."""
|
48
51
|
chat_view = self.query_one("#chat-view")
|
49
52
|
|
50
53
|
widget_cls: Union[type[Prompt], type[Response], type[Tool]]
|
51
54
|
if chat_msg.role == "user":
|
52
55
|
widget_cls = Prompt
|
53
|
-
prefix = "👤"
|
54
56
|
elif chat_msg.role == "assistant":
|
55
57
|
widget_cls = Response
|
56
|
-
prefix = "🤖"
|
57
58
|
else:
|
58
59
|
widget_cls = Response
|
59
|
-
prefix = "⚒️"
|
60
60
|
|
61
61
|
parts: List[str] = []
|
62
62
|
if chat_msg.content_parts:
|
63
63
|
for part in chat_msg.content_parts:
|
64
|
-
if
|
64
|
+
if (
|
65
|
+
part.mime_type.startswith("text/")
|
66
|
+
or part.mime_type == "application/json"
|
67
|
+
):
|
65
68
|
if isinstance(part.data, UiPathInlineValue):
|
66
69
|
parts.append(part.data.inline or "")
|
67
70
|
elif isinstance(part.data, UiPathExternalValue):
|
68
|
-
# maybe fetch from URL or just show a placeholder
|
69
71
|
parts.append(f"[external: {part.data.url}]")
|
70
72
|
|
71
73
|
text_block = "\n".join(parts).strip()
|
72
|
-
content_lines = [f"{
|
74
|
+
content_lines = [f"{text_block}"] if text_block else []
|
73
75
|
|
74
76
|
if chat_msg.tool_calls:
|
77
|
+
widget_cls = Tool
|
75
78
|
for call in chat_msg.tool_calls:
|
76
|
-
|
77
|
-
content_lines.append(f"
|
79
|
+
status_icon = "✓" if call.result else "⚙"
|
80
|
+
content_lines.append(f" {status_icon} **{call.name}**")
|
78
81
|
|
79
82
|
if not content_lines:
|
80
83
|
return
|
@@ -86,7 +89,12 @@ class ChatPanel(Container):
|
|
86
89
|
last_update = self._last_update_time.get(chat_msg.message_id, 0.0)
|
87
90
|
|
88
91
|
if existing:
|
89
|
-
|
92
|
+
should_update = (
|
93
|
+
event.exchange
|
94
|
+
and event.exchange.message
|
95
|
+
and event.exchange.message.end is not None
|
96
|
+
)
|
97
|
+
if should_update or now - last_update > 0.15:
|
90
98
|
existing.update(content)
|
91
99
|
self._last_update_time[chat_msg.message_id] = now
|
92
100
|
chat_view.scroll_end(animate=False)
|
@@ -6,7 +6,7 @@ from textual.reactive import reactive
|
|
6
6
|
from textual.widgets import Input, RichLog, TabbedContent, TabPane, Tree
|
7
7
|
from textual.widgets.tree import TreeNode
|
8
8
|
|
9
|
-
from uipath.agent.conversation import UiPathConversationMessage
|
9
|
+
from uipath.agent.conversation import UiPathConversationEvent, UiPathConversationMessage
|
10
10
|
|
11
11
|
from .._models._execution import ExecutionRun
|
12
12
|
from .._models._messages import LogMessage, TraceMessage
|
@@ -430,13 +430,16 @@ class RunDetailsPanel(Container):
|
|
430
430
|
logs_log.write(log_msg.message)
|
431
431
|
|
432
432
|
def add_chat_message(
|
433
|
-
self,
|
433
|
+
self,
|
434
|
+
event: UiPathConversationEvent,
|
435
|
+
chat_msg: UiPathConversationMessage,
|
436
|
+
run_id: str,
|
434
437
|
) -> None:
|
435
438
|
"""Add a chat message to the display."""
|
436
439
|
if not self.current_run or run_id != self.current_run.id:
|
437
440
|
return
|
438
441
|
chat_panel = self.query_one("#chat-panel", ChatPanel)
|
439
|
-
chat_panel.add_chat_message(chat_msg)
|
442
|
+
chat_panel.add_chat_message(event, chat_msg)
|
440
443
|
|
441
444
|
def clear_display(self):
|
442
445
|
"""Clear both traces and logs display."""
|
@@ -226,15 +226,16 @@ TextArea.invalid {
|
|
226
226
|
|
227
227
|
|
228
228
|
Prompt {
|
229
|
-
|
229
|
+
border: wide $primary-background;
|
230
|
+
background: $surface;
|
230
231
|
color: $text;
|
231
232
|
margin-right: 8;
|
232
233
|
margin-left: 1;
|
233
234
|
padding: 1 1 0 1;
|
234
235
|
}
|
235
236
|
Response, Tool {
|
236
|
-
border: wide $
|
237
|
-
background: $
|
237
|
+
border: wide $primary-background;
|
238
|
+
background: $surface;
|
238
239
|
color: $text;
|
239
240
|
margin: 1;
|
240
241
|
margin-left: 8;
|
@@ -74,9 +74,10 @@ class ConversationAggregator:
|
|
74
74
|
)
|
75
75
|
self.messages[ev.message_id] = msg
|
76
76
|
|
77
|
-
# --- Handle content parts ---
|
77
|
+
# --- Handle content parts (text, JSON, etc.) ---
|
78
78
|
if ev.content_part:
|
79
79
|
cp_event = ev.content_part
|
80
|
+
|
80
81
|
existing = next(
|
81
82
|
(
|
82
83
|
cp
|
@@ -86,27 +87,41 @@ class ConversationAggregator:
|
|
86
87
|
None,
|
87
88
|
)
|
88
89
|
|
89
|
-
|
90
|
+
# Start of a new content part
|
91
|
+
if cp_event.start and not existing:
|
92
|
+
new_cp = UiPathConversationContentPart(
|
93
|
+
content_part_id=cp_event.content_part_id,
|
94
|
+
mime_type=cp_event.start.mime_type,
|
95
|
+
data=UiPathInlineValue(inline=""),
|
96
|
+
citations=[],
|
97
|
+
is_transcript=None,
|
98
|
+
is_incomplete=True,
|
99
|
+
)
|
100
|
+
if msg.content_parts is None:
|
101
|
+
msg.content_parts = []
|
102
|
+
msg.content_parts.append(new_cp)
|
103
|
+
existing = new_cp
|
104
|
+
|
105
|
+
# Chunk for an existing part (or backfill if start missing)
|
106
|
+
if cp_event.chunk:
|
90
107
|
if not existing:
|
108
|
+
new_cp = UiPathConversationContentPart(
|
109
|
+
content_part_id=cp_event.content_part_id,
|
110
|
+
mime_type="text/plain", # fallback if start missing
|
111
|
+
data=UiPathInlineValue(inline=""),
|
112
|
+
citations=[],
|
113
|
+
is_transcript=None,
|
114
|
+
is_incomplete=True,
|
115
|
+
)
|
91
116
|
if msg.content_parts is None:
|
92
117
|
msg.content_parts = []
|
93
|
-
msg.content_parts.append(
|
94
|
-
|
95
|
-
|
96
|
-
mime_type=cp_event.start.mime_type,
|
97
|
-
data=UiPathInlineValue(
|
98
|
-
inline=cp_event.chunk.data
|
99
|
-
if cp_event.chunk and cp_event.chunk.data
|
100
|
-
else ""
|
101
|
-
),
|
102
|
-
citations=[],
|
103
|
-
is_transcript=None,
|
104
|
-
is_incomplete=None,
|
105
|
-
)
|
106
|
-
)
|
107
|
-
if cp_event.chunk and existing:
|
118
|
+
msg.content_parts.append(new_cp)
|
119
|
+
existing = new_cp
|
120
|
+
|
108
121
|
if isinstance(existing.data, UiPathInlineValue):
|
109
122
|
existing.data.inline += cp_event.chunk.data or ""
|
123
|
+
|
124
|
+
# End of a part
|
110
125
|
if cp_event.end and existing:
|
111
126
|
existing.is_incomplete = bool(cp_event.end.interrupted)
|
112
127
|
|
@@ -122,43 +137,31 @@ class ConversationAggregator:
|
|
122
137
|
None,
|
123
138
|
)
|
124
139
|
|
140
|
+
# Start of a tool call
|
125
141
|
if tc_event.start:
|
126
142
|
if not existing_tool_call:
|
127
|
-
# create new tool call
|
128
143
|
new_tc = UiPathConversationToolCall(
|
129
144
|
tool_call_id=tc_event.tool_call_id,
|
130
145
|
name=tc_event.start.tool_name,
|
131
|
-
arguments=
|
146
|
+
arguments=None, # args will arrive as JSON content part
|
132
147
|
timestamp=tc_event.start.timestamp,
|
133
148
|
result=None,
|
134
149
|
)
|
135
150
|
if msg.tool_calls is None:
|
136
151
|
msg.tool_calls = []
|
137
152
|
msg.tool_calls.append(new_tc)
|
153
|
+
existing_tool_call = new_tc
|
138
154
|
else:
|
139
|
-
# merge/update existing
|
140
155
|
existing_tool_call.name = (
|
141
156
|
tc_event.start.tool_name or existing_tool_call.name
|
142
157
|
)
|
143
|
-
if tc_event.start.arguments:
|
144
|
-
# If Inline, append more data
|
145
|
-
if isinstance(
|
146
|
-
tc_event.start.arguments, UiPathInlineValue
|
147
|
-
) and isinstance(
|
148
|
-
existing_tool_call.arguments, UiPathInlineValue
|
149
|
-
):
|
150
|
-
existing_tool_call.arguments.inline += (
|
151
|
-
tc_event.start.arguments.inline or ""
|
152
|
-
)
|
153
|
-
else:
|
154
|
-
existing_tool_call.arguments = tc_event.start.arguments
|
155
158
|
existing_tool_call.timestamp = (
|
156
159
|
tc_event.start.timestamp or existing_tool_call.timestamp
|
157
160
|
)
|
158
161
|
|
162
|
+
# End of a tool call
|
159
163
|
if tc_event.end:
|
160
164
|
if not existing_tool_call:
|
161
|
-
# Shouldn't happen, but initialize if end comes first
|
162
165
|
existing_tool_call = UiPathConversationToolCall(
|
163
166
|
tool_call_id=tc_event.tool_call_id,
|
164
167
|
name="", # unknown until start seen
|
@@ -177,7 +180,6 @@ class ConversationAggregator:
|
|
177
180
|
|
178
181
|
# --- Update timestamps ---
|
179
182
|
msg.updated_at = self._timestamp(ev)
|
180
|
-
|
181
183
|
return msg
|
182
184
|
|
183
185
|
def _timestamp(self, ev: UiPathConversationMessageEvent) -> str:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: uipath
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.38
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
@@ -31,16 +31,16 @@ uipath/_cli/_auth/auth_config.json,sha256=UnAhdum8phjuZaZKE5KLp0IcPCbIltDEU1M_G8
|
|
31
31
|
uipath/_cli/_auth/index.html,sha256=uGK0CDTP8Rys_p4O_Pbd2x4tz0frKNVcumjrXnal5Nc,22814
|
32
32
|
uipath/_cli/_auth/localhost.crt,sha256=oGl9oLLOiouHubAt39B4zEfylFvKEtbtr_43SIliXJc,1226
|
33
33
|
uipath/_cli/_auth/localhost.key,sha256=X31VYXD8scZtmGA837dGX5l6G-LXHLo5ItWJhZXaz3c,1679
|
34
|
-
uipath/_cli/_dev/_terminal/__init__.py,sha256=
|
35
|
-
uipath/_cli/_dev/_terminal/_components/_chat.py,sha256=
|
36
|
-
uipath/_cli/_dev/_terminal/_components/_details.py,sha256=
|
34
|
+
uipath/_cli/_dev/_terminal/__init__.py,sha256=NcDVlqq-_h2zhXQJS4oCttDG-JIO5fFVZHKG4LEsANY,11706
|
35
|
+
uipath/_cli/_dev/_terminal/_components/_chat.py,sha256=ne6a2i67-7ZUDLILApZPVzUY3rHcF-dJ0gWL7hPP5LI,3433
|
36
|
+
uipath/_cli/_dev/_terminal/_components/_details.py,sha256=f8Wr_iX9tDTBHeOs0i8UepNfh8giNVWtA6k2otOdgTk,17010
|
37
37
|
uipath/_cli/_dev/_terminal/_components/_history.py,sha256=dcT9tohEwpUaLGi7VWu5d-mDIF45UxFzN2Yvdf5N-eM,2691
|
38
38
|
uipath/_cli/_dev/_terminal/_components/_json_input.py,sha256=MPkaeiA5KfkwJZKuNJ02hQksVtluZlmJv9nLRRAWYQI,592
|
39
39
|
uipath/_cli/_dev/_terminal/_components/_new.py,sha256=jxDFOQ6NCzTgesgx3srRr45ij1FqdICAB0uo6vXeh4I,4614
|
40
40
|
uipath/_cli/_dev/_terminal/_models/_execution.py,sha256=jp-0lRtHqNDAuk7KKPVZ5CUqlFLfuKGZT_GTwd0LtQs,2615
|
41
41
|
uipath/_cli/_dev/_terminal/_models/_messages.py,sha256=p66MHUi_SS30CQWXtiwydybMKBQrtZLXNfNUD6TdK1w,1832
|
42
|
-
uipath/_cli/_dev/_terminal/_styles/terminal.tcss,sha256=
|
43
|
-
uipath/_cli/_dev/_terminal/_utils/_chat.py,sha256=
|
42
|
+
uipath/_cli/_dev/_terminal/_styles/terminal.tcss,sha256=J5hYPhf_Sdif6dApMLujrwNTXlY0QBwonOdbmskxHY0,3141
|
43
|
+
uipath/_cli/_dev/_terminal/_utils/_chat.py,sha256=YUZxYVdmEManwHDuZsczJT1dWIYE1dVBgABlurwMFcE,8493
|
44
44
|
uipath/_cli/_dev/_terminal/_utils/_exporter.py,sha256=oI6D_eMwrh_2aqDYUh4GrJg8VLGrLYhDahR-_o0uJns,4144
|
45
45
|
uipath/_cli/_dev/_terminal/_utils/_logger.py,sha256=jeNShEED27cNIHTe_NNx-2kUiXpSLTmi0onM6tVkqRM,888
|
46
46
|
uipath/_cli/_evals/evaluation_service.py,sha256=zqYRB-tZpTTFqMctjIpEli3joIlmrz3dCVZsxekxIps,22053
|
@@ -139,8 +139,8 @@ uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,185
|
|
139
139
|
uipath/tracing/_utils.py,sha256=wJRELaPu69iY0AhV432Dk5QYf_N_ViRU4kAUG1BI1ew,10384
|
140
140
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
141
141
|
uipath/utils/_endpoints_manager.py,sha256=iRTl5Q0XAm_YgcnMcJOXtj-8052sr6jpWuPNz6CgT0Q,8408
|
142
|
-
uipath-2.1.
|
143
|
-
uipath-2.1.
|
144
|
-
uipath-2.1.
|
145
|
-
uipath-2.1.
|
146
|
-
uipath-2.1.
|
142
|
+
uipath-2.1.38.dist-info/METADATA,sha256=n4_EH5ABqSOm4r2JbudngTSg8vDV7T6E6Bm-mqFu0Bc,6482
|
143
|
+
uipath-2.1.38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
144
|
+
uipath-2.1.38.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
145
|
+
uipath-2.1.38.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
146
|
+
uipath-2.1.38.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|