feat: add chat app example#7518
Draft
janechu wants to merge 5 commits into
Draft
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
These editor-only TypeScript LSP plugins were inherited from the todo-app template but are not required for chat-app to build or run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Makes the iframe + document.write streaming visibly progressive during manual smoke tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merge every component's <style> block into public/styles.css. - Scope each component's rules with :host(<tag>) so the same file can be loaded into multiple shadow roots without cross-component bleed. - Link the file from <head> in entry.html (render-blocking, so it loads before the rest of the HTML is processed) and from inside every declarative shadow DOM template in templates.html. - Update DESIGN.md to describe the new structure. The browser fetches the file once; each shadow root applies the cached stylesheet. Built output (www/index.html) shrinks ~70% (17.6 -> 5.5 kB) and the CSS is now cacheable across page loads. 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.
Pull Request
📖 Description
examples/chat-appworkspace that mirrors thetodo-appexample shape while using declarative FAST templates@microsoft/fast-buildfromentry.html,state.json, andtemplates.htmldocument.write()streaming for canned assistant replies, including newchat-message,chat-card, andchat-suggestioncustom elementsREADME.mdandDESIGN.md👩💻 Reviewer Notes
Hi, and watch the assistant reply stream in chunk-by-chunk.index.htmlis generated from the declarative sources bybuild-markup.mjs; if the shell changes, regenerate it withnpm run build -w @microsoft/fast-chat-app-example.📑 Test Plan
npm run buildnpm run build -w @microsoft/fast-chat-app-examplenpm run test -w @microsoft/fast-chat-app-exampleHi→ streamed reply +How are you?suggestion)npm run testcurrently hits unrelated existing Playwright failures inpackages/fast-element/src/components/hydration.pw.spec.ts(Firefox) andpackages/fast-element/src/platform.pw.spec.ts(WebKit)✅ Checklist
General
$ npm run change