Skip to content

Commit

Permalink
Merge pull request #32 from xpert-ai/develop
Browse files Browse the repository at this point in the history
fix: ocap dependency for chat webapp
  • Loading branch information
tiven-w authored Jan 24, 2025
2 parents a3c8098 + 5a0758a commit 7d665a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/cloud/src/app/xpert/home.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class XpertHomeService {
readonly conversationService = inject(ChatConversationService)
readonly semanticModelService = inject(SemanticModelServerService)
readonly #dsCoreService = inject(NgmDSCoreService)
readonly #wasmAgent = inject(WasmAgentService)
readonly #wasmAgent? = inject(WasmAgentService, {optional: true})
readonly #toastr = injectToastr()
readonly lang = this.appService.lang

Expand Down
2 changes: 1 addition & 1 deletion apps/cloud/src/app/xpert/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>

<div class="relative group w-full flex-1">
<div class="grow px-2 md:px-4 w-full py-2 overflow-y-auto rounded-md border border-solid border-transparent
<div class="grow h-full px-2 md:px-4 w-full py-2 overflow-y-auto rounded-md border border-solid border-transparent
group-hover:absolute group-hover:w-80 group-hover:shadow-sm left-0 top-0 z-20
bg-components-card-bg group-hover:border-divider-regular"
waIntersectionObserver
Expand Down
10 changes: 8 additions & 2 deletions apps/cloud/src/app/xpert/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MatTooltipModule } from '@angular/material/tooltip'
import { RouterModule } from '@angular/router'
import { NgmSpinComponent } from '@metad/ocap-angular/common'
import { effectAction, provideOcapCore } from '@metad/ocap-angular/core'
import { effectAction, OCAP_AGENT_TOKEN, provideOcapCore } from '@metad/ocap-angular/core'
import { WaIntersectionObserver } from '@ng-web-apis/intersection-observer'
import { TranslateModule } from '@ngx-translate/core'
import { provideMarkdown } from 'ngx-markdown'
import { switchMap, tap } from 'rxjs/operators'
import { ChatConversationService, OrderTypeEnum, routeAnimations, XpertService, injectToastr, getErrorMessage, IChatConversation } from '../../@core'
import { ChatConversationService, OrderTypeEnum, routeAnimations, XpertService, injectToastr, getErrorMessage, IChatConversation, ServerSocketAgent } from '../../@core'
import { EmojiAvatarComponent } from '../../@shared/avatar/'
import { ChatAppService } from '../chat-app.service'
import { ChatInputComponent } from '../chat-input/chat-input.component'
Expand Down Expand Up @@ -50,6 +50,12 @@ import { XpertHomeService } from '../home.service'
animations: [routeAnimations],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [
ServerSocketAgent,
{
provide: OCAP_AGENT_TOKEN,
useExisting: ServerSocketAgent,
multi: true
},
provideMarkdown({}),
provideOcapCore(),
XpertHomeService,
Expand Down

0 comments on commit 7d665a4

Please sign in to comment.