ciyidogan commited on
Commit
eef383d
·
verified ·
1 Parent(s): 4f7c84c

Update flare-ui/src/app/services/conversation-manager.service.ts

Browse files
flare-ui/src/app/services/conversation-manager.service.ts CHANGED
@@ -137,23 +137,23 @@ export class ConversationManagerService implements OnDestroy {
137
 
138
  stopConversation(): void {
139
  try {
140
- // First stop audio recording
141
- this.audioService.stopRecording();
142
-
143
- // Then send stop signal if connected
144
- if (this.wsService.isConnected()) {
145
- this.wsService.sendControl('stop_session');
146
- }
147
-
148
- // Small delay before disconnecting
149
- setTimeout(() => {
150
- this.cleanup();
151
- this.addSystemMessage('Conversation ended');
152
- }, 100);
153
-
154
  } catch (error) {
155
- console.error('Error stopping conversation:', error);
156
- this.cleanup();
157
  }
158
  }
159
 
 
137
 
138
  stopConversation(): void {
139
  try {
140
+ // First stop audio recording
141
+ this.audioService.stopRecording();
142
+
143
+ // Send conversation end signal
144
+ if (this.wsService.isConnected()) {
145
+ this.wsService.sendControl('stop_conversation'); // stop_session yerine
146
+ }
147
+
148
+ // Small delay before disconnecting
149
+ setTimeout(() => {
150
+ this.cleanup();
151
+ this.addSystemMessage('Conversation ended');
152
+ }, 100);
153
+
154
  } catch (error) {
155
+ console.error('Error stopping conversation:', error);
156
+ this.cleanup();
157
  }
158
  }
159