fix ui and tests
This commit is contained in:
@@ -11,7 +11,7 @@ class LLMOptionsTest {
|
|||||||
LLMOptions options = LLMOptions.builder().build();
|
LLMOptions options = LLMOptions.builder().build();
|
||||||
|
|
||||||
assertEquals(0.9, options.getTemperature());
|
assertEquals(0.9, options.getTemperature());
|
||||||
assertEquals(4096, options.getMaxTokens());
|
assertEquals(16384, options.getMaxTokens());
|
||||||
assertEquals(60, options.getTimeoutSeconds());
|
assertEquals(60, options.getTimeoutSeconds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class ProviderFactoryTest {
|
|||||||
"https://generativelanguage.googleapis.com/v1beta/models",
|
"https://generativelanguage.googleapis.com/v1beta/models",
|
||||||
"gpt-4o-mini",
|
"gpt-4o-mini",
|
||||||
"https://api.openai.com/v1/chat/completions",
|
"https://api.openai.com/v1/chat/completions",
|
||||||
|
Duration.ofSeconds(180),
|
||||||
restTemplateBuilder
|
restTemplateBuilder
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class FakeProviderFactory extends ProviderFactory {
|
|||||||
public FakeProviderFactory() {
|
public FakeProviderFactory() {
|
||||||
super("gemini-2.0-flash", "https://generativelanguage.googleapis.com/v1beta/models",
|
super("gemini-2.0-flash", "https://generativelanguage.googleapis.com/v1beta/models",
|
||||||
"gpt-4o-mini", "https://api.openai.com/v1/chat/completions",
|
"gpt-4o-mini", "https://api.openai.com/v1/chat/completions",
|
||||||
null);
|
null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FakeProviderFactory withProvider(String name, FakeLLMProvider provider) {
|
public FakeProviderFactory withProvider(String name, FakeLLMProvider provider) {
|
||||||
|
|||||||
@@ -53,8 +53,10 @@ import { NgIf } from '@angular/common';
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button mat-flat-button color="primary" type="submit" [disabled]="loading" class="w-full py-2">
|
<button mat-flat-button color="primary" type="submit" [disabled]="loading" class="w-full py-2">
|
||||||
<mat-spinner *ngIf="loading" diameter="20" class="inline-block mr-2"></mat-spinner>
|
<span class="flex items-center justify-center">
|
||||||
|
<mat-spinner *ngIf="loading" diameter="20" class="mr-2"></mat-spinner>
|
||||||
{{ loading ? 'Signing in...' : 'Sign In' }}
|
{{ loading ? 'Signing in...' : 'Sign In' }}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,10 @@ import { AuthService } from '../../core/services/auth.service';
|
|||||||
<div *ngIf="error" class="text-red-600 text-sm">{{ error }}</div>
|
<div *ngIf="error" class="text-red-600 text-sm">{{ error }}</div>
|
||||||
|
|
||||||
<button mat-flat-button color="primary" type="submit" [disabled]="loading" class="w-full py-2">
|
<button mat-flat-button color="primary" type="submit" [disabled]="loading" class="w-full py-2">
|
||||||
<mat-spinner *ngIf="loading" diameter="20" class="inline-block mr-2"></mat-spinner>
|
<span class="flex items-center justify-center">
|
||||||
|
<mat-spinner *ngIf="loading" diameter="20" class="mr-2"></mat-spinner>
|
||||||
{{ loading ? 'Creating account...' : 'Create Account' }}
|
{{ loading ? 'Creating account...' : 'Create Account' }}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,10 @@ type PageState = 'check-email' | 'verifying' | 'verified' | 'set-password' | 'er
|
|||||||
<div *ngIf="resendError" class="text-red-600 text-sm mb-4">{{ resendError }}</div>
|
<div *ngIf="resendError" class="text-red-600 text-sm mb-4">{{ resendError }}</div>
|
||||||
|
|
||||||
<button mat-stroked-button (click)="resend()" [disabled]="resending" class="w-full mb-3">
|
<button mat-stroked-button (click)="resend()" [disabled]="resending" class="w-full mb-3">
|
||||||
<mat-spinner *ngIf="resending" diameter="16" class="inline-block mr-2"></mat-spinner>
|
<span class="flex items-center justify-center">
|
||||||
|
<mat-spinner *ngIf="resending" diameter="16" class="mr-2"></mat-spinner>
|
||||||
{{ resending ? 'Sending...' : 'Resend verification email' }}
|
{{ resending ? 'Sending...' : 'Resend verification email' }}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a routerLink="/login" class="block text-sm text-indigo-600 font-medium hover:underline">Back to login</a>
|
<a routerLink="/login" class="block text-sm text-indigo-600 font-medium hover:underline">Back to login</a>
|
||||||
@@ -79,8 +81,10 @@ type PageState = 'check-email' | 'verifying' | 'verified' | 'set-password' | 'er
|
|||||||
<div *ngIf="passwordError" class="text-red-600 text-sm">{{ passwordError }}</div>
|
<div *ngIf="passwordError" class="text-red-600 text-sm">{{ passwordError }}</div>
|
||||||
|
|
||||||
<button mat-flat-button color="primary" type="submit" [disabled]="passwordLoading || passwordForm.invalid" class="w-full py-2">
|
<button mat-flat-button color="primary" type="submit" [disabled]="passwordLoading || passwordForm.invalid" class="w-full py-2">
|
||||||
<mat-spinner *ngIf="passwordLoading" diameter="20" class="inline-block mr-2"></mat-spinner>
|
<span class="flex items-center justify-center">
|
||||||
|
<mat-spinner *ngIf="passwordLoading" diameter="20" class="mr-2"></mat-spinner>
|
||||||
{{ passwordLoading ? 'Setting password...' : 'Activate Account' }}
|
{{ passwordLoading ? 'Setting password...' : 'Activate Account' }}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user