forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.component.ts
More file actions
54 lines (53 loc) · 1.63 KB
/
Copy pathapp.component.ts
File metadata and controls
54 lines (53 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { Component } from "@angular/core";
import { CommonModule } from "@angular/common";
import { HeadlessChatComponent } from "./routes/headless/headless-chat.component";
import { CustomInputChatComponent } from "./routes/custom-input/custom-input-chat.component";
import { DefaultChatComponent } from "./routes/default/default-chat.component";
import { CoPilotPortComponent } from "./routes/ukg-port/co-pilot-port.component";
@Component({
selector: "app-root",
standalone: true,
imports: [
CommonModule,
HeadlessChatComponent,
CustomInputChatComponent,
DefaultChatComponent,
CoPilotPortComponent,
],
template: `
<div
style="
height: 100vh;
width: 100vw;
margin: 0;
padding: 0;
overflow: hidden;
display: block;
"
>
<ng-container *ngIf="isHeadless">
<headless-chat></headless-chat>
</ng-container>
<ng-container *ngIf="isCustomInput">
<nextgen-custom-input-chat></nextgen-custom-input-chat>
</ng-container>
<ng-container *ngIf="!isHeadless && !isCustomInput && !isUkgPort">
<default-chat></default-chat>
</ng-container>
<ng-container *ngIf="isUkgPort">
<ukg-co-pilot-port></ukg-co-pilot-port>
</ng-container>
</div>
`,
})
export class AppComponent {
isHeadless =
typeof window !== "undefined" &&
window.location?.pathname.startsWith("/headless");
isCustomInput =
typeof window !== "undefined" &&
window.location?.pathname.startsWith("/custom-input");
isUkgPort =
typeof window !== "undefined" &&
window.location?.pathname.startsWith("/ukg-port");
}