Repository navigation
feat(website): run the docs chat on D1 and sessions when they're configured - #325
Merged
Merged
Conversation
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.
T10 for the docs site (F-03 task 14, the bot half). The docs chat is the first real user of the new packages.
CHATCOPS_DBD1 binding, the chat usescloudflareStorage({ d1 }), so conversations, rate limits and turn locks hold across every isolate, with 30-day retention. Without the binding, it stays in memory as today. That means this can merge before the database exists.CHATCOPS_SESSION_SECRETsecret, session tokens are on.requireSessionstays false while pre-0.6 widgets are still cached. The newsrc/pages/api/chat/session.tsroute serves/api/chat/session.@chatcops/store-cloudflarefrom the workspace, so it does not wait for the npm publish.cloudflare:workersgets a small type declaration for the oneenvthe page reads.Two things need the maintainer: creating the D1 database, after which a one-line
d1_databasesentry goes intowrangler.jsoncin a follow-up, and setting the session secret on the Worker.Checks: the website builds and typechecks, and lint is at the dev baseline. Locally,
astro devstreams a reply on/api/chatwithout the binding, and/api/chat/sessionanswers 404 with sessions off.