Spaces:
Sleeping
Sleeping
Update presentation_manager.py
Browse files- presentation_manager.py +6 -5
presentation_manager.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
"""
|
| 2 |
Presentation state management for PowerPoint MCP Server
|
| 3 |
Handles presentation storage and current presentation tracking
|
| 4 |
-
|
| 5 |
"""
|
| 6 |
import uuid
|
| 7 |
from typing import Dict, Any, Optional
|
| 8 |
|
| 9 |
-
# Global state to store presentations in memory
|
| 10 |
presentations = {}
|
| 11 |
current_presentation_id = None
|
| 12 |
|
|
@@ -25,8 +25,8 @@ def set_current_presentation_id(pres_id):
|
|
| 25 |
global current_presentation_id
|
| 26 |
current_presentation_id = pres_id
|
| 27 |
|
| 28 |
-
# This class
|
| 29 |
-
# If
|
| 30 |
class PresentationManager:
|
| 31 |
"""Wrapper to handle presentation state updates."""
|
| 32 |
|
|
@@ -48,8 +48,9 @@ class PresentationManager:
|
|
| 48 |
del self.presentations[pres_id]
|
| 49 |
|
| 50 |
# If this was the current presentation, clear current
|
|
|
|
| 51 |
if current_presentation_id == pres_id:
|
| 52 |
-
|
| 53 |
|
| 54 |
return True
|
| 55 |
return False
|
|
|
|
| 1 |
"""
|
| 2 |
Presentation state management for PowerPoint MCP Server
|
| 3 |
Handles presentation storage and current presentation tracking
|
| 4 |
+
COMPLETE VERSION - compatible with existing utils/ structure
|
| 5 |
"""
|
| 6 |
import uuid
|
| 7 |
from typing import Dict, Any, Optional
|
| 8 |
|
| 9 |
+
# Global state to store presentations in memory (same as original)
|
| 10 |
presentations = {}
|
| 11 |
current_presentation_id = None
|
| 12 |
|
|
|
|
| 25 |
global current_presentation_id
|
| 26 |
current_presentation_id = pres_id
|
| 27 |
|
| 28 |
+
# This class may already exist in utils/presentation_utils.py
|
| 29 |
+
# If it does, the existing one will be used via imports
|
| 30 |
class PresentationManager:
|
| 31 |
"""Wrapper to handle presentation state updates."""
|
| 32 |
|
|
|
|
| 48 |
del self.presentations[pres_id]
|
| 49 |
|
| 50 |
# If this was the current presentation, clear current
|
| 51 |
+
global current_presentation_id
|
| 52 |
if current_presentation_id == pres_id:
|
| 53 |
+
current_presentation_id = None
|
| 54 |
|
| 55 |
return True
|
| 56 |
return False
|