docs: add conceptual documentation for thread inputs#335
Merged
Conversation
Bump Python (2.0.0a8), TypeScript (2.0.0-alpha.8), C# (2.0.0-alpha.8), and VS Code extension packages for release including: - fix: recursive array/object JSON Schema in tool params (#332) - feat: Rust runtime parity + optional authenticationMode (#333) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When randomBytes/token_hex generates an all-digit hex nonce (e.g. '1234567890123456'), parseAttrs type coercion converts it to a number. The subsequent strict comparison (number !== string) always fails, causing a spurious 'Nonce mismatch' error. Fix: compare nonces as strings in buildMessage/build_message across Python, TypeScript, and Rust parsers. Probability of all-digit 16-char hex: (10/16)^16 ≈ 0.01% — matches the observed flaky CI failure rate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…story) Adds a new core-concepts page explaining how thread inputs work in Prompty: - What threads are and why they use nonce-based expansion - How to declare kind: thread inputs and place them in templates - Data format with multi-language examples (Python, TypeScript, C#, Rust) - Internal pipeline mechanics (render → parse → expand) - Best practices: token budgets, sliding windows, stateless design - Integration with agent mode Also adds cross-references from the file-format doc, core-concepts index, and the chat-assistant tutorial. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Adds a new core-concepts page documenting how
kind: threadinputs work for multi-turn conversation in Prompty.What's included
New page:
core-concepts/conversation-history.mdxkind: threadtoinputs{{conversation}}and why position mattersapiType: agentCross-references added
core-concepts/index.mdx— listed in Configuration sectioncore-concepts/file-format.mdx—threadkind linked to the new pagetutorials/chat-assistant.mdx— added to Next Steps card gridBuild verification
All pages build successfully. The only link validation errors are pre-existing
/reference/broken links (7 occurrences in 6 files) — unrelated to this change.