-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: copilot input & insight copilot
- Loading branch information
Showing
5 changed files
with
79 additions
and
39 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
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,32 +1,36 @@ | ||
<div class="relative flex-1 w-full rounded-lg p-[2px] from-rose-400 via-fuchsia-500 to-indigo-500" | ||
[class.bg-gradient-to-r]="true" | ||
[class.ngm-background-animate]="answering()" | ||
[class.bg-gradient-to-r]="true" | ||
[class.ngm-background-animate]="answering()" | ||
> | ||
<form class="flex rounded-md px-2 py-1 overflow-hidden bg-white dark:bg-bluegray-700" [formGroup]="formGroup" | ||
(ngSubmit)="onSubmit()" | ||
> | ||
<div class="px-2 left-0 flex items-center"> | ||
<div *ngIf="suggesting()" class="pac-insight__suggesting emoji-loader text-base" [matTooltip]=" 'PAC.KEY_WORDS.SuggestingPrompts' | translate: { Default: 'Suggesting prompts' } "></div> | ||
<span *ngIf="!suggesting()" class="font-notoColorEmoji">🤖</span> | ||
</div> | ||
<input #promptInput type="text" id="simple-search" class="border-none outline-none text-gray-900 text-sm block w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" | ||
placeholder=" {{'PAC.KEY_WORDS.Ask' | translate: { Default: 'Ask' } }}..." required | ||
matInput | ||
[matAutocomplete]="auto" | ||
formControlName="prompt" | ||
> | ||
<form class="flex rounded-md px-2 py-1 overflow-hidden bg-white dark:bg-bluegray-700"> | ||
<mat-chip-grid #chipGrid> | ||
<div class="px-2 left-0 flex items-center"> | ||
<div *ngIf="suggesting()" class="pac-insight__suggesting emoji-loader text-base" [matTooltip]=" 'PAC.KEY_WORDS.SuggestingPrompts' | translate: { Default: 'Suggesting prompts' } "></div> | ||
<span *ngIf="!suggesting()" class="font-notoColorEmoji">🤖</span> | ||
</div> | ||
</mat-chip-grid> | ||
<input #promptInput type="text" id="simple-search" class="border-none outline-none text-gray-900 text-sm block w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" | ||
placeholder=" {{'PAC.KEY_WORDS.Ask' | translate: { Default: 'Ask' } }}..." required | ||
matInput [matAutocomplete]="auto" | ||
[formControl]="promptControl" | ||
> | ||
<div *ngIf="error" class="whitespace-nowrap text-ellipsis overflow-hidden text-red-400" | ||
[matTooltip]="error" | ||
> | ||
{{error}} | ||
</div> | ||
</form> | ||
@if(error) { | ||
<div class="whitespace-nowrap text-ellipsis overflow-hidden text-red-400" | ||
[matTooltip]="error" | ||
> | ||
{{error}} | ||
</div> | ||
} | ||
</form> | ||
</div> | ||
|
||
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)" class="pac-insight__autocomplete ngm-autocomplete-panel ngm-density__cosy"> | ||
<mat-option *ngFor="let prompt of suggestedPrompts()" [value]="prompt" | ||
(click)="$event.stopPropagation();$event.preventDefault();"> | ||
<span> | ||
{{prompt}} | ||
</span> | ||
<mat-autocomplete #auto="matAutocomplete" class="pac-insight__autocomplete ngm-autocomplete-panel ngm-density__cosy" | ||
hideSingleSelectionIndicator | ||
(optionSelected)="selected($event)" > | ||
@for (prompt of filteredSuggests(); track prompt) { | ||
<mat-option [value]="prompt" (click)="$event.stopPropagation();$event.preventDefault();"> | ||
<span [ngmHighlight]="search()" [content]="prompt"></span> | ||
</mat-option> | ||
} | ||
</mat-autocomplete> |
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