File tree Expand file tree Collapse file tree 4 files changed +5
-35
lines changed Expand file tree Collapse file tree 4 files changed +5
-35
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,14 @@ export class ChatService {
11
11
private static instance: ChatService ;
12
12
private dbService: DatabaseService ;
13
13
private aiService: AIService ;
14
- private state: ChatState ;
15
14
private listeners: Set <() => void >;
16
15
17
16
// Singleton Access
18
17
public static getInstance(): ChatService ;
19
18
private constructor ();
20
19
21
20
// State Management
22
- private setState(newState : Partial <ChatState >): void ;
23
21
private notifyListeners(): void ;
24
- public getState(): ChatState ;
25
22
public subscribe(listener : () => void ): () => void ;
26
23
27
24
// Conversation Management
@@ -47,19 +44,6 @@ export class ChatService {
47
44
48
45
## Interfaces
49
46
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
-
63
47
## Message Processing
64
48
65
49
The Chat Service handles:
Original file line number Diff line number Diff line change @@ -43,19 +43,6 @@ export interface Conversation {
43
43
}
44
44
```
45
45
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
-
59
46
## API Settings Types
60
47
61
48
Located in ` src/services/api-settings.ts ` , these types define structures for API configuration.
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ export const ChatMessageArea: React.FC<ChatMessageAreaProps> = ({
33
33
34
34
// Scroll to bottom when messages change
35
35
useEffect ( ( ) => {
36
- console . log ( 'scrolling to bottom' ) ;
37
36
setTimeout ( ( ) => {
38
37
messagesEndRef . current ?. scrollIntoView ( { behavior : 'smooth' } ) ;
39
38
} , 50 ) ;
Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ export class ProviderFactory {
38
38
case 'Gemini' :
39
39
// Will be implemented with other providers
40
40
break ;
41
- case 'Fireworks' :
41
+ case 'Fireworks.ai ' :
42
42
// Will be implemented with other providers
43
43
break ;
44
- case 'Together' :
44
+ case 'Together.ai ' :
45
45
// Will be implemented with other providers
46
46
break ;
47
47
case 'OpenRouter' :
@@ -63,7 +63,7 @@ export class ProviderFactory {
63
63
/**
64
64
* Create an SDK client instance for a specific provider
65
65
*/
66
- public static createSdkClient ( name : ProviderName , model : string ) {
66
+ public static createSdkClient ( name : AIProvider , model : string ) {
67
67
const settingsService = SettingsService . getInstance ( ) ;
68
68
const settings = settingsService . getProviderSettings ( name ) ;
69
69
@@ -87,13 +87,13 @@ export class ProviderFactory {
87
87
apiKey : settings . apiKey
88
88
} ) ( model ) ;
89
89
90
- case 'Fireworks' :
90
+ case 'Fireworks.ai ' :
91
91
return createFireworks ( {
92
92
apiKey : settings . apiKey ,
93
93
baseURL : settings . baseUrl || 'https://api.fireworks.ai/inference/v1'
94
94
} ) ( model ) ;
95
95
96
- case 'Together' :
96
+ case 'Together.ai ' :
97
97
return createTogetherAI ( {
98
98
apiKey : settings . apiKey ,
99
99
baseURL : settings . baseUrl || 'https://api.together.xyz/v1'
You can’t perform that action at this time.
0 commit comments