Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
121 additions
and
113 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
1 change: 1 addition & 0 deletions
1
...es/app/client/src/ui/shell/explorer/notificationsExplorer/notificationsExplorer.scss.d.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// This is a generated file. Changes are likely to result in being overwritten | ||
export const notificationsExplorer: string; | ||
export const clearAllNotificationsBtn: string; | ||
export const noNotificationsMsg: string; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { readFileSync } from './readFileSync'; | ||
import { CommandService } from '@bfemulator/sdk-shared'; | ||
import * as path from 'path'; | ||
import { SharedConstants } from '@bfemulator/app-shared'; | ||
|
||
export async function openFileFromCommandLine(fileToBeOpened: string, commandService: CommandService): Promise<void> { | ||
const { Bot, Emulator } = SharedConstants.Commands; | ||
if (path.extname(fileToBeOpened) === '.bot') { | ||
try { | ||
|
||
const bot = await commandService.call(Bot.Open, fileToBeOpened); | ||
await commandService.call(Bot.SetActive, bot); | ||
await commandService.remoteCall(Bot.Load, bot); | ||
} catch (e) { | ||
throw new Error(`Error while trying to open a .bot file via double click at: ${fileToBeOpened}`); | ||
} | ||
} else if (path.extname(fileToBeOpened) === '.transcript') { | ||
const transcript = readFileSync(fileToBeOpened); | ||
const conversationActivities = JSON.parse(transcript); | ||
if (!Array.isArray(conversationActivities)) { | ||
throw new Error('Invalid transcript file contents; should be an array of conversation activities.'); | ||
} | ||
|
||
// open a transcript on the client side and pass in | ||
// some extra info to differentiate it from a transcript on disk | ||
await commandService.remoteCall(Emulator.OpenTranscript, 'deepLinkedTranscript', { | ||
activities: conversationActivities, | ||
inMemory: true | ||
}); | ||
} | ||
} |
This file contains 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
Oops, something went wrong.