Skip to content

Commit 683f119

Browse files
committed
feat(events): rename edit_start to edit_started and add StepDeletedEvent
- Renamed EditStartedEvent.name from "edit_start" to "edit_started" for consistency - Added new StepDeletedEvent class to track step deletion events with metadata - Updated TASK_VERSION to reflect schema changes
1 parent 2a2e5e7 commit 683f119

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

aipyapp/aipy/events.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class ExecCompletedEvent(BaseEvent):
234234

235235
class EditStartedEvent(BaseEvent):
236236
"""Event fired when code editing starts"""
237-
name: Literal["edit_start"] = "edit_start"
237+
name: Literal["edit_started"] = "edit_started"
238238
block_name: str = Field(..., title="Block Name", description="Name of the code block being edited")
239239
old: str = Field(..., title="Old", description="Old code string")
240240
new: str = Field(..., title="New", description="New code string")
@@ -310,6 +310,14 @@ class UploadResultEvent(BaseEvent):
310310
status_code: int = Field(..., title="Status Code", description="HTTP status code of the upload")
311311
url: Optional[str] = Field(None, title="URL", description="URL of the uploaded content")
312312

313+
class StepDeletedEvent(BaseEvent):
314+
"""Event fired when a step is deleted"""
315+
name: Literal["step_deleted"] = "step_deleted"
316+
step_index: int = Field(..., title="Step Index", description="Index of the deleted step")
317+
step_info: str = Field(..., title="Step Info", description="Information about the deleted step")
318+
cleaned_messages: int = Field(..., title="Cleaned Messages", description="Number of messages cleaned up")
319+
tokens_saved: int = Field(..., title="Tokens Saved", description="Number of tokens saved by deletion")
320+
313321
class StepCleanupCompletedEvent(BaseEvent):
314322
"""Event fired when step cleanup completes"""
315323
name: Literal["step_cleanup_completed"] = "step_cleanup_completed"

aipyapp/aipy/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from .taskmgr import TaskManager
3737

3838
MAX_ROUNDS = 16
39-
TASK_VERSION = 20250818
39+
TASK_VERSION = 20251127
4040

4141
CONSOLE_WHITE_HTML = read_text(__respkg__, "console_white.html")
4242
CONSOLE_CODE_HTML = read_text(__respkg__, "console_code.html")

0 commit comments

Comments
 (0)