refactor(chat): streamline AssistantMessage and ToolInvocations components
- Moved the Markdown rendering for content in AssistantMessage to a new position for better structure. - Updated ToolInvocations component to enhance UI with improved spacing and keyboard shortcut handling for tool execution. - Added state management for expanded tool details and integrated keyboard shortcuts for approving and rejecting tool calls.
This commit is contained in:
@@ -176,6 +176,9 @@ export const AssistantMessage = memo(
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
<Markdown append={append} chatMode={chatMode} setChatMode={setChatMode} model={model} provider={provider} html>
|
||||
{content}
|
||||
</Markdown>
|
||||
{toolInvocations && toolInvocations.length > 0 && (
|
||||
<ToolInvocations
|
||||
toolInvocations={toolInvocations}
|
||||
@@ -183,9 +186,6 @@ export const AssistantMessage = memo(
|
||||
addToolResult={addToolResult}
|
||||
/>
|
||||
)}
|
||||
<Markdown append={append} chatMode={chatMode} setChatMode={setChatMode} model={model} provider={provider} html>
|
||||
{content}
|
||||
</Markdown>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user