Repository navigation
Make replies faster by cutting agent round-trips - #32
Merged
Merged
Conversation
A CRLF entrypoint.sh checked out on Windows stops the container from starting.
The container runs from /app but the volume is mounted at /data, so the scripts and the host were reading and writing two different data folders. /app/data now links to /data/data and the scripts find data/ from their own location instead of the current directory.
Reading recent sessions with their sets used to take one call per page. get-page-blocks takes several page ids at once and query-recent can return the page bodies along with the rows.
Saves setting the page icon by hand in Notion. --icon overrides it.
sync-dashboard took 9 to 17 seconds inside the agent's turn. The host now runs it in the background once the reply is sent, whenever the run logged rows. HOST_DASHBOARD_SYNC=false hands the job back to the agent.
Messages from the same chat now run in order, and ones that pile up behind a running turn are merged into the next one. Scheduled reminders use the same queue. Runs longer than about 9 seconds post a short status message that is edited as work moves on and removed when the reply lands (PROGRESS_UPDATES=false turns it off).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Replies that touch Notion were taking 45 to 170 seconds. Looking at real session transcripts, the time goes on model round-trips (about 4 seconds each, 8 to 40 per reply), not on infrastructure. This cuts the number of round-trips and stops the user waiting on work that can happen after the reply.
What changed
/appbut the volume is mounted at/data, so the helper scripts and the host were using two differentdata/folders./app/datanow links to/data/data, and the scripts finddata/from their own location rather than the current directory. The run log now actually persists, so/statsworks in production.get-page-blocksandquery-recent --with-blocks. Reading recent sessions with their sets and loads is now one call instead of one per page.sync-dashboardtook 9 to 17 seconds inside the agent's turn. The host now runs it in the background once the reply is sent, whenever the run logged rows.HOST_DASHBOARD_SYNC=falserestores the old behaviour.PROGRESS_UPDATES=falseturns it off.--icon..gitattributespins*.shto LF so a Windows checkout cannot breakentrypoint.sh.Testing
npm run build,npm run typecheckpass;npm testpasses (174 tests)./app/datalink on a real bucket mount, and live Notion and Telegram calls.Notes