feat: add remote URL attachment support and project editing endpoint

This commit is contained in:
2026-06-10 22:17:25 +00:00
parent 9b425b33a5
commit 3540bc8fa6
43 changed files with 1520 additions and 133 deletions
+15
View File
@@ -1686,6 +1686,18 @@ class DevPlaceBot:
self._log("Messages: read conversation")
return True
async def _spoke_last_in_thread(self) -> bool:
bubbles = self.b.page.locator(".messages-thread .message-bubble")
count = await bubbles.count()
if count == 0:
return False
try:
classes = await bubbles.nth(count - 1).get_attribute("class") or ""
except Exception as e:
logger.debug("_spoke_last_in_thread read failed: %s", e)
return False
return "mine" in classes.split()
async def _compose_message(self, reply: bool = False) -> bool:
b = self.b
box = b.page.locator(
@@ -1696,6 +1708,9 @@ class DevPlaceBot:
if await box.count() == 0:
self._log("Message: compose box not found")
return False
if await self._spoke_last_in_thread():
self._log("Message: I spoke last; waiting for a reply (dialog, not monologue)")
return False
context = ""
try:
context = (