Skip to content

Commit 643f5a5

Browse files
committed
refactor: relocate compaction module into frameworks package
Move the compaction strategies alongside the react framework they serve: - mellea/stdlib/compaction.py -> mellea/stdlib/frameworks/react_compaction.py - test/stdlib/test_compaction.py -> test/stdlib/frameworks/test_react_compaction.py Imports and module docstrings updated accordingly. Assisted-by: Claude Code Signed-off-by: Yousef El-Kurdi <yelkurdi@gmail.com>
1 parent ca7bea1 commit 643f5a5

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

mellea/stdlib/frameworks/react.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from mellea.stdlib import functional as mfuncs
1616

1717
# from mellea.stdlib.components.docs.document import Document
18-
from mellea.stdlib.compaction import CompactionStrategy
18+
from mellea.stdlib.frameworks.react_compaction import CompactionStrategy
1919
from mellea.stdlib.components.chat import ToolMessage
2020
from mellea.stdlib.components.react import (
2121
MELLEA_FINALIZER_TOOL,

mellea/stdlib/compaction.py renamed to mellea/stdlib/frameworks/react_compaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
Example::
1616
17-
from mellea.stdlib.compaction import KeepLastN
17+
from mellea.stdlib.frameworks.react_compaction import KeepLastN
1818
from mellea.stdlib.frameworks.react import react
1919
2020
# Compact once the most recent model call reports > 8000 prompt+completion tokens.

test/stdlib/test_compaction.py renamed to test/stdlib/frameworks/test_react_compaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Unit and integration tests for mellea.stdlib.compaction."""
1+
"""Unit and integration tests for mellea.stdlib.frameworks.react_compaction."""
22

33
from collections.abc import Sequence
44
from dataclasses import dataclass
@@ -16,7 +16,7 @@
1616
ModelOutputThunk,
1717
ModelToolCall,
1818
)
19-
from mellea.stdlib.compaction import (
19+
from mellea.stdlib.frameworks.react_compaction import (
2020
ClearAll,
2121
KeepLastN,
2222
LLMSummarize,

0 commit comments

Comments
 (0)