Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
Srinaath Ravichandran 7829dbd1f8
V4.10.0 (#2180)
* Webchat Upgrade and Version number change

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* Handle change to middleware (#2177)

* Handle change to middleware

* Updated babel preset env

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* Reverted change to babel

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

Locks updated to pre webchat change

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

Post wechat check

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

Prevent hoisting bf-chatdown

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* Updated babel preset env

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* fix: Webchat socket instantiation delay (#2179)

* Updated websocket server code to backup messages if it is not connected
* Refactored more occurances of socket send
* Renaming variables
* Added unit test to make sure backedup messages are cleared before connection starts
* Lint fix

* Updated release date

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* All tests working

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

Co-authored-by: Srinaath Ravichandran <srravich@microsoft.com>
2020-08-31 08:55:29 -07:00
Tony Anziano e3ea45b393 Rewrote emulator/core package & moved to app/main. (#1989) 2019-11-18 14:15:38 -08:00
Tony Anziano daa8f6b80c Added several e2e tests from the release checklist. 2019-09-05 12:10:35 -07:00
Justin Wilaby 2247b4784e #1565 Bot State and Bot State Diff Pagination (#1658)
* Intitial commit for bot state diffing

* Transfered the bf-extension buttons from the botState to the json extension

* Progress on extension bot state diffing

* Lint

* Highlighting and pagination

* Fixed accessory button styling.

* Completed major work

* removed botState extension

* Unit tests

* added missing unit test

* Lint fixes

* Removed unused extension

* Removed commented code

* Removed unneeded code
2019-07-02 15:29:13 -07:00
Justin Wilaby a1fa135f1e
Emulator Launch, Commands and Extension Tech Debt Buydown (#1577)
* Tech debt buydown
2019-05-23 16:08:18 -07:00
Justin Wilaby ce2b78357a Sidecar debugging - Milestone 0.9 (#1400)
* Middleware and Emulator config for auto-connecting bot

* Changed Connector API to use X headers for bot related info

* 1. Completed 'sidecard' debug mode\n2. Added renderers for trace activities so webchat displays them\n3. Added a dendrogram json viewer

* Added the new 'Bot State Visualizer' extension and wired it up

* Completed diffing for bot state objects

* Updated unit tests

* Added unit tests - lint fixes

* Rebase adjustments

* Integrated 'deep-diff' library

* Added switching between Graph and Json views

* Corrected errant inport

* Moved the valueType for the bot state to a const

* Simplified the chat panel. Fixed #1387

* Updated selection of messages in WebChat when trace activities are rendered

* Cured divergent schemas and aligned with the botbuilder-schema package

* Updated errant import from rebase

* Added inspecable log items for the nested activities that come with the traces

* Mapped highlighing in the log to either traces or nested activities within the trace

* Lint fixes

* Build fix

* Applied color treatment to json viewer for bot state diffing

* Update packages/emulator/core/src/facility/conversationSet.ts

Co-Authored-By: justinwilaby <juwilaby@microsoft.com>

* fixed #1285. Fixed #825. Added collapsed service pane when in debug mode

* Unit test remediation

* Unit test fixes

* Unit test corection

* Updated code to fix breaking changes when moving to electron 4

* Attempt to fix unit tests run on the build server

* Fixed issue where conversation restart was using a new port every time. (#1434)

* Fixed issue where conversation update was not being sent when opening a livechat via url. (#1436)

* Remove showInInspector from the JSON object before sending it to the JSON inspector (#1437)

* Drill livechat mode (#1438)

* Allows injection of Conversation "mode" to support conversations started via connecting by url.

* Clean up the types

* Fix a test

* Save transcript fix (#1440)

* Changes to support saving a transcript for a conversation opened via url

* add tests for getTranscriptsPath

* Lint issue

* Add some additional typings

* Lint fixes

* Disabled the restart conversation button when in sidecard debug mode
2019-04-22 14:50:49 -07:00
Justin Wilaby 1c231393a0 Bumped lerna 2018-09-25 15:01:53 -07:00
William Wong f78d474596
Merge production Web Chat (#623)
* Remove store
* Hardcode channel account ID
* Hide background tabs
* Remove custom packages
2018-05-31 14:45:57 -07:00
Justin Wilaby 374b98f331 Linting issues 2018-05-25 12:29:20 -07:00
Mike Bennett 1e82b9378a Merged PR 4801: QnAMaker Extension groundwork
QnAMaker extension that allows you to add new question and answer pairs to a knowledge base. Still a lot of work to be done.
2018-04-25 18:12:02 +00:00
Eric Anderson 40430bcecd Merged PR 4722: remove custom-ngrok package
Turns out we didn't need it.
2018-04-19 23:39:46 +00:00
William Wong 2fc13de874 Merged PR 4535: Emulator core and CLI initial commit
# How to use

Call `new Bot(...).mount(restifyServer)`. You may want to keep the `Bot` instance.

> Bring your own Restify + CORS server. We now support multi-tenant (one HTTP server to host multiple `bot.js`)

> Look at `/packages/emulator/cli/index.ts` for more usage.

# Added

## Conversation object

Call `Bot.facilities.conversations.conversationById()` to get a conversation objects for manipulation.

- Will fire events, e.g. `.emit('addactivity')`, `activitychange`, `deleteactivity`, `join`, `left`, etc
- To get transcript, call `Conversation.getTranscript()`
  - Currently, we only export transcript records marked as "activity add", we internally keep "activity remove/update", "member add/remove", "typing", etc
- We currently expose APIs on `/emulator/*` to support manipulation on conversation (e.g. payment, typing, ping), but since we now have an object model for doing the same thing, we may deprecate the REST APIs

# Changed
- Activities ACK-ed by the client will not be resent, the client need to preserve the history itself
- We moved from `got` to `node-fetch`. You can also bring your own `fetch` implementation (e.g. [`electron-fetch`](https://www.npmjs.com/package/electron-fetch) for WinINet-compatible calls)
- Because we support multi-tenant now, `ConversationManager` has been removed
- Speech token moved to `Bot.getSpeechToken()`

# Planned
- `Conversation.feedActivities()` still here, but we will deprecate it over a new interface that support step-by-step playback and automated testing
2018-04-16 07:35:37 +00:00
Eric Anderson 586264441e Merged PR 4607: A grab bag of changes
##### ChannelAccount.Role
- Added custom-botframework-directlinejs
-- Added `role` to `ChannelAccount` type
- Updated custom-botframework-webchat to respect `role`, if it is present

##### Inspect Event
- Argument to 'inspect' is now an object of type `any`

##### Inspector webview
- Fixed a bug where we weren't sending the inspect object at the right time, causing the inspector view to be empty

##### File Explorer
- Watch for directory deletions

##### Build scripts
- Added LUIS extension to the build scripts
2018-04-13 04:39:44 +00:00
Eric Anderson b0c7422cb7 Merged PR 4593: inspector support: accessory buttons and summary text in log entry
Added two new sections to bf-extension.json's "client" section:

#### Summary Text
Allows the inspector of a message to specify what summary text to display in log entries. Each entry in the array is a jsonpath query to a field in the message. First one to return something non-empty wins.
```js
"summaryText": string[]
```

#### Accessory buttons
Adds toolbar buttons to the header above the inspector view. Clicks are sent to the inspector.
```js
"accessories": [
  {
    "id": string,
    "label": string
  },
  ...
]
```

###### How to handle a click
In your inspector page, add this:
```js
window.host.on('accessory-click', id => {
  // console.log('button clicked:', id);
}
```

Notes:
* There isn't yet a way for the inspector page to disable a button. I will add that tomorrow.
* The toolbar button isn't styled yet, and only a label is shown currently. Will add support for icon later.

#### Toggle Dev Tools
I now add an accessory button to all inspectors to toggle the Chrome Dev Tools. No more need to do this from inside the page.

Related work items: #21814
2018-04-12 18:58:34 +00:00
Emad Elwany f5c5ebafd4 Merged PR 4520: WIP: LUIS Extension React App
READ READ: You'll need to run bootstrap lerna

This is very much a work in progress and will drastically change over the next few days, I just want to checkin not to diverge too much from master. The only E2E feature working now is displaying the LUIS json. You'll need the latest C# botbuilder SDK to try this e2e.

Related work items: #21805
2018-04-08 04:20:24 +00:00
Eric Anderson 80a9a185d7 Merged PR 4508: Factor UI base components into own package
READ READ: You must `lerna bootstrap` after syncing to this change.

New UI component package: `@bfemulator/ui-react`

Related work items: #22275
2018-04-06 19:14:59 +00:00
Eric Anderson c3b535f7b1 Merged PR 4488: Ability to pass an object to an inspector
READ READ: You must run **lerna bootstrap** after syncing this change.

Related work items: #21815, #21824
2018-04-04 23:05:34 +00:00
Emad Elwany 667ead50c2 Merged PR 4445: Adding a placeholder LUIS extension
Adding a placeholder LUIS extension

Related work items: #21805
2018-04-02 22:24:25 +00:00
Eric Anderson e10ffe371a Merged PR 4423: re-add a package to lerna 2018-03-29 05:27:49 +00:00
Eric Anderson e2ece1f336 Merged PR 4415: Allow client-only extensions
NOTE: You must `lerna bootstrap` after pulling this change.

Extensions can now consist of a node process and a client build as separate projects. Both are optional. See the debug extension for an example.

I've updated the bf-extension.json schema to include separate configurations for node and client parts. Here's an example:

```json
{
  "name": "My Cool Extension",
  "node": {
    "main": "main/built/index.js",
    "debug": {
      "enabled": false,
      "websocket": {
        "port": 8081
      }
    }
  },
  "client": {
    "debug": {
      "enabled": false,
      "webpack": {
        "port": 3031
      }
    },
    "portals": [],
    "filetypes": [],
    "inspectors": [
      {
        "name": "Inspect Cool Things",
        "path": "client/public/index.html"
      }
    ]
  }
}
```

Notice the "debug" sections. I've added per-extension debug configuration to let the emulator know whether this extension is being debugged and how to load it if so.

##### node.debug section
The node debug section configures which port the emulator should listen on for connections from this extension.

##### client.debug section
The client debug section configures which port the webpack dev server is running on for this extension.
2018-03-29 05:00:48 +00:00
Eric Anderson afff503827 Merged PR 4304: moving code around. added stub for debug extension.
## READ READ: You must run `lerna bootstrap` after syncing this change.
This is just some code cleanup for the most part, for future extension development. I want to get it off my plate in order to focus on getting Mac build working.
2018-03-20 22:08:02 +00:00
Eric Anderson 83d53dd14d Merged PR 4150: basic extension loading. refactored some code to sdk project
### READ READ: After syncing to this change you must update your global gulp:
```
npm install -g gulp@4.0.0
```

Be sure to also run
```
lerna bootstrap
```
2018-03-06 23:16:50 +00:00
William Wong 9712da832f Merged PR 4076: Revisit all package.json and lerna setup
# Changelog
* Put `devDependencies` to root, fixed `package-lock.json`
  * Removed unnecessary `devDependencies`
  * Please use `lerna add` from now on, don't use `npm install` or edit `package.json`
    * To add `jest` as `devDependencies` to `botframework-emulator-shared` package
    * At root, run `npm install jest --save-dev` followed by `lerna add jest --dev --scope=botframework-emulator-shared`
  * Please commit `package-lock.json` if you have any changes
    * Lerna [bug](https://github.com/lerna/lerna/pull/1290) may cause unnecessary changes in `package-lock.json`, `#master` or `@3.0.0` will fix it
    * Until their next drop, please verify/tweak your changes in `package-lock.json` before committing the file
* Bumped all dependencies to latest version
  * We are on latest `typescript@2.7.2` 🎉
  * `electron@1.8.1`
  * `restify@4.3.2` (@6 now, but their plugins architecture changed)
* Scoping internal packages with `@bfemulator` for CI/CD on our NPM feed
  * `/app/client` (`botframework-emulator-client`) is now `@bfemulator/client`
  * `/app/shared` (`botframework-emulator-shared`) is now `@bfemulator/app-shared`
* Revisited all `.gitignore` files
* Added `npm test` scripts to all `package.json`, by default, use `jest`
* Temporarily added `react-app-rewired` to mix JSX in TypeScript React app (broken since `react-scripts-ts@>2.9.0`)
  * [Tracking bug](https://github.com/wmonk/create-react-app-typescript/issues/266) at `react-scripts-ts`, their [next drop](https://github.com/wmonk/create-react-app-typescript/pull/242) should have it

# Notes
Added few TypeScript ignores because:

* Some typings are wrong (added `skipLibCheck`)
* Some typings are outdated (using `any` type)
2018-02-28 21:56:09 +00:00
Eric Anderson 7236836a80 Merged PR 3904: Refactor of shared code into own npm package
## After syncing this change, you must run `lerna bootstrap` again.

This change moves project files around in order to put shared code in its own npm package.

### Here's the new layout:
* packages/app/client <-- client project
* packages/app/main <-- electron project
* packages/app/shared <-- shared code
2018-02-13 23:31:39 +00:00
Eric Anderson 3f504dca81 Merged PR 3875: Merge eanders to main
* Add lerna.
* Add custom_botframework_webchat
* Add custom_ngrok.

After syncing this change, you must run the following commands in the root of the project:
`npm install -g lerna`
then
`lerna bootstrap`

Lerna is a tool that sets up symlinks allowing multiple packages in the same repo to refer to each other via node_modules, like they would in production.
2018-02-11 19:37:31 +00:00