diff --git a/packages/host/app/components/ai-assistant/panel.gts b/packages/host/app/components/ai-assistant/panel.gts index d5175746de..cd976da5b5 100644 --- a/packages/host/app/components/ai-assistant/panel.gts +++ b/packages/host/app/components/ai-assistant/panel.gts @@ -188,11 +188,14 @@ export default class AiAssistantPanel extends Component { {{else if this.isReady}} {{! below if statement is covered in 'isReady' check above but added due to glint not realizing it }} - {{#if this.matrixService.currentRoomId}} - + {{#if this.roomResource}} + {{#if this.matrixService.currentRoomId}} + + {{/if}} {{/if}} {{else}} { class='room' data-room-settled={{this.doWhenRoomChanges.isIdle}} data-test-room-settled={{this.doWhenRoomChanges.isIdle}} - data-test-room-name={{this.roomResource.name}} + data-test-room-name={{@roomResource.name}} data-test-room={{@roomId}} > { @filesToAttach={{this.filesToAttach}} /> @@ -215,11 +216,6 @@ export default class Room extends Component { @service private declare operatorModeStateService: OperatorModeStateService; @service private declare loaderService: LoaderService; - private roomResource = getRoom( - this, - () => this.args.roomId, - () => this.matrixService.getRoomData(this.args.roomId)?.events, - ); private autoAttachmentResource = getAutoAttachment( this, () => this.topMostStackItems, @@ -515,25 +511,25 @@ export default class Room extends Component { }; private isDisplayingCode = (message: Message) => { - return this.roomResource?.isDisplayingCode(message); + return this.args.roomResource.isDisplayingCode(message); }; private toggleViewCode = (message: Message) => { - this.roomResource.toggleViewCode(message); + this.args.roomResource.toggleViewCode(message); }; private doMatrixEventFlush = restartableTask(async () => { await this.matrixService.flushMembership; await this.matrixService.flushTimeline; - await this.roomResource.loading; + await this.args.roomResource.loading; }); private get messages() { - return this.roomResource.messages; + return this.args.roomResource.messages; } private get skills(): Skill[] { - return this.roomResource.skills; + return this.args.roomResource.skills; } private get supportedLLMs(): string[] { @@ -551,7 +547,7 @@ export default class Room extends Component { } private get room() { - let room = this.roomResource.matrixRoom; + let room = this.args.roomResource.matrixRoom; return room; }