Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/AGENT_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ chunks. Without the feature, posts have no files and the app shows Feed as befor
### Answers to ideas

Ideas also carry `answer`: `yes` (Let's do it), `goal` (Make it a goal), `not now`
(hidden) or `none`:
(hidden) or `none`, and `answeredAt` (Unix seconds; 0 with no answer). The app lists
ideas answered `yes` under Completed on Ideas, with that time.

- **Let's do it** calls `board/accept` with the idea's `itemId` (see below), then
opens a chat with the message `Yes, go ahead with this idea: “<title>”.` The id
never goes into the chat. Apps from before `board/accept` send only the message.
sends "Let's do it!" with the idea attached as a card: a block before the message,
`[Idea (<section>): "<title>"]`, the idea's text, then `[End of idea]`. The id
never goes into the chat. Apps from before `board/accept` sent only the message
`Yes, go ahead with this idea: “<title>”.`
For them, the board's `pre_llm_call` observer marks the newest visible idea with that
title `yes`. When a visible idea with that title is already `yes`, the observer
does nothing, so a same-title twin never gets a second yes.
Expand Down
4 changes: 3 additions & 1 deletion loopdy_plugin/agent_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,9 @@ def _item(row) -> dict:
for index, file in enumerate(json.loads(row["files"]))],
"liked": row["rating"] == 1, "dismissed": bool(row["dismissed"]),
"rating": {-1: "down", 1: "up"}.get(row["rating"], "none"), "reason": row["reason"],
"read": bool(row["read"]), "answer": row["answer"] or "none", "category": row["category"],
"read": bool(row["read"]), "answer": row["answer"] or "none",
# When the person answered; 0 for none. The app shows "Started today" under Completed.
"answeredAt": int(row["answered"]) if row["answer"] else 0, "category": row["category"],
"createdAt": int(row["created"]), "updatedAt": int(row["updated"]),
}

Expand Down
3 changes: 3 additions & 0 deletions tests/test_agent_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def test_lets_do_it_by_id_marks_that_idea_even_with_a_same_title_twin(self):
with self.store._db() as db:
rows = dict(db.execute("SELECT id, answered FROM items WHERE kind='idea'").fetchall())
self.assertEqual(rows, {"older": 300, "newer": 0})
# The app shows when under Completed.
listed = {row["id"]: row["answeredAt"] for row in self.store.items(("idea",))}
self.assertEqual(listed, {"older": 300, "newer": 0})
# The chat message the app still sends must not mark the twin too.
recorder = ActivityRecorder(lambda: self.store)
recorder.observe("pre_llm_call", session_id="s1", turn_id="t1",
Expand Down
Loading