-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP Updating command results to a) always be a CardDef or undefined, …
…b) added as a card to the room, and c) references by eventID in the reaction event created once a command runs aibot will need to be updated to read from this Message model and room-message will need to updated to display the result card
- Loading branch information
Showing
11 changed files
with
318 additions
and
219 deletions.
There are no files selected for viewing
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,27 @@ | ||
import { inject as service } from '@ember/service'; | ||
|
||
import { GetBoxelUIStateResult } from 'https://cardstack.com/base/command'; | ||
|
||
import HostBaseCommand from '../lib/host-base-command'; | ||
|
||
import type OperatorModeStateService from '../services/operator-mode-state-service'; | ||
|
||
export default class GetBoxelUIStateCommand extends HostBaseCommand< | ||
undefined, | ||
GetBoxelUIStateResult | ||
> { | ||
@service declare operatorModeStateService: OperatorModeStateService; | ||
static displayName = 'GetBoxelUIStateCommand'; | ||
description = | ||
'Get information about the current state of the Boxel UI, including the current submode, what cards are open, and what room, if any, the AI assistant is showing.'; | ||
async getInputType() { | ||
return undefined; | ||
} | ||
protected async run() { | ||
let commandModule = await this.loadCommandModule(); | ||
const { GetBoxelUIStateResult } = commandModule; | ||
return new GetBoxelUIStateResult({ | ||
submode: this.operatorModeStateService.state.submode, | ||
}); | ||
} | ||
} |
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
Oops, something went wrong.