Add debug transcript components
This commit is contained in:
18
web/components/debug-transcript/TranscriptItem.tsx
Normal file
18
web/components/debug-transcript/TranscriptItem.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from 'react';
|
||||
|
||||
import MessageText from './MessageText';
|
||||
import MessageTool from './MessageTool';
|
||||
import type { DebugTranscriptRow } from './types';
|
||||
|
||||
const TranscriptItem: React.FC<{
|
||||
row: DebugTranscriptRow;
|
||||
}> = ({ row }) => {
|
||||
if (row.kind === 'tool') {
|
||||
return <MessageTool row={row} />;
|
||||
}
|
||||
|
||||
return <MessageText row={row} />;
|
||||
};
|
||||
|
||||
export default React.memo(TranscriptItem);
|
||||
|
||||
Reference in New Issue
Block a user