Skip to content

Commit a73dc4e

Browse files
committed
docs: say the newest page's history version is read before its messages
The handler reads the chat before the page, so a change committed in between is in the page but not in history_version. The field is a lower bound, not a snapshot of the page.
1 parent 18a1079 commit a73dc4e

5 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎coderd/apidoc/docs.go‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎codersdk/chats.go‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,9 +969,10 @@ type ChatMessagesResponse struct {
969969
// containing the page's oldest message. Omitted for after_id-only polls
970970
// and when no prompt is at or before that message.
971971
TurnStartID *int64 `json:"turn_start_id,omitempty"`
972-
// HistoryVersion is the chat's history_version for the messages in this
973-
// page. Pass it as the stream's history_version parameter. It is set only
974-
// on pages requested without before_id or after_id.
972+
// HistoryVersion is the chat's history_version, read before the messages
973+
// in this page, so the page can include changes newer than it. Pass it as
974+
// the stream's history_version parameter. It is set only on pages
975+
// requested without before_id or after_id.
975976
HistoryVersion int64 `json:"history_version,omitempty"`
976977
}
977978

‎docs/reference/api/schemas.md‎

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎site/src/api/typesGenerated.ts‎

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)