BotFramework-WebChat
AGENTS.md1.8k starsChanged 6 months agoMITView on GitHub
Trending
Quiet this year.about the whole repository
Who's talking about microsoft/BotFramework-WebChat
- microsoft/BotFramework-Services“[Tracking] Add support for deleteActivity and updateActivity”GitHub · Nov 21, 2018 · 13 reactions
- microsoft/BotFramework-DirectLineJS“Resume conversation”GitHub · Mar 1, 2017 · 7 reactions
- microsoft/BotFramework-Services“[Waiting for Adaptive Card fix] Part of the content of Adaptive Card is lost while sending through Direct …”GitHub · May 21, 2020 · 2 reactions
- microsoft/BotFramework-Emulator“Remove styling for download icon”GitHub · Jan 30, 2020 · 2 reactions
- microsoft/AdaptiveCards“Accessibility Issue Adaptive Card - Buttons with identical accessible names”GitHub · Nov 7, 2022 · 1 reactions
The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 34
Talked about on GitHub (34 times).
On GitHub · 34
- Nov 21, 2018[Tracking] Add support for deleteActivity and updateActivity — microsoft/BotFramework-Services13 reactions · 36 comments
- Mar 1, 2017Resume conversation — microsoft/BotFramework-DirectLineJS7 reactions · 40 comments
- May 21, 2020[Waiting for Adaptive Card fix] Part of the content of Adaptive Card is lost while sending through Direct Line channel — microsoft/BotFramework-Services2 reactions · 4 comments
- Jan 30, 2020Remove styling for download icon — microsoft/BotFramework-Emulator2 reactions
- Nov 7, 2022Accessibility Issue Adaptive Card - Buttons with identical accessible names — microsoft/AdaptiveCards1 reaction · 5 comments
29 more on GitHub
- Jan 8, 2020Modify WebChat implementation to support connecting to a Direct Line Speech bot remotely — microsoft/BotFramework-Emulator1 reaction
- Sep 21, 2019Bot timeout on conversationUpdate request should result in 502 instead of 401 — microsoft/BotFramework-Services1 reaction · 2 comments
- Jul 16, 2019Number Input default value undefined when value is set to zero — microsoft/AdaptiveCards1 reaction · 5 comments
- Apr 16, 2019Send conversationUpdate for a user when they've sent their first message. — microsoft/BotFramework-Emulator1 reaction · 1 comment
- Dec 21, 2018Request: Adding aria-label (speak property) to Input.Date? — microsoft/AdaptiveCards1 reaction · 3 comments
- Dec 14, 2018Reading 'Group' between the text boxes while navigating in scan mode. — microsoft/AdaptiveCards1 reaction · 2 comments
- May 23, 2018$activity stream stops after connectionStatus$ emits 'ExpiredToken'. — microsoft/BotFramework-DirectLineJS1 reaction · 9 comments
- Aug 4, 2017Allow text wrapping on Action buttons when layout is vertical — microsoft/AdaptiveCards1 reaction · 8 comments
- Nov 11, 2024[Snyk] Upgrade botframework-webchat from 4.17.0 to 4.18.0 — DevangPatelUK/BotFramework-WebChat0 reactions
- Nov 11, 2024[Snyk] Upgrade botframework-webchat from 4.17.0 to 4.18.0 — DevangPatelUK/BotFramework-WebChat0 reactions
- Nov 9, 2024[Snyk] Upgrade botframework-webchat from 4.17.0 to 4.18.0 — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 21, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 21, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 20, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 20, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 19, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 18, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 18, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 18, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 16, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 16, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 12, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 11, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 8, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 7, 2024[Snyk] Upgrade: botframework-webchat-component, botframework-webchat — DevangPatelUK/BotFramework-WebChat0 reactions
- Sep 4, 2024Unable to upgrade botframework-webchat in SharePoint SSO Component — microsoft/CopilotStudioSamples0 reactions
- Nov 28, 2023[Snyk] Fix for 4 vulnerabilities — Ramboll/PnP0 reactions
- Jun 15, 2021Add `inputHint` to plugin response in `NLP.js` - switches on speech recognition — nfreear/survey-bot0 reactions
- Nov 6, 2020[samples/javascript_es6/01.browser-echo] Upgrade botframework-webchat to version 4.11.0 — admdev8/BotBuilder-Samples0 reactions · 5 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- packages/api/AGENTS.mdAGENTS.md
- packages/api-graph/AGENTS.mdAGENTS.md
- packages/api-middleware/AGENTS.mdAGENTS.md
- packages/base/AGENTS.mdAGENTS.md
- packages/core/AGENTS.mdAGENTS.md
- packages/core-debug-api/AGENTS.mdAGENTS.md
- packages/core-graph/AGENTS.mdAGENTS.md
- webchat-html-testsSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
35 rules. About 0 are common, 7 are distinctive, and 28 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
28
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Avoid spaghetti code: on new feature with a similar existing feature, refactor existing one before writing new feature
- Very specific: line 11
Avoid global pollution, do not modify window object
- Very specific: line 13
Use /prettierrc.yml to format
- Distinctive: line 15
Avoid one-use variable, inline them instead
- Very specific: line 19
Prefer && over if-statement if it is a oneliner
- Very specific: line 21
Prefer truthy/false check like !array.length over array.length === 0
- Very specific: line 22
Prefer numValue over valueCount for "how many values are there"
- Very specific: line 23
Prefer uppercase for acronyms instead of Pascal case, e.g.
- Very specific: line 25
Use fewer shorthands, only allow min, max, num
- Very specific: line 26
Prefer ternary operator over one-liner if statement
- Very specific: line 30
Use immutability as much as possible, add object.freeze()
- Distinctive: line 31
Follow W3C convention for API design
- Very specific: line 33
Consider IntersectionObserver-like pattern for allow userland to subscribe to live changes
- Very specific: line 39
Use TypeScript CLI instead of tsc
- Very specific: line 40
Use valibot for runtime type checker, never use zod
- Very specific: line 43
Avoid as, use valibot instead
- Very specific: line 44
If absolutely needed, use satisifes X as Y to make sure it is X before force casting to Y
- Very specific: line 45
Use as few unknown as possible
- Very specific: line 46
All optional properties must be undefined-able, i.e.
- Very specific: line 48
If need to look inside the object to check for types, use valibot
- Very specific: line 50
Use { readonly value: string } instead of Readonly<{ value: string }>
- Very specific: line 51
Use as much readonly as possible
- Very specific: line 95
Start container by docker compose -f docker-compose-wsl2.yml up --detach --scale chrome=2
- Very specific: line 96
Run curl http://localhost:4444/wd/hub/status and wait until .value.ready become true
- Very specific: line 97
Run npm test, or npm test -- --testPathPattern test-html-file.html to focus on one
- Very specific: line 98
Test files are HTML files under /__tests__/html2/, they are not JS
- Distinctive: line 99
Follow other HTML files under the same folder on how to write tests
- Very specific: line 102
Use @testduet/given-when-then package instead of xUnit style describe/before/test/after
- Distinctive: line 103
Prefer integration/end-to-end testing than unit testing
- Very specific: line 104
Use as realistic setup as possible, such as using msw than mocking calls
- Very specific: line 105
Use emulateIncomingActivity and emulateOutgoingActivity to emulate conversation
- Distinctive: line 109
Run new test and all of them must be green
- Very specific: line 110
Run npm run precommit to make sure it pass all linting process
- Very specific: line 111
Add changelog entry to CHANGELOG.md, follow our existing format
- Distinctive: line 116
All inputs SHOULD be validated
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md for Bot Framework Web Chat
Coding
General
- Unless stated otherwise, avoid Node.js
- Apply our latest coding style to every file changed
- Avoid spaghetti code: on new feature with a similar existing feature, refactor existing one before writing new feature
- This does not applies to test code
- Avoid global pollution, do not modify
windowobject - Markdown are always space-indented with 3 spaces
- Use
/prettierrc.ymlto format - Sort names in property bags
- Avoid one-use variable, inline them instead
- More new lines to separate code with different responsibilities
- Multiple lines of code that can run in random order, put them into a group, no need new line between them
- Otherwise, lines of code that depends on each other in a specific order, separate them with new line
- Prefer
&&over if-statement if it is a oneliner - Importing relative file should always include file extension
- Prefer truthy/false check like
!array.lengthoverarray.length === 0 - Prefer
numValueovervalueCountfor "how many values are there" - Prefer uppercase for acronyms instead of Pascal case, e.g.
getURL()overgetUrl()- The only exception is
id, e.g.getId()overgetID()
- The only exception is
- Use fewer shorthands, only allow
min,max,num - Prefer ternary operator over one-liner
ifstatement
Design
- Use immutability as much as possible, add
object.freeze() - Follow W3C convention for API design
- Extends
EventTargetwhen eventing is needed, do not use Node.json/off - Consider
IntersectionObserver-like pattern for allow userland to subscribe to live changes
- Extends
- Allow ESNext code that is polyfilled by
core-js-pureoriter-festpackage
Typing
- TypeScript is best-effort checking, use
valibotfor strict type checking - Use TypeScript CLI instead of
tsc - Use
valibotfor runtime type checker, never usezod- Assume all externally exported functions will receive unsafe/invalid input, always check with
valibot
- Assume all externally exported functions will receive unsafe/invalid input, always check with
- Avoid
any - Avoid
as, usevalibotinstead- If absolutely needed, use
satisifes X as Yto make sure it isXbefore force casting toY
- If absolutely needed, use
- Use as few
unknownas possible - All optional properties must be
undefined-able, i.e. usevalue?: number | undefinedovervalue?: number - For functions exported outside of current file, make sure all arguments and return value are typed
- If need to look inside the object to check for types, use
valibot- E.g.
if (obj && typeof obj === 'object' && 'value' in obj && typeof obj.value === 'string')should be replaced withis(object({ value: string }), obj)
- E.g.
- Use
{ readonly value: string }instead ofReadonly<{ value: string }> - Use as much
readonlyas possible
React template
import { reactNode, validateProps } from '@msinternal/botframework-webchat-react-valibot';
import React from 'react';
import { number, object, pipe, readonly } from 'valibot';
// Use valibot to validate props.
const MyComponentPropsSchema = pipe(
object({
children: optional(reactNode())
}),
readonly()
);
type MyComponentProps = InferInput<typeof MyComponentPropsSchema>;
// Use big function instead of arrow function.
function MyComponent(props: MyComponentProps) {
// Call `validateProps` to get a validated props.
const { children } = validateProps(MyComponentPropsSchema, props);
// Use `<>` instead of `<Fragment>`.
// Never export `children` by itself, always wrap with `<>`.
return <>{children}</>;
}
// Set `displayName`.
MyComponent.displayName = 'MyComponent';
// Export as memoized/exotic component, export as default.
export default memo(MyComponent);
// Export both schema and typing.
export { MyComponentPropsSchema, type MyComponentProps };Testing instructions
- Practice test-driven development
- Build and run Docker to host WebDriver-controlled browser instances
- Build container by
docker compose -f docker-compose-wsl2.yml build --build-arg REGISTRY=mcr.microsoft.com - Start container by
docker compose -f docker-compose-wsl2.yml up --detach --scale chrome=2
- Build container by
- Run
curl http://localhost:4444/wd/hub/statusand wait until.value.readybecometrue - Run
npm test, ornpm test -- --testPathPattern test-html-file.htmlto focus on one - Test files are HTML files under
/__tests__/html2/, they are not JS - Follow other HTML files under the same folder on how to write tests
- Page conditions, page elements, and page objects can be found at
/packages/test/page-object/src/globals - Use
expectinstead ofassert - Use
@testduet/given-when-thenpackage instead of xUnit styledescribe/before/test/after - Prefer integration/end-to-end testing than unit testing
- Use as realistic setup as possible, such as using
mswthan mocking calls - Use
emulateIncomingActivityandemulateOutgoingActivityto emulate conversation
PR instructions
- Run new test and all of them must be green
- Run
npm run precommitto make sure it pass all linting process - Add changelog entry to
CHANGELOG.md, follow our existing format
Code review
- Code should use as much immutable (via
Object.freeze()) as possible, DO NOT trustreadonly - All inputs SHOULD be validated
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

