Skip to content

Commit f65c4cc

Browse files
committed
Fix: Remove duplicate AIProvider
1 parent 2175646 commit f65c4cc

File tree

4 files changed

+5
-35
lines changed

4 files changed

+5
-35
lines changed

.cursor/apis/chat-service.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ export class ChatService {
1111
private static instance: ChatService;
1212
private dbService: DatabaseService;
1313
private aiService: AIService;
14-
private state: ChatState;
1514
private listeners: Set<() => void>;
1615

1716
// Singleton Access
1817
public static getInstance(): ChatService;
1918
private constructor();
2019

2120
// State Management
22-
private setState(newState: Partial<ChatState>): void;
2321
private notifyListeners(): void;
24-
public getState(): ChatState;
2522
public subscribe(listener: () => void): () => void;
2623

2724
// Conversation Management
@@ -47,19 +44,6 @@ export class ChatService {
4744

4845
## Interfaces
4946

50-
### `ChatState`
51-
52-
Represents the current state of chat functionality.
53-
54-
```typescript
55-
export interface ChatState {
56-
conversations: Conversation[];
57-
activeConversationId: string | null;
58-
isLoading: boolean;
59-
error: string | null;
60-
}
61-
```
62-
6347
## Message Processing
6448

6549
The Chat Service handles:

.cursor/apis/types.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,6 @@ export interface Conversation {
4343
}
4444
```
4545

46-
### `ChatState`
47-
48-
Defines the state structure for the chat functionality.
49-
50-
```typescript
51-
export interface ChatState {
52-
conversations: Conversation[];
53-
activeConversationId: string | null;
54-
isLoading: boolean;
55-
error: string | null;
56-
}
57-
```
58-
5946
## API Settings Types
6047

6148
Located in `src/services/api-settings.ts`, these types define structures for API configuration.

src/components/chat/ChatMessageArea.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const ChatMessageArea: React.FC<ChatMessageAreaProps> = ({
3333

3434
// Scroll to bottom when messages change
3535
useEffect(() => {
36-
console.log('scrolling to bottom');
3736
setTimeout(() => {
3837
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
3938
}, 50);

src/services/providers/providers.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ export class ProviderFactory {
3838
case 'Gemini':
3939
// Will be implemented with other providers
4040
break;
41-
case 'Fireworks':
41+
case 'Fireworks.ai':
4242
// Will be implemented with other providers
4343
break;
44-
case 'Together':
44+
case 'Together.ai':
4545
// Will be implemented with other providers
4646
break;
4747
case 'OpenRouter':
@@ -63,7 +63,7 @@ export class ProviderFactory {
6363
/**
6464
* Create an SDK client instance for a specific provider
6565
*/
66-
public static createSdkClient(name: ProviderName, model: string) {
66+
public static createSdkClient(name: AIProvider, model: string) {
6767
const settingsService = SettingsService.getInstance();
6868
const settings = settingsService.getProviderSettings(name);
6969

@@ -87,13 +87,13 @@ export class ProviderFactory {
8787
apiKey: settings.apiKey
8888
})(model);
8989

90-
case 'Fireworks':
90+
case 'Fireworks.ai':
9191
return createFireworks({
9292
apiKey: settings.apiKey,
9393
baseURL: settings.baseUrl || 'https://api.fireworks.ai/inference/v1'
9494
})(model);
9595

96-
case 'Together':
96+
case 'Together.ai':
9797
return createTogetherAI({
9898
apiKey: settings.apiKey,
9999
baseURL: settings.baseUrl || 'https://api.together.xyz/v1'

0 commit comments

Comments
 (0)