Mayank2027 commited on
Commit
186b90c
·
verified ·
1 Parent(s): 6a2ad91

Update frontend/src/components/ChatPanel.tsx

Browse files
frontend/src/components/ChatPanel.tsx CHANGED
@@ -1,6 +1,6 @@
1
 
2
- # Fixed ChatPanel.tsx
3
- chatpanel_tsx = '''import React, { useState, useRef, useEffect, useCallback } from 'react';
4
  import axios from 'axios';
5
 
6
  interface Message {
@@ -143,7 +143,7 @@ const ChatPanel: React.FC<ChatPanelProps> = ({ projectPath }) => {
143
 
144
  const text = new TextDecoder().decode(value);
145
  const lines = text
146
- .split('\\n')
147
  .filter((l) => l.startsWith('data: '))
148
  .map((l) => l.slice(6));
149
 
@@ -404,4 +404,4 @@ export default ChatPanel;
404
 
405
  with open('/mnt/agents/output/ChatPanel.tsx', 'w') as f:
406
  f.write(chatpanel_tsx)
407
- print("ChatPanel.tsx written successfully")
 
1
 
2
+ # Fixed ChatPanel.tsx - proper TypeScript with correct escaping
3
+ chatpanel_tsx = r'''import React, { useState, useRef, useEffect, useCallback } from 'react';
4
  import axios from 'axios';
5
 
6
  interface Message {
 
143
 
144
  const text = new TextDecoder().decode(value);
145
  const lines = text
146
+ .split('\n')
147
  .filter((l) => l.startsWith('data: '))
148
  .map((l) => l.slice(6));
149
 
 
404
 
405
  with open('/mnt/agents/output/ChatPanel.tsx', 'w') as f:
406
  f.write(chatpanel_tsx)
407
+ print("ChatPanel.tsx fixed")