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.
Files changed (55) hide show
  1. AgentCrew/__init__.py +1 -1
  2. AgentCrew/app.py +46 -634
  3. AgentCrew/main_docker.py +1 -30
  4. AgentCrew/modules/a2a/common/client/card_resolver.py +27 -8
  5. AgentCrew/modules/a2a/server.py +5 -0
  6. AgentCrew/modules/a2a/task_manager.py +1 -0
  7. AgentCrew/modules/agents/local_agent.py +2 -2
  8. AgentCrew/modules/chat/message/command_processor.py +33 -8
  9. AgentCrew/modules/chat/message/conversation.py +18 -1
  10. AgentCrew/modules/chat/message/handler.py +5 -1
  11. AgentCrew/modules/code_analysis/service.py +50 -7
  12. AgentCrew/modules/code_analysis/tool.py +9 -8
  13. AgentCrew/modules/console/completers.py +5 -1
  14. AgentCrew/modules/console/console_ui.py +23 -11
  15. AgentCrew/modules/console/conversation_browser/__init__.py +9 -0
  16. AgentCrew/modules/console/conversation_browser/browser.py +84 -0
  17. AgentCrew/modules/console/conversation_browser/browser_input_handler.py +279 -0
  18. AgentCrew/modules/console/{conversation_browser.py → conversation_browser/browser_ui.py} +249 -163
  19. AgentCrew/modules/console/conversation_handler.py +34 -1
  20. AgentCrew/modules/console/display_handlers.py +127 -7
  21. AgentCrew/modules/console/visual_mode/__init__.py +5 -0
  22. AgentCrew/modules/console/visual_mode/viewer.py +41 -0
  23. AgentCrew/modules/console/visual_mode/viewer_input_handler.py +315 -0
  24. AgentCrew/modules/console/visual_mode/viewer_ui.py +608 -0
  25. AgentCrew/modules/gui/components/command_handler.py +137 -29
  26. AgentCrew/modules/gui/components/menu_components.py +8 -7
  27. AgentCrew/modules/gui/themes/README.md +30 -14
  28. AgentCrew/modules/gui/themes/__init__.py +2 -1
  29. AgentCrew/modules/gui/themes/atom_light.yaml +1287 -0
  30. AgentCrew/modules/gui/themes/catppuccin.yaml +1276 -0
  31. AgentCrew/modules/gui/themes/dracula.yaml +1262 -0
  32. AgentCrew/modules/gui/themes/nord.yaml +1267 -0
  33. AgentCrew/modules/gui/themes/saigontech.yaml +1268 -0
  34. AgentCrew/modules/gui/themes/style_provider.py +78 -264
  35. AgentCrew/modules/gui/themes/theme_loader.py +379 -0
  36. AgentCrew/modules/gui/themes/unicorn.yaml +1276 -0
  37. AgentCrew/modules/gui/widgets/configs/global_settings.py +4 -4
  38. AgentCrew/modules/gui/widgets/history_sidebar.py +6 -1
  39. AgentCrew/modules/llm/constants.py +28 -9
  40. AgentCrew/modules/mcpclient/service.py +0 -1
  41. AgentCrew/modules/memory/base_service.py +13 -0
  42. AgentCrew/modules/memory/chroma_service.py +50 -0
  43. AgentCrew/setup.py +470 -0
  44. {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/METADATA +1 -1
  45. {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/RECORD +49 -40
  46. {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/WHEEL +1 -1
  47. AgentCrew/modules/gui/themes/atom_light.py +0 -1365
  48. AgentCrew/modules/gui/themes/catppuccin.py +0 -1404
  49. AgentCrew/modules/gui/themes/dracula.py +0 -1372
  50. AgentCrew/modules/gui/themes/nord.py +0 -1365
  51. AgentCrew/modules/gui/themes/saigontech.py +0 -1359
  52. AgentCrew/modules/gui/themes/unicorn.py +0 -1372
  53. {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/entry_points.txt +0 -0
  54. {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/licenses/LICENSE +0 -0
  55. {agentcrew_ai-0.8.13.dist-info → agentcrew_ai-0.9.1.dist-info}/top_level.txt +0 -0
@@ -1,422 +1,236 @@
1
- from .catppuccin import CatppuccinTheme
2
- from .atom_light import AtomLightTheme
3
- from .nord import NordTheme
4
- from .dracula import DraculaTheme
5
- from .unicorn import UnicornTheme
6
- from .saigontech import SaigonTechTheme
1
+ from .theme_loader import ThemeLoader, ThemeData
7
2
  from AgentCrew.modules.config import ConfigManagement
8
3
  from PySide6.QtCore import Signal, QObject
9
4
 
10
5
 
11
6
  class StyleProvider(QObject):
12
- """Provides styling for the chat window and components."""
13
-
14
- # Signal emitted when theme changes
15
7
  theme_changed = Signal(str)
16
-
17
8
  _instance = None
18
9
 
19
10
  def __new__(cls):
20
- """Singleton pattern to ensure only one instance exists."""
21
11
  if cls._instance is None:
22
12
  cls._instance = super(StyleProvider, cls).__new__(cls)
23
13
  cls._instance._initialized = False
24
14
  return cls._instance
25
15
 
26
16
  def __init__(self):
27
- """Initialize the style provider by reading theme from global config."""
28
17
  if self._initialized:
29
18
  return
30
19
 
31
20
  super().__init__()
32
21
  self._initialized = True
33
22
 
34
- # Read theme from global config
35
23
  self.config_manager = ConfigManagement()
36
24
  global_config = self.config_manager.read_global_config_data()
37
- self.theme = global_config.get("global_settings", {}).get("theme", "saigontech")
25
+ self.theme = global_config.get("global_settings", {}).get("theme", "catppuccin")
38
26
 
39
27
  self._set_theme_class()
40
28
 
41
29
  def _set_theme_class(self):
42
- """Set the theme class based on the current theme setting."""
43
- if self.theme == "light":
44
- self.theme_class = AtomLightTheme
45
- elif self.theme == "nord":
46
- self.theme_class = NordTheme
47
- elif self.theme == "dracula":
48
- self.theme_class = DraculaTheme
49
- elif self.theme == "unicorn":
50
- self.theme_class = UnicornTheme
51
- elif self.theme == "dark":
52
- self.theme_class = CatppuccinTheme
53
- else:
54
- self.theme_class = SaigonTechTheme # Default to Catppuccin for "dark"
30
+ self.theme_class: ThemeData = ThemeLoader.load_theme(self.theme)
55
31
 
56
32
  def update_theme(self, reload=True):
57
- """
58
- Update the theme based on the current configuration.
59
-
60
- Args:
61
- reload (bool): If True, reload the theme from the configuration.
62
- If False, use the currently set theme.
63
-
64
- Returns:
65
- bool: True if the theme changed, False otherwise.
66
- """
67
33
  if reload:
68
- # Re-read from config
69
34
  global_config = self.config_manager.read_global_config_data()
70
- new_theme = global_config.get("global_settings", {}).get("theme", "dark")
35
+ new_theme = global_config.get("global_settings", {}).get(
36
+ "theme", "catppuccin"
37
+ )
71
38
 
72
- # Check if theme changed
73
39
  if new_theme != self.theme:
74
40
  self.theme = new_theme
41
+ ThemeLoader.clear_cache()
75
42
  self._set_theme_class()
76
43
  self.theme_changed.emit(self.theme)
77
44
  return True
78
45
  return False
79
46
 
47
+ def _get_attr(self, name: str, default: str = "") -> str:
48
+ return getattr(self.theme_class, name, default)
49
+
80
50
  def get_main_style(self):
81
- """Get the main style for the chat window."""
82
- return self.theme_class.MAIN_STYLE
51
+ return self._get_attr("MAIN_STYLE")
83
52
 
84
53
  def get_config_window_style(self):
85
- return self.theme_class.CONFIG_DIALOG
54
+ return self._get_attr("CONFIG_DIALOG")
86
55
 
87
56
  def get_button_style(self, button_type="primary"):
88
- """Get style for buttons based on type."""
89
- if button_type == "primary":
90
- return self.theme_class.PRIMARY_BUTTON
91
- elif button_type == "secondary":
92
- return self.theme_class.SECONDARY_BUTTON
93
- elif button_type == "stop":
94
- return self.theme_class.STOP_BUTTON
95
- elif button_type == "disabled":
96
- return self.theme_class.DISABLED_BUTTON
97
- elif button_type == "stop_stopping":
98
- return self.theme_class.STOP_BUTTON_STOPPING
99
- elif button_type == "red":
100
- return self.theme_class.RED_BUTTON
101
- elif button_type == "green":
102
- return self.theme_class.GREEN_BUTTON
103
- elif button_type == "agent_menu":
104
- return self.theme_class.AGENT_MENU_BUTTON
105
- else:
106
- return ""
57
+ button_map = {
58
+ "primary": "PRIMARY_BUTTON",
59
+ "secondary": "SECONDARY_BUTTON",
60
+ "stop": "STOP_BUTTON",
61
+ "disabled": "DISABLED_BUTTON",
62
+ "stop_stopping": "STOP_BUTTON_STOPPING",
63
+ "red": "RED_BUTTON",
64
+ "green": "GREEN_BUTTON",
65
+ "agent_menu": "AGENT_MENU_BUTTON",
66
+ }
67
+ attr_name = button_map.get(button_type, "")
68
+ return self._get_attr(attr_name) if attr_name else ""
107
69
 
108
70
  def get_input_style(self):
109
- """Get style for text input."""
110
- return self.theme_class.TEXT_INPUT
71
+ return self._get_attr("TEXT_INPUT")
111
72
 
112
73
  def get_menu_style(self):
113
- """Get style for menus."""
114
- return self.theme_class.MENU_BAR
74
+ return self._get_attr("MENU_BAR")
115
75
 
116
76
  def get_status_indicator_style(self):
117
- """Get style for status indicator."""
118
- return self.theme_class.STATUS_INDICATOR
77
+ return self._get_attr("STATUS_INDICATOR")
119
78
 
120
79
  def get_version_label_style(self):
121
- """Get style for version label."""
122
- return self.theme_class.VERSION_LABEL
80
+ return self._get_attr("VERSION_LABEL")
123
81
 
124
82
  def get_tool_dialog_text_edit_style(self):
125
- """Get style for tool dialog text edit."""
126
- return self.theme_class.TOOL_DIALOG_TEXT_EDIT
83
+ return self._get_attr("TOOL_DIALOG_TEXT_EDIT")
127
84
 
128
85
  def get_tool_dialog_yes_button_style(self):
129
- """Get style for tool dialog yes button."""
130
- return self.theme_class.TOOL_DIALOG_YES_BUTTON
86
+ return self._get_attr("TOOL_DIALOG_YES_BUTTON")
131
87
 
132
88
  def get_tool_dialog_all_button_style(self):
133
- """Get style for tool dialog all button."""
134
- return self.theme_class.TOOL_DIALOG_ALL_BUTTON
89
+ return self._get_attr("TOOL_DIALOG_ALL_BUTTON")
135
90
 
136
91
  def get_tool_dialog_no_button_style(self):
137
- """Get style for tool dialog no button."""
138
- return self.theme_class.TOOL_DIALOG_NO_BUTTON
92
+ return self._get_attr("TOOL_DIALOG_NO_BUTTON")
139
93
 
140
94
  def get_system_message_label_style(self):
141
- """Get style for system message labels."""
142
- return self.theme_class.SYSTEM_MESSAGE_LABEL
95
+ return self._get_attr("SYSTEM_MESSAGE_LABEL")
143
96
 
144
97
  def get_system_message_toggle_style(self):
145
- """Get style for system message toggle buttons."""
146
- return self.theme_class.SYSTEM_MESSAGE_TOGGLE
98
+ return self._get_attr("SYSTEM_MESSAGE_TOGGLE")
147
99
 
148
100
  def get_sidebar_style(self):
149
- """Get style for sidebar widgets."""
150
- return self.theme_class.SIDEBAR
101
+ return self._get_attr("SIDEBAR")
151
102
 
152
103
  def get_conversation_list_style(self):
153
- """Get style for conversation list."""
154
- return self.theme_class.CONVERSATION_LIST
104
+ return self._get_attr("CONVERSATION_LIST")
155
105
 
156
106
  def get_search_box_style(self):
157
- """Get style for search boxes."""
158
- return self.theme_class.SEARCH_BOX
107
+ return self._get_attr("SEARCH_BOX")
159
108
 
160
109
  def get_token_usage_style(self):
161
- """Get style for token usage widgets."""
162
- return self.theme_class.TOKEN_USAGE
110
+ return self._get_attr("TOKEN_USAGE")
163
111
 
164
112
  def get_token_usage_widget_style(self):
165
- """Get style for token usage widget background."""
166
- return self.theme_class.TOKEN_USAGE_WIDGET
113
+ return self._get_attr("TOKEN_USAGE_WIDGET")
167
114
 
168
115
  def get_context_menu_style(self):
169
- """Get style for context menus."""
170
- return self.theme_class.CONTEXT_MENU
116
+ return self._get_attr("CONTEXT_MENU")
171
117
 
172
118
  def get_agent_menu_style(self):
173
- """Get style for agent menus."""
174
- return self.theme_class.AGENT_MENU
119
+ return self._get_attr("AGENT_MENU")
175
120
 
176
121
  def get_user_bubble_style(self):
177
- """Get style for user message bubbles."""
178
- return self.theme_class.USER_BUBBLE
122
+ return self._get_attr("USER_BUBBLE")
179
123
 
180
124
  def get_assistant_bubble_style(self):
181
- """Get style for assistant message bubbles."""
182
- return self.theme_class.ASSISTANT_BUBBLE
125
+ return self._get_attr("ASSISTANT_BUBBLE")
183
126
 
184
127
  def get_thinking_bubble_style(self):
185
- """Get style for thinking message bubbles."""
186
- return self.theme_class.THINKING_BUBBLE
128
+ return self._get_attr("THINKING_BUBBLE")
187
129
 
188
130
  def get_consolidated_bubble_style(self):
189
- """Get style for consolidated message bubbles."""
190
- return self.theme_class.CONSOLIDATED_BUBBLE
131
+ return self._get_attr("CONSOLIDATED_BUBBLE")
191
132
 
192
133
  def get_splitter_style(self):
193
- return self.theme_class.SPLITTER_COLOR
134
+ return self._get_attr("SPLITTER_COLOR")
194
135
 
195
136
  def get_code_color_style(self):
196
- return self.theme_class.CODE_CSS
137
+ return self._get_attr("CODE_CSS")
197
138
 
198
139
  def get_rollback_button_style(self):
199
- """Get style for rollback buttons."""
200
- return self.theme_class.ROLLBACK_BUTTON
140
+ return self._get_attr("ROLLBACK_BUTTON")
201
141
 
202
142
  def get_consolidated_button_style(self):
203
- """Get style for consolidated buttons."""
204
- return self.theme_class.CONSOLIDATED_BUTTON
143
+ return self._get_attr("CONSOLIDATED_BUTTON")
205
144
 
206
145
  def get_unconsolidate_button_style(self):
207
- """Get style for unconsolidate buttons."""
208
- return self.theme_class.UNCONSOLIDATE_BUTTON
146
+ return self._get_attr("UNCONSOLIDATE_BUTTON")
209
147
 
210
148
  def get_user_message_label_style(self):
211
- """Get style for user message labels."""
212
- return self.theme_class.USER_MESSAGE_LABEL
149
+ return self._get_attr("USER_MESSAGE_LABEL")
213
150
 
214
151
  def get_assistant_message_label_style(self):
215
- """Get style for assistant message labels."""
216
- return self.theme_class.ASSISTANT_MESSAGE_LABEL
152
+ return self._get_attr("ASSISTANT_MESSAGE_LABEL")
217
153
 
218
154
  def get_thinking_message_label_style(self):
219
- """Get style for thinking message labels."""
220
- return self.theme_class.THINKING_MESSAGE_LABEL
155
+ return self._get_attr("THINKING_MESSAGE_LABEL")
221
156
 
222
157
  def get_user_sender_label_style(self):
223
- """Get style for user sender labels."""
224
- return self.theme_class.USER_SENDER_LABEL
158
+ return self._get_attr("USER_SENDER_LABEL")
225
159
 
226
160
  def get_assistant_sender_label_style(self):
227
- """Get style for assistant sender labels."""
228
- return self.theme_class.ASSISTANT_SENDER_LABEL
161
+ return self._get_attr("ASSISTANT_SENDER_LABEL")
229
162
 
230
163
  def get_thinking_sender_label_style(self):
231
- """Get style for thinking sender labels."""
232
- return self.theme_class.THINKING_SENDER_LABEL
164
+ return self._get_attr("THINKING_SENDER_LABEL")
233
165
 
234
166
  def get_metadata_header_label_style(self):
235
- """Get style for metadata header labels."""
236
- return self.theme_class.METADATA_HEADER_LABEL
167
+ return self._get_attr("METADATA_HEADER_LABEL")
237
168
 
238
169
  def get_user_file_name_label_style(self):
239
- """Get style for user file name labels."""
240
- return self.theme_class.USER_FILE_NAME_LABEL
170
+ return self._get_attr("USER_FILE_NAME_LABEL")
241
171
 
242
172
  def get_assistant_file_name_label_style(self):
243
- """Get style for assistant file name labels."""
244
- return self.theme_class.ASSISTANT_FILE_NAME_LABEL
173
+ return self._get_attr("ASSISTANT_FILE_NAME_LABEL")
245
174
 
246
175
  def get_user_file_info_label_style(self):
247
- """Get style for user file info labels."""
248
- return self.theme_class.USER_FILE_INFO_LABEL
176
+ return self._get_attr("USER_FILE_INFO_LABEL")
249
177
 
250
178
  def get_assistant_file_info_label_style(self):
251
- """Get style for assistant file info labels."""
252
- return self.theme_class.ASSISTANT_FILE_INFO_LABEL
179
+ return self._get_attr("ASSISTANT_FILE_INFO_LABEL")
253
180
 
254
181
  def get_api_keys_group_style(self):
255
- """Get style for API keys group boxes."""
256
- return self.theme_class.API_KEYS_GROUP
182
+ return self._get_attr("API_KEYS_GROUP")
257
183
 
258
184
  def get_editor_container_widget_style(self):
259
- """Get style for editor container widgets."""
260
- return self.theme_class.EDITOR_CONTAINER_WIDGET
185
+ return self._get_attr("EDITOR_CONTAINER_WIDGET")
261
186
 
262
187
  def get_combo_box_style(self):
263
- """Get style for combo boxes."""
264
- return self.theme_class.COMBO_BOX
188
+ return self._get_attr("COMBO_BOX")
265
189
 
266
190
  def get_checkbox_style(self):
267
- """Get style for checkboxes with enhanced tristate support."""
268
- return getattr(self.theme_class, "CHECKBOX_STYLE", "")
191
+ return self._get_attr("CHECKBOX_STYLE", "")
269
192
 
270
193
  def get_tool_widget_style(self):
271
- """Get style for tool widgets."""
272
- return (
273
- self.theme_class.TOOL_WIDGET
274
- if hasattr(self.theme_class, "TOOL_WIDGET")
275
- else ""
276
- )
194
+ return self._get_attr("TOOL_WIDGET", "")
277
195
 
278
196
  def get_tool_card_style(self):
279
- """Get style for tool widget cards."""
280
- return (
281
- self.theme_class.TOOL_CARD if hasattr(self.theme_class, "TOOL_CARD") else ""
282
- )
197
+ return self._get_attr("TOOL_CARD", "")
283
198
 
284
199
  def get_tool_card_error_style(self):
285
- """Get style for tool widget cards in error state."""
286
- return (
287
- self.theme_class.TOOL_CARD_ERROR
288
- if hasattr(self.theme_class, "TOOL_CARD_ERROR")
289
- else ""
290
- )
200
+ return self._get_attr("TOOL_CARD_ERROR", "")
291
201
 
292
202
  def get_tool_header_style(self):
293
- """Get style for tool widget headers."""
294
- return (
295
- self.theme_class.TOOL_HEADER
296
- if hasattr(self.theme_class, "TOOL_HEADER")
297
- else ""
298
- )
203
+ return self._get_attr("TOOL_HEADER", "")
299
204
 
300
205
  def get_tool_toggle_button_style(self):
301
- """Get style for tool widget toggle buttons."""
302
- return (
303
- self.theme_class.TOOL_TOGGLE_BUTTON
304
- if hasattr(self.theme_class, "TOOL_TOGGLE_BUTTON")
305
- else ""
306
- )
206
+ return self._get_attr("TOOL_TOGGLE_BUTTON", "")
307
207
 
308
208
  def get_tool_status_style(self):
309
- """Get style for tool widget status indicators."""
310
- return (
311
- self.theme_class.TOOL_STATUS
312
- if hasattr(self.theme_class, "TOOL_STATUS")
313
- else ""
314
- )
209
+ return self._get_attr("TOOL_STATUS", "")
315
210
 
316
211
  def get_tool_content_style(self):
317
- """Get style for tool widget content."""
318
- return (
319
- self.theme_class.TOOL_CONTENT
320
- if hasattr(self.theme_class, "TOOL_CONTENT")
321
- else ""
322
- )
212
+ return self._get_attr("TOOL_CONTENT", "")
323
213
 
324
214
  def get_tool_progress_style(self):
325
- """Get style for tool widget progress bars."""
326
- return (
327
- self.theme_class.TOOL_PROGRESS
328
- if hasattr(self.theme_class, "TOOL_PROGRESS")
329
- else ""
330
- )
215
+ return self._get_attr("TOOL_PROGRESS", "")
331
216
 
332
217
  def get_tool_separator_style(self):
333
- """Get style for tool widget separators."""
334
- return (
335
- self.theme_class.TOOL_SEPARATOR
336
- if hasattr(self.theme_class, "TOOL_SEPARATOR")
337
- else ""
338
- )
218
+ return self._get_attr("TOOL_SEPARATOR", "")
339
219
 
340
220
  def get_tool_icon(self, tool_name):
341
- """Get icon for a specific tool."""
342
- icons = getattr(self.theme_class, "TOOL_ICONS", {})
343
- return icons.get(tool_name, icons.get("default", "🔧"))
221
+ return self.theme_class.get_icon(tool_name, "\U0001f527")
344
222
 
345
223
  def get_json_editor_colors(self):
346
- """Get color scheme for JSON editor from current theme."""
347
224
  return self.theme_class.JSON_EDITOR_COLORS
348
225
 
349
226
  def get_json_editor_style(self):
350
- """Get complete stylesheet for JSON editor."""
351
227
  return self.theme_class.JSON_EDITOR_STYLE
352
228
 
353
229
  def get_markdown_editor_colors(self):
354
- """Get color scheme for Markdown editor from current theme."""
355
- return getattr(
356
- self.theme_class,
357
- "MARKDOWN_EDITOR_COLORS",
358
- {
359
- "background": "#313244",
360
- "text": "#cdd6f4",
361
- "border": "#45475a",
362
- "header": "#89b4fa",
363
- "bold": "#fab387",
364
- "italic": "#a6e3a1",
365
- "code": "#f5c2e7",
366
- "code_background": "#45475a",
367
- "link": "#74c7ec",
368
- "image": "#cba6f7",
369
- "list": "#f9e2af",
370
- "blockquote": "#94e2d5",
371
- "hr": "#6c7086",
372
- "strikethrough": "#eba0ac",
373
- "error": "#f38ba8",
374
- },
375
- )
230
+ return self.theme_class.MARKDOWN_EDITOR_COLORS
376
231
 
377
232
  def get_markdown_editor_style(self):
378
- """Get complete stylesheet for Markdown editor."""
379
- return getattr(
380
- self.theme_class,
381
- "MARKDOWN_EDITOR_STYLE",
382
- """
383
- QPlainTextEdit {
384
- background-color: #313244;
385
- color: #cdd6f4;
386
- border: 1px solid #45475a;
387
- border-radius: 4px;
388
- padding: 8px;
389
- font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
390
- font-size: 12px;
391
- line-height: 1.4;
392
- }
393
- QPlainTextEdit:focus {
394
- border: 1px solid #89b4fa;
395
- }
396
- """,
397
- )
233
+ return self.theme_class.MARKDOWN_EDITOR_STYLE
398
234
 
399
235
  def get_diff_colors(self):
400
- """Get color scheme for diff widget from current theme."""
401
- return getattr(
402
- self.theme_class,
403
- "DIFF_COLORS",
404
- {
405
- "background": "#1e1e2e",
406
- "panel_bg": "#313244",
407
- "header_bg": "#45475a",
408
- "header_text": "#cdd6f4",
409
- "line_number_bg": "#181825",
410
- "line_number_text": "#6c7086",
411
- "removed_bg": "#3b2d33",
412
- "removed_text": "#f38ba8",
413
- "removed_highlight": "#f38ba8",
414
- "added_bg": "#2d3b33",
415
- "added_text": "#a6e3a1",
416
- "added_highlight": "#a6e3a1",
417
- "unchanged_text": "#6c7086",
418
- "border": "#45475a",
419
- "block_header_bg": "#585b70",
420
- "block_header_text": "#b4befe",
421
- },
422
- )
236
+ return self.theme_class.DIFF_COLORS