agentcrew-ai 0.8.13__py3-none-any.whl → 0.9.1__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.
- AgentCrew/__init__.py +1 -1
- AgentCrew/app.py +46 -634
- AgentCrew/main_docker.py +1 -30
- AgentCrew/modules/a2a/common/client/card_resolver.py +27 -8
- AgentCrew/modules/a2a/server.py +5 -0
- AgentCrew/modules/a2a/task_manager.py +1 -0
- AgentCrew/modules/agents/local_agent.py +2 -2
- AgentCrew/modules/chat/message/command_processor.py +33 -8
- AgentCrew/modules/chat/message/conversation.py +18 -1
- AgentCrew/modules/chat/message/handler.py +5 -1
- AgentCrew/modules/code_analysis/service.py +50 -7
- AgentCrew/modules/code_analysis/tool.py +9 -8
- AgentCrew/modules/console/completers.py +5 -1
- AgentCrew/modules/console/console_ui.py +23 -11
- AgentCrew/modules/console/conversation_browser/__init__.py +9 -0
- AgentCrew/modules/console/conversation_browser/browser.py +84 -0
- AgentCrew/modules/console/conversation_browser/browser_input_handler.py +279 -0
- AgentCrew/modules/console/{conversation_browser.py → conversation_browser/browser_ui.py} +249 -163
- AgentCrew/modules/console/conversation_handler.py +34 -1
- AgentCrew/modules/console/display_handlers.py +127 -7
- AgentCrew/modules/console/visual_mode/__init__.py +5 -0
- AgentCrew/modules/console/visual_mode/viewer.py +41 -0
- AgentCrew/modules/console/visual_mode/viewer_input_handler.py +315 -0
- AgentCrew/modules/console/visual_mode/viewer_ui.py +608 -0
- AgentCrew/modules/gui/components/command_handler.py +137 -29
- AgentCrew/modules/gui/components/menu_components.py +8 -7
- AgentCrew/modules/gui/themes/README.md +30 -14
- AgentCrew/modules/gui/themes/__init__.py +2 -1
- AgentCrew/modules/gui/themes/atom_light.yaml +1287 -0
- AgentCrew/modules/gui/themes/catppuccin.yaml +1276 -0
- AgentCrew/modules/gui/themes/dracula.yaml +1262 -0
- AgentCrew/modules/gui/themes/nord.yaml +1267 -0
- AgentCrew/modules/gui/themes/saigontech.yaml +1268 -0
- AgentCrew/modules/gui/themes/style_provider.py +78 -264
- AgentCrew/modules/gui/themes/theme_loader.py +379 -0
- AgentCrew/modules/gui/themes/unicorn.yaml +1276 -0
- AgentCrew/modules/gui/widgets/configs/global_settings.py +4 -4
- AgentCrew/modules/gui/widgets/history_sidebar.py +6 -1
- AgentCrew/modules/llm/constants.py +28 -9
- AgentCrew/modules/mcpclient/service.py +0 -1
- AgentCrew/modules/memory/base_service.py +13 -0
- AgentCrew/modules/memory/chroma_service.py +50 -0
- AgentCrew/setup.py +470 -0
- {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/METADATA +1 -1
- {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/RECORD +49 -40
- {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/WHEEL +1 -1
- AgentCrew/modules/gui/themes/atom_light.py +0 -1365
- AgentCrew/modules/gui/themes/catppuccin.py +0 -1404
- AgentCrew/modules/gui/themes/dracula.py +0 -1372
- AgentCrew/modules/gui/themes/nord.py +0 -1365
- AgentCrew/modules/gui/themes/saigontech.py +0 -1359
- AgentCrew/modules/gui/themes/unicorn.py +0 -1372
- {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/entry_points.txt +0 -0
- {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/licenses/LICENSE +0 -0
- {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import Dict, Any, Optional
|
|
3
|
+
import yaml
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ThemeLoader:
|
|
7
|
+
_cache: Dict[str, "ThemeData"] = {}
|
|
8
|
+
_themes_dir: Optional[str] = None
|
|
9
|
+
|
|
10
|
+
@classmethod
|
|
11
|
+
def get_themes_dir(cls) -> str:
|
|
12
|
+
if cls._themes_dir is None:
|
|
13
|
+
cls._themes_dir = os.path.dirname(os.path.abspath(__file__))
|
|
14
|
+
return cls._themes_dir
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def load_theme(cls, theme_name: str) -> "ThemeData":
|
|
18
|
+
if theme_name in cls._cache:
|
|
19
|
+
return cls._cache[theme_name]
|
|
20
|
+
|
|
21
|
+
theme_path = os.path.join(cls.get_themes_dir(), f"{theme_name}.yaml")
|
|
22
|
+
if not os.path.exists(theme_path):
|
|
23
|
+
theme_path = os.path.join(cls.get_themes_dir(), "catppuccin.yaml")
|
|
24
|
+
|
|
25
|
+
with open(theme_path, "r", encoding="utf-8") as f:
|
|
26
|
+
data = yaml.safe_load(f)
|
|
27
|
+
|
|
28
|
+
theme = ThemeData(data)
|
|
29
|
+
cls._cache[theme_name] = theme
|
|
30
|
+
return theme
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def clear_cache(cls) -> None:
|
|
34
|
+
cls._cache.clear()
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def get_available_themes(cls) -> list:
|
|
38
|
+
themes_dir = cls.get_themes_dir()
|
|
39
|
+
return [
|
|
40
|
+
f.replace(".yaml", "")
|
|
41
|
+
for f in os.listdir(themes_dir)
|
|
42
|
+
if f.endswith(".yaml")
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ThemeData:
|
|
47
|
+
def __init__(self, data: Dict[str, Any]):
|
|
48
|
+
self._data = data
|
|
49
|
+
self._colors = data.get("colors", {})
|
|
50
|
+
self._styles = data.get("styles", {})
|
|
51
|
+
self._icons = data.get("icons", {})
|
|
52
|
+
self._computed_cache: Dict[str, str] = {}
|
|
53
|
+
|
|
54
|
+
def _interpolate(self, template: str) -> str:
|
|
55
|
+
if template in self._computed_cache:
|
|
56
|
+
return self._computed_cache[template]
|
|
57
|
+
|
|
58
|
+
result = template
|
|
59
|
+
for key, value in self._colors.items():
|
|
60
|
+
result = result.replace(f"${{{key}}}", value)
|
|
61
|
+
|
|
62
|
+
self._computed_cache[template] = result
|
|
63
|
+
return result
|
|
64
|
+
|
|
65
|
+
def get_style(self, name: str, default: str = "") -> str:
|
|
66
|
+
style = self._styles.get(name, default)
|
|
67
|
+
if isinstance(style, str):
|
|
68
|
+
return self._interpolate(style)
|
|
69
|
+
return default
|
|
70
|
+
|
|
71
|
+
def get_color(self, name: str, default: str = "") -> str:
|
|
72
|
+
return self._colors.get(name, default)
|
|
73
|
+
|
|
74
|
+
def get_icon(self, name: str, default: str = "\U0001f527") -> str:
|
|
75
|
+
return self._icons.get(name, self._icons.get("default", default))
|
|
76
|
+
|
|
77
|
+
def get_dict(self, name: str) -> Dict[str, Any]:
|
|
78
|
+
value = self._styles.get(name, {})
|
|
79
|
+
if isinstance(value, dict):
|
|
80
|
+
result = {}
|
|
81
|
+
for k, v in value.items():
|
|
82
|
+
if isinstance(v, str):
|
|
83
|
+
result[k] = self._interpolate(v)
|
|
84
|
+
else:
|
|
85
|
+
result[k] = v
|
|
86
|
+
return result
|
|
87
|
+
return {}
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def MAIN_STYLE(self) -> str:
|
|
91
|
+
return self.get_style("main")
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def PRIMARY_BUTTON(self) -> str:
|
|
95
|
+
return self.get_style("button_primary")
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def SECONDARY_BUTTON(self) -> str:
|
|
99
|
+
return self.get_style("button_secondary")
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def STOP_BUTTON(self) -> str:
|
|
103
|
+
return self.get_style("button_stop")
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def STOP_BUTTON_STOPPING(self) -> str:
|
|
107
|
+
return self.get_style("button_stop_stopping")
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def RED_BUTTON(self) -> str:
|
|
111
|
+
return self.get_style("button_red")
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def GREEN_BUTTON(self) -> str:
|
|
115
|
+
return self.get_style("button_green")
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def DISABLED_BUTTON(self) -> str:
|
|
119
|
+
return self.get_style("button_disabled")
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def MENU_BUTTON(self) -> str:
|
|
123
|
+
return self.get_style("button_menu")
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def AGENT_MENU_BUTTON(self) -> str:
|
|
127
|
+
return self.get_style("button_agent_menu")
|
|
128
|
+
|
|
129
|
+
@property
|
|
130
|
+
def ROLLBACK_BUTTON(self) -> str:
|
|
131
|
+
return self.get_style("button_rollback")
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def CONSOLIDATED_BUTTON(self) -> str:
|
|
135
|
+
return self.get_style("button_consolidated")
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def UNCONSOLIDATE_BUTTON(self) -> str:
|
|
139
|
+
return self.get_style("button_unconsolidate")
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def API_KEYS_GROUP(self) -> str:
|
|
143
|
+
return self.get_style("api_keys_group")
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def EDITOR_CONTAINER_WIDGET(self) -> str:
|
|
147
|
+
return self.get_style("editor_container_widget")
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def COMBO_BOX(self) -> str:
|
|
151
|
+
return self.get_style("combo_box")
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def TEXT_INPUT(self) -> str:
|
|
155
|
+
return self.get_style("text_input")
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def LINE_EDIT(self) -> str:
|
|
159
|
+
return self.get_style("line_edit")
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def MENU_BAR(self) -> str:
|
|
163
|
+
return self.get_style("menu_bar")
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def CONTEXT_MENU(self) -> str:
|
|
167
|
+
return self.get_style("context_menu")
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def AGENT_MENU(self) -> str:
|
|
171
|
+
return self.get_style("agent_menu")
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
def STATUS_INDICATOR(self) -> str:
|
|
175
|
+
return self.get_style("status_indicator")
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def VERSION_LABEL(self) -> str:
|
|
179
|
+
return self.get_style("version_label")
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def SYSTEM_MESSAGE_TOGGLE_BUTTON(self) -> str:
|
|
183
|
+
return self.get_style("system_message_toggle_button")
|
|
184
|
+
|
|
185
|
+
@property
|
|
186
|
+
def SIDEBAR(self) -> str:
|
|
187
|
+
return self.get_style("sidebar")
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def CONVERSATION_LIST(self) -> str:
|
|
191
|
+
return self.get_style("conversation_list")
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def SEARCH_BOX(self) -> str:
|
|
195
|
+
return self.get_style("search_box")
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def TOKEN_USAGE(self) -> str:
|
|
199
|
+
return self.get_style("token_usage")
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def TOKEN_USAGE_WIDGET(self) -> str:
|
|
203
|
+
return self.get_style("token_usage_widget")
|
|
204
|
+
|
|
205
|
+
@property
|
|
206
|
+
def USER_BUBBLE(self) -> str:
|
|
207
|
+
return self.get_style("user_bubble")
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def ASSISTANT_BUBBLE(self) -> str:
|
|
211
|
+
return self.get_style("assistant_bubble")
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
def THINKING_BUBBLE(self) -> str:
|
|
215
|
+
return self.get_style("thinking_bubble")
|
|
216
|
+
|
|
217
|
+
@property
|
|
218
|
+
def CONSOLIDATED_BUBBLE(self) -> str:
|
|
219
|
+
return self.get_style("consolidated_bubble")
|
|
220
|
+
|
|
221
|
+
@property
|
|
222
|
+
def TOOL_DIALOG_TEXT_EDIT(self) -> str:
|
|
223
|
+
return self.get_style("tool_dialog_text_edit")
|
|
224
|
+
|
|
225
|
+
@property
|
|
226
|
+
def TOOL_DIALOG_YES_BUTTON(self) -> str:
|
|
227
|
+
return self.get_style("tool_dialog_yes_button")
|
|
228
|
+
|
|
229
|
+
@property
|
|
230
|
+
def TOOL_DIALOG_ALL_BUTTON(self) -> str:
|
|
231
|
+
return self.get_style("tool_dialog_all_button")
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
def TOOL_DIALOG_NO_BUTTON(self) -> str:
|
|
235
|
+
return self.get_style("tool_dialog_no_button")
|
|
236
|
+
|
|
237
|
+
@property
|
|
238
|
+
def SYSTEM_MESSAGE_LABEL(self) -> str:
|
|
239
|
+
return self.get_style("system_message_label")
|
|
240
|
+
|
|
241
|
+
@property
|
|
242
|
+
def SYSTEM_MESSAGE_TOGGLE(self) -> str:
|
|
243
|
+
return self.get_style("system_message_toggle")
|
|
244
|
+
|
|
245
|
+
@property
|
|
246
|
+
def CONFIG_DIALOG(self) -> str:
|
|
247
|
+
return self.get_style("config_dialog")
|
|
248
|
+
|
|
249
|
+
@property
|
|
250
|
+
def PANEL(self) -> str:
|
|
251
|
+
return self.get_style("panel")
|
|
252
|
+
|
|
253
|
+
@property
|
|
254
|
+
def SCROLL_AREA(self) -> str:
|
|
255
|
+
return self.get_style("scroll_area")
|
|
256
|
+
|
|
257
|
+
@property
|
|
258
|
+
def EDITOR_WIDGET(self) -> str:
|
|
259
|
+
return self.get_style("editor_widget")
|
|
260
|
+
|
|
261
|
+
@property
|
|
262
|
+
def GROUP_BOX(self) -> str:
|
|
263
|
+
return self.get_style("group_box")
|
|
264
|
+
|
|
265
|
+
@property
|
|
266
|
+
def SPLITTER_COLOR(self) -> str:
|
|
267
|
+
return self.get_style("splitter_color")
|
|
268
|
+
|
|
269
|
+
@property
|
|
270
|
+
def METADATA_HEADER_LABEL(self) -> str:
|
|
271
|
+
return self.get_style("metadata_header_label")
|
|
272
|
+
|
|
273
|
+
@property
|
|
274
|
+
def USER_MESSAGE_LABEL(self) -> str:
|
|
275
|
+
return self.get_style("user_message_label")
|
|
276
|
+
|
|
277
|
+
@property
|
|
278
|
+
def ASSISTANT_MESSAGE_LABEL(self) -> str:
|
|
279
|
+
return self.get_style("assistant_message_label")
|
|
280
|
+
|
|
281
|
+
@property
|
|
282
|
+
def THINKING_MESSAGE_LABEL(self) -> str:
|
|
283
|
+
return self.get_style("thinking_message_label")
|
|
284
|
+
|
|
285
|
+
@property
|
|
286
|
+
def USER_SENDER_LABEL(self) -> str:
|
|
287
|
+
return self.get_style("user_sender_label")
|
|
288
|
+
|
|
289
|
+
@property
|
|
290
|
+
def ASSISTANT_SENDER_LABEL(self) -> str:
|
|
291
|
+
return self.get_style("assistant_sender_label")
|
|
292
|
+
|
|
293
|
+
@property
|
|
294
|
+
def THINKING_SENDER_LABEL(self) -> str:
|
|
295
|
+
return self.get_style("thinking_sender_label")
|
|
296
|
+
|
|
297
|
+
@property
|
|
298
|
+
def USER_FILE_NAME_LABEL(self) -> str:
|
|
299
|
+
return self.get_style("user_file_name_label")
|
|
300
|
+
|
|
301
|
+
@property
|
|
302
|
+
def ASSISTANT_FILE_NAME_LABEL(self) -> str:
|
|
303
|
+
return self.get_style("assistant_file_name_label")
|
|
304
|
+
|
|
305
|
+
@property
|
|
306
|
+
def USER_FILE_INFO_LABEL(self) -> str:
|
|
307
|
+
return self.get_style("user_file_info_label")
|
|
308
|
+
|
|
309
|
+
@property
|
|
310
|
+
def ASSISTANT_FILE_INFO_LABEL(self) -> str:
|
|
311
|
+
return self.get_style("assistant_file_info_label")
|
|
312
|
+
|
|
313
|
+
@property
|
|
314
|
+
def CODE_CSS(self) -> str:
|
|
315
|
+
return self.get_style("code_css")
|
|
316
|
+
|
|
317
|
+
@property
|
|
318
|
+
def CHECKBOX_STYLE(self) -> str:
|
|
319
|
+
return self.get_style("checkbox")
|
|
320
|
+
|
|
321
|
+
@property
|
|
322
|
+
def TOOL_WIDGET(self) -> str:
|
|
323
|
+
return self.get_style("tool_widget")
|
|
324
|
+
|
|
325
|
+
@property
|
|
326
|
+
def TOOL_CARD(self) -> str:
|
|
327
|
+
return self.get_style("tool_card")
|
|
328
|
+
|
|
329
|
+
@property
|
|
330
|
+
def TOOL_CARD_ERROR(self) -> str:
|
|
331
|
+
return self.get_style("tool_card_error")
|
|
332
|
+
|
|
333
|
+
@property
|
|
334
|
+
def TOOL_HEADER(self) -> str:
|
|
335
|
+
return self.get_style("tool_header")
|
|
336
|
+
|
|
337
|
+
@property
|
|
338
|
+
def TOOL_TOGGLE_BUTTON(self) -> str:
|
|
339
|
+
return self.get_style("tool_toggle_button")
|
|
340
|
+
|
|
341
|
+
@property
|
|
342
|
+
def TOOL_STATUS(self) -> str:
|
|
343
|
+
return self.get_style("tool_status")
|
|
344
|
+
|
|
345
|
+
@property
|
|
346
|
+
def TOOL_CONTENT(self) -> str:
|
|
347
|
+
return self.get_style("tool_content")
|
|
348
|
+
|
|
349
|
+
@property
|
|
350
|
+
def TOOL_PROGRESS(self) -> str:
|
|
351
|
+
return self.get_style("tool_progress")
|
|
352
|
+
|
|
353
|
+
@property
|
|
354
|
+
def TOOL_SEPARATOR(self) -> str:
|
|
355
|
+
return self.get_style("tool_separator")
|
|
356
|
+
|
|
357
|
+
@property
|
|
358
|
+
def TOOL_ICONS(self) -> Dict[str, str]:
|
|
359
|
+
return self._icons
|
|
360
|
+
|
|
361
|
+
@property
|
|
362
|
+
def DIFF_COLORS(self) -> Dict[str, str]:
|
|
363
|
+
return self.get_dict("diff_colors")
|
|
364
|
+
|
|
365
|
+
@property
|
|
366
|
+
def JSON_EDITOR_COLORS(self) -> Dict[str, str]:
|
|
367
|
+
return self.get_dict("json_editor_colors")
|
|
368
|
+
|
|
369
|
+
@property
|
|
370
|
+
def JSON_EDITOR_STYLE(self) -> str:
|
|
371
|
+
return self.get_style("json_editor")
|
|
372
|
+
|
|
373
|
+
@property
|
|
374
|
+
def MARKDOWN_EDITOR_COLORS(self) -> Dict[str, str]:
|
|
375
|
+
return self.get_dict("markdown_editor_colors")
|
|
376
|
+
|
|
377
|
+
@property
|
|
378
|
+
def MARKDOWN_EDITOR_STYLE(self) -> str:
|
|
379
|
+
return self.get_style("markdown_editor")
|