feat(ui): Enhance AI model handling with Cursor support

- Refactor model handling to support both Claude and Cursor models across various components.
- Introduce `stripProviderPrefix` utility for consistent model ID processing.
- Update `CursorProvider` to utilize `isCursorModel` for model validation.
- Implement model override functionality in GitHub issue validation and enhancement routes.
- Add `useCursorStatusInit` hook to initialize Cursor CLI status on app startup.
- Update UI components to reflect changes in model selection and validation processes.

This update improves the flexibility of AI model usage and enhances user experience by allowing quick model overrides.
This commit is contained in:
Kacper
2025-12-30 04:01:56 +01:00
parent 3d655c3298
commit 39f2c8c9ff
38 changed files with 713 additions and 258 deletions

View File

@@ -1,6 +1,6 @@
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
import type { AgentModel } from '@/store/app-store';
import type { ModelAlias } from '@/store/app-store';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
@@ -9,7 +9,7 @@ export function cn(...inputs: ClassValue[]) {
/**
* Determine if the current model supports extended thinking controls
*/
export function modelSupportsThinking(_model?: AgentModel | string): boolean {
export function modelSupportsThinking(_model?: ModelAlias | string): boolean {
// All Claude models support thinking
return true;
}
@@ -17,7 +17,7 @@ export function modelSupportsThinking(_model?: AgentModel | string): boolean {
/**
* Get display name for a model
*/
export function getModelDisplayName(model: AgentModel | string): string {
export function getModelDisplayName(model: ModelAlias | string): string {
const displayNames: Record<string, string> = {
haiku: 'Claude Haiku',
sonnet: 'Claude Sonnet',