fix: deduplicate identical messages in autonomous mode
feat: enable autonomous mode by default maintenance: bump version to 1.49.0
This commit is contained in:
parent
5881b66d4a
commit
ea7fadd76b
18
CHANGELOG.md
18
CHANGELOG.md
@ -1,5 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## Version 1.48.1 - 2025-11-09
|
||||
|
||||
### Fixed
|
||||
- **Duplicate Messages**: Fixed issue where identical messages were printed multiple times at the end of autonomous execution
|
||||
- Added deduplication logic in `run_autonomous_mode()` to track and skip duplicate results
|
||||
- Messages are now only printed once even if multiple autonomous iterations return the same response
|
||||
|
||||
**Changes:** 1 file, 7 lines
|
||||
**Languages:** Python (7 lines)
|
||||
|
||||
## Version 1.48.0 - 2025-11-09
|
||||
|
||||
Autonomous mode is now enabled by default, simplifying usage. Several improvements were made to background processes and thread safety, resulting in more reliable operation.
|
||||
|
||||
**Changes:** 14 files, 233 lines
|
||||
**Languages:** Markdown (24 lines), Python (207 lines), TOML (2 lines)
|
||||
|
||||
## Version 1.47.1 - 2025-11-09
|
||||
|
||||
### Fixed
|
||||
|
||||
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "rp"
|
||||
version = "1.47.1"
|
||||
version = "1.48.1"
|
||||
description = "R python edition. The ultimate autonomous AI CLI."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
@ -27,6 +27,7 @@ def sanitize_for_json(obj):
|
||||
def run_autonomous_mode(assistant, task):
|
||||
assistant.autonomous_mode = True
|
||||
assistant.autonomous_iterations = 0
|
||||
last_printed_result = None
|
||||
logger.debug("=== AUTONOMOUS MODE START ===")
|
||||
logger.debug(f"Task: {task}")
|
||||
from rp.core.knowledge_context import inject_knowledge_context
|
||||
@ -60,14 +61,17 @@ def run_autonomous_mode(assistant, task):
|
||||
logger.debug(f"Task completion check: {is_complete}")
|
||||
if is_complete:
|
||||
result = process_response_autonomous(assistant, response)
|
||||
if result != last_printed_result:
|
||||
print(f"\n{Colors.GREEN}r:{Colors.RESET} {result}\n")
|
||||
last_printed_result = result
|
||||
logger.debug(f"=== AUTONOMOUS MODE COMPLETE ===")
|
||||
logger.debug(f"Total iterations: {assistant.autonomous_iterations}")
|
||||
logger.debug(f"Final message count: {len(assistant.messages)}")
|
||||
break
|
||||
result = process_response_autonomous(assistant, response)
|
||||
if result:
|
||||
if result and result != last_printed_result:
|
||||
print(f"\n{Colors.GREEN}r:{Colors.RESET} {result}\n")
|
||||
last_printed_result = result
|
||||
time.sleep(0.5)
|
||||
except KeyboardInterrupt:
|
||||
logger.debug("Autonomous mode interrupted by user")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user